[OS X TeX] Stupid question about the tabular environment

Josep Maria Font jmfont at ub.edu
Mon Jan 12 19:50:32 CET 2009


El 12/01/2009, a las 19:00, ewan.Delanoy at math.unicaen.fr escribió:

>            while the array environment produces an array that's
> (horizontally) centered inside
> the whole page by default,

This only happens if your "array" is inside a math display, e.g.  
inside a \[ ... \] environment. But read below.

> long tabulars tend to go to the right (at least this is the default  
> with
> my current configuration).
>
>   Surely there is a simple command that makes the tabular perfectly  
> centered
> inside the page ?

\begin{center}
\begin{tabular} ... \end{tabular}
\end{center}

If your tabular is wider than the page, then use Herb's solution.

> All I could find in the LaTeX companion or elsewhere are
> about how data are laid out *inside* it, not about how it relates to  
> the
> whole page.

The LaTeX manual (yes, the original one!) explains (p. 63) that "The  
tabular environment produces an object that TeX treats exactly like a  
single, big letter." (and follows with more advice). I have always  
found this simple statement very clarifying: you can do to a "tabular"  
environment everything you can do to a single letter!

This idea also applies to the "array" environment, but inside math mode!

Actually, I have always found Lamport's book full of helpful  
observations (one has to read it very carefully, as it is extremely  
terse). I would recommend its reading, before going on to the  
Companion, etc., to anyone beginning with LaTeX; or at least to anyone  
with a structured mind.

Hope this helps,

JMaF




More information about the macostex-archives mailing list