Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is my code in file foo.html:

<!DOCTYPE html>
<html>
<head><title>Foo</title></head>
<body>
<h1>Example equation</h1>
<div>
$$ 1 + 2 = 3 $$
</div>
<div>
\[ 1 + 2 = 3 \]
</div>
</body>
</html>

I execute this command:

pandoc -f html+tex_math_single_backslash foo.html -o foo.pdf

The output foo.pdf has the headings rendered properly as headings in PDF. But the LaTeX math is not rendered as math in the PDF, instead it appears verbatim (in code form) in the HTML.

enter image description here

How can I resolve this?

share|improve this question
    
You could save yourself a lot of trouble by writing your content straightaway in Pandoc Markdown and then have Pandoc convert it to XHTML and PDF. Pandoc Markdown is very similar to the Markdown variant used here at StackExchange. In addition, it offers a number of very useful extensions on top. –  Serge Stroobandt Jan 7 at 13:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.