how to insert pipe symbol in TeX?
Asked Answered
N

6

22

How to insert pipe symbol | in TeX (LaTeX)?

Nell answered 15/8, 2010 at 15:19 Comment(2)
Try asking at tex.stackexchange.comDincolo
Thanks, at tex.stackexchange.com I've got right answer tex.stackexchange.com/questions/1774/…Nell
M
16

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.

Modla answered 15/8, 2010 at 15:48 Comment(0)
J
20

In math mode:

\| is a double pipe: ||

\text{\textbar} is a single pipe: | (requires the amsmath package)

Johniejohnna answered 4/6, 2012 at 21:30 Comment(1)
Output is: ! Undefined control sequence. <argument> ... \text {\textbar }Develop
M
16

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.

Modla answered 15/8, 2010 at 15:48 Comment(0)
B
4

http://www.math.toronto.edu/mathit/symbols-letter.pdf

\textpipe or use something like \big| when in math mode.

Bertberta answered 15/8, 2010 at 15:25 Comment(0)
A
3

write: \textpipe

Here you have the handbook of latex symbols: The Comprehensive LATEX Symbol List

Achelous answered 15/8, 2010 at 15:22 Comment(2)
simple document fails with error Undefined control sequence. l.3 \textpipeNell
\textpipe requires loading a package, for instance tipa or t4phonet.Modla
C
3

Using \textbar will give the pipe symbol.

Collaboration answered 31/8, 2021 at 20:15 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker.Appreciable
K
-3

use $|$ and it the document compiles successfully & it is the best way to type pipe symbol in TeX or Latex.

Kevin answered 11/11, 2021 at 8:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.