The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
12
votes
2answers
371 views

Dotted footnote rule

Here is my code to generate a text with a footnote: \documentclass[titlepage,paper=a4,11pt,onecolumn]{scrartcl} \usepackage[top=3cm, bottom=3.5cm, left=2.5cm, right=2.5cm]{geometry} \usepackage[...
1
vote
1answer
43 views

pgfgantt: How to create vgrid in monthly interval?

Consider the following Minimum Working Example (MWE): \documentclass{standalone} \usepackage{tikz,pgfgantt} \begin{document} \begin{ganttchart}[% time slot format = isodate, ...
2
votes
2answers
65 views

Line breaks with left and right rules

Sometimes, not always, rules are -- like parentheses -- left and right. The previous sentence exemplifies this. In such cases, line breaks oughtn't to separate the left rule from the word to the ...
2
votes
2answers
59 views

modifying default tabular behaviour

I basically do all my tables the same way: Is it possible to make tabular automate the \toprule, \midrule, \bottomrule and \hdashlines? \documentclass{article} \usepackage{booktabs,array,arydshln} \...
0
votes
1answer
28 views

Making spacing after rule at top of page in booktabs longtable consisting with that after other rules in the same table

Appropriately placed, the longtable package code \midrule\endhead places a horizontal rule before the first row on each page after the first produced by a longtable environment. The below simple code ...
1
vote
2answers
44 views

interaction between \usepackage[table]{xcolor} and \hrulefill

This is a followup question on horizontal rule / line inside a multicolumn field In the later the problem regarding the horizontal line was solved but whe using the \usepackage[table]{xcolor} the ...
1
vote
1answer
25 views

horizontal rule / line inside a multicolumn field

I need to have a horizontal line inside a multicolumn cell. When the horizontal line is just in one cell this is without problems possible, when spanning, with multicolumn, over say 2 cells I get an ...
0
votes
1answer
26 views

\hrule within \textblock (from textpos package) does not appear in the output

My code: \documentclass{beamer} \usepackage[absolute,overlay]{textpos} \begin{document} \begin{frame}[fragile,t] \frametitle{Demo} \begin{textblock*}{\textwidth}(20mm,20mm) \vspace{5mm}\hrule ...
4
votes
2answers
105 views

How to put a vertical rule between Beamer columns created with the \column command?

Note: This question is different from https://tex.stackexchange.com/a/95188/18588 because that question works with the column environment but this one is about the \column command. My code: \...
0
votes
1answer
33 views

How to make double headers in memoir? Header with two rulings?

I want to make a header that will have two rulings... Here's what I have so far: \documentclass[a4paper,12pt,oneside,showframe]{memoir} \setlrmarginsandblock{2.5cm}{2cm}{*} \setulmarginsandblock{...
0
votes
0answers
30 views

\vrule inside smallmatrix

I'm using \vrule in the matrix and pmatrix environments, and it works well. However, inside smallmatrix, \vrule doesn't fill all height of row. It looks that smallmatrix adds some vertical space after ...
1
vote
2answers
30 views

Adding initial line on right side of document for each line

I'm creating a series of standard operating procedures in LaTeX that requires an initial next to each list item to say it's complete. Is there any way to automatically add a right aligned initial line ...
1
vote
1answer
39 views

Formatting a table with shortened midrules and centred headings

I have the following table and I am trying to align the 2016 and 2017 values. At the moment the code creates a straight line joining the 2016 and 2017 values. I am trying to get it to look like the "...
2
votes
1answer
39 views

extension of \cmidrule as dashed line

i have a \cmidrule(l){1-7} and would like to extend this as a dashed line in the same style (padding, width, colour, option to trim left and right would be awesome) from column 10 to 14. I tried my ...
0
votes
3answers
80 views

How can I get an \hline as long as the page width?

I want my \hline inside the table as long as the page width. In addition, I want to make it thinner, just like the example picture (the second one). How can I do this? \begin{table}[h] \begin{...
2
votes
2answers
52 views

Add a rule above and below each figure (including caption)

I have a document with a lot of figures and I want to modify them so that there is a horizontal rule above and below each figure so it stands out from the text. That is, I want it to look something ...
1
vote
2answers
43 views

Surround chapter number with horizontal rules

I want to format my chapter headings so they look something like this: ------ 1 --------------------------------- % horizontal rule here Here is the title for chapter 1 -------------------...
2
votes
1answer
41 views

Vruler package clashes with multicol package

Here I used the vrule package for line numbers and the multicol package for two column text for some occurrences say, index. But my page gets down to the bottom of the page. Refer the screen shot. ...
2
votes
0answers
75 views

Typesetting a crossword puzzle in LaTeX

I've been trying to typeset a simple crossword in a nice way in LaTeX, using the cwpuzzle package, but I keep having issues. Namely, lines around the cells seem "doubled" or overlapping. What could ...
2
votes
1answer
27 views

Dashed lines and point-aligned numbers in a column?

How can I have these two features at the same time in a table: dashed lines, and numbers aligned on their decimal points? MWE (except it doesn't work): \documentclass[12pt,a4paper]{article} \...
0
votes
0answers
54 views

Making Horizontal Lines Longer?

I'm trying to use a resume template and my current problem is once I modified the page margins to 1.0in all around, the horizontal lines don't reach my location/dates on the right side like they used ...
1
vote
1answer
42 views

How to create material which is visible on screen but invisible on paper?

You can have LaTeX draw frames around things that are placed inside boxes. You use \fbox for this. How can you have LaTeX draw lines, e.g., frames around things, which are visible when viewing the ...
2
votes
2answers
59 views

Drawing a horizontal \rule through the middle of a line

How can I do something like \noindent\rule{\linewidth}{0.25mm} but in a way that doesn't leave a big gap before it? Currently it's kind of like \bottomrule, almost as if it skips a line. I want it to ...
4
votes
4answers
181 views

How can I make a vertical rule that extends to the edges of an fbox?

Consider the following MWE: \documentclass{minimal} \begin{document} \fbox{some text \vrule{} more text} \fbox{some text \vrule{} more deep text} \fbox{some text \vrule{} more $\int$ tall text} \end{...
1
vote
1answer
47 views

How to stop `hrule` from breaking centering of text inside `center` environment?

For some reason, placing \hrule above center environment makes text in that environment to appear left-aligned. Why? \documentclass[margin=5mm,varwidth=100mm]{standalone} \begin{document} \begin{...
2
votes
1answer
53 views

Cover in latex problem to setting a vertical rule

I am using the example posted by overleaf to create my cover. When I add more items I have the following problems: (1) two pages instead of one cover page and (2) the vertical rule is misaligned. \...
3
votes
1answer
34 views

Lines (rules) and \multicolumn in tabular content built with token lists

Building on the MWE in my first ever question here (Extra space in cells when using token lists to build tabular content), I would like to add multicolumn content and \toprule (\midrule, \bottomrule, ...
1
vote
2answers
62 views

Best alternative to toprule outside table environment

Here is a repro for my problem: \documentclass[10pt]{article} \usepackage[ a4paper, top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm ]{geometry} \usepackage{booktabs} \begin{...
0
votes
1answer
43 views

Drawing horizontal line through center of page

Is it possible to draw a horizontal line through the center of the page (such as with \hrule) regardless of the content of a page.
2
votes
1answer
163 views

Is this way of adding a horizontal line after the frame title stupid?

I use the default beamer theme, where the \defbeamertemplate*{frametitle} has: \strut\insertframetitle\strut\par% so I ignore the \par using \ignorepar command in the following code: \documentclass{...
3
votes
2answers
210 views

custom \midrule length

I just want a simple \midrule that doesn't span the entire page or cell. For instance, with \rule, you can specify dimensions like: \rule[0.2cm]{100pt}{0.5pt} That's as close as I can get it, but ...
0
votes
2answers
26 views

How to get horizontal rules around title and left-aligned author details?

I want to format the title and author section of my report like the authors have done in the image below. I have tried putting two horizontal rules above and below the title, but, if I do this, the ...
2
votes
1answer
236 views

Place, date, signature in one line [duplicate]

I want to put the place on the left side, the date on the center and the signature on the right side. And above them, a line should come. I am trying this on Sharelatex. I couldn't control the ...
1
vote
1answer
65 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
43 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}]{...
5
votes
1answer
172 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. \...
2
votes
1answer
265 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} \...
4
votes
2answers
218 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
25 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
101 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{...
3
votes
1answer
302 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
65 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
46 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
68 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
30 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
250 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
105 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
29 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
62 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 ...
0
votes
1answer
95 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 ...