The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# $Id$
#
# >>Copyright::
# Copyright (c) 1992-1996, Ian Clatworthy (ianc@mincom.com).
# You may distribute under the terms specified in the LICENSE file.
#
# >>History::
# -----------------------------------------------------------------------
# Date      Who     Change
# 29-Feb-96 ianc    SDF 2.000
# -----------------------------------------------------------------------
#

H1: Overview

H2: Features

SDF supports a range of features related to tables including:

* tables are defined in a simple format which is:
  - easy to write and read
  - upwardly-compatible with the CSV (comma-separated value) format
    exported by most databases and spreadsheets
  - upwardly-compatible with the fixed-width format generated by
    most reporting tools.

* column widths can be dynamically sized or explicitly set
* heading, footing and group rows can be specified
* table alignment and positioning can be controlled
* cells support custom alignment, shading, ruling and colours.

In fact, SDF can do lots of very clever things with tables
including spreadsheet-like calculations on cells and ranges
of cells!

H2: Creating a Table

Tables are usually defined via the {{FILT:table}} filter.
For example:

E:  !block table
E:  Fruit      Comments
E:  Tropical:
E:  mango      a fruit-bat favorite
E:  banana     great for smoothies
E:  Other:
E:  Tomato     often matched with basil
E:  !endblock

:or:

E:  !include "fruits.tbl"; table

H2: TBL Format

The {{FILT:table}} filter expects a table definition in a simple text
format (called {{FMT:TBL}}) where:

^ the first (non-comment) line is the header record
+ remaining lines are data records.

The header record specifies the field names and the layout.
Fields can be placed in fixed-width columns or delimited by a
special character. Fixed-width format (as shown above) is usually used.

Note: The width of columns in the "input" has no bearing on the
width of columns in the output. To change the output width, refer to
{{SECT:Sizing Columns}}.

See the {{DOC:SDF Reference}} for further details on {{FMT:TBL}} format.