Doc Tables

Standard Tables #

Tables structures in KnowWE are marked up by vertical slashes. Each cell is marked up by one preceding vertical slash. It is possible to create table headings by using a double vertical slash for defining each heading cell. The table syntax is best understood by looking at a small example:
||Heading 1 || Heading 2 || Heading 3 
|Content 1-1| Content 1-2| Content 1-3 
|Content 2-1| Content 2-2| Content 2-3 

renders to:

Heading 1 Heading 2 Heading 3
Content 1-1 Content 1-2 Content 1-3
Content 2-1 Content 2-2 Content 2-3

As the example shows, heading cells are introduced by a double vertical slash each, normal content cells are marked by a single slash.

Sortable Tables#

Simply wrap your standard table definition with the markup.

%%sortable
||Heading 1 || Heading 2 || Heading 3 
|Content 1-1| Content 1-2| Content 1-3 
|Content 2-1| Content 2-2| Content 2-3 

renders to:

Heading 1 Heading 2 Heading 3
Content 1-1 Content 1-2 Content 1-3
Content 2-1 Content 2-2 Content 2-3

Columns of sortable tables can be sorted by clicking on the particular heading name.

Zebra Tables#

For wide tables it may be reasonable to color table lines differently.

%%zebra-table
||Heading 1 || Heading 2 || Heading 3 
|Content 1-1| Content 1-2| Content 1-3 
|Content 2-1| Content 2-2| Content 2-3 
|Content 3-1| Content 3-2| Content 3-3 
|Content 4-1| Content 4-2| Content 4-3 

renders to:

Heading 1 Heading 2 Heading 3
Content 1-1 Content 1-2 Content 1-3
Content 2-1 Content 2-2 Content 2-3
Content 3-1 Content 3-2 Content 3-3
Content 4-1 Content 4-2 Content 4-3