Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What I need to do: footnotes written (typset) in the same paragraph/line within tabular environment. What I am doing:

\begin{table}[!htb]
  \caption{Caption text.}
  \label{tab:text}
  \begin{ruledtabular}
    \begin{tabular}{p}
      & \multicolumn{1}{c}{Reference} \\ \cline{2-1}
      \textrm{Text} & \colrule
      Text & Text & A\footnote{one} B\footnote{Two} & C\footnote{Three} \\
    \end{tabular}
  \end{ruledtabular}
\end{table}

This yields footnotes on three lines at the bottom of the table

a One

b Two

c Three

What I am trying to achieve:

a One; b Two; c Three

After some search, I stumbled upon footmisc package with its para option.

\usepackage[para]{footmisc}

This declaration does nothing but causes result above to be centered instead (of ragged to the right).

Any suggestions will be much appreciated.

ETA: here is a concrete MWE

\documentclass[%
 reprint,
]{revtex4-1}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{color}
\usepackage{float}
%\usepackage[para]{footmisc}
%\usepackage{dblfnote}
\begin{document}
\renewcommand{\arraystretch}{1.05}
\begin {table}[!h]
\caption{\label{tab1}
Table.}
\begin{ruledtabular}
\begin{tabular}{ccc}
\textrm{Label}&
\textrm{Value} &\\
\colrule
1 & One\footnote{testl} \\
2 & Two\footnote{test2} \\
3 & Three\footnote{test3} \\
\end{tabular}
\end{ruledtabular}
\end{table}
\end{document}

which compiles to

enter image description here

share|improve this question

1 Answer 1

You can use threeparttable and the para option from the threeparttable package. However, the space between the notes and the following text is not optimal; this can be corrected with the help of the etoolbox package, to add some spacing at the end of threeparttable. I patching of \TPT@doparanotes was also needed in order to get the appropriate font size for table notes:

\documentclass[reprint]{revtex4-1}
\usepackage[para]{threeparttable}
\usepackage{etoolbox}
\usepackage{lipsum}

% space below table notes
\AtEndEnvironment{threeparttable}{\vskip10pt}{}{}% change here
\makeatletter
% font size for table notes
\patchcmd{\TPT@doparanotes}
  {\TPT@hsize}
  {\TPT@hsize\footnotesize}
  {}
  {}
\makeatother

\begin{document}

\lipsum[4-7]
\begin{threeparttable}[!ht]
  \caption{Caption text.}
  \label{tab:text}
\begin{ruledtabular}
\begin{tabular}{cc}
\textrm{Label}&
\textrm{Value} \\
\colrule
1 & One\tnote{a} \\
2 & Two\tnote{b} \\
3 & Three\tnote{c} \\
\end{tabular}
\begin{tablenotes}
\item[a] the first footnote note.
\item[b] the second note.
\item[c] the third footnote note.
\end{tablenotes}
\end{ruledtabular}
\end{threeparttable}
\lipsum[4]

\end{document}

enter image description here

share|improve this answer
    
Thanks. Got desired output. Minus, I lost formatting. The threeparttable i.e. table object is now centred (needs to be right ragged/justified). Furthermore, I lost the natural spacing between the end of the table and the following text paragraph. Are there options to control these 2 aspects? –  user45903 Feb 12 at 19:09
    
@user45903 Please see my updated answer for a possible solution for the spacing problem. The other issue (the one about formatting), I don't quite understand it. Could you please describe in more detail which seems to be the problem? Better yet, could you please compose a little test document (like the one in my answer) and add it to your question showing the difference bettwen a regular table formatting and the one with threeparttable? –  Gonzalo Medina Feb 12 at 19:29
    
Many thanks @ G. Medina. The document paragraphs are in a justified format. The table however is now centred. The desired output is to have the table justified too. Note: I am using a 2-column document/typset. Unfortunately, I cannot replicate the effect on the test MWE above. –  user45903 Feb 12 at 19:44
    
@user45903 How are you achieving text justification? It's hard to diagnose the problem without any code. Please try to compose an example code reproducing the problem. –  Gonzalo Medina Feb 12 at 20:04
    
@G.Medina. Revtex4-1 controls the formatting, no requirements from my part. Leaving a space (1 line) between text and table makes the latter adhere to text justification (??). Skipping the space renders it centred on the column. Unexpected. –  user45903 Feb 12 at 20:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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