I am trying to create a table using tabular environment. However I am getting two errors. The first error is the one where there is an illegal pream-token (s): `c' used. The second problem is that I don't get any output under the units columns. Kinldy refer to where I used the SI units in my MWE for the specification of location units and area units.
\documentclass[journal,twoside]{IEEEtran}
\usepackage[a4paper,left=1.5cm, right=1.5cm, bottom=1.5cm,top=1.5cm]{geometry}
\usepackage{amsmath,amsfonts,amsthm,amssymb}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{array}
\usepackage{booktabs}
\usepackage{caption}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}}
\begin{document}
\begin{table*}[!ht]
\caption{NLOS Simulation parameters}
\label{tab:NLOSSim}
\centering
\smallskip
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}l l s l l s}
\hline
\hline
\multicolumn{3}{c}{Transmitter} & \multicolumn{3}{c}{Receiver}\\
\cmidrule(c){1-3}\cmidrule(c){4-6}
Parameter & Value & \mc{Units} & Parameter & Value & \mc{Units}\\
\midrule
Room size & $5\times 5\times 3$ & \cubic\metre & Location\left(x,y,z\right) & \left(1.5, 1.5, 0\right) & \\
\rho_{n}=\rho_{s}=\rho_{e}=\rho_{w} & 0.8 & & Active area \left(A_{r} \right) & 1 & \centi\metre\\
\hline
\hline
\end{tabular*}
\end{table*}
\end{document}
I appreciate any input to help me solve this problem.
What I am getting is shown on the screenshot below.
s
column type or load a package that provides such a definition. (Thesiunitx
package may, or may not, be a candidate.)caption
package andIEEEtran
, this is not supported\cmidrule(c){1-3}
is bound to throw an error message as well. Not sure what you're trying to achieve, but\cmidrule(lr){1-3}
may be the way to go.\usepackage{siunitx}
after the otherusepackage
statements, change\cmidrule(c)
to\cmidrule(lr)
, and add math switches at appropriate places in the last two lines of the table.