Text Processing using LaTeX
TeX is a powerful text
processing language and is the required format for some periodicals now. TeX has
many macros to which you can eventually add your own. LaTeX is a macro package
which sits on top of TeX and provides all the structuring facilities to help
with writing large documents. Automated chapter and section macros are provided,
together with cross referencing and bibliography macros. LaTeX tends to take
over the style decisions, but all the benefits of plain TeX are still present
when it comes to doing maths. The Why
LaTeX? page discusses LaTeX's strengths/weaknesses.
Later in this document there's an example
of some of the simple features of LaTeX, but first, here's a chance to jump to
lists of the main introductions,
packages,
as well as information on bibliographies,
graphics,
maths,
writing
guides and sources of
information. You can do a keyword
search of the LaTeX-related documents on this server and try some exercises.
Local users can read about recent updates
There are numerous "add-ons" for LaTeX.
Some (like caption,
enumerate,
fancyhdr,
footmisc
(for footnotes) and verbatim)
slightly enhance existing features, others provide extensive new functionality -
- The html
package and associated latex2html program lets one produce HTML as
well as DVI files from LaTeX source.
- The rotating
package makes rotation of pieces of text, tables (or even whole pages) easy.
More information on installed packages is in teTeX's documentation
guide. Local additions are listed
online. The TeX and
LaTeX Catalogue describes packages available elsewhere. See the Configuring
LaTeX document if you intend to install many packages.
CUED users can access the current university identifiers
(crests) in /usr/local/teTeX/share/texmf.local/university_identifiers.
These should only be used in their original sizes.
General
Platform-dependent info
Fonts and Characters
Typesetting
Miscellaneous
- Extending
LaTeX
- Postscript and LaTeX versions of local documention are online.
- lyx is a WYSIWYG front-end for LaTeX
that's getting better all the time. Warning: it may not always be easy to
convert between LaTeX and lyx formats - use at your own risk!
- 15/7/98 - Draft University House
Style class. See labfax98eg.tex lablet98eg.tex and
notes98eg.tex in /export/Examples/LaTeX
- 28/7/98 - eurosymbol character installed. Adding
\usepackage{eurosymbol} lets you use the \euro{} command.
- 10/2/00 - the TIPA package installed (another Phonetic Alphabet) [PDF
documentation]
- 2/3/00 - the appendix
style added
- 17/3/00 - the custom-bib program updated - create your own bib
styles.
- 14/4/00 - the xtab
package added - another package for multi-page tables.
- 15/12/00 - the prosper
package added - slide and PDF-slideshow production. See the prosper
tour for examples.
- 19/01/01 - chngpage
package installed to change page layout in the middle of a document.
- 7/03/01 - epstopdf package installed - copes with eps files
on-the-fly when pdflatex used. Needs to be loaded after
\usepackage[pdftex]{graphicx} used.
- 11/07/02 - savetrees
- Pack as much text as possible onto each page of a LaTeX document
- 1/10/02 - The combine
package combines latex documents into a single document (e.g. conference
proceedings)
- 19/11/02 - unpsfrag installed (converts a LaTeX file that uses
psfrag to one that can be used with pdflatex)
- 14/1/03 - Harish Bhanderi's CUED PhD/MPhil Thesis
Style is now available.
A good way to get started with LaTeX is to
look at a simple example. A short document is reproduced below. Engineering
Department users can find a file with a similar structure in
/export/Examples/LaTeX/demo0.tex. Further examples (a letter, a CV,
etc) are in the same directory.
\documentclass{article}
\begin{document}
\section{Simple Text} % THIS COMMAND MAKES A SECTION TITLE.
Words are separated by one or more spaces. Paragraphs are separated by
one or more blank lines. The output is not affected by adding extra
spaces or extra blank lines to the input file.
Double quotes are typed like this: ``quoted text''.
Single quotes are typed like this: `single-quoted text'.
Long dashes are typed as three dash characters---like this.
Italic text is typed like this: \textit{this is italic text}.
Bold text is typed like this: \textbf{this is bold text}.
\subsection{A Warning or Two} % THIS COMMAND MAKES A SUBSECTION TITLE.
If you get too much space after a mid-sentence period---abbreviations
like etc.\ are the common culprits)---then type a backslash followed by
a space after the period, as in this sentence.
Remember, don't type the 10 special characters (such as dollar sign and
backslash) except as directed! The following seven are printed by
typing a backslash in front of them: \$ \& \# \% \_ \{ and \}.
The manual tells how to make other symbols.
\end{document} % THE INPUT FILE ENDS WITH THIS COMMAND.
Once you have created a LaTeX source file it must be processed by
LaTeX before it can be printed out. Either drop the `.tex' file on the LaTeX
icon and click on the Process button, or use the command
latex myfile.tex
which will produce a number of files including myfile.log,
myfile.aux and myfile.dvi. If you are using various sorts of
cross referencing then you may have to run LaTeX more than once. If you want an
automated bibliography you will also have to run bibtex.
When this procedure is complete you will have a file myfile.dvi to
print out. This is a device independent representation of your document which
can be displayed on an X-windows screen using the xdvi program (which
CUED users can run using the View button). Engineering Department
people can then print using the plotview or dvilp program.
Books
The first 3 titles are rather out of date - CUED people can borrow
them from the DPO machine room.
- LaTeX documentation can be found in "A Document Preparation System: LaTeX,
User's Guide and Reference Manual (second edition)." by Leslie Lamport.
Addison-Wesley 1994.
- "The LaTeX Companion" by Goossens et al. Addison-Wesley 1994.
- TeX itself is fully documented in "The TeXbook" by Donald E. Knuth,
American Mathematical Society and Addison-Wesley, 1984.
- The "LaTeX Web Companion" (M Goossens and S Rahtz, with E Gurari, R Moore
and R Sutor, Addison-Wesley), 1999.
- "A Guide to LaTeX" by Kopka and Daly, Addison-Wesley, 1999.
The
CUED LaTeX maintainer is Tim Love
Revised September 2003
tpl@eng.cam.ac.uk