Introduction to L^{A}TEX

Richard Kaye Friday October 18th, 2002 Making slides using L^{A}TEX These slides

• introduce L^{A}TEX to newcomers

• outline some of the goals and themes for successful use of L^{A}TEX. (Important information whatever your L^{A}TEX skills are!)

• provides an example of how you might prepare slides for a talk or lecture using L^{A}TEX Typesetting TEX is a typesetting program, not a word processor. A typesetting program decides where symbols, such as letters, punctuation etc., should appear. Typesetting is a highly developed art with many subtle points, and is much more difficult to get right than it looks.

• A document is only as good as its content.

• The only objective in typesetting a technical document is to make your document as easy to read as possible.

Document design

Even harder than simple typesetting is document design. Bad design is irritating and detracts from your content. Good design is ‘invisible’ and rarely noticed.

TEX

TEX is a freely available typesetting program that works in some way or other on almost all computers with almost all printers.

Advantages TEX is: free software; presumed bug-free; standard; everyone has it (or can get it); allows you to typeset documents to the very highest standards.

Disadvantages TEX is: user-unfriendly; sometimes difficult to use well.

L^{A}TEX

L^{A}TEX is a set of packages extending TEX which takes care of much of the document design.

It requires you to describe the logical structure of your document (sections, subsections, titles, etc.) and leave L^{A}TEX to fit these to some built-in document design.

• L^{A}TEX manages cross-references (theorem numbers, bibliography, page references, etc.) automatically.

• There is a vast library of styles and packages you may use, or you may define your own.

The following tasks are listed in approximate order of difficulty.

1. Simple text.

2. Simple mathematics.

3. Alignment, tables.

4. More complicated mathematics, e.g., involving alignments.

5. Document design: choice of typefaces, spacing, margins.

6. Typography: design of typefaces.

What do I need for this course?

You need access to one of the department’s solaris servers. All materials for the course are on-line at

http://web.mat.bham.ac.uk/R.W.Kaye/latex/

If you want to use L^{A}TEX on your computer at home…

MikTEX (TEX for Win32 operating systems) is at http://www.miktex.org/. TEX is available for other OSs too.

You will need a text editor. For Win32, WinEdt (http://www.winedt.com/) can be recommended, but is shareware (i.e., you have to pay for it—$30 for students). If

you prefer not to pay, try PFE (http://www.lancs.ac.uk/people/steveb/cpaap/pfe/default.htm)
or emacs (http://www.gnu.org/software/emacs/emacs.html).

What are we trying to do? Your L^{A}TEX documents should describe the structure of the document and content not its visual appearance. E.g., tell L^{A}TEX where sections, subsections, etc., start and end and resist the temptation to tell it where line breaks and pages breaks should be. Here are a few golden rules:

• whatever you do, be consistent

• keep things simple • use the LaTeX environments and commands given wherever pos-

sible and nest environments in the most logical way

• use L^{A}TEX commands and environments to describe structure • whenever you find you are using the same construction or notation

regularly, write a macro or environment for it

• avoid visual formatting

• don’t use plain TEX commands

• if you do need to change the default styles or visually format your document differently, write a special custom class or style file

This principle of presenting logical structure rather than visual formatting is the same as for (good) HTML, XHTML, XML.

Making L^{A}TEX slides

To make slides, you use the slides document class.

Most of the usual text formatting commands are available, as you will see, but note that sectioning commands (\paragraph, \section, etc.) are not available. You have to do these ‘by hand’ with \textbf, etc. You may find you make quite a lot more use of \newpage and \\ than normal.

You will note that the fonts are different too.

Many people think that the slides package uses the wrong font or wrong size.

Be very careful about changing these defaults. Smaller fonts become almost impossible to read from the back of a lecture theatre. (If you must, try it out. But by all means increase the size of the fonts though!)

Although it is not the usual font for textbooks, the sans-serif font used here is less cluttered and easier to read at a distance.