11

I wanted to produce the following formula:

a vertical vector in angle brackets

which is nothing but a vertical vector in angle brackets. I expected the following code to do the job:

\left\langle
    \begin{matrix}
      a  \\
      b  \\
      c  \\
      d  \\
    \end{matrix}
\right\rangle

However, the result is:

result

It seems that, contrary to brackets and parentheses, the angle brackets do not extend beyond some certain limit.

Is there a workaround?

3 Answers 3

4

I have added this as a second solution, based on @mico's comment to my earlier solution. It uses a non-free but no-cost font, MTPro2 Lite from PCTeX.

The use of the font to produce large delimiters needs a different syntax as well as loading the font (if a regular user of MTPro2 knows better, please let us know). Unlike \yhmath these delimiters can scale to very large matrices (up to 4 inches high, according to the documentation). The syntax is described in detail in section 2.12 of the MTPro2 LaTeX Guide. For example:

\documentclass{article}
\usepackage{amsmath}
\usepackage[lite]{mtpro2}
\begin{document}
$\LEFTRIGHT\langle\rangle{
   \begin{matrix}
      a  \\
      b  \\
      c  \\
      d  \\
      e  \\
      f  \\
      g  \\
      h  \\
    \end{matrix}}$
$\LEFTRIGHT\langle\rangle{
   \begin{matrix}
      a  \\
      b  \\
      c  \\
      d  \\
    \end{matrix}}$
\end{document}

Output from the above code:

5

Here's a TikZ solution. Not sure I'd recommend it, and it would probably need a little tweaking with regard to spacing as well.

\documentclass{standalone}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{environ}

\NewEnviron{angmatrix}{%
  \tikz[baseline=0pt]
    \draw[line width=1pt] 
     node[append after command={
      (\tikzlastnode.north west) -- ($(\tikzlastnode.west)+.2*(\tikzlastnode.west)!1!90:(\tikzlastnode.north west)$) -- (\tikzlastnode.south west)
      (\tikzlastnode.north east) -- ($(\tikzlastnode.east)+.2*(\tikzlastnode.east)!1!270:(\tikzlastnode.north east)$) -- (\tikzlastnode.south east)
      }] {\(\begin{matrix} \BODY \end{matrix}\)};}%
{}


\begin{document}
\[
A = 
\begin{angmatrix}
  a \\ b \\ c \\ d \\ e \\ f \\ g
\end{angmatrix}, B = 
\begin{angmatrix}
  a \\ b \\ c
\end{angmatrix}, C = 
\begin{angmatrix}
  a
\end{angmatrix}
\]
\end{document}

Result:

angular bracketted matrices

3
  • Oddly enough, I get this error: Package pgfkeys Error: I do not know the key '/tikz/append after command' and I am going to ignore it. Perhaps you misspelled it. Aug 25, 2011 at 12:59
  • @Sadeq: Which version of PGF are you using? I'm on 2.10 so it might be something added in a version between the one you're using and 2.10. (It's well worth upgrading if you do use TikZ/PGF.) Aug 25, 2011 at 13:13
  • Thanks. Mine was 2.0, and upgrading to 2.10 solved the issue. Aug 25, 2011 at 13:48
4

Adding \usepackage{yhmath} sorts this for me (see texdoc yhmath for details)

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

$
\left\langle
    \begin{matrix}
      a  \\
      b  \\
      c  \\
      d  \\
    \end{matrix}
\right\rangle
$

\end{document}

4
  • 1
    If your typesetting needs require the use of Times Roman fonts, you may also want to look at the MathTime Pro font package (pctex.com/mtpro2.html), which has a full set of beautifully designed extra-large operators (up to 4 inches, or 10 cm, high).
    – Mico
    Aug 25, 2011 at 11:19
  • 3
    Running my example with yhmath then I reach the limit with about 5 characters stacked. Aug 25, 2011 at 11:26
  • 1
    @Andrew, indeed. In effect, for this usage, \usepackage{yhmath} is doing no more than \DeclareSymbolFont{largesymbols}{OMX}{yhex}{m}{n} (line 3 of the code in section 7 of the documentation). It solves the OP's problem, as stated, but is not a general solution, unlike yours.
    – mas
    Aug 25, 2011 at 13:12
  • 1
    I'm all for solving the problem as stated! My code is probably overkill, and fonts probably look nice than raw lines. (I tend to give hacky-type answers on the off-chance that there isn't a "neat" one.) Aug 25, 2011 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .