12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E. LATEX AND TEX\newskip\myskip<strong>The</strong> value of a \dimen is a dimension and the value of a \skip is what <strong>TeX</strong> calls glue. Itso happens that La<strong>TeX</strong>’s \newlength always creates a new skip — all La<strong>TeX</strong> lengths arecreated as rubber lengths. Glue has at least one and possibly as many as three parts.glue: dimension [ plus dimension ] [ minus dimension ]<strong>The</strong> optional plus part is the amount that the glue can stretch from its normal size and theoptional minus part is the amount the glue can shrink below its normal size. Both plusand minus are <strong>TeX</strong> keywords. Glue can never shrink more than the minus dimension andit normally does not stretch more than the plus dimension.\@plus \@minusLa<strong>TeX</strong> supplies \@plus and \@minus which expand to plus and minus respectively. Writing\@plus instead of plus uses one instead of four tokens, saving three tokens, and\@minus in place of minus saves four tokens — remember that a <strong>TeX</strong> token is either acontrol sequence (e.g. \@minus) or a single character (e.g., m). <strong>TeX</strong>’s memory is not infinite— it can only hold so many tokens — and it makes sense for kernel and <strong>class</strong> or packagewriters to use fewer rather than more to leave sufficient space for any that authors mightwant to create.In <strong>TeX</strong>, assigning a value to a length (\dimen or \skip) is rather different from the wayit would be done in La<strong>TeX</strong>.〈dimen〉 [ = ] 〈dimension〉〈skip〉 [ = ] 〈glue〉<strong>The</strong> [ and ] enclosing the = sign are there only to indicate that the = sign is optional. Forexample:\newdimen\mydimen\mydimen = 3pt % \mydimen has the value 3pt\mydimen -13pt % now \mydimen has the value -13pt\myskip = 10pt plus 3pt minus 2pt % \myskip can vary between% 8pt and 13pt (or more)\myskip = 10pt plus 3pt% \myskip can vary between% 10pt and 13pt (or more)\myskip = 10pt minus 2pt% \myskip can vary between% 8pt and 10pt\myskip = 10pt% \myskip is fixed at 10ptLike counts, the value of a length can be typeset by prepending the length by the \thecommand, e.g., \the\myskip.<strong>TeX</strong>’s lengths can be manipulated in the same way as a count, using the \advance,\multiply and \divide macros. Ignoring some details, lengths can be added togetherbut may only be multiplied or divided by an integer number.438

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

Saved successfully!

Ooh no, something went wrong!