2.12 Declarations
The term declaration is used to refer to a command that
affects the document from that point onwards. The declaration itself
does not produce any text and, in most cases, its effect can be
localised by placing the declaration within a group. For
example, \bfseries
is a declaration that switches the
current font weight to bold, so the following code
will appear in the typeset document looking like:
Some declarations don't immediately have a visible effect. For example, the declarations
only set the paragraph justification to ragged-right,
ragged-left or centred, respectively, if the
declaration is still in effect at the end of the paragraph.
That is, if it is still in effect at the next \par
or blank line.
Example:
\raggedright
The paragraph justification can be switched to
ragged-right or \raggedleft
ragged-left.
\par
Above, the justification at the paragraph break is ragged-left, so that's the justification used for the entire paragraph. Compare with:
\raggedright
The paragraph justification can be switched to
ragged-right or \raggedleft
ragged-left.}
\par
Above, the justification at the paragraph break is fully-justified,
since both the declarations \raggedright
and
\raggedleft
are cancelled when their local scope (signified
by the curly braces) ends.
This type of mistake most often occurs when people try to centre
text doing something like:
\centerline
. It's obsolete [15].
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).