1 <h5>Tables: handling table nesting and other unwanted (
"boring") tables
</h5>
3 <p>Handling of tables with nested tables has been implemented. This is necessary because
4 nested tables can't be translated into correct dokuwiki syntax.
</p>
6 <p>The command-line switch
<code>--boring-tables-bodylevel
</code>
7 turns also on the special handling of tables which are immediate
8 children of
<code>BODY
</code> (actually, not counting intermediate
9 <code>DIV
</code>s). They are not translated into dokuwiki tables as
10 well. (This can be useful for MSOffice-generated documents where
11 toplevel tables are used for layout.)
</p>
15 <p>The code for handling nested tables can, in fact, be useful for any
16 other HTML::WikiConverter dialect modules. In fact, it needs even no
17 code changes, and so it should be transferred into WikiConverter.pm.
18 The dialects should then add a call to
19 <code>_mark_complex_tables_boring
</code>
20 in
<code>preprocess_node
</code>, if they wish, and add rules for the
22 <code>boringtable boringtbody boringthead boringtfoot boringtr
23 boringth boringtd
</code>.
24 I needed to put just a pair of obvious rules:
</p>
27 boringtd =
> { block =
> 1, trim =
> 'both', line_format =
> 'blocks' },
28 boringth =
> { alias =
> 'boringtd' },
31 <p>to treat every
"boring" table cell as a block of blocks.
</p>
33 <p>"Boring" are the tables which we can't represent as tables;
34 <code>_mark_complex_tables_boring
</code> marks the higher-level tables
35 which have nested tables inside as
"boring". You may wish to define
36 your own procedure with a different principle.
</p>
38 <p>Our code for handling body-level tables can also be re-used in
41 <p>In future, there may be a general option to select different ciriteria for
42 marking tables boring, like
43 <code>--boring-tables=bodylevel
</code>.
</p>