Graphics, Figures & Tablesarray | Column Type not recognized

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
erictamlam
Posts: 8
Joined: Sun Apr 29, 2012 7:41 am

array | Column Type not recognized

Post by erictamlam »

Hi all,

I have this error popped up when compiling my source code.

Code: Select all

! Package array error: pream-token (S): 'c'used
The problem seems to be caused by some table command I used, but I don't know exactly what went wrong. I attached the related packages I used and the code for the table. Any help would be great! ;) it's worth noting that I didn't have this problem when I was using an older version of CTEX. I just upgraded it and now the problem floated up the surface. Originally, it says I was using an old package siunitx, so I uncommented it.

Code: Select all

\usepackage{multirow}
%\usepackage{siunitx}
\usepackage{slashbox}
\usepackage{threeparttable}
\usepackage{tabularx}
\usepackage{array}


\begin{table}
   \begin{tabular*}{\columnwidth}{
                 c
                 S[tabformat=+1.2]
                 S[tabformat=+1.2]
                 S[tabformat=+1.2]
                 S[tabformat=+1.2]
                 }
                \toprule
                \multirow{2}{*}{A} & \multicolumn{2}{c}{B} & \multicolumn{2}{c}{C}\\
                \cmidrule(l){2-3}\cmidrule(l){4-5}
                 & $p_j$ & $q_j$ & $\pi_{Bj}$ & $\pi_{Ij}$\\
                \midrule
                 1 & 0.6     & 0.6     & 0.5      & 0.5    \\
                \bottomrule
            \end{tabular*}
\end{table}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

array | Column Type not recognized

Post by localghost »

erictamlam wrote:[…] it's worth noting that I didn't have this problem when I was using an older version of CTEX. I just upgraded it and now the problem floated up the surface. Originally, it says I was using an old package siunitx, so I uncommented it. […]
But siunitx is the package that provides the S column type for your table. So uncomment it and upgrade the package. Somehow CTeX should allow to maintain your TeX system. If not, think about migrating to TeX Live or MiKTeX.

Alternatively you can try your luck with dcolumn.


Thorsten
Post Reply