28

I tried the \llangle and \rrangle from the MnSymbol package, which is OK. But the package also changed other things which I do not want.

3

3 Answers 3

26

The following solution extract the code for \llangle and \rrangle from package MnSymbol. To avoid name clashes largesymbols is renamed to MnLargeSymbols. Using the font of MnSymbol, \left and \right are working with \llangle and \rrangle, because \left and \right are based on font level features.

\documentclass{article}

\makeatletter
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareSymbolFont{MnLargeSymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{MnLargeSymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
    <-6>  MnSymbolE5
   <6-7>  MnSymbolE6
   <7-8>  MnSymbolE7
   <8-9>  MnSymbolE8
   <9-10> MnSymbolE9
  <10-12> MnSymbolE10
  <12->   MnSymbolE12
}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
    <-6>  MnSymbolE-Bold5
   <6-7>  MnSymbolE-Bold6
   <7-8>  MnSymbolE-Bold7
   <8-9>  MnSymbolE-Bold8
   <9-10> MnSymbolE-Bold9
  <10-12> MnSymbolE-Bold10
  <12->   MnSymbolE-Bold12
}{}

\let\llangle\@undefined
\let\rrangle\@undefined
\DeclareMathDelimiter{\llangle}{\mathopen}%
                     {MnLargeSymbols}{'164}{MnLargeSymbols}{'164}
\DeclareMathDelimiter{\rrangle}{\mathclose}%
                     {MnLargeSymbols}{'171}{MnLargeSymbols}{'171}
\makeatother

\begin{document}
\[ \llangle x,y\rrangle \]
\[ \left\llangle \int_{0}^{\infty} \frac{\mathrm{d}x}{2} \right\rrangle \]
\end{document}

Result

1
  • @MvG It's just a typo, instead of "operators" "symbols" is meant, see updated answer. Feb 20, 2015 at 11:07
16

You can build a suitable symbol by taking two ordinary brackets and placing them suitably close together. I guess your main problem is building symbols that can be used at larger sizes. Here is a partial solution:

\documentclass{article}

\makeatletter
\newsavebox{\@brx}
\newcommand{\llangle}[1][]{\savebox{\@brx}{\(\m@th{#1\langle}\)}%
  \mathopen{\copy\@brx\kern-0.5\wd\@brx\usebox{\@brx}}}
\newcommand{\rrangle}[1][]{\savebox{\@brx}{\(\m@th{#1\rangle}\)}%
  \mathclose{\copy\@brx\kern-0.5\wd\@brx\usebox{\@brx}}}
\makeatother

\begin{document}

\( \llangle x \rrangle \)

\begin{displaymath}
  \llangle[\Bigg]{\int_X \nu^2}\rrangle[\Bigg]
\end{displaymath}
\end{document}

Sample output

As the symbol built is not a genuine math delimiter to LaTeX you can not use the \left/\right commands or \big etc. in the usual way. So I have instead built commands that taking the size operators \big, \Big, \bigg,... as an argument.

It works by making a box with one copy of the delimiter (the \m@th command ensures that any math surround is cancelled in that process), printing a copy of that box (via \copy), backuping by 0.5 times its width and then printing the box again (this last time via \usebox to also discard its contents). You might want to adjust the factor 0.5.

An alternative choice of spacing is to have a fixed space adjusted by a small amount of the width of the delimiter as in:

\documentclass{article}

\makeatletter
\newsavebox{\@brx}
\newcommand{\llangle}[1][]{\savebox{\@brx}{\(\m@th{#1\langle}\)}%
  \mathopen{\copy\@brx\mkern2mu\kern-0.9\wd\@brx\usebox{\@brx}}}
\newcommand{\rrangle}[1][]{\savebox{\@brx}{\(\m@th{#1\rangle}\)}%
  \mathclose{\copy\@brx\mkern2mu\kern-0.9\wd\@brx\usebox{\@brx}}}
\makeatother

\begin{document}

\( \llangle x \rrangle^{\llangle y \rrangle} \)

\begin{displaymath}
  \llangle[\Bigg] \llangle[\bigg] \llangle[\Big] \llangle[\big] A
  \rrangle[\big] \rrangle[\Big] \rrangle[\bigg] \rrangle[\Bigg]
\end{displaymath}
\end{document}

Sample output

The idea of putting the size \big etc. in as argument is much like mathtools package's treatment of paired delimiters. It might be that code could be adapted to build commands that would also respect \left/\right...

0
2

I was unsatisfied with the MmSymbol answer as the glyph differs from the single \rangle and \langle, so that's not great for consistency and I need both a lot.

So anyway, here is a version based on @andrew-swann's answer, but with automatic scaling. Unfortunately, I was not able to create a version of \llangle or \rrangle by themselves, so it's limited to a paired delimiter.

\documentclass{article}
\usepackage{mathtools}

\makeatletter
\newsavebox{\@bra}
\newsavebox{\@brb}
\DeclarePairedDelimiterX\myinnerp[1]{.}{.}{%
  \delimsize\langle%
  \hspace*{0.3mm}\hspace*{0.55mm}\savebox{\@bra}{\(\displaystyle\left\langle\vphantom{#1}\right.\)}\hspace*{-1.035\wd\@bra}%
  \delimsize\langle%
  #1% 
  \delimsize\rangle%
  \hspace*{0.3mm}\hspace*{0.55mm}\savebox{\@brb}{\(\displaystyle\left.\vphantom{#1}\right\rangle\)}\hspace*{-1.035\wd\@brb}%
  \delimsize\rangle
}
\makeatother


\begin{document}
\[
  \myinnerp*{\dfrac{A}{B}} \myinnerp*{\dfrac{a}{b}} \myinnerp*{A^2} \myinnerp*{a}
\]
\end{document}

Result

Again, the spacing is adjustable. The values -1.035 and 0.55mm seem to empirically correspond to superimposing the two brackets (don't ask me why), so this is a version with a constant 0.3mm distance.

You must log in to answer this question.

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