Stack Exchange Network

Stack Exchange network consists of 175 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
28 views

How do I adjust vertical spacing above \rule line to match that below the line?

I want to know how to adjust vertical spacing above \rule line to match that below the line. I have attempted to solve this problem using the solutions presented for similar questions hrulefill ...
1
vote
1answer
31 views

How to set a line between begin and end?

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{latexsym} \usepackage[linesnumbered,ruled,vlined]{algorithm2e} \SetCommentSty{mycommfont} \usepackage[linkbordercolor={0 0 1}]{...
4
votes
1answer
40 views

Change the color of the header line

The answer to the question fancyhdr - Change horizontal line color on top of footer is not completely satisfactory, because it changes the position of the header line, for example with this example. \...
3
votes
1answer
183 views

Drawing close together horizontal lines in Latex

How can I draw lines like in the picture in Latex? I tried using two consecutive \rule but they are not as close together as I would like them to be. This is how I tried: \noindent\rule{15cm}{0.7pt} \...
5
votes
2answers
151 views

hrule into tikz circle node

I am struggling with inner node layout with Tikz. Basically, I want to add a line under the first text line inside a node, splitting it unevenly. Here is a try: \documentclass{standalone} \...
0
votes
0answers
22 views

How to change the color of the header and footer horizontal lines? [duplicate]

I want to change the color of the lines (i think they are called "rules" in latex) after the heading and before the footer in every page of my report. I used these commands to add them but i couldn't ...
0
votes
1answer
17 views

Modify Floatfoot of Floatrow Package and move Rule

From the floatrow package, I am using the floatfoot command to reference sources and similar content. This MWE produces an output that is quite acceptable: \documentclass{article} \usepackage{...
1
vote
1answer
42 views

How to increase width of \titlerule in \titleformat?

I want to change the width of the \titlerule under every section, the following is my code, I am using \titling and \titlesec packages in order to achieve that. The documentation said I can do {\...
3
votes
1answer
36 views

Horizontal Rules Before and After Multicols

I am trying to make a document that partially mimics the output of macOS's Calendar.app "List" print format, which looks like this: The part I am interested in here is connecting the column ...
3
votes
1answer
31 views

How to add a continuous line at the end of every caption?

I am new to lyx. I would like to know what should i write in the LaTeX preamble of the document to add a continuous line at the end of each caption and another line to separate the foot from the text (...
1
vote
1answer
28 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
23 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
228 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
64 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
26 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
48 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
60 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
214 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
103 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
49 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
62 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
46 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
117 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
138 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
76 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 ...
1
vote
2answers
68 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
31 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} \...
1
vote
1answer
55 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
40 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
143 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
78 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
114 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
429 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
48 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
74 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
80 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
33 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
69 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
148 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
81 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 ...
4
votes
1answer
2k 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
117 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
71 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
54 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
210 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
67 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
200 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
212 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
44 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
144 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 ...