3

I get the error mentioned in the title of the question. Can you help me please ?

\begin{table}[htb!]
      \centering
        \caption{\textit{others criterias : first scenario}} \label{Table2}
        \resizebox{0.5\columnwidth}{!}{%

    \begin{tabular}{c|ccc|cccc|c}
    &\multicolumn{3}{c}{\underline{Instances}}
    &\multicolumn{4}{c}{\underline{DPA}}
    &&
    &Staff &Activities &periods  &EA     &EB    &TG-AV   &RV-TD   \\ \hline
       &3     &72        &10     &477    &47     &178    &1421    \\
        \hline
         &3     &72        &10     &1087   &34     &207    &1170    \\
        \hline
         &3     &72        &10     &1415   &22     &215    &932     \\
        \hline
         &5     &120       &10     &1925   &1977   &485    &1897    \\
        \hline
         &5     &120       &10     &457    &552    &216    &1123    \\
        \hline
         &6     &140       &10     &1605   &1981   &347    &3039    \\
    \hline
    \end{tabular}%
    }
    \end{table}
3
  • 3
    You have && instead of \\ in the line before &Staff
    – egreg
    Nov 15, 2013 at 15:50
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – user11232
    Nov 15, 2013 at 15:50
  • the error does not come from here (i think). I always have the same error, it based on your comment.
    – user41096
    Nov 15, 2013 at 16:12

1 Answer 1

3

The second solution is preferred.

\documentclass{article}

\usepackage{graphics} % for \resizebox (PS)

\begin{document}


\begin{table}[htb!]
      \centering
        \caption{\textit{others criterias : first scenario}} \label{Table2}
        \resizebox{0.5\columnwidth}{!}{%

    \begin{tabular}{c|ccc|cccc|c}
    &\multicolumn{3}{c}{\underline{Instances}}
    &\multicolumn{4}{c}{\underline{DPA}}
%    &&  % PS
&\\ % PS
    &Staff &Activities &periods  &EA     &EB    &TG-AV   &RV-TD   \\ \hline
       &3     &72        &10     &477    &47     &178    &1421    \\
        \hline
         &3     &72        &10     &1087   &34     &207    &1170    \\
        \hline
         &3     &72        &10     &1415   &22     &215    &932     \\
        \hline
         &5     &120       &10     &1925   &1977   &485    &1897    \\
        \hline
         &5     &120       &10     &457    &552    &216    &1123    \\
        \hline
         &6     &140       &10     &1605   &1981   &347    &3039    \\
    \hline
    \end{tabular}%
    }
    \end{table}



But the first and last column are, in fact, unused. Hence rather:

\begin{table}[htb!]
      \centering
        \caption{\textit{others criterias : first scenario}} \label{Table2}
        \resizebox{0.5\columnwidth}{!}{%

    \begin{tabular}{|ccc|cccc|}
    \multicolumn{3}{c}{\underline{Instances}}
    &\multicolumn{4}{c}{\underline{DPA}}
    \\
    Staff &Activities &periods  &EA     &EB    &TG-AV   &RV-TD   \\ \hline
       3     &72        &10     &477    &47     &178    &1421    \\
        \hline
         3     &72        &10     &1087   &34     &207    &1170    \\
        \hline
         3     &72        &10     &1415   &22     &215    &932     \\
        \hline
         5     &120       &10     &1925   &1977   &485    &1897    \\
        \hline
         5     &120       &10     &457    &552    &216    &1123    \\
        \hline
         6     &140       &10     &1605   &1981   &347    &3039    \\
    \hline
    \end{tabular}%
    }
    \end{table}


\end{document}

enter image description here

0

Not the answer you're looking for? Browse other questions tagged .