Homepage Alexander Schatten - Overview over the LaTeX Typesetting System
 Home Contact/CV Publications University Resources Photos External Impressum
 > Home > Resources > Overview over the LaTeX Typesetting System

# Overview over the LaTeX Typesetting System

## 1. LaTeX?

LaTeX is a typesetting system, better described as a markup language. Compared to wordprocessors like Winword LaTeX is no WYSIWYG system. Indeed, it is more like a computer language or HTML. The LaTeX system is some kind of a compiler that translates the LaTeX sources to a DVI (Device Independent format) file, that can be viewed and printed with a DVI-viewer. (In most cases, one will convert the DVI-file to a Postscript file, that can be printed directly with any PS-compatible printer or on any printer with ghostscript. The advantage of the PS way is furthermore the fact, that high quality EPS-pictures can be integrated in the document.)

Recently, most user creat PDF directly, not using the DVI format, which has slight impact to the publishing process. E.g., figures must be available in PDF, not in EPS. But as PDF is a very common format now, this is usually the easier and more direct procedure.

## 2. Simple Examples

The following examples are very simplistic and brief; the idea of this section is just to get an idea about the LaTeX concept and strategies. For more examples and details, please refer to the references mentioned below.

define Chapter Titles and Section Titles

\chapter{A Chapter Title}
\section{A Section Title}


create a bulleted list

\begin{itemize}
\item first line
\item second line
\item ...
\item ...
\end{itemize}


with the result:

• first line
• second line
• ...
• ...

... and so on. In a similar way, one may create program listings, references, footnotes, images, tables, citations...

Compared to common WYSYWIG systems like Winword, Word Pro, Page Maker ... this seems to be an anachronism. In fact, the way in is harder, but a lot of advantages appear when creating long (especially scientifical) documents. The main Advantages are:

• very stable engine
• excellent default layouts for books, papers
• excellent quality of equations (thats why LaTeX is quasi-standard for physicists and in mathematical environments)
• long documents with many graphics, equations and tables are no problem
• much better typographical quality then common word-processors
• source code is in ASCII/ANSII format - exchange between different platforms (Unix, PC, Apple) is no problem
• LaTeX is available for all relevant operating systems
• open interface for macro programmers. A huge amount of macro styles are available
• LaTeX is open source software
• all necessary functions to create large technical documents are available:
• automatic numbering of Chapters, Tables, Figures, equations, ...
• automatic referencing (see fig. ...)
• index, contents; list of figures, tables, ...
• complex algorithms for floating figures, tables
• references with BibTex - literature database, or simply easy citation management with the \cite command (see below)
• Using LaTeX2HTML, even very complex LaTeX documents can be formatted to HTML pages in a high quality. Most of my more complex documents are written in LaTex.
• Learning the system is hard sometimes, but writing is faster and much more efficient than using other Word Processors.

A very nice discussion about typesetting, writing text and word-processing is written by Allin Cottrell (Word Processors: Stupid and Inefficient (external) ) and is a recommended read at this point.

• The WinDOS version of LaTeX is not so smoothly installed, integrated and used as other Windows applications, whereas the Linux and also the Mac OS X version is very good integrated to the Unix system and is easy to install (usually it is even pre-installed).
• Beginning with LaTeX is doubtless harder than the beginning with e.g. Winword. So I wouldnt use LaTeX for composing letters, but when making complex, but clear structured documents LaTeX is clear favorite.
• "Free" Layouts as used in Newspapers, Invitations,... are very hard to do in LaTeX, so forget it in these cases, there are better applications to do this.

### 3.3 My Opinion/Experience

So my opinion is: LaTeX is best choice for technical papers like diploma thesis, PhD thesis, books, papers with many equations, tables, figures, ...

It is impossible to give an introduction into LaTeX in a few words, so I will simply cite important information sources below. Furthermore, I found it enerving creating the structure of complex documents as papers or books. As this structure is usually pretty similar:

1. Titlepage
3. Chapters, Sections, ...
4. Appendix
5. Literature/Citations
6. List of Figures
7. List of Tables
8. Index(es)

## 4. Software

### 4.1 LaTeX

On Unix/Linux/BSD LaTeX usually comes with the distribution and is pre-installed, or is easily installed with the package managers of the distribution; als path settings... are already prepared and LaTeX is usable immediately. Additionally powerful editors (see below) and a lot of other valuable (command line) tools are available, that make Unix based operating system the best choice for LaTeX.

For Max OS/X the MacTex distribution (external) is recommended. It contains "everything" needed to use LaTeX on a Mac and is very easy to install.

For Windows there exists MikTex (external) which is an excellent LaTeX distribution for Windows; easy to install and to use; including reference documentation.

### 4.2 Editors

LaTeX documents are "simple" text documents, hence all text editors may be used to write LaTeX. However, a powerful editor is making life much easier, some options are:

• One of the best editors available, also with great LaTeX support is TextMate.
• Emacs (external) is recommended by many LaTeX experts (particularly on Unix based operating systems), not only because it is one of the best text-editors, but also because specific "plugins" for LaTeX exist. This is an extremly powerful editor, however, it needs considerable amount of time to learn.
• Similar arguments can be given for vim (external) , which might be not as powerful as Emacs, but which needs far less resources.
• Besides vim, I personally prefer JEdit (external) , which is also a platform independent editor, and has a large amount of useful plugins; but the main advantage might be, that it is far easier to learn and to understand then most other text-editors (but probably not as powerful as, e.g., Emacs)

### 4.3 BibTex

LaTeX is particularly in the scientific context very powerful due to BibTex, which allows to manage and use scientific citations. Correct formatting of references is done automatically according to BibTex stylesheets BibTeX "databases" can be edited with any available texteditor, which is my preferred way to work. But meanwhile there exist a set of useful applications and online tools to ease the work with BibTeX. Some examples are:

• JabRef (external) : Open Source Editor at Sourceforge
• Amatex (external) is a service that creates BibTeX entries out of Amazon book searches. Very handy!
• Moreover, one should not forget, that many publishers (like ACM) offer a BibTeX download for every citation in their databases.

### 5.1 Deutschsprachige Bücher

• Kopka H. (1994, 1995), LaTeX, Addison Wesley: Dreibändiges Standardwerk zur Einführung in alle Aspekte von LaTeX. Für Einsteiger die optimale Einführung!
• Goossens M., Mittelbach F., Samarin A. (1994), Der LaTeX Begleiter, Addison Wesley: Sehr gutes Referenz und Begleitbuch für die tägliche Praxis, viele Zitate für weiterführende Literatur im Anhang, nur bedingt für Einsteiger geeignet

### 5.2 English Books

• Lamport L. (1994), LaTeX - A Document Preparation System - User´s Guide and Reference Manual, Addison Wesley: Complete new edition of the most popular LaTeX book, written by Leslie Lamport the author of La(mport)TeX - Übersetzung ins Deutsche ist in Vorbereitung
• Goossens M., Mittelbach F., Samarin A. (1994), The LaTeX Companion, Addison Wesley: Good reference and companion for daily work with LaTeX, a huge amout of secondary literature in the appendix

More than a hundred books are available about LaTeX and related topics as postscript, BibTeX, Metafonts and so on. The books cited on this page, are only a small selection to introduce into this topic.

## 6. Some (maybe) useful templates

### 6.1 Diploma Thesis

This example is an extraction of the german mathematical diploma-thesis of my sister. Though in german, the structure is nearly the same for an english thesis.

The example assumes a recent LaTeX distribution like miktex (external) for Windows.

• The PDF is generated using the pdflatex command directly, not using latex, dvips and some PS to PDF converter, which is an annoying way to produce PDF.
• The basis for this result is this latex file.
• All images are in PDF format.
• The citations are made using bibtex. Make sure to add these citations to your bibtex database file to create the PDF correctly.
• This example uses (among others): makeindex, to create the index, the hyperref package to create all references in the text (like citations, references to other sections, ...) as PDF hyperlinks and moreover this package also generates the PDF bookmarks for each chapter and section.

To create the PDF result by yourself do the following steps:

2. Unpack it.
3. Open the literatur.bib document, and copy the citations to your bibtext database file
4. Open commandline and go to the directory where you unzipped the documents
5. start "pdflatex da"
6. start "makeindex da"
7. start "bibtex da"
8. Then again (to finish all references, citations, ...) run "pdflatex da" again about two times.

The result should be this da.pdf document.

Remark: Recently I was notified, that my example contained the old epsfig package, that should not be used any longer. So this version is now updated and uses the graphicx package.

Anmerkung: Bitte dieses Template nicht für Seminararbeiten verwenden, sondern die Vorlagen im nächsten Abschnitt:

### 6.2 Artikel/Referat

The template found in artikel-template.zip can be used as starting point for german articles or "Seminararbeiten" for my lectures. It contains a two page "dummy-article" looking like this: muster-artikel.pdf. Please write your thesis/"Seminararbeit" precisely following this template!

To create the PDF result by yourself do the following steps: