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.

88 Chapter 4. Displayed Text<br />

Baseline \raisebox{1ex}{high} <strong>and</strong> \raisebox{-1ex}{low}<br />

<strong>and</strong> back again<br />

produces: Baseline high <strong>and</strong> low <strong>and</strong> back again.<br />

The values for height <strong>and</strong> depth can be <strong>to</strong>tally different from the actual<br />

ones of the text. Their effect is <strong>to</strong> determine how far away the previous <strong>and</strong><br />

next lines of text should be from the current line, based on the heights<br />

<strong>and</strong> depths of all the boxes (characters are also boxes) in the line. By<br />

raising a box but specifying height <strong>to</strong> be the regular character size, the<br />

raised box will overprint the line above, <strong>and</strong> similarly for depth when a<br />

box is lowered.<br />

4.7.3 Parboxes <strong>and</strong> minipages<br />

Whole paragraphs can be put in<strong>to</strong> separate vertical boxes (or parboxes in<br />

the L AT E X jargon) with the comm<strong>and</strong><br />

\parbox[pos]{width}{text}<br />

or with the environment<br />

\begin{minipage}[pos]{width} text \end{minipage}<br />

Both produce a vertical box of width width, in which the lines of text are<br />

stacked on <strong>to</strong>p of each other as in normal paragraph mode.<br />

The optional positioning argument pos can take on the values<br />

b <strong>to</strong> align the bot<strong>to</strong>m edge of the box with the current baseline,<br />

t <strong>to</strong> align the <strong>to</strong>p line of text with the current baseline.<br />

Without any positioning argument, the parbox is centered vertically on<br />

the baseline of the external line of text.<br />

The positioning argument is only meaningful when the \parbox comm<strong>and</strong><br />

or the minipage environment occurs within a line of text, for<br />

otherwise the current line <strong>and</strong> its baseline have no meaning. If the parbox<br />

is immediately preceded by a blank line, it begins a new paragraph. In<br />

this case, the vertical positioning of the parbox is made with reference<br />

<strong>to</strong> the following elements of the paragraph. These could be further parboxes.<br />

If the paragraph consists of only a single parbox or minipage, the<br />

positioning argument is meaningless <strong>and</strong> has no effect.<br />

Examples:<br />

\parbox{3.5cm}{\sloppy This is a 3.5 cm wide parbox. It is<br />

vertically centered on the}<br />

\hfill CURRENT LINE \hfill<br />

\parbox{5.5cm}{Narrow pages are hard <strong>to</strong> format. They usually<br />

produce many warning messages on the moni<strong>to</strong>r. The comm<strong>and</strong><br />

\texttt{\symbol{92}sloppy} can s<strong>to</strong>p this.}

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

Saved successfully!

Ooh no, something went wrong!