2

Why footnote is printed with multirow when I use mpsupertabular environnement and not in the longtable, & how may it run ? Thanks for yours solutions. Here an exemple : the note 3 isn't printed :

% !TEX TS-program = arara   
\documentclass{scrbook}
\usepackage{supertabular}
\usepackage{longtable}  
\usepackage{multirow}

\begin{document}
\begin{center}
\tablehead{\hline}
\tabletail{\hline}
\tablecaption{mpsupertabular}
\begin{mpsupertabular}{|c|c|c|}
\multirow{2}{*}{primo\footnote{note 1}}&1&1\\*\cline{2-3}
&1&2\footnote{note 2}\\ \hline
\end{mpsupertabular}
\end{center}

\begin{longtable}{|c|c|c|}
\hline\endhead
\hline\endfoot
\multirow{2}{*}{secundo\footnote{note 3}}&2&1\\*\cline{2-3}
&2&2\footnote{note 4}\\\hline 
\caption{longtable}
\end{longtable}
\end{document}
% arara: xelatex

Moreover, I use functions such as \gls{} & other own functions which react by inserting footnotes, as well, the use of \footnotemark & \footnotetext is for me impossible.

  • Does this help? tex.stackexchange.com/questions/174292/… – Augustin May 16 '15 at 12:21
  • @Augustin, it not really helps, because this solution is the same logic than \footnotemark but in the threeparttable environnement. Thanks for your help. We continue our research… – Zouib May 16 '15 at 21:51
2
+50

You could use adjustbox package for get centered tables with footnote and minipage option for this environment

\documentclass{scrbook}
\usepackage{supertabular}
\usepackage{longtable}  
\usepackage{multirow}
\usepackage{adjustbox}

\begin{document}

\begin{center}
\tablehead{\hline}
\tabletail{\hline}
\tablecaption{mpsupertabular}
\begin{mpsupertabular}{|c|c|c|}
\multirow{2}{*}{primo\footnote{note 1}}&1&1\\*\cline{2-3}
&1&2\footnote{note 2}\\ \hline
\end{mpsupertabular}
\end{center}

%\begin{table}
%\begin{minipage}{0.5\textwidth}
%\begin{longtable}{|c|c|c|}
%\hline\endhead
%\hline\endfoot
%\multirow{2}{*}{secundo\footnote{note 3}}&2&1\\*\cline{2-3}
%&2&2\footnote{note 4}\\\hline 
%\caption{longtable}
%\end{longtable}
%\end{minipage}
%\end{table}

\begin{adjustbox}{minipage=0.5\textwidth,margin=0pt \smallskipamount,center}
\begin{longtable}{|c|c|c|}
\hline\endhead
\hline\endfoot
\multirow{2}{*}{secundo\footnote{note 3}}&2&1\\*\cline{2-3}
&2&2\footnote{note 4}\\\hline 
\caption{longtable}
\end{longtable}
\end{adjustbox}
\end{document}

enter image description here

As you can see in the code, there are another way to obtain centered tables with footnote (commented code) without adjustbox package. I suggest you uncomment this code and try run separately each example ...

I see your comment, in that case you can use footnote package and it savebox environment ...

\documentclass{scrbook}
\usepackage{supertabular}
\usepackage{longtable}  
\usepackage{multirow}
\usepackage{footnote}

\begin{document}


\begin{center}
\tablehead{\hline}
\tabletail{\hline}
\tablecaption{mpsupertabular}
\begin{mpsupertabular}{|c|c|c|}
\multirow{2}{*}{primo\footnote{note 1}}&1&1\\*\cline{2-3}
&1&2\footnote{note 2}\\ \hline
\end{mpsupertabular}
\end{center}


\begin{savenotes}
\begin{longtable}{|c|c|c|}
\hline\endhead
%\hline\endfoot
\multirow{2}{*}{secundo\footnote{note 3}}&2&1\\*\cline{2-3}
&2&2\footnote{note 4}\\\hline 
\caption{longtable}
\end{longtable}
\end{savenotes} 

\end{document}
  • I understand your solution, thanks for your work. Unfortunately, I have to print my notes in the footnote space in the bottom of my pages, & not in a minipage… So your idea don't run for me. Now, I'm going to explore the adjustbox package ;) – Zouib May 21 '15 at 10:13
  • Check the new code in my edited response ... – juanuni May 21 '15 at 14:32
  • 1
    Great ! I still don't understand, but it works. I'll add that we must place the footnote package after some other like xcolor cf. tex.stackexchange.com/questions/15827/… – Zouib May 22 '15 at 18:15
  • In addition, it improves my footnotes from other tables ! @juanuni – Zouib May 22 '15 at 18:46
  • Nice comment about xcolor and footnote package ... – juanuni May 23 '15 at 2:30
2

Here's my approach for longtable footnotes which uses mbenotes package.

Note: mbenotes is simply a mbenotes.sty file and you can easily modify the commands from it as per your requirements, which I've done in my solution. Here's the MWE:

% !TEX TS-program = arara
\documentclass{scrbook} \usepackage{supertabular} \usepackage{longtable} \usepackage{multirow} \usepackage{mbenotes} % to print table notes! \usepackage{alphalph} % For extended counters!
%Redefined commands from the "mbenotes.sty", as per current requirements! \renewcommand*{\thetabnote}{\alphalph{\value{tabnote}}} \renewcommand{\tabnotesize}{\rmfamily\upshape\footnotesize} \renewcommand{\maketabmark}{{\hbox{\textsuperscript{{\rmfamily\itshape\scriptsize\thetabmark}}}}} \renewcommand{\tabnoteformat}{\addtolength{\baselineskip}{-1\baselineskip}\addtolength{\parskip}{0.7ex} \leavevmode\llap{\maketabmark}} % For printing a superscript style comma between two tabnote marks! \newcommand{\cmsp}{{\hbox{\textsuperscript{\rmfamily\itshape\scriptsize,\,!}}}} % usage: \tabnotemark[3]\cmsp\tabnotemark[4]
\begin{document}
\begin{center} \tablehead{\hline} \tabletail{\hline} \tablecaption{mpsupertabular} \begin{mpsupertabular}{|c|c|c|} \multirow{2}{}{primo\footnote{note 1}}&1&1\\cline{2-3} &1&2\footnote{note 2}\ \hline \end{mpsupertabular} \end{center}
\begin{longtable}{|c|c|c|} \hline\endhead %\hline\endfoot \multirow{2}{}{secundo\tabnotemark[3]}&2&1\\cline{2-3} &2&2\tabnotemark[4]\ \hline \caption{longtable}
\tabnotetext[3]{note 3} % save note 3 \tabnotetext[4]{note 4} % save note 4 \end{longtable}
\vspace*{-2em} \noindent\rule{0.4\textwidth}{.4pt}\hfil \vspace*{-3em}
\thetabnotes[] % prints table notes!
\end{document} % arara: xelatex

Output:

enter image description here

Alternatively, if you are OK with all footnotes on a page being printed at the page footer, you could use the footnote package and make use of its \savenotes-\spewnotes combination or the savenotes environment. Here's the alternative solution's MWE:

% !TEX TS-program = arara
\documentclass{scrbook} \usepackage{supertabular} \usepackage{longtable} \usepackage{multirow} \usepackage{footnote} % to print table notes! \begin{document}
\savenotes \begin{longtable}{|c|c|c|} \hline\endhead \hline\endfoot \multirow{2}{}{secundo\footnote{note 3}}&2&1\\cline{2-3} &2&2\footnote{note 4}\\hline \caption{longtable} \end{longtable} \spewnotes
\begin{savenotes} \begin{longtable}{|c|c|c|} \hline\endhead \hline\endfoot \multirow{2}{}{secundo\footnote{note 3}}&2&1\\cline{2-3} &2&2\footnote{note 4}\\hline \caption{longtable} \end{longtable} \end{savenotes}
\end{document} % arara: xelatex

Output:

enter image description here

Hope it helps! :)

  • 1
    excellent ! I like \savenotes & \spewnotes ! I'll use that. Your first way is interesting, for now I don't need to follow these settings, but I keep that in my mind. Thanks for your help. – Zouib May 22 '15 at 18:22
  • 1
    @Zouib you're most welcome! Just be careful with \savenotes & \spewnotes combo, as they enclose a group, so watch out! Please read the footnote documentation page 1 for more information. Cheers! – Amar May 22 '15 at 19:42
  • huh! .. and still no bounty!? ;) – Amar May 22 '15 at 19:44
  • Ok, I read the doc. & I understand why footnotes go now to the last page of a table. Sorry for the bounty ^^ : juanuni answered before you & I discover both after. It was a tough choice… I wish I could give you half each ;-) – Zouib May 23 '15 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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