FrankMittelbach / fmitex-footmisc

The footmisc package originally developed and mainted by Robin Fairbairns
7 stars 2 forks source link

\unvbox inside \footnote with para option #6

Open minamotorin opened 2 years ago

minamotorin commented 2 years ago

Hi, thanks for maintaining footmisc.

When I use para option (\usepackage[para]{footmisc}), \unvbox inside \footnote causes an error: ! Missing } inserted. The cause of this message is \unvbox inside \hbox. What a confusing message….

This is problem if I use \savenotes of footnote package or footnotehyper package, because these packages use \unvbox inside \@footnotetext as \unvbox\fn@notes or \unvbox\FNH@notes to spew out the saved notes. Example code is as follows.

% This program is in the public domain
\documentclass{article}
\usepackage[para]{footmisc}
\usepackage{footnotehyper}
\begin{document}

\begin{savenotes}
  footnote\footnote{text}
\end{savenotes}

\end{document}

Does footmisc package support this?

Thanks.

FrankMittelbach commented 1 year ago

The packages you use in addition to footmisc make the assumption that footnotes are vertical boxes. That assumption is not universally true, e.g., when footmisc with the option para are used then the footnotes are in fact saved as hboxes and eventually compiled into a paragraph only at the very end. Thus the redefinitions done by these packages fail.

One can argue about who has to check for what, but my position here is that we are gradually going to move footmisc functionality to the kernel, i.e., footmisc is core here and other packages should check status before altering the footnote mechanisms. As the situation stands right now the two packages aren't compatible if the "para" option is used.