1

since switching to Linux and therefore switching from MiKTeX to TeX Live, I'm having problems getting all my documents compiled with a custom class made by a fellow student from my university.

The class I'm using is the iodhbwm, which is also available at CTAN. The class itself is based on scrreprt.

I prepared a minimal example, which works just fine in Overleaf, but not with my local compiler:

\documentclass[load-dhbw-templates]{iodhbwm}
\usepackage[T1]{fontenc}

\dhbwsetup{%
    author              = John Doe
}

\begin{document}
    \tableofcontents    % Print ToC
    \chapter{Test Chapter}\label{chap:test-chap}
\end{document}

Here is the Error log

I've already searched for possible solutions, but most are based on wrong usage of packages. I'm 100% confident, my minimal example is working with MiKTeX and in Overleaf.

If needed, I'm on Manjaro Linux with KDE Plasma, using TeXStudio 3.0.4 and TeX Live 2020. Here are my installed packages.

0
1

Update

iodhbwm 2021-02-15 v1.2.2 fixes the issue.

Original answer

The iodhbwm class uses a deprecated option to \AfterPackage. More precisely, it does

\AfterPackage!{hyperref}{<code to load cleveref>}

The current version of scrlfile no longer accepts ! and this causes cleveref to be loaded before hyperref. Indeed, one of the first error messages you get is

! Package cleveref Error: cleveref must be loaded after hyperref!

Workaround until the class is updated: pass the withdeprecated option to scrlfile.

\documentclass[load-dhbw-templates,withdeprecated]{iodhbwm}
\usepackage[T1]{fontenc}

\dhbwsetup{%
    author              = John Doe
}

\begin{document}
    \tableofcontents    % Print ToC
    \chapter{Test Chapter}\label{chap:test-chap}
\end{document}

The fix to the class is easy: remove the ! after \AfterPackage.

1
  • You literally saved my bachelor thesis! Thank you so much for this simple solution! – Bastian Feb 15 at 10:53

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.