有人能告诉我如何\raggedright
在此示例中将其应用于表格标题吗?
\documentclass[a4paper,12pt]{article}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{table}[t]
\caption{}
\label{}
\begin{tabularx}{\textwidth}{X X X X}
\toprule
Time of induction (\SI{}{\minute}) & Mean $\text{A}_{414}$ & Corrected $\text{A}_{414}$ (minus t=0 value) & Units of $\beta$-galactosidase per \SI{}{ml} of {\it E. coli} culture\\
\midrule
0 & 0.057 & 0 & 0 \\
1 & 0.060 & 0.003 & \num{1.3e-7}\\
2 & 0.069 & 0.012 & \num{5.0e-7}\\
3 & 0.083 & 0.026 & \num{1.1e-6}\\
4 & 0.120 & 0.063 & \num{2.6e-6}\\
5 & 0.123 & 0.066 & \num{2.8e-6}\\
7 & 0.191 & 0.134 & \num{5.6e-6}\\
10 & 0.310 & 0.253 & \num{1.1e-5}\\
12 & 0.399 & 0.342 & \num{1.4e-5}\\
15 & 0.491 & 0.434 & \num{1.8e-5}\\
30 & 1.179 & 1.122 & \num{4.7e-5}\\
45 & 1.585 & 1.528 & \num{6.4e-5}\\
0c & 0.056 & 0 & \num{0}\\
15c & 0.057 & 0.001 & \num{0}\\
45c & 0.055 & 0 & \num{0}\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
答案1
您可以使用它\multicolumn
来覆盖原始的列规范:
\toprule
\multicolumn{1}{>{\raggedright}X}{Time of induction (\SI{}{\minute})} & \multicolumn{1}{>{\raggedright}X}{Mean $\text{A}_{414}$} & \multicolumn{1}{>{\raggedright}X}{Corrected $\text{A}_{414}$ (minus t=0 value)} & \multicolumn{1}{>{\raggedright}X}{Units of $\beta$-galactosidase per \SI{}{ml} of {\it E. coli} culture}\\
\midrule
>{decl.}
直接插入decl.
到列条目的前面。类似地,<{decl.}
在列格式声明之后使用会decl.
直接插入到列条目的后面。