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 finesseFigures, tables and seminars
by Tony Roberts Contents of this sectionTablesTables and figures are examples of entities that "float". They generally form too large an entity to be conveniently placed just anywhere on a page. Instead LaTeX waits so that it can put them in a convenient place: the top of a page, the bottom of a page, or on a page by itself. To request LaTeX to include a table use the table environment: \begin{table}
...
instructions for typesetting the table
(usually tabular within a center environment)
...
\caption{...}
\label{...}
\end{table}
See the table of fractal dimensions at the end of fractals31.tex. In the first run through, LaTeX cannot find room on page 5 for the table, and so places it on page 6 by itself. In the second run, the Table of Contents has pushed more material into the document, and now the table is placed at the top of the page. One may include a List of Tables in the document with the command \listoftables. FiguresThe usual way to include a figure in LaTeX is as follows.
\usepackage{graphicx}
\begin{figure}
\centerline{\includegraphics{...}}
\caption{...}
\label{...}
\end{figure}
where the argument of the \includegraphics command is the full filename.\begin{figure}
\includegraphics[width=\textwidth]{...}
\caption{...}
\label{...}
\end{figure}
See the two figures in fractals32.tex The width=0.9\textwidth scales the figure to 90% of the width of the typeset text: change it if desired; leave if out in order to reproduce the figures unscaled; set height=0.8\textheight if instead the vertical height is the constraint. One may include a List of Figures in the document with the command \listoffigures. Attached filesNote the use of the filecontents environments in fractals32.tex. These appear at the front of the LaTeX file, and allows supplementary files, such as the postscript pictures, to be carried around with, or attached to, the LaTeX source file. The format is \begin{filecontents}{filename1}
...
\end{filecontents}
\begin{filecontents}{filename2}
...
\end{filecontents}
...repeated for each needed file ... \documentclass{article}
...
\end{document}
What happens is that when LaTeX analyses such a .tex file, LaTeX checks to see if the named files exist, if not they are created with the contents specified, if so then nothing changes. LaTeX then proceeds to analyse the document proper. Seminar styleThere is a nifty documentclass for preparing overhead transparencies, the seminar class. Within this class, you use all the normal typesetting facilities offered by LaTeX. An example framework is as follows: \documentclass[a4]{seminar}
...
\begin{document}
\begin{slide}
...
\newslide
...
\newslide
...
\end{slide}
\end{document}
Note the use of slide environment within the document, and the use of the \newslide command to strongly control page breaks as it is important to control the specific material on each page. Such a document is to be viewed and printed in landscape mode, see fractals33.tex. It is good practise to:
as in \documentclass[a4,12pt,semhelv]{seminar}
3 August 1998 Professor A J RobertsDept Mathematics & Computing University of Southern Queensland Toowoomba 4350, Australia E-mail: aroberts@usq.edu.au |
Graduate School, Main Building 101, Austin, TX 78712 |