28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

82 Chapter 4. Displayed Text<br />

Example:<br />

Type Quality Color Price<br />

Paper med. white low<br />

Leather good brown high<br />

Card bad gray med.<br />

4.6.2 Sample line<br />

\begin{tabbing}<br />

Type\qquad\= Quality\quad\=<br />

Color\quad\= Price\\[0.8ex]<br />

Paper \> med. \> white \> low\\<br />

Leather \> good \> brown \> high\\<br />

Card \> bad \> gray \> med.<br />

\end{tabbing}<br />

It is often advantageous or even necessary <strong>to</strong> set the tab s<strong>to</strong>ps in a sample<br />

line that is not actually printed. It could contain, for example, the widest<br />

entries in the various columns that appear later, or the smallest intercolumn<br />

spacing between s<strong>to</strong>ps. The sample line may also contain \hspace<br />

comm<strong>and</strong>s <strong>to</strong> force the distance between s<strong>to</strong>ps <strong>to</strong> be a predetermined<br />

amount.<br />

To suppress the printing of the sample line, it is ended with the<br />

comm<strong>and</strong> \kill instead of the \\ termina<strong>to</strong>r.<br />

\hspace*{3cm}\=sample column \=\hspace{4cm}\= \kill<br />

In addition <strong>to</strong> the left border, the above statement sets three tab s<strong>to</strong>ps:<br />

Left border<br />

3cm<br />

1st tab s<strong>to</strong>p<br />

❄<br />

✲sample<br />

column<br />

2nd tab s<strong>to</strong>p<br />

❄<br />

3rd tab s<strong>to</strong>p<br />

❄<br />

4cm ✲<br />

An \hspace comm<strong>and</strong> at the beginning of a sample line must be of the<br />

*-form, otherwise the inserted spacing will be deleted at the line margin.<br />

4.6.3 Tab s<strong>to</strong>ps <strong>and</strong> the left margin<br />

The left border of each line of the tabbing environment is at first identical<br />

with the left margin of the enclosing environment, <strong>and</strong> is designated the<br />

zeroth s<strong>to</strong>p. By activating the ‘tab key’ \> at the start of a line, one sets<br />

the following text beginning at the first tab s<strong>to</strong>p. However, the comm<strong>and</strong><br />

\+ has the same effect, putting the left border permanently at the first<br />

s<strong>to</strong>p, for all subsequent lines. With \+\+ at the beginning or end of a line,<br />

all the next lines will start two s<strong>to</strong>ps further along. There can be as many<br />

\+ comm<strong>and</strong>s in all as there are tab s<strong>to</strong>ps set on the line.<br />

The comm<strong>and</strong> \- has the opposite effect: it shifts the left border for<br />

the following lines one s<strong>to</strong>p <strong>to</strong> the left. It is not possible <strong>to</strong> set this border<br />

<strong>to</strong> be <strong>to</strong> the left of the zeroth s<strong>to</strong>p.<br />

The effect of the \+ comm<strong>and</strong>s may be overridden for a single line by<br />

putting \< at the start for each tab <strong>to</strong> be removed. This line then starts so<br />

many tabs <strong>to</strong> the left of the present border. With the next \\ comm<strong>and</strong>,<br />

the new line begins at the current left border determined by the <strong>to</strong>tal<br />

number of \+ <strong>and</strong> \- comm<strong>and</strong>s.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!