TxStyle · Textile Documentation

The Textile Markup Reference for Textpattern


Table support

Tables have been extended to add greater control over their presentation. Each of the following areas employs similar syntax to existing table characters wherever possible.

Caption

Add a table caption using the following on its own row. It must appear above your first table row/thead declaration. The usual (class#id){style}[lang] attributes can be used before the dot.

|=. Your caption goes here

Summary

Place a summary of your table (for screen readers) after the optional table definition:

table(myTable). This is a journey into sound. Stereophonic sound.

<thead>

Put this sequence on its own line — usually immediately before your |_. row(s) — to output a <thead> tag block and thus designate them as header information:

|^.

The usual (class#id){style}[lang] attributes can be used before the dot.

<tfoot>

Put this on its own line before some table rows to designate what follows as footer content:

|~.

The usual (class#id){style}[lang] attributes can be used before the dot. Note that if adhering to HTML 4, the tfoot must occur before any tbody sections if you want the page to validate.

<tbody>

Put this on its own line before regular table rows to designate them as body content:

|-.

The usual (class#id){style}[lang] attributes can be used before the dot. Multiple tbody tags can be used to separate logical blocks of content.

colgroups

Column group specification is supported using the following syntax on its own row. It must appear above your first table row/thead declaration (either before or after any caption) :

|:.

Specify the usual (class#id){style}[lang]\colspan attributes before the dot to affect all columns in the colgroup. Any number appearing after the dot is considered to be a width designator for the entire colgroup.

You may also add ‘cells’ to this row, each of which will specify the span and width of a <col> tag. Examples:

Specify width of all columns in the colgroup

|:. 100|
<colgroup width="100">
</colgroup>

Specify width and span in a colgroup tag

|:\3. 100|
<colgroup span="3" width="100">
</colgroup>

Specify individual <col> tags to control the layout of columns

|:. |\2. |\3. 50|
<colgroup>
   <col span="2" />
   <col span="3" width="50" />
</colgroup>

Designate a default span and width (plus class/id) to the colgroup, then override the widths of some columns

|:\5(grpclass#grpid). 200 | 100 |||80|
<colgroup class="grpclass" id="grpid" span="5" width="200">
   <col width="100" />
   <col />
   <col />
   <col width="80" />
</colgroup>

(all above from the Textile 2.2 release notes)


Further Information
PHP Textile versions
Textile related linklists

Tools
Blank input form
Table Data Converter

Report Issues
Issues on PHP Textile (GitHub)



PHP Textile v3.5.5


Donate Textile
development