# Vertical line in LaTeX [duplicate]

How can I get this vertical line in LaTeX:

|

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

• 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

With a suitable font encoding, you can simply type |
\documentclass{article}