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.

2.4. Lengths 21<br />

Declarations made with these comm<strong>and</strong>s are effective right away <strong>and</strong><br />

remain so until they are overridden by a new declaration of the same type.<br />

In the last example above, page numbering will be done in Roman numerals<br />

until counterm<strong>and</strong>ed by a new \pagenumbering{arabic} comm<strong>and</strong>.<br />

2.4 Lengths<br />

2.4.1 Fixed lengths<br />

Lengths consist of a decimal number with a possible sign in front (+ or<br />

-) followed by a m<strong>and</strong>a<strong>to</strong>ry dimensional unit. Permissible units <strong>and</strong> their<br />

abbreviated names are:<br />

cm centimeter,<br />

mm millimeter,<br />

in inch (1 in = 2.54 cm),<br />

pt point (1 in = 72.27 pt),<br />

bp big point (1 in = 72 bp),<br />

pc pica (1 pc = 12 pt),<br />

dd didôt point (1157 dd = 1238 pt),<br />

cc cicero (1 cc = 12 dd),<br />

em a font-specific size, the width of the capital M,<br />

ex another font-related size, the height of the letter x.<br />

Decimal numbers in T E X <strong>and</strong> L AT E X may be written in either the English<br />

or European manner, with a period or a comma: both 12.5cm <strong>and</strong> 12,5cm<br />

are permitted.<br />

Note that 0 is not a legitimate length since the unit specification is<br />

missing. To give a zero length it is necessary <strong>to</strong> add some unit, such as<br />

0pt or 0cm.<br />

Values are assigned <strong>to</strong> a length parameter by means of the L AT E X comm<strong>and</strong><br />

\setlength, which is described in Section 8.2 along with other<br />

comm<strong>and</strong>s for dealing with lengths. Its syntax is:<br />

\setlength{\length name}{length spec}<br />

For example, the width of a line of text is specified by the parameter<br />

\textwidth, which is normally set <strong>to</strong> a default value depending on the<br />

class, paper type, <strong>and</strong> font size. To change the line width <strong>to</strong> be 12.5 cm,<br />

one would give:<br />

2.4.2 Rubber lengths<br />

\setlength{\textwidth}{12.5cm}<br />

Some parameters expect a rubber length. These are lengths that can be<br />

stretched or shrunk by a certain amount. The syntax for a rubber length<br />

is:

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

Saved successfully!

Ooh no, something went wrong!