1

At the moment I am trying to use \footnote inside the rightwordgroup and leftwordgroup environments of a bytefield, as well as inside the labels given to the fields themselves.

The numbering at the text indicates that \footnote had some effect, but the footnote - if there is any added at all - does not appear in the footer.

Is the solution similar to the one here?

1 Answers1

1

The suggestion from John really helped. Separating the \footnotemark from footnotetext and combining it the way seen in this answer worked for me:

\documentclass{report}
\usepackage{pdfpages}
\usepackage{bytefield}

\begin{document}
\begin{bytefield}{32}
    \bitheader{0,15,31} \\
    \begin{rightwordgroup}{\textbf{header\footnote{Some explanation}}}
        \bitbox{16}{Magic bytes} &
        \bitbox{16}{Size\footnote{size of header}}
    \end{rightwordgroup} \\
\end{bytefield}

\newpage
\setcounter{footnote}{0} % reset for demonstration purposes

\begin{bytefield}{32}
    \bitheader{0,15,31} \\
    \begin{rightwordgroup}{\textbf{header\footnotemark{}}}
        \bitbox{16}{Magic bytes} &
        \bitbox{16}{Size\footnotemark{}}
    \end{rightwordgroup} \\
\end{bytefield}

\addtocounter{footnote}{-2} % we used \footnotemark how many times above?
\stepcounter{footnote}\footnotetext{Some explanation}
\stepcounter{footnote}\footnotetext{size of header}
\end{document}

The first bytefield environment (page 1) shows the issue I had, the second (page 2) shows the workaround.