How can I generate the vertical bar or pipe symbol |
in LaTeX?
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
\usepackage{mathtools}
\usepackage{amsmath}
...
\(|\)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With