2

I'm trying to remove the indention of the entries within the list of figures and list of tables. Thus that the entries (here the entry 0.1 Test) are left aligned with the header.

However, I can't find an option for this. Someone an idea?

MWE:

\documentclass [] {scrbook}

\begin{document}

\listoftables 

\cleardoubleemptypage

\begin{table}[tbp]
    \centering
    \caption[Test]{Test}
    \label{tab:t}
        \begin{tabular}{cccc}
        \end{tabular}
\end{table}

\end{document}

2 Answers 2

5

Maybe listof=flat does what you want:

\documentclass[
  listof=flat
]{scrbook}
\begin{document}

\listoftables 

\cleardoubleemptypage
\begin{table}[tbp]
    \centering
    \captionabove{Test}
    \label{tab:t}
        \begin{tabular}{cccc}
        \end{tabular}
\end{table}
\end{document}

enter image description here

With listof=flat the needed numwidth for the numbers is measured. So it needs an additional run.


Update:

I would still suggest to use option listof=flat. But since version 3.20 you can also set the indent for table and figure in the lists directly using:

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

Then the default numwidth (2.3em) will not be changed.

enter image description here

Code:

\documentclass[
  captions=tableheading
]{scrbook}[2016/05/10]
\DeclareTOCStyleEntry[indent=0pt]{tocline}{table}
\DeclareTOCStyleEntry[indent=0pt]{tocline}{figure}
\begin{document}
\listoftables
\cleardoubleemptypage
\begin{table}[tbp]
  \centering
  \caption{Test}
  \label{tab:t}
  \begin{tabular}{cccc}
  \end{tabular}
\end{table}
\end{document}

Remark: Use \captionabove instead \caption if the caption is a heading. Then you get the correct space between the caption and the table. If all table captions are headings it is also possible to use the class option captions=tableheading and \caption. See the documentation for more information.

0
0
\documentclass[]{scrbook}
\makeatletter
\renewcommand*\l@figure{\@dottedtocline{1}{0em}{2.3em}}
\let\l@table\l@figure
\makeatother
\begin{document}

\listoftables

\cleardoubleemptypage

\begin{table}[tbp]
    \centering
    \caption[Test]{Test}
    \label{tab:t}
        \begin{tabular}{cccc}
        \end{tabular}
\end{table}

\end{document}

enter image description here

2
  • Is there a difference to the easier switch listof=flat esdd mentioned above or are there any side effects listof=flat cause which I don't see so far? Commented Nov 10, 2015 at 15:01
  • Well the option listof=flat is the official method (unlike me Elke remembers all these options), but I don't know if there is any difference in the result -- the code of the KOMA-classes are not very readable, tons of "ifcase x then" which are difficult to follow up. Commented Nov 10, 2015 at 15:30

You must log in to answer this question.

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