Skip to main content
Fixing a site bug of disappearing double backslashes: https://tex.meta.stackexchange.com/questions/7168/double-backslashes-disappear-from-code
Source Link
ShreevatsaR
  • 47.7k
  • 10
  • 122
  • 157

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_g$\\ $F_t \sin \theta$ & $F_t \cos \theta$\ \theta$\\ $-F_e$ & $0$\ $0$\\ \bottomrule[1.25pt] $0$ & $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!

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!

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!

Source Link
David
  • 465
  • 1
  • 5
  • 6

Illegal pream-token in tabular

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!