Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
    
Welcome to TeX.sx! –  Marco Daniel Apr 23 '13 at 18:59
2  
Use a small c instead of C: \begin{tabular}{ c c } –  Marco Daniel Apr 23 '13 at 18:59

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
Thank you. What is the difference between the lower and upper case c's anyway? –  David Apr 23 '13 at 19:03
1  
@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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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