32

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!

2
  • Welcome to TeX.sx! Commented Apr 23, 2013 at 18:59
  • 5
    Use a small c instead of C: \begin{tabular}{ c c } Commented Apr 23, 2013 at 18:59

1 Answer 1

22

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

2
  • Thank you. What is the difference between the lower and upper case c's anyway? Commented Apr 23, 2013 at 19:03
  • 8
    @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. Commented Apr 23, 2013 at 19:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.