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}
Best Answer
The expected behavior can be achieved with using
\footnotemark
andfootnotetext
similar to other classes.MWE:
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
To preserve the possibility of adding vertical offset (as with
\sidenote
), a workaround is to replace\footnotetext{b}
with\makeatletter \@footnotetext[-15pt]{b} \makeatother
.