0

I am facing an issue with the list of figures and related lists when using the classicthesis package.

Some line seem to miss proper hyphenation and are therefore appearing to be too long with respect to the surrounding entries and the dots when using the dottedtoc package option:

See the "Time" in "Mean Time Between Failures"

The word "Time" seems to extend beyond the usual text block, but no hbox warning is raised.

Unfortunately, I couldn't find a way to reproduce this problem without using the (quite complicated) classicthesis package and sample document. Therefore the following (not so) mWE assumes that classicthesis.sty and classicthesis-config.tex are available from the linked package site without modifications:

\RequirePackage{fix-cm} % fix some latex issues see: http://texdoc.net/texmf-dist/doc/latex/base/fixltx2e.pdf
\documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,%1headlines,% letterpaper a4paper
                footinclude=true,cleardoublepage=empty,abstractoff, % <--- obsolete, remove (todo)
                BCOR=5mm,paper=a4,fontsize=11pt,%11pt,a4paper,%
                dottedtoc,%
                american,%
                ]{scrreprt}

\input{classicthesis-config}

\begin{document}

\listoffigures

\begin{figure}[h]
    \caption{This is a long caption that I am trying to work out these extremely long words but everything works well.}
\end{figure}

\begin{figure}[h]
    \caption{Participant answers for the observed Mean Time Between Failures (MTBF) in their systems.}
\end{figure}

\begin{figure}[h]
    \caption{Here, everything should work well again without any problems and I don't know why the other entry doesn't work.}
\end{figure}

\end{document}
languitar
  • 808
  • 2
    Not directly a solution to your problem, but a neat workaround that I personally think is also better style: You can use \caption[Short title for List of Figures]{Very long title that needs multiple lines but gives you the chance to explain everything in detail in the main text}. Short captions could then be tweaked to fit into one line (but would still overflow when LaTeX cannot find a good place for breaking) – Wiebke Jun 08 '17 at 08:32
  • @Wiebke I know of this. But even short captions fail in my actual case. – languitar Jun 08 '17 at 08:33
  • Well, I think the problem is that there's not really a spot to break the line: The lines are quite short, so LaTeX cannot stretch/shrink the interword spaces and "Time" cannot be hyphenated. If I recall correctly, classicthesis is using the microtype package to control some of the settings. You could dig into that ... but classicthesis has a reputation of using incompatible packages, so it's probably no fun. Or (if it's not too many captions), you could rewrod, e.g. drop the article: Participant answers for observed Mean Time Between Failures (MTBF) in their systems. seems to fit – Wiebke Jun 08 '17 at 08:44
  • @Wiebke I even added \sloppy to the table of contents. At least with that my though was that things should be breakable. But what confuses me here is that there even aren't any hbox warnings. – languitar Jun 08 '17 at 08:47
  • I'm not sure why you don't get warnings, maybe classicthesis suppresses them. I don't think \sloppy is going to help, see here: https://tex.stackexchange.com/questions/241343/ changing \setlength{\emergencystretch}{5pt} before your \listoffigures helps: It does break the line before Time. But then the next line is ugly, because the systems in the next line goes over. Hyphenating that would be really ugly, because then you'd have a dangling tems in the last line. Rewording may still be your best guess ... – Wiebke Jun 08 '17 at 09:31
  • Or you change the listoffigures layout that classicthesis provides. Would adding \addtolength{\figurelabelwidth}{-1.0em} \cftsetindents{figure}{0em}{\figurelabelwidth} to your preamble work for you? It essentially reduces the space between the label Figure x and the figure caption by 1.0em. Probably would have to be done for the list of tables as well for consistency, and may still cause problems with other captions overflowing. – Wiebke Jun 08 '17 at 09:35
  • @languitar You'd be facing the same problem even if you removed the call to classicthesis-config.tex (and removed dottedtoc, american from the class options), this time "(MTBF)" would be protruding. Try rephrasing or adding a hyphenation point where you think the line should be broken, that should fix it: Ti\-me. – PhilipPirrip Jun 08 '17 at 10:17
  • @languitar You can also play with \begin{addmargin}[0cm]{-0.5cm} \listoffigures \end{addmargin}. – PhilipPirrip Jun 08 '17 at 10:23

0 Answers0