Extension talk:Wiki2LaTeX/Development/w2lParser.php

Table support
I've transplanted the table parser from mediaWiki into doTableStuff and externalTableHelper, so the parser is now totally compatible with the wiki table markup supported by mediaWiki. (Except captions, that requires some extra LaTeX fiddeling, like putting the table inside a figure, or something.)

To coax LaTeX into making a nice table, some extra input is needed. Therefore, I added support for an extra attribute "latexfmt" to the table. The attribute as then passed on to LaTeX to tell how many rows there are, and which type of cells should be used for each row. An extra cell type Y is introduced for left-aligned text than can wrap. Example:

HTML-style tables can be supported by replacing &lt;table&gt;, &lt;tr&gt;, &lt;td&gt; etc. in processHtmlEntities, but the tables will normally look terrible because the latexfmt attribute is missing.

-Ole, Aug 22nd 2007.