Help with Vertical Lines in LaTeX

In summary, LaTeX provides several options for creating vertical lines in a document. These include the \vline command, which creates a vertical line at a specific point on the page, and the \rule command, which can be used to create a thicker and more customizable vertical line. Additionally, packages such as tabularx and tabu offer built-in options for creating vertical lines in tables. It is important to note that the use of vertical lines in LaTeX is not recommended, as it can disrupt the visual flow of the document and is not considered good typography. Instead, alternative methods such as using horizontal rules or adjusting the layout of the document should be considered.
  • #1
VoidSeraph
2
0
Does anyone know a way to get half-vertical lines? I mean, I'd like something identical to /vline , but which starts from the top of the row and only goes halfway down. Similarly, I'd like a line which starts from the bottom and only goes halfway up.

Even better would be something like a corner but where the corner has it's horizontal bit in the middle of the line, and where the vertical portion lines up with \vline in the tabular environment.

(Basically, I'm trying to make a long bracket-thingy. I'm typesetting some logic proofs and these long brackets are sometimes used for setting-off subproofs. \vline is perfect for making a long line which spans multiple rows. But I can't quite get the top and bottom to look right.)
Thanks for any help!
 
Physics news on Phys.org
  • #2
Welcome to PF!

Hi VoidSeraph! Welcome to PF! :smile:
VoidSeraph said:
Even better would be something like a corner but where the corner has it's horizontal bit in the middle of the line, and where the vertical portion lines up with \vline in the tabular environment.

According to http://www.combinatorics.net/weblib/A.9-10/a9.html it's "\ulcorner" etc for the corners … but apparently you need the asmath package. :redface:
 
  • #4
  • #5
Hey, thanks for the quick replies.
Those are great suggestions. The "\**corner" family of commands is pretty close to what I want, but at the wrong height. Their angles are at the tops or bottoms of lines, when I really need them to be in the middle, unfortunately.
\rule looks like it's going to get me what I want, at least if I play around with it a bit. Thanks very much!
 
  • #6
You can also try \raisebox
 

1. What are vertical lines in LaTeX?

Vertical lines in LaTeX are used to create a vertical divider between text or math equations. They can also be used to create a table or a border around a figure.

2. How do I create a vertical line in LaTeX?

To create a vertical line in LaTeX, you can use the command \vline or \vert in math mode. For example, $x \vline y$ will create a vertical line between the variables x and y. You can also use \rule to create a vertical line with a specified height and width.

3. How do I change the thickness of a vertical line in LaTeX?

To change the thickness of a vertical line in LaTeX, you can use the \vline command with an optional argument. For example, $x \vline[2pt] y$ will create a vertical line with a thickness of 2 points. You can also use the \rule command with an optional argument for thickness.

4. Can I add labels or text to a vertical line in LaTeX?

Yes, you can add labels or text to a vertical line in LaTeX by using the \vline command in combination with the \text command. For example, $x \vline \text{divides} y$ will create a vertical line with the label "divides" next to it.

5. How do I create a dashed or dotted vertical line in LaTeX?

To create a dashed or dotted vertical line in LaTeX, you can use the \vline command in combination with the \dashv or \vdots commands. For example, $x \vline \dashv y$ will create a dashed vertical line between the variables x and y.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
4
Views
696
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
Back
Top