1

I have tried to convert this table to longtable but did not succeed and am hoping that you can help. The longtable-package is loaded already.

\documentclass[a4paper,oneside,abstracton]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{threeparttable}
\usepackage{longtable}
\usepackage[a4paper,bottom=3.1cm]{geometry}
\usepackage{booktabs}

\begin{document}

\begin{table}[!htb]
\centering
\caption{Accepted positions.}
\label{Table:accepted}
\tiny
    \begin{threeparttable}
         \begin{tabular}{llllllll}
             \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
             Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
             \midrule
             2015 02 11.83985 & (279038) & xyz & RA & Dec & 20.3 V & 026 – Obscode & abc \\

            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
        \end{tabular}
     \begin{tablenotes}
        \item [a] Note number 1
        \item [b] Note number 2
     \end{tablenotes}
     \end{threeparttable}
\end{table}

\end{document}

I have tried the following:

\documentclass[a4paper,oneside,abstracton]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{threeparttable}
\usepackage{longtable}
\usepackage[a4paper,bottom=3.1cm]{geometry}
\usepackage{booktabs}


\begin{document}

\begin{center}
\begin{longtable}{llllllll}
\caption{Accepted positions.}
\label{Table:accepted}
    \tiny
    \begin{threeparttable}
    \begin{tabular}
            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
            Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
            \midrule
            \endfirsthead

            {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
            Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
            \midrule
            \endhead

            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
            \multicolumn{8}{r}{{Continued on next page}} \\
            \endfoot

            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
            \endlastfoot
            2015 02 11.83985 & (279038) & xyz & RA & Dec & 20.3 V & 026 – Obscode & abc \\

    \end{tabular}
    \begin{tablenotes}
        \item [a] Note number 1
        \item [b] Note number 2
    \end{tablenotes}
    \end{threeparttable}
\end{longtable}
\end{center}


\end{document}

It's not working. What is the solution. Without longtable - the first syntax - works just fine.

  • 4
    What is the question? – user31729 Jul 30 '15 at 22:21
  • 3
    Again: What is the question? It's not working is not really helpful. A \documentclass{...} ...\begin{document} ... \end{document} would be nice too – user31729 Jul 30 '15 at 22:32
  • Point taken with the MWE. But rejected concerning question. If I knew how to specify I could probably help myself already. But as that's not the case "It's not working" is the only statement that says what's going on and stands for a question. – Lucas Jul 30 '15 at 22:44
  • 1
    If I would say to you: My car -- It's not working... what would your answer be? Oh sure, that must be the engine? – user31729 Jul 30 '15 at 22:56
  • As an car mechanics I would start to help you as a non-car mechanic by looking at the most frequent problems that arise with cars, instead of telling you to learn car mechanics first in order to tell me exactly where the problem is. That's what I as a professional car mechanics am here for. And now that I have provided a working MWE - at least in my compiler - I hope I can be given constructive help. – Lucas Jul 30 '15 at 23:06
3

The threeparttablex is done for that: bringing the functionalities of threeparttable to longtable. It defines a ThreePartTable and a TableNotes environments. The latter must be declared at the beginning of the ThreePartTable environment, before longtable. It is inserted with an \insertTableNotes command, wherever you want.The tablenotes can be referred to. See details in the package documentation.

\documentclass[a4paper,oneside,abstracton]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{threeparttablex}
\usepackage{longtable}
\usepackage[a4paper,bottom=3.1cm]{geometry}
\usepackage{booktabs, caption}

\begin{document}

\begin{ThreePartTable}
  \small
  \begin{TableNotes}
    \item [a] Note number 1
    \item [b] Note number 2
  \end{TableNotes}
  \begin{longtable}{@{}llllllll@{}}
    \caption{Accepted positions.\label{Table:accepted}}\\
    \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
    Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
    \midrule
    \endfirsthead
    Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
    \midrule
    \endhead
    \multicolumn{8}{r}{\textit{continued}}\\
    \endfoot
    \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
    \insertTableNotes
    \endlastfoot

    2015 02 11.83985 & (279038) & xyz & RA & Dec & 20.3 V & 026 – Obscode & abc \\

  \end{longtable}
\end{ThreePartTable}

\end{document}

enter image description here

1
\documentclass[a4paper,oneside,abstracton]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{threeparttable}
\usepackage{longtable}
\usepackage[a4paper,bottom=3.1cm]{geometry}
\usepackage{booktabs}

\begin{document}

%\begin{table}[!htb]
%\centering
%\tiny
\small
%    \begin{threeparttable}
         \begin{longtable}{@{}llllllll@{}}
\caption{Accepted positions.\label{Table:accepted}}\\
             \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
             Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
             \midrule
\endfirsthead
             Date (UT) & Object & Type\tnote{a} & J2000 RA & J2000 Dec & Magn & Location\tnote{b} & Ref \\
             \midrule
\endhead
             2015 02 11.83985 & (279038) & xyz & RA & Dec & 20.3 V & 026 – Obscode & abc \\

            \cmidrule{1-8} \morecmidrules \cmidrule{1-8}
        \end{longtable}
     \begin{enumerate}
        \item [a] Note number 1
        \item [b] Note number 2
     \end{enumerate}
%     \end{threeparttable}
%\end{table}

\end{document}
  • Are the \tnote directives inserting footnote markers? – Mico Jul 31 '15 at 0:01
  • @Mico I guess so, they didn't generate any errors:-) – David Carlisle Jul 31 '15 at 8:23

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.