Pandoc a universal document converter
References
Installation
wget "https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb"
sudo dpkg -i pandoc-2.11.4-1-amd64.deb
Basic usage
Convert markdown to PDF
pandoc report.md --pdf-engine=xelatex -o report.pdf
Convert markdown to HTML
# HTML fragment (plain html)
pandoc page.md -o page.html
# HTML with style (-s for standalone)
pandoc -s page.md -o page.html
# Add advanced LaTeX math
pandoc -s page.md --mathjax -o page.html
Example of LaTeX to HTML Conversion
pandoc \
--standalone \
--toc --toc-depth=2 \
--mathjax=https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js \
--css="../../style.css" \
-o index.html \
readme.tex