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:
\documentclass[a4paper,10pt]{article}
\usepackage[table]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{array}
%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
\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}
%new column type for test tables
\newcolumntype{L}{>{\leavevmode\ignorespaces\raggedleft\arraybackslash\sffamily}X}%
\newcolumntype{C}{>{\leavevmode\ignorespaces\centering\arraybackslash\sffamily}X}%
\newcolumntype{R}{|>{\leavevmode\ignorespaces\color{magenta!70!black}\raggedright\sffamily\bfseries\footnotesize}p{2.5cm}}%
\newcolumntype{H}{|>{\leavevmode\ignorespaces\color{orange!30!black}\centering\arraybackslash\sffamily\footnotesize}X}%
\newcolumntype{J}{|>{\leavevmode\ignorespaces\color{green!30!black}\centering\sffamily\footnotesize}X}%
\newcolumntype{W}{|>{\leavevmode\ignorespaces\color{blue!30!black}\centering\arraybackslash\sffamily\footnotesize}X|}%
\begin{document}
\begin{table}[ph!]
\footnotesize\centering
\rowcolors{2}{middleware_white}{middleware_light_gray}
\begin{tabularx}{0.46\textwidth}{|L|L|L|L|L|}
\hline\rowcolor{middleware_green}
\multicolumn{ 5}{|c|}{\small\textcolor{white}{\textbf{Cloud Types}}} \\ \hline
\rowcolor{middleware_dark_gray}
\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
\end{tabularx}
\caption{Cloud Types\label{tab:cloud_types}}
\end{table}
\end{document}
What am I missing?
LandCare not defined and there is also a missing&after the second last\multicolumn{1}{|C|}{...}. – Heiko Oberdiek May 15 '14 at 12:45Definition &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