6

I am having a problem with footnotes in lanscape longtable. Below the code I am using ,but the footnote are not appearing at all.Also I tried to use minipage ,but it seems that it doesn't work. Thanks :)

\begin{landscape}

\begin{longtable}{C C C C C C C C C C C C C C C C}

\caption{A simple longtable example}\\
\toprule 
    Study && \multicolumn{2}{C}{Flow} && \multicolumn{3}{C}{Uncertain Parameters} &&\multicolumn{5}{C}{Uncertainty Approach} &&
         Key findings\\
\cline{3-4}
\cline{6-8}
\cline{10-14}
    && Forward & Reverse 
    && Demand & Supply & Others 
        &&SP\footnote{Stochastic Programming.} & RO \footnote{Robust Optimization.}& FP\footnote{Fuzzy Programming.} & Sim & H-A
        &&\\

    \midrule
\endfirsthead

\toprule 
    Study && \multicolumn{2}{C}{Flow} && \multicolumn{3}{C}{Uncertain Parameters} &&\multicolumn{5}{C}{Uncertainty Approach} &&
         Key findings\\
\cline{3-4}
\cline{6-8}
\cline{10-14}
    && Forward & Reverse 
    && Demand & Supply & Others 
        &&SP\footnote{Stochastic Programming.} & RO \footnote{Robust Optimization.}& FP\footnote{Fuzzy Programming.} & Sim & H-A
        &&\\

\endhead
\hline
\endfoot

\hline
\endlastfoot
~\cite{el2010stochastic}\\
Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study
\end{longtable}
\end{landscape}
5
  • Do you want the footnotes to appear at the bottom of the table or at the bottom of the page, with normal footnotes?
    – Bernard
    Apr 29, 2014 at 18:17
  • I want footnotes to appear at the bottom of the table.I am sorry but I am beginner to LATEX,i just started using it couple of days ago :) @Bernard
    – user50793
    Apr 29, 2014 at 18:22
  • What is the C qualifier (instead of the more usual c) for your longtable?
    – Bernard
    Apr 29, 2014 at 18:25
  • It is the normal c for the columns.Can you copy the code to you latex program and see the output.please @Bernard
    – user50793
    Apr 29, 2014 at 18:30
  • OK. Be aware the TeX makes the difference between upeercase and lowercase letters. Moreover there does exist a package that defines the L, C and R qualifiers, but I can't remember which at the time.
    – Bernard
    Apr 29, 2014 at 18:44

1 Answer 1

10

You can do that with the threeparttablex package — if your table really has to be split over pages, else the threeparttable package is enough. Although the former is an extension of the latter, it has specific commands and environments if the table is split.

You must put your longtable inside a ThreePartTable environment and begin with the TableNotes environment, which contains the text of the long table footnotes. The notes are called with the tnote command and they are inserted with the \insertTableNotes which put where you please. I give the example with the notes inserted at the bottom o each page:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}

\usepackage{fourier}
\usepackage{booktabs}
\usepackage{threeparttablex}
\usepackage{longtable} 
\usepackage{lscape} 

\begin{document}
\begin{landscape}
\begin{ThreePartTable}
  \begin{TableNotes}\footnotesize
\item[a] Stochastic Programming.
\item[b] Robust Optimization.
\item [c] Fuzzy Programming.
  \end{TableNotes}
\begin{longtable}{*{16}{c}}

\caption{A simple longtable example}\\
\toprule
    Study && \multicolumn{2}{c}{Flow} && \multicolumn{3}{c}{Uncertain Parameters} &&\multicolumn{5}{c}{Uncertainty Approach} &&
         Key findings\\
\cmidrule{3-4}
\cmidrule{6-8}
\cmidrule{10-14}
    && Forward & Reverse
    && Demand & Supply & Others
        &&SP\tnote{a} & RO \tnote{b}& FP\tnote{c} & Sim & H-A
        &&\\

    \midrule
\endfirsthead

\toprule
    Study && \multicolumn{2}{c}{Flow} && \multicolumn{3}{c}{Uncertain Parameters} &&\multicolumn{5}{c}{Uncertainty Approach} &&
         Key findings\\
\cmidrule{3-4}
\cmidrule{6-8}
\cmidrule{10-14}
    && Forward & Reverse
    && Demand & Supply & Others
        &&SP\tnote{a} & RO \tnote{b}& FP\tnote{c} & Sim & H-A
        &&\\

\endhead
\midrule
\insertTableNotes
\endfoot
\bottomrule
\insertTableNotes
\endlastfoot
%~\cite{el2010stochastic}\\
Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\%
Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study\\Study
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\end{document} 

enter image description here

4
  • Thank you sooooooo much ..I really appreciate it... .This is exactly the output I am looking for and It worked really well :) :)
    – user50793
    Apr 29, 2014 at 19:26
  • Hello again , I have added three more column, and I want to resize the table iam using \resizebox but it doesn't work :(
    – user50793
    Apr 29, 2014 at 20:15
  • I never really used \resizebox. Do you know you can fit your table into the page by: 1) changing the font size locally: if you type \smallat the beginning of the landscape environment, everything will be in 10 pt instead of 12 pt. 2) You can change the horizontal spacing between columns (default is 2×6pt). Just type at the beginning: \setlength\tabcolsep{4pt} for instance. With 19 columns, that makes 76 pt, ~ 26.6 mm.
    – Bernard
    Apr 29, 2014 at 20:35
  • Bernard I can't thank you enough..Many many thanks ..The table fits the page now after changing the columns spacing.
    – user50793
    Apr 29, 2014 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .