为什么乳胶中的长表不能进入下一页

New*_*ent 3 latex

我需要在乳胶中创建一个长表,但是当表的大小比页面长时,表不会转到下一页。例如,我需要无论表格大小如何,表格都会自动转到下一页。这是我需要编写的代码:

\documentclass{article}
\usepackage{overpic}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{verbatim} % multi line comment pkg
\usepackage{algpseudocode}
\usepackage{cases}
\newcolumntype{L}{>{\RaggedRight\hspace{0pt}}X} 


    % allow line breaking, suppress full justfication

\begin{document}

\begin{table}[]
\begin{tabular}{llll}
aa & \multicolumn{2}{l}{ewee}                  &     \\
bb  & \multicolumn{2}{l}{text text text text}                    &     \\
ccc  & \multicolumn{2}{l}{text text text text}               &     \\
ddd  & \multicolumn{2}{l}{text text text text}                                  &     \\
eee  & \multicolumn{2}{l}{text text text text}                            &     \\
fff  & \multicolumn{2}{l}{text text text text}                      &     \\
rrr  & \multicolumn{2}{l}{text text text text}                      &     \\
fff  & \multicolumn{2}{l}{text text text text}                     &     \\
rere  & \multicolumn{2}{l}{text text text text}                     &     \\
rere & \multicolumn{2}{l}{text text text text}     &     \\
wqwq & \multicolumn{2}{l}{text text text text}                 &     \\
trt  & \multicolumn{2}{l}{text text text text}                           &     \\
yyt   & \multicolumn{2}{l}{text text text text}                                   &     \\
tre  & \multicolumn{2}{l}{text text text text}                        &     \\
hgh  & \multicolumn{2}{l}{text text text text}                        &     \\
wqw  & \multicolumn{2}{l}{text text text text}                                &     \\
iui  & \multicolumn{2}{l}{text text text text}                        &     \\
rer   & \multicolumn{2}{l}{utjh}                            &     \\
wqw   & \multicolumn{2}{l}{text text text text}                               &     \\
lkj   & \multicolumn{2}{l}{text text text text}                                   &     \\
lkj   & \multicolumn{2}{l}{text text text text}                             &     \\
ewe   & \multicolumn{2}{l}{text text text text}                                &     \\
hng  & \multicolumn{2}{l}{text text text text}                     &     \\
fdf & \multicolumn{2}{l}{text text text text}                       &     \\
dgf & \multicolumn{2}{l}{text text text text}            &     \\
gfdfd   & \multicolumn{2}{l}{text text text text}                             &     \\
dsd   & \multicolumn{2}{l}{text text text text}                                    &     \\
fdf  & \multicolumn{3}{l}{text text text text}                         \\
hghg  & \multicolumn{3}{l}{text text text text}                           \\
fgf   & \multicolumn{3}{l}{text text text text}                                        \\
lkl  & \multicolumn{3}{l}{text text text text}                             \\
BPSK & \multicolumn{3}{l}{text text text text}                            \\
LRE  & \multicolumn{3}{l}{text text text text}                                 \\

\end{tabular}
\end{table}
\end{document}
Run Code Online (Sandbox Code Playgroud)

sam*_*ter 8

您可以使用该longtable包创建一个自动跨页分隔的表格。你需要

  • tabular用。。。来代替longtable

  • 去除table周围的环境

此外,避免过度使用\multicolumn. 我知道这些讨厌的在线表格生成器会在任何地方添加它,但它会干扰单元格内容的对齐,所以只在适当的时候使用它。

\documentclass{article}

\usepackage{longtable}


\begin{document}

%\begin{table}[]
\begin{longtable}{llll}
aa & ewee \\
bb & text text text text \\
ccc & text text text text \\
ddd & text text text text \\
eee & text text text text \\
fff & text text text text \\
rrr & text text text text \\
fff & text text text text \\
rere & text text text text \\
rere & text text text text \\
wqwq & text text text text \\
trt & text text text text \\
yyt & text text text text \\
tre & text text text text \\
hgh & text text text text \\
wqw & text text text text \\
iui & text text text text \\
rer & utjh \\
wqw & text text text text \\
lkj & text text text text \\
lkj & text text text text \\
ewe & text text text text \\
hng & text text text text \\
fdf & text text text text \\
dgf & text text text text \\
gfdfd & text text text text \\
dsd & text text text text \\
fdf & text text text text \\
hghg & text text text text \\
fgf & text text text text \\
lkl & text text text text \\
BPSK & text text text text \\
LRE & text text text text \\
aa & ewee \\
bb & text text text text \\
ccc & text text text text \\
ddd & text text text text \\
eee & text text text text \\
fff & text text text text \\
rrr & text text text text \\
fff & text text text text \\
rere & text text text text \\
rere & text text text text \\
wqwq & text text text text \\
trt & text text text text \\
yyt & text text text text \\
tre & text text text text \\
hgh & text text text text \\
wqw & text text text text \\
iui & text text text text \\
rer & utjh \\
wqw & text text text text \\
lkj & text text text text \\
lkj & text text text text \\
ewe & text text text text \\
hng & text text text text \\
fdf & text text text text \\
dgf & text text text text \\
gfdfd & text text text text \\
dsd & text text text text \\
fdf & text text text text \\
hghg & text text text text \\
fgf & text text text text \\
lkl & text text text text \\
BPSK & text text text text \\
LRE & text text text text \\
\end{longtable}
%\end{table}
\end{document}
Run Code Online (Sandbox Code Playgroud)