Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with mhchem package #123

Closed
a-seyler opened this issue Jun 12, 2020 · 3 comments
Closed

Incompatibility with mhchem package #123

a-seyler opened this issue Jun 12, 2020 · 3 comments

Comments

@a-seyler
Copy link

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
Copy link
Author

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
Copy link
Owner

derric commented Jun 17, 2020

This issue seems to be fixed in cleanthesis version 0.4.1 (c5b2c26), see release.
Can you confirm that?

@a-seyler
Copy link
Author

Yes, with the new version the problem is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants