1

In a latex document initialized as follows

\documentclass[captions=nooneline,pagesize,bibliography=totoc,paper=a4,fontsize=12pt,DIV=calc,headings=small,headinclude,captions=tableheading,open=any,fleqn]{scrbook}

how can I change the distance between the page numbering and the caption in a list of figures? I've found a lot of questions about the distance between chapter number and captions but none for the page number and the caption.

At the moment my list looks as shown in this picture:

And I think the distance in the line with page number 103 should be increased, so that it's easier to visually separate the "...-5" from the page number 103. This is how I define my list of figures.

\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}
\newpage
1
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – TobiBS
    Jul 24, 2020 at 19:05

2 Answers 2

2

Use the tocloft package (or use the class controls instead).

% lofpageprob.tex  SE 554963
\documentclass{scrbook}
\usepackage{tocloft}
\usepackage{lipsum}

\begin{document}
\tableofcontents

\newpage
\addcontentsline{toc}{chapter}{List of Figures} % if the LoF is longer than a page, this needs to be called here
\bgroup
\cftsetpnumwidth{2.55em} \cftsetrmarg{3.55em} % increase space for page number
\listoffigures
\egroup

\listoftables

\chapter{First}
\lipsum{1}
\begin{figure}
\centering
A FIGURE
\caption{Figure (Table) with a long caption long caption long caption 
ending in C-5}
\end{figure}
\begin{table}
\centering
A TABLE
\caption{Table (Figure) with a long caption long caption long caption 
ending in C-5}
\end{table}

\end{document}

As you haven't provided an MWE I have no idea why there is no space between C-5 and the page number 103. However, the solution is to increase the width of the box wherein the page number is set.

I did this just for the LoF to show the effect compared with the LoT but it should be the same for all lists, so make the change in the preamble.

Where you placed the \addcontentsline... will return the page number of the last page of the LoF; unfortunate if the LoF has two or more pages.

I have never used the scrbook class so cannot advise you on that. However there was a meesage that it was not a good idea to use tocloft with scrbook but it would go ahead anyway.

0

With the input from Peter Wilsons answer I got on track and found an easy solution for the scrbook class. One can use the following lines within the document:

\makeatletter
\renewcommand{\@pnumwidth}{2em}% default is 1.55em
\renewcommand{\@tocrmarg}{3em}% default is 2.55em
\makeatother

where pnumwidth is the distance between the page number and the caption's text. It's also described in the documentation. There's also a German solution described here. The page number distance in my list of figures looks now like the following image shows:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.