welcome: please sign in

Revision 3 as of 2022-04-26 10:27:00

Clear message
location: Computer / Latex / Recommended

Recommended LaTeX packages

This section describes packages that are recommended as extra packages in a thesis at the department. In all cases, check the original documentation using the command

in a terminal window.

\usepackage{cleveref}

Using standard cross-referencing in LaTeX only produces the label number, a name describing the label such as figure, chapter or equation has to be added manually. The cleveref package overcomes this limitation by automatically producing the label name and number. The reference commands should be \cref in most cases, and \Cref for beginning-of-sentence references. Recommended options:

Customizing the cross refence types
The cross-reference name for a given cross-reference type is customised using the \crefname and \Crefname commands:

In most cases you don't need this, because the names are already reasonable, but there is one change that is recommended. The package author has chosen equation references to look like 'Equation (3.2)', but the common convention in our field is just '(3.2)'. You should therefore include the statement

in the preamble. Note that you should not change \Crefname, because beginning-of-sentence references should be the default full form 'Equation 3.2'.

{cleveref} should always be the last package included, even after {hyperref} (see below).

\usepackage{hyperref}

This package turns most cross references in the document automatically into clickable links. The default look of these links is unfortunately quite ugly, being a red frame around the link text. This can be changed either with package options, or with the command \hypersetup. The recommended option group is therefore

  \hypersetup{%
     colorlinks,
     allcolors={blue!40!black},
  %  allcolors={black},   % Uncomment for the printed version
  }

You may of course choose other colors for the links, but this color specification requires the package {xcolor} to have been loaded before. This package should be the last one included, except for {cleveref} as indicated above.