0

I have the following longtable, I want to center its content both vertically and horizontally, So far I've successed in centering it in one of them using the array package and newcolumntype

\usepackage{array} \newcolumntype{C}[1]{>{\centering}p{#1}} 

This is the table :

\begin{longtable}{| C{0.2\textwidth} | C{0.25\textwidth} | C{0.25\textwidth} | C{0.25\textwidth} |} \hline \textbf{Méthode} & \textbf{Description} & \textbf{Points Forts} & \textbf{Points faibles} \\ \hline \textit{Scrum} & \begin{itemize}[leftmargin=0.4cm] \item Hiérarchisation des membres de l'équipe. \item Développement progressif. \item Le travail est suivi quotidiennement. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Entièrement développé et testé pour des courtes itérations. \item Processus simple. \item Augmentation de productivité. \item Responsabilité collective de l'équipe. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Il est efficace pour les moyens et les petits projets. \item Si l'un des membres de l'équipe quitte, il peut avoir un effet inverse sur le développement du projet. \end{itemize} \\ \hline RUP (Rational Unified Process) & \begin{itemize}[leftmargin=0.4cm] \item Promu par rational. \item Le RUP est une méthodologie et à la fois un outil prêt à l'emploi. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Itératif. \item Spécifie le dialogue entre les différents intervenants du projet : les plannings, les prototypes... \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Coûteux à personnaliser. \end{itemize} \\ \hline XP (eXtreme Programming) & \begin{itemize}[leftmargin=0.4cm] \item Ensemble de "Best Practice" de développement. \item S'adapte bien avec des projets de moins de 10 personnes. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Itératif \item Simple à mettre en \oe{}uvre. \item Concentre plus sur l'aspect technique : processus développement, prototypes, tests... \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Assez difficile dans sa mise en \oe{}uvre : quels intervenants, quels livrables ? \end{itemize} \\ \hline 2TUP (Two Track Unified Process) & \begin{itemize}[leftmargin=0.4cm] \item S'articule autour de l'architecture. \item Suit un cycle de développement en Y. \item Vise des projets de toutes tailles. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item Donne une place à la technologie et à la gestion du risque. \item Définit les profils des intervenants, les plannings, les livrables. \end{itemize} & \begin{itemize}[leftmargin=0.4cm] \item N'exige pas de documents types. \end{itemize} \\ \hline \caption{Comparaison des méthodologies de gestion de projet} \label{tb:comp_meth} \end{longtable} 

How can I center the content vertically and horizontally?

2
  • 1
    Please tell us which document class you use and what the page and textblock dimensions are. Is the table supposed to fit on one page? Commented Jun 1, 2016 at 12:02
  • Instead of \centering you might try \hfil or \hfill between columns. Without an MWE I can only guess. Commented Jun 1, 2016 at 12:43

1 Answer 1

1

I am unable to compile your code, but by I brief look I suspect that changing

\newcolumntype{C}[1]{>{\centering}p{#1}} 

with

\newcolumntype{C}[1]{>{\centering}m{#1}} 

will solve your problems

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.