Talk:Display an outline as a nested table: Difference between revisions
Content added Content deleted
Line 35: | Line 35: | ||
FWIW I've updated the Haskell, JavaScript and Functional Python versions here to allow for the forest case by writing out a series of (wiki) tables, one for each tree, separated by a couple of linefeeds. |
FWIW I've updated the Haskell, JavaScript and Functional Python versions here to allow for the forest case by writing out a series of (wiki) tables, one for each tree, separated by a couple of linefeeds. |
||
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 15:19, 6 September 2021 (UTC) |
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 15:19, 6 September 2021 (UTC) |
||
For example, a forest outline – with several top-level nodes – like: |
|||
<pre>alpha |
|||
beta |
|||
gamma |
|||
delta |
|||
epsilon |
|||
zeta |
|||
eta |
|||
theta |
|||
iota</pre> |
|||
might be rendered by the following sequence of space-separated tree-tables: |
|||
{| class="wikitable" style="text-align: center;" |
|||
|- |
|||
| style="background: #ffffe6; " colspan=2 | alpha |
|||
|- |
|||
| style="background: #ffebd2; " | beta |
|||
| style="background: #f0fff0; " | gamma |
|||
|} |
|||
{| class="wikitable" style="text-align: center;" |
|||
|- |
|||
| style="background: #ffffe6; " colspan=2 | delta |
|||
|- |
|||
| style="background: #ffebd2; " | epsilon |
|||
| style="background: #f0fff0; " | zeta |
|||
|} |
|||
{| class="wikitable" style="text-align: center;" |
|||
|- |
|||
| style="background: #ffffe6; " colspan=2 | eta |
|||
|- |
|||
| style="background: #ffebd2; " | theta |
|||
| style="background: #f0fff0; " | iota |
|||
|} |
|||
[[User:Hout|Hout]] ([[User talk:Hout|talk]]) 15:41, 6 September 2021 (UTC) |