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

footmisc + marginfix + (\marginpar or todonotes) = error #10

Closed
ghost opened this issue May 25, 2023 · 5 comments
Closed

footmisc + marginfix + (\marginpar or todonotes) = error #10

ghost opened this issue May 25, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented May 25, 2023

Feeding

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

or

\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}
                  
?

Unfortunately, the explanation of “lost some margin notes” in § 13 of the documentation of marginfix says nothing to me. Having a bit more text, say,

\begin{document}
test

\marginpar{test}% or \todo{test} if you happen to use todonotes

test
\end{document}

doesn't help.

Used versions:

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

  • LaTeX2e <2022-11-01>

  • L3 programming layer <2022-11-02>

  • article 2022/07/02 v1.4n

  • footmisc 2022/03/08 v6.0d

  • marginfix 2020/05/06 v1.2

  • todonotes 2021/06/04 v1.1.5

These versions were in TeX Live in Debian-testing this spring.

Who is the culprit? Any more permanent bugfix than \usepackage{footmisc}[=v5] (thx to David Carlisle) or loading marginfix before footmisc (thx to Frank Mittelbach)?

Crossposts: http://github.com/shicks/marginfix/issues/19 and http://github.com/henrikmidtiby/todonotes/issues/71 .

Old version of the same bug: https://tex.stackexchange.com/questions/652835/footmisc-marginfix-todonotes-error .

Probably related: http://github.com/shicks/marginfix/issues/18 .

@FrankMittelbach
Copy link
Owner

footmisc contains an updated output routine (that will eventually make it into the LaTeX kernel, even if not quite in that form) and marginfix patches low-level into the old one. Both packages try to do their thing in a way that other packages aren't effected, but footmisc is actually somewhat more successful :-)

So if you change the loading order (marginfix first) your problem vanishes.

I could change footmisc to anticipate the patching of \@combinefloats even if it happens later (and I may do so, but mid-term it would be best if fixmargin is not patching internals of the OR whether old or new) --- for this the kernel version will get apprpriate hooks so that such issues will not happen in the future if every package uses the right interfaces.

@ghost
Copy link
Author

ghost commented May 25, 2023

@FrankMittelbach Thank you! Indeed, changing the order of loading gets rid of the bug:

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

I've just pinged the marginfix maintainer on this and updated the two remaining bug reports (todonotes now excluded) with information you provided.

@ghost ghost changed the title footmisc + marginfix + todonotes = error footmisc + marginfix + (marginpar or todonotes) = error May 25, 2023
@ghost ghost changed the title footmisc + marginfix + (marginpar or todonotes) = error footmisc + marginfix + (\marginpar or todonotes) = error May 25, 2023
@ghost
Copy link
Author

ghost commented May 26, 2023

@FrankMittelbach Since your message implies that marginfix is now less successful than footmisc concerning patching the output routine, does marginfix still work as originally intended? Or, if it no longer works properly, could marginfix be dropped?

@FrankMittelbach
Copy link
Owner

@AlMa0r nothing like that was implied, that was kind of a midnight joke.

@FrankMittelbach FrankMittelbach added the enhancement New feature or request label May 26, 2023
@ghost
Copy link
Author

ghost commented May 26, 2023

@FrankMittelbach I see you've just adapted footmisc; thanks a lot! Will be looking forward to test it as soon as it gets into TeX Live!

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

No branches or pull requests

1 participant