8.21.1 tabbing first example

This first example sets the tab stops to explicit widths in the first line, which is ended by a \kill command to avoid typesetting anything (described further below):

\begin{tabbing}
\hspace{1.2in}\=\hspace{1in}\=\kill
Ship                \>Guns             \>Year    \\ 
\textit{Sophie}     \>14               \>1800    \\
\textit{Polychrest} \>24               \>1803    \\
\textit{Lively}     \>38               \>1804    \\
\textit{Surprise}   \>28               \>1805    \\
\end{tabbing}

The tabbing environment contains a sequence of tabbed rows. The first tabbed row begins immediately after \begin{tabbing} and each row ends with \\ or \kill. The last row may omit the \\ and end at the \end{tabbing}.

Both the tabbing environment and the more widely-used tabular environment put text in columns. The most important distinction is that in tabular the width of columns is determined automatically by LaTeX, while in tabbing the user sets the tab stops. Another distinction is that tabular generates a box that cannot be broken, but tabbing can be broken across pages. Finally, while tabular can be used in any mode, tabbing can be used only in paragraph mode and it always starts a new paragraph, without indentation.

As shown in the example above, there is no need to use the starred form of the \hspace command (see \hspace) at the beginning of a tabbed row. The right margin of the tabbing environment is the end of line, so that the width of the environment is \linewidth.


Unofficial LaTeX2e reference manual