2

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.

2

1 Answer 1

3

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}

enter image description here

2
  • @dgs Also you should take care of your french special characters é, è and also >= which are all not printed correctly
    – musicman
    Commented May 17, 2014 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
    Commented May 17, 2014 at 16:45

You must log in to answer this question.

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