
我有一個這樣的表:
\begin{table}
\centering
\begin{center}
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}
\end{center}
\caption{A summary of the data sets shown throughout this paper.}
\label{tab:Timing}
\end{table}
問題是標題只有大約 1 個字寬(並且居中),因此大約需要 10 行。為什麼這個標題的行為不像正常的圖形標題,而只是出現在頁面寬度上?
這是一個最小的工作範例(您需要這種樣式:daviddoria.com/Uploads/acmtog.cls):
\documentclass{acmtog}
\pdfminorversion=5
\begin{document}
\begin{table}
\centering
\begin{center}
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}
\end{center}
\caption{A summary of the data sets shown throughout this paper.}
\label{tab:Timing}
\end{table}
\end{document}
答案1
在ACM 文件類,我認為你透過巨集創建表\tbl
。
\begin{table}
\tbl{caption}{%
\begin{tabular}
...
\end{tabular}}
\end{table}
請參閱第 4.2 節acmsmall 的文檔例如。
將表格更改為:
\begin{table}
\tbl{A summary of the data sets shown throughout this paper.}{
\begin{tabular}{c|c|c|c}
Data set & Image size & Hole size (pix) & Total time\\
\hline
Mailbox & 459 $\times$ 489 & 30171 & 1m5s \\
Electric boxes & 688 $\times$ 478 & 45434 & 2m19s\\
Trashcan & 572 $\times$ 517 & 42734 & 1m59s\\
Air conditioners & 400 $\times$ 496 & 13709 & 23s
\end{tabular}}
\label{tab:Timing}
\end{table}