# Vertical line in LaTeX [duplicate]

This question already has an answer here:

How can I get this vertical line in LaTeX:

|

I dont see a command for it, and if I type | it becomes horizontal.

## marked as duplicate by Troy, CarLaTeX, Mico, TeXnician, JesseAug 28 '17 at 12:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• Welcome to TeX SX! Could you post a small example showing what happens? – Bernard Aug 28 '17 at 9:48
• Do you need this in text mode? If so, please add the information. – egreg Aug 28 '17 at 10:44

## 1 Answer

With a suitable font encoding, you can simply type |

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
|
\end{document}