多行表

多行表

我正在尝试制作一个表格,该表格的列标题下方有单位。我使用命令\multirow,下面是代码的一部分(我无法添加表格输出的图像,因为我是新用户,没有评级来包含图像)。我的问题是第一个列标题扭曲了。有人知道我做错了什么,或者能建议更好的方法吗?

\begin{table}[ht]
\caption{Crystallisation optimisation 96 well screen} % title of Table
\centering % used for centering table
\begin{tabular}{c c c c c} % centered columns (4 columns)%
\hline\hline
\multirow{1}Well & [Protein] & pH & [MgCl$_{2}$] & Precipitant& \\
 & (mg.mL$^{-1}$)& & (M)& \\
\hline % inserts single horizontal line
A1 & 7 & 7 & 0.1 & 25\% PEG400\\
A2 & 7 & 7 & 0.1 & 30\% PEG400\\
A3 & 7 & 7 & 0.1 & 35\% PEG400\\
A4 & 7 & 7 & 0.1 & 40\% PEG400\\

\hline
\end{tabular}
\end{table}

谢谢

答案1

您要查找的语法是:(\multirow{2}{*}{Well}注意括号)。但是,我建议不要这样做multirow:使用一个包含名称/变量的标题行和一个包含单位的标题行(或者对于无量纲数字,不使用单位,例如您示例中的 pH 和沉淀物列)。

我还擅自使用书签-在我的 MWE 中将规则样式设置为水平线:

\documentclass{article}

\usepackage{multirow,booktabs}

\begin{document}
\begin{table}[htp]
\caption{Crystallisation optimisation 96 well screen} % title of Table
\centering % used for centering table
\begin{tabular}{c c c c c} 
\toprule 
\multirow{2}{*}{Well} & [Protein] & pH & [MgCl$_{2}$] & Precipitant \\
 & (mg.mL$^{-1}$)& & (M) & \\
\midrule
A1 & 7 & 7 & 0.1 & 25\% PEG400\\
A2 & 7 & 7 & 0.1 & 30\% PEG400\\
A3 & 7 & 7 & 0.1 & 35\% PEG400\\
A4 & 7 & 7 & 0.1 & 40\% PEG400\\
\bottomrule
\end{tabular}
\end{table}
\end{document}

相关内容