I've been trying to find a satisfying solution to the footnotes-in-tables-problem for hours now. Nothing I come across seems to work the way it should. Still, in the tabularx
package documentation it is stated that tabularx
supports \footnote
.
I've tried using the
\footnote{footnote text}
command in the tabularx
environment, and it for sure shows the footnote in the table (hallelujah!), but not the footnote text (not so much hallelujah).
I've also tried
\footnotemark[footnote#]
with
\footnotetext[footnote#]{footnote text}
somewhere underneath the table, which works perfectly fine, except that you have to keep track of the counters yourself, which results in tragedy when you insert a normal \footnote
elsewhere in the text on the page.
The best solution would be if one could have lettered footnotes in the table and numbered for the text, but \footnotemark
does not support using letters as numbers.
So… does anyone understand how tabularx
works with footnotes?
A MWE:
\begin{table}[!h]
\centering
\caption{Characteristics of the most common reactor types}
\label{tab:reactor-properties}
\begin{tabularx}{0.8\textwidth}{*{4}{L}}
\toprule
Type & Fuel \footnotemark[1] & Moderator & Coolant \\
\midrule
LGR \footnotemark[2] & \ce{UO2}, enr. & Graphite, \ce{H2O} & \ce{H2O}(\emph{l}) \\
\bottomrule
\end{tabularx}
\end{table}
\footnotetext[1]{enr. = enriched in \ce{^{235}U}, nat. = natural}
\footnotetext[2]{There were four such reactors at the Chernobyl plant at the time of the accident \cite{nuclear-energy}}
EDIT: The solution offered by David Carisle worked perfectly for a day or so. I have no idea why it stopped working, but both the footnote-text and references have stopped working in a minipage-tabularx-environment. A MWE:
\documentclass[a4paper,11pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry,parskip,setspace,amsmath,amssymb,amsfonts,gensymb}
\usepackage[english]{babel}
\usepackage[per-mode=symbol]{siunitx}
\usepackage{graphicx,tabularx,booktabs,multirow,url,hyperref}
\usepackage[hang,small,bf]{caption}
\usepackage[version=3]{mhchem}
\usepackage[page,toc]{appendix}
\usepackage[ref]{cite}
\usepackage{fancyhdr}
%Footnotes in table
\makeatletter
\newtoks\FTN@ftn
\def\pushftn{%
\let\@footnotetext\FTN@ftntext\let\@xfootnotenext\FTN@xftntext
\let\@xfootnote\FTN@xfootnote}
\def\popftn{%
\global\FTN@ftn\expandafter{\expandafter}\the\FTN@ftn}
\long\def\FTN@ftntext#1{%
\edef\@tempa{\the\FTN@ftn\noexpand\footnotetext
[\the\csname c@\@mpfn\endcsname]}%
\global\FTN@ftn\expandafter{\@tempa{#1}}}%
\long\def\FTN@xftntext[#1]#2{%
\global\FTN@ftn\expandafter{\the\FTN@ftn\footnotetext[#1]{#2}}}
\def\FTN@xfootnote[#1]{%
\begingroup
\csname c@\@mpfn\endcsname #1\relax
\unrestored@protected@xdef\@thefnmark{\thempfn}%
\endgroup
\@footnotemark\FTN@xftntext[#1]}
\makeatother
%End footnotes in table
% ---------- New Commands ----------
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{document}
\begin{table}[!h]
\begin{minipage}{1\textwidth}
\centering
\caption{Characteristics of the most common desalination processes \cite{ref1} \label{tab:desalination-properties}}
\begin{tabularx}{1\textwidth}{l l L L}
\toprule
Property & Reverse Osmosis & MSF\footnote{For large MSF plants} & MED \\
\midrule
El.\footnote{El. = electrical} energy consumption [\si{\kilo\watt\per\cubic\metre}] & $6.5-12$ & $4-6$ \ref{ref1} & $4.5-12.5$ \\
Th.\footnote{Th. = thermal} energy consumption [\si{\kilo\watt\per\cubic\meter}] & & $55-120$ \ref{ref1} & \\
Plant cost & High & Medium & Low \\
Product quality & Medium\footnote{Energy dependent} & High & High \\
Feed pretreatment & High & Medium & Low \\
Maintenance & High & Low & Low \\
\bottomrule
\end{tabularx}
\end{minipage}
\end{table}
\begin{thebibliography}{9}
\bibitem{ref1} Some reference
\end{thebibliography}
\end{document}
As seen in the screen dump below, footnotetext and references (note, I'm importing a bib-file in my document) are not working inside the tabularx-environment:
Providing the file list given from \listfiles:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size11.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
inputenc.sty 2008/03/30 v1.1d Input encoding file
latin1.def 2008/03/30 v1.1d Input encoding file
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
geometry.sty 2010/09/12 v5.6 Page Geometry
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifvtex.sty 2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
parskip.sty 2001/04/09 non-zero parskip adjustments
setspace.sty 2011/12/19 v6.7a set line spacing
amsmath.sty 2000/07/18 v2.13 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amssymb.sty 2009/06/22 v3.00
amsfonts.sty 2009/06/22 v3.00 Basic AMSFonts support
gensymb.sty 2003/07/02 v1.0 (WaS)
babel.sty 2008/07/08 v3.8m The Babel package
english.ldf 2005/03/30 v3.3o English support from the babel system
siunitx.sty 2012/01/19 v2.4i A comprehensive (SI) units package
expl3.sty 2012/01/19 v3209 L3 Experimental code bundle wrapper
l3names.sty 2011/12/30 v3113 L3 Experimental namespace for primitives
l3bootstrap.sty 2011/12/29 v3110 L3 Experimental bootstrap code
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
color.sty 2005/11/14 v1.0j Standard LaTeX Color (DPC)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/message (HO)
ltxcmds.sty 2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
l3basics.sty 2012/01/15 v3196 L3 Experimental basic definitions
l3expan.sty 2012/01/15 v3196 L3 Experimental argument expansion
l3tl.sty 2012/01/09 v3158 L3 Experimental token lists
l3seq.sty 2012/01/09 v3158 L3 Experimental sequences and stacks
l3int.sty 2012/01/07 v3139 L3 Experimental integers
l3quark.sty 2012/01/08 v3148 L3 Experimental quarks
l3prg.sty 2011/12/31 v3122 L3 Experimental control structures
l3clist.sty 2012/01/09 v3157 L3 Experimental comma separated lists
l3token.sty 2011/12/31 v3123 L3 Experimental token manipulation
l3prop.sty 2012/01/09 v3158 L3 Experimental property lists
l3msg.sty 2012/01/08 v3153 L3 Experimental messages
l3io.sty 2012/01/09 v3160 L3 Experimental input-output operations
l3file.sty 2012/01/09 v3158 L3 Experimental file operations
l3skip.sty 2012/01/07 v3139 L3 Experimental dimensions and skips
l3keys.sty 2011/12/22 v3086 L3 Experimental key-value interfaces
l3fp.sty 2012/01/08 v3154 L3 Experimental floating-point operations
l3box.sty 2012/01/09 v3158 L3 Experimental boxes
l3coffins.sty 2012/01/08 v3155 L3 Experimental coffin code layer
l3color.sty 2011/09/07 v2776 L3 Experimental colour support
l3luatex.sty 2012/01/09 v3158 L3 Experimental LuaTeX-specific functions
array.sty 2008/09/09 v2.4c Tabular extension package (FMi)
l3keys2e.sty 2012/01/19 v3207 LaTeX2e option processing using LaTeX3 keys
xparse.sty 2012/01/19 v3209 L3 Experimental document command parser
translator.sty 2010/06/12 ver 1.10
translator-language-mappings.tex
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
tabularx.sty 1999/01/07 v2.07 `tabularx' package (DPC)
booktabs.sty 2005/04/14 v1.61803 publication quality tables
multirow.sty
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
hyperref.sty 2011/12/04 v6.82m Hypertext links for LaTeX
hobsub-hyperref.sty 2011/04/23 v1.4 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2011/04/23 v1.4 Bundle oberdiek, subset generic (HO)
hobsub.sty 2011/04/23 v1.4 Subsetting bundle oberdiek (HO)
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
intcalc.sty 2007/09/27 v1.1 Expandable integer calculations (HO)
etexcmds.sty 2011/02/16 v1.5 Prefix for e-TeX command names (HO)
kvsetkeys.sty 2011/04/07 v1.13 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Defining keys (HO)
pdftexcmds.sty 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/04/04 v1.12 Provides string conversions (HO)
bigintcalc.sty 2011/01/30 v1.2 Expandable big integer calculations (HO)
bitset.sty 2011/01/30 v1.1 Data type bit set (HO)
uniquecounter.sty 2011/01/30 v1.2 Provides unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2011/01/30 v1.0 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/04/23 v1.7 Hooks at very end of document (HO)
atbegshi.sty 2011/01/30 v1.15 At begin shipout hook (HO)
refcount.sty 2010/12/01 v3.2 Data extraction from references (HO)
hycolor.sty 2011/01/30 v1.7 Color options of hyperref/bookmark (HO)
kvoptions.sty 2010/12/23 v3.10 Keyval support for LaTeX options (HO)
pd1enc.def 2011/12/04 v6.82m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
hpdftex.def 2011/12/04 v6.82m Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
caption.sty 2011/11/10 v3.2e Customizing captions (AR)
caption3.sty 2011/11/01 v1.4a caption3 kernel (AR)
mhchem.sty 2011/06/03 v3.11 for typesetting chemical formulae
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
twoopt.sty 2008/08/11 v1.5 Definitions with two optional arguments (HO)
appendix.sty 2009/09/02 v1.2b extra appendix facilities
cite.sty 2010/09/10 v 5.3
fancyhdr.sty
supp-pdf.mkii
epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf
grfext.sty 2010/08/19 v1.1 Managing graphics extensions (HO)
epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
translator-basic-dictionary-English.dict
siunitx-abbreviations.cfg 2012/01/19 v2.4i siunitx: Abbreviated units
siunitx-binary.cfg 2012/01/19 v2.4i siunitx: Binary units
nameref.sty 2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
"Test document".out
"Test document".out
umsa.fd 2009/06/22 v3.00 AMS symbols A
umsb.fd 2009/06/22 v3.00 AMS symbols B
***********
Best Answer
I think this is a good opportunity to pimp out
parnotes
: