Hacker News new | ask | show | jobs
by neatcoder 2642 days ago
Does AsciiDoc have a nice way to ignore all LaTeX code enclosed within $...$ (inline math), $$...$$ (displayed math), \(...\) (inline math), and \[...\] (displayed math)?

I think one of the problems of Markdown is that it does not provide a way for the Markdown parser to ignore any text within certain delimiters (I especially care about ignoring text within Latex math delimiters). This is the most crucial reason why I am using tools like TexMe or Markdeep.

Is AsciiDoc better in this area? If yes, it would definitely solve a big problem for me that Markdown does not solve.

1 comments

AFAIK there are several ways to embed LaTeX and mathematical formulas in AsciiDoc such as asciidoctor-latex [1] or ASCIIMathML and LaTeXMathML [2].

AsciiDoc also allows embedding literal paragraphs or blocks of text [3]. I think the mechanism of passthrough macros [4] can be used to copy raw text to the output and allow further processing down the pipeline, though I'm not sure how it's used.

[1] https://github.com/asciidoctor/asciidoctor-latex

[2] http://asciidoc.org/#X3

[3] http://asciidoc.org/userguide.html#X76

[4] http://asciidoc.org/userguide.html#X77