我已经查看了几个问题,但似乎找不到问题的答案。我试图创建一个跨多个页面的两列表,该页面由两个enumerate
环境组成,每个环境大约有 20 个项目。即使使用longtable
,我仍然只得到一个只运行一页的表格。我做错了什么?
以下是一段代码:
\begin{longtable}{p{0.4\textwidth}|p{0.4\textwidth}}
\multicolumn{1}{c|}{FitsFilter} & \multicolumn{1}{c}{Filter} \\
\hline
\begin{enumerate}
\item Read in necessary data from the FITS header and files
\item Define pretrigger range (ilzero) as a function of the sweeplength
and the hardware trigger channel
\item Read in sweep (sweep(i))
\item For iclass=2
\begin{enumerate}
\item Subtract the y-offset (yinit) and convert to AD units (divide by $\Delta$V
{[}V/AD unit{]})
\item Shift (shift()) to common trigger channel (hardware trigger channel
(nchst)) from calculated trigger channel (tfb)
\begin{enumerate}
\item Window data with cosine window
\item FFT to f-space
\item Shift the channel
\item Inverse FFT to t-domain
\item Divide resulting time-domain pulse by the size of the sweep length
\end{enumerate}
\item Accumulate 400 pulses (scum) = $S_{cum}(t)$
\end{enumerate}
\item For iclass=4
....
另外,我如何改变表格的宽度,以便它覆盖更多的页面。
答案1
你没有做错什么;longtable 只能在单元格之间拆分表格:每个单元格都是不可分割的对象,不能跨页面拆分。
您可以通过以下方式覆盖整个页面
\begin{longtable}{@{}p{\dimexpr.5\textwidth-\tabcolsep-0.2pt\relax}|
p{\dimexpr.5\textwidth-\tabcolsep-0.2pt\relax}@{}}