このテーブルを longtable に変換しようとしましたが、成功しませんでした。ご協力いただければ幸いです。longtable パッケージはすでに読み込まれています。
\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}
私は次のことを試しました:
\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}
動作しません。解決策は何ですか。longtable なし (最初の構文) では問題なく動作します。
答え1
はそのために行われます。つまり、のthreeparttablex
機能を に持ち込みます。 はと環境を定義します。 後者は、 の前の ThreePartTable 環境ので宣言する必要があります。 コマンドを使用して、任意の場所に挿入します。テーブルノートを参照できます。詳細は、パッケージのドキュメントを参照してください。threeparttable
longtable
ThreePartTable
TableNotes
beginning
longtable
\insertTableNotes
\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}
答え2
\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}