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
3 votes
3 answers
100 views

\vbox of the fixed height with leaders is not filled whole

I am trying some samples. They make a frame around the text. I know there are already realized commands for it but I want to practice leaders, rules and boxes in LaTeX. So the examples below are kind ...
Vladimir's user avatar
  • 589
3 votes
2 answers
134 views

How to add a squiggle in the margin next to a paragraph in Plain TeX?

I am trying to reproduce the following in Plain (Xe)TeX (with more oscillations if possible): That is to add a squiggle in the margin next to a given paragraph. I was thinking of the following API: \...
user avatar
0 votes
1 answer
47 views

How can I achieve this formatting of the table of contents (ToC) using titletoc, without running into the problem of unpredictably disappearing dots?

This question is a hopefully a clearer statement of a previous question. I am using titletoc to format my Table of Contents. Two notes right from the start: 1: in my actual document, I am also using ...
linguisticturn's user avatar
1 vote
1 answer
105 views

In the ToC (titletoc), how to make sure the dotted line is never wrongly suppressed?

Edit I have rephrased this question and, following a suggestion by one of the answerers here, I have posted it as a new question, here. The original question Consider the following table of contents: ...
linguisticturn's user avatar
0 votes
1 answer
35 views

Incorrect headrule size in landscape page

The following codes creat a three-page document with wavedot headrule, and the middle page is landscape made by typearea. The problem is: the headrule in the landscape page does not fill up the ...
lyl's user avatar
  • 2,677
2 votes
1 answer
71 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}{\...
Alex Shevchenko's user avatar
4 votes
1 answer
505 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]{...
DDS's user avatar
  • 8,491
2 votes
1 answer
59 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 ...
Dan Levin's user avatar
  • 351
1 vote
3 answers
354 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 ...
Psychonaut's user avatar
  • 3,104
6 votes
3 answers
411 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 ...
codepoet's user avatar
  • 1,306
1 vote
2 answers
161 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. ...
simple jack's user avatar
4 votes
1 answer
335 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 ...
Holden Rohrer's user avatar
0 votes
1 answer
90 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 ...
Diaa's user avatar
  • 9,459
2 votes
1 answer
106 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? \...
Diaa's user avatar
  • 9,459
1 vote
1 answer
175 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 \...
Salim Bou's user avatar
  • 16.8k
6 votes
1 answer
185 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 ...
tern's user avatar
  • 93
1 vote
2 answers
606 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\...
togedo's user avatar
  • 101
1 vote
1 answer
418 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 ...
PeptideChain's user avatar
  • 1,325
3 votes
1 answer
57 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=\...
siracusa's user avatar
  • 13.3k
6 votes
1 answer
630 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{...
wilx's user avatar
  • 2,339
10 votes
2 answers
1k 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, ...
Tobi's user avatar
  • 56k
3 votes
1 answer
371 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 ...
Leonard Michlmayr's user avatar
5 votes
1 answer
173 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 ...
topskip's user avatar
  • 36.9k
7 votes
1 answer
398 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 \...
dreamlax's user avatar
  • 609
2 votes
1 answer
745 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, \...
Rafal's user avatar
  • 1,674
4 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 ...
dreamlax's user avatar
  • 609
7 votes
1 answer
1k 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}\...
user81070's user avatar
  • 263
3 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 ...
ecuser's user avatar
  • 31
3 votes
1 answer
228 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 \...
carsten's user avatar
  • 2,956
3 votes
1 answer
435 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 ...
Andreas's user avatar
  • 867
0 votes
1 answer
83 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 ...
SJU's user avatar
  • 1,721
4 votes
1 answer
265 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}% \...
The V's user avatar
  • 1,401
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 ...
malin's user avatar
  • 3,677
7 votes
1 answer
798 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 ...
e-birk's user avatar
  • 4,363
10 votes
2 answers
423 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\...
Xoff's 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.\...
Leo Liu's user avatar
  • 76.9k