General ⇒ Help adding a vertical line '|'
Help adding a vertical line '|'
I'm trying to add a vertical line to my file in TeXnicCenter, but when I build the file it gets interpreted as a long dash. Does anyone know a way around this? Is there an escape character I could use?
Thanks,
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Help adding a vertical line '|'
Re: Help adding a vertical line '|'
If a|b and a|c ...
But, in place of |, I'm getting a long dash. I just tried \rule, but it doesn't display anything. Am I doing something wrong?
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Help adding a vertical line '|'
Code: Select all
If $a|b$ and $a|c$ ...Help adding a vertical line '|'
\textbar or $\vert$. (The latter is a little thicker.)-
edmundocayo
- Posts: 1
- Joined: Tue Feb 19, 2013 7:55 pm
Help adding a vertical line '|'
Thank you frabjous, I was having the same issue, thanks to you I've solved it!frabjous wrote:You might also use either \textbar or $\vert$. (The latter is a little thicker.)
- Stefan Kottwitz
- Site Admin
- Posts: 10397
- Joined: Mon Mar 10, 2008 9:44 pm
Help adding a vertical line '|'
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
Vertical line: |
\end{document}