如果表格不适合当前页面,有没有办法将其移动到下一页?
目前,我的表格超出了页面范围,因为它太高了 - 我希望它意识到它太高,因此将它移动到下一页。
生成的pdf示例:例子
源代码示例:
\documentclass{article}
\usepackage[margin=12mm]{geometry}
\usepackage{ucs}
\usepackage{multicol}
\usepackage{array}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\newenvironment{Table}
{\par\bigskip\noindent\minipage{\columnwidth}\centering}
{\endminipage\par\bigskip}
\newenvironment{SCTable}
{\vspace{-1em}\begin{Table}\begin{tabular}{m{1.4cm} m{2.2cm} m{1.2cm} m{1.2cm} m{1cm}}\hline\\[-1.5ex]}
{\end{tabular}\end{Table}}
\begin{document}
\newpage
\begin{table}
\begin{tabular}{rlrlrlrl}
\textbf{Role:} & DVR & \textbf{Diagram:} & STP: IF 233: Su & \textbf{Schedule Applies:} & Sun, 28/06/15 & \textbf{Name:} & \\
\end{tabular}
\end{table}
\begin{multicols}{2}
\vspace{1em}
\begin{SCTable}
\textbf{TAXI} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
& Ilford Depot & & 06:00 & \\
& Shenfield & 06:30 & & \\
\end{SCTable}
\begin{SCTable}
PU & 5W07 & & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5W07} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:72953 & Shenf MSdg & & 07:00 & \\
& Shenfield & 07:02 & & 4\\
\end{SCTable}
\begin{SCTable}
\textbf{2W07} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1021 & Shenfield & & 07:14 & EL/4\\
G:81492 & Brentwood & 07:17 & 07:17\textonehalf & 3\\
& Harold Wood & 07:21\textonehalf & 07:22 & 3\\
& Gidea Park & 07:25\textonehalf & 07:26 & EL/3\\
& Romford & 07:28 & 07:28\textonehalf & 4\\
& Chad. Heath & 07:32 & 07:32\textonehalf & 3\\
& Goodmayes & 07:34 & 07:34\textonehalf & 3\\
& Seven Kings & 07:36 & 07:36\textonehalf & 3\\
& Ilford & 07:38\textonehalf & 07:39 & EL/3\\
& Manor Park & 07:41 & 07:41\textonehalf & EL\\
& Forest Gate & 07:43 & 07:44 & EL/1\\
& Maryland & 07:45\textonehalf & 07:46 & 1\\
& Stratford & 07:47\textonehalf & 07:48\textonehalf & EL/5\\
& Liverpool St & 07:56 & & 16\\
\end{SCTable}
\begin{SCTable}
\textbf{2C10} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0112 & Liverpool St & & 08:17 & EL/16\\
G:86408 & Stratford & 08:23\textonehalf & 08:24\textonehalf & EL/8\\
& Forest Gate & 08:26\textonehalf & 08:27 & EL/2\\
& Manor Park & 08:28\textonehalf & 08:29 & EL\\
& Ilford & 08:31\textonehalf & 08:32 & EL/4\\
& Seven Kings & 08:34 & 08:34\textonehalf & 4\\
& Goodmayes & 08:36 & 08:36\textonehalf & 4\\
& Chad. Heath & 08:38 & 08:38\textonehalf & 4\\
& Romford & 08:42 & 08:42\textonehalf & 5\\
& Gidea Park & 08:46 & & 4\\
\end{SCTable}
\begin{SCTable}
RELD & by GP 205 at & 08.46 & & \\
\end{SCTable}
\begin{SCTable}
PNB & & & & \\
\end{SCTable}
\begin{SCTable}
REL & GP 202 at & 09.46 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5C14} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:87908 & Gidea Park & & 09:47 & 4\\
& Gid Pk MSdg & 09:49 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5C25} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:03029 & Gid Pk MSdg & & 10:08 & \\
& Gidea Park & 10:10 & & 3\\
\end{SCTable}
\begin{SCTable}
\textbf{2C25} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1012 & Gidea Park & & 10:11 & EL/3\\
G:11568 & Romford & 10:13 & 10:13\textonehalf & 4\\
& Chad. Heath & 10:17 & 10:17\textonehalf & 3\\
& Goodmayes & 10:19 & 10:19\textonehalf & 3\\
& Seven Kings & 10:21 & 10:21\textonehalf & 3\\
& Ilford & 10:23\textonehalf & 10:24 & EL/3\\
& Manor Park & 10:26 & 10:26\textonehalf & EL\\
& Forest Gate & 10:28 & 10:29 & EL/1\\
& Stratford & 10:31\textonehalf & 10:32\textonehalf & EL/5\\
& Liverpool St & 10:41 & & 16\\
\end{SCTable}
\begin{SCTable}
\textbf{2W28} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0122 & Liverpool St & & 11:05 & EL/16\\
G:66705 & Stratford & 11:11\textonehalf & 11:12\textonehalf & EL/8\\
& Maryland & 11:13\textonehalf & 11:14 & 2\\
& Forest Gate & 11:15\textonehalf & 11:16 & EL/2\\
& Manor Park & 11:17\textonehalf & 11:18 & EL\\
& Ilford & 11:20\textonehalf & 11:21 & EL/4\\
& Seven Kings & 11:23 & 11:23\textonehalf & 4\\
& Goodmayes & 11:25 & 11:25\textonehalf & 4\\
& Chad. Heath & 11:27 & 11:27\textonehalf & 4\\
& Romford & 11:31 & 11:31\textonehalf & 5\\
& Gidea Park & 11:34\textonehalf & 11:35 & EL/4\\
& Harold Wood & 11:37\textonehalf & 11:38 & 4\\
& Brentwood & 11:42 & 11:42\textonehalf & 4\\
& Shenfield & 11:47 & & 5\\
\end{SCTable}
\begin{SCTable}
\textbf{5W28} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:58166 & Shenfield & & 11:49 & S2/5\\
& Shenf MSdg & 11:52 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5W43} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:73315 & Shenf MSdg & & 12:05 & \\
& Shenfield & 12:08 & & 4\\
\end{SCTable}
\begin{SCTable}
\textbf{2W43} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1021 & Shenfield & & 12:14 & EL/4\\
G:81854 & Brentwood & 12:17 & 12:17\textonehalf & 3\\
& Harold Wood & 12:21\textonehalf & 12:22 & 3\\
& Gidea Park & 12:25\textonehalf & 12:26 & EL/3\\
& Romford & 12:28 & 12:28\textonehalf & 4\\
& Chad. Heath & 12:32 & 12:32\textonehalf & 3\\
& Goodmayes & 12:34 & 12:34\textonehalf & 3\\
& Seven Kings & 12:36 & 12:36\textonehalf & 3\\
& Ilford & 12:38\textonehalf & 12:39 & EL/3\\
& Manor Park & 12:41 & 12:41\textonehalf & EL\\
& Forest Gate & 12:43 & 12:44 & EL/1\\
& Maryland & 12:45\textonehalf & 12:46 & 1\\
& Stratford & 12:47\textonehalf & 12:48\textonehalf & EL/5\\
& Liverpool St & 12:57 & & 17\\
\end{SCTable}
\begin{SCTable}
\textbf{2C46} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0112 & Liverpool St & & 13:17 & EL/17\\
G:86770 & Stratford & 13:23\textonehalf & 13:24\textonehalf & EL/8\\
& Forest Gate & 13:26\textonehalf & 13:27 & EL/2\\
& Manor Park & 13:28\textonehalf & 13:29 & EL\\
& Ilford & 13:31\textonehalf & 13:32 & EL/4\\
& Seven Kings & 13:34 & 13:34\textonehalf & 4\\
& Goodmayes & 13:36 & 13:36\textonehalf & 4\\
& Chad. Heath & 13:38 & 13:38\textonehalf & 4\\
& Romford & 13:42 & 13:42\textonehalf & 5\\
& Gidea Park & 13:46 & & 4\\
\end{SCTable}
\begin{SCTable}
RELD & by GP 205 at & 13.46 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{PASS} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
& Gidea Park & & 13:55 & \\
& Seven Kings & 14:05 & & \\
& & & & \\
\textbf{End of} & \textbf{Diagram} & & & \\
\end{SCTable}
\end{multicols}
\end{document}
答案1
这不是一个很好的破解方法,升级会是更好的选择。但是,如果你真的需要它工作,但又无法升级,那么以下方法可能帮助。但是,您需要仔细检查输出,以防出现不良副作用。
\documentclass{article}
\usepackage[margin=12mm]{geometry}
\usepackage{ucs}
\usepackage{multicol}
\usepackage{array}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\newenvironment{SCTable}
{\centering\bigskip\begin{tabular}{m{1.4cm} m{2.2cm} m{1.2cm} m{1.2cm} m{1cm}}\hline\\[-1.5ex]}
{\end{tabular}\vspace*{\fill}\par\mbox{}\\[-\baselineskip]\bigskip}
\begin{document}
\newpage
\begin{table}
\begin{tabular}{rlrlrlrl}
\textbf{Role:} & DVR & \textbf{Diagram:} & STP: IF 233: Su & \textbf{Schedule Applies:} & Sun, 28/06/15 & \textbf{Name:} & \\
\end{tabular}
\end{table}
\begin{multicols}{2}
\vspace{1em}
\begin{SCTable}
\textbf{TAXI} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
& Ilford Depot & & 06:00 & \\
& Shenfield & 06:30 & & \\
\end{SCTable}
\begin{SCTable}
PU & 5W07 & & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5W07} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:72953 & Shenf MSdg & & 07:00 & \\
& Shenfield & 07:02 & & 4\\
\end{SCTable}
\begin{SCTable}
\textbf{2W07} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1021 & Shenfield & & 07:14 & EL/4\\
G:81492 & Brentwood & 07:17 & 07:17\textonehalf & 3\\
& Harold Wood & 07:21\textonehalf & 07:22 & 3\\
& Gidea Park & 07:25\textonehalf & 07:26 & EL/3\\
& Romford & 07:28 & 07:28\textonehalf & 4\\
& Chad. Heath & 07:32 & 07:32\textonehalf & 3\\
& Goodmayes & 07:34 & 07:34\textonehalf & 3\\
& Seven Kings & 07:36 & 07:36\textonehalf & 3\\
& Ilford & 07:38\textonehalf & 07:39 & EL/3\\
& Manor Park & 07:41 & 07:41\textonehalf & EL\\
& Forest Gate & 07:43 & 07:44 & EL/1\\
& Maryland & 07:45\textonehalf & 07:46 & 1\\
& Stratford & 07:47\textonehalf & 07:48\textonehalf & EL/5\\
& Liverpool St & 07:56 & & 16\\
\end{SCTable}
\begin{SCTable}
\textbf{2C10} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0112 & Liverpool St & & 08:17 & EL/16\\
G:86408 & Stratford & 08:23\textonehalf & 08:24\textonehalf & EL/8\\
& Forest Gate & 08:26\textonehalf & 08:27 & EL/2\\
& Manor Park & 08:28\textonehalf & 08:29 & EL\\
& Ilford & 08:31\textonehalf & 08:32 & EL/4\\
& Seven Kings & 08:34 & 08:34\textonehalf & 4\\
& Goodmayes & 08:36 & 08:36\textonehalf & 4\\
& Chad. Heath & 08:38 & 08:38\textonehalf & 4\\
& Romford & 08:42 & 08:42\textonehalf & 5\\
& Gidea Park & 08:46 & & 4\\
\end{SCTable}
\begin{SCTable}
RELD & by GP 205 at & 08.46 & & \\
\end{SCTable}
\begin{SCTable}
PNB & & & & \\
\end{SCTable}
\begin{SCTable}
REL & GP 202 at & 09.46 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5C14} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:87908 & Gidea Park & & 09:47 & 4\\
& Gid Pk MSdg & 09:49 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5C25} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:03029 & Gid Pk MSdg & & 10:08 & \\
& Gidea Park & 10:10 & & 3\\
\end{SCTable}
\begin{SCTable}
\textbf{2C25} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1012 & Gidea Park & & 10:11 & EL/3\\
G:11568 & Romford & 10:13 & 10:13\textonehalf & 4\\
& Chad. Heath & 10:17 & 10:17\textonehalf & 3\\
& Goodmayes & 10:19 & 10:19\textonehalf & 3\\
& Seven Kings & 10:21 & 10:21\textonehalf & 3\\
& Ilford & 10:23\textonehalf & 10:24 & EL/3\\
& Manor Park & 10:26 & 10:26\textonehalf & EL\\
& Forest Gate & 10:28 & 10:29 & EL/1\\
& Stratford & 10:31\textonehalf & 10:32\textonehalf & EL/5\\
& Liverpool St & 10:41 & & 16\\
\end{SCTable}
\begin{SCTable}
\textbf{2W28} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0122 & Liverpool St & & 11:05 & EL/16\\
G:66705 & Stratford & 11:11\textonehalf & 11:12\textonehalf & EL/8\\
& Maryland & 11:13\textonehalf & 11:14 & 2\\
& Forest Gate & 11:15\textonehalf & 11:16 & EL/2\\
& Manor Park & 11:17\textonehalf & 11:18 & EL\\
& Ilford & 11:20\textonehalf & 11:21 & EL/4\\
& Seven Kings & 11:23 & 11:23\textonehalf & 4\\
& Goodmayes & 11:25 & 11:25\textonehalf & 4\\
& Chad. Heath & 11:27 & 11:27\textonehalf & 4\\
& Romford & 11:31 & 11:31\textonehalf & 5\\
& Gidea Park & 11:34\textonehalf & 11:35 & EL/4\\
& Harold Wood & 11:37\textonehalf & 11:38 & 4\\
& Brentwood & 11:42 & 11:42\textonehalf & 4\\
& Shenfield & 11:47 & & 5\\
\end{SCTable}
\begin{SCTable}
\textbf{5W28} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:58166 & Shenfield & & 11:49 & S2/5\\
& Shenf MSdg & 11:52 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{5W43} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
G:73315 & Shenf MSdg & & 12:05 & \\
& Shenfield & 12:08 & & 4\\
\end{SCTable}
\begin{SCTable}
\textbf{2W43} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:1021 & Shenfield & & 12:14 & EL/4\\
G:81854 & Brentwood & 12:17 & 12:17\textonehalf & 3\\
& Harold Wood & 12:21\textonehalf & 12:22 & 3\\
& Gidea Park & 12:25\textonehalf & 12:26 & EL/3\\
& Romford & 12:28 & 12:28\textonehalf & 4\\
& Chad. Heath & 12:32 & 12:32\textonehalf & 3\\
& Goodmayes & 12:34 & 12:34\textonehalf & 3\\
& Seven Kings & 12:36 & 12:36\textonehalf & 3\\
& Ilford & 12:38\textonehalf & 12:39 & EL/3\\
& Manor Park & 12:41 & 12:41\textonehalf & EL\\
& Forest Gate & 12:43 & 12:44 & EL/1\\
& Maryland & 12:45\textonehalf & 12:46 & 1\\
& Stratford & 12:47\textonehalf & 12:48\textonehalf & EL/5\\
& Liverpool St & 12:57 & & 17\\
\end{SCTable}
\begin{SCTable}
\textbf{2C46} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
S:0112 & Liverpool St & & 13:17 & EL/17\\
G:86770 & Stratford & 13:23\textonehalf & 13:24\textonehalf & EL/8\\
& Forest Gate & 13:26\textonehalf & 13:27 & EL/2\\
& Manor Park & 13:28\textonehalf & 13:29 & EL\\
& Ilford & 13:31\textonehalf & 13:32 & EL/4\\
& Seven Kings & 13:34 & 13:34\textonehalf & 4\\
& Goodmayes & 13:36 & 13:36\textonehalf & 4\\
& Chad. Heath & 13:38 & 13:38\textonehalf & 4\\
& Romford & 13:42 & 13:42\textonehalf & 5\\
& Gidea Park & 13:46 & & 4\\
\end{SCTable}
\begin{SCTable}
RELD & by GP 205 at & 13.46 & & \\
\end{SCTable}
\begin{SCTable}
\textbf{PASS} & \textbf{Location} & \textbf{Arr} & \textbf{Dep} & \textbf{Lne/Pf}\\
& Gidea Park & & 13:55 & \\
& Seven Kings & 14:05 & & \\
& & & & \\
\textbf{End of} & \textbf{Diagram} & & & \\
\end{SCTable}
\end{multicols}
\end{document}
这是 TeX Live 2014 的输出:
更新的 TeX Live 2015不需要这个 hack。在这种情况下,原始代码运行完美(除了大量的过度\hbox
警告)。