Incompatibility with mhchem package
Closed this issue · 3 comments
a-seyler commented
Hi,
I am experiencing a incompatibility between cleanthesis and the mhchem package. If I include the mhchem package into my document, compiling fails and I get an error message regarding an undefined control sequence on the first \section{} command.
Minimal (not-)working example:
\usepackage{cleanthesis}
\usepackage[version=4]{mhchem}
\begin{document}
\section{Title of section}
bla bla bla...
\end{document}
(needs the bib-refs.bib from the zip-folder)
or just including
\usepackage[version=4]{mhchem}
in the provided example my-thesis.tex.
The complete error message is:
ERROR: Undefined control sequence.
--- TeX said ---
\in@ #1#2->\begingroup \def \in@@
##1#1{}\toks@ \expandafter {\in@@ #2{}{}#1...l.8 \section{Title of section}
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name. If this message occurs when a LaTeX command is being processed,
the command is probably in the wrong place---for example, the error
can be produced by an \item command that's not inside a list-making
environment. The error can also be caused by a missing \documentclass
command.
a-seyler commented
The following code from cleanthesis.sty causes the error:
\newlength{\lensectionnumber}
\renewcommand{\sectionmark}[1]{%
\markright{%
\ctfontfootertext
\setlength{\lensectionnumber}{0em}
\settowidth{\lensectionnumber}{\textbf{\thesection}\quad}
\protect\begin{minipage}[t]{.72\textwidth}%
{\ }% bad hack to prevent a wrong baseline for the minipage
\protect\raggedleft%
\hangindent=\lensectionnumber%
{\color{ctcolorfootermark}\textbf{\thesection}}%
\quad%
#1%
\protect\end{minipage}%
}%
}
If I comment these lines out, the document compiles fine.
Seems to be the same problem as in issue #101
derric commented
a-seyler commented
Yes, with the new version the problem is fixed.