TeX will open a group, and impose the ragged-setting parameters within that group; it will then save a couple of sentences of text and close the group (thus restoring the previous value of the parameters that{\raggedright % declaration for ragged text Here's text to be ranged left in our output, but it's the only such paragraph, so we now end the group.} Here's more that needn't be ragged...
\
raggedright
set). Then TeX encounters a blank
line, which it knows to treat as a \
par
token, so it typesets the
two sentences; but because the enclosing group has now been closed,
the parameter settings have been lost, and the paragraph will be
typeset normally.
The solution is simple: close the paragraph inside the group, so that
the setting parameters remain in place. An appropriate way of doing
that is to replace the last three lines above with:
In this way, the paragraph is completed whileend the group.\par} Here's more that needn't be ragged...
\
raggedright
’s
parameters are still in force within the enclosing group.
Another alternative is to define an environment that does the
appropriate job for you. For the above example, LaTeX already
defines an appropriate one:
In fact, there are a number of parameters for which TeX only maintains one value per paragraph. A tiresome one is the set of upper case/lower case translations, which (oddly enough) constrains hyphenation of mutilingual texts. Another that regularly creates confusion is\begin{flushleft} Here's text to be ranged left... \end{flushleft}
\
baselineskip
.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=paraparam