I am learning to use the siunits package in a tabular environment to align number by their decimal point.
I was watching the top answer given in this question by Bernard and when I tried to implement its code into my table but I get a missing number treated as zero.
! Missing number, treated as zero.
<to be read again>
c
l.15 \multicolumn{c}{1}{$\theta$ ($^{\circ}$)}
& \multicolumn{c}{1}{$\sigma...
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
this is my MWE
\documentclass[11pt]{article}
\usepackage{siunitx}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ l*{5}{S[table-format=4.2, table-number-alignment=center]}}
\toprule
\multicolumn{c}{1}{$\theta$ ($^{\circ}$)} & \multicolumn{c}{1}{$\sigma_x^' $ (kips)} & \multicolumn{c}{1}{$\sigma_y^'$ (kips)} & \multicolumn{c}{1}{$\tau_{xy}^'$ (kips)} & \multicolumn{c}{1}{$2\theta_p$ ($^{\circ}$)}\\\midrule
0 & 10 & 0 & 6 & 50.1944\\
15 & 12.3301 & -2.3301 & 2.6962 & 20.1944\\
30 & 12.6962 & -2.6962 & -1.3301 & 350.1944\\
45 & 11 & -1 & -5 & 320.1944\\
60 & 7.6962 & 2.3038 & -7.3301 & 290.1944\\
75 & 3.6699 & 6.3301 & -7.6962 & 260.1944\\
90 & 0 & 10 & -6 & 230.1944\\
105 & -2.3301 & 12.3301 & -2.6962 & 200.1944\\
120 & -2.6962 & 12.6962 & 1.3301 & 170.1944\\
135 & -1 & 11 & 5 & 140.1944\\
150 & 2.3038 & 7.6962 & 7.3301 & 110.1944\\
165 & 6.3301 & 3.6699 & 7.6962 & 80.1944\\
180 & 10 & 0 & 6 & 50.1944\\
\bottomrule \end{tabular}
\end{document}

\multicolumn{c}{1}{$\theta$ ($^{\circ}$)}The syntax is wrong. First the number of columns, then the alignment. It should be\multicolumn{1}{c}{content}. – Johannes_B Apr 08 '18 at 05:14{content}. – Johannes_B Apr 08 '18 at 05:164.2is wrong for all your columns. Only a documentation can clearly and up to date explain what the parameters mean. – Johannes_B Apr 08 '18 at 05:23