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.

32 Chapter 2. Text, Symbols, <strong>and</strong> Comm<strong>and</strong>s<br />

where num is an optional argument, a number between 0 <strong>and</strong> 4 that<br />

specifies how important a line break is. The comm<strong>and</strong> recommends a line<br />

break, <strong>and</strong> the higher the number the stronger the recommendation. A<br />

value of 0 allows a break where it otherwise would not occur (like in the<br />

middle of a word), whereas 4 compels a line break, as does \linebreak<br />

without num. The difference between this comm<strong>and</strong> <strong>and</strong> \\ or \newline<br />

is that the current line will be fully justified, that is, interword spacing will<br />

be added so that the text fills the line completely. With \\ <strong>and</strong> \newline,<br />

however, the line is filled with empty space after the last word <strong>and</strong> the<br />

interword spacing remains normal.<br />

The opposite comm<strong>and</strong><br />

\nolinebreak[num]<br />

discourages a line break at the given position, with num specifying the<br />

degree of discouragement. Again, \nolinebreak without a num argument<br />

has the same effect as \nolinebreak[4], that is, a line break is<br />

absolutely impossible here.<br />

Another way of forcing text <strong>to</strong> stay <strong>to</strong>gether on one line is with the comm<strong>and</strong><br />

\mbox{text}. This is convenient for expressions such as ‘Voyager-1’<br />

<strong>to</strong> s<strong>to</strong>p a line break at the hyphen.<br />

2.7.3 Vertical spacing<br />

It is possible <strong>to</strong> add extra vertical spacing of amount space between<br />

particular paragraphs using the comm<strong>and</strong>s<br />

\vspace{space}<br />

\vspace*{space}<br />

The *-form will add the extra space even when a new page occurs, or<br />

when the comm<strong>and</strong> appears at the <strong>to</strong>p of a new page. The st<strong>and</strong>ard form<br />

ignores the extra vertical spacing in these situations.<br />

If these comm<strong>and</strong>s are given within a paragraph, the extra space is<br />

inserted after the current line, which is right <strong>and</strong> left justified as usual.<br />

The space parameter may even be negative, in order <strong>to</strong> move the<br />

following text higher up the page than where it would normally be printed.<br />

The comm<strong>and</strong> \vfill is an abbreviation for \vspace{\fill} (see<br />

Section 2.4.2). This is the equivalent of \hfill for vertical spacing,<br />

inserting enough blank vertical space <strong>to</strong> make the <strong>to</strong>p <strong>and</strong> bot<strong>to</strong>m of the<br />

text match up exactly with the upper <strong>and</strong> lower margins. The comments<br />

on multiple occurrences of \hfill also apply <strong>to</strong> \vfill. If this comm<strong>and</strong><br />

is given at the beginning of a page, it is ignored, just like the st<strong>and</strong>ard<br />

form of \vspace{\fill}. If a rubber space is <strong>to</strong> be put at the <strong>to</strong>p of a<br />

page, the *-form \vspace*{\fill} must be used.<br />

Further comm<strong>and</strong>s for increasing the spacing between paragraphs are

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

Saved successfully!

Ooh no, something went wrong!