Questions tagged [rules]

{rules} is about drawing lines (also called rules). Popular packages are {booktabs} (which provides high quality table rules) and {dashrule}.

Filter by
Sorted by
Tagged with
5 votes
1 answer
8k views

How can I make a postcard template?

I would like to print some of my holiday photos as postcards. But sadly, all companies I have seen so far do not offer easy possibilities to create the back of the post card. So I want to make a ...
Martin Thoma's user avatar
  • 18.8k
5 votes
1 answer
9k views

Two horizontal lines above and under chapter-entry [duplicate]

Possible Duplicate: Title between lines Can anybody please tell me how to get horizontal lines above and under the \chapter{MyChapter}? Here is an example:
user24403's user avatar
5 votes
1 answer
2k views

How can I fill a line from the left?

I am fiddling with various ways of filling a line with a vertically centered line and experimenting with the answers here: https://stackoverflow.com/questions/2553392/latex-rule-filling-the-line and ...
Thomas Arildsen's user avatar
5 votes
1 answer
6k views

\hrule underlining of subsection titles

I want an underlining of my subsection titles - a horizontal line that extends the whole page width like a \hrule. I tried the answer from this question which is to add these lines: \titleformat{\...
Steeven's user avatar
  • 1,407
5 votes
1 answer
1k views

How to insert a symbol to the beginning of a line for which a word appears?

This is to indicate changes for a LaTeX file. Say, I wanted to add a vertical line to the beginning of a line whenever"word 1", "word 2", ...", or "word 100" appears. Manually this can be done in ...
noname's user avatar
  • 51
5 votes
1 answer
2k views

How to disable pagebreak on \hline in supertabular?

This is similar to How to disable pagebreak on \hline in longtable? but for supertabular or xtab: With \tabularnewline\hline I get pagebreaks (or in my case columnbreaks) before the hline, i.e. the ...
Martin Schröder's user avatar
5 votes
1 answer
1k views

Theorems and Definitions as quotes

Most standard styles highlight theorems and definitions using italics. Now this is something I really would like to avoid in my thesis (and generally). Unfortunately, if I just remove this "feature", ...
darij grinberg's user avatar
4 votes
1 answer
2k views

longtable - strange lines at the end of table

I have strange problem with longtable package. Almost all my tables looks great but some of have strange lines at the end of tables. Please take a look at the picture I create the table like that ...
latexLerner's user avatar
4 votes
1 answer
3k views

Creating a particular environment with a left-side rule

I don't have much experience in creating environments, and my understanding of them allows me to create environments which do something at the beginning and at the end (like for instance, in a "proof" ...
Patrick Da Silva's user avatar
3 votes
2 answers
185 views

Multi column table with continuous vertical lines

I want to create this type of table in the latex. What I did is the following \begin{tabular}{c|ccccc|ccccc|ccccc} \toprule &&& Edge count &&&&& Wedge count &&...
ann's user avatar
  • 33
3 votes
2 answers
1k views

How to color my (custom) lines/rules in a table contained by mdframed?

As a follow up to my recent question: Now I'd like to put some color on to that line/rule. In the MWE below, \arrayrulecolor{blue}\mycline{1-1} throws an error (undefined control sequence with respect ...
nutty about natty's user avatar
3 votes
1 answer
472 views

Page number in outer margin affects vertical ruler

I adapted the idea from here to place the page numbers in the outer margin. However, by doing so, the vertical ruler disappears. I first thought that adjusting the horizontal spacing parameters for ...
Marius Hofert's user avatar
2 votes
1 answer
2k views

Extending a line in the Table

I wish to have a Table setting like the following graph with an extra line inserted between a and b. Namely, I wish to extend the line separating 1, 4 and 2, 5 to the line separating a and b. The ...
wonderich's user avatar
  • 2,397
2 votes
2 answers
2k views

Make a variable length horizontal rule depending on the text width of the title

I have the following custom environment for examples: \documentclass{article} \usepackage{lipsum} \usepackage{amsmath, mathtools, amsthm} \usepackage{graphicx, xcolor} \usepackage[top=1in, bottom=...
GiuTeX's user avatar
  • 1,309
2 votes
1 answer
3k views

Make a rainbow line

I found a template for a title page: https://www.latextemplates.com/template/vertical-line-title-page There's a piece of code that draws a vertical line: \rule{1pt}{\textheight} % Vertical line I'...
LA.27's user avatar
  • 147
2 votes
2 answers
2k views

hrulefill vertical spacing

I want to reduce the vertical spacing that comes before and after \hrulefill. I have already tried different options with \hrule, which works fine except for the fact that the line doesn't end where ...
Louis GRIMALDI's user avatar
1 vote
1 answer
2k views

\hhline double line imperfection

Using the \hhline command i found some imperfection in the double line. How can i fix it? Imperfection Table \documentclass[11pt]{amsart} \usepackage{amssymb} \usepackage{hhline} \...
gmeroni's user avatar
  • 431
108 votes
1 answer
435k views

Draw a horizontal line in latex

How can I draw this horizontal line like this picture in Latex? Thanks for your help.
Duy's user avatar
  • 1,465
81 votes
3 answers
254k views

Problems with \toprule and \midrule in a table

Having the following siunitx table code in LyX, for each occurrence of \toprule and \midrule I obtain an error message: The control sequence at the end of the top line of your error message was ...
Germano Massullo's user avatar
38 votes
1 answer
36k views

Midrule that extends only over some of the columns in booktabs

I hope this isn't a silly question, the thing is that I want to create a table with a midrule applied in just some cells, I mean something like that (just between Item, Animal and Description): I've ...
Giovanni Cásares's user avatar
34 votes
2 answers
54k views

Center hrule in the middle of the page

I would like to center a horizontal line on my page and I would like the width of this line to be half \textwidth. Here is what I tried but it doesn't work : \documentclass[10pt,a4paper]{article} \...
pitchounet's user avatar
  • 1,007
31 votes
4 answers
80k views

How to draw a line between two paragraphs of my text?

It's just as the title says. Thanks.
Neves's user avatar
  • 433
28 votes
1 answer
24k views

How to colour \hrule

I am trying to display a coloured \hrule. This discussion implies wrapping the \hrule in a \textcolor should do, but that adds an ugly extra vertical space above the \hrule. Other questions on TeX....
O. R. Mapper's user avatar
  • 1,029
27 votes
2 answers
138k views

How to draw a vertical line of desired length in equations.

I am writing a big formula where a vertical line is needed. Instead of $\vline$ or $|$, does anyone know a way to draw this vertical line of desired length? The formula is something like $$ E\Bigg[ ...
Anand's user avatar
  • 3,716
24 votes
1 answer
17k views

How can I place a vertical rule between subfigures?

I have implemeted a figure with subfigures by following the instructions here. Each subfigure is an image and some text beneath it. I would like to introduce a vertical rule between each subfigure ...
starfry's user avatar
  • 585
20 votes
3 answers
23k views

Horizontal rule with adjustable height behaving like \cline{n-m}

How can I produce \noalign{\hrule height 1pt} only through a certain number of columns just like with \cline{n-m} (or basically \cline with adjustable thickness)? Fig. 1: The approximate objective (...
Harold Cavendish's user avatar
19 votes
4 answers
92k views

How to draw two \hline and two vertical line?

I want to draw a table with two \hline and two vertical line. But as shown in the figure, the first vertical line do not cross the two hline. How to solve this problem? \documentclass{article} \...
Eden Harder's user avatar
19 votes
3 answers
40k views

Headrule length in fancyhdr

Using the fancyhdr package, is it possible to change(increase or decrease) the headrule length without changing the header length? In the picture related, one can see that the headrule rectangle(in ...
S.V.'s user avatar
  • 499
18 votes
1 answer
13k views

How do I increase the spacing between header text and the 'headrule' line with fancyhdr?

This is going to be something so obvious that I'm almost embarrassed to ask! I've been using fancyhdr to put some fancy headers and footers in my thesis template – in fact, doing what it says on the ...
Mark Birtwistle's user avatar
16 votes
2 answers
3k views

Inserting a line to separate the text and the margin note

How can I insert a vertical line through a whole page to separate the text and the margin notes?
user23959's user avatar
  • 161
16 votes
2 answers
13k views

Good Style of Creating a Signature all within LaTeX

I have a small task that involves trying to get a signature using LaTeX fonts. I want to be able to make the signature look as handwritten as possible (pen/marker) using the LaTeX fonts. Also like to ...
night owl's user avatar
  • 7,603
15 votes
2 answers
545 views

Very slight discontinuities in table borders

Tables in LaTeX all seem to have slight discontinuities in the outside vertical borders - little notches that are only really visible if you zoom in. Example: \documentclass{article} \begin{...
Joseph Montanaro's user avatar
15 votes
2 answers
27k views

Horizontal line in Algorithmic Environment

I'd like to separate two sections in an algorithmic environment with a horizontal line, like: ------------- Algorithm 1: MyAlgorithm ------------- Part 1: Do some stuff ------------- Part 2: ...
Richante's user avatar
  • 253
14 votes
2 answers
9k views

Alternatives to the horizontal line in fancyhdr

I'm looking for a more fancy alternative to the default (read boring) horizontal line produced under the fancyhdr package. How creative can we get?
Chernoff's user avatar
  • 761
14 votes
2 answers
3k views

Creating lists with items separated by a rule

How can I create a list in which a rule is automatically inserted between each pair of items?
Ian Thompson's user avatar
  • 43.8k
13 votes
1 answer
98k views

Is it possible to use \cline multiple times when using multirow?

\documentclass{article} \usepackage{multirow} \begin{document} \begin{table}[ht] \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|}\cline{3-8} \multicolumn{2}{c|}{\multirow{2}{*}{}}&\multicolumn{3}...
Carlos R. Pena's user avatar
12 votes
2 answers
2k views

Why isn't a \vrule between \hfills centered?

I have two boxes that fill up most of the width of a page, with a \vrule between them, with an \hfill on either side of the rule, so that the two boxes are pushed to either side of the page and the ...
cg505's user avatar
  • 305
12 votes
1 answer
752 views

Specific section format

I'd like to use titlesec to typeset a section header that would look like this: --------- Name of Section ------------ (the ---- would be a rule, and the entire section header would be centered) ...
Suresh's user avatar
  • 16.5k
12 votes
4 answers
35k views

How to change hline thickness in tabular?

I am just trying to get the table to look like the picture in the LaTeX Wiki book: In this example shown, the very top and bottom \hline are thicker and darker than the ones in the middle of the ...
Dan's user avatar
  • 969
12 votes
2 answers
1k views

Vertical line enclosing items in itemize

I want to LaTeX some notes. The result should look like this: The numbers are fine with me. The problem is how to draw those vertical lines (with the hook), particularly inside the itemize ...
Michael Völkl's user avatar
12 votes
2 answers
4k views

How thick a rule does \hline produce?

How thick a rule does \hline produce (in a bog-standard tabular environment) ?
nutty about natty's user avatar
11 votes
1 answer
2k views

Two-column layout with thick vertical rule in ConTeXt

Background I would like to add a thick rule centered between two columns. Example Code A minimum working example that illustrates the issue: \setupcolors[state=start] \startuseMPgraphic{...
Dave Jarvis's user avatar
  • 11.9k
11 votes
2 answers
2k views

How do I make a long underscore in Plain TeX?

I have looked at this question as well as here and here but I cannot figure out how to produce a long underscore in plain TeX, as in the following example. Date _____________________________ The ...
merlin2011's user avatar
  • 3,353
11 votes
2 answers
2k views

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

How can one change the colour, pitch, line style, etc of the rules generated by the geometry package's showframe option?
commonhare's user avatar
  • 2,630
11 votes
4 answers
11k views

Variable-width horizontal rules with \cline intrude cell text

I have come to learn how to make a variable-width horizontal rule with \hline from the LaTeX companion and with \cline from Horizontal rule with adjustable height behaving like \cline{n-m}. But the ...
Rich's user avatar
  • 505
11 votes
4 answers
22k views

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

Is there a way to add a vertical line (equal sign) to an augmented bmatrix (4x4) WITHOUT using array? Any help provided would be greatly appreciated.
TechEng's user avatar
  • 111
11 votes
2 answers
6k views

How to shorten \hline in a matrix

I indicate blocks in a matrix using \hline: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{bmatrix} a & b\\ \hline c & d \...
equaeghe's user avatar
  • 5,976
10 votes
1 answer
7k views

\hline with \only (or \onslide) in Beamer

In a table in beamer, I would like to remove \hline after X number of slides using \only<1>{\hline} But this always results in an error message: Misplaced \noalign What can I do to ...
Sverre's user avatar
  • 20.8k
10 votes
2 answers
9k views

Lighter midrule

I have a table that looks like \documentclass{article} \usepackage{booktabs} \begin{document} \begin{tabular}{cc} \toprule A & B \\ \midrule Q & M \\ W & N \\ E &...
Kurzd's user avatar
  • 1,017
10 votes
2 answers
5k views

Footnote rule in beamer showing too early with overlays

Consider the following MWE : \documentclass{beamer} \begin{document} \begin{frame} \begin{itemize}[<+->] \item item \item item\footnote<.->{footnote} \item item \end{itemize} \end{...
Marc Baudoin's user avatar
  • 2,676