Elephant Wiki and EWiki offer different ways of creating tables. While Wiki is addressed for more simple content, or e-mails, the EWiki syntax is largely recommended.
The Table Wmacros accept a variety of structures, going from auto-creating columns to full column detail, for table headers, value rows, and footers.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Total 1 | Total 2 | Total 3 |
@w{table}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{tfooter(values="Total 1|Total 2|Total 3")}
@w{/table}
This example shows how to auto-create columns. Cell values are separated by the | character.
By default a table will use the full width of the container. You can change this by declaring a collapsing table.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
@w{table(class=collapsing)}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{/table}
You can also create definition tables.
| Table | Description | Included |
|---|---|---|
| Concept 1 | Describing concept 1 | |
| Concept 2 | Describing concept 2 |
@w{table(class=definition)}
@w{theader(values="Table|Description|Included")}
@w{trow(values="Concept 1|Describing concept 1|%icon-green checkmark%")}
@w{trow(values="Concept 2|Describing concept 2|%icon-red times%")}
@w{/table}
Long tables can be striped.
| Col 1 | Col 2 | Col 3 |
|---|---|---|
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
| Value 1 | Value 2 | Value 3 |
@w{table(class=striped)}
@w{theader(values="Col 1|Col 2|Col 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{trow(values="Value 1|Value 2|Value 3")}
@w{/table}
For highly formatted tables, cells can be detailed using columns.
| Name | Status | Notes |
|---|---|---|
| John |
|
Visit |
| Donald | Doesn't seem to understand | Not interesting |
@w{table(class=celled)}
@w{theader(values="Name|Status|Notes")}
@w{trow}
@w{tcol(value=John)}
@w{tcol(class=positive)}
* Great feedback
* Found the new features
@w{/tcol}
@w{tcol(value=Visit)}
@w{/trow}
@w{trow}
@w{tcol(value=Donald)}
@w{tcol(class=negative,value="Doesn't seem to understand")}
@w{tcol(class=warning,value=Not interesting)}
@w{/trow}
@w{/table}
Notice that trow without the values parameter requires specifying tcol separately, and have a closing trow. Same case for tcol without the value parameter. Whenever a column has any kind of formatted content, including an inner table, you'll use the open/closing tcol Wmacro.