Department of Engineering

IT Services

Text Processing using LaTeX

wordle 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.
On CUED's central system you can run latex from the command line using latex or pdflatex. We also have Kile and Lyx

Introductions

Packages

There are numerous "add-ons" for LaTeX. Some (enumerate and fancyhdr) slightly enhance existing features, others provide extensive new functionality. The TeX and LaTeX Catalogue describes packages available elsewhere. See the Configuring LaTeX document if you intend to install many packages.

Bibliographies, Graphics and Maths

Front/Back matter

Graphics

Maths

Tables

Guides to writing various types of documents

CUED users can access the current university identifiers (crests) using \includegraphics{BWUni3.eps} or \includegraphics{CUni3.eps} on our linux servers. These should only be used in their original sizes.

Other sources of information

General

Distributions

Note that the "front-end" (the program with an editor, buttons and menus) and the LaTeX files may well be separately distributed. If you install texmaker, for example, it will assume that you've already downloaded the latex system.

Converters

Fonts and Characters

Editors/Front-ends

  • kileWith Kile (installed on our local system - type kile in the Terminal window to start it) you still need to type LaTeX code, but Kile has many facilities (templates, wizards, etc) to make it easier.

    You should be able to find what you want in the menus (for example, the File->Statistic option gives a word-count, etc). You can print the LaTeX file directly from Kile. To print the output file you need to use another program. For example, if you want to create a PDF file you can produce the DVI file, use the Build->Convert->DVItoPDF option, then the Build->View->ViewPDF option to view the file. The viewer has a Print option.

  • lyxlyx is a WYSIWYG front-end for LaTeX that's getting better all the time. It's installed on our teaching system. Warning: it may not always be easy to convert between LaTeX and lyx formats - use at your own risk!

  • Texmaker (not installed) is a free cross-platform LaTeX editor
  • LEd is a free integrated development environment (IDE) for use with Windows 95/98/Me/NT4/2000/XP/2003/Vista operating systems
  • overleaf lets you write LaTeX docs and work collaboratively without needing to install anything. It's not free.
  • The emacs editor offers extra menus when a LaTeX file is loaded in

Miscellaneous

Updates new

  • August 2015 - TeXLive 2013 installed
  • January 2014 - new PhD/MPhil Thesis (with LyX support)
  • March 2013 - minitoc installed
  • July 2012 - TeXLive 2011 installed
  • May 2011 - biblatex installed
  • May 2009 - LaTeX removed from gate. Use one of the Linux servers
  • May 2009 - IIB project classes (also for LyX users)
  • February 2009 - latexdiff program installed - to determine and mark up differences between two latex files. Type man latexdiff for details.
  • January 2009 - glossaries package installed, to supercede glossary. See the glossaries documentation for details.
  • September 2008 - The TeX Live distribution has replaced the teTeX distribution. Users shouldn't notice any difference.
  • September 2007 - nomencl (nomenclature package) updated to version 4.2. It's incompatible with the old version - use \usepackage[compatible]{nomencl} if you want the old behaviour.
  • August 2007 - Metapost (mpost) and purifyeps installed
  • July 2007 - TeTeX 3.0 installed on the teaching system
  • 23/10/06 - Harish Bhanderi's CUED PhD/MPhil Thesis Style

Example

One 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. On systems that offer a command line you can try the command

pdflatex myfile.tex

while in the same folder as the saved LaTeX file. It will produce a number of files including myfile.log, myfile.aux and myfile.pdf. 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.pdf to print out or preview.