# Align text in list of figures and list of tables

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

{%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{\figurename~\oldnumberline}%
\listoffigures%
} % will print the word 'Figure' before the figure number

\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}


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}