0

Feeding

\documentclass{article}
\usepackage{footmisc}
\usepackage{marginfix}
\usepackage{todonotes}
\begin{document}
\todo{test}
\end{document}

to pdflatex leads to a compilation error:

! Package marginfix Error: lost some margin notes.

See the marginfix package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 \end{document}
                  
? Q

Unfortunately, the explanation in § 13 of the documentation of marginfix says nothing to me. Having a bit more text, say,

\begin{document}
test

\todo{test}

test
\end{document}

doesn't help.

Used versions:

  • pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022/Debian)

  • LaTeX2e <2021-11-15> patch level 1

  • L3 programming layer <2022-06-02>

  • article 2021/10/04 v1.4n

  • footmisc 2022/03/08 v6.0d

  • marginfix 2020/05/06 v1.2

  • todonotes 2021/06/04 v1.1.5

This is the current Debian testing TeX Live. In Debian stable TeX Live, the aforementioned code works (or at least worked several months ago).

Who is the culprit and what to do?

2

2 Answers 2

2

You can use an earlier footmisc

\documentclass{article}
\usepackage{footmisc}[=v5]
\usepackage{marginfix}
\usepackage{todonotes}
\begin{document}
\todo{test}
\end{document}
1
0

marginfix patches into \@combinefloats and footmisc uses a new output routine where this no longer works (or rather has no effect it it comes after footmisc. So instead of using the old version of footmisc one can simply load marginfix first.

Given that the the output routine of LaTeX will change (along the lines that footmisc already uses, but with additional hooks for other packages) the low-level patching for something like \@combinefloats the way it is done by marginfix has no future and should be replaced at some point in the future when appropriate hooks are made availabe for "safe" patching.

By the way, the problem is unrelated to todonotes and you can drop the package and use a \marginpar to generate the error.

You must log in to answer this question.