<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>5.5 Table Markup</TITLE>
<META NAME="description" CONTENT="5.5 Table Markup">
<META NAME="keywords" CONTENT="doc">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="doc.css">
<LINK REL="next" HREF="references.html">
<LINK REL="previous" HREF="node10.html">
<LINK REL="up" HREF="node6.html">
<LINK REL="next" HREF="references.html">
</HEAD>
<BODY bgcolor="#ffffff">
<div class=navigation>
<table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="references.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="node6.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node10.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Documenting Python</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="references.html">5.6 Reference List Markup</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="node6.html">5. Special Markup Constructs</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node10.html">5.4 Library-level Markup</A></span>
<br><hr></div>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION000650000000000000000">
5.5 Table Markup</A>
</H2>

<P>
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 <SPAN CLASS="logo LaTeX">L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X</SPAN> 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
    <A HREF="futures.html#futures">8</A>, ``Future Directions'').

<P>
Each environment is named <tt class=environment>&#92;table<var>cols</var></tt>, where <var>cols</var>
    is the number of columns in the table specified in lower-case
    Roman numerals.  Within each of these environments, an additional
    macro, <tt class=macro>&#92;line<var>cols</var></tt>, is defined, where <var>cols</var>
    matches the <var>cols</var> value of the corresponding table
    environment.  These are supported for <var>cols</var> values of
    <tt>ii</tt>, <tt>iii</tt>, and <tt>iv</tt>.  These environments are all
    built on top of the <tt class=environment>&#92;tabular</tt> environment.

<P>

<dl class=envdesc>
<dt><tt>&#92;begin{<b class=environment>tableii</b>}</tt>
    <tt>{</tt><var>colspec</var><tt>}</tt><tt>{</tt><var>col1font</var><tt>}</tt><tt>{</tt><var>heading1</var><tt>}</tt><tt>{</tt><var>heading2</var><tt>}</tt>
<dd>
      Create a two-column table using the <SPAN CLASS="logo LaTeX">L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X</SPAN> column specifier
      <var>colspec</var>.  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 <var>col1font</var>
      parameter is used as a stylistic treatment of the first column
      of the table: the first column is presented as
      <tt>&#92;<var>col1font</var>{column1}</tt>.  To avoid treating the first
      column specially, <var>col1font</var> may be "<tt class=samp>textrm</tt>".  The
      column headings are taken from the values <var>heading1</var> and
      <var>heading2</var>.
    </dl>

<P>

<dl class=macrodesc>
<dt><b><tt class=macro>&#92;lineii</tt></b>
    <tt>{</tt><var>column1</var><tt>}</tt><tt>{</tt><var>column2</var><tt>}</tt>
<dd>
      Create a single table row within a <tt class=environment>&#92;tableii</tt> environment.
      The text for the first column will be generated by applying the
      macro named by the <var>col1font</var> value when the <tt class=environment>&#92;tableii</tt>
      was opened.
    </dl>

<P>

<dl class=envdesc>
<dt><tt>&#92;begin{<b class=environment>tableiii</b>}</tt>
    <tt>{</tt><var>colspec</var><tt>}</tt><tt>{</tt><var>col1font</var><tt>}</tt><tt>{</tt><var>heading1</var><tt>}</tt><tt>{</tt><var>heading2</var><tt>}</tt><tt>{</tt><var>heading3</var><tt>}</tt>
<dd>
      Like the <tt class=environment>&#92;tableii</tt> environment, but with a third column.
      The heading for the third column is given by <var>heading3</var>.
    </dl>

<P>

<dl class=macrodesc>
<dt><b><tt class=macro>&#92;lineiii</tt></b>
    <tt>{</tt><var>column1</var><tt>}</tt><tt>{</tt><var>column2</var><tt>}</tt><tt>{</tt><var>column3</var><tt>}</tt>
<dd>
      Like the <tt class=macro>&#92;lineii</tt> macro, but with a third column.  The
      text for the third column is given by <var>column3</var>.
    </dl>

<P>

<dl class=envdesc>
<dt><tt>&#92;begin{<b class=environment>tableiv</b>}</tt>
    <tt>{</tt><var>colspec</var><tt>}</tt><tt>{</tt><var>col1font</var><tt>}</tt><tt>{</tt><var>heading1</var><tt>}</tt><tt>{</tt><var>heading2</var><tt>}</tt><tt>{</tt><var>heading3</var><tt>}</tt><tt>{</tt><var>heading4</var><tt>}</tt>
<dd>
      Like the <tt class=environment>&#92;tableiii</tt> environment, but with a fourth column.
      The heading for the fourth column is given by <var>heading4</var>.
    </dl>

<P>

<dl class=macrodesc>
<dt><b><tt class=macro>&#92;lineiv</tt></b>
    <tt>{</tt><var>column1</var><tt>}</tt><tt>{</tt><var>column2</var><tt>}</tt><tt>{</tt><var>column3</var><tt>}</tt><tt>{</tt><var>column4</var><tt>}</tt>
<dd>
      Like the <tt class=macro>&#92;lineiii</tt> macro, but with a fourth column.  The
      text for the fourth column is given by <var>column4</var>.
    </dl>

<P>
An additional table-like environment is <tt class=environment>&#92;synopsistable</tt>.  The
    table generated by this environment contains two columns, and each
    row is defined by an alternate definition of
    <tt class=macro>&#92;modulesynopsis</tt>.  This environment is not normally use by
    the user, but is created by the <tt class=macro>&#92;localmoduletable</tt> macro.

<P>
<p>
<div class=navigation><hr><table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="references.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="node6.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="node10.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Documenting Python</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="references.html">5.6 Reference List Markup</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="node6.html">5. Special Markup Constructs</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="node10.html">5.4 Library-level Markup</A></span>
</div>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.
</ADDRESS>
</BODY>
</HTML>
