2022 Developer Survey is open! Take survey.

# Tag Info

### Horizontal line spanning the entire document in LaTeX

Another option is this one, which makes a horizontal line stretch the entire page. I prefer this one, because it's short, easy to remember and exactly what I need. I hope this works for you too. \...
• 1,717

### Draw a horizontal line in latex

I see two choices, one using \rule (as suggested by @John Kormylo) and one using \hrule. I'll describe them both and give an example at the end The \rule command constructs a box, which is treated ...
• 10.4k

### Vertical table lines are discontinuous with booktabs

I don't think the answer "Don't use vertical rules" is very constructive when the question is about making vertical lines look nice. So here is a solution if you only want to modify the width of ...
• 859
Accepted

### How to change a thickness of a hrule?

The latex syntax is \rule not \hrule but if you want to use \hrule then \hrule height 2cm should work. The latex syntax would be \begin{center} \rule{\textwidth}{2cm} \end{center}
• 665k
Accepted

### Changing width of table lines

Update Use \arrayrulewidth from the preamble and place it before the desired table using a group to keep the change to \arrayrulewidth local: \documentclass[11pt]{article} \usepackage{array} \begin{...
• 480k
Accepted

### Misplaced \noalign \hline

Use \hrulefill outside tabular environment for horizontal line and for a constant space in a table column, give it in the declaration line as follows: \documentclass{article} \usepackage{hyperref} \...
• 2,879
Accepted

### Overline thickness

TeX The default rule thickness θ is 0.4pt in TeX. An \overline formula is set as \vbox: At the top is a kern of θ The bar follows with thickness θ The gap to the formula has height ...
• 261k

### Vertical table lines are discontinuous with booktabs

As @Puck says in his answer, and as Brandon Kuczenski comments, the responses here are not constructive, neither the question is answered. The way to use vertical lines with booktabs (despite it is ...
• 496
Accepted

### Very slight discontinuities in table borders

This is fixed with the use of the array package: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{|c|c|} \hline A & B \\ \hline C & D \\ \...
• 565k

### Showing how to solve an equation in LaTeX

Here's a solution that uses an array environment and takes care to preserve the appropriate amounts of spacing around operators of type mathbin ("+" and "-") and mathrel ("="). It also uses the macro \...
• 435k
Accepted

### Redefining \toprule to default line thickness to use in tables

I assume that if you want to change the width of \toprule, you also want to change the width of \bottomrule. If that's the case, just issue the instruction \setlength\heavyrulewidth{0.25ex} in the ...
• 435k

### vertical and horizontal line in a matrix

You could use an array instead; in this way, the standard | for the vertical rule and \hline (for the horizontal rule) will give you the desired result. The brackets can be obtained using \mleft, \...
• 480k
Accepted

### LyX command(s) to insert WYSIWYG horizontal line, for keyboard shortcut

Go to View > Messages Pane: Then click on the "Settings" tab in the bottom right corner: Then click on the "Selected" radio button: Then double click on "User commands" so that "no" turns to "yes": ...
• 12.4k

### Adding vertical line (equal sign) to augmented bmatrix WITHOUT using array

No, you have to use array, because the amsmath matrix environments don't provide for specifying rules. \left[\begin{array}{@{}ccc|c@{}} 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 &...
• 985k

### How to use booktabs in REVTex4 / REVTex4-1

Update This answer addresses a workaround for revtex4-1 which is not needed with current releases (revtex4-2) booktabs sets the default widths in a font dependent way (em units) but it seems that ...
• 665k

### Is it normal for BibTeX to replace similar author names with "------"?

All of these solutions didn't work for me so I found a simple solution: just add \vspace{0mm} to some part of the name of the author and it's OK.
• 141

### How to create vertical and horizontal dotted lines in a matrix?

You can adjust the dash and gap of the \hdashline by modifying the lengths \dashlinedash and \dashlinegap: \documentclass{article} \usepackage{tabularx} \usepackage{arydshln,leftidx,mathtools} \...
• 565k
Accepted

### leave gap before and after \hrule

Try to avoid using \\ just end the paragraph and add space: aaaaa \vspace{1cm} \hrule \vspace{1cm} aaaaaaa If you want a spaced out line.
• 665k

### Colored horizontal line between two texts

Very simply (don't forget \noindent if it's between paragraphs): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[x11names]{xcolor} \usepackage{lipsum} \usepackage[...
• 259k
Accepted

### How can I draw a vertical line on a slide in beamer without affecting the positions of any other elements on the page?

You can use \vrule. Here's an example with fake images, replace them with yours. \documentclass{beamer} \usepackage{graphicx} \begin{document} \begin{frame} \frametitle{Foo Bar} \includegraphics[...
• 120k
Accepted

### Booktabs table, multicolumn header underline

Use the \cline equivalent offered by booktabs: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table} \centering \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi}% \begin{...
• 565k
Accepted

### How to change hline thickness in tabular?

You can define your own \thickhline which is based on \hline, but with a different \arrayrulewidth: \documentclass{article} \makeatletter \def\thickhline{% \noalign{\ifnum0=`}\fi\hrule \@height \...
• 565k

### How to make continuous (but breakable) vertical rule along left side of paragraph?

Another LaTeX solution. tcolorbox is your friend (with its xparse library, the two optional arguments can be handled easily): The code (adjust the settings according to your needs): \documentclass{...
• 480k
Accepted

### Change Color, Pitch, Line Style of Showframe (Geometry Package)

Compile and read this MWE: \documentclass[a4paper]{scrartcl} \usepackage{xcolor} \usepackage[showframe]{geometry} \usepackage{microtype} \usepackage{lipsum} \makeatletter \def\Gm@hrule{\color{red!20}...
• 73k
Accepted

### How to create vertical and horizontal dotted lines in a matrix?

Since revtex4 seems to be incompatible with the arydshln package, here's an option using TikZ: \documentclass[aps,prl,twocolumn,nofootinbib,superscriptaddress,floatfix]{revtex4} \usepackage{tikz} \...
• 480k

### Colored horizontal line between two texts

The following example defines \sepline that prints a colored line between paragraphs, if the end of the first and the start of the second paragraph are on the same page. The line vanishes at page ...
• 261k
Accepted

### How do I make a long underscore in Plain TeX?

Use a negative height and a slightly bigger depth: \vrule height -3pt depth 3.4pt width 7cm Adjust to suit. The same idea can be used for “raised rules” (with a negative depth). No rule will appear ...
• 985k

### Showing how to solve an equation in LaTeX

Easy enough: use aligned: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{aligned} x + 2 &= 3\\ % First equation -2 &= -2\\ % Second equation \hline x ...
• 985k