Index ¦ Archives ¦ RSS

Asciidoc source hilight for html and pdf output

Estimated read time: 1 minutes

Long time no blog, mainly because I'm pretty busy with real life.

So yesterday I got an answer on the asciidoc list about how to do C++ source hilighting that works with html and pdf output as well. The problem is that source-highlight (used for html) and docbook have a different name for this crappy language.

The solution was to do

:cpp: cpp

Which says "if docbook, then c++ otherwise cpp", and then I can just use

----
code
----

Yay!

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.