Sign up ×
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'm currently writing my bachelors thesis about on-line handwriting recognition of mathematical formulae (see I'm currently only recognizing symbols with the same technique as detexify uses (I know that it's the same technique, because I read the diploma thesis of detexify).

One thing that I always thought could be better in detexify is "similarity groups". So some symbols seem to be rendered the same and only have semantic difference or a difference when you have context (that means other symbols). One example is \Sigma and \sum. I think those symbols should be treated the same when it comes to pure symbol recognition. Only when you have context, you can distinguish them.

After drawing tons of symbols and looking at their classification, I've just found those four

  • \| (math mode)
  • \textdoublepipe (text mode)
  • \textdoublevertline (text mode)
  • \parallel (and, obviously different but not that much: \shortparallel)

Is there any difference between \| and \parallel in terms of context-dependant rendering?

Is there any difference between \textdoublepipe and \textdoublevertline in terms of context dependant rendering or semantics?

share|improve this question
\| is used for matching left and right delimiters; \parallel is always between two other symbols. in computer modern fonts, they are actually the same glyph. it's the class that's different, and thus the spacing. (this is a comment, not an answer, since i'm in a location where i can't easily check the specifics.) – barbara beeton May 15 '14 at 22:01

1 Answer 1

up vote 8 down vote accepted

The commands \| and \parallel print the same symbol; here are their definitions in fontmath.ltx:



The meaning of the first definition is that \Vert (of which \| is an alias) prints the glyph in slot "6B of the font in mathgroup symbols when requested at normal size and, when not used in the context of delimiters (after \left, \right, \bigl, \bigr and friends) it behaves as an ordinary symbol.

The definition of \parallel tells TeX to use the very same glyph, but treating it as a relation symbol. So

$\|\alpha v\|=\alpha\|v\|$

will result in

‖𝛼vβ€– = 𝛼‖vβ€–



will produce

𝛼 β€– 𝛽

where $\alpha\|\beta$ would produce


with no spaces around the double bar. In Unicode, \Vert is U+2016 DOUBLE VERTICAL LINE, while \parallel is U+2225 PARALLEL TO.

The command \textdoublepipe is found in tipa and produces the symbol ǁ (Unicode U+01C1 LATIN LETTER LATERAL CLICK) which is glyph 123 in a T3 encoded font. Also \textdoublevertline is defined by tipa and refers to glyph 147 in a T3 encoded font

The manual of tipa refers to the former as alveolar lateral click and to the latter as major (intonation) group; according to, this is the same U+2016 as before.

So, even if the four glyphs are similar, their meaning is different and should be used in the proper context.

share|improve this answer

Your Answer


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.