# How to use footnotes in a bytefield?

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?

• Maybe \footnotemark and \footnotetext will work? – John Wickerson Jun 4 '14 at 15:35
• Cool. I suggest you write up your findings in a "self-answer", then that'll be a useful reference to others interested in both footnotes and byte fields :-). – John Wickerson Jun 4 '14 at 16:20
• @JohnWickerson: done, thanks for your help. – 0xC0000022L Jun 4 '14 at 16:56

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}
\bitbox{16}{Magic bytes} &
\end{rightwordgroup} \\
\end{bytefield}

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

\begin{bytefield}{32}

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