My book long front matter page numbers which were sticking out into the margin. Following the memoir
documentation, it was easy to remedy this, as in the MWE which follows.
The documentation (§9.2.2) says that:
"the length used in
\setrmarg
should be greater than the length set in\setpnumwidth
. These values should remain constant in any given document".
It makes sense not to have all kinds of variation, but this means that in my case at least, many pages of TOC have a huge pnumwidth
(and thus sacrifice width for the entries) due to a few lines of long Roman numerals.
I tried a smaller setrmarg
, and this does allow for longer entries, but it doesn't seem to affect the dots, which still stop before the page number box.
So what I would like to do is to restrict the increased pnumwidth
to the front matter (which, coincidentally, does not have dots).
MWE:
\documentclass[%
a4paper,
11pt,
twoside,
one column,
openright
]{memoir}
\setpnumwidth{3.55em}
\setrmarg{5.55em}
\begin{document}
\frontmatter
\setcounter{page}{33}
\tableofcontents
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\cleardoublepage
\mainmatter
\renewcommand{\thefigure}{\arabic{chapter}--\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}--\arabic{table}}
\section{Section}
The section.
\begin{table}
\caption{Table}
Table contents
\end{table}
\end{document}
EDIT: I tried the first approach, putting the \resetpnum
right after \mainmatter
, and the result was peculiar: the box did get reset, but not until a chapter later (in my main file, with multiple chapters and appendices.
Second EDIT: using the longer solution involving \etoolbox
, with the same result. Lines from the .toc
follow:
\contentsline {subsection}{\numberline {1.10.4}Remarks regarding presentation}{20}{subsection.1.10.4}
\defcounter {refsection}{0}\relax
\def \@pnumwidth {0.55em}\def \@tocrmarg {1.55em}
\defcounter {refsection}{0}\relax
\contentsline {chapter}{\chapternumberline {2}Larsa/Senkereh}{21}{chapter.2}
EDIT3 (apparent solution):
Having noted some remarks in the memoir
documentation, section 9.2, page 156 (version v3.7f, 2016/05/16), I tried the code below, which seemed work:
...
\frontmatter
\setcounter{page}{5}% as per Olms format requirements
\cftlocalchange{toc}{3.55em}{5.55em}
\tableofcontents
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables
\cftlocalchange{toc}{1.55em}{2.55em}
\cleardoublepage
...