The aim is to convert a Markdown file (file.md) to a html file (file.html).

The Markdown file contains formulas specified in LaTeX specified between two dollar ($) signs.


The resulting formula is
$p\left(n,k,i\right)=\dfrac{{n-i-1 \choose k-1}}{{n \choose k}}$

But the resulting .html file only contains $p(n,k,i)=$ with nothing in the raw html source code to render the rest of the formula and with the dollars shown explicitly.

How can one convert LaTeX-flavored markdown to the html equivalent?

The conversion is done with pandoc using the following flags:

pandoc --from markdown-tex_math_dollars -t html file.md

Pandoc version:

Compiled with texmath, highlighting-kate

Apparently markdown-tex_math_dollars means disabling the tex_math_dollars feature instead of enabling it. (The minus). If one simply writes markdown, the math is interpreted. One can use one of the options shown here to select how the math should be rendered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.