There are three general-purpose table environments defined which
should be used whenever possible. These environments are defined
to provide tables of specific widths and some convenience for
formatting. These environments are not meant to be general
replacements for the standard LATEX table environments, but can
be used for an advantage when the documents are processed using
the tools for Python documentation processing. In particular, the
generated HTML looks good! There is also an advantage for the
eventual conversion of the documentation to SGML (see section
8, ``Future Directions'').
Each environment is named \tablecols, where cols
is the number of columns in the table specified in lower-case
Roman numerals. Within each of these environments, an additional
macro, \linecols, is defined, where cols
matches the cols value of the corresponding table
environment. These are supported for cols values of
ii, iii, and iv. These environments are all
built on top of the \tabular environment.
- \begin{tableii}
{colspec}{col1font}{heading1}{heading2}
-
Create a two-column table using the LATEX column specifier
colspec. The column specifier should indicate vertical
bars between columns as appropriate for the specific table, but
should not specify vertical bars on the outside of the table
(that is considered a stylesheet issue). The col1font
parameter is used as a stylistic treatment of the first column
of the table: the first column is presented as
\col1font{column1}. To avoid treating the first
column specially, col1font may be "textrm". The
column headings are taken from the values heading1 and
heading2.
- \lineii
{column1}{column2}
-
Create a single table row within a \tableii environment.
The text for the first column will be generated by applying the
macro named by the col1font value when the \tableii
was opened.
- \begin{tableiii}
{colspec}{col1font}{heading1}{heading2}{heading3}
-
Like the \tableii environment, but with a third column.
The heading for the third column is given by heading3.
- \lineiii
{column1}{column2}{column3}
-
Like the \lineii macro, but with a third column. The
text for the third column is given by column3.
- \begin{tableiv}
{colspec}{col1font}{heading1}{heading2}{heading3}{heading4}
-
Like the \tableiii environment, but with a fourth column.
The heading for the fourth column is given by heading4.
- \lineiv
{column1}{column2}{column3}{column4}
-
Like the \lineiii macro, but with a fourth column. The
text for the fourth column is given by column4.
An additional table-like environment is \synopsistable. The
table generated by this environment contains two columns, and each
row is defined by an alternate definition of
\modulesynopsis. This environment is not normally use by
the user, but is created by the \localmoduletable macro.
Send comments on this document to python-docs@python.org.