Source code highlighting in Markdown (currently Multimarkdown)
John MacFarlane
jgm at berkeley.edu
Tue Sep 23 11:09:38 EDT 2014
+++ Jan Erik Moström [Sep 23 14 14:43 ]:
>I'm using a script to convert a set of markdown files to static web
>sites - sites for various courses I'm teaching. This script uses
>multimarkdown to do the actual conversion.
>
>Since I mostly teach various programming courses I would like to have
>syntax highlighting of the source code I present.
>
>What is the best way to do this?
Pandoc will highlight fenced code blocks, no external libraries
required. And it will work the same whether the output is HTML,
EPUB, LaTeX/PDF, or Word.
Pandoc has a somewhat different set of features than multimarkdown
(https://github.com/jgm/pandoc/wiki/Pandoc-vs-Multimarkdown)
but will emulate most of the mmd syntax if you use
`-f markdown_mmd`. So it might suit your needs.
John
More information about the Markdown-Discuss
mailing list