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 tried the \llangle and \rrangle from the MnSymbol package, which is OK. But the package also changed other things which I do not want. Please help.

share|improve this question
add comment

2 Answers

The following solution extract the code for \llangle and \rrangle from package MnSymbol. To avoid name clashes largeoperators is renamed to MnLargeOperators. 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

share|improve this answer
add comment

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 by0.5times its width and then printing the box again (this last time via\useboxto also discard its contents). You might want to adjust the factor0.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...

share|improve this answer
add comment

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.