0

How to remove the gap between toc leaders and page numbers? I tried this, this, and this approach but none of them worked. I need to make sure the leader dots reach the page numbers. The documentation says "The page numbers are typeset in a fixed width box". Setting \setpnumwidth{0pt} works but then the page numbers are not right aligned anymore.

example

MWE:

\documentclass[12pt,oneside,a4paper]{memoir} \begin{document} \renewcommand{\cftdotsep}{1} \renewcommand{\cftchapterleader}{\cftdotfill{\cftdotsep}} \setcounter{tocdepth}{3} \tableofcontents \chapter{Introduction} \section{Section}\newpage \subsection{Subsection} \chapter{Method}\setcounter{page}{11} \section{Section}\newpage\newpage \subsection{Subsection} \end{document} 
2
  • Considering what Bringhurst (Elements of typographic style) says about dot (and other kinds of) leaders, especially in TOC, maybe you should do without them, and just put the page numbers near the section/subsection titles. Commented Apr 10 at 18:48
  • 1
    @DavidHandelman thanks for the suggestion, but it's required in official format, I can't change the style. Commented Apr 10 at 19:54

1 Answer 1

0

Since you layout is non-standard (and sound very much made for Word), it is probably easiest to just remove the box around the page numbers. Note that this does not send the dots right up to the numbers per how leaders work.

% enable and add \fbox inside the pnum macros to see the actual sizes of the numbers %\fboxsep=0pt \makeatletter \renewcommand*{\cftchapterformatpnum}[1]{% {\cftchapterpagefont#1}% } \renewcommand*{\cftsectionformatpnum}[1]{% {\cftsectionpagefont#1}% } \renewcommand*{\cftsubsectionformatpnum}[1]{% {\cftsubsectionpagefont #1}% } \renewcommand*{\cftsubsubsectionformatpnum}[1]{% {\cftsubsubsectionpagefont #1}% } \makeatother 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.