I have HTML text with inline mathjax, and I want to convert it to LaTeX. I can use pandoc with parameters tex_math_dollarsand tex_math_single_backslash, and this is a very good conversion job.
However, it cannot process the environment. The pandoc text skips all the internal content, not realizing that it must be transmitted verbatim to the LaTeX processor.
For example, if I have a fragment
\begin{equation}
a^2 + b^2 = c^2
\end{equation}
in the file test.htmland I ran the command
pandoc -f html+tex_math_dollars+tex_math_single_backslash -t latex test.html
I get a conclusion
\textbackslash{}begin\{equation\} a\^{}2 + b\^{}2 = c\^{}2
\textbackslash{}end\{equation\}
I even tried using `` '' for unblocking blocks of code, as in the pandoc user manual, but this did not affect.
source
share