Hello Oleg,
Thank you for making this fork. I don't know if you have noticed, Pandoc can produce RawInline
and RawBlock
elements for plain TeX strings inside a markdown document.
For example, the two LaTeX environments in
Inline environment,
\begin{align*}
a &= 1 + 1\\
&= 2
\end{align*}
rest of the paragraph.
\begin{tikzpicture}[>=stealth]
\draw[->] (-1,0) -- (1,0);
\draw[->] (0,-1) -- (0,1);
\end{tikzpicture}
will be compiled to the following Pandoc ASTs, respectively,
RawInline (Format "tex") "\\begin{align*}\n a &= 1 + 1\\\\\n &= 2\n\\end{align*}"
RawBlock (Format "tex") "\\begin{tikzpicture}[>=stealth]\n \\draw[->] (-1,0) -- (1,0);\n \\draw[->] (0,-1) -- (0,1);\n\\end{tikzpicture}"
which means it's possible to generate images for any TeX strings inside a markdown document with two filters of type
Inline -> Inline
Block -> Block
and put the raw TeX string into here.
By the way, the Pandoc AST can be generated using
$ pandoc -t native test.md
I was looking at the code to see if it's possible to extend it to support general LaTeX environments, but it seems that some major refactoring is needed because currently environments are tied to MathType
. Also, "formula" is in most functions' names :). It probably doesn't make sense to make another fork of this. Could you consider implementing this feature? I might be able to help but there can be some major design decisions to be made.
Best,