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

learn more… | top users | synonyms

41
votes
7answers
17k views

Long underscore in LaTeX

In LaTeX, how would I make a long underscore? For example, Name _______ Signature _______
22
votes
3answers
7k views

Is it normal for BibTeX to replace similar author names with “------”?

In my .bib file, I have two entries with exactly the same author names: @article{Seshadrinathan2010A-Subjective-St, Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. ...
13
votes
3answers
6k views

Dynamic signature/date line

I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ...
29
votes
3answers
8k views

Why not use vertical lines ('|') in a tabular?

My question is a follow-up to the answer to a follow-up question, to be found here. ;) I'd like to know why one would advise against using vertical lines (via |) in a tabular (i.e. in ...
10
votes
1answer
3k views

Box border lines not showing properly on PDF

I have the following code that generate a box with text content: \documentclass{report} \usepackage{color} \usepackage{lipsum} \newcommand\tipbox[1]{% \begin{center}% ...
88
votes
14answers
29k views

Totally sweet horizontal rules in LaTeX

I have been trying to find a way to easily drop a nice horizontal rule into a LaTeX document. \hline just makes a line across the page. It would seem that some package must provide something that is ...
25
votes
3answers
14k views

What is the \rule equivalent for \hrule?

I've tried to put a rule long as the text in this way: \rule{\textwidth}{0.4mm} but I obtain a rule slightly smaller that the text width. How to obtain the same effect as \hrule?
20
votes
3answers
13k views

How can I make a horizontal dashed line?

How can I make a horizontal dashed line in LaTeX? Just writing lots of single dashes results in a continuous horizontal line.
29
votes
2answers
12k views

How can I reproduce this table with thick lines?

I'm trying to reproduce this table: (apologies for the terrible cameraphone pic) I don't know how to get the slightly thicker leftmost and topmost line. Here's a minimal example of what I have so ...
26
votes
1answer
16k views

How to remove the top horizontal bar in fancyhdr?

When using fancyhdr, how do you remove the top horizontal rule? I do not want a header at all, just a footer. This is what I do now: \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy} ...
19
votes
3answers
1k views

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

I'm looking for a way in Plain TeX to make a continuous vertical rule along the left side of a paragraph (or arbitrary block of text), such that it observes normal page-break rules. I started with the ...
7
votes
1answer
564 views

How to format an email conversation?

I am currently writing my thesis and need to include a bunch of email conversions. I am using classicthesis. I wonder, how you would format stacked conversions. Moreover, how would you deal with the ...
21
votes
3answers
1k views

Can LaTeX be used to make a sheet of blank lines?

Specifically, a bunch of them; for a sign-in sheet, list of signatures for a petition or a worksheet with short answer essay style questions.
17
votes
4answers
3k views

Putting a bar in the margin

I sometimes want to give examples in a document I am writing. Because these examples are quite general it could be difficult for readers to see the difference between the examples and the theoretical ...
4
votes
1answer
479 views

Left-hand vertical rule applied to flalign environment with automatic pagebreak

I am referring to the coderule environment (see Override \centering to left justify an image) presented earlier by @TH as answer to the following question: Override \centering to left justify an image ...
5
votes
3answers
2k views

How do I insert a border below text?

I want to emulate a feature from a few word processing programs (e.g. Microsoft Word, LibreOffice Writer) where I could (somewhat) arbitrarily insert a bottom border below any text/paragraph. How can ...
7
votes
2answers
1k views

Longtable does not break correctly when used with \specialrule instead of \hline

I'm writing an application that generate latex code, therefore the solution must be the most generic possible to ensure that it will generate clean pdf all the time. I would like to let my users ...
25
votes
3answers
24k views

How can I draw a horizontal line spanning only some of the table cells?

In a table, how can I draw a horizontal line that goes only through some of the cells? I mean a line like the one in the Foo and in the Bar area of this table: +----+-----+ |Foo |1 |2 | | |1 |2 | ...
9
votes
4answers
2k views

Vertically centered horizontal rule filling the rest of a line?

I'd like to have a horizontal line extending from the end of the text on a line to the right margin. So far I've found \hrulefill and \leaders\hrule\hfill, but these draw a line that's flush with the ...
24
votes
2answers
656 views

Two rules directly under each other

I'm trying to make two rules of different length (fatness) directly under each other, something like: -------------------- ==================== Where = is a fatter line than -. The vertical space ...
17
votes
3answers
2k views

Can I have the \overfullrule rule colored in pdfLaTeX?

I know that I can use \overfullrule=5pt to get overfull lines marked with a black marker. I am using pdfLaTeX. Is there a way I can get this marker or something similar in magenta instead?
13
votes
4answers
2k views

Draw a line through one column of a matrix

I'd like to "cancel" (draw a line through) a column of a matrix (using \begin{pmatrix}..\end{pmatrix}). How can I do this?
10
votes
1answer
910 views

Create a vertical line in a table that spans a range of rows but not all rows

I'm interested in methods to create a vertical line in a table that spans a range of rows but not all rows. I've found one solution below, but is there another solution such as \cline which allows ...
6
votes
1answer
475 views

Title between lines

So I want to have one line above and one under the title of a chapter in scrreprt, like: _________________________________________________ 1. Introduction ...
14
votes
1answer
5k views

What is the thickness of \hrulefill

This seems like a simple question ... I know from this question that \hrule and presumably \hrulefill have a thickness of 0.4pt. I think \hrule is a primitive, so does that mean that you cannot ...
10
votes
1answer
3k views

A Matrix with labels, dashed lines

I'm trying to TeX the following matrix, from Guillemin and Pollack (1.4 #13) The best I've been able to do is get the dashed lines with \[ \left( \begin{array}{c:c} B & C \\ \hdashline D ...
10
votes
2answers
3k views

Footnote separator

How can I remove the separator line between the footnotes and the text?
8
votes
3answers
8k views

How can I change the footnote line (thickness, length)

I am using pdflatex and just want to know how to change the footnote line (thickness, length). Besides that: How can I set the distance between text-lines in the text.
5
votes
1answer
574 views

Vertical alignment in multicol

In the following code the horizontal rules on the right don't line up in all cases with the horizontal rules on the left. It seems to be related to the text content. How can I fix this in such a way ...
5
votes
1answer
307 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 ...
26
votes
2answers
53k views

Horizontal line spanning the entire document in LaTeX

I have used the \hrulefill command to create a horizontal rule, along with some other commands. In each case I have the rules extended up to the margin. I want the rule width to be controllable, i.e. ...
14
votes
5answers
1k views

How can i add a “field” for handwritten text?

I need to add a bunch of fields for a handwritten text to my document that look like this: Your Name ___________ Your Age ___________ As an example, I can show you the form that I have to ...
22
votes
1answer
16k views

Can a table include a horizontal dashed line?

In a normal table, you can use the \hline command to draw a horizontal line. I am trying to make this line a dashed horizontal line. I have found the package dashrule via this answer, but this only ...
17
votes
1answer
1k views

How can I make a bold horizontal rule under each section title?

I want to place a long bold \hrule-type line under the \section to make it more distinctive. How can I do that?
11
votes
1answer
195 views

Alignment rules

I find myself quite frequently in the need to check whether some elements on my page are aligned exactly as intended. As a result, I usually end up magnifying the output 400% and using a rule over my ...
25
votes
5answers
45k views

LaTeX tables: How do I make bold horizontal lines (typically \hline)?

The title says it all: In LaTeX tables: How do I make bold horizontal lines (typically \hline)?
17
votes
2answers
335 views

prevent “action” if top of page

I have a manual list of stuff that are sometimes separated by an hrule(or my own custom ruler) for visual purposes. Sometimes the hrule ends at the top or bottom of a page which makes it useless. Is ...
4
votes
2answers
211 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 ...
4
votes
3answers
2k views

Too long vertical lines in table

Ok, I've looked at this code too long and need some fresh eyes and ideas. Question: Why do I get too long vertical lines on my LaTeX table? Please note that I've not experiencing any problems with ...
10
votes
3answers
258 views

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

Similar to this question, I am trying to output a similar matrix with dotted line instead of dashed line. Is there anyway to do this? I also try to use these three packages: ...
5
votes
2answers
3k views

\cline doesn't work

I'd like to draw a partial horizontal line just below of 'first second third' row, but \cline doesn't work. Any suggestion? \documentclass[table]{beamer} \usepackage[T1]{fontenc} ...
10
votes
1answer
199 views

fbox drawn incorrectly after \noindent

What's going on here that the first and last \fbox are not getting drawn correctly when immediately following \noindent? \documentclass{article} \usepackage{pst-node} \pagestyle{empty} ...
9
votes
2answers
245 views

Can I make some vertical material disappear if it occurs next to a page break?

I'd like to place a horizontal rule above each section title, to separate the new section from the text before it. But I don't want the rule to appear if the section begins on a new page, since that ...
9
votes
2answers
5k views

How to show the vertical line between two columns?

Simply using \twocolumn changes my document to look like this: -----HEADER---- ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### ###### -----FOOTER---- But ...
8
votes
1answer
582 views

Dashed draw with a node including a fraction

Is this intended behavior (with plain XeTeX): \input tikz \tikz\draw[dashed] node {$3T\over4$}; \bye It renders as: !? The fraction line is dashed, too! Is this intentional? Is there something I ...
7
votes
1answer
2k views

Vertical line left out in tabular

The code \documentclass[a4paper]{article} \usepackage{multirow} \begin{document} \begin{tabular}{|l|l|l|l|l|l|l|} \hline \multirow{2}{*}{Color Type} & \multirow{2}{*}{Channels} & ...
5
votes
2answers
5k 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 ...
5
votes
1answer
646 views

Removing the borders from algorithm listings

I am relatively new to LaTeX. If I use standard algorithm and algorithmic environment for my algorithm listings I'm getting the borders displayed around the table with the pseudocode. How to remove ...
4
votes
2answers
3k views

How to add horizontal line after header and before footer?

How can I add horizontal line after header and before footer? header --------- --------- footer
3
votes
1answer
215 views

Custom vertical page border

I wanted to have a vertical colored bar running on all my pages, to the left of the page, in between the beginning of the sheet and the beginning of the text. Something like: |\| text | |\| text ...