Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I generate the | (vertical bar or pipe) symbol in LaTeX? [closed]

Tags:

latex

How can I generate the vertical bar or pipe symbol | in LaTeX?

like image 705
Vladyslav Semeniuk Avatar asked Dec 10 '22 05:12

Vladyslav Semeniuk


2 Answers

According to texdoc symbols:

\mvert and \mid are identical and produce a relation. \vert is a synonym for | and both produce the same symbol, but should be used in the context of an ordinal, and should be used as an operator, not as a delimiter (p54, bottom). \divides once again produces the same symbol but should be used as a binary “divides” operator.

\lvert and \rvert are left and right delimiters, respectively.

I included all of these different options for the | symbol because I am unsure of exactly what you need to do with it. However, any of these methods work - pick the one best for whatever math you're working on. Derivatives will work different then absolute value, etc.

If you get the error: error: Undefined control sequence, try importing amsmath

like image 55
HunterBerry Avatar answered Jun 09 '23 12:06

HunterBerry


\usepackage{mathtools} 
\usepackage{amsmath} 
...

\(|\) 
like image 21
Vladyslav Semeniuk Avatar answered Jun 09 '23 12:06

Vladyslav Semeniuk