<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
  <title>Faculty of IT / doc / LaTeX / tabular </title>
  <link rel="alternate" type="application/rss+xml" title="RSS 2.0"  
    href="../../../feeds/rss20.xml" />
  <link rel="alternate" type="test/rss" title="RSS 1.0"  
    href="../../../feeds/rss10.xml" />
  <link rel="alternate" type="application/atom+xml" title="Atom 0.3"  
    href="../../../feeds/atom.xml" />
  <link rel="StyleSheet" href="../../../portal.css" type="text/css" media="screen">
<link rel="StyleSheet" href="../../../Portal/Skins/Froody/marita1.css" type="text/css" media="screen">

</head>
<body topmargin="0" leftmargin="0" 
 marginwidth="0" marginheight="0" rightmargin="0">
  <table border="0" width="100%" cellpadding="0" cellspacing="0" 
   bgcolor="#6699cc" background="../../../Portal/Skins/Froody/bluedot.gif">
  <tr>
    <td width="280">
          <a href="../../../." onMouseOver="window.status='start';return true;">
          <img src="../../../Portal/Skins/Froody/start-topleft.gif" alt="start"
           width="280" height="42" border="0" /></a>
        </td>
        <td valign="top" align="left">
          <font class="small">
          Wed Jun 22 20:28:56 2005
          </font>
        </td>
        <td width="269">
          <img src="../../../Portal/Skins/Froody/start-topright.gif" 
           alt="Faculty of Information Technology, UTS"
           width="269" height="42" align="right">
        </td>
  </tr>
  <tr>
        <td colspan="3" align="right">
      <font class="small">
          <span class="mainmenu">
      <a  target="_blank" class="small" href="http://www.uts.edu.au/">UTS Home</a>&nbsp;| <a  target="_blank" class="small" href="http://it.uts.edu.au/">Faculty of IT</a>&nbsp;| <a  target="_blank" class="small" href="http://it.uts.edu.au/about/contact">Faculty Contacts</a>&nbsp;| <a  target="_self" class="small" href="../../../allstaff.pdf">PDF</a>&nbsp;| <a  target="_self" class="small" href="../../../w/doc">Documentation</a>&nbsp;| <a  target="_self" class="small" href="../../../mailto:www@it.uts.edu.au">Feedback</a>
          </span>
      </font>
        </td>
  </tr>
  </table>
  <table border="0" width="100%" height="90%" cellpadding="0" cellspacing="0">
  <tr>
        <!-- start of "single" column -->
        <td valign="top" width="80%" bgcolor="white">
          <table border="0" width="100%" cellpadding="5" cellspacing="0">
      <!-- start box "<font class="contexttext"><a href="../../../w/doc">Documentation</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext"><a href="../../../w/doc/LaTeX/index.html">LaTeX</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext">tabular.html</font>
" -->
      <tr>
        <td bgcolor="white">
          <p><font color="#003366"><strong><font class="contexttext"><a href="../../../w/doc">Documentation</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext"><a href="../../../w/doc/LaTeX/index.html">LaTeX</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext">tabular.html</font>
</strong></font></p>
        </td>
                <td align="right" bgcolor="white">
                        <p><font color="white"><a class="underline" href="../../../portal.pl"><font color="black">back...</font></a>
</font></p>
                </td>
      </tr>
      <tr>
        <td colspan="2">

<TITLE> New tabular environments </TITLE>

<H1> New tabular environments </H1>

<H2> Introduction </H2>

The LaTeX2e table environments array, tabular and tabular* had several
disadvantages.  These have been rectified in the packages

<UL> 

<LI>  <a HREF="#delarray">Delarray</a>, which places delimiters such 
as () and [] around arrays.

<LI>  <a HREF="#supertabular">Supertabular</a>, for quick and 
easy tables longer than one page.

<LI>  <a HREF="#longtable">Longtable</a>, a more 
sophisticated and flexible version of supertabular.

<LI>  <a HREF="#tabularx">Tabularx</a>, for tables whose column 
widths are dependent on the table width.

</UL>

which are covered in pages 113-128 of the LaTeX Companion. <p>

All these packages can use the new features of the 
<a HREF="array.html">array</a> package. 

<a NAME="delarray"><H2> Delarray </H2></a>

The delarray package introduces delimiters to the array environment.  (Both 
the standard LaTeX2e array environment as well as the array package.)

The delimiters are placed around the <code>{<em>cols</em>}</code> argument of
the <code>\begin{array}</code> statement;  they do not have to match.
For example,

<pre>
\begin{array}({cc}|
</pre>

begins an array with two centered columns, with a bracket on the left
and a vertical line on the right. <P>

Delimiters must be used in pairs, but the fullstop character can be used
to specify a "null" delimiter, ie

<pre>
\begin{array}|{cc}.
</pre>

begins an array with a vertical line on the left, and nothing on the right.

<H2> Supertabular and longtable </H2>

Both these environments are used to construct tables more than one page
long. <p>

A <a HREF="#longtable">longtable</a> will have the same width on all pages.  
A <a HREF="#supertabular">supertabular</a>
table can, but the writer must specify the width;  even so, the columns
might not be the same width on all pages.  On the other hand,
longtables are more complicated and (slightly) harder to construct.
Both are covered in the LaTeX Companion, pp. 118-128.

<a name="supertabular"><H3>Supertabular</H3></a>

The supertab package defines the supertabular and supertabular* 
environments.  A supertabular
table can use any column formatting commmands in the 
<a HREF="array.html">array</a> package. <p>

Supertabular uses a similar syntax to tabular, but a supertabular table 
cannot be positioned with <code>[t]</code> for top, etc. For instance, 

<pre>
\begin{supertabular}{lll}
</pre>

begins a table with three left-justified columns. <p>

Supertabular* functions like supertabular, but makes a table of fixed
width.  Its syntax is:

<pre>
\begin{supertabular}{<em>width</em>}{<em>Column declarations</em>}
</pre>

<H4> Additional supertabular commands</H4>

The supertab package defines the following commands.  They should be 
used before the <code>\begin{supertabular}</code> command. <p>

<code>\tablehead{<em>heading</em>}</code>.  <em>Heading</em> will be placed
at the table top on each page except the first. <p>

<code>\tablefirsthead{<em>heading</em>}</code>.  <em>Heading</em> is 
placed at the beginning of the table.  This command is optional. <p>

<code>\tabletail{<code>footing</em>}</code>.  <em>Footing</em> is
placed at the bottom of the table on each page except the last. <p>

<code>\tablelasttail{<em>footing</em>}</code>.  <em>Footing</em> is 
placed at the end of the table.  <code>\tablelasttail</code> is 
optional. <p>

<code>\tablecaption{<em>caption</em>}</code>.  Specify the table caption.
By default, this is placed at the top of the table.  The commands
<code>\topcaption{<em>caption</em>}</code> and 
<code>\bottomcaption{<em>caption</em>}</code>
place the caption at the table top or bottom respectively. <p>

<H3><a NAME="longtable">Longtable</a></H3>

The longtable environment is more sophisticated 
than supertabular.  (It has many options, about half of which are listed here.
The rest can be found in the LaTeX Companion, pp. 122-128.)   <p>

Longtable maintains the same column width across pages.  To do this, it
writes information to the document's <code>.aux</code> file, so two runs
are needed to set a longtable:  the first writes the information that
the second reads back.  <p>

However, longtable does not read the file unless requested to by 
a <code>\setlongtables</code> declaration, which should be put
in the document preamble.  <code>\setlongtables</code> slows
down formatting, so it is usually commented out until the document
is almost ready for printing. <p>

Longtable uses the same syntax as tabular:

<pre>
\begin{longtable}[<em>justification</em>]{<em>column declarations</em>]
</pre>

<em>Justification</em> can be <em>l</em>, <em>r</em>, or 
<em>c</em> (Left, right, or centered). <p>

Any <em>column declarations</em> provided by the 
<a HREF="array.html">array</a> package can be used. <p>

<h4> Additional longtable commands </H4>

<code>\endhead{...}</code> declares the text to appear at the top of
each page,  <code>\endfirsthead</code> the text to appear at the 
top of the first page. <p>

<code>\endfoot{...}</code> declares the text to appear at the bottom of
each page,  <code>\endlastfoot</code> the text to appear at the 
bottom of the last page. <p>

<code>\newpage</code> forces a page break. <p>

<code>\caption[<em>entry</em>]{<em>text</em>}</code> declares the table 
caption <em>text</em>.  <em>Entry</em> is an optional parameter that 
declares the comment placed in the list of tables.  

<ul>

<li> If <em>entry</em> is not specified
in the command and the square braces are not 
used (ie, <code>\caption{text}</em>), then "Table n: <em>text</em>" is 
added to the list of tables.

<li> If no <em>entry</em> is supplied, but the brackets are 
(ie, <code>\caption[]{text}</code>), the table is not added to the list
of tables.

<li> If <em>entry</em> is supplied, "Table n: <em>entry</em>" is added
to the list of tables.

</ul>

<a NAME="tabularx"><H2>Tabularx</H2></a>

The tabularx package defines the tabularx environment.  It is similar to 
tabular, but it provides a new column definition <code>X</code>, for columns
whose widths are dependent on the table width.  For instance,

<pre>
\begin{tabularx}{\linewidth}{|X|p{2in}|X|}
</pre>

begins a three column table with width equal to the current linewidth.
The middle column is set as a 2 inch wide parbox;  the other two 
columns will be
<code>(\linewidth - 2in) / 2</code> wide:  ie, the remaining width
is split between them.
<p class="light">Last modified: Thu Jun 30 14:09:22 1994</p>

        </td>
      </tr>
      <!-- end box "<font class="contexttext"><a href="../../../w/doc">Documentation</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext"><a href="../../../w/doc/LaTeX/index.html">LaTeX</a></font>
<font class="contextsep">&gt;</font>
<font class="contexttext">tabular.html</font>
" -->
      </table>
    </td>
    <!-- end of column 2 (1 boxes) -->
    <!-- start of column 3 -->
    <td valign="top" width="20%" bgcolor="#eeeeee">
      <table border="0" width="100%" cellpadding="5" cellspacing="0">
      <!-- start box "" -->
      <tr>
        <td bgcolor="#eeeeee">
          <p><font color="#003366"><strong></strong></font></p>
        </td>
                <td align="right" bgcolor="#eeeeee">
                        <p><font color="white"><a class="underline" href="../../../motd.pl"><font color="black">detail...</font></a>
</font></p>
                </td>
      </tr>
      <tr>
        <td colspan="2">
<p>Messages posted in the last 4 weeks.
</p>&middot; <a href="../../../m/motd/2002446">NO business electives e-Requests until July 26th</a>
20/6 <br />
&middot; <a href="../../../m/motd/2002445">Faculty Student Centre Opening Hours</a>
16/6 <br />
&middot; <a href="../../../m/motd/2002444">Technical Support Counter - Opening Hours</a>
16/6 <br />
&middot; <a href="../../../m/motd/2002443">Want an exciting career in bioinformatics?</a>
10/6 <br />
&middot; <a href="../../../m/motd/2002442">2006 Fulbright Scholarship to the United States</a>
6/6 <br />
&middot; <a href="../../../m/motd/2002440">Lost glasses</a>
3/6 <br />
&middot; <a href="../../../m/motd/2002439">Resume help for 2nd year students</a>
2/6  (&nbsp;<a href="../../../m/motd/c/2002931">3</a>&nbsp;)<br />
&middot; <a href="../../../m/motd/2002436">Render wrangler position available at FUEL International</a>
30/5 <br />
&middot; <a href="../../../m/motd/2002435">Apple University Consortium Conference 2005</a>
30/5 <br />
&middot; <a href="../../../m/motd/2002434">Lost phone</a>
26/5  (&nbsp;<a href="../../../m/motd/c/2002926">4</a>&nbsp;)<br />
&middot; <a href="../../../m/motd/2002433">Industrial Training Info Session</a>
26/5 <br />
&middot; <a href="../../../m/motd/2002395">32146 Data and Information Visualisation</a>
26/4-30/11  (&nbsp;<a href="../../../m/motd/c/2002862">1</a>&nbsp;)<br />
&middot; <a href="../../../m/motd/2002375">CALL FOR PAPERS</a>
15/4-1/7  (&nbsp;<a href="../../../m/motd/c/2002895">1</a>&nbsp;)<br />
&middot; <a href="../../../m/motd/2002344">Cisco Wireless Short Course:  see http://iwork.uts.edu.au</a>
29/3-15/7  (&nbsp;<a href="../../../m/motd/c/2002807">4</a>&nbsp;)<br />

        </td>
      </tr>
      <!-- end box "" -->
      </table>
    </td>
  </tr>
  </table>
</body>
</html>