4

the moment I load the tocloft package and compile, my LoF and LoT are not listed in the ToC anymore. I have to have the Lists displayed in the ToC. I need the tocloft package for other reasons, so working without it is no option as well. Thanks in advance for your help!

without tocloft (this is how I want it to look like):

without tocloft package

with tocloft:

with tocloft package

MWE:

\documentclass[listof=totoc]{scrreprt}  

\usepackage[english]{babel}
\usepackage{tocloft}

\begin{document}

\tableofcontents

\newpage
\listoffigures

\newpage
\listoftables

\end{document}
5
  • 5
    tocloft isn't really compatible to a KOMA class, e.g. scrreprt. Switch to report class, for example and everything should be alright.
    – user31729
    Mar 29, 2017 at 9:04
  • 3
    Maybe you can use KOMA to modify your LoF and LoT. What are your requests? (BTW: For me KOMA is my favorite documentclass) Mar 29, 2017 at 9:10
  • Thanks for your answers! @Marco Daniel My request is that in LoF and LoT it displays "Figure 1 ..." or "Table 1 ..." instead of just the default behavior "1 ..." (I was looking for other solutions than tocloft already but could not find one)
    – Paul
    Mar 29, 2017 at 9:38
  • @MarcoDaniel: Really? I don't use it for years now -- I just don't like it, it's a personal distaste...
    – user31729
    Mar 29, 2017 at 12:18
  • @ChristianHupfer: After I have written my first letter with scrlttr2, I completely switched to KOMA. And Markus is one of the most active developers. It's a kind of honor and a silent thanks. Mar 29, 2017 at 21:25

1 Answer 1

7

Update

If there should be a prefix for the entries in LOF and LOT there is no need to load tocloft. You can simple use KOMA-Script option listof=entryprefix:

\documentclass[
  listof=totoc,
  listof=ignorechapter,% list entries not grouped by chapters
  listof=entryprefix% use prefix for list entries
]{scrreprt}  
\usepackage[english]{babel}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\chapter{Test}
\begin{table}
\caption{A table}
\end{table}
\begin{figure}
\caption{A figure}
\end{figure}
\end{document}

Then \figurename (english default "Figure") and \tablename (english default "Table) will be used as prefixes.

To get another prefix for e.g. figures in LOF use \newcaptionname to define \listoflofentryname. Example:

\newcaptionname{english}{\listoflofentryname}{Fig.}

Original answer

Remove package tocloft and use the possibilities of package tocbasic to modify TOC, LOF and LOT. This package is loaded by all KOMA-Script classes automatically.

\documentclass[listof=totoc,listof=ignorechapter]{scrreprt}  
\usepackage[english]{babel}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\end{document}

If you really want to use package tocloft then add option titles:

\documentclass[listof=totoc]{scrreprt}  
\usepackage[english]{babel}
\usepackage[titles]{tocloft}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\end{document}
2
  • Thank you so much for the fast answer, the second option achieved exactly what I was looking for!
    – Paul
    Mar 29, 2017 at 9:35
  • 2
    @Paul I have updated my answer to show how you can get a prefix for the entries in LOF and LOT using a KOMA-Script option. So there should be no need to load tocloft.
    – esdd
    Mar 29, 2017 at 10:07

You must log in to answer this question.

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