In the series Typesetting TeXniques, we share our expertise as professional copyeditors and typesetters of mathematics. We frequently hear from authors that our work makes their papers better. This is how we do it.
The naive way of coding norms in TeX (simply two adjacent vertical bars)
||\sum_{i=-n}^{n}ix_i||=0
yields bad results, as seen here:
$$ ||\sum_{i=-n}^{n}ix_i||=0 $$
The vertical bars are too far apart and far too short. More subtly, there is uncalled-for horizontal space after the left two vertical bars.
We can easily address these issues with better coding. The code
\biggl\|\sum_{i=-n}^{n}ix_i\biggr\|=0
gives us a significant improvement:
$$ \biggl\|\sum_{i=-n}^{n}ix_i\biggr\|=0 $$
In the video, we show how MSP staff efficiently—and in a manner that is easily reversible—make such changes to the code so that expressions with norms are typeset well.
Watch the video #
Further reading #
The TeXbook by D. E. Knuth: On pages 146–147 of Chapter 17, there is a list of basic delimiters, followed by instructions for obtaining larger sizes (\big, \Big, \bigg, \Bigg).