定义自定义列后无法使 \arraybackslash 工作

定义自定义列后无法使 \arraybackslash 工作

我用:

\usepackage{array}
\newcolumntype{fwLa}[1]{>\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{fwCa}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{fwRa}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

进而:

\begin{table}[h]
\centering
\caption{Measured and Computed Air Properties}\label{airprops}
\begin{tabular}{|c | c c|}
\hline
\textbf{Property} & \textbf{Measured Value} & \textbf{Absolute Uncertainty} \\
\hline
Pressure $\left[\textit{mmHg}\right]$ & 750.142 & $\pm$0.05 \\
Temperature $\left[\textit{$^{\circ}$C}\right]$ & 22.5 & $\pm$0.5 \\
Density $\left[\textit{$\frac{kg}{m^{3}}$}\right]$ & 1.177 & $\pm$0.045 \\
Dynamic viscosity $\left[\textit{$\frac{kg}{ms}$}\right]$ & 1.766$\times10^{-5}$ & $\pm$81.810$\times10^{-6}$ \\
\hline
\end{tabular}
\end{table}

我得到:

Package array Error: Empty preamble: `l' used \maketitle
Extra alignment tab has been changed to \cr \textbf{Property}...

答案1

您不能将其用作fwRa数组列,它必须是单个标记。

相关内容