表格中的前缀标记不合法

表格中的前缀标记不合法

tabular我在构建环境并用 进行编译时遇到了麻烦pdflatex。以下是我正在尝试执行的操作:

\documentclass{article}
\usepackage[pdftex]{graphicx}
\usepackage{caption,tabularx,booktabs}
\begin{document}
\begin{minipage}{\linewidth}
\centering
\captionof{table}{Left side FBD} \label{tab:title2}
\begin{tabular}{ C C }\toprule[1.5pt]
\bf X & \b
f Y \\\midrule
$0$ & $-F_g$\\
$F_t \sin \theta$ & $F_t \cos \theta$\\
$-F_e$ & $0$\\
\bottomrule[1.25pt]
$0$ & $0$\\
\end{tabular}
\end{minipage}
\end{document}

然而,我收到以下错误:

! Package array Error:  Illegal pream-token (C): `c' used.

See the array package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.8 \begin{tabular}{ C C }
                          \toprule[1.5pt]

! Package array Error:  Illegal pream-token (C): `c' used.

我尝试过给出每个C参数,就像我在其他源代码中看到的那样(我仍然不确定该参数的具体用途),但还是收到另一条错误消息。当我用替换时,CC{.85in}现在得到:

! Package array Error:  Illegal pream-token (C): `c' used.

See the array package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.8 \begin{tabular}{ C{.85in} C{.85in} }
                                        \toprule[1.5pt]

! Package array Error:  Illegal pream-token (.85in): `c' used.

有人知道我做错了什么吗tabular?提前谢谢!

答案1

这是固定的 MWE:

\documentclass{article}
\usepackage[pdftex]{graphicx}
\usepackage{caption,tabularx,booktabs}
\begin{document}
\begin{minipage}{\linewidth}
\centering
\captionof{table}{Left side FBD} \label{tab:title2}
\begin{tabular}{ c c }\toprule[1.5pt]
\bf X & \b
f Y \\\midrule
$0$ & $-F_g$\\
$F_t \sin \theta$ & $F_t \cos \theta$\\
$-F_e$ & $0$\\
\bottomrule[1.25pt]
$0$ & $0$\\
\end{tabular}
\end{minipage}
\end{document}

C 应替换为 c

相关内容