
在過去的幾個小時裡,我一直在拼命地把我的桌子變成一張長桌。我查看了很多範例,檢查了文檔,但我無法讓它工作。
所以我有一個很長的表,包含 3 列,20 多行,在第二列和第三列中,字段內有圖片(1 個或更多,最多 3 個)。所以這張桌子很快就會變得很大,我想把它分成兩頁。
普通表的乳膠程式碼是這樣的(我剪切了很多行以節省問題中的空間):
編輯:用戶 David Carlisle 提供了將其轉換為長表的答案。長表的程式碼現在看起來像這樣(而且有效!):
\begin{longtable}{l|Sl|Sl}
\caption{mycaption}\\
\label{tab:mylabel}
\textbf{Verb} & \textbf{Example} & \textbf{Passive Voice (if applicable)} \\ \hline
``goes-to'' & \rowincludegraphics[scale=1]{images/appendix/B/1.png} & \\ \hline
``walks-to'' & \rowincludegraphics[scale=1]{images/appendix/B/2.png} & \\ \hline
``says to'' & \begin{tabular}[c]{@{}l@{}}\rowincludegraphics[scale=1]{images/appendix/B/3a.png} \\ or\\ \rowincludegraphics[scale=1]{images/appendix/B/3b.png}\end{tabular} & \\ \hline
``chats to'' & \rowincludegraphics[scale=1]{images/appendix/B/4.png} & \\ \hline
``texts to'' & \rowincludegraphics[scale=1]{images/appendix/B/5.png} & \\ \hline
``sends to'' & \begin{tabular}[c]{@{}l@{}@{}}\rowincludegraphics[scale=1]{images/appendix/B/6a.png} \\ or\\ \rowincludegraphics[scale=1]{images/appendix/B/6b.png} \\ or \\ \rowincludegraphics[scale=1]{images/appendix/B/6c.png} \end{tabular} &
\end{longtable}
我還剩下 3 個小問題:這裡如何使用 \hspace{-3.5cm} ?它在 \table 中完美運行,但在 \longtable 中則不然。並且,當表格在頁面上繼續時,行的上邊框顯示在新頁面上,這可以隱藏嗎? (也顯示了頁面末尾行的底部邊框,但這是我想要的,所以沒關係)。最後,如何在長表末尾顯示標題? (僅在最後一頁)