ND Table Format

Following in the design spirit of Natural Docs this table format has a layout within the original source files which shall read just as easily as the generated documentation.

Summary
ND Table FormatFollowing in the design spirit of Natural Docs this table format has a layout within the original source files which shall read just as easily as the generated documentation.
General syntax rules
SubHeaders and markups
Sub TablesAnd last but not least it is possible to embed a table definition within a cell; with a few minor limitations.

General syntax rules

  • A new table body is introducted with the following marker;
    (start table title ,[caption] ,’[options]’ )
  • Headers are defined with a leading [ (open square bracket) and closed using the ] (close square bracket), which are optional in most cases.
  • Any text prior to first header or row definition shall be taken as the summary, using within links descriptions.
  • Rows are defined with a leading !  (bang).
  • Any additional text is appending to the current cell being either a header or field, if any, with text outside a column definition defined by the header [..] shall be ignored.
  • Blank lines within a cell creates a new paragraph within the current row.
  • Termination of the table body is by a (end) marker.

Example

The following table Example ND Table is an example of an ND+ style table which utilities the majority of available features -

Caption
Column Description
with two lines
Column 2
Column 3
Row 1, column 1 text
Row 1, column 2 text
Row 1, column 3
Row 2, column 1 text continued on next line.
Row 2, column 2 text
New paragraph within same cell.
Row 2, column 3
Row 3, column 1 text
New paragraph within same cell.
Row 3, column 2 text
Row 3, column 3
Example ND Table

Source

(start table "Example ND Table", Caption, format=nd)

    This is an example of a ND style table

    [Column Description         [Column 2               [Column 3        ]
     with two lines

 !  Row 1, column 1 text        Row 1, column 2 text    Row 1, column 3     ignored text

 !  Row 2, column 1 text        Row 2, column 2 text    Row 2, column 3
    continued on next line.
                                New paragraph within
                                same cell.

 !  Row 3, column 1 text        Row 3, column 2 text    Row 3, column 3     more ignored text

    New paragraph within same
    cell.

(end)

SubHeaders and markups

  • Table cell text may have utilise most other ND markups, including;
    • Links Tables.
    • bold, underline and italic highlighting.
    • Bullet and description lists.
    • Embedded images (see person.gif).
  • Subheading are created by defining a new set of headers within an existing table.

Example

Caption1
Column 1
Column 2
Column 3
Row 1, column 1 text
Row 1, column 2 text
Row 1, column 3
Row 2, column 1 text continued on next line.
Row 2, column 2 text
Row 2, column 3
Row 3, column 1 text
Row 3, column 2 text
Row 3, column 3
Embedded images
   
  • bullet1
  • bullet2
  • bullet3
itemdesc1
itemdesc2
itemdesc3
  1. desc1
  2. desc2
  3. desc3
SubHeading
and lastly links work within Tables
SubHeading 1
SubHeading 2
Sub-Column 1
Sub-Column 2
Title1

Source

(start table Title1, Caption1)
    [Column 1                       [Column 2                   [Column 3              ]

 !  Row *1*, column 1 text          Row 1, column 2 text        Row 1, column 3

 !  Row *2*, column 1 text          Row 2, column 2 text        Row 2, column 3
    continued on next line.

 !  Row *3*, column 1 text          Row 3, column 2 text        Row 3, column 3

 !  Embedded images

        (see person.gif)

 !   o bullet1                       item - desc1                1. desc1
     o bullet2                       item - desc2                1. desc2
     o bullet3                       item - desc3                1. desc3

    [SubHeading                                                                         ]

 !  and lastly links work within
    <Tables>

    [SubHeading 1                               [SubHeading 2

 !  Sub-Column 1                                Sub-Column 2
(end table)

Sub Tables

And last but not least it is possible to embed a table definition within a cell; with a few minor limitations.

Caption2
Column 1
Column 2
Row 1, column 1 text
Row 1, column 2 text
An embedded table
Inter tables are introduced using a double brackets ([[). 
col1
col2
col3
a1a
b1b
c1c
a2a
b2b
c2c
a3a
b3b
c3c
2nd Embedded table
Rows are implied, denoted by a single blank line.  As such cells within inter-tables may only contain a single paragraph.
col1
col2
col3
a1a
b1b
c1c
a2a
b2b
c2c
a3a
b3b
c3c
Rows of an inter tables can also be denoted using a leading (!!) marker.
col1
col2
col3
a1a
b1b
c1c
a2a
b2b
c2c
a3a
b3b
c3c
col1
col2
col3
a1a
b1b
c1c
a2a
b2b
c2c
a3a
b3b
c3c
SubHeading 1
SubHeading 2
New row
 
Title2

Source

(start table Title2, Caption2)
    [Column 1                           [Column 2                              ]

!   Row *1*, column 1 text              Row 1, column 2 text

!   An embedded table                   2nd Embedded table

    Inter tables are introduced using   Rows are implied, denoted by a
    a double brackets '[['.             single blank line. As such cells
                                        within inter-tables may only contain
                                        a single paragraph.

       [[col1    [col2      [col3          [[col1    [col2     [col3   ]

       a1a       b1b        c1c            a1a       b1b       c1c

       a2a       b2b        c2c            a2a       b2b       c2c

       a3a       b3b        c3c            a3a       b3b       c3c

!   Rows of an inter tables can also
    be denoted using a leading (!!)
    marker.

       [[col1    [col2      [col3          [[col1    [col2     [col3 ]
    !! a1a       b1b        c1c         !! a1a       b1b       c1c
    !! a2a       b2b        c2c         !! a2a       b2b       c2c
    !! a3a       b3b        c3c         !! a3a       b3b       c3c

    [SubHeading 1                       [SubHeading 2                          ]

!   New row
(end table)

To send feedback on this topic email: natural.nosp@m.docsplus@gmai.nosp@m.l.com

© Some Rights Reserved. see License

This is an example of a ND style table
Tables may be embedded within topic bodies.
ND+ is licensed under the GPL-2.0, the same terms and conditions as Natural Docs 1.4.