2

I am writing my thesis and have some issues with my List of Figures and List of Tables. I want them to look like my Table of Contents (which I have from here: How to indent TOC-entries (as indexes) which have no numbers with tocbasic?). I have used tocstyle, which is not working anymore.

Code so far:

\documentclass[twoside,11pt,bibliography=totoc]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

\newcommand\tocpageseparator{\hspace{1em}\,}
\newcommand\tocpagenumberbox[1]{\mbox{#1}}

\RedeclareSectionCommands[
tocraggedpagenumber,
toclinefill=\tocpageseparator,
tocnumwidth=3em,
tocpagenumberbox=\tocpagenumberbox
]{chapter,section,subsection,subsubsection,paragraph}


\begin{document}

\tableofcontents
\listoffigures

\chapter{Chapter one}
\section{Section one}

\begin{figure}
    A Figure
    \caption{Figure one - A Figure}
\end{figure}

\end{document}

My List of Figures (and Tables) looks like this: LoF

And I want both to look like this, regarding dots, spacing between caption and page number: ToC

I hope you can help me with my issue. If it is relevant, I am using KOMA-Script.

1 Answer 1

1

You could use \DeclareTOCStyleEntries[...]{tocline}{figure,table} with the same options as for chapter,section,... but without the prefix toc:

\DeclareTOCStyleEntries[
    raggedpagenumber,
    linefill=\tocpageseparator,
    numwidth=3em,
    pagenumberbox=\tocpagenumberbox
  ]{tocline}{figure,table}

Note that you can use this command for chapter,section,... entries too:

\DeclareTOCStyleEntries[
    raggedpagenumber,
    linefill=\tocpageseparator,
    numwidth=3em,
    pagenumberbox=\tocpagenumberbox
  ]{tocline}{chapter,section,subsection,subsubsection,paragraph,figure,table}

Example:

\documentclass[twoside,11pt,bibliography=totoc]{scrreprt}
\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}% needed with outdated TeX distributions
\usepackage[ngerman]{babel}

\newcommand\tocpageseparator{\hspace{1em}\,}
\newcommand\tocpagenumberbox[1]{\mbox{#1}}

\DeclareTOCStyleEntries[
    raggedpagenumber,
    linefill=\tocpageseparator,
    numwidth=3em,
    pagenumberbox=\tocpagenumberbox
  ]{tocline}{chapter,section,subsection,subsubsection,paragraph,figure,table}

\begin{document}
\tableofcontents
\listoffigures

\chapter{Chapter one}
\section{Section one}

\begin{figure}
    A Figure
    \caption{Figure one - A Figure}
\end{figure}
\end{document}
1
  • Perfect, thank you very much :)
    – TVL
    Jan 7, 2021 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .