Closing square bracket in math mode in marginpar
Hello,
with the latest version of classicthesis (4.4, as of 2017-10-13), I noticed a bug (presumably) with the marginpar command. If a closing squared bracket in placed in a marginpar in math mode, LaTeX complains about an extra '}' or a forgotten '$'. With the previous version of classicthesis, this error does not occur.
Here is a MWE to reproduce the problem:
\documentclass{article}
\usepackage[american]{babel}
\usepackage{classicthesis}
\begin{document}
\marginpar{Closing square bracket in math mode $]$}%
Closing square bracket in math mode $]$
\end{document}
I am using texlive 2017 on a Windows machine.
Thanks for looking into this, and especially for your time and dedication to classicthesis. The postcard will be sent as soon as I hand in my thesis :)
Philipp
Comments (5)
-
-
reporter Hi Ivo, thanks a lot for the immediate response and solution!
Philipp
-
add some protection to the optional parameter of marginpar, see issue
#143→ <<cset 57c4e275649a>>
-
- changed status to resolved
unmatched [ and ] won't break the redefined marginpar
-
repo owner Thanks for the report and for the solution.
- Log in to comment
Thanks Philipp, it's a nice find. We did change the redefinition of \marginpar in v4.4. Your ']' is making the optional argument close before it's supposed to. We'll need to change classicthesis.sty and use
instead of
Looks like this is the best we can do: https://tex.stackexchange.com/questions/398366/
Feel free to fix your own copy before our next bugfix release. I hope this won't affect too many people.