Skip to content

LaTeX

Misc

Sans-serif font everywhere

Add the following command to the preamble (i.e., before \begin{document}).

\renewcommand{\familydefault}{\sfdefault}

Inline figure matching the text height

Tell TeX that the figure should be as high as a "B":

\includegraphics[height=\fontcharht\font`\B]{picture.png}

Coloring with xcolor

Package xcolor can provide a multitude of different predefined color sets, namely:

Base colors

Loads 19 colors (always available).

Base colors provided by xcolor.

dvipsnames

Loads 68 named colors.

Base colors provided by xcolor when loading with option dvipsnames.

\usepackage[dvipsnames]{xcolor}

svgnames

Loads 151 named colors.

Base colors provided by xcolor when loading with option svgnames (part 1). Base colors provided by xcolor when loading with option svgnames (part 2).

\usepackage[svgnames]{xcolor}

x11names

Base colors provided by xcolor when loading with option x11names (part 1). Base colors provided by xcolor when loading with option x11names (part 2).

\usepackage[x11names]{xcolor}

Proper quotation marks

``text''

Yields correct english opening and closing quotation marks.

Context sensitivity and international quotation

With the csquotes package context sensitivity and foreign quotes are possible using the following command (plus configuration).

\usepackage{csquotes}
...
\enquote{text}

Math

Gaussian brackets

Package mathtools enables declaring "paired delimiters" as follows.

\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
...
\ceil{x}
\floor{y}

When different sizes are required, they can be explicitly specified:

\ceil[\Bigg]{x}
\floor[\big]{y}

Increase size of math symbols

\big, \Big, \bigg and \Bigg are available.

Bold math symbols in headings

Using $\boldsymbol{\alpha}$ yields a bold version of $\alpha$.

Dots

  • \cdots: $$\cdots$$
  • \vdots: $$\vdots$$
  • \ddots: $$\ddots$$