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.

I want to create a simple table whit a few table footnotes as common in scientific journals. I've tried the package tablefootnote and the threeparttable but I can't convert them into a RTF document using LaTeX2RTF. What I want is something that looks like this table but I'm pretty certain that I have to be able to get it into Word or the journal wont accept it.

The question: How do I get footnotes right under the table in a way that I can convert it into a Word-compatible format?

UPDATE

@Peter Gill's example produces this output in Word:

The footnotes are at the bottom of the page

I use R for creating my tables. Most of the time I use the Hmisc latex() function that does a beautiful job but I've found that the ctable package and other vital packages aren't included in LaTeX2RTF and therefore I'm in trouble.

I like LaTeX2RTF since it's very simple to work with but after some more websearching I found this post where the Sciweavers seems to have an implementation that handles footnotes slightly better although complex ctables seem to be an issue. I'll also try to give another try at tex4ht package to see if it will handle more complex solutions (how I wish that I could just send all my TeX files without any issues).

share|improve this question
    
We'd like to keep answers separate from questions, so you should write a separate answer instead of editing your answer ("UPDATE 2") into the question. Self-answers are perfectly admissible, and a well-written answer may earn you additional reputation. –  lockstep Jan 21 '12 at 12:55
    
Ok, I'll change it into an answer but I guess I'll leave @Peter Gill's answer as valid since he made an effort or do you suggest I also change that? –  Max Gordon Jan 21 '12 at 16:12
    
That's up to you, and adding a self-answer while accepting another answer isn't too uncommon. –  lockstep Jan 21 '12 at 16:14

2 Answers 2

Without the code for your table it is difficult to tell what is going wrong with what you have.

However, if you can include an image (have not tried to convert this with LaTeX2RTF), then this example copied form the link you provided seems to produce a table with footnotes:

enter image description here

\documentclass{article}

\begin{document}
\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}
\end{document}
share|improve this answer
    
Thanks, I haven't posted any code since I'm only interested in a solution that gets the footnotes into Word any way possible. I've tried your code, se my update –  Max Gordon Jan 21 '12 at 9:51
    
Ok, I've solved the footnotes with the aid of tex4ht as you can see in my latest update. Thank you for your effort, I chose your answer since it was a good answer even though my solution differs some. –  Max Gordon Jan 21 '12 at 12:31
    
@MaxGordon: I appreciate the thought, but unless you would recommend this solution over what you posted, I think it is not a good idea to accept mine. Think of someone coming across this question in the future, which one should they focus on first (I would think that would be your solution). –  Peter Grill Jan 21 '12 at 18:29
    
Ok, I'll set my answer as the right answer. –  Max Gordon Jan 21 '12 at 21:10
up vote 2 down vote accepted

Ok, so after a lot of testing and looking through the manual for htlatex I've gotten it to work. It's not as intuitive as I would want it but it does an Ok job.

Here's the workflow for getting htlatex to work in Windows 7:

Installation

  1. Download tex4ht
  2. Unzip in a convenient directory (C:\tex4ht)
  3. Add path under control panel (System --> Advanced tab --> Env. variables) under "system variables" Path add in the beginning C:\tex4ht\bin\ht\win32;
  4. I installed ImageMagick and Ghostscript just to on the safe side
  5. In the C:\tex4ht\texmf\tex4ht\base\win32 I changed the first entry to the MiKTeX tfm path: iC:\Program Files (x86)\MiKTeX 2.9\fonts\tfm

Converting to Word

  1. Press Win+R and type cmd to go to command line
  2. Go to the directory with the .tex file
  3. Make sure your .tex filename doesn't contain any spaces (this seems to confuse the script even with "")
  4. Write htlatex filename.tex 'html,word' 'symbol/!' '-cvalidate' to get a html file (it seems to work OK with just htlatex filename.tex but it's the recommended syntax, probably for a good reason)
  5. Open word and open the html file created by htlatex in the same folder as your latex file
  6. Copy and paste the table to any word-document

Here's a sample code of three different ways for creating table footnotes:

\documentclass{article}
\usepackage{ctable}
\usepackage{threeparttable}
\begin{document}

\begin{table}
  \begin{threeparttable}
  \caption{Table with footnotes after the table}
  \label{tab:test1}
  \begin{tabular}{llll}
  \hline
  column 1 & column 2 & column 3\tnote{1} & column 4\tnote{2} \\
  \hline
  row 1 & data 1 & data 2 & data 3 \\
  \hline
  \end{tabular}
  \begin{tablenotes}
    \item[1] tablefootnote 1
    \item[2] tablefootnote 2
  \end{tablenotes}
\end{threeparttable}
\end{table}

\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 \\ \hline
   \end{tabular}\par
   \vspace{-0.75\skip\footins}
   \renewcommand{\footnoterule}{}
  \end{minipage}
\end{table}

\ctable[caption={Just a ctable},
    label=my_ctable,
    pos=!tbp,
    ]
    {lrccrc}
    {
    \tnote[a]{Over 25 $kg/m^2$}
    \tnote[b]{More than 5 cigarettes/day}
    }{\FL
\multicolumn{1}{l}{\bfseries Variable}&
\multicolumn{2}{c}{\bfseries Crude}&
\multicolumn{1}{c}{\bfseries }&
\multicolumn{2}{c}{\bfseries Adjusted}
\NN
\cline{2-3} \cline{5-6}
\multicolumn{1}{l}{}&\multicolumn{1}{c}{Unadjusted}&\multicolumn{1}{c}{95\% CI}&\multicolumn{1}{c}{}&\multicolumn{1}{c}{Adjusted}&\multicolumn{1}{c}{95\% CI}\ML
{\bfseries Overweight}&&&&&\NN
~~No&1.00&ref&&1.00&ref\NN
~~Yes\tmark[a]&0.74&0.67-0.80&&0.69&0.63-0.76\NN[6pt]
{\bfseries Smoking}&&&&&\NN
~~No&1.00&ref&&1.00&ref\NN
~~Yes\tmark[b]&1.13&1.01-1.27&&1.15&1.02-1.29\ML
}

\end{document}

This produces after processing into a Word document:

Converted to MsWord table

As obvious in the picture there is an issue with the footnotes in table 2 where they end up at the bottom of the page. The threeparttable or ctable seem to be a better solution.

share|improve this answer
    
Yep, the threeparttable package might be a better option. Just used it for the first time for this question regarding table-notes-next-to-a-table. So if you don't add the additional minipage code in the linked example you should get what you desire. –  Peter Grill Jan 24 '12 at 18:42

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.