{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

2
votes
1answer
21 views

if statement problem

I am having a problem with some code and I could use some help. I have been using this implementation for a long time now and no problems before. Here is how I store all my variables ...
3
votes
3answers
222 views

Draw horizontal lines like open and close brackets

I need to draw two horizontal lines which look like open and close brackets: ___________________________________________________________________ | ...
6
votes
2answers
273 views

Why does a \hrule need text around it to be drawn?

Why does a \hrule need text around it to work? Example that does not draw a line: \documentclass{article} \begin{document} %foo \hrule %bar \end{document} If one removes the % before %foo or %bar ...
2
votes
1answer
33 views

TabularX Vertical Border Missing

Why is my table missing a little bit of its vertical rule near the top/right (just below where it says "Sets")? Context: I'm making fractions worksheets for students, many of whom will have diverse ...
1
vote
1answer
20 views

Extending fullwidth into one margin

I'm working on a résumé which places section headers in a widened left margin. I'd like to use a fullwidth environment for the heading at the top of the page. Formally speaking, this would extend ...
2
votes
2answers
39 views

Formatting table lines in landscape using tabularx: they stop halfway through

The lines in the table somehow stop halfway through the table. Any advice would be much appreciated! \documentclass[11pt,a4paper]{book} \usepackage{booktabs} \usepackage{tabularx} ...
2
votes
1answer
38 views

\titleformat (in titlesec) doesn't show any horizontal line for chapter

I have been trying to get a simple thing working with titlesec: getting a horizontal line under each chapter. There are many tutorials, documents and questions on TeX that explain how this can be ...
2
votes
0answers
39 views

How do I make unruled footnotes within an environment?

I have a single environment, fancyfoot, in which I would like footnotes to have no rules. \documentclass{memoir} \usepackage{lipsum} \newenvironment{fancyfoot}{ \renewcommand{\footnoterule}{} ...
11
votes
2answers
176 views

Is it possible to define a dotted version of `\vrule`?

The \vrule primitive has a nice charcateristic: it has the ability of adapting itself to the height and depth of the enclosing box: \documentclass{article} ...
4
votes
2answers
63 views

Changing width of table lines

We know that by adding \setlength\arrayrulewidth{xpt} changes the thickness of all the table lines. If I wanted to change specific table lines, how to do it? \documentclass[11pt]{article} ...
2
votes
1answer
64 views

Horizontal line under header background

I made a function that displays a header background. However, there supposed to be a horizontal line right under the background image, that goes from very left to very right with no margins. This is ...
1
vote
2answers
97 views

scrbook - How to add one horizontal line above and one below the chapter-entry without (!) using titlesec?

I want to add one horizontal line above and one below the chapter-entry as well. Before using the scrbook-class, I used this simple solution made by titlesec-package: \newpagestyle{headrules}{ ...
3
votes
1answer
54 views

Is there an easy way to create a partial \toprule?

Is there a relatively simple equivalent to \cmidrule (a partial horisontal line in a table) but with the characteristics of a \toprule? It seems the booktabs package does not provide a \ctoprule ...
2
votes
1answer
51 views

Removing header line and page number

I'm writing an article, and it gives me a line at the top of the page on which there's a page number. I want to remove both the line and the page number. I tried this to remove the line but it didn't ...
3
votes
1answer
57 views

vertical and horizontal line in a matrix

I want to create a bmatrix on the right \documentclass[10pt,a4paper]{article} \usepackage[english]{babel} \usepackage{amsmath} \begin{document} \begin{equation} \begin{bmatrix}[c|c] _B[T]_B ...
3
votes
3answers
81 views

Vertical stacked parboxes: Spacing and Calculating

I need a table which will work in twocolumn mode and can span over multiple pages. Since I've given up with supertabular (too buggy, too less control), I wrote a simple solution for my purposes with ...
0
votes
0answers
61 views

Drawing footnote separator line

Footnotes have a horizontal line above them, separating them from the body text on the page. How can I draw this line in a different context? I also would like the to vary the length of the line.
2
votes
1answer
42 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: ...
8
votes
2answers
129 views

How to align a dashrule?

I've been playing around with the dashrule package. But easy as it's shown in the manual, I don't get a proper alignment or width from the dashlines. \documentclass{article} \usepackage{dashrule} ...
1
vote
1answer
39 views

Section title ruler on right side center-aligned

I want do exactly this: http://www.latex-community.org/forum/viewtopic.php?f=44&p=42626 But as a general command for all subsection titles. I have the feeling that I am going to use the ...
5
votes
2answers
107 views

How to make a fancy rule under a line of text in ConTeXt

I've (mis)used LaTeX on and off for the past 10 years and am now trying out ConTeXt, mostly because it allows alignment to a baseline grid. I'd like to produce a rule (line) below some text such that ...
3
votes
1answer
27 views

Tune rule height in ruled float

I'm using float package to get floating environment with rules. I want to tune height of rules in ruled style for floatings of the package. Namely, I want bottom rule to be as thick as top one (like ...
3
votes
2answers
49 views

horizontal line/rule in column vector

Trying to generate a column vector with a horizontal line/rule separating top half of the vector from the bottom half. Am starting from the following MWE: ...
1
vote
1answer
44 views

\rule + memoir in \title Paragraph ended before \reserved@a was complete

I'm trying to make my customized title, but error happen with memoir (and not with article). \documentclass{memoir} \makeatletter \def\printtitle{% {\centering ...
3
votes
1answer
81 views

How to trim the length of \toprule

I want to be able to trim the left and the right of a \toprule and \bottomrule as you can do with \cmidrule(lr){<column range>}. My attempted solution using \cmidrule[\heavyrulewidth]{<column ...
0
votes
4answers
71 views

Vertical line in the middle of the page

How can I get a vertical line in the middle of the page ? and I want also to write same text in the right and the left of the vertical bar (like this example) : I tried \rule but i don't know how to ...
2
votes
3answers
198 views

How to add vertical space after \hline without breaking vertical lines in a table

I have seen similar questions on the matter (Question 1, Question 2) of adding vertical space and not breaking vertical lines, the solutions suggested are to add space after the \\ using \\[0.1cm] for ...
2
votes
1answer
51 views

Horizontal line next to section heading

I have found good methods for adding a line over or under a section heading. A horizontal line that fills the whole width. Is it possible to add such a line extending the rest of the width placed ...
2
votes
2answers
98 views

Draw Dash-like midrule in table environment

I could draw most parts of this table. But I have no idea how to draw dash-liked midrule. Thanks a lot. \begin{table} \captionsetup{labelformat=empty}\ \centering \caption{REVENUE INTEREST}\ ...
2
votes
3answers
75 views

Center text between horizontal lines extending to the margin on either side

I'm wondering how to make something like this: ---------------------------------- Text ------------------------------------- In words: the text is centered. There is some space between the ...
1
vote
1answer
81 views

How do I create a header that has a colored box with page number, Chaptername, and also a line across the textwidth after it?

I would like to create a fancy header that looks like this. I am writing a two-sided book with a5paper.
2
votes
1answer
53 views

How to add separator between paragraphs (or minipages) on the same page?

I am trying to typeset a list of quotations in the following way: No quotation is split across pages. Between adjacent quotations on the same page, there is a separator (such as a fleuron or ...
5
votes
1answer
94 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 ...
2
votes
5answers
87 views

How to have a thorough horizontal line in tabular environment?

I want the horizontal lines to go across the second column; form start to the end of the second column. I found some suggestions to make a nested table, But couldn't understand those. This my code: ...
0
votes
2answers
53 views

Centered vertical rule in a displaymath

How would I place a centered vertical rule that separates two regions of text in a displaymath environoment? The effect I want is described below. Thanks! \[ 3x + 2 = 6 | x + 5 = 7 -2 = ...
4
votes
1answer
50 views

Algorithm environment, defining a custom style

I'm currently using the following mwe \documentclass{article} \usepackage{algpseudocode} \usepackage[plain]{algorithm} \begin{document} \begin{algorithm}[H] \hrule \vspace{0.5em} \caption{Euclide's ...
2
votes
1answer
123 views

Placing text between horizontal lines generated by \rule: equispacing

How to fix the vertical spacing between the text and the lines? In the following MWE the vertical space between the text and the line below it is much greater than the vertical space between the text ...
12
votes
4answers
848 views

Showing how to solve an equation in LaTeX

Is there a package that would allow me to draw a horizontal line in math mode, like what is suggested below? \begin{align*} x + 2 &= 3\\ % First equation -2 &= -2\\ % Second equation %% ...
3
votes
1answer
87 views

Vertical lines in LaTeX (tabular vs pgfplotstabletypeset)

Why don't these 2 tables have identical vertical lines? \documentclass{article} \usepackage{array} \usepackage{booktabs} \usepackage{pgfplotstable} \usepackage{pgfplots} \begin{document} ...
1
vote
1answer
108 views

Horizontal line in the middle (text alignment)

MWE: \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,amsthm} \begin{document} \begin{gather*} y=3x-6 --- {1}\\ y=-x+5 --- {2}\\ \end{gather*} \end{document} Picture: How do I join ...
3
votes
1answer
86 views

Listings: line number separator rule

Here I found a similar question with horizontal rule, which answer I don't understand to a degree I could use it to solve my problem: Adding a horizontal rule between caption and lstlisting inside a ...
4
votes
3answers
125 views

Underline a page head

I have the following code: \documentclass{article} \makeatletter \renewcommand\ps@headings{ \def\@evenhead{foo bar} \def\@oddhead{foo bar} } \makeatother \begin{document} \pagestyle{headings} ...
5
votes
1answer
84 views

\hrule with vertical margin

Is it possible to specify a vertical margin for \rule or \hrule? When I say abc \hrule def the line "touches" the text above and below, so I would like it to have a margin of about 1mm.
5
votes
2answers
102 views

hrule inside minipage refuses to show up

Inside a minipage, \hrule doesn't seem to do anything unless there is already some material inside the minipage. \documentclass{article} \begin{document} \hrule width\textwidth\relax \noindent ...
6
votes
3answers
166 views

How to change width of concrete \hline in table?

How can I change concrete \hline width? Maybe does anything exist like \hline[2mm]? PS: \setlength{\arrayrulewidth}{2mm} is inadequate in my situation because it changes all lines width in a table.
1
vote
0answers
15 views

Remove whitespace generated with \rule [duplicate]

I am trying to create a simple edge border to an a4 sheet using the \rule command \newgeometry{left=0cm,right=0cm, top=0cm, bottom=0cm} \hbox{ % Horizontal box %\hspace*{0.1\textwidth} % Whitespace ...
0
votes
1answer
47 views

Best way to include a line under title

I'm trying have a line that spans the width of the page after my name and title. Something that looks similar to this: I am hoping that there's a document class that will allow me to do it easily, ...
3
votes
1answer
70 views

Memoir: Change color of header rule when using a copied pagestyle

Using memoir class, I am trying to change the color of the header's rule as proposed in Set header and footer rule color in memoir. However, the following code won't change the rule's color: ...
1
vote
1answer
69 views

insert \hline in datatool importing .csv

I'm trying make a table with the datatool package and a .csv created from an Excel file. I'd like this code to be as generic as possible since I will have to import a lot of .csv in this document. ...
3
votes
2answers
141 views

Formatting a specific cell in a table

I am trying to format a table with no success. I basically trying to add a line after the case 3 (first set). There should basically be a separation between the first set of cases (after -7) with the ...