Web Historical Disclaimer:
This is a historical page
and is no longer maintained. Read our
Web history statement for more information.
![]()
| |
| | UT Home | Graduate School Home | |
LaTeX: from quick and dirty to style and finesseEnvironments
by Tony Roberts LaTeX has a multitude of logical structures to work with, called "environments." Use them. Contents of this sectionQuotation & verseAn environment is established by a \begin{}...\end{} pair. For example, a quotation may be typeset using the quote environment \begin{quote}
...
\end{quote}
or a passage of verse may be typset by the verse environment \begin{verse}
...
\end{verse}
See fractals11.tex and the use of \\ to specify line breaks in the verse environment. Observe that the "66" and "99" quote marks around the quote (and elsewhere) are obtained by using:
Note that LaTeX knows that it is good style to leave a wider space after a full-stop at the end of a sentence. However, this means that sometimes you have to tell LaTeX that some full-stop/space combinations are not at the end of a sentence, one example being between a person's initials and their surnames. As in L.F.~Richardson and A.J.~Roberts, a tilde does two things:
The tilde is used in other circumstances such as Figure~2, equation~(3), etc. AbstractThe abstract environment does a little more for you in that \begin{abstract}
...
\end{abstract}
also typesets a natty little title. See fractals12.tex. Itemize & enumerateExtremely useful are the list environments of which I describe two. Use them wherever you have a sequence of steps or a list of things. The format for a bulleted list is \begin{itemize}
\item ...
\item ...
...
\end{itemize}
The format for a numbered list is \begin{enumerate}
\item ...
\item ...
...
\end{enumerate}
See fractals13.tex. Note that blank lines between items have no effect. Lists may be embedded within lists to a maximum of four nested levels. Tabular and centerOften we want to display information in a table; LaTeX has the tabular environment for this. The tabular environment is a more sophisticated environment in that it has an argument as well as material in the body of the environment. The format of the environment is \begin{tabular}{argument}
\hline
... & ... & ... \\
\hline
... & ... & ... \\
\hline
... & ... & ... \\
\hline
... & ... & ... \\
\hline
\end{tabular}
for a table of four rows and three columns.
The fractal document does not have a table at present, but we put one in at the end listing seven geometric objects and their fractal dimension, see fractals14.tex. Note that the table is put inside a center environment: \begin{center}
...
\end{center}
which centres the enclosed material across the width of the page (note the American spelling of center). VerbatimComputer code, no matter what special characters it has, may be listed with the verbatim environment: \begin{verbatim}
...
\end{verbatim}
All characters and line breaks within the body of this environment are reproduced in the fixed width font (\tt). See fractals15.tex where I typeset the LaTeX commands needed to typeset the table of dimensions! (More powerful code listing environments are available in the moreverb package.) Simple MathematicsMathematics is treated by LaTeX in a fashion completely different from ordinary text. The mathematics mode is invoked by specific environments.
3 August 1998 Professor A J RobertsDepartment of Mathematics and Computing University of Southern Queensland Toowoomba 4350, Australia E-mail: aroberts@usq.edu.au |
Graduate School, Main Building 101, Austin, TX 78712 |