我的论文末尾有一个longtable,代码如下
\documentclass[journal]{IEEEtran}
\usepackage{longtable}
\usepackage{lipsum}
%\usepackage{capt-of}
\makeatletter
\def\LT@makecaption#1#2#3{%
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #2}\\{\normalfont\footnotesize\scshape #3}\par\addvspace{0.5\baselineskip}\egroup\endgraf%
\@IEEEtablecaptionsepspace}%
\hss}}}
\makeatother
\begin{document}
\lipsum[4-9]
\begin{table}[]
\centering
\caption{State Table for My Machine\label{design1}}
\begin{tabular}{cccc}
\hline
a&b&c&d\\
\hline
1&2&3&4\\
\hline
\end{tabular}
\end{table}
\onecolumn
\begin{longtable}{lccccccccccccccr}
\caption{State Table for My Machine}\label{design2}\\
\hline
\multicolumn{2}{c}{Initial State} & R & C & sel & loc & \multicolumn{6}{c}{mol} & cre & con & r\_c & Final State \\
& & & & & & 5 & 4 & 3 & 2 & 1 & 0 & & & & \\
\hline
\endfirsthead
\multicolumn{16}{l}{Table \ref{design} continued from previous page...}\\
\hline
\multicolumn{2}{c}{Initial State} & R & C & sel & loc & \multicolumn{6}{c}{mol} & cre & con & r\_c & Final State \\
& & & & & & 5 & 4 & 3 & 2 & 1 & 0 & & & & \\
\hline
\endhead
\hline
\endfoot
x & xxxx & x & x & x & xx & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & OOO \\ \hline
OOO & 0000 & 0 & 0 & x & x0 & 1 & 1 & 1 & 1 & & & 0 & 0 & 0 & PO \\
& 0000 & 0 & 0 & x & x1 & & & & & 1 & 1 & 0 & 0 & 0 & OOP \\
& 0000 & 0 & 1 & x & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 0 & 1 & x & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 0 & 1 & x & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
& 0000 & 1 & 0 & x & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 0 & x & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 0 & x & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 0 & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 1 & 0 & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 1 & 0 & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 1 & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 1 & 1 & 1 & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 1 & 1 & 1 & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
\end{longtable}
\twocolumn
\lipsum[5]
\end{document}
长表从新页面开始。我希望它从最后一页的两列文本下方开始。怎样做呢?
答案1
看看以下解决方案是否能帮助您:
\documentclass[journal]{IEEEtran}
\usepackage{stfloats}
\usepackage{caption}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[h]
\centering
\caption{State Table for My Machine\label{design1}}
\begin{tabular}{cccc}
\hline
a&b&c&d\\
\hline
1&2&3&4\\
\hline
\end{tabular}
\end{table}
\lipsum[2]
\begin{table*}[b]
\caption{State Table for My Machine}
\label{tab:design2_part-1}
\centering
\begin{tabular}{lccccccccccccccr}
\multicolumn{2}{c}{Initial State} & R & C & sel & loc & \multicolumn{6}{c}{mol} & cre & con & r\_c & Final State \\
& & & & & & 5 & 4 & 3 & 2 & 1 & 0 & & & & \\
\hline
x & xxxx & x & x & x & xx & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & OOO \\ \hline
OOO & 0000 & 0 & 0 & x & x0 & 1 & 1 & 1 & 1 & & & 0 & 0 & 0 & PO \\
& 0000 & 0 & 0 & x & x1 & & & & & 1 & 1 & 0 & 0 & 0 & OOP \\
& 0000 & 0 & 1 & x & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 0 & 1 & x & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 0 & 1 & x & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
& 0000 & 1 & 0 & x & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 0 & x & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 0 & x & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 0 & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 1 & 0 & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 1 & 0 & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 1 & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 1 & 1 & 1 & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 1 & 1 & 1 & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
\hline
\multicolumn{16}{r}{\footnotesize\itshape (cont. on the next page}
\end{tabular}
\end{table*}
\begin{table*}[t]
\ContinuedFloat
\caption{State Table for My Machine (cont. from previous page)}
\label{tab:design2_part-2}
\centering
\begin{tabular}{lccccccccccccccr}
\multicolumn{2}{c}{Initial State} & R & C & sel & loc & \multicolumn{6}{c}{mol} & cre & con & r\_c & Final State \\
& & & & & & 5 & 4 & 3 & 2 & 1 & 0 & & & & \\
\hline
x & xxxx & x & x & x & xx & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & OOO \\ \hline
OOO & 0000 & 0 & 0 & x & x0 & 1 & 1 & 1 & 1 & & & 0 & 0 & 0 & PO \\
& 0000 & 0 & 0 & x & x1 & & & & & 1 & 1 & 0 & 0 & 0 & OOP \\
& 0000 & 0 & 1 & x & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 0 & 1 & x & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 0 & 1 & x & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
& 0000 & 1 & 0 & x & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 0 & x & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 0 & x & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 0 & 00 & 0 & 1 & & & & & 0 & 1 & 1 & XOO \\
& 0000 & 1 & 1 & 0 & 01 & & & 0 & 1 & & & 0 & 1 & 1 & OXO \\
& 0000 & 1 & 1 & 0 & 10 & & & & & 0 & 1 & 0 & 1 & 1 & OOX \\
& 0000 & 1 & 1 & 1 & 00 & 1 & 0 & & & & & 0 & 1 & 0 & XOO \\
& 0000 & 1 & 1 & 1 & 01 & & & 1 & 0 & & & 0 & 1 & 0 & OXO \\
& 0000 & 1 & 1 & 1 & 10 & & & & & 1 & 0 & 0 & 1 & 0 & OOX \\
\hline
\end{tabular}
\end{table*}
\lipsum[4-9]
\end{document}
它需要手动将你的表分成两部分。