In the last few posts I’ve made, I had to paste a lot of latex code into them. The problem was that SyntaxHighligther (The script that WP SyntaxHighligther is based on) lacks support in latex highlighting.

Luckily enough, The SyntaxHighlighter script is very generic, which allowed me to just add my own latex brush into it.

I’ve also made a patch for WP SyntaxHighligther which adds the brush. It can be found here. You might need to reset the settings. I’ve submitted a request to add it to the official WP SyntaxHighligther version, hopefully it will be added soon enough.

In my last post, I’ve shown a way to fix the hyperref package so it would work with RTL languages.

One of the problem float were that the brackets in the pdf bookmarks were inverse. Again, It’s probably caused by the inverse parsing. The solution for that is pretty simple, replace the function that sets the bookmark and add a code to replace between ‘(‘ and ‘)’ (and for the other brackets as well, i.e. “[]{}<>”)

The “problem” was, that the function I had to replace is pretty long, and I was too lazy in order to find a better solution, therefor you will had one big ugly part of code in your solution (until I will have the time to build my own).

So in order to fix the bracket, all you have to do is to add this code to the preamble: