我目前使用它xtab
来创建跨两列和多页的长表格。我想要做的是更精细地控制表格在页面/列边界上何时分页。我使用它\twocolumn
来获取两列。
根据我的研究,supertabular
似乎不尊重/注意\newpage
或\pagebreak
——但longtable
确实如此。但是,longtable
不支持多列。我理解xtab
是的改进版本supertabular
,但它似乎也不尊重\pagebreak
或\newpage
。下面的示例跨越两页,有两列,标明了两个理想的断点。这些表格是长途自行车路线的提示表,我希望列/页面中断发生在合理的停止点,如进站、补水休息等。有什么简单的方法可以解决这个问题吗?
\documentclass[11pt]{article}
\usepackage[left=0.25in,right=0.25in,top=0.25in,bottom=0.25in]{geometry}
\geometry{letterpaper}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{colortbl}
\usepackage{xtab}
\begin{document}
\twocolumn
\tabletail{\hline}
\tablelasttail{\hline}
\begin{xtabular}{|p{0.25in}|p{0.35in}|p{2.25in}|l|}
\hline
\rowcolor[gray]{0}
\textbf{\textcolor{white}{Go}} & \textbf{\textcolor{white}{At}} & \textbf{\textcolor{white}{On}} & \textbf{\textcolor{white}{For}} \\ \hline
& 0.0 & Start of route & 0.0 \\ \hline
\textbf{R} & 0.0 & Onto Hudson Terrace & 0.7 \\ \hline
\textbf{L} & 0.7 & Onto bike path at Bruce Reynolds Blvd & 0.4 \\ \hline
\textbf{L} & 1.0 & Onto River Road. STEEP & 2.4 \\ \hline
\textbf{BL} & 3.4 & TRO River Road & 4.7 \\ \hline
\textbf{R} & 8.1 & @ Circle, take exit to descend down to Boat Basin & 0.0 \\ \hline
\textbf{S} & 8.2 & Make a U-turn. Back up we go! \textbf{Note:} \#1 - Alpine & 0.3 \\ \hline
\textbf{S} & 8.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\rowcolor{yellow} \textbf{PIT} & 9.8 & Alpine PD (Regroup Here) \newline \textbf{Note:} End of \#1 - Alpine \newline \textbf{BREAK COLUMN HERE} & 0.1 \\ \hline
\textbf{QL} & 9.9 & Alpine Approach Rd & 0.2 \\ \hline
\textbf{R} & 10.1 & Route 9W & 4.1 \\ \hline
\textbf{L} & 14.2 & Oak Tree Rd $\Rightarrow$ Main St $\Rightarrow$ King's Hwy & 2.2 \\ \hline
\textbf{BL} & 16.4 & Greenbush Rd $\Rightarrow$ Western Hwy S & 3.0 \\ \hline
\textbf{S} & 16.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\rowcolor{yellow} \textbf{PIT} & 19.0 & Some Deli Somewhere \newline \textbf{BREAK PAGE/COLUMN HERE} & 0.1 \\ \hline
\textbf{S} & 19.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 19.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 19.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\end{xtabular}
\end{document}
答案1
我不确定多页表包是否有帮助,您可以简单地强制列宽并手动断开:
\documentclass[11pt]{article}
\usepackage[left=0.25in,right=0.25in,top=0.25in,bottom=0.25in]{geometry}
\geometry{letterpaper}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{colortbl}
\newenvironment{zz}
{\par\begin{tabular}{|p{0.25in}|p{0.35in}|p{2.25in}|p{\dimexpr\columnwidth-2.85in-8\tabcolsep-5\arrayrulewidth}|}
\hline
\rowcolor[gray]{0}
\textbf{\textcolor{white}{Go}} & \textbf{\textcolor{white}{At}} & \textbf{\textcolor{white}{On}} & \textbf{\textcolor{white}{For}} \\ \hline}
{\end{tabular}\par}
\begin{document}
\twocolumn
\centering
\begin{zz}
& 0.0 & Start of route & 0.0 \\ \hline
\textbf{R} & 0.0 & Onto Hudson Terrace & 0.7 \\ \hline
\textbf{L} & 0.7 & Onto bike path at Bruce Reynolds Blvd & 0.4 \\ \hline
\textbf{L} & 1.0 & Onto River Road. STEEP & 2.4 \\ \hline
\textbf{BL} & 3.4 & TRO River Road & 4.7 \\ \hline
\textbf{R} & 8.1 & @ Circle, take exit to descend down to Boat Basin & 0.0 \\ \hline
\textbf{S} & 8.2 & Make a U-turn. Back up we go! \textbf{Note:} \#1 - Alpine & 0.3 \\ \hline
\textbf{S} & 8.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 8.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 9.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\rowcolor{yellow} \textbf{PIT} & 9.8 & Alpine PD (Regroup Here) \newline \textbf{Note:} End of \#1 - Alpine \newline \textbf{BREAK COLUMN HERE} & 0.1 \\ \hline
\end{zz}
\begin{zz}
\textbf{QL} & 9.9 & Alpine Approach Rd & 0.2 \\ \hline
\textbf{R} & 10.1 & Route 9W & 4.1 \\ \hline
\textbf{L} & 14.2 & Oak Tree Rd $\Rightarrow$ Main St $\Rightarrow$ King's Hwy & 2.2 \\ \hline
\textbf{BL} & 16.4 & Greenbush Rd $\Rightarrow$ Western Hwy S & 3.0 \\ \hline
\textbf{S} & 16.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 16.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.6 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.7 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.8 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 17.9 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.0 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.4 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 18.5 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\rowcolor{yellow} \textbf{PIT} & 19.0 & Some Deli Somewhere \newline \textbf{BREAK PAGE/COLUMN HERE} & 0.1 \\ \hline
\end{zz}
\begin{zz}
\textbf{S} & 19.1 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 19.2 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\textbf{S} & 19.3 & Keep going forward (filler filler filler) & 0.1 \\ \hline
\end{zz}
\end{document}