General ⇒ Adding footnotes to Tables
Adding footnotes to Tables
Thanks!!!
- Attachments
-
- tableexample.tex
- (562 Bytes) Downloaded 1093 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Adding footnotes to Tables
B.A.
Adding footnotes to Tables
1.- Direct approach
Code: Select all
\begin{table}
\centering
\caption{Composition of AA2099}\label{2099comp}
\smallskip
\begin{minipage}{3.3cm}
\centering
\begin{tabular}{cc}
\hline\hline
Element & wt\% \\ \hline\hline
Al\footnote{PHTTTT!!!} & bal \\
Cu & 2.69 \\
Li & 1.8 \\
Zn\footnote{blahblah} & 0.6 \\
Mg & 0.3 \\
Mn & 0.3 \\
Zr & 0.08 \\ \hline
\end{tabular}\par
\vspace{-0.75\skip\footins}
\renewcommand{\footnoterule}{}
\end{minipage}
\end{table}
You could put the \caption command inside the minipage environment, but this looks bad for narrow tables.
2.- Using the threeparttable package
Put this in the preamble:
Code: Select all
\usepackage{threeparttable}
Code: Select all
\begin{table}
\centering
\caption{Composition of AA2099}\label{2099comp}
\smallskip
\begin{threeparttable}
\begin{tabular}{cc}
\hline\hline
Element & wt\% \\ \hline\hline
Al\tnote{a} & bal \\
Cu & 2.69 \\
Li & 1.8 \\
Zn\tnote{b} & 0.6 \\
Mg & 0.3 \\
Mn & 0.3 \\
Zr & 0.08 \\ \hline
\end{tabular}
\begin{tablenotes}
\item[a] PHTTTT!!!
\item[b] blahblah
\end{tablenotes}
\end{threeparttable}
\end{table}
3.- Using the ctable package
Put this in the preamble:
Code: Select all
\usepackage{ctable}
Code: Select all
\ctable[
caption=Composition of AA2099,
label=2099comp,
%mincapwidth=3 cm,
captionskip=\smallskipamount]{cc}%
{\tnote[a]{PHTTTT!!!}
\tnote[b]{blahblah}}
{ \hline\hline
Element & wt\% \\ \hline\hline
Al\tmark[a] & bal \\
Cu & 2.69 \\
Li & 1.8 \\
Zn\tmark[b] & 0.6 \\
Mg & 0.3 \\
Mn & 0.3 \\
Zr & 0.08 \LL}
Summarizing, test the three alternatives and choose which you want.
Re: Adding footnotes to Tables
-
- Posts: 4
- Joined: Sun Feb 17, 2008 2:34 pm
Re: Adding footnotes to Tables
This table goes center aligned:
\begin{table}
\centering
\begin{tabular}{ll}
a & b \\
c & d \\
\end{tabular}
\end{table}
This one does not:
\begin{table}
\centering
\begin{threeparttable}
\begin{tabular}{ll}
a & b \\
c & d \\
\end{tabular}
\end{threeparttable}
\end{table}
The moment I use threeparttable (with or without tablenotes, with \centering or \begin{center}), the caption stays centered but the table including notes go left aligned. I want the caption and table in the center. How do I fix this?