# Vertical lines

• January 20th 2011, 12:46 PM
wonderboy1953
Vertical lines
I already know how to do horizontal lines. It seems like the keyboard is supposed to have a symbol for vertical lines which I don't see. Any suggestions?
• January 20th 2011, 12:51 PM
Ackbeet
Usually it's the key right above the Enter key. Hold down shift + that key. You should get "|" as a result.
• January 20th 2011, 12:57 PM
wonderboy1953
Nice. The key shows it as a broken line (darn library), but it works.
• January 24th 2011, 03:07 PM
emakarov
Since this is a LaTeX forum, I thought I'd share this. I read recently that there are three ways to type a vertical bar in LaTeX: | (synonym: \vert), \lvert and \rvert, and \mid. The first produces an ordinary math symbol like letters and digits (class \mathord); the second makes opening and closing delimiters (\mathopen and \mathclose), and the third produces a binary relation (\mathrel). Each class is inserts its own spaces. For example, there is a thin space \, between an ordinary symbol and an operator, but no space between an opening delimiter and an operator: compare $|\sin x|$ and $\lvert\sin x\rvert$. The relation \mid is good for set notation $\{x\in\mathbb{N}\mid x<5\}$ and to denote divisibility.
• January 24th 2011, 03:36 PM
Plato
Here are more ways to do this.

$$\left|\sin(x)\right|$$ gives $\left| \sin(x)\right|$

$$\left\|\sin(x)\right\|$$ gives $\left\| \sin(x)\right\|$