21

I was wondering about an efficient way to generate an inner product symbol like

\[
\langle\langle u, v \rangle\rangle
\]

(i.e., double angle brackets), or a norm symbol like

\[
\lvert\lVert x \rVert\rvert
\]

(i.e., triple bars). Of course, the above examples are terrible, no respect for spaces. Is there an efficient way of doing this so that the delimiters are extensible (compatible with $\left$ and $\right$)?

I know of the package nath, but it's quite incompatible with amsmath, and generates thousands of errors, so is not an option. I've also tried with "DeclareMathDelimiterX" in mathmode, but couldn't get it to work quite as well as I'ld like.

Martin Scharrer
  • 262,582
dnemoc
  • 491

3 Answers3

18

Strangely enough, Detexify didn't help here. Another great source is The Comprehensive LaTeX Symbol List, and this has the following answers:

For your first delimiter pair, use \llangle and \rrangle from the MnSymbol package (as observed in Martin's comment above). For the second pair, you can try \vvvert from mathabx.

Saibot
  • 205
  • 2
  • 8
Hendrik Vogt
  • 37,935
13

You might want to try unicode-math with an appropriate font, since Unicode has ⟪double angles⟫ and ⦀triple bars⦀. So you can write \left⦀ or \right⟫, no need for ugly hacks and the spacing is right. And for extra sugar you can use mathtools with it, e.g.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{unicode-math}
    \setmathfont{XITS Math}
\DeclarePairedDelimiterX\innprod[2]{⟪}{⟫}{#1\delimsize|#2}

\begin{document}
$\innprod*{\frac{a}{ξ}}{b}$
\end{document}

Result of the aforementionned code

Evpok
  • 2,832
6

previous answers for \llangle and \rrangle are good.

this code for triple verts gets good results, although it's a bit of a hack:

\makeatletter
\def\@tvsp{\mathchoice{{}\mkern-4.5mu}{{}\mkern-4.5mu}{{}\mkern-2.5mu}{}}
\def\ltrivert{\left|\@tvsp\left|\@tvsp\left|}
\def\rtrivert{\right|\@tvsp\right|\@tvsp\right|}
\makeatother

using \left and \right with \interleave might also work well; never tried it, since we needed these symbols before the stmaryrd font was available.