Document preparation with LaTeX


Introduction

LaTeX is a macro-based text formatter, which means you have to type in all of the macro instructions yourself. Not a wysiwyg word processor, but extremely versatile. It has the advantage that the source files you create for your document are entirely ASCII. Also it does very smart equations.

Unfortunately, for new users, there is no real substitute to reading the manual. Loads of good online info. The book I would recommend (available from the VSSP library) is:

Generating, previewing and printing a LaTeX document

The LaTeX source file should normally have a name ending in ".tex". For an example that includes equations, figures and citations for a Bibtex file, look at myfile.tex. Mostly people want to generate a pdf document, so download myfile.tex and type:

pdflatex myfile

which will generate the pdf file "myfile.pdf" directly. The bibliography is kept in a separate bibtex database file. For this example, you need to download it, then type these 3 commands in order to get all of the citation cross-references resolved:

bibtex myfile
pdflatex myfile
pdflatex myfile

The pdf file can be viewed using the usual pdf viewers: evince, xpdf, acroread etc. My own preference is for evince (the default), as it updates automatically.

If you prefer, you can use the old latex program instead, which will generate a .dvi file, viewable with xdvi. xdvi is particularly convenient when editing your Latex file as the display updates when you click on it with the mouse. Further options:

The Postscript previewer gv (ghostview) provides a simple means to view and print selected pages of pdf and Postscript. N.B. If you select the "antialias" option in the "state" menu in ghostview, the text looks much clearer.

Style files

In addition to the figure style files used in the above example, there are a hundreds of style files for particular document types etc. They are mostly documented within the files themselves, so I'll refer you straight to the master repository.

Bibliographies

Use of the Bibtex bibliography format (as in the above example) is strongly recommended, as many of the bibliographic databases use this format. See the Latex manual for details.

Creating presentations

If you want to create laptop presentations or overhead transparencies, use latex or pdflatex, but with the appropriate document class (slides) and style files. See oh.tex for a very basic example.

Other information


W.Christmas@ee.surrey.ac. uk
Last modified: Tue Oct 14 14:07:19 BST 2014