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.

4

3 Answers 3

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.

5
  • 1
    I've been writing an answer of my own, but you beat me to it :-) Also somewhat of an option is \interleave from stmaryrd, with the caveat that the spacing around it is all wrong (no left and right versions) Mar 2, 2011 at 13:44
  • 1
    Sorry, @Martin. You shouldn't have started with a comment :-) Mar 2, 2011 at 13:45
  • you should it report to Daniel Kirsch. Then he can improve his script, that it finds the \llangle
    – user2478
    Mar 2, 2011 at 15:58
  • @Herbert: Done :-) Mar 2, 2011 at 16:12
  • MnSymbol conflicts with the physics package :/ How can I just get the \llangle and \rangle without having everything break?
    – Atcold
    Mar 22, 2023 at 18:56
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

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.

0

You must log in to answer this question.

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