Is there a way of converting a markdown file with html code to a pdf? I have the following in Atom preview:
To get the red color I used the following:
# <span style="color:red">The Apolytikion in Tone 5 </span>
But when I convert it into a pdf file via Pandoc I get this,
Is there a way to keep the red color?
Pandoc allows to select the PDF engine used for the conversion. The default is to go via LaTeX and pdflatex, HTML will be lost. However, there are other engines that use HTML: wkhtmltopdf, weasyprint, and prince (prince is not free). E.g.,
pandoc --pdf-engine=wkhtmltopdf …
The respective program must be installed separately and in your PATH. You can download wkhtmltopdf from wkhtmltopdf.org; for WeasyPrint see https://weasyprint.org.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With