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.

118 Chapter 4. Displayed Text<br />

\footnoterule<br />

The comm<strong>and</strong> that draws a horizontal line between the page text <strong>and</strong><br />

the footnotes. It should not add any net vertical spacing. It may be<br />

changed, for example, by<br />

\renewcomm<strong>and</strong>{\footnoterule}<br />

{\rule{wth}{hght}\vspace{-hght}}<br />

A value of 0 cm for the hght produces an invisible line of zero thickness.<br />

The following style parameters may be changed <strong>to</strong> redefine how marginal<br />

notes appear:<br />

\marginparwidth<br />

determines the width of the margin box;<br />

\marginparsep<br />

sets the separation between the margin box <strong>and</strong> the main text;<br />

\marginparpush<br />

is the smallest vertical distance between two marginal notes.<br />

These parameters are all lengths <strong>and</strong> are assigned new values as usual with the<br />

\setlength comm<strong>and</strong>.<br />

4.11 Comments within text<br />

All computer languages provide a means of inserting comments in<strong>to</strong> the<br />

code. These are explana<strong>to</strong>ry notes, documentation, his<strong>to</strong>ry of development,<br />

or alternative text or code that has been temporarily deactivated.<br />

Comment lines are completely ignored during processing. They are only<br />

intended for human readers inspecting the source text.<br />

In L AT E X, the comment character is the percent sign %. When this<br />

character appears in the text, it <strong>and</strong> the rest of the line are ignored. If a<br />

comment is several lines long, each line must be prefixed with %.<br />

As for other single character comm<strong>and</strong>s, the percent sign itself is<br />

printed with the comm<strong>and</strong> \%, as explained in Section 2.5.4.<br />

The comment character % is also useful for experimenting with text<br />

or definitions of user comm<strong>and</strong>s or formatting parameters, <strong>to</strong> try alternatives<br />

without deleting the old versions. By ‘commenting out’ selective<br />

lines, one can play around with variations without losing them.<br />

Large sections of text may be more effectively commented out with the<br />

comment environment from the verbatim package (page 111).<br />

Finally, the % character has an important role <strong>to</strong> play in suppressing<br />

implied blanks at the end of a line. This is especially desirable in user definitions<br />

where unexpected blanks can creep in between otherwise invisible<br />

declarations with arguments. See Section 8.5.2.<br />

Exercise 4.20: Comment out the changes from Exercise 4.18 in your preamble.<br />

These comm<strong>and</strong>s may be reactivated later by removing the % character.

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

Saved successfully!

Ooh no, something went wrong!