2022 Developer Survey is open! Take survey.

Questions tagged [leaders]

Leaders are the TeX primitives used for creating repetitions of a box to fill up a space, for example in the Table of Contents. Questions about the usage of the TeX primitives \leaders, \cleaders, and \xleaders should be tagged with {leaders}.

Filter by
Sorted by
Tagged with
2 votes
1 answer
23 views

how to make dotted leader in ToC be the same size and style, as title which it follows?

Consider test case: \documentclass{report} \usepackage[titles]{tocloft} \renewcommand{\cftchapfont}{\Large\bfseries} \renewcommand{\cftchapleader}{\cftdotfill{3}} \renewcommand{\cftchappagefont}{\...
user avatar
4 votes
1 answer
255 views

\Dotfill Not Completely Filling Dots

I am typesetting a book and am using \dotfill to produce a sequence of dots extending to the displayed page number in the Table of Contents. Alas, with the following (MWE) code \documentclass[12pt]{...
user avatar
  • 4,969
2 votes
1 answer
54 views

Why are leader skips seemingly ignored in \vsplit?

I've gotten an expected result with a \vplit on a box with leaders. The leaders have a fixed amount of glue, plus stretch and shrink. The fixed amount seems to be ignored in the size calculation, or ...
user avatar
  • 131
1 vote
3 answers
102 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 ...
user avatar
  • 2,870
6 votes
3 answers
296 views

Tabular edge-to-edge dotted line: suppress overshoot, reduce dotsize, align dots to edges

I am trying to add dotted line from left-edge to right-edge of tabular after rows. There are 3-problems with my best attempt (code & screenshot below): 1) The length of the dotted line equals ...
user avatar
  • 1,228
1 vote
2 answers
101 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. ...
user avatar
4 votes
1 answer
160 views

\lowering \leaders

I'm using \leaders to make a flexible width rule, with the statement \leaders 0pt plus 1fil\hrule, but I also want to put text above this line. \rlap{text}\leaders works fine, except that the text is ...
user avatar
0 votes
1 answer
76 views

geometry: Calculate the fillable vertical space for a tcolorbox of vertical leaders

For the last page, a new sentence is typed above the footer that resulted in overlapping with the tcolorbox. Therefore, I would like to make tcolorbox calculate the fillable vertical space of the ...
user avatar
  • 8,759
2 votes
1 answer
93 views

Enclosing leaders by a border/frame

Following-up this answer, how can I edit the command \FillAnswerRules to enclose the leaders by a border/frame by using tocolorbox or mdframed so that I can get the same output of \CountAnswerRules? \...
user avatar
  • 8,759
1 vote
1 answer
116 views

\dotfill not working inside w column

In this example inserting \dotfill inside wr{3cm} column gives no result \documentclass[12pt]{article} \usepackage{array} \begin{document} \begin{tabular}{|p{3.5cm}|} \hline \dotfill \\ \hline \...
user avatar
  • 16k
6 votes
1 answer
159 views

autofill with square-pattern (leaders vs. tikz)

I want to autofill the rest of the line with a gray square-pattern in order give students an area to submit their mathimatical thoughts. My solution is so far: \newcommand\mySE{\vrule height 1pt ...
user avatar
  • 93
1 vote
2 answers
359 views

List of Tables and Figures change the spacing between the dots, dotfill

Using a List of Tables and Figures, see link below. How can I change the spacing between the dots? Is it called "leaders" or "dotfill"? I can adjust the spacing in the ToC using \renewcommand\...
user avatar
  • 101
1 vote
1 answer
152 views

Custom notation table with page reference

I would like to combine this question with this one. The goal is to build a list of notation with the following properties the symbol is on the left in a column with fixed width the description is ...
user avatar
  • 1,285
3 votes
1 answer
55 views

Too few/too many uses of box register in leaders

I'm playing a bit with TeX's leaders and ran into a problem I don't understand. Given the following example code: \documentclass{article} \begin{document} \def\bul{% \begingroup \setbox0=\...
user avatar
  • 12.8k
6 votes
1 answer
478 views

\dotfill but slightly lowered below line

I am using \dotfill to create space for "fill in the blanks" but I do not like that the dots are exactly on the line. I would like the dots to be slightly below line. Is this possible? \documentclass{...
user avatar
  • 2,289
10 votes
2 answers
805 views

How to align consecutive \leaders properly?

I’m trying to build a construct with a box of a fixed filled with \leaders followed by \leaders with \hfill. However at the moment there is a little gap between these two making the pattern irregular, ...
user avatar
  • 53.3k
3 votes
1 answer
323 views

Align leaders to the right end of the enclosing hbox?

Suppose I have an alignment with two columns of centered text. How can I add a \dotfill between these two columns? If I do this \vbox{\halign{% \hfil#\leaders\hbox to 5pt{\hfil.\hfil}\hskip 20pt ...
user avatar
5 votes
1 answer
154 views

Always display leaders, even when I have a line break

Consider this code: \def\leaderfill{\leaders\hbox to 1mm{\hss.\hss}\hfill} \vbox{\noindent\hsize 3.4cm Alpha adslf adsf kalsdf\leaderfill 1123} \bye The output is But I'd like to have dots before ...
user avatar
  • 35.9k
7 votes
1 answer
321 views

\overstrike in ConTeXt, can it overstrike leaders?

I have the something similar to the following: \setuppapersize[A6][A6] \starttext \overstrike{Hello\hfill world!} % Works OK Hello\leaders\hbox{.}\hfill world! % Works OK, nothing special \...
user avatar
  • 599
2 votes
1 answer
614 views

Alignment of \dotfill or \(c/x)leaders to page numbers wtih different amount of digits

I need to create something similar to Table of Contents manually. For that I need dot leaders to go from text of the "chapter" to page number of this "chapter". I tried to use either \dotfill, \...
user avatar
  • 1,624
3 votes
1 answer
3k views

\leaders when at the start of the line

I'm encountering an issue where I have \leaders that occasionally fall at the beginning of the line and as a result, there are no leaders appearing. I have for example: \hsize 9.2cm Lorem ipsum ...
user avatar
  • 599
7 votes
1 answer
883 views

Equivalent Leaders construction

What is the equivalent construction of \leaders\hrule height 1pt depth 1 pt\hskip 20pt \relax in terms of the following construction or something similar \leaders\hbox{\vrule height 1pt depth 1pt}\...
user avatar
  • 253
2 votes
2 answers
2k views

list with dot leaders

I would like to create to create list with dot leaders.Each entry into the list essentially contains four parts: a number, a description, dot leaders and lastly another number. I want it to look like ...
user avatar
  • 21
3 votes
1 answer
217 views

randomly color leaders

After reading a bit on random coloring in LaTeX, I had the idea to use randomly colored leaders in a document. I came up with the following piece of code, which was stolen and modified from the \...
user avatar
  • 2,878
3 votes
1 answer
375 views

Leaders in tocloft with minimum width

How can I redefine the leader in tocloft so that it is has a minimum length? The background is that I always want leaders in TOC to appear with at least two dots, forcing line breaks in titles if ...
user avatar
  • 847
0 votes
1 answer
76 views

White marks around leaders in PDF

Why are there white bars between the leaders and each of the rules in this code when compiled with LuaTeX to a PDF file? When compiled (with LuaTeX) to a DVI file no white bars can be seen. a \vrule ...
user avatar
  • 1,701
4 votes
1 answer
235 views

Make \leaders repeat a string at least a given number of times

Using the glossaries and glossary-longragged packages (In a memoir document) as well as a custom style I found by Googling: \newglossarystyle{dottedlocations}{% \glossarystyle{list}% \...
user avatar
  • 1,299
6 votes
2 answers
2k views

How to align dotfill to the right

I use the following command below to make my list of nomenclature to look like the list of contents, but I am a bit disturbed by the fact that the dots between the text belonging to a symbol in the ...
user avatar
  • 3,467
7 votes
1 answer
708 views

Multiple vertical rules along text – by using \leaders?

I want to draw individual vertical rules on the left side of consecutive paragraphs/vertical boxes covering the vertical skips. In my case for every paragraph/vertical box, there can be different ...
user avatar
  • 4,313
10 votes
2 answers
398 views

leaders and evaluation order

I made this simple latex file : \documentclass{minimal} \usepackage{tikz} \newcommand\randdot{% \tikz{\pgfmathsetmacro{\r}{0.01+0.05*random()}\fill (0,0) circle (\r);}\ } \begin{document} \randdot\...
user avatar
  • 1,681
10 votes
1 answer
1k views

Why \leaders and \mkern works strangely in different font size?

I can hardly determine a good title for this question, I'm sorry. Minimal test code: \documentclass{minimal} \usepackage{lipsum} \begin{document} foo {\fontsize{18}{18}\leaders\hbox{$\mkern 10000mu.\...
user avatar
  • 74k