17

I'm having trouble constructing a tabular environment and compiling it with pdflatex. Here's what I'm trying to do:

\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}

However, I then get the following error:

! 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.

I've tried giving each C and argument as I've seen in other source code (I'm still not certain exactly what that argument is for) I get another error message. When I replace C with C{.85in} I now get:

! 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.

Does anyone know what I'm doing wrong with my tabular? Thanks in advance!

11

here is the fixed 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 should be replaced with c

  • Thank you. What is the difference between the lower and upper case c's anyway? – David Apr 23 '13 at 19:03
  • 3
    @David: The difference is the case, and LaTeX (like many programming languages) use a case-specific interface. So, just like you use \sin and not \Sin or \SIN. There is a difference, since LaTeX expects a lowercase l, c, r, p by default. tabularx provides an additional X, while array adds m and allow expansion of the defaults to your liking. – Werner Apr 23 '13 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.