Display an outline as a nested table: Difference between revisions
Content added Content deleted
(→{{header|Go}}: Added a second example, based on the Perl 6 / zkl entries.) |
m (→{{header|zkl}}: cut and paste error) |
||
Line 1,241: | Line 1,241: | ||
| style="background: #ffebd2 " colspan=1 | translating the indentation to a nested structure, |
| style="background: #ffebd2 " colspan=1 | translating the indentation to a nested structure, |
||
| style="background: #ffebd2 " colspan=1 | and padding the tree to even depth. |
| style="background: #ffebd2 " colspan=1 | and padding the tree to even depth. |
||
⚫ | |||
| style="background: #f0fff0 " colspan=1 | defining the width of a leaf as 1, |
| style="background: #f0fff0 " colspan=1 | defining the width of a leaf as 1, |
||
⚫ | |||
| style="background: #e6ffff " colspan=1 | either as a wiki table, |
| style="background: #e6ffff " colspan=1 | either as a wiki table, |
||
| style="background: #e6ffff " colspan=1 | or as HTML. |
| style="background: #e6ffff " colspan=1 | or as HTML. |
||
Line 1,248: | Line 1,248: | ||
|- |
|- |
||
| style="background: #ffebd2 " colspan=3 | |
| style="background: #ffebd2 " colspan=3 | |
||
⚫ | |||
| style="background: #f0fff0 " colspan=1 | (The sum of the widths of its children) |
| style="background: #f0fff0 " colspan=1 | (The sum of the widths of its children) |
||
| style="background: #f0fff0 " colspan=1 | Propagating the sums upward as necessary. |
| style="background: #f0fff0 " colspan=1 | Propagating the sums upward as necessary. |
||
⚫ | |||
| style="background: #e6ffff " colspan=2 | |
| style="background: #e6ffff " colspan=2 | |
||
| style="background: #ffeeff " colspan=1 | |
| style="background: #ffeeff " colspan=1 | |