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 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.

share|improve this question
4  
You can try \llangle and \rrangle from the mnsymbol package for the first one. –  Martin Tapankov Mar 2 '11 at 13:33
1  
@MartinTapankov, just a remark: for me, the package is MnSymbol. –  Sigur Aug 16 '12 at 14:34
add comment

3 Answers

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.

share|improve this answer
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) –  Martin Tapankov Mar 2 '11 at 13:44
1  
Sorry, @Martin. You shouldn't have started with a comment :-) –  Hendrik Vogt Mar 2 '11 at 13:45
    
you should it report to Daniel Kirsch. Then he can improve his script, that it finds the \llangle –  Herbert Mar 2 '11 at 15:58
    
@Herbert: Done :-) –  Hendrik Vogt Mar 2 '11 at 16:12
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
    
Thanks a lot for all your replies. –  dnemoc Mar 4 '11 at 16:06
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.