3

I have noticed in my document the left margin for list of figures and list of tables is different from other part of of the document. It does not start at the same left level like that of \titlerule (See the attached figur). Left margin on LOT

I have tried adjusting the \newgeometryand by re-defining the \setlength for indent but didn't get the result I want. I have also tried few past posts but couldn't fix this.

MWE:

\documentclass[
fontsize=11pt,   % Schriftgröße
DIV=12,          % Seitenaufteilung
BCOR=5mm,        % Bindekorrektur
ngerman,         % für Umlaute, Silbentrennung etc.
paper=a4,        % Papierformat
oneside,         % einseitig
titlepage,       % es wird eine Titelseite verwendet
parskip=half,    % Abstand zwischen Absätzen (halbe Zeile)
toc=bibliography,% Fügt das Literaturverzeichnis ins Inhaltsverzeichnis ein
toc=listof,          % Fügt das Abbildungs- und Tabellenverzeichis ins Inhaltsverzeichnis ein
draft=false,           % Status des Dokuments (final/draft)
%    captions=nooneline     % Beschriftungen nicht zentrieren
]{scrbook}
\usepackage{titlesec, graphicx, geometry, titlecaps}
\titleformat{\chapter}[display]{}        {\normalfont\Large\scshape\titlecap{\chaptertitlename}\enspace\scalebox{1.8} {\thechapter}\filright} {8ex}{\Huge\bfseries\sffamily\filright}  [{\titlerule[0.5pt]}]
\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\begin{document}

\listoftables
\listoffigures

 \begin{figure}
   \caption{Some figure}
 \end{figure}

 \begin{table}
    \caption{some table}
 \end{table}

  \end{document}
1

You have to update the macro that sets the figure or table entry in the LoF/LoT. They are, \l@figure and \l@table, respectively. Here are their defaults under KOMA-script:

\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\let\l@table\l@figure

Here the 1.5em denotes the indent from the left margin, and 2.3 the gap left for the figure/table number. You can redefine them to take a 0pt for the left margin:

enter image description here

\documentclass{scrbook}

\makeatletter
\renewcommand*\l@figure{\@dottedtocline{1}{0pt}{2.3em}}
\renewcommand*\l@table{\@dottedtocline{1}{0pt}{2.3em}}
\makeatother

\begin{document}

\listoftables
\listoffigures

\chapter{A chapter}

\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}

\end{document}
1

With an uptodate KOMA-Script version you can use

\DeclareTOCStyleEntry[indent=0pt]{tocline}{figure}
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}

enter image description here

Code:

\documentclass{scrbook}

\DeclareTOCStyleEntry[indent=0pt]{tocline}{figure}
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}

\begin{document}
\listoftables
\listoffigures

\chapter{A chapter}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\end{document}

Or you can use KOMA-Script option listof=flat. This needs three runs but works also with older KOMA-Script versions.

\documentclass[listfof=flat]{scrbook}

\begin{document}
\listoftables
\listoffigures

\chapter{A chapter}
\begin{figure}\caption{A figure}\end{figure}
\begin{table}\caption{A table}\end{table}
\end{document}

BTW it is not recommended to use titlesec with a KOMA-Script class.

\documentclass[
fontsize=11pt,   % Schriftgröße
DIV=12,          % Seitenaufteilung
BCOR=5mm,        % Bindekorrektur
ngerman,         % für Umlaute, Silbentrennung etc.
paper=a4,        % Papierformat
oneside,         % einseitig
titlepage,       % es wird eine Titelseite verwendet
parskip=half,    % Abstand zwischen Absätzen (halbe Zeile)
toc=bibliography,% Fügt das Literaturverzeichnis ins Inhaltsverzeichnis ein
toc=listof,          % Fügt das Abbildungs- und Tabellenverzeichis ins Inhaltsverzeichnis ein
draft=false,           % Status des Dokuments (final/draft)
%    captions=nooneline     % Beschriftungen nicht zentrieren
]{scrbook}
\usepackage{babel}
\usepackage{graphicx, geometry}

\KOMAoptions{chapterprefix}
\addtokomafont{chapterprefix}{\normalfont\Large\scshape}
\RedeclareSectionCommand[
    beforeskip=-30pt,
    afterskip=20pt,
    innerskip=8ex,
    font=\huge
]{chapter}

\renewcommand*\chapterformat{\chapapp\enspace\scalebox{1.8}{\thechapter}}
\renewcommand*\chapterlineswithprefixformat[3]{%
    #2#3
    \par\vspace*{\dimexpr-\parskip-5pt\relax}\rule{\textwidth}{.5pt}%
}

\DeclareTOCStyleEntry[indent=0pt]{tocline}{figure}
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}

\usepackage{blindtext}
\begin{document}
\listoftables
\listoffigures

\chapter{Ein Kapitel}
\begin{figure}\caption{Some figure}\end{figure}
\begin{table}\caption{some table}\end{table}
\blinddocument
\end{document}
  • Yes, I got the same titlesec error while using it with KOMA-Script. I'll try updating it. Thanks for your time @esdd – Yousaf Oct 14 '16 at 16:19
0

If you're using the tocloft package, you can use these commands (from this answer):

\setlength{\cfttabindent}{0pt} %for tables
\setlength{\cftfigindent}{0pt} %for figures

I had problems with the currently accepted answer affecting other formatting choices in my document.

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.