Johannes_B has (very concisely) given the answer -- "\par
fixes the line spacing." however, maybe a bit of explanation would be useful.
since tex breaks lines by paragraph, there's a lot that isn't known until the paragraph is ended, at which time line breaks and other font-dependent attributes (like \baselineskip
) are "frozen". so whatever is in effect when \par
is encountered is what is used for the whole paragraph.
if you follow multiple lines in a paragraph in "huge" type by a segment in \tiny
, it may look like the line spacing of the huge part isn't affected, but it is -- the usual extra "leading" between lines won't be there. this will be abundantly obvious if you use lowercase type and one line doesn't have any descenders.
in your example, you have isolated the \tiny
component in a closed group, so after the lines are broken, the line spacing of the larger font is used. if you had not so isolated it, you would have seen that the lines of larger type were much closer together, using the \baselineskip
of tiny
in force at the end of the paragraph.
latex "protects" many environments from potential problems when type size is changed by including \par
before the end of the environment, so a user is probably not aware of this nicety.
in math documents, it's sometimes necessary to decrease the type size of a displayed equation. in such a situation, it's always necessary to check that the baseline spacing of the preceding paragraph hasn't been affected, and if it has, extra manual adjustments must be applied.
here is an example using the scenario described for a math document. this is much
more insidious than the pure text situation described in the question, but the principle is exactly the same -- \par
is needed to prevent an unwanted result
at a size transition.
here is the input, which uses no packages, only a "basic" document class.
\documentclass{article}
\begin{document}
The purpose of this example is to show the effect of changing
the font size without issuing a paragraph break in appropriate
places. First, a normal size display.
\[ a + b + c = d + e + f \]
Follow this by a couple of lines of text. Note that there is
an implicit paragraph break at the end of the display, even
though the text following the display isn't indented. Now
change the font size in the display; best to do it in a group.
\begingroup \footnotesize
\[ a + b + c = d + e + f \]
\endgroup
Follow this by more text and examine the baselines of the
two preceding blocks of text. Now, try this again, but this
time include an explicit \verb+\par+ before the display. This
can mess up the vertical space before the display, and will
allow the page to break at that point, but the
baselines of this text block remain intact.\par
\begingroup \footnotesize
\[ a + b + c = d + e + f \]
\endgroup
End with some more text just to make sure that the treatment
of the transition is equivalent.
\end{document}
\par
fixes the line spacing.\par
. I'd say that unless you have an extremely unusual use case (I can only assume it's not related to typesetting various lipsum strings...), the right way to go about things is to create paragraph breaks when whenever there's a sustained change in font size.\par
(although they are the same thing)