José A. CañizoResearch · Publications · Teaching · Other

# Some LaTeX constructs and symbols I had to look up

A collection of LaTeX things that required some searching, so they’re gathered here mostly for my own reference:

## Multiline subscripts

For example, under a summation symbol:

\sum_{\substack{{y= 1}\\{y \neq 2}}}^{10}

looks like $\displaystyle\sum_{\substack{{y=1}\\{y \neq 2}}}^{10}$.

The \substack command is part of the amsmath package.

## Double-struck numbers

I like to use a 𝟙A (with a number one in blackboard bold) to denote the characteristic function of a set A. One can get that in LaTeX with the bbm package:

\usepackage{bbm}
\def\1{\mathbbm{1}}


and then \1 gives the symbol 𝟙A in a serif font. There is another package called bbold which contains \mathbb{1} in a sans-serif font, but it also changes all other blackboard bold letters to a sans-serif font.

## Using accents and special characters in text

Instead of the special notation \"{o}, \'{a} and such for special characters, one can tell LaTeX that our file contains ö, à and others directly by having

\usepackage[utf8]{inputenc}


in the preamble. The file should then be saved using UTF-8 encoding. Many editors do this by default, but otherwise you can always specify the coding system explicitly (for example, by writing latin1 instead of utf8).