{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

1
vote
1answer
60 views

Double line rule in memoir header

I need like this header ____________________________________ (this smaller height) ____________________________________ (this bigger height) I guess i need to redefine this from memoir class: \...
3
votes
1answer
97 views

Is it possible to change the box rule thickness of algorithm2e

Is it possible to customize the boxing rule width and color of an algorithm2e float? \documentclass{article} \usepackage{algorithm2e} \begin{document} % \RestyleAlgo{boxed} \RestyleAlgo{boxruled} \...
2
votes
1answer
43 views

Texts, lines and length

It is possible to set the width of the lines depending to text length (text aab's in MWE). Total length text aab's + line should be an equal. And I need also the "Text inside" on the same height as "...
2
votes
1answer
92 views

Drawing a double line

I went to create a horizontal double line that fills the page after some words. The code \newcommand{\raisedrule}[2][0em]{\leaders\hbox{\rule[#1]{1pt}{#2}}\hfill} obtain from LaTeX rule filling ...
4
votes
2answers
296 views

Draw a line halfway down a page

Is there a way to draw a horizontal line across a page at the halfway mark, without changing the text at all? I've got to write a document that is one and a half pages long. I've been trying to ...
3
votes
1answer
49 views

Personalized floatstyle

I would like to personalize some floatstyle. Here is my MWE: \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[english]{...
3
votes
2answers
201 views

Disable the last line at the end of algorithm

If I use the algorithm package as such \begin{algorithm}[h!] ...insert algorithm here... \end{algorithm} I find a line at the end of my algorithm. Without going into detail, I want a algorithm ...
2
votes
1answer
184 views

Remove spaces above and below cmidrule [duplicate]

I'm using booktabs to create table and use cmidrule to span a line across a few columns. The problem is when the cells have background color, the spaces around cmidrule makes it look really bad. ...
3
votes
3answers
104 views

How can I center a set of equations and make a line under one of them?

This is something I need to achieve, I have a problem with the last equation. How can I underline this the same way as above? I've tried writing it as one fraction, but the other fraction in numerator ...
3
votes
1answer
122 views

\fbox thickness different for different size

The thickness of \fbox in LaTeX can be changed by using \fboxrule. But I want different thickness for different sides. Basically I want to write a text with only a border in top and no where. So I am ...
2
votes
1answer
103 views

How to alter style of statement block line in algorithm environment of algorithm2e package?

I'd like to change the style of the line that runs along the side of a statement block in a pseudocode algorithm typeset using the algorithm environment of the algorithm2e package. Here's the initial ...
5
votes
2answers
193 views

Signature field with centred content underneath it

I am using \documentclass[a4paper,12pt,openany,leqno,footinclude=true]{memoir} and want some signature lines that have dotted lines; plus a designation below the line I have: \noindent\begin{...
1
vote
1answer
114 views

Rule in Moderncv

How can one generate a line/rule and the corresponding spacing to the text similar to the \maketitle command within the moderncv (casual) class? What is the thickness and color of the rule in \...
5
votes
3answers
141 views

How to draw a box around something with the dimensions of something else?

I'm using plain TeX and I've lifted a macro \boxed from the TeXbook (where it is called \cstok and slightly different) to put boxes around things in math mode: \def\boxed#1{\hbox{\vrule\vtop{\vbox{\...
3
votes
2answers
84 views

Custom enumerate label with short horizontal rule [closed]

I'd like to make an enumerated list with a short line in front of the item label. Like this: _____ 1. Item #1 text _____ 2. Item #2 text _____ 3. Item #3 text My original idea was to use this ...
3
votes
2answers
92 views

Automatically scale vertical rule to fit the text height

I'm trying to modify the style of the sections in moderncv package. Specifically, I want sections to have a vertical rule on their right side of the height of the section text. Below is the non-...
1
vote
1answer
43 views

Vertical bar/rule table alignment

Would anyone know how to set up a vertical bar in the table so it is proportional at both ends of the table? Code: \newcolumntype{L}{p{0.00\textwidth}} \newcolumntype{R}{>{\raggedright\...
1
vote
1answer
79 views

Rule at the end of chapter: vertical and horizontal aligning

I want to place in the end of the chapter a short horizontally centered line, aligned vertically in the proportions of 2:3. Everything works except of the horizontal alignment. MWE: \documentclass{...
1
vote
0answers
146 views

miktex-makemf source file not found(subfont hbf2gf)

I was writing in TexMaker when an error suddenly occurred after i compiled. The error that shows up on every build is: Process started Running miktex-makemf.exe... miktex-makemf: The ...
4
votes
3answers
94 views

Creating rule inside environment that is same width as text

I have an environment which left and right skips are set to same value. Inside it I have a text and a rule below that text. I want rule to have exactly same width as text above it. (Similarly to what ...
3
votes
1answer
55 views

Create a heading with a horizontal bar interrupted by text

I'm trying to create a command that creates text to look like the image attached. Specifically, I want a develop a command, say we call it "CenterTextWithLine", such that I type: \...
4
votes
5answers
265 views

How to draw a rule without knowing its specific width?

I am trying to improve my CV which I am writing using LaTeX. I want to show section headings something like this But I do not know how to; Add white space next to the section title, which is ...
11
votes
1answer
1k 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....
1
vote
2answers
265 views

Overfull hbox in rule below chapter title

I am writing a report with the KOMA-Script class scrreprt. Below each chapter title, I am creating a rule which goes all the way to the end of the paper: This actually works fine, but creates an ...
3
votes
2answers
2k views

What is the default length of \hrule?

When used without parameters, what varfiable controls the length of \hrule? I.e., how can I change the default length of \hrule, other than adding parameters to each instance -- say, to affect ...
3
votes
1answer
40 views

Are there spaces between rules of the tables, how can I delete them?

\documentclass[a4paper,11pt,twoside,openright]{book} % \usepackage{geometry} % \geometry{ % a4paper, % total={210mm,297mm}, % left=20mm, % right=20mm, % top=20mm, % bottom=20mm, % } \...
3
votes
1answer
115 views

How to create a vertical line before a paragraph?

I want to make a formatting like the following in my document: | Remark: | This is my remark. I made an environment to encapsulate the remarks but i do not manage to create a vertical line that ...
2
votes
1answer
335 views

Adding line after section heading

I am trying to add a horizontal line (like \hrule) that starts just after each section's heading, fills the rest of the line, and is vertically aligned with the heading, as shown below. To do so, I ...
2
votes
1answer
117 views

Removing horizontal lines and adding page number to cover letter template

I would like to use Matthew Miller's LaTeX template for cover letters, but since my cover letter is about 2 pages long, I need to do the following: Remove the horizontal line at the end of each page....
4
votes
2answers
120 views

\hrulefill not working as expected in \newcommand

I'm trying to make a simple new command for that creates a break in the text for a "Question and Answer" block preceded and succeeded by a horizontal line. With the existing code (listed below) the ...
4
votes
1answer
48 views

Centering of content below cmidrule

I'm trying to figure out how I can center the columns below a multicolumn statement with a very long text because my current result does not look fine. I didn't find anything related but it is also ...
9
votes
4answers
288 views

drawing music staves with \rule loop

I want to draw blank music staves using nothing but \rule in a loop. (I know there is MusiXTeX and Lilypond, not to mention Tikz, but really, I just want some horizontal lines.) In this example, the ...
4
votes
1answer
119 views

long double line for title

How can I make a long double line for a title like the picture What I have at the moment is this: \documentclass{article} \usepackage{wasysym} \begin{document} \def\doubleunderline#1{% \underline{...
3
votes
2answers
184 views

Add double hline in table below caption

I would like to insert a double \hline below the caption in my table. The caption is positioned at the top of my table. MWE is below. The %\hline \hline line is where I would like the double \hline ...
4
votes
1answer
31 views

Add more space after a dashed rule in biblatex

Following typographic conventions, I'm using a three-em rule in dashed entries in my bibliography. I feel, however, that there is too little space between the rule and the following period. As the ...
2
votes
1answer
43 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 \newcommand{\@...
3
votes
3answers
300 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
308 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
92 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
66 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
109 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} \usepackage{...
2
votes
1answer
440 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 done....
2
votes
0answers
47 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
221 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} \newcommand\TestBox{\parbox[c][3cm][c]{1em}...
5
votes
2answers
144 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
141 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 ...
2
votes
2answers
528 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}{ ...
4
votes
1answer
152 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
220 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 ...
6
votes
1answer
5k 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 ...