I was wanting to know of a useful way to create large \left\langle
and \right\rangle
commands. I have tried all up-sizing commands but get a message that they cannot be used in math mode. Such as:
\large
\Large
\LARGE
\huge
Also I have tried, \left\left\langle...\right\right\rangle
to no working either.
MWE:
\documentclass[11pt,a5paper]{article}
\usepackage{amsmath}
\def\P{\mathbf{P}}
\def\Q{\mathbf{Q}}
\def\la{\left\langle}
\def\ra{\right\rangle}
\begin{document}
\begin{align*}
\P-\Q \;&=\; \large\la (1-(-2)), (2-1), (-1-3) \large\ra \
\;&=\; \la 3, 1, -4 \ra. \
\\
|\P-\Q| \;&=\; \sqrt{x^2+y^2+z^2} \\
\;&=\; \sqrt{(3)^2 + (1)^2 + (-4)^2} \\
\;&=\; \sqrt{9+1+16} \\
\;&=\; \sqrt{26}
\end{align*}
\end{document}
Best Answer
As you've discovered, the fontsize-changing commands
\large
,\Large
,\huge
, and\Huge
work only in text mode. Different commands are required for math mode.In math mode, the easiest way to change the height/depth of "fences" -- such as round parentheses, square brackets, curly braces, angle brackets, and many other such delimiters -- is to prefix them with
\left
and\right
commands, respectively. The height of the fences will be set automatically: the fences will be at least as tall as the math material they enclose. A side benefit of using the\left ...
\rightmethod is that it provides some useful syntax checking: LaTeX will issue an error message if it cannot match every
\leftstatement to a
\right` statement, and vice versa.If you want direct control over the size of the fences, you can prefix the fence symbols -- in order of increasing size -- with
\big
,\Big
,\bigg
, and\Bigg
. If you use these statements in pairs, such as\biggl[
and\biggr]
, LaTeX will perform some syntax checking for you.The downside of having such direct control over the size of the fences is that you need to know -- either in advance, or by trial and error -- which size to choose.
One upside to having direct control over the size of the fences is that -- as you've also discovered -- the
\left ... \right
mechanism does not always get the job done. E.g., in the snippetthe outer parentheses will have the exact same size as the inner ones, which is probably not what you're trying to achieve. In such a case, you need to type
in order to enlarge the outer set of parentheses a bit.
A second instance where having direct control over the size of the fences is desirable is the case
because the size of the parentheses generated by the
\left ... \right
method would be too large, typographically speaking.A third reason for not using the
\left ... \right
method is that it adds some potentially unwanted whitespace around the fences. One way to avoid this problem is to load the mleftright package and to use the commands\mleft
and\mright
instead of\left
and\right
. (If you're sure you'll always want to suppress the extra amount of whitespace generated by the\left
and\right
commands, you could load themleftright
package and issue the instruction\mleftright
in the preamble; doing so will redefine\left
and\right
to act like\mleft
and\mright
, respectively.)For more information on the whitespace issues created by
\left
and\right
and how to deal with them, you may want to check out the question Spacing around \left and \right.That said, most of the time you'll be just fine if you use the
\left ... \right
method. Happy TeXing!