Huge Latex Tables with Dokuwiki
(Ubuntu 9.04 – Jaunty Jackelope , Kernel 2.6.28-13-generic, Gnome 2.26.1)
I got stucked when I tried to render bigger tables with the nice open source web application Dokuwiki using the Latex Block Parser plugin ending in a simple Latex word left.
Rendering small Latex tables in the Dokuwiki will work even with label and caption options using the syntax
<latex>
\begin{table}[ht]
\centering
\begin{tabular}{c c c }
\hline
11 & 12 & 13 \\
21 & 22 & 23 \\
31 & 32 & 33 \\
\hline
\end{tabular}
\caption{This is a Caption}
\label{tab:optimizing_methods}
\end{table}
</latex>
which is definately pretty cool. So you can easily copy your whole table written in Latex to the Dokuwiki. But coming to that point, that did not work for tables which have long captions, lots of rows / columns and many information. The reason are arbitrary limitations by the renderer made inside the the file
dokuwiki/lib/plugins/latex/class.latexrender.php
Open it, scroll a bit down and find the lines saying
var $_xsize_limit = 500; var $_ysize_limit = 500; var $_string_length_limit = 500;
I changed the numbers to 1000, 1000 and 1500, whereas the former two give the maximum width and height of the rendered output image in whatever units the latex renderer uses. The string length limit changes the maximum amount of characters for rendering, which can be much higher than 500 for big tables. I changed it to 1500, which seemed to be enough for my purposes.
So far I haven’t experienced any complications.
Tags: big tables, dokuwiki, latex block parser
Oktober 23rd, 2009 at 19:34
Excellent article, bookmarked for future referrence