# Classic thesis "Undefined control sequence. [....\relax }}{12}{figure.caption.8}]" error when generating list of figures

I'm using the classic thesis template and I get the following errors on generation of the List of Figures:

/home/report/report.lof:13: Undefined control sequence. [...\relax }}{12}{figure.caption.8}]
/home/report/report.lof:13: Missing number, treated as zero. [...\relax }}{12}{figure.caption.8}]


At first I thought this was because I messed up a figure somewhere, but I commented out all of the figures in my report except one and the error still persists. The one figure still left is structured as follows:

\begin{figure*}[ht!]
\centering
\input{img/some_img.png}
\caption{Caption.}
\label{fig:some_img}
\end{figure*}


The file I'm using to generate the TOC and the accompanying list of figures is exactly the same as the one found here: http://mirrors.ctan.org/macros/latex/contrib/classicthesis/FrontBackmatter/Contents.tex .

Any help would be greatly appreciated!

Edit: Per request, I've created a MWE at sharelatex: https://www.sharelatex.com/project/59e9faabf41d5451ffb89d63

• Welcome to TeX.Stackexchange! Try with \includegraphics{./img/someimg.png} and try to avoid special characters like _ in file names. If this does not help, please make a minimal working example (MWE) Oct 20 '17 at 13:19
• Welcome to TeX.SX! Oct 20 '17 at 13:22
• Added minimal working example Oct 20 '17 at 13:46

The problem is the combination of the subcaption package with the subfig option of the classicthesis package, which causes the subfig package to be loaded. These two packages are not compatible, I suggest to only use the subcaption package and remove the subfig option.

\documentclass{scrreprt}

\usepackage{graphicx}

\usepackage{subcaption}
\usepackage[
%subfig
]{classicthesis}

\begin{document}

\listoffigures

\begin{figure*}[ht!]
\includegraphics[width=\textwidth]{img/log.jpg}
\caption{Test.}
\end{figure*}

\end{document}

• This solved it, thanks! I'm wondering, how do you go about diagnosing these kinds of problems? Oct 20 '17 at 14:16
• @user1870238 simply by constructing a minimal working example (MWE). Make a copy of your project remove everything that will not make the error go away. In the few remaining lines, the source of the problem is located. Oct 20 '17 at 14:19