[Tex/LaTex] How to get double angle bracket without using MnSymbol package

math-modesymbols

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.

Best Answer

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