Nota al pie dentro del encabezado de la sección: Error al usar los paquetes titlesec y footnotebackref

Nota al pie dentro del encabezado de la sección: Error al usar los paquetes titlesec y footnotebackref

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 titlesecy footnotebackref(aunque funciona como se esperaba si se elimina alguno de ellos). Intenté usar \footnotemarky \footnotetextsin é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 \footnotemarky \footnotetextcon 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}

ingrese la descripción de la imagen aquí

información relacionada