The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!doctype html public "-//W30//DTD W3 HTML 2.0//EN">

<HTML>

<!-- This file was generated using SDF 2.001 by
     Ian Clatworthy (ianc@mincom.com). SDF is freely
     available from http://www.mincom.com/mtr/sdf. -->

<HEAD>
<TITLE>SDF 2.001: SDF Reference: table Filter</TITLE>
</HEAD>
<BODY BGCOLOR="ffffff">

<DIV CLASS="header">
<P><IMG SRC="../sdflogo.gif" ALIGN="Right"></P>
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_filt.html">Parent Topic</A> | <A HREF="fsimple.html">Previous Topic</A> | <A HREF="ftitle.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
<BR CLEAR="Right">
</DIV>
<DIV CLASS="main">
<H1>5.31. table Filter</H1>
<HR>
<H2><A NAME="Interface">Interface</A></H2>
<P>The general syntax is:</P>
<PRE>
  !block <STRONG>table</STRONG>[; parameters]
  ...
  !endblock
</PRE>
<P>The parameters are:</P>
<TABLE CLASS="columns" BORDER>
<TR CLASS="heading">
<TD>
<STRONG>Name</STRONG>
</TD>
<TD>
<STRONG>Type</STRONG>
</TD>
<TD>
<STRONG>Rule</STRONG>
</TD>
</TR>
<TR>
<TD>
align
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
bgcolor
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
bmargin
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
cellpadding
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
cellspacing
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
colaligns
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
coltags
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
colvaligns
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
delete
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
footings
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
format
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
groups
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
headings
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
keepindents
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
landscape
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
listitem
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
lmargin
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
narrow
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
niceheadings
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
nocalcs
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
noheadings
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
objects
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
oncell
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
parseline
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
placement
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
rmargin
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
select
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
sort
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
style
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
tags
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
title
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
tmargin
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
type
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
where
</TD>
<TD>
string
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
wide
</TD>
<TD>
boolean
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD>
wrap
</TD>
<TD>
integer
</TD>
<TD>
&nbsp;
</TD>
</TR>
</TABLE>

<P>See <A HREF="in_filif.html">Understanding Filter Interfaces</A>, if necessary.</P>
<HR>
<H2><A NAME="Description">Description</A></H2>
<P>The <EM>table</EM> filter specifies a table in <A HREF="../ref/fmt_tbl.html">TBL</A> format. A brief description of each parameter is given below. A tutorial-style introduction to SDF's table features is also provided in the <A HREF="../user/ug_sdf.html">SDF User Guide</A>.</P>
<TABLE CLASS="columns" BORDER>
<TR CLASS="heading">
<TD>
<STRONG>Parameter</STRONG>
</TD>
<TD>
<STRONG>Description</STRONG>
</TD>
</TR>
<TR>
<TD>
align
</TD>
<TD>
alignment of table: one of Left, Center, Right, Inner, Outer
</TD>
</TR>
<TR>
<TD>
bgcolor
</TD>
<TD>
background colour for a table (HTML only)
</TD>
</TR>
<TR>
<TD>
bmargin
</TD>
<TD>
default bottom margin for table cells (MIF only)
</TD>
</TR>
<TR>
<TD>
cellpadding
</TD>
<TD>
padding size for table cells (HTML only)
</TD>
</TR>
<TR>
<TD>
cellspacing
</TD>
<TD>
spacing size between table cells (HTML only)
</TD>
</TR>
<TR>
<TD>
colaligns
</TD>
<TD>
a comma-separated list of horizontal alignments values (Left, Center, Right) for columns; alternatively, a single word containing the letters L, C and R
</TD>
</TR>
<TR>
<TD>
coltags
</TD>
<TD>
a comma-separated list of phrase styles to apply to columns
</TD>
</TR>
<TR>
<TD>
colvaligns
</TD>
<TD>
a comma-separated list of vertical alignments values (Top, Middle, Bottom, Baseline) for columns; alternatively, a single word containing the letters T, M, B and L
</TD>
</TR>
<TR>
<TD>
delete
</TD>
<TD>
a comma-separated list of columns to delete
</TD>
</TR>
<TR>
<TD>
footings
</TD>
<TD>
the number of footing rows at the end of the table
</TD>
</TR>
<TR>
<TD>
format
</TD>
<TD>
a comma-separated list of column width specifications; alternatively, a single number where each digit represents 10% of the space available to the table
</TD>
</TR>
<TR>
<TD>
groups
</TD>
<TD>
pattern of group-style rows (default is /:$/)
</TD>
</TR>
<TR>
<TD>
headings
</TD>
<TD>
the number of heading rows at the top of the table
</TD>
</TR>
<TR>
<TD>
landscape
</TD>
<TD>
display the table in landscape mode (MIF only)
</TD>
</TR>
<TR>
<TD>
listitem
</TD>
<TD>
the list indent level (e.g. 1) of this table
</TD>
</TR>
<TR>
<TD>
lmargin
</TD>
<TD>
default left margin for table cells (MIF only)
</TD>
</TR>
<TR>
<TD>
narrow
</TD>
<TD>
if set, the table will only be as wide as required; otherwise the table will span the available space
</TD>
</TR>
<TR>
<TD>
niceheadings
</TD>
<TD>
set to 0 to disable _ to space conversion in headings
</TD>
</TR>
<TR>
<TD>
nocalcs
</TD>
<TD>
set to 0 to disable calculation processing within a table
</TD>
</TR>
<TR>
<TD>
noheadings
</TD>
<TD>
suppress headings in output
</TD>
</TR>
<TR>
<TD>
objects
</TD>
<TD>
alias for coltags (coltags is preferred)
</TD>
</TR>
<TR>
<TD>
oncell
</TD>
<TD>
Perl code to execute for each cell (internal use only!)
</TD>
</TR>
<TR>
<TD>
parseline
</TD>
<TD>
column headings parsing line (if not the first row in the text)
</TD>
</TR>
<TR>
<TD>
placement
</TD>
<TD>
vertical placement of table: one of Float, Pagetop, Columntop, Lefttop, Righttop (MIF only)
</TD>
</TR>
<TR>
<TD>
rmargin
</TD>
<TD>
default right margin for table cells (MIF only)
</TD>
</TR>
<TR>
<TD>
select
</TD>
<TD>
a comma-separated list of columns to display
</TD>
</TR>
<TR>
<TD>
sort
</TD>
<TD>
a comma-separated list of columns to sort the data rows by
</TD>
</TR>
<TR>
<TD>
style
</TD>
<TD>
overall look of the table
</TD>
</TR>
<TR>
<TD>
tags
</TD>
<TD>
alias for coltags (coltags is preferred)
</TD>
</TR>
<TR>
<TD>
title
</TD>
<TD>
table caption
</TD>
</TR>
<TR>
<TD>
tmargin
</TD>
<TD>
default top margin for table cells (MIF only)
</TD>
</TR>
<TR>
<TD>
type
</TD>
<TD>
alias for style (style is preferred)
</TD>
</TR>
<TR>
<TD>
where
</TD>
<TD>
an expression to filter the data rows with
</TD>
</TR>
<TR>
<TD>
wide
</TD>
<TD>
table straddles the side head area of the page
</TD>
</TR>
<TR>
<TD>
wrap
</TD>
<TD>
the number of data rows to display in a physical row
</TD>
</TR>
</TABLE>

<HR>
<H2><A NAME="Examples">Examples</A></H2>
<P>A typical table is:</P>
<PRE>
<B>!block</B> table; format=55; style=<TT>&quot;grid&quot;</TT>; groups; title=<TT>&quot;Diary&quot;</TT>
Time_of_day     Appointment
Morning:
10:00           Dentist
12:00           Lunch with friends
Afternoon:
15:00           Meeting on SDF
<B>!endblock</B>
</PRE>
<P>The result is:</P>
<TABLE CLASS="grid" BORDER>
<CAPTION ALIGN=top>Diary</CAPTION>
<TR CLASS="heading">
<TD>
<STRONG>Time of day</STRONG>
</TD>
<TD>
<STRONG>Appointment</STRONG>
</TD>
</TR>
<TR CLASS="group">
<TD>
<STRONG>Morning:</STRONG>
</TD>
<TD>
<STRONG>&nbsp;</STRONG>
</TD>
</TR>
<TR>
<TD>
10:00
</TD>
<TD>
Dentist
</TD>
</TR>
<TR>
<TD>
12:00
</TD>
<TD>
Lunch with friends
</TD>
</TR>
<TR CLASS="group">
<TD>
<STRONG>Afternoon:</STRONG>
</TD>
<TD>
<STRONG>&nbsp;</STRONG>
</TD>
</TR>
<TR>
<TD>
15:00
</TD>
<TD>
Meeting on SDF
</TD>
</TR>
</TABLE>

</DIV>
<DIV CLASS="footer">
<DIV CLASS="navigate">
<P ALIGN="Center"><A HREF="re_sdf.html">Contents</A> | <A HREF="in_filt.html">Parent Topic</A> | <A HREF="fsimple.html">Previous Topic</A> | <A HREF="ftitle.html">Next Topic</A> <BR><A HREF="../index.html">Home</A> | <A HREF="../catalog.html">Catalog</A></P>
</DIV>
</DIV>

</BODY>
</HTML>