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.

\usepackage{todonotes}

This package makes it possible to add notes to your document, and all these notes may be made invisible with one option to the package, whithout having to access individual notes.

\usepackage{siunitx}

The siunitx package provides a powerful toolkit for typesetting numbers and units in LaTeX. By incorporating detail about the agreed rules for presenting scientific data, siunitx enables authors to concentrate on the meaning of their input and leave the package to deal with the formatting. The package also contains some code that simplifies the construction of columns in {tabular} environments.

\usepackage{mathtools}

The mathtools package is an extension package to amsmath. It contains useful tools for mathematical typesetting, be it a small macro for typesetting a prescript or an underbracket, or entirely new display math constructs such as a multlined environment. There are also some bugfixes. It is used for example in Formatting optimization problems. Recommended.

\usepackage{booktabs}

The package {booktabs} enables tables of considerably better typographical quality than the default ones. There's also a good description of tables from a typographical viewpoint. Note that this package is included by default in the class {LTHthesis}.

\usepackage{tikz} and \usepackage{pgfplots}

One way to draw graphics directly with TeX commands is PGF/TikZ. TikZ can produce portable graphics in both PDF and PostScript formats using either plain (pdf)TEX, (pdf)Latex or ConTEXt. It comes with very good documentation and an extensive collection of examples: http://www.texample.net/tikz/. See also Block diagrams in TikZ format

pgfplots draws high-quality function plots in normal or logarithmic scaling with a user-friendly interface directly in TEX. The user supplies axis labels, legend en- tries and the plot coordinates for one or more plots and pgfplots applies axis scal- ing, computes any logarithms and axis ticks and draws the plots. It supports line plots, scatter plots, piecewise constant plots, bar plots, area plots, mesh and surface plots, patch plots, contour plots, quiver plots, histogram plots, box plots, polar axes, ternary diagrams, smith charts and some more. It is based on Till Tantau’s package pgf/TikZ. See also How to make nice looking plots with TikZ/pgfplots.

\usepackage{tcolorbox}

This package provides an environment for colored and framed text boxes with a heading line. Optionally, such a box can be split in an upper and a lower part. Another common use case is the setting of theorems. The package supports saving and reuse of source code and text parts. Here is an example of framed and backgrounded paragraphs.

Computer/Latex/Recommended (last edited 2022-06-01 12:49:09 by leif)