正如以下示例所指出的,固定脚注在 中不能按预期工作minipage
:它们出现的脚注标记(第一个除外)等于(正常)脚注计数器的当前值。
\documentclass{article}
\usepackage{fixfoot}
\DeclareFixedFootnote{\foo}{A first fixed footnote (foo).}
\DeclareFixedFootnote{\baz}{A second fixed footnote (baz).}
\begin{document}
\section{Fixed footnote not within a minipage: okay}
\begin{itemize}
\item Foo\foo{}.
\item Foo\foo{}.
\item Bar\footnote{A non fixed footnote.}.
\end{itemize}
\section{Fixed footnote within a minipage: not okay}
\fbox{%
\begin{minipage}{10cm}
\begin{itemize}
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Bar\footnote{A non fixed footnote.}.
\item Bar\footnote{A non fixed footnote.}.
\end{itemize}
\end{minipage}
}
\end{document}
您有找到解决方法吗?
答案1
这是一个使用etoolbox
包来修补命令的解决方案\@fixed@footnote
\documentclass{article}
\usepackage{fixfoot}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@fixed@footnote{\the\c@footnote}{%
\ifx\@footnotetext\@mpfootnotetext{\noexpand\itshape\alph{mpfootnote}}\else\the\c@footnote\fi}{}{}
\makeatother
\DeclareFixedFootnote{\foo}{A first fixed footnote (foo).}
\DeclareFixedFootnote{\baz}{A second fixed footnote (baz).}
\begin{document}
\section{Fixed footnote not within a minipage: okay}
\begin{itemize}
\item Foo\foo{}.
\item Foo\foo{}.
\item Bar\footnote{A non fixed footnote.}.
\end{itemize}
\section{Fixed footnote within a minipage: not okay}
\fbox{%
\begin{minipage}{10cm}
\begin{itemize}
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Baz\baz{}.
\item Bar\footnote{A non fixed footnote.}.
\item Bar\footnote{A non fixed footnote.}.
\end{itemize}
\end{minipage}
}
\end{document}