1

I was wondering if there is already available a short reply to the best practices about using brackets in math mode. For instance, when should I use (, instead of any of the following: \left(,\left(.,\big(,\bigg(,\Big(,\Bigg(

In specific equations you may want to manually adjust the spacing and when dealing with split equations in more than one line. I have already read a couple of questions with different cases.

Is there a big picture to it?

What about when you want to define math commands and operators, for instance, the definition of the norm brackets. The size of the brackets depends on the context, but what if the context forces the splitting of the equation lines?

\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
Luca
  • 61
  • 6
  • 1
    note you should never use \bigg( etc otherwise you lose the mathopen spacing, always \biggl(....\biggr) – David Carlisle Jan 20 '22 at 16:30
  • 1
    Remember to use the \...l and \...r variangs of the big commands. Never make macros that autoscales, too many examples where it goes wrong. See the mathtools package for a better solution (see \DeclarePairedDelimiter) – daleif Jan 20 '22 at 16:31
  • 1
    see https://tex.stackexchange.com/questions/173717/is-it-ever-bad-to-use-left-and-right/173740#173740 – David Carlisle Jan 20 '22 at 16:31
  • As to which manual sizes to use when, that comes with experience. In your example, if you use \norm{ \sum_i \bm{a}_i }^2 then that just looks excessively large. – daleif Jan 20 '22 at 16:32
  • @daleif the documentation of the starred and non starred command DeclarePairedDelimiter was the kind of automated solution I was looking for. I can define the delimiters and pick the spacing depending on the context easily. Thanks a lot – Luca Jan 20 '22 at 16:41
  • @DavidCarlisle Nice read, thanks – Luca Jan 20 '22 at 16:42
  • Yes, autoscale has its places that is why the * version is there, but you will be getting better results if make sure to only use it when explicitly needing to. – daleif Jan 20 '22 at 16:44
  • Sure I will, it is nice that the autoscale is on the starred version – Luca Jan 20 '22 at 16:47

1 Answers1

4

One time you definitely need to use explicit sizes, such as \biggl(, is when you need to break a parenthesized expression across lines. When I don’t need to do this, I often find the paired delimiters in mathtools very convenient and easy to read. They’d let me write \parens[\bigg]{...} instead of \biggl( ... \biggr} or \parens*{...} instead of \left( ... \right).

Beyond that, it comes down to personal preference. DEK himself gave some examples in the TeXBook of how he felt you shouldn’t let parentheses visually overshadow the expression just so they extend past some tiny superscript or divider. Personally, I think this is an example of what not to do:

\documentclass{article}
\usepackage{unicode-math}

\setmathfont{Asana Math}

\begin{document} [ f\left(x\right) \cdot f\left(y\right) ] \end{document}

Asana Math sample

And here is one where I would explicitly change the size:

\documentclass{article}

\begin{document} [ g\bigl( f(x) \cdot f(y) \bigr) ] \end{document}

Computer Modern sample

Davislor
  • 44,045