I am trying to make a table in LaTeX. However, I get several extra alignment tab errors and I do not know why.

I have searched here for similar problems but I only found extra alignment tab error and that is a different problem cause by the %, which I do not use. So, I am quite lost, at the moment.

Here is some minimal code that reproduces the error:



%define some nice colors
\definecolor{middleware_green}{RGB}{82, 119, 17}
\definecolor{middleware_white}{RGB}{255, 255, 255}
\definecolor{middleware_light_gray}{RGB}{239, 239, 239}
\definecolor{middleware_dark_gray}{RGB}{153, 153, 153}

%renewing commands for tabularx

%new column type for test tables 




\multicolumn{ 5}{|c|}{\small\textcolor{white}{\textbf{Cloud Types}}} \\ \hline
\multicolumn{1}{|C}{\scriptsize\textcolor{white}{\textbf{Pu\-blic cloud}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Pri\-va\-te cloud}}} & 
\multicolumn{1}{|C}{\scriptsize\centering\textcolor{white}{\textbf{Hy\-brid cloud}}} & 
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Vir\-tu\-al pri\-va\-te cloud}}} &
\multicolumn{1}{|C|}{\scriptsize\textcolor{white}{\textbf{Com\-mu\-ni\-ty cloud}}} & \\ \hline
Definition  &   Public cloud definition &   Private cloud definition    &   Hybrid cloud defitnion  &   Virtual Private Cloud definition    &   Community Cloud definition  \\ \hline
Advantages  &   Public cloud advantages &   Private cloud advantages    &   Hybrid cloud advantages &   Virtual Private Cloud advantages    &   Community Cloud advantages  \\ \hline
Disadvantages   &   Public cloud disadvantages  &   Private cloud disadvantages &   Hybrid cloud disadvantages  &   Virtual Private Cloud disadvantages &   Community Cloud disadvantages   \\ \hline
\caption{Cloud Types\label{tab:cloud_types}}


What am I missing?

  • 2
    Column types L and C are not defined and there is also a missing & after the second last \multicolumn{1}{|C|}{...}. – Heiko Oberdiek May 15 '14 at 12:45
  • Ok, I updated the document, but I still cant get rid of the problem ! – Flame_Phoenix May 15 '14 at 14:32
  • 2
    Now you have defined five columns for your table, but as @dcmst said, the row starting with Definition & has six columns, as do the next two rows. Edit: Remember that & separates columns, so if there are five & in a row, that means there are six columns. – Torbjørn T. May 15 '14 at 15:11

The tabular content is divided into six columns, but only five are declared with the macro.

Something like:

\begin{tabular}{|L|L|L|L|L|}         %five columns
                 1&2&3&4&5&6         %six columns

Which will not work.

To solve the compilation error the number of columns should be equal or less than that declared with the macro.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.