5

It might be extremely simple to solve my problem, but I can't figure it out... I use the tufte-book class and I have a table inside it. In the documentation of the tufte-book class it is written that:

Any \footnotes will automatically be converted to sidenotes.

So, I tied to attach a footnote (NOT a tablenote!), which would amount to a sidenote, to one entry, but the tablefootnote package is no use, I get the error:

No counter 'Hfootnote' defined. \end{table}

This suggests that the hack with \footnotemark and manually setting the counter would not work either. Needless to say that the \sidenote command does not work either. Neither does tabularx.

My code with \sidenote does not compile at all (Minimal Non-Working Example that is...):

\documentclass{tufte-book}%

\usepackage{amsmath}%
\usepackage{amsfonts}%
\usepackage{amssymb}%
\usepackage{graphicx}%

\begin{document}

\begin{table}[htb]
    \centering
    \caption{Principal elementary particles}
        \begin{tabular}{c||c|c|c|c} \hline
             & electron & proton & neutron & photon \\ \hline \hline
            symbol & e$^-$ ($\beta^-$) & p$^+$ (H$^+$) & n$^0$ & $\gamma$ \\ \hline
            el. charge [C] & $-1.602176487 \times 10^{-19}$ & $1.602176487 \times 10^{-19}$ & $0$ & $0$ \\ \hline
            mass\sidenote{at stand-sill} [kg] & $9.10938215 \times 10^{-31}$ & $1.672621637 \times 10^{-27}$ & $1.67492729 \times 10^{-27}$ & $0$ \\ \hline
        \end{tabular}
    \label{tab:PrincipalElementaryParticles}
\end{table}

\end{document}
1
  • 3
    The standard advice on footnotes in tables is that they should be part of the table, and not part of the regular footnote apparatus. Given this advice, it would be better to use the threeparttable package. And since you're using tufte you should really also read the booktabs docs on table design. :-). Here's a nice example of how to use both: Add notes under the table.
    – Alan Munn
    Commented Nov 27, 2011 at 23:06

2 Answers 2

2

The expected behavior can be achieved with using \footnotemark and footnotetext similar to other classes.

MWE:

\documentclass{tufte-book}

\usepackage{amsmath}%
\usepackage{amsfonts}%
\usepackage{amssymb}%
\usepackage{graphicx}%

\begin{document}
First sidenote.\sidenote{a}

\begin{table}[htb]
    \centering
    \caption{Principal elementary particles}
        \begin{tabular}{c||c|c|c|c} \hline
             & electron & proton & neutron & photon \\ \hline \hline
            symbol & e$^-$ ($\beta^-$) & p$^+$ (H$^+$) & n$^0$ & $\gamma$ \\ \hline
            el. charge [C] & $-1.60 \times 10^{-19}$ & $1.60 \times 10^{-19}$ & $0$ & $0$ \\ \hline
            mass\footnotemark{} [kg] & $9.1 \times 10^{-31}$ & $1.67 \times 10^{-27}$ & $1.6 \times 10^{-27}$ & $0$ \\ \hline
        \end{tabular}
    \label{tab:PrincipalElementaryParticles}
\end{table}
\footnotetext{b}
Third sidenote.\sidenote{c}

\end{document}

Please note that \footnotemark [kg] leads to an error, because [kg] is taken as the optional argument to \footnotemark. I made the table a little smaller to avoid an overfull hbox.

The output is enter image description here

To preserve the possibility of adding vertical offset (as with \sidenote), a workaround is to replace \footnotetext{b} with \makeatletter \@footnotetext[-15pt]{b} \makeatother.

4
  • Thanks! Unfortunately this prevents me from adding any vertical offset (optional argument for \sidenote). Do you know a workaround?
    – Count Zero
    Commented Nov 28, 2011 at 12:37
  • Off hand, I only know a hack: Replace \footnotetext{}b with \makeatletter \@footnotetext[-15pt]{b} \makeatother
    – Andy
    Commented Nov 28, 2011 at 13:20
  • That produces the desired effect, thanks! I added it to your answer, hope that's ok. :)
    – Count Zero
    Commented Nov 28, 2011 at 13:54
  • I've found this works with a maximum of one footnote per table, else all the footnotes created with \footnotetext{text here} take the same footnotemark
    – mac
    Commented Dec 3, 2012 at 21:57
0

I'm digging out an almost 10 years old thread, but since it helped me, I'd like to add my contribution.

It is possible to add multiple footnotes in tabularx environment with \footnotetext following corresponding \footnotemark. \footnotetext always uses the current value of the footnote counter, which is modified by \footnotemark, so adding all texts after the marks will add notes with the same numbers. Unfortunately the \@footnotetext hack to offset location did not work.

MWE:

\documentclass{tufte-handout}
\usepackage{tabularx}

\begin{document}
\begin{tabularx}{\textwidth}{rX}
    f1 & very long description spanning multiple lines 
         of text multiple lines multiple lines multiple 
         lines multiple lines multiple multiple lines 
         multiple multiple lines multiple multiple lines 
         multiple multiple lines multiple multiple lines 
         multiple multiple lines multiple \footnotemark 
         \footnotetext{this is table footnote}\\

    f2 & very long description spanning multiple lines 
         of text multiple lines multiple lines multiple  
         lines\footnotemark  multiple lines multiple 
         multiple lines multiple \footnotetext{this is another table footnote}\\

    f3 & very long description spanning multiple lines 
         of text multiple lines multiple lines multiple 
         lines\footnotemark \footnotetext{yet another table footnote}\\
\end{tabularx}
\end{document}

Output: tabularx in tufte-handout with multiple footnotes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .