Time for action – using an environment to adjust the font size
We will produce a title with a larger and bigger font:
Create another small document with this code:
\documentclass{article} \begin{document} \begin{huge} \bfseries A small example \end{huge} \bigskip This is just another small illustrative example. \end{document}
Typeset to see the result:
What just happened?
By writing \begin{huge}
, we told LaTeX to switch to a huge font size just like with the \huge
command. \end{huge}
informs LaTeX that this size change should end now. From this point onwards, the font size is the same as before \begin{huge}
.
Inside this environment, we use the declaration \bfseries
. Note that the effect of this declaration ended together with the end of the environment.
The empty line before \end{huge}
denotes a paragraph break. Using the command \bigskip
, we skipped some space vertically.
For every declaration there's a corresponding environment carrying the same name except the backslash. Using environments...