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.
On CUED's central system you can run latex from the command line using latex or pdflatex. We also have Kile and Lyx
Introductions
- LaTeX: An introduction, Advanced LaTeX (full of examples) and LaTeX Maths and Graphics contain all you'll need to know for writing most documents - the "how" rather than the "why".
- LaTeX workshop exercise for beginners
- uk-tug slides, etc
- uk-tug course
- The Not So Short Introduction to LaTeX2e is a 141 page introduction to LaTeX2e by Tobias Oetiker et al. Worth a read.
- The very short guide to typesetting with LATEX (4 pages)
- LaTeX for Complete Novices (Nicola L. C. Talbot)
- Introduzione al Mondo di LaTeX is a guide (PDF slides) in Italian
- online tutorials (Andy Roberts)
- TeX Resources (A.J. Hildebrand)
- The Indian TeX Users Group has tutorials on several subjects.
- The LaTeX Wikibook
- Making Friends with Latex
- LaTeX course (University of Cambridge Computing Service)
- Sharelatex Introduction to LaTeX
- Overleaf Introduction to LaTeX
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
- See the bibliographies page.
- bibliographies with biblatex
- Natural Science Citations - provides many options. See also the reference sheet
- CTAN has many bibliography styles in its bibtex section.
- bibtex editor
- Simple LaTeX Glossaries and Acronyms using the glossaries package
- The nomencl package How to add nomenclature sections
- minitoc
Graphics
- Using Imported Graphics in LaTeX and PDFLaTeX (by Keith Reckdahl) explains all there is to know about putting graphics into LaTeX documents. The Hints about tables and figures in LaTeX and Hints on adding figures to multicolumn environments documents deal with common problems. See also Klaus Hoeppner's Strategies for including graphics in LaTeX documents
- How to influence the position of float environments like figure and table in LaTeX (Frank Mittelbach)
- Graphics for Inclusion in Electronic Documents (Ian Hutchinson)
- The xfig graphics editor.
- Gnuplot displays data graphically. Use its "set term postscript eps color" to produce a postscript file which can be added to your latex document in the usual way. Matlab may be preferable.
- The pstricks tutorial show how to use the pstricks package to produce line drawings
- Matlab graphics with LaTeX
Maths
- The psfrag handout addresses the common problem of how to add LaTeX maths to a postscript file.
- Part of Math into LaTeX (by G. Grätzer) is online
- AMS-LaTeX provides specialist support.
- The Short Math Guide for LaTeX comes from the American Mathematical Society
- Matlab has some support for LaTeX production. Type "help latex" inside matlab for details.
- Effective Scientific Electronic Publishing (by Markus G. Kuhn) and AcroTeX by D.P.Story cover PDF production.
- Maths cheat sheet (Martin Jansche)
- Math Tutorial for mimeTeX
- A Survey of Free Math Fonts for TeX and LaTeX (Stephen G. Hartke)
- Detexify - LaTeX symbol classifier lets you draw a symbol and will give you the corresponding LaTeX
Tables
- Tables in LaTeX: packages and methods
- Table Editor (producing output in various formats, including LaTeX)
Guides to writing various types of documents
- Creating Technical Posters With LaTeX (by Nicola Talbot )
- Writing thesis effectively (Krishna Kumar)
- Reports (the squeezing space in LaTeX notes may also be useful)
- Using LaTeX to Write a PhD Thesis (Nicola L. C. Talbot)
- LaTeX IIB project report classes
- The CUED PhD/MPhil Thesis Style
- HTML or PDF from LaTeX
- Creating a PDF document using PDFlatex (by Nicola Talbot)
- Producing PDF
- Multi-column output
- For collaborative or multi-draft documents, latexdiff might be useful. Doing
latexdiff -CCHANGEBAR old.tex new.tex > diff.tex pdflatex diff.tex
should produce a document that compares and contrasts the 2 versions of the file.
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
- LaTeX Matters (a blog)
- LaTex Community
- See the Frequently Asked Questions (or the Engineering Department's LaTeX FAQ) for more information.
- The archive of TeX-related material, CTAN contains everything to do with LaTeX.
- TeX Live documentation
- Hypertext Help with LaTeX (an extensive indexed reference)
- The TeX Users Group (TUG) keeps lists of TeX resources and packages (free and commercial), etc. The LaTeX project site is useful too.
- References for TeX and Friends from mixie.org offers material in several formats.
- LaTeX cheat sheet
- The comp.text.tex newsgroup covers LaTeX issues.
- tex.stackexchange.com is a forum for questions and answers
- The PracTeX Journal includes low-tech articles like \begin{here} % getting started etc.
- texdoctk is often installed with LaTeX. It's an easy way to access installed documentation
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.
- For MS Windows 95/98/NT/2000 machines, proTeXt (based on MiKTeX) is worth a look. See LaTeX using MikTeX and WinEdt for information about using MikTeX and WinEdit on Windows. BaKoMa TeX might also be useful.
- TeX Live has binaries for most flavors of Unix, including GNU/Linux, and also Windows
- MacTeX for Macs includes support for using Mac fonts.
- The Macintosh TeX/LaTeX Web Site is very informative.
Converters
- wvLaTeX is installed (Word to LaTeX).
- OpenOffice has an option to export Word files as LaTeX
- There's a list of RTF/Word/WP - LaTeX - converters online.
Fonts and Characters
Miscellaneous
- Installing LaTeX Packages
- Configuring LaTeX
- Extending LaTeX
- Debugging LaTeX
- Travels in TeX Land: Tweaking LaTeX (David Walden)
- LaTeX tips (Volker Koch)
- Postscript, PDF and LaTeX versions of local documention are online.
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.