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
    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
  • 1
    @JohnWickerson: done, thanks for your help. – 0xC0000022L Jun 4 '14 at 16:56
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.