# How to make a slanted vertical bar?

I'm stumped on this. I would like to make a slanted (and italic) vertical bar in the middle of some regular text.

If I use $|$, it comes out literally vertical regardless of style, since it's a math operator.

For reasons I don't understand, | is accepted by TeX but comes out as an em-dash rather than a vertical bar.

Using \char124 works fine for the typewriter font, but I need this for Computer Modern Roman Slant & Italic.

I only need this so that I can see the exact slope of slanted and italic text visually; it's temporary for lining some things up. I can get by for now with [ and ]—which do display correctly in slanted and italic shapes—but now I've become very curious about how to make the vertical bar work, because I don't like it when I don't understand things. :)

• Use T1 font encoding to get the vertical bar in text mode: \usepackage[T1]{fontenc}. – Stefan Kottwitz Feb 2 '12 at 18:36
• \usepackage[T1]{fontenc} allows you to use | in normal text, and \textit{|} allows you to see the slanted version. However if you are visually lining things up, you should think again. There are better way to do that. – Peter Grill Feb 2 '12 at 18:36

\documentclass{article}