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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

106 Chapter 4. Displayed Text<br />

\multicolumn{1}{|r|}{Year} & 2003 & 2004 & 2005 \\<br />

\cline{2-4}<br />

& \euro\ \vline\ US \$ & \euro\ \vline\ US \$<br />

& \euro\ \vline\ US \$ \\ \hline<br />

Investment & \hspace{2.5cm}& \hspace{2.5cm}& \hspace{2.5cm} \\<br />

Costs & & & \\ \hline<br />

Operating & & & \\<br />

Costs & & & \\ \hline<br />

Industrial& & & \\<br />

Contracts & & & \\ \hline<br />

\multicolumn{4}{|l|}{\rule[-1.0cm]{0mm}{1.3cm}Signature<br />

\hspace{5cm}\vline˜Authorization} \\ \hline<br />

\end{tabular}<br />

The first three lines are only indirectly related <strong>to</strong> the table construc-<br />

tion. They arrange for three empty boxes <strong>to</strong> be drawn when the<br />

comm<strong>and</strong> \usebox{\kkk} is given (see Section 4.7.1).<br />

Except for the comm<strong>and</strong> \hspace{2.5cm} <strong>to</strong> set the column widths<br />

of the last three columns <strong>and</strong> the comm<strong>and</strong> \vline <strong>to</strong> draw a vertical line<br />

within a column, this example contains nothing new that was not in the<br />

previous examples. It is only necessary <strong>to</strong> give a brief explanation of the<br />

last row in the table:<br />

The comm<strong>and</strong> \multicolumn{4}{|l|} merges all four table columns<br />

in<strong>to</strong> one, in which the text is set flush with the left margin. This text<br />

consists first of a strut \rule[-12mm]{0mm}{15mm} that says the height<br />

of the last row begins 12 mm below the baseline <strong>and</strong> is a <strong>to</strong>tal of 15 mm<br />

high. Then, beginning at the left margin, comes the word Signature,<br />

followed 5 cm later by \vline, a vertical line. The word Authorization<br />

is separated from the vertical line by a blank space (˜).<br />

The above examples clearly illustrate how the column widths <strong>and</strong> row<br />

heights are au<strong>to</strong>matically determined for tables. These sizes, however,<br />

may be influenced by struts <strong>and</strong> \hspace comm<strong>and</strong>s. In addition, the<br />

comm<strong>and</strong>s described in Section 4.8.2 permit the intercolumn <strong>and</strong> interrow<br />

spacings as well as line thickness <strong>to</strong> be altered. For example,<br />

\setlength{\tabcolsep}{5mm}<br />

inserts 5 mm of spacing before <strong>and</strong> after every column; that is, it produces<br />

an intercolumn spacing of 10 mm. Section 4.8.2 gives more information<br />

about the use of these table style parameters.<br />

4.8.4 Extension packages for tables<br />

As powerful as the tabular environment is, it does have limitations. For<br />

this reason, there are a number of <strong>to</strong>ols packages (Section B.5.4) that add<br />

additional features for constructing tables.

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

Saved successfully!

Ooh no, something went wrong!