Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
3  
did you have a look at \bigl\langle or \Biggl\langle and \bigr\rangle or \Biggr\rangle? –  pluton Sep 7 '11 at 8:55
    
@pluton: Do they have anything available that is sort of in the middle of these two sizes. Also, when using \bigl\langle in the define command in the preamble, it does not do the auto sizing for display math fractions. But Biggl\langle...\Biggr\rangle works just fine for display fractions, but it looks really big for something simple like. <1,2,3> –  night owl Sep 7 '11 at 9:24
    
There is a related question: Vertical vectors in angle brackets –  mas Sep 7 '11 at 9:59
    
see \bigl, \Bigl, \biggl and \Biggl; \bigr, \Bigr, \biggr and \Biggr; these are constant. They will not self adapt to the content. –  pluton Sep 7 '11 at 13:21

2 Answers 2

up vote 5 down vote accepted

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 snippet

    $\left( (a+b) \cdot (c+d) \right)$
    

    the 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

    $\bigl( (a+b) \cdot (c+d) \bigr)$
    

    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

    $\displaystyle C \biggl( \sum_{i=1}^n b_i \biggr)$
    

    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 the mleftright 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!

share|improve this answer
    
Mico: Thanks Mico, that was some very useful information you gave. I learned something. I like it when I can actually get some background information about a problem to learn more about it along with a solution going about how to overcome it. +1.. Happy TeXing to you as well! :) –  night owl Sep 11 '11 at 2:11

For example:

\documentclass[11pt,a5paper]{article}

\usepackage{amsmath}

\def\P{\mathbf{P}}
\def\Q{\mathbf{Q}}
\def\la{\left\langle\rule{0pt}{3em}}
\def\ra{\right\rangle}

\begin{document}

\begin{align*} 
\P-\Q \;&=\; \la (1-(-2)), (2-1), (-1-3) \ra \\
\;&=\; \la 3, 1, -4 \ra. \\
\end{align*}

\end{document}

enter image description here

share|improve this answer
    
@Herbet: Thanks. So to understand. Doing \rule{0pt}{3em} for the \left\langle does automatically the same for the \right\rangle? And could you explain why is that? –  night owl Sep 7 '11 at 9:33
1  
@night owl: the \left...\right construction automatically resizes the delimiters to fit whatever's inside, so you only need one \rule to make both delimiters the right size. –  Ant Sep 7 '11 at 13:31
    
@night owl: every contents inside math is vertically centered and the largest box inside the math expression is valid for the left and right angles –  Herbert Sep 7 '11 at 15:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.