0

I am using lists of figures and tables in the frontmatter of my document that print "Figure" and "Table" before the corresponding figure/table number. Now I would like to align the caption text that is printed in these lists so that the second/third/etc. line (if it is needed) begins at the same position the first line does.

This is my MWE:

\documentclass[a4paper,11pt,oneside,fleqn]{scrbook}
\usepackage[ngerman,english]{babel} % language listed last is default setting
\usepackage[utf8x]{inputenc}

\usepackage[demo]{graphicx}

\begin{document}

{%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{\tablename~\oldnumberline}%
\listoftables%
} % will print the word 'Table' before the table number
\addcontentsline{toc}{chapter}{List of Tables}

{%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{\figurename~\oldnumberline}%
\listoffigures%
} % will print the word 'Figure' before the figure number
\addcontentsline{toc}{chapter}{List of Figures}

\begin{figure}
\includegraphics[width=0.5\linewidth]{demo}
\caption{This is a really loooooooooooooooooooooooooong figure caption that will take up two lines.}
\end{figure}

\end{document}
1

Use \KOMAoption{listof}{totoc,entryprefix} to get the entries of the lists in the table of contents and to print the prefixes in the lists:

\documentclass[oneside,fleqn]{scrbook}

\KOMAoption{listof}{totoc,entryprefix}

\usepackage[ngerman,english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}

\begin{document}
\tableofcontents
\listoftables
\listoffigures

\begin{figure}
\includegraphics[width=0.5\linewidth]{demo}
\caption{This is a really loooooooooooooooooooooooooong figure caption
         that will take up two lines.}
\end{figure}

\end{document}

enter image description here

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.