[Tex/LaTex] Which Latex environments are supported in Markdown and pandoc

environmentsmarkdownpandoc

Does anyone know which Latex environments that are supported in pandoc when converting Markdown to html?

I have tested equation, align, alignat which seams to work, so is there e.g. a family/kind of environments that are supported, so I don't need to test by trial and error?

Best Answer

Pandoc creates the converted document using a default template which is mostly a long LaTeX preamble. To find it, search for a file called default.latex in the pandoc installation directory): in my Linux version, for instance, it is in /usr/share/pandoc/data/templates/default.latex. You can open it and find which packages it contains.

There are some other control instructions in the file, apart from standard LaTeX code, but they are readable enough, e.g.,

$if(mainfont)$
    \setmainfont{$mainfont$}
$endif$

In my version, the preamble includes (among others packages less relevant here) amssymb and amsmath, so you can use every math font and environment defined in these packages. You can check their documentation, available on http://www.ctan.org/pkg/amsmath and http://www.ctan.org/pkg/amsfonts, to find exactly what is included (in particular the amsmath guide is very helpful and well-written, when it comes to equation environments.

If you need more functions, you can add packages and change the default preamble using pandoc command line arguments.