I'm trying to convert a .md to pdf that contains both html-style colors:
<span style="color:#3297A5">**Like this**</span>
$$
J(\theta) = \frac{1}{2m} [\sum_{i=1}^{m}(h_\theta(x^{(i)})-y^{(i)})^2 + \
lambda\sum_{j=1}^{n}(\theta_j^2)].
$$
pandoc -s -o test.pdf test.md
If you want to use CSS to change colors, you'll have to use wkhtmltopdf instead of LaTeX, e.g.
$ pandoc input.md --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 http://pandoc.org/MANUAL.html#creating-a-pdf