Department of Engineering | |
University of Cambridge > Engineering Department > computing help |
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
- The Not So Short Introduction to LaTeX2e is a 141 page introduction to LaTeX2e by Tobias Oetiker et al. Worth a read. There are versions in german and french, italian etc.
- The very short guide to typesetting with LATEX (4 pages)
- LaTeX and Friends (M.R.C. van Dongen) (250+ 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)
- Formatting Information (by Peter Flynn ). Covered by the GNU's FDL
- A Simplified Introduction to LaTeX (by H.J. Greenberg)
- TeX Resources (A.J. Hildebrand)
- LaTeX for Word Processor Users
- The Indian TeX Users Group has tutorials on several subjects. Their LaTeX Primer is locally installed
- The LaTeX Wikibook
- Making Friends with Latex
- LaTeX course (University of Cambridge Computing Service)
Packages
There are numerous "add-ons" for LaTeX. Some (like caption, enumerate, and fancyhdr) slightly enhance existing features, others provide extensive new functionality. The TeX and LaTeX Cataloguedescribes 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.
- Using Makeindex. How to add an index to your document
- Simple LaTeX Glossaries and Acronyms using the glossaries package
- The glossaries documentation
- The nomencl package How to add nomenclature sections
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 andHints on adding figures to multicolumn environments documents deal with common problems. See also Klaus Hoeppner's Strategies for including graphics in LaTeX documents
- 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
- mathmode (133 pages) by Herbert Voß is useful.
- 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)
Tables
Guides to writing various types of documents
- Posters and booklets
- Creating Technical Posters With LaTeX (by Nicola Talbot )
- 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
- Harish Bhanderi's CUED PhD/MPhil Thesis Style
- Presentations and OHP slides
- 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.
Other sources of information
General
- You can do a keyword search of the LaTeX documents on this server.
- See the Frequently Asked Questions (or the Engineering Department's LaTeX FAQ) for more information.
- The UK archive of TeX-related material, CTAN contains everything to do with LaTeX. Use the CTAN search to search your nearest CTAN archive.
- 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.
- 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
- Distributions for many machine types are available in CTAN's systems directory.
- 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
We have a site licence for tex2word. Contact Peter Benie (pjb1008) for help with it (with a demo licence it fails to convert some files that with the real licence it copes with). In addition
- 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.
- Excel2Latex may be useful to Windows users
Fonts and Characters
- Using common PostScript fonts with LaTeX
- The Comprehensive LaTeX Symbol List
- Free typefaces available (by Peter Flynn)
- LaTeX and fonts
- The Font Installation Guide (Philipp Lehman)
- character sets
Typesetting
- The memoir package has very extensive documentation about design.
- The CUED library page has sections on writing style guides and bibliography production.
Editors/Front-ends
- With 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.
- lyx 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
- TeXnicCenter is a free integrated development environment (IDE) for use with Microsoft Windows (Windows 9x/ME, NT/2000/XP)
- LEd is a free integrated development environment (IDE) for use with Windows 95/98/Me/NT4/2000/XP/2003/Vista operating systems
- The emacs editor offers extra menus when a LaTeX file is loaded in
Miscellaneous
- Configuring LaTeX
- Extending LaTeX
- Travels in TeX Land: Tweaking LaTeX (David Walden)
- Printing PDF from LaTeX onto A4
- LaTeX tips (Volker Koch)
- LaTeX for Logicians (Peter Smith)
- The LaTeX Brochure 2008
- Postscript, PDF and LaTeX versions of local documention are online.
Updates
- 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. See thedocumentation for details
- 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
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. 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 by clicking on the icon or using the xdviprogram.
Books
CUED people can borrow some of these 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 (2nd edition)" by Goossens et al. Addison-Wesley 2004 (see the table of contents!)
- 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.