You are using a browser which doesn't fully support Cascading Style Sheets. This site will look much better in a browser that supports web standards, but its content is accessible to any browser or Internet device.

Formatted tables

We already saw how simple tables can be written. Just use the table paragraph and write your rows and columns:

   @|
   given name | name    | playing
   Peter      | Paul    | Guitar
   Paul       | Newby
   Mary Ann   | Shuttle | Chess

The problem with this simple approach, if you want to call that a problem, is that all the formatting is controled outside. You might be able to set up in the converter call or config or style how tables should be layoutet, but the other side of this medal is that here in your document you have almost no control about it.

And that's ok, given that it is considered good to separate layout issues from a documents source.

Nevertheless, there are times when it seems you need more control. And that's why we added table tags.

A table defined via tags looks like this:

   \TABLE
   given name | name    | playing
   Peter      | Paul    | Guitar
   Paul       | Newby
   Mary Ann   | Shuttle | Chess
   \END_TABLE

So, what's the difference? The table starts with a tag ( \TABLE), and it ends with another tag ( \END_TABLE). The rows are still lines, and the cells are still separated by pipe characters. But these are only the defaults - dealing with tags now we can fine tune the whole thing.

For example, we can add newlines. As they are no longer completing our table, there is no reason not to have them if this makes our source more readable. Paul and Mary might be related:

   \TABLE
  
   given name | name    | playing
  
   Peter      | Paul    | Guitar
  
   Paul       | Newby
   Mary Ann   | Shuttle | Chess
  
   \END_TABLE

Or we could use another separator. With tags this is set up by the separator option.

   \TABLE{separator=")("}
   given name )( name    )( playing
   Peter      )( Paul    )( Guitar
   Paul       )( Newby
   Mary Ann   )( Shuttle )( Chess
   \END_TABLE

Or we could add alignment with align. In fact we can add most of the options that are valid for HTML's <table> tag - and as long as we produce HTML or XHTML they will be directly passed to the <table> tag that is generated for that table. (For other target languages only subsets might be supported - which shows that these extensions are handy but not common.)

Does a tag table need to be placed at the beginning of a paragraph? No! It does not because a tag is allowed everywhere in a paragraph - and that is true for table tags as well.

   Peter, Paul and Mary play different instruments: \TABLE
   given name | name    | playing
   Peter      | Paul    | Guitar
   Paul       | Newby
   Mary Ann   | Shuttle | Chess
   \END_TABLE, and that's well known for a long time.

But hey, this doesn't look better, does it? All these newlines make this construct rather hard to read. No problem - rows can be separated by other strings as well - set up in rowseparator.

   Peter, Paul and Mary play different instruments:
   \TABLE{rowsaparator="**"} given
   name | name | playing ** Peter | Paul | Guitar
   ** Paul | Newby ** Mary Ann | Shuttle | Chess
   \END_TABLE, and that's well known for a long time.

Now we have a table that is completely inlined.