\usepackage{arra
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\newcolumntype{C}[1]{>{\PreserveBackslash\centering}p{#1}}
\newcolumntype{R}[1]{>{\PreserveBackslash\raggedleft}p{#1}}
\newcolumntype{L}[1]{>{\PreserveBackslash\raggedright}p{#1}}
\begin{table}[htbp]
\centering\caption{\label{tab:test}2000 和~2004 年中国制造业产品的出口份额}
\begin{tabular}{L{2cm}C{2cm}R{2cm}}
\toprule
& 2000 & 2004 \\
\midrule
钢铁 & 3.1 & 5.2 \\
化学制品 & 2.1 & 2.7 \\
办公设备及电信设备 & 4.5 & 15.2 \\
汽车产品 & 0.3 & 0.7 \\
纺织品 & 10.4 & 17.2 \\
服装 & 18.3 & 24\\
\bottomrule
\end{tabular}
\end{table}
设置是否居中:
makebox[0.25\textwidth][c]{**}
这篇博客介绍了如何使用LaTeX来精确控制表格的列宽和内容对齐方式。通过定义新的列类型`C`, `R`, `L`,实现了居中、右对齐和左对齐的效果,并展示了一个关于2000年和2004年中国制造业产品出口份额的表格例子。
6万+

被折叠的 条评论
为什么被折叠?



