Intenté convertir esta tabla a tabla larga pero no lo logré y espero que puedan ayudarme. El paquete longtable ya está cargado.
\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}
He probado lo siguiente:
\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}
No funciona. Cuál es la solución. Sin longtable (la primera sintaxis) funciona bien.
Respuesta1
Esto threeparttablex
está hecho para eso: llevar las funcionalidades de threeparttable
a longtable
. Define a ThreePartTable
y a TableNotes
entornos. Este último debe declararse en beginning
el entorno ThreePartTable, antes de longtable
. Se inserta con un \insertTableNotes
comando, donde quieras. Se puede consultar las notas de la tabla. Consulte los detalles en la documentación del paquete.
\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}
Respuesta2
\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}