StructuredText supports tables with a simpler markup than HTML using this markup: |-------| |h1 |h2 | |=======| | a | b | |-------| | c | d | |-------| which renders as:
Also, Structured Text in ZWiki supports this variant; the + at the corners makes it easier to edit in Emacs. It may not be worth deviating from the standard though: +---+---+ | a | b | +---+---+ | c | d | +---+---+ Renders as:
You can influence horizontal and vertical justification by positioning your text within the cell. Also, you can use a wider cell when you need to. Other variations may cause Structured Text not to recognize the table or even give an error. If you're editing these a lot, you definitely want help from something like picture-mode. There's also table.el . In some cases it may be quicker to use :: and fixed width text, as above. Notes and examples(from FranOReilly?) Basically, you need to "draw" the table borders and cell borders with |
and - characters. The important bits are that the first and last lines are
Here are three examples: |--------------------------| | Col1 | Col2 | col3 | |--------------------------| |This is a spanning row | |--------------------------| |Cell1 | Cell 2 | Cell 3 | |--------------------------|
This one is a table with table headers (the first row separator line is
made of |--------------| |Date | Time | |==============| |20/5 | 12:00 | |--------------| |21/5 | 13:15 | |--------------|
Here is an example of a table embedded in a table from the StructuredTextWiki:StructuredTextNGRules: |-------------------------------------------------| | Function | Documentation | |=================================================| | '__str__' | This method converts the | | | the object to a string. | | | | | | - Blah | | | | | | - Blaf | | | | | | |--------------------------| | | | | Name | Favorite | | | | | | Color | | | | |==========================| | | | | Jim | Red | | | | |--------------------------| | | | | John | Blue | | | | |--------------------------| | |-------------------------------------------------|
The generated tables aren't very compact or pretty. Nested Example : +------------------------+ | <center> | | Top-o-the-World, | | | | MA!!!</center> | +========================+ | | | | | +-------------------+ | | | | | | | self | | | | | | | | +---------------+ | | | | | | | | | | | centered? | | | | | | | | | | | +---------------+ | | | | | | | +-------------------+ | | | +------------------------+ renders as:
The "+" way doesn't need the right wall of the box, although it needs all 4 corners. This leads to some interesting possibilities...
eratic block endings:
|