Warning: include_once(cookbook/pmfeed.php): failed to open stream: No such file or directory in /misc/32/000/115/128/8/user/web/bisharat.net/wikidoc/local/config.php on line 63

Warning: include_once(): Failed opening 'cookbook/pmfeed.php' for inclusion (include_path='.:/usr/share/pear') in /misc/32/000/115/128/8/user/web/bisharat.net/wikidoc/local/config.php on line 63
PanAfriL10n - PmWiki - SimpleTables

Basic markup

Tables are created via use of the double pipe character: ||. Lines beginning with this markup denote the beginning of table rows. Appearance of this character within a line denotes table cells. A border has been added to this table for visual purposes; default border width is 0.

Example 1. Basic table.

This markup:

    || border=1
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||

creates this table:

cell 1cell 2cell 3
cell 1cell 2cell 3

Header cells can be created by placing ! as the first character of a cell:

    || border=1
    ||! cell 1 ||! cell 2 ||! cell 3 ||
    || cell 1  ||  cell 2 ||  cell 3 ||

creates

cell 1cell 2cell 3
cell 1cell 2cell 3

This markup does not extend to !!, !!!, etc

Alignment of cell contents

Cell contents may be aligned left, centered, or aligned right.

  • To left-align contents, place the cell contents next to the leading ||.
  • To center contents, add a space before and after the cell contents.
  • To right-align contents, place a space before the cell contents and leave the cell contents next to the trailing ||.

Example 2. Changing alignment of cell contents.

This markup:

    || border=1 width=100%
    ||!cell 1      ||! cell 2  ||!       cell 3||
    ||left-aligned || centered || right-aligned||

creates this table:

cell 1cell 2cell 3
left-alignedcenteredright-aligned

Example 3. Default alignment of cell contents.

This markup:

    || border=1 width=100%
    ||!cell default||!cell left ||
    ||default-aligned||left-aligned ||

creates this table:

cell defaultcell left
default-alignedleft-aligned

Notice that the header and detail cells have different defaults.

<< | PmWiki.DocumentationIndex | >>

This page may have a more recent version on pmwiki.org: PmWiki:SimpleTables, and a talk page: PmWiki:SimpleTables-Talk.