# How to correctly use tabular/table

What's wrong with this code, please?

\documentclass[franch]{beamer}
\usepackage{babel}
\begin{document}
\begin{frame}{Cs}
\centering
\begin{table}
\centering
\caption{Comparatif entre \textit{Two Track Unified Process} et \textit{Rational Unified Process}}
\begin{tabular}{|c{0.5cm}|c{0.5cm}|c{0.5cm}|c{0.5cm}|c{0.5cm}|}
\hline
& Axé développement & Projets cibles & Technologies & Architecture logicielle \\
\hline
RUP & \includegraphics[height=1.8ex]{images/danger} & >= 10 & \includegraphics[height=1.8ex]{images/danger} & \includegraphics[height=1.8ex]{images/danger} \\
\hline
2TUP & \includegraphics[height=1.8ex]{images/func_ok} & * & \includegraphics[height=1.8ex]{images/func_ok} & \includegraphics[height=1.8ex]{images/func_ok} \\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}


I couldn't be able to find the error. The table misses two vertical lines on output.

• the c column does not, by default, accept a width. you'll need to consult Center column with specifying width in table (tabular enviroment)? and the links within May 17 '14 at 15:08
• @cmhughes, when I replace that c by >{\centering\arraybackslash}p it still the same.
– dgs
May 17 '14 at 15:14

You can define a \newcolumntype:

\documentclass[french]{beamer}
\usepackage{babel}
\usepackage{array}             %% you need this
\usepackage[T1]{fontenc}       %% you need this
\usepackage[utf8]{inputenc}    %% you need this
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
\begin{frame}{Cs}
\centering
\begin{table}
\centering
\caption{Comparatif entre \textit{Two Track Unified Process} et \textit{Rational Unified Process}}
\begin{tabular}{|C{0.12\textwidth}*{4}{|C{\dimexpr0.22\textwidth-2\tabcolsep\relax}}|}
\hline
& Axé développement & Projets cibles & Technologies & Architecture logicielle \\
\hline
RUP & \includegraphics[height=1.8ex]{example-image} & >= 10 & \includegraphics[height=1.8ex]{example-image-c} & \includegraphics[height=1.8ex]{example-image-a} \\
\hline
2TUP & \includegraphics[height=1.8ex]{example-image-a} & * & \includegraphics[height=1.8ex]{example-image-a} & \includegraphics[height=1.8ex]{example-image-b} \\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}


• @dgs Also you should take care of your french special characters é, è and also >= which are all not printed correctly May 17 '14 at 16:00
• A minor nit to pick: add the instructions \usepackage[T1]{fontenc} and \usepackage[utf8]{inputenc} to enable the correct typesetting of accented characters such as é.
– Mico
May 17 '14 at 16:45