How to insert pipe symbol |
in TeX (LaTeX)?
The pipe symbol may be used directly in the input and will produce the desired output if you use T1 font encoding. For example:
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Pipe sign: |
\end{document}
See Special LaTeX characters for such an example with its output and more information.
Update: since the question has been posted to tex.stackexchange.com as well, this answer has been copied there.