[Tex/LaTex] Todonotes produces double inline notes instead of single margin note (with classicthesis 3.0)

classicthesistodonotes

I am writing my PhD thesis using the classicthesis style/package. Until few days ago I was using TeXLive 2009 from the Ubuntu 11.04 repositories. After I upgraded to Ubuntu 11.10 I decided to install "vanilla" TexLive 2011. Installation went great and after it was finished I upgraded everything with sudo tlmgr upgrade --self --all. Then I recompiled my files and after some adjustments in the preamble (required by the new version of classicthesis, that is v.3.0) the compilation was successful. So far, everything works fine so far except this: I use todonotes in my document and it worked great in my older setup, but now, after the upgrade, all my notes appear as inline notes and the same note is repeated twice! On the other hand the inline notes (i.e. the notes that need to be inline, for ex. \todo[inline}{inline note text}) appear to be correct.

I know I should put MWE here but since this is connected with the classicthesis package I simply can not create MWE code. Therefore I will try to explain how to recreate the error in simplest way:

  1. Locate the installed classicthesis package on the drive and make a copy of the whole folder, or download the zip file from the project's Google Code site and unzip it in it's own folder.
  2. Open the Classicthesis.tex and add \usepackage{todonotes} to the preamble (I added it just before \begin{document} so it is the last loaded package)
  3. Anywhere in the text add \todo{some text} in order to produce margin note
  4. [Optionally] Add somewhere \todo[inline]{this is inline note}
  5. Compile with pdflatex

If I do this, my resulting file show duplicated (double) margin note, that is also placed inline (only left bracket ([) appears in the margin where the note should actually be). The second, inline note, appears as intended.

Why is this happening and how to avoid/correct it?

P.S.: I use Ubuntu 11.10 and TexLive 2011, and from the log file: classicthesis 2011/06/05 v3.0 and todonotes 2011/10/22.

Best Answer

The problem is caused by the redefinition of \marginpar in classicthesis.sty. \marginpar is used by todonotes. It can be fixed by restoring the original meaning, if you don't need the classicthesis marginpar style. Just add this to your document preamble:

\let\marginpar\oldmarginpar
Related Question