Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get syntax highlighting for LaTeX code blocks in ikiwiki (just something like it is automatically done in tex.sx)?

To avoid misunderstandings: I don't mean math output produced for example by mathjax. I want to document latex-tricks in my wiki, so I have to put some snippets of latex source code in it to show how something is done in latex. For example:

"Here is an example how to use tikz:



   \draw (0,0) --node[sloped,above]{$x$} (1,1);


Here the code block above just appears with a grey background but without syntax highlighting of the source code. If I would put the same snipped on tex.sx there would be a syntax highlighting of the code.

share|improve this question
up vote 2 down vote accepted

For syntaxhighlighting in Ikiwiki there is a plugin called highlight. You can use it like

[[!format tex """

This will give you nice syntax highlighting. It uses Perl bindings. The library itself has a longer documentation.

share|improve this answer
Thanks, that's what I want. However I don't see, how to install and enable it. Can you include the relevant steps into your answer? I just did sudo aptitude install libhighlight-perl to get the libraries. According to your link then I have to get and install a plugin called format, but I don't know where and how... – student Nov 3 '12 at 20:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.