
El siguiente MWE
\documentclass{article}
\usepackage{titlesec}
\usepackage{footnotebackref}
\begin{document}
\section{Whatever\protect\footnote{Problematic footnote}}
\end{document}
da un error si se cargan los paquetes titlesec
y footnotebackref
(aunque funciona como se esperaba si se elimina alguno de ellos). Intenté usar \footnotemark
y \footnotetext
sin éxito. ¿Alguna idea de lo que podría estar pasando y cómo solucionarlo? (Sé que no es aconsejable usar notas a pie de página en los encabezados, pero de todos modos...)
Respuesta1
Siguiente¿Cómo utilizar el paquete footnotebackref con \footnotemark y \footnotetext?, la solución es utilizar \footnotemark
y \footnotetext
con la siguiente redefinición:
\makeatletter
\LetLtxMacro{\BHFN@Old@footnotemark}{\@footnotemark}
\renewcommand*{\@footnotemark}{%
\refstepcounter{BackrefHyperFootnoteCounter}%
\xdef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}%
\label{\BackrefFootnoteTag}%
\BHFN@Old@footnotemark
}
\makeatother
(Hay que también al \protect
) \footnotemark
. MWE completo:
\documentclass{article}
\usepackage{titlesec}
\usepackage{footnotebackref}
\makeatletter
\LetLtxMacro{\BHFN@Old@footnotemark}{\@footnotemark}
\renewcommand*{\@footnotemark}{%
\refstepcounter{BackrefHyperFootnoteCounter}%
\xdef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}%
\label{\BackrefFootnoteTag}%
\BHFN@Old@footnotemark
}
\makeatother
\begin{document}
\section{Whatever\protect\footnotemark}
\footnotetext{Problematic footnote}
\end{document}