TMorville TMorville - 3 years ago 216
Markdown Question

Pandocs: Md to pdf, support of html-style colors?

I'm trying to convert a .md to pdf that contains both html-style colors:

<span style="color:#3297A5">**Like this**</span>

and math:

J(\theta) = \frac{1}{2m} [\sum_{i=1}^{m}(h_\theta(x^{(i)})-y^{(i)})^2 + \


pandoc -s -o test.pdf

outputs formatting and math fine, but no colors. Using this online md to
pdf tool i get the colors right, but not
the math, which indicates that md to pdf conversion of html-style colors is possible?

Answer Source

If you want to use CSS to change colors, you'll have to use wkhtmltopdf instead of LaTeX, e.g.

$ pandoc --mathjax -t html5 -o output.pdf

(or try --mathml instead of --mathjax, see the pandoc manual)

Alternatively, you can use a LaTeX template and do layouting there. For more info, see

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download