Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rules]

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

1
vote
1answer
17 views

Vertical lines connecting in latex tables - agujournal2018 cls

I am using the agujournal2018 cls files (available here). To make it easier while I am drafting, I want lines in tables. How can I make the vertical lines and horizontal lines connect in tables? I ...
3
votes
1answer
22 views

How to automatically leave lines for translation

I would like to enter a paragraph within a command and, each time it would go onto a new line, leave space and horizontal lines for translation. I can't for the life of me figure out how to do this ...
6
votes
2answers
217 views

Unwanted line break after beginning of solution environment in exam class

Question update: Ulrich's answer (and its iterations) largely achieves the desired behavior: An answer environment (ans is the answer environment in the new MWE provided below) where the end is ...
0
votes
1answer
56 views

Make a ribbon box with text in it

I'm pretty novice in LaTeX and use overleaf to write. Is there any way that I could do this kind of box with a arbitrary text in it that is not linked to any title or chapter - just a black box with ...
2
votes
1answer
24 views

TOC: Avoid rule to be showed in TOC

How can I avoid showing the rule in the TOC: \documentclass{article} \usepackage{fancyhdr,graphicx,blindtext} \usepackage{geometry} \usepackage{showframe,fontawesome} \usepackage{titlesec} \geometry{...
2
votes
3answers
40 views

How to draw rule from left text edge to right paper edge without overfull?

I'm currently using the following instruction to draw a horizontal rule from the left edge of the text body to the right edge of the paper: \rule{\paperwidth}{2pt} This works, but it results in an ...
1
vote
1answer
56 views

Multiple lines of text with \rule?

I'm editing a tex file which generates a calendar. It works great, and I want to add text to a day on the calendar. The calendar looks like this currently: Each cell of the calendar is generated ...
0
votes
1answer
62 views

Draw Horizontal line between rows in latex table

i want to draw horizontal lines between rows in the table. I have tried like this so far, \begin{tabular}{|c|c|} \hline attribute& Art. 16.1.b\&c Aggregated generation per type\\ ...
2
votes
2answers
61 views

insert text in rule

I have difficulty writing a compact command that allows me to insert a text between two lines. I read some links such as this and this, but each one treats the left and right line separately \...
1
vote
1answer
32 views

glossary in long-booktabs style has no bottomrule in minipage

I want to put a longbooktabs glossary in a minipage environment, but when I do that it curiously loses the bottomrule. Is there anything I can do about that? As Nicola Talbot commented it suffices to ...
1
vote
0answers
59 views

Mimicking Latex Style

I recently stumbled across the mathematics textbook Numerical Analysis 9th edition by Burden and Faires and I thoroughly enjoyed the style of it. I was able to find a link too here: https://fac.ksu....
2
votes
1answer
31 views

Incomplete side rule in beamer

This only happens with warsaw theme: \documentclass{beamer} \usetheme{warsaw} \author{diabonas} \title{Frame border} \setbeamertemplate{background canvas}{% {\color{black}\rule{3pt}{\paperheight}\...
2
votes
2answers
103 views

ConTeXt: Place rules above and below floating figure

I'm experimenting to place a rule above and below a floating figure to achieve the following design. But to no avail. I've tried to place a \blackrule before and after the \placefigure. But that's ...
-2
votes
1answer
91 views

Bottom and and top rule when box break using tcolorbox package

Here I want box breaking with continued text and top and bottom rule when its breaking to next pages. Could you please help in this case. Here I attached the required output image. \documentclass{...
1
vote
2answers
47 views

hrulefill vertical spacing

I want to reduce the vertical spacing that comes before and after \hrulefill. I have already tried different options with \hrule, which works fine except for the fact that the line doesn't end where ...
0
votes
0answers
22 views

Longtable - Custom column width and no white spaces between lines

I used an updated version of the code by Mico (https://tex.stackexchange.com/a/271559/146754) to create a long table. 1) How can I remove the white spaces between the black lines 2) How can I assign ...
1
vote
2answers
45 views

indenting or centering \hrule

I am trying to print two horizontal lines to look like a divider in an older book. Using \hrule with slightly different widths and lengths makes the lines look hand laid. But trying to use \moveleft ...
1
vote
1answer
25 views

Span vertical line through page with minipage

I have this code: \documentclass[11pt, showframe]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[margin=2.5cm]{geometry} \usepackage{setspace} \usepackage{tabularx} \...
0
votes
0answers
34 views

Put horizontal lines above and below tabbing and prohibit page breaks between the lines and the tabbing contents

I wish to put a horizontal line above tabbing and another one below it in such a way that there are no page breaks between the tabbing contents and the two lines. Here is what I tried so far: \...
1
vote
1answer
38 views

Tabularx: Reason why customized \hrule exceeds \textwidth?

Any ideas on why my self configured \hrule exceeds the specified \textwidth of my page layout? Minimum Working Example (MWE): \documentclass{article} \usepackage{xcolor,colortbl} \usepackage{...
0
votes
1answer
94 views

Align a \hrule with the right side of the page

\documentclass[12pt,a4paper]{report} \usepackage{titletoc} \begin{document} \hrule width 2cm height 3.5pt\relax \end{document} Given a test document such as the above, how does one align the \...
1
vote
2answers
73 views

How to center a line under a figure

I want to put a line to distinguish the graphics from the text in my document. I found a way to add the line but I want it to be at the same length as the caption and not \linewidth. Although, when I ...
4
votes
1answer
103 views

Adding toprule and bottomrule to the glossary

I figured out how to add the toprule to this glossary, but I failed to do the same for the bottomrule. So, for this MWE, I have two questions: How can I add a bottomrule at the end of the glossary? ...
4
votes
2answers
319 views

Vertical lines in table

I have the next code, but I want that the vertical line be complete (it's cut off near to horizontal line): \begin{table} [H] \footnotesize \sisetup{output-decimal-marker = {,}} \centering \caption{...
0
votes
1answer
44 views

How can I remove the gap that's appearing between a graphic and a rule?

I am trying to put together a title page with a graphic taking up the upper portion, and a block of colour immediately below it. The code in question currently looks as follows: \newgeometry{margin=...
0
votes
1answer
61 views

\hrule length inconsistent

I'm using the tufte-book document class. When I use \hrule, sometimes it extends the text width (which I want), and other times it extends the full page width, apparently randomly. How can I get it ...
1
vote
1answer
64 views

Insert small line above an item in a list without adding extra space (Continued)

This is a follow up to Insert small line above an item in a list without adding extra space. I would like to control the length of the horizontal line to be the same widths as the widest \item in the ...
0
votes
1answer
31 views

Align left margin note with displaystyle math

For one of the packages I'm making, I want to denote part problems in the left margin. I don't want to use e.g. \reversemarginpar since this is up to the user to define. Exercises are always going to ...
0
votes
1answer
65 views

left rule affected if change courier font to other font

My code are follows: \documentclass{book} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \usepackage{unicode-math}% \setmonofont[Path = ./Fonts/ , UprightFont= Iosevka ,]{Iosevka} \...
3
votes
1answer
145 views

Redefine \equation for grid typesetting

Please look at the following MWE: \documentclass[17pt, twocolumn, landscape]{extbook}% \baselineskip=22pt \newdimen\mathheight \newdimen\mathdepth % Redefine \equation for grid typesetting \...
3
votes
1answer
78 views

Ugly overlines on arXiv (and elsewhere)

I have observed that various horizontal and vertical lines look ugly on arXiv (and elsewhere). This includes \overline, \hrule, fraction line, end-of-proof square, lines drawn by xy-pic but not those ...
3
votes
1answer
1k views

How to change a thickness of a hrule?

I am searched for changing a thickness of a \hrule in my report document ? any idea?
2
votes
1answer
98 views

Only one Horizontal line below the Caption of Algorithm in latex

I want only one Horizontal line below the caption in latex algorithm but in my case it gives line below and above the caption as shown. How can I get the desired output ? \documentclass[12pt,a4paper, ...
1
vote
0answers
54 views

Same space between top and bottom rule minitoc

I want to have the exact same space between the top and bottom rule of minitoc. I know I can use : \mtcsetfeature{minitoc}{after}{\vspace{-10pt}} \mtcsetfeature{minitoc}{before}{\vspace{-10pt}} ...
0
votes
1answer
51 views

what is the correct value to move horizontal rule and join it with vertical rule between minipage?

I am redoing the logos (in word) used by my school, I have managed to align the images and the text, but, I can not find the correct value to move the horizontal rule and join it with the vertical ...
1
vote
1answer
184 views

Change colors of the rules in minitoc

I'm deseperatly trying to change the colors of the rules in minitoc. I tried differents things : Try 1 : Change all hrule colors with \makeatletter \let\old@rule\@rule \def\@rule[#1]#2#3{\...
2
votes
2answers
54 views

How to break a \rule over lines?

Is there an easy way to break a rule over multiple lines? I.e. for it to continue flowing just as text would, and not continuing straight through the page border? Specifically, I'm trying to typeset ...
1
vote
1answer
170 views

Writing the rule of three in math mode

When trying to get a nice rule of three in beamer documentclass, using align, I get: Now, I know numbered equations can be avoid with align* environment. Question Is it possible write a small rule ...
6
votes
2answers
199 views

How can I make a “vertical dotfill” environment?

Wanting to highlight parts of my text, intended to be read at second reading, by an inexpensive method in packages, I want to set up an environment that would put points at the beginning and end of ...
0
votes
3answers
43 views

Temporary vertical rule for equations' alignment purpose

How can I obtain a vertical rule like the red one in the figure? Here's the LaTeX code (without the rule): \begin{align}\label{62} \begin{split} \delta_{\chi} \theta_{A} & = \mathcal{...
2
votes
1answer
122 views

Adding Vertical line next to example environment

How would i go about adding a vertical line next to my example environment like in this post: Example environment?. The reason I have not just copied the environment from that post is that, it isn't ...
5
votes
2answers
301 views

Custom shaped horizontal rule spanning the entire document

I learned how to create a simple horizontal rule by reading the question: Horizontal line spanning the entire document in LaTeX I would like to create a chirp-shaped horizontal rule spanning the ...
1
vote
1answer
182 views

Remove top rule of `ruled` algorithm2e

I'd like to use similar styles for pseudocode/algorithms and listings using the algorithm2e package. Therefore I need a line above and below the algorithm but not above the caption. Haven't found any ...
1
vote
1answer
40 views

vrule align with top of the text using multicols

My MWE is: \documentclass{book} \usepackage{showframe} \usepackage{lipsum,multicol} \pagestyle{empty} \setlength{\columnseprule}{2pt} %\setlength{\multicolsep}{-10pt} \begin{document} \lipsum[1] \...
1
vote
1answer
238 views

Error with \hline and similar commands

I am a beginner of LaTex. TeXstudio informs me about this error: "I expect to see \noalign only after the \cr of an alignment. Proceed, and I'll ignore this case." My text is \documentclass{book} \...
0
votes
1answer
195 views

Adding left and top border to a section heading

I would like to have a top and a side border around my section heading like this I'm using titlesec \titleformat to define my sections. So far I've been able to add a top rule by putting a \...
1
vote
1answer
272 views

Create a section rule that is the same width as the section title

I would like to create something that looks like this: Now, I have seen a solution that works with the asker's example environment (using \predisplaysize). However, my desired solution is a little ...
1
vote
2answers
178 views

Problem drawing horizontal line above two columns, line runs through column

I'm somewhat of a beginner in LateX. I want to draw a horizontal line below my abstract to clearly separate it from the rest of the two-column text. When I do so however, the left column starts below ...
2
votes
2answers
177 views

Horizontal line in tabbing environment

I have a tabbing environment and I want next to some text lines a horizontal line up to the end of the page. \hrulefill won't work because of the tabbing. The \noindent\rule{x}{y} will put a line, but ...
2
votes
2answers
117 views

I need to draw a dotted line to divide a page, ignoring the margin

I can draw a rule across the entire pagewidth with the following command: \noindent\makebox[\linewidth]{\rule{\paperwidth}{1pt}} but I can't draw a dotted line. Any ideas? I need the line to divide ...