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
3
votes
1answer
34 views

How can I fill a heading with a rule in KOMA classes?

I am customizing section headings for scrartcl and wanted to try adding a rule after the section title filling the line. As suggested in section 12.8. of the KOMA manual, instead of drawing the rule ...
1
vote
2answers
35 views

Excess vertical space when using booktabs cmidrule in math align environment

I'm using booktabs cmidrule in a math align environment. It's working but it's producing too much vertical space. How can I reduce that vertical space. Here's a simple demo \documentclass{article} \...
1
vote
1answer
24 views

Make rule obey margins within enumerate environment

I am using \rule to generate horizontal lines in an enumerate environment. The lines should be equal to the width of the \item text. This works fine if I just use a single enumerate environment. ...
1
vote
1answer
19 views

Hide horizontal line at the end of an algorithm2e algorithm

I am using the algorithm2e package to include a few algorithms in my document. A few of the algorithms are presented side-by-side, and I am not satisfied with how this looks with the bottom horizontal ...
2
votes
2answers
70 views

NiceTabular: Overhang of vertical rule next to a filled block

I created a table with the nicematrix package. It looks quite good except of one point: I used a filled block over multiple rows with some rotated content. But the vertical rule next to the block does ...
1
vote
1answer
29 views

Vertical Rule in PGF Plottable

I just learned to plot tables with pgfplottables and it feels very nice and smooth. Here is my Code example: \documentclass[14pt]{book} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{...
0
votes
1answer
46 views

How to adapt a per-line background to parshape?

I've been adding rules behind each line of text in LuaTeX by filling \localleftbox with a box whose width is set to 0 but whose contents are rules of length \textwidth. So long as I have standard ...
1
vote
1answer
25 views

How to draw a (colored) square at the (upper right) corner of the page?

I think I could draw a square with the \rule command, but I can’t place it at the corner of the page. How can I change the absolute position of my square?
3
votes
5answers
107 views

Strange centering behaviour with nicematrix

With the package nicematrix I try to create a NiceTabular to be able to work with blocks. While doing so, I made some interesting/strange observations. The first thing, I realized: Blocks and rules do ...
1
vote
2answers
26 views

Apply fgruler on the whole document and change it to inch

I want to apply fgruler on my whole document, such that every page has top, left, right, and bottom ruler (if it's not possible, top ruler and left ruler only is ok). Just like when i'm using M. W@rd, ...
4
votes
2answers
112 views

Table border error with \toprule \midrule \vspace [closed]

I have a table with mathematical formulas and I needed to use commands to increase the cell dimensions. However, this hinders the formation of an external border for the tables. How can I get flawless ...
2
votes
1answer
46 views

No horizontal line in \thanks on a title page

Folks, happy holidays. A quick question: when I put \thanks in the below code, I don't see the horizontal line (i.e. separator) that I see in the usual footnote command. I think the issue is with the \...
2
votes
1answer
17 views

How to constrain hline of double line table border to inner border?

I want to keep the horizontal line of this table to the inner border of a double line table. Is this possible? I'd like to prevent the line from extending to the outer border as highlighted in the ...
1
vote
1answer
45 views

How to align rules like this?

I need align this rules but I can't. Can anybody help me?
2
votes
1answer
23 views

adjust rule thickness between row groups in a table

How can I get the horizontal rule between group A and group B to be thicker without disturbing the braces? Do I need to use a different method to obtain the braces in order to achieve this? \...
0
votes
0answers
20 views

Rule above caption of lstlisting too long inside itemize

I want to use the caption package to insert a horizontal bar above the caption/title of a lstlisting environment (+ some other stylings which are not relevant here). The minimal example below shows a (...
0
votes
0answers
24 views

Problems with aligning in \parbox and \rule alignment

I'm using the Twenty Seconds Resume/CV: https://www.latextemplates.com/template/twenty-seconds-resumecv https://www.overleaf.com/latex/templates/twenty-seconds-curriculum-vitae/kfgsngtymkfj However I ...
0
votes
3answers
30 views

Replace dot leaders in the table of contents with a (dotted) rule

I'm working on a proposal with a strict character limit. I expect the funding agency will compute the character count in my document by simply extracting the text from my PDF. The problem is that the ...
1
vote
1answer
86 views

Line above page numbering for even and odd pages

my problem is simple. With the following code I have the line above the page numbering only for even pages. Also For some pages, for e.g. the contents in the header I have for the right and the left ...
1
vote
2answers
61 views

How to center text vertically between two horizontal dotted lines

The MWE is mostly self-explanatory. I would like to make a command which produces the given output. The command should take a mandatory argument specifying the amount of space above/below the text. ...
0
votes
0answers
27 views

Remove spacing around rule in latex

I want to have a rule line that is directly below my line of text. What I am doing is : SomeText Here \rule{11cm}{0.5pt} Some text I would like to not disrupt But this adds an extra row between the ...
0
votes
1answer
37 views

Adjust a given table to a desired number of columns

\documentclass[12pt]{article} \usepackage[letterpaper,margin=1in]{geometry} \usepackage{booktabs} \usepackage{siunitx} \newcolumntype{T}[1]{S[table-format=#1]} \begin{document} \noindent \...
1
vote
2answers
38 views

My table corners are not connected. how to solve this issue

\begin{tabular}{|p{4.25em}|p{15.125em}|p{12.315em}|p{8.565em}|} \toprule \textbf{Variables} & \textbf{Definition} & \textbf{Formula} & \textbf{Source} \\ \midrule Credit ...
0
votes
0answers
31 views

Generating rules for section, subsection and subsubsection

I would like to have a template rule at the beginning of my document, that will make my sections, subsection and subsubsections to look as below: A. FIRST SECTION FONT CENTURY SMALL CAPS BOLD Grey ...
0
votes
2answers
38 views

Partial rule over footer page numbers

I am using KOMA's scrreprt together with fancyhdr and want my page numbers on the outside of each page. So I use: \fancyfoot[LE,RO]{\thepage} which works as expected. Now, how do I add a short ...
0
votes
1answer
40 views

Rules of column width in tabular

I would like to put rules in a tabular to "strike out" a number of consecutive cells within one row. I want these rules to automatically adjust to column width. For example, the width of ...
0
votes
0answers
29 views

Attempt to draw a line is resulting in mysterious mismatched commands

I need to draw a number of lines in a document. Since I may want to change the format of all the lines, I wrote a newcommand (this is only my second attempt at writing my own command). When I ...
4
votes
2answers
52 views

toprule and bottomrule for figures

I have some figure that includes an external file and I would like to include a horizontal line around the included file such that the result is: ------------ figure ------------ caption I have tried ...
1
vote
2answers
95 views

Trim \cdashline from arydshln package

Is there a way to apply left or right trimming to the \cdashline from the arydshln package, similar to \cmidrule(lr)? MWE: \documentclass{article} \usepackage{booktabs} \usepackage{arydshln} \...
3
votes
3answers
95 views

Misplaced \noalign when trying to define a command for cmidrules

When trying to maintain large tables with \cmidrules, I find them tedious to use, so I thought I'd define my own shortcut. Instead of writing \cmidrule{1-3} \cmidrule{4-5} I would simply write \...
0
votes
1answer
34 views

Apply rule filling rest of the line with titlesec

I want to have a rule in the middle of a line which starts at end of a section and goes all the way to the right margin of a page. I have seen several posts with solutions and the best one I found is ...
0
votes
1answer
26 views

How can I break a hline under a section that is overwriting a wrapfigure?

The hline under section is overwriting the wrapfigure. Is there a way to shorten the hline only for that section? Code: \documentclass[a4paper, 11pt]{article} %--------------------------------...
0
votes
1answer
75 views

Remove header line in Latex [duplicate]

I want to remove the header, but I am not sure how to do this. I cannot remove the line in the header. This is the code I am using: \usepackage{sectsty,fancyhdr} \sectionfont{\LARGE\bfseries}% https://...
2
votes
2answers
97 views

Understanding TeX and LaTeX horizontal rules

I just want to have a horizontal rule at the top of the text frame, closed to the top margin. I am trying to know why this is not a trivial issue. As I understand, LaTeX \rule command makes a filled ...
1
vote
1answer
60 views

Place chapter title between 2 thick lines

I'm new to Latex, and I've been trying to style my chapter title. This is similar to what I'm trying to achieve: I've been googling around, checking the Latex Wikibook (https://en.wikibooks.org/wiki/...
1
vote
1answer
55 views

hrulefill center text

So I am trying to center my text across the center of the \makebox. Code: \documentclass[12pt]{article} \begin{document} \makebox[2in]{\hrulefill\rlap{John Doe}\hrulefill} \end{document} Right ...
1
vote
2answers
75 views

\hrulefill with vertical alignment of the line as in dashes

\hrulefill vertically aligns the line at the bottom of the text. There is also \xrfill in the package xhfill which raises the line, but it is raised too much for my esthetics. What I'm looking for is ...
1
vote
0answers
27 views

Killing Reledmac's footnoterule and resurrect LaTeX's one

In this thread Maïeul explains how footnoterules work in Reledmac. in the provided example there are two "standard" (namely not critical) footnotes series. Each of them can have a footnoterule, so ...
1
vote
2answers
113 views

How to remove blank spaces around table rules

I am trying to produce a colored table but the separation lines and the border lines are creating blank spaces that ruins the aesthetics of the table. I wish to remove them. Here is the code I'm ...
2
votes
3answers
55 views

\rule at the end of line not properly justified

I have a list of items with and need for the gaps at the end of the sentence. But sometimes rule is not properly justified if it's at the end. \documentclass{article} \usepackage[utf8]{inputenc} \...
0
votes
1answer
25 views

How to get a line like the pic instead of \rule{6cm}

I was making a template for thesis and this looked better than \rule. How to get this?
3
votes
2answers
212 views

How to add a horizontal rule in align* environment between equations

I am trying to add a horizontal line between aligned equations. I have tried using \rule command, but then the problem is that it itself takes that command as an equation, since I am using \\ before ...
0
votes
0answers
104 views

How can I delete fancyhdr headrule on chapter pages (redefining fancypagestyle{plain} not working)

For a project, I need to have a fancyhdr headrule on regular pages but not on pages with a \part title and with a \chapter title. I have tried this : \fancypagestyle{plain}{% \fancyhf{} \...
1
vote
1answer
33 views

Recoloring Lines in rulercompass

I have the following tikz diagram using the rulercompass library. \begin{tikzpicture}[stop jumping ,constrain] \path (1, 0) node [ruler compass/point=red, label={1}]; \path (-1, 0) node[ruler ...
0
votes
1answer
46 views

Frame thickness with titlesec

How to change the thickness of the frame using titlesec? \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{titlesec} \begin{document} \titleformat{\section}[frame] {\...
4
votes
1answer
129 views

Robustly add a border to the left of a text spanning several pages

I would like to add a border to the left of some indented text, eventually spanning several pages and nested. My goal is similar to Indentation level inside proof but the solution I found back that ...
3
votes
1answer
64 views

Additional hrule in halign after page break

I try to spread a halign over more than one page. I use \filbreak after every line. \tracingonline=1 \advance\vsize by -15cm \def\tablerule{\noalign{\hrule height .3mm\filbreak}} \newcount\posno\...
1
vote
5answers
133 views

Align sentences beneath each other. Like ruler in word!

Essentially, I want to be able align the non-bold sentences underneath each other. In word I would use a ruler. As you would if you ignored all the underlines Canonical Ensemble: System with fixed ...
2
votes
1answer
54 views

\rightbar using framed.sty only (without using mdframed and tcolorbox and tikz)

Is this possible to get rightbar same as leftbar by using framed.sty? I know this is possible by using mdframed or tcolorbox, but want to confirm is this possible by using framed.sty only? PS: Hope ...
1
vote
2answers
61 views

Both leftbar + oframed style

My requirement is follow: and still now I tried is: \documentclass{book} \usepackage{xcolor,framed} \begin{document} \begin{leftbar}\setlength{\fboxsep}{0pt} \begin{oframed} \noindent{{\bf ...

1
2 3 4 5
16