下面是一個表格,我希望它顯示在兩欄頁面的首頁。但看起來不太好,所以如果有人可以幫助我。
\begin{table*}[t]
\centering\setlength{\tabcolsep}{.3\tabcolsep}
\begin{tabularx}{\linewidth}{|*2{>{\centering\hsize=1.6666\hsize}X|}*8{>{\centering\arraybackslash\hsize=.83333\hsize}X|}}
\hline
{\bf Point of Comparison} & {\bf Microsoft Kinect} & {\bf Asus Xtion} \\
\hline
Hardware Compatibility & Stable work with various hardware models & Does not work with some USB controllers (especially USB 3.0) \\
\hline
View Adjustment & Has motor that can be controlled remotely by the application & No motor, allow only manual positioning \\
\hline
Size & 12" x 3" x 2.5" & 7" x 2" x 1.5" \\
\hline
Weight & 3.0 lb & 0.5 lb \\
\hline
Power Supply & USB + ACDC power supply & USB \\
\hline
Power Consumption & 12 watts & below 2.5 watts \\
\hline
Distance of Use & between 0.8m and 4m in normal field of view
& between 0.8m and 3.5m \\
~& between 0.4m and 3m in narrow field of view &~\\
\hline
Field of View & 57\degree horizontal, 43\degree vertical & 58\degree Horizontal, 45\degree Vertical \\
\hline
Vertical tilt range & $\pm$27\degree & Not applicable \\
\hline
Frame rate & 30 frames per second (FPS) & 30 frames per second (FPS) \\
\hline
Depth Image Size - Resolution & 640 x 480 pixels & 640 x 480 pixels \\
\hline
OS Platform Support & Xbox 360 & Microsoft Windows
\\
& Microsoft Windows & Linux\\
& Linux & MacOS\\
& MacOS & \\
\hline
Programming Language & C++/C\# (Windows)
& C++/C\# (Windows) \\
& C++(Linux) & C++(Linux)\\
& JAVA & JAVA\\
\hline
\end{tabularx}
\caption{Comparison between Microsoft Kinect and Asus Xtion Specifications}
\label{tab:template}
\end{table*}
答案1
我不太了解如何組織材料身體表的。對於一些表格的整體佈局,我建議您不要更改 的設置\tabcolsep
,不要使用任何垂直線,也不要\hline
在表格正文中使用說明;相反,只需在行組之間插入更多的水平空白即可。請使用包的命令\toprule
、\midrule
和。您的範例程式碼定義了一個包含十個 [10] 列的表,但您似乎只使用了其中的三個;當變更 類型的列寬度時,請記住相對 s 的總和應等於列數。您可能想要嘗試相對列寬 0.8、1.1 和 1.1。\bottomrule
booktabs
X
\hsize
那麼,類似以下內容可能是過程中的中間點:
\documentclass[twocolumn]{article}
\usepackage{tabularx,booktabs}
\newcommand\degree{${}^\circ$\,}
\begin{document}\pagestyle{empty}
\begin{table*}[t]
\begin{tabularx}{\linewidth}{@{}>{\hsize=0.8\hsize}X *2{>{\hsize=1.1\hsize}X}@{}}
\toprule
\textbf{Point of Comparison} & \textbf{Microsoft Kinect} & \textbf{Asus Xtion} \\
\midrule
Hardware Compatibility & Stable work with various hardware models & Does not work with some USB controllers (especially USB 3.0) \\[0.7ex]
View Adjustment & Has motor that can be controlled remotely by the application & No motor, allow only manual positioning \\[0.7ex]
Size & 12" x 3" x 2.5" & 7" x 2" x 1.5" \\[0.7ex]
Weight & 3.0 lb & 0.5 lb \\[0.7ex]
Power Supply & USB + ACDC power supply & USB \\[0.7ex]
Power Consumption & 12 watts & below 2.5 watts \\[0.7ex]
Distance of Use & between 0.8m and 4m in normal field of view
& between 0.8m and 3.5m \\
& between 0.4m and 3m in narrow field of view \\[0.7ex]
Field of View & 57\degree horizontal, 43\degree vertical & 58\degree Horizontal, 45\degree Vertical \\[0.7ex]
Vertical tilt range & $\pm$27\degree & Not applicable \\[0.7ex]
Frame rate & 30 frames per second (FPS) & 30 frames per second (FPS) \\[0.7ex]
Depth Image Size - Resolution & 640 x 480 pixels & 640 x 480 pixels \\[0.7ex]
OS Platform Support & Xbox 360 & Microsoft Windows \\
& Microsoft Windows & Linux\\
& Linux & MacOS\\
& MacOS & \\[0.7ex]
Programming Language & C++/C\# (Windows)
& C++/C\# (Windows) \\
& C++(Linux) & C++(Linux)\\
& JAVA & JAVA\\
\bottomrule
\end{tabularx}
\caption{Comparison between Microsoft Kinect and Asus Xtion Specifications}
\label{tab:template}
\end{table*}
\end{document}
附錄:正如芭芭拉·比頓(Barbara Beeton)在評論中指出的那樣,以狹窄的尺寸排版的文本(例如在此表的三個窄列中)如果設置為右對齊而不是對齊,通常看起來會更好。在本例中,可以透過(i)載入ragged2e
包,(ii)指定一個名為 的新列類型來實現這種外觀Y
,如下所示:
\usepackage{booktabs,tabularx,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}
(iii) 將環境中的三列指定tabularx
為 typeY
而非 type X
。 (\hsize
當然,您也需要保留這些說明。)