[Tex/LaTex] LaTeX table undefined control sequence

tablesundefined

I know this is a very common occurence of the tables-related error, so thank you in advance for any help (I am getting very tired :-)).

I have this table that for some some reason refuses to compile. I think it did before, and I cannot see where the faulty change happened.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[acronym]{glossaries}
\begin{document}
\newacronym{mno}{MNO}{Mobile Network Operator}
\newacronym{sdn}{SDN}{Software Defined Networking}
\newacronym{nfv}{NFV}{Network Function Virtualization}
\newacronym{vnf}{VNF}{Virtualized Network Function}
\newacronym{nve}{NVE}{Network Virtualization Environment}
\begin{table*}[t]
\centering
\caption{\gls{sdn} and \gls{nfv} multitenant environment fault management issues and consequences}
\label{TAB-issues}
\resizebox{\textwidth}{!}{

\begin{tabular}{c|l|l|l|l|l|}
\cline{2-6}
\multicolumn{1}{l|}{}                                           & \multicolumn{1}{c|}{\textbf{ISSUES}}                     & \textbf{\gls{sdn}?} & \multicolumn{1}{c|}{\textbf{\gls{nfv}?}} & \textbf{\begin{tabular}[c]{@{}l@{}}Multi-\\ tenant?\end{tabular}} & \multicolumn{1}{c|}{\textbf{CONSEQUENCES}}                               \\ \hline
\multicolumn{1}{|c|}{\multirow{3}{*}{\textbf{Scalability}}}     & 1) Huge requests to the \gls{sdn} controller             & \checkmark    &             & Limited \gls{sdn} controller capacity  \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 2) Huge number of faults and alarms                      & \checkmark    &    \checkmark                      & \checkmark                                                        & Alarms correlation and fault detection                                                    \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 3) A growing number of tenants and resources affectation &               &                                    &  \checkmark                                                       & Optimization of  resources allocation                                    \\ \hline
\multicolumn{1}{|c|}{\multirow{3}{*}{\textbf{Topology}}}        & 4) Dynamic topology                                      &               &                                    &                                                                   & Difficulty of modeling the network topology                              \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 5) Coexistence of Physical and virtual entities          &  \checkmark   &  \checkmark                        &  \checkmark                                                       & Virtual and physical faults dependencies                                 \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 6) Multi-tenants                                         &               &                                    &  \checkmark                                                       & Lack of network visibility                                               \\ \hline
\multicolumn{1}{|c|}{\multirow{2}{*}{\textbf{Security}}}        & 7) Attack on switches or controllers or control plane    & \checkmark    &                                    &                                                                   & Whole network disruption                                                 \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 8) Multi-tenant sharing the same infrastructure          &               &                                    &  \checkmark                                                       & Multi-tenants traffic isolation                                          \\ \hline
\multicolumn{1}{|c|}{\multirow{5}{*}{\textbf{Fault Tolerance}}} & 9) A single \gls{sdn} controller a single point of failure     & \checkmark    &                                    &                                                                   & \gls{sdn} controller failure implies the,whole network failure                 \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 10) Link failure                                         & \checkmark    &  \checkmark                        &                                                                   & Loss of network connection                                               \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 11) End to End service chain crash                       &               &  \checkmark                        &                                                                   & Rapid detection and recovery actions for clients services                \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 12) Physical and virtual faults                          & \checkmark    &  \checkmark                        &                                                                   & A physical failure may impact multiple virtual entities                  \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 13) Multi-tenants faults                                 &               &                                    & \checkmark                                                        & The necessity of tenants faults isolation and notification               \\ \hline
\multicolumn{1}{|c|}{\multirow{3}{*}{\textbf{Performance}}}     & 14) \gls{sdn} controller and switch performance                &\checkmark     &                                    &                                                                   & Choose the best network configurations to have a high network resilience \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 15) Running environments                                 &               &\checkmark                          &                                                                   & The performance of the \gls{vnf} depends on the running environment            \\ \cline{2-6} 
\multicolumn{1}{|c|}{}                                          & 16) Migration of tenants applications or \gls{vnf}       &               & \checkmark                         &  \checkmark                                                       & Keep the same performance while migrating a tenant application or a \gls{vnf}  \\ \hline 

\end{tabular}

}
\end{table*}
\end{document}

As you can see, the error is not the lack of packages or the acronyms (at list I think so), trying it with sharelatex or overleaf returns the error:

./main.tex:42: Undefined control sequence.
<argument> ... \gls {sdn} controller & \checkmark 
                                                  & & Limited \gls {sdn} con...
l.42 }

Which is really hard to work around :-(.

Thanks for any inspiration on this!

Best Answer

As already mentioned in the comments, you recieve the error because the command \checkmark is not defined. By loading a packages that defined a \checkmark command, such as amssymb, one can make your code compilable.

Since you have a quite wide table, I recommend against using resizebox as it leads to illegible small and inconsistent font size. In the following MWE I have changed the general layout of the table to make it fit onto one page.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[acronym]{glossaries}
\usepackage{makecell}
\usepackage{rotating}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{ragged2e}
\usepackage{array}
\makeatletter
\def\@rothead[#1]#2{\thead{\\[-.65\normalbaselineskip]\turn{\cellrotangle}\thead[#1]{#2}\endturn}}
\newcolumntype{L}[1]{>{\RaggedRight\arraybackslash}p{#1}}
\newcolumntype{Z}{>{\RaggedRight\arraybackslash}X}

\begin{document}

\newacronym{mno}{MNO}{Mobile Network Operator}
\newacronym{sdn}{SDN}{Software Defined Networking}
\newacronym{nfv}{NFV}{Network Function Virtualization}
\newacronym{vnf}{VNF}{Virtualized Network Function}
\newacronym{nve}{NVE}{Network Virtualization Environment}

\begin{table}[t]
\centering
\caption{\gls{sdn} and \gls{nfv} multitenant environment fault management issues and consequences}
\label{TAB-issues}
\footnotesize
\renewcommand{\arraystretch}{1.25}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{cr@{\hspace{1ex}}L{2.75cm}c@{\hspace{3pt}}c@{\hspace{3pt}}cZ}
\toprule
  & \multicolumn{2}{l}{ISSUES}  & \gls{sdn}? & \gls{nfv}? & \makecell{Multi-\\tenant?} & CONSEQUENCES  \\
\midrule
\multirow{7}{*}{\rothead[c]{Scalability}}    & 1)& Huge requests to the \gls{sdn} controller             & \checkmark    &             & \tnote{*}  \\ 
& 2) & Huge number of faults and alarms     & \checkmark    &    \checkmark                      & \checkmark            & Alarms correlation and fault detection                                                    \\
& 3) & A growing number of tenants and resources affectation &               &                                    &  \checkmark   & Optimization of  resources allocation   \\ 
\midrule
\multirow{6}{*}{\rothead[c]{Topology}}        & 4)& Dynamic topology                                      &               &                                    &                                                                   & Difficulty of modeling the network topology                              \\  
 & 5) & Coexistence of Physical and virtual entities          &  \checkmark   &  \checkmark                        &  \checkmark                                                       & Virtual and physical faults dependencies                                 \\  
& 6) & Multi-tenants                                         &               &                                    &  \checkmark                                                       & Lack of network visibility                                               \\ 
\midrule
\multirow{6}{*}{\rothead[c]{Security}}       & 7)& Attack on switches or controllers or control plane    & \checkmark    &                                    &                                                                   & Whole network disruption                                                 \\  
& 8)& Multi-tenant sharing the same infrastructure          &               &                                    &  \checkmark                                                       & Multi-tenants traffic isolation                                          \\ \hline
\multirow{10}{*}{\rothead[c]{Fault Tolerance}} & 9)& A single \gls{sdn} controller a single point of failure     & \checkmark    &                                    &                                                                   & \gls{sdn} controller failure implies the,whole network failure                 \\  
& 10)& Link failure                                         & \checkmark    &  \checkmark                        &                                                                   & Loss of network connection                                               \\  
& 11) & End to End service chain crash                       &               &  \checkmark                        &                                                                   & Rapid detection and recovery actions for clients services                \\  
& 12) & Physical and virtual faults                          & \checkmark    &  \checkmark                        &                                                                   & A physical failure may impact multiple virtual entities                  \\  
& 13) & Multi-tenants faults                                 &               &                                    & \checkmark                                                        & The necessity of tenants faults isolation and notification               \\
\midrule
\multirow{9}{*}{\rothead[c]{Performance}}     & 14)& \gls{sdn} controller and switch performance                &\checkmark     &                                    &                                                                   & Choose the best network configurations to have a high network resilience \\
& 15) & Running environments                                 &               &\checkmark                          &                                                                   & The performance of the \gls{vnf} depends on the running environment            \\ 
& 16)& Migration of tenants applications or \gls{vnf}       &               & \checkmark                         &  \checkmark                                                       & Keep the same performance while migrating a tenant application or a \gls{vnf}  \\ 
\bottomrule
\end{tabularx}
\begin{tablenotes}
\item[*] Limited \gls{sdn} controller capacity
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}

enter image description here

In comparison to your original code I made the following changes:

  • Removed bold from column headings.
  • Removed all vertical lines and replaced horizontal lines from the rules from the booktabs package that add an appropriate white space around them.
  • Rotated the contents of the first column (Code for \rothead is taken from here: https://tex.stackexchange.com/a/429133/134144)
  • Used threeparttable in order to put long text in the 'multitenant' column into a tablenote.
  • Decreased distance between the checkmark containing columns in order to save some horizontal space.
  • Added a new second column that contains the numbers. That way, the second and following lines of the corresponding texts are automatically indented.
  • Used a fixed width column with raggedright alignment for the 'issues' column in order to allow for automated line breaks.
  • sed a flexible width X column from the tabularx package in order to make the table as wide as the textwidth.
  • Horizontally centered the checkmarks in their corresponding columns.
  • Added some additional vertical white space above and below columns to guide the reader's eye.
  • ...
Related Question