CERN Accelerating science

This website is no longer maintained. Its content may be obsolete. Please visit for current CERN information.

next up previous
Next: Option processing Up: LaTeXeAn Overview Previous: Preamble commands

Example of document preambles

The following preamble references the article class with the (global) options twocolumn and a4paper, and loads the multicol and babel packages, the latter with the german and french options. Other document parameters (eg. the textheight) can also be specified.


The following shows three equivalent ways of specifying the loading of packages.


Somewhat less verbose is:


With german as global option you can write:


A complex document might look something like the following:

   ....           % Code for varioref package
\listfiles        % print list of files referenced
\documentclass[a4paper,german]{book} % book class
%--------------------- front matter of document
\section*{...}    % e.g. section named "Preface"
\tableofcontents  % chapter with table of contents
\listoffigures    % chapter with list of figures
\listoftables     % chapter with list of tables
%--------------------- body of the document
%--------------------- back matter of document
\chapter{...}     % chapters labelled appendix
  ...             % bibliography entries
  ...             % index entries

Note that, to ensure that the recipient of the document can process the file correctly, the code of the varioref package is shipped with the file inside a filecontents environment.

Janne Saarela
Wed May 17 14:38:58 METDST 1995