Tables

You can create tables by using three or more hyphens.The tables can include optional titles, row and column headers, spanning, and formatting inside the cells of the table.
A simple table
The following example demonstrates the SPLDOC markup for a table in an SPL file:
/**
* --- Simple Table
* -------------------------------------------------
* | First column  | Second column | Third column   |
* | in first row. | in first row. | in first row.  |
* |---------------|---------------|----------------|
* | Other columns |               |                |
* | in this row   |               |                |
* | are empty.    |               |                |
* |------------------------------------------------|
* |               |               |                |
* | First column  | Second column | Third column   |
* | in last row.  | in last row.  | in last row.   |
* |               |               |                |
* ------------------------------------------------
*
*/
The title for the table in this example is Simple Table.
Note: To include a title, the title must precede the table. You must use three hyphens followed by a space and the title.
If you want to continue the title on the next line, use an escape character (\) at the end of the line.

To start and end the table, use three or more hyphens.

To delineate columns, use vertical bars or pipe symbols (|).
Note: There must be at least one space between a column separator and any text in the cell.

To delineate rows, use three or more hyphens within vertical bars (|---|).

The spl-make-doc command generates HTML similar to this code.
<table>
  <caption><span class="tablecap">Table 1. Simple Table</span></caption>
  <tbody>
    <tr>
      <td><p>First column in first row.</p>
      <td>
      <td><p>Second column in first row.</p>
      <td>
      <td><p>Third column in first row.</p>
      <td>		
    </tr>
    ...
  </tbody>
</table>
A table with column headers
The following example demonstrates the SPLDOC markup for a table with column headers in an SPL file:
/**
 * --- Table With Column Headers
* -------------------------------------------------
* | Header 1      | Header 2      | Header 3       |
* |================================================|
* | First column  | Second column | Third column   |
* | in first row. | in first row. | in first row.  |
* |------------------------------------------------|
* | First column  | Second column | Third column   |
* | in last row.  | in last row.  | in last row.   |
* ------------------------------------------------
*
*/

To add column headings, put the labels in the appropriate cells in the table, then use three or more equal signs within vertical bars to separate this content from subsequent rows. For example: |===|

A table with row headers
The following example demonstrates the SPLDOC markup for a table with row headers in an SPL file:
/**
 * --- Table With Row Headers
* -------------------------------------------
* | Header 1  + First column in first row.   |
* |-------------------------------- ---------|
* | Header 2  + First column in second row.  |
* |------------------------------------------|
* | Header 3  + First column in third row.   |
* -------------------------------------------
*
*/

To add row headings, put the labels in the appropriate cells in the table, then use a plus sign (+) to separate this content from subsequent cells.

Note: You can add row headers only in the first column of the table.
A table with headings, spanning, and alignment specifications
The following example demonstrates the SPLDOC markup for a table with row and column headers, row and column spanning, and horizontal and vertical alignment in an SPL file:
/**
 * |:-------------+------------------------------:||:---------------:|
 * | Row and      + This heading spans two         | Column          |
 * | column       + columns and is right aligned.  | heading that    |
 * | heading      +--------------------------------| spans two       |
 * | that is      + A column     | A column        | rows and is     |
 * | left         + subheading.  | subheading.     | centered        |
 * | aligned.     +              |                 | horizontally.   |
 * |:=:===========+:=============|=================|==:==============|
 * | Centered.    + Left         | An entry.       | Right           |
 * |              + aligned.     |                 | aligned.        |
 * |--------------+--------------|----------------------------------||
 * | A row        + This spans   | This spans two columns.           |
 * | header.      + two rows.    |                                   |
 * |--------------+              |-----------------------------------|
 * | A row        +              | An entry.     | An entry.         |
 * | header.      +              |               |                   |
 * |--------------+--------------|---------------|-------------------|
 * : Top          : Centered     | Bottom        | An entry.         |
 * | aligned.     + vertically.  | aligned.      |-------------------|
 * |              :              :               | An entry.         |
 * |-:------------+::------------|-:-------------|:------------------|
 * | Bottom and   + Centered.    : Centered      | Left aligned.     |
 * : right        + horizontally.: vertically    |-------------------|
 * | aligned.     +              | and right     | An entry.         |
 * |              +              | alighed.      |                   |
 * |-----------------------------------------------------------------|
 * | A row        + An entry.    | An entry.     | An entry.         |
 * | header.      +              |               |                   |
 *  ------------------------------------------------------------------
 *
*/

To use spanning and alignment specifiers in the first row of a table, you must include vertical bars (|) in the upper border of the table.

To change the spanning and alignment specifiers in a row in the table, include the specifiers in the row separator.

To make a cell span multiple rows, omit the row separator for that column. For example: | |---|

To make a cell span multiple columns, put the column separators together in the row separator. For example: |---||

When including column separators in a row separator, it is sufficient to use a single column separator to designate the end of the current column span or the entire row.

To add horizontal alignment specifications, use a colon (:) in the upper row separator or in the table border, between column separators. For left alignment, place the colon in the first position after a left separator. For right alignment, place the colon in any subsequent position before next separator. For center alignment, place the colon in both the first and any subsequent position.

To add vertical alignment specifications, use a colon (:) in the left column separator. For top alignment, place the colon in the first line below the row separator or the table border. For bottom alignment, place the colon in any subsequent line before the next row separator. For center alignment, place the colon in both the first and any subsequent line before the next row separator.

The spl-make-doc command generates the following table from this code:

The following table shows the output of running the spl-make-doc command against this code.

Row and column heading that is left aligned.

This heading spans two columns and is right aligned.

Column heading that spans two rows and is centered horizontally.

A column subheading.

A column subheading.

Centered.

Left aligned.

An entry.

Right aligned.

A row header.

This spans two rows.

This spans two columns.

A row header.

An entry.

An entry.

Top aligned.

Centered vertically.

Bottom aligned.

An entry.

An entry.

Bottom and right aligned.

Centered. horizontally.: vertically

Centered

Left aligned.

and right alighed.

An entry.

A row header.

An entry.

An entry.

An entry.

A table with embedded SPLDOC markup
The following example demonstrates the SPLDOC markup for a table with different kinds of embedded markup in an SPL file:
/** 
 *  -----------------------------------------------
 * | Embedded markup that  | Embedded markup that  |
 * | is supported          | is not supported      |
 * |===============================================|
 * | First paragraph.      | # A section title.    |
 * | This is **bold**.     |                       |
 * | This is `monospace`.  | \+ A new page title.  |
 * | An artifact link to   |                       |
 * | [sample::Type1|       |  --- A table title.   |
 * | Type1 label].         |  -----------------    |
 * | Another link to       | \| A table.    \|     |
 * | [sample::Type1 \|     |  -----------------    |
 * | Type1 label].         |                       |
 * | An embedded image:    |                       |
 * | {testImageSigma.gif}  |                       |
 * | This is five          |                       |
 * | colon characters      |                       |
 * | separated by spaces:  |                       |
 * | "\: \: \: \: :".      |                       |
 * | This is not a link:   |                       |
 * | \\\[not a link\\\].   |                       |
 * |                       |                       |
 * |   First line of       |                       |
 * |   a code block.       |                       |
 * |   Next line of        |                       |
 * |   a code block.       |                       |
 * |                       |                       |
 * | A new paragraph.      |                       |
 * | An unordered list:    |                       |
 * | * First list item.    |                       |
 * | * Next list item.     |                       |
 * |                       |                       |
 * | Another paragraph.    |                       |
 * | An ordered list:      |                       |
 * | 1. First list item.   |                       |
 * | 1. Next list item.    |                       |
 * |-----------------------|-----------------------|
 * |   This is not         |                       |
 * |   a code block.       |                       |
 *  -----------------------------------------------
*/
Restriction: You cannot embed markup for new pages, sections, tables, or table titles in a table.

You can use escape characters (\) in tables. A single escape character prevents the subsequent character from being interpreted as table markup. Three escape characters prevent the subsequent character from being interpreted as SPLDOC markup when the table is formatted. The reason for using three escape characters is that the text is processed twice for escape characters. To escape a character in the second processing, the escape character itself must be escaped. For example, to include a link as normal text in the spl-make-doc output, use the following content in the table: \\\[not a link\\\].