In my preamble, I declared:
...
\usepackage{cite}
\usepackage{color}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{float}
\usepackage{array}
\usepackage{makecell}
\usepackage{multirow}
\newcolumntype{c}[1]{>{\centering\arraybackslash}p{#1}}
\captionsetup{justification=centering}
\renewcommand\theadalign{cc}
\renewcommand\theadfont{\bfseries}
\renewcommand\theadgape{\Gape[4pt]}
%\renewcommand\cellgape{\Gape[4pt]}
\newcommand{\todo}[1]{\textcolor{red}{#1}}
\newcommand{\new}[1]{\textcolor{blue}{#1}}
...
and in a tex file, I'm creating a table such as:
\begin{table*}
\centering
\begin{tabular}{|c{13mm}|c{23mm}|c{15mm}|c{15mm}|c{15mm}|c{15mm}|c{15mm}|c{15mm}|c{15mm}|}
\hline
\multirow{2}{*}{Functionality} & \multirow{2}{*}{Message Field Type} & \multicolumn{6}{c{90mm}|}{\# of bits assigned to each field (‘b’ = message body, ‘h’ = message header, ‘v’ = variable size)} & \multirow{2}{*}{XXX} \\
\cline{3-8}
& & 1 & 1 & 1 & 1 & 1 & 1 & \\
\hline
1 & \makecell{Service\\ Type} & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
2 & Target Address & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
3 & Version Info. & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
4 & Return Code & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
5 & Message Type (op-code) & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
\hline
\end{tabular}
\caption{Semantics of Adaptation Probability Tree Nodes with Different Depths}
\label{table:adapt-prob-tree-semantics}
\end{table*}
I declared \usepackage{makecell}
in preamble, but when I use \makecell{}
in the table, I've got an error message:
Undefined control sequence. \GenericError ...
#4 \errhelp \@err@ ... l.10 1 & \makecell{Service\\ Type}
& 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
Anybody knows why I get this error message?
\makecell
is undefined, it just suggests a syntax error probably misuse of\\
It would be easier to test if you fixed your example above so that people could run it and debug the error.\\`
, I mean even though I used\makecell{Service Type}
, I still get theundefined control sequence
error. That's why I thought\makecell
is recognized as undefined by the Tex system (currently I'm using overleaf).c
which interferes with the standard column typec
for centered columns. Change your custom column type to for exampleC
or any other letter that is not associated with a standard column type and the error should disappear.