TypeText Markup -- Tables
==================
Christian Augustin (mail@caugustin.de)
2011-11-20
en-US
2012-02-15 Draft
-------------------------------------------
Tabular Text ("Invisible" Tables)
One This is the next column. And a third one.
Two Another row.
This would be part of the second column
of the previous row (without the line break)!
Three And one more. The third column.
_ This would go into the third column
of the row (without line breaks).
Columns are marked by at least 3 spaces or one tab character; a column has to have content in it (could be a non-breaking space marked by a single underline character `_`), with the exception of a "row continuation".
Columns starting with one or more non-breaking spaces (and visible content) are interpreted as being right-aligned, those with non-breaking spaces left and right as centered. Leading and trailing white-space is stripped by the parser:
_ 1 _*_ Position _50 EUR
... ... ... ...
_10 _**_ Position _5 EUR
---- ---- ---------- ---------
_ _ Total _= 55 EUR
Empty lines terminate tabular text!
As can be seen in the examples, the use of tabular text is a little bit clumsy and should only be used for simple cases and preferably with only two columns (this is the use case it is intended for).
-------------------------------------------
Tables
The table syntax is based on different precursors, mainly on my work with the MetaDoc-W syntax and on AsciiDoc (where I found the ideas of surrounding the table and having line breaks and empty lines inside a table - it can be soooo easy ... but let's see if the parser is as easy to implement ...).
|--------------
== Table Caption ==
|--------------
|= th cell | td cell | td cell
| td cell |
deferred cell on next line |
another deferred cell
| td cell | td cell | td cell
| td cell | td cell | td cell
| td cell | td cell | td cell
|--------------
????
Instead of using equal signs like AsciiDoc, only dashes are used in TypeText - equal signs seem too prominent and are used to denote captions and table head cells.
There remains a problem with content elements in table cells - but it might be easier than it looks (I have some ideas how to accomplish it).
????
->"Home"
->"TypeText Markup"
->"About"