Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to insert pipe symbol in TeX?

Tags:

latex

tex

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

like image 448
avsej Avatar asked Aug 15 '10 15:08

avsej


People also ask

How do you type a pipe symbol?

The pipe character is not hidden on a keyboard. It is located right above the Enter key. Another way to type the vertical bar character is to turn on the numeric keypad, hold ALT , then press 1, 2, and 4.

How do you insert a pipe symbol in Excel?

Change the List separator to a pipe character. The pipe character is found above the ENTER key on the keyboard (SHIFT + \). Click OK.

How do I insert a symbol in TeX?

You may be wondering how to insert symbols in LaTeX. It is possible to add certain symbols in-text while others require LaTeX's math mode to be activated. ”, you can use the command \star in your code.

How do I type a symbol in LaTeX?

You simply type \LaTeX . One problem with this is that if you type it a lot of times in your text you will need to type \LaTeX\␣ ¹ (i.e., followed by \ and an actual space) to force a space after it. \xspace is from the xspace package. Additionaly, writing \LaTeX{} adds the space after.


2 Answers

In math mode:

\| is a double pipe: ||

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

like image 92
trope Avatar answered Nov 21 '22 20:11

trope


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.

like image 20
Stefan Avatar answered Nov 21 '22 20:11

Stefan