55

I know that \langle and \rangle creates left and right angle brackets. But they don't seem to adopt to the size of the expression inside. For example, if I have a big matrix, I would like to angle brackets to be big as well. How can I get this effect?

Speravir
  • 19,491
XBL
  • 551

4 Answers4

27

The mtpro2 package (MathTime Professional II) provides extra-large (up to 10 cm tall) fence symbols -- round parentheses, square brackets, curly braces, angle brackets, etc. -- via its \LEFTRIGHT command. Note that the full mtpro2 package isn't free of charge; however, its "lite" subset, which is all that's needed to produce extra-large fence symbols, is free of charge.

enter image description here

\documentclass{article}
\usepackage[lite]{mtpro2}
\begin{document}
\[
\LEFTRIGHT\langle\rangle{
\begin{array}{c} 
  1\\2\\3\\4\\5\\6\\7\\8\\9\\10
\end{array}}
\]
\end{document}

update 2020-10-01: The pctex.com site noted in my answer no longer seems provide a functioning link to the page from which the lite subset of the mtpro2 package used to be available for downloading. Many thanks to @mateuszb for bringing this issue to my attention.


Mico
  • 506,678
  • 5
    Usual comment about perennial enmity between the copy editor and the creator of such a horror. ;-) – egreg Apr 15 '13 at 09:19
  • Sadly the link on the company's page to the LITE version does not work anymore. – mateuszb Sep 30 '20 at 14:28
  • @mateuszb - Did their website maybe suffer an outage? I just checked https://pctex.com/mtpro2.html#Pricing. It still seems to be possible to click on the "FREE" link next to "MTPro2 Lite". – Mico Sep 30 '20 at 17:04
  • @Mico, the "Free" link is dead I believe. Thanks – mateuszb Oct 01 '20 at 18:01
  • 1
    @mateuszb - That's rather unfortunate. I'll edit my answer to put in a note that the website's link to the "lite" version of the font package appears to be dead. – Mico Oct 01 '20 at 18:04
23

In the standard fonts \langle has a fixed upper limit and doesn't grow above a certain size. (TeX extends characters by adding vertical extension glyphs and angle brackets don't have a vertical section that can be extended). However if you don't mind distorting the shape you can scale the bracket to fit:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document}

\[
\left\langle\begin{array}{c}1\\2\\3\\4\\5\\6\end{array}\right\rangle
\]

\[
\sbox0{$\begin{array}{c}1\\2\\3\\4\\5\\6\end{array}$}
\mathopen{\resizebox{1.2\width}{\ht0}{$\Bigg\langle$}}
\usebox{0}
\mathclose{\resizebox{1.2\width}{\ht0}{$\Bigg\rangle$}}
\]

\end{document}
David Carlisle
  • 757,742
  • The stretched angle brackets currently don't seem to be quite tall enough to "cover" the lower part of the bottom row. Is there an adjustment to achieve this coverage? – Mico Apr 15 '13 at 10:27
  • @Mico you can change \ht0 to 1.1\ht0 or whatever factor you like You can also fiddle with \raisebox{...}{\usebox{0}} to adjust the position of the box within the delimiters (the more you scale the more the difference between centering on the baseline and centering on the math axis is apparent) – David Carlisle Apr 15 '13 at 11:24
12

This is the sort of thing the scalerel package was designed for. WIth the use of the width-limited \scaleleftright or aspect-limited \stretchleftright, a desirable outcome can often be achieved. In the below example, I show both, first employing \scaleleftright with a width limit of 1.75ex, and then showing \stretchleftright with an aspect limit of 1000% (i.e. stretch of 10). Note that in all cases, the symbols being manipulated are the humble < and > symbols, not some predefined stretchable version.

Finally, in the third figure set, I show that one can use a stretched version of \langle and \rangle, instead of < and >. Depending on the tastes of the user, one may be preferable to the other.

\documentclass{article}
\usepackage{scalerel}
\begin{document}

\setlength\arraycolsep{0ex} ( \scaleleftright{<} {x} {>} % \scaleleftright[1.75ex]{<} {\begin{array}{c}x\y\z \end{array}} {>} % \scaleleftright[1.75ex]{<} {\begin{array}{c}u\v\w\x\y\z \end{array}} {>} % \scaleleftright[1.75ex]{<} {\begin{array}{c}r\s\t\u\v\w\x\y\z \end{array}} {>} )

( \stretchleftright{<} {x} {>} % \stretchleftright[1000]{<} {\begin{array}{c}x\y\z \end{array}} {>} % \stretchleftright[1000]{<} {\begin{array}{c}u\v\w\x\y\z \end{array}} {>} % \stretchleftright[1000]{<} {\begin{array}{c}r\s\t\u\v\w\x\y\z \end{array}} {>} )

( \stretchleftright{\langle} {x} {\rangle} % \stretchleftright[1000]{\langle} {\begin{array}{c}x\y\z \end{array}} {\rangle} % \stretchleftright[1000]{\langle} {\begin{array}{c}u\v\w\x\y\z \end{array}} {\rangle} % \stretchleftright[1000]{\langle} {\begin{array}{c}r\s\t\u\v\w\x\y\z \end{array}} {\rangle} )

\end{document}

enter image description here

enter image description here

enter image description here

  • I think this is the best way to do it out of all answers, but the example is quite long which is why I left it as the last thing to try! – mateuszb Sep 30 '20 at 14:45
0

The nicest solution I can think of is using the braket package.

\documentclass[class=article,border=5pt]{standalone}
\usepackage{braket}

\begin{document} $ \Braket{ \begin{array}{lcl} z & = a \ & = a \ f(x,y,z) & = x + y + z \end{array} } $

$ \Braket{ \begin{array}{lcl} z & = \frac{a}{b} \[2ex] & = \frac{a}{b} \[2ex] f(x,y,z) & = x + y + z \end{array} } $ \end{document}

to get right angle brackets which adjust to size. Unfortunately, like other solutions here the brackets do not stretch when the vertical line spacing is increased.

enter image description here

PatrickT
  • 2,923
JScheffer
  • 1
  • 1