{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

3
votes
1answer
142 views

Proof package: lines too short

The proof package's \infer command automatically sizes the lines it draws. However, it isn't always right (pdflatex output): The line is too short on the left. Is this a package ...
4
votes
2answers
256 views

Unwanted offset in title \rule

I was trying to make a custom title layout, but the initial rule was getting slightly indented in a way that was not nice. Here's a minimal example of what I was trying to do: ...
3
votes
1answer
184 views

\cline Not Working with Customized Column Padding

When I reduce the table's horizontal padding using @{}, the \cline command does not work properly anymore. It is shown in the MWE below. \documentclass{article} \begin{document} ...
5
votes
1answer
238 views

`hhline` adding a strange vertical line distortion

I am using horizontal and vertical lines in a longtable environment to create a kind of tree-like internal structure. Since I need to color some cells with the colortbl package, I can't use \cline, so ...
5
votes
1answer
461 views

Flexible rule length in titlesec

I'm trying to get a rule just after the label of a chapter. (i.e., between "chapter 1" and "This is the chapter 1 title"). So far, I've managed to do this: \titleformat{\chapter}[display]% ...
0
votes
1answer
160 views

Multiple rules for sign in sheet with automatic field generation

I am trying to make a sign in sheet with multiple rules that generates however many fields I need for different occasions. I've got a working solution but I can't figure out how to make it so that ...
1
vote
1answer
714 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} ...
8
votes
2answers
2k 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 ...
6
votes
2answers
413 views

color a column red in a table

When I try to color a column red, it seems that white lines begin to emerge. Additionally the \hline changes width depending on how you zoom into the document in pdf format. It look as if the color ...
6
votes
1answer
853 views

set the length of the column separation rule in multicols

I have trouble to make the line which separates two columns in a multicols environment reaching the bottom of the columns. \setlength{\columnseprule}{1pt} is managing the rule width. Is there ...
7
votes
3answers
808 views

Using vertical line column separator in tabular between JUST TWO cells

I'm trying to do long division using tabular environment. Here is the code: \documentclass[11pt]{book} \usepackage{multirow} \begin{document} \begin{center} \begin{tabular}{c@{} c@{} c@{} c@{} c@{} ...
4
votes
1answer
497 views

Horizontal Line in footer which ignores the margin

How can I add a horizontal line in the footer which spans the entire width of the page? \renewcommand{\footrulewidth}{0.4pt} is giving a line which is inside the margin only.
3
votes
3answers
1k views

How to I reduce space before and after HRule?

I have a command: \newcommand{\HRule}{\rule{\linewidth}{0.2mm}} and it produces a thickness I am happy with but the space before and after the line is far too large and taking up much of my ...
6
votes
1answer
879 views

Tight horizontal lines around a block of text

I wish to create a block of text with tight horizontal lines above and below, e.g. This is a paragraph. The following example seems to produce more space between the paragraph and the horizontal ...
6
votes
1answer
854 views

fancyhdr - Header Line is removed on beginning of chapter

When compiling the code below, there is no line in the header in the beginning of the chapter. How do I change it such that the header looks the same on all pages? Thanks \documentclass{report} ...
4
votes
2answers
498 views

Tikz-timing table dashed vertlines

I'm in a tikztimingtable environment and want to include dashed vertical lines after every period width (the default number/spacing). What I currently have (code below) gives me solid gray lines, but ...
2
votes
0answers
127 views

ConTeXt: Set mixedcolumns maximum height for vertical rule

Background Looking to ensure that the height of a vertical rule for the first page of a section is the same as the subsequent sections. Code Minimum working example to illustrate the issue: ...
3
votes
2answers
262 views

Switch off booktabs for one table only

I am using the booktabs package in basically all my papers to present tables with results or descriptive statistics. However, I need to show a schematic choice in a table, and for that I need a proper ...
7
votes
2answers
72 views

\hrulefill suddenly disappearing

I am writing a quote using the csquote package and the Tex code is: \documentclass[12pt]{article} \usepackage[a4paper]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} ...
8
votes
2answers
510 views

Place chapter title between two lines

I want to place a chapter title between two lines. The lines shall be on the left and the right side of the centered title like in this screenshot: Note that the lines are slightly overhanging the ...
4
votes
3answers
483 views

Make a horizontal line from the current indented location to the right margin

I want to be able to do something like: \hspace{2cm} \hrule and have LaTeX give me a line that goes from 2cm past the left margin, to the right margin. I've looked around and as a LaTeX newbie it ...
3
votes
0answers
50 views

How can I change the thickness of \hrulefill [duplicate]

I am writing a worksheet for a math ed class. I am asking questions and would like the answer lines to start as soon as the question ends, and not the next line. This is partly because I want to start ...
4
votes
1answer
104 views

Adding dashed line below element in matrix

Consider the following code: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{pdfpages} \usepackage{easybmat} \title{Test} \author{Bob} \date{} \begin{document} ...
3
votes
1answer
8k 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} ...
3
votes
1answer
1k views

how can I draw a vertical line between two specific columns in multicol environment

Trying to have a vertical line between the 4th and the 5th column in a multicol environment. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{multicol} ...
16
votes
1answer
17k views

How to draw a double \hline in a table without interrupting vertical lines

I need to draw a double line after the first row in a table, but when using \hline twice, this interrupts the vertical lines: \documentclass{article} \begin{document} \begin{tabular}{|c|c|c|} \hline ...
11
votes
1answer
663 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] ...
5
votes
2answers
207 views

Border-top display

I need to display border on the very top of a page and I can't figure out how to do that. If it helps in CSS it would be: border-top: 5px solid blue; Thanks in advance for any help.
7
votes
1answer
11k 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} ...
2
votes
1answer
665 views

Double line for header/footer rules

I want to create a fancy header/footer rule in Exam document class. I have tried what is at http://tex.stackexchange.com/questions/89569/custom-header-footer-rules-fancyhdr and Custom header/footer ...
2
votes
1answer
265 views

titleps multiple headers does not accept rule changes

I want to use several different headers and footers in a document. After a lot of trying I have decided to use titleps as the way to go, as I in any case redefine the sections, subsections, etc. ...
3
votes
1answer
64 views

Use the content of a counter in cline

consider the following example: \newcounter{cnt} \setcounter{cnt}{3} \begin{tabular}{l|l|l|} \cline{2-3} a & b & c \end{tabular} I have a package that generates tables with a ...
4
votes
1answer
525 views

How to create this table for multi-line rotated text and thick vertical lines?

I want to create the table below and I am not sure how to do it. I also want the lines that say, "Long line of text really long" to be wrapped, and take up 2 instead of 1 so that the table isn't as ...
8
votes
1answer
846 views

chapter style latex horizontal line

I want a chapter style like this: 1 ------chapter name------------- text text text text tex t text text text text t I have come this far: ...
25
votes
1answer
605 views

Using elastic lengths — when do they work?

I was wondering why elastic lengths like \fill seem to work only under certain conditions. For instance if I write A \hspace{\fill} B I get A left aligned, B right aligned as wanted. If however ...
9
votes
1answer
200 views

Enable footnote rule only for split footnotes

I am using \usepackage[norule]{footmisc} to disable the horizontal rule separating my footnotes from the bodytext of my document. However, I would like to keep this rule in the case that the top line ...
9
votes
1answer
907 views

Customizing the `\columnseprule` in a `\multicols` environment

In OpenOffice and LibreOffice, one can specify the height (depth?) of the column separator rule in a multi-column section. It can be e.g. 50% of the columns’ height. I would like to be able to do the ...
6
votes
1answer
157 views

No horizontal bar in table for space between column

I'm trying to create a table with underlined column groupings. I have an extra space between the groupings using @{\hskip 1cm}, but I don't want the underlining to extend over this extra space. Is ...
9
votes
2answers
4k 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 ...
4
votes
3answers
848 views

two horizontal lines in header

I need to reproduce the following header format: \documentclass{book} \usepackage{fancyhdr} \pagestyle{fancy} \cfoot{} \lhead{\thepage}
2
votes
1answer
203 views

How to add vertical lines (rules) to the left of first column and right of last column using multicol package

When using the package multicol for say 2 columns, the output is ....|.... using the code below. I'd like a way to add a rule to the left of the first column and to the right of the last column, so ...
5
votes
1answer
552 views

split a horizontal line into serveral lines in a table

I know \cline{i-j} to span a line from column i to j. But if in one line, I want a line only spanning from {1-1} and then {3-3} for example, how can I make it? | a | b | c | -- -- |d | e | f | ...
4
votes
2answers
343 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 ...
2
votes
4answers
233 views

Problem with custom vertical-alignment and/or length of lines/rules in tabular environment

As a follow-up to my previous question: In my table / tabular, \cline{1-1} gives me the correct vertical position but not the right horizontal length . In contrast, \rule{\mycustomlength}{0.4pt} ...
2
votes
1answer
153 views

Changing whether the footer rule is present

I would like the footer to be different after the first page of my problem sheet document I have implemented the following: \fancypagestyle{questions} { \fancyhf{}% Delete the current section ...
7
votes
2answers
1k views

How thick a rule does \hline produce?

How thick a rule does \hline produce (in a bog-standard tabular environment) ?
0
votes
1answer
150 views

overfull hbox when I insert hline

I've got an issue related to table of contents. I want a horizontal line before each section, so I put \renewcommand{\cftsecfont}{ \hline %other stuff that I need } This is perfect in terms of ...
6
votes
1answer
306 views

How to put label on top of an inference rule (bussproofs package)?

I use bussproofs (instead of mathpartir) to layout inference rules. bussproofs can place labels to the left and to the right of a rule, but not on top of a rule (like mathpartir can do). Is there an ...
1
vote
0answers
171 views

nopagebreak between rule and custom theorem env

I'm making a custom theorem environment. Here's a minimal example of my problem, with some filler text borrowed from the GPL: \documentclass{scrbook} \usepackage[dvipsnames]{xcolor} ...
1
vote
2answers
104 views

What is the code for creating a space for the name and date for a child's worksheet?

For example I want my worksheet to look like this: Name: ____________ Date: ____________ Vowels and Consonants