我想让这个表格看起来更美观,我试过这个>{\hsize=.85\hsize}
技巧,但无法让最后一部分变短。我几乎确信有更优雅的解决方案。基本上我需要最后三列等距且大小几乎相同。
(任意边距只是为了满足我的机构要求而不加载自定义包) MWE:
\documentclass[,a4paper]{memoir}
\usepackage[adobe-utopia]{mathdesign}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage[margin=3.8cm]{geometry}
%***********************Document*******************
\begin{document}
\begin{threeparttable}{\small
\linespread{1.3}\selectfont{}
\begin{tabularx}{\textwidth}{@{}XXXX@{}}\toprule
Factor & Low & Medium & High\\
\midrule
Physiochemical & & &\\
\hspace{1em}Smothing abc.\ & Molecular flow & Molecular flow & Continuum flow \\
\hspace{1em}Sticking coef.\ & Reversible adsorption & Adsorption & High eff.\ adsorption\\
\hspace{1em}Available mol.\ & Insufficient coverage & Surface saturation & {Precursor waste \tnote{$\dagger$}}\\
\addlinespace[1ex] %\hdashline
\midrule
Processing & & & \\
%\cmidrule(){1-1}
\hspace{1em}{Temperature} & {Condensation} & {Adsorption} & {Desorption \tnote{$\star$}}\\
\hspace{1em}Pressure & Poor precursor carrier & Balanced & Lower interdiffusion\\
\hspace{1em}Exposure time & Insufficient coverage & Complete coverage & Longer cycle\\
\bottomrule
\end{tabularx}}
\begin{tablenotes}
\item[$\dagger$] Another thing.
\item[$\star$] Something.
\item Source: BBQ.
\end{tablenotes}
\end{threeparttable}
\end{document}
期望结果如下:
答案1
根据您发布的带注释的屏幕截图,您似乎希望各列之间的空白量相等,并且最后一列的右侧没有空白。环境tabular*
可让您实现这些格式化目标。
\documentclass[a4paper]{memoir}
\usepackage[adobe-utopia]{mathdesign}
%%\usepackage[utf8]{inputenc} % that's the default nowadays
\usepackage[T1]{fontenc}
\usepackage{array}
\newcommand\mc[1]{\multicolumn{1}{@{}l}{#1}} % handy shortcut macro
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage[margin=3.8cm]{geometry}
\begin{document}
\noindent
\begin{threeparttable}
%% \small % not needed
\setlength\tabcolsep{0pt} % default: 6pt
\linespread{1.15} % "\linespread{1.3}" seems excessive
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} >{\quad}l lll }
\toprule
\mc{Factor} & Low & Medium & High\\
\midrule
\mc{Physiochemical} \\
Smoothing abc.\ & Molecular flow & Molecular flow & Continuum flow \\
Sticking coeff.\ & Reversible adsorption & Adsorption & High eff.\ adsorption\\
Available mol.\ & Insufficient coverage & Surface saturation & Precursor waste\tnote{$\dagger$} \\
\midrule
\mc{Processing} \\
Temperature & Condensation & Adsorption & Desorption\tnote{$\star$}\\
Pressure & Poor precursor carrier & Balanced & Lower interdiffusion\\
Exposure time & Insufficient coverage & Complete coverage & Longer cycle\\
\bottomrule
\end{tabular*}
\smallskip
\footnotesize
\begin{tablenotes}
\item[$\dagger$] Another thing.
\item[$\star$] Something.
\item[\phantom{$\dagger$}] Source: BBQ.
\end{tablenotes}
\end{threeparttable}
\end{document}