Tables – How to Center Text in a Table Cell

centertables

How can I center this cell text?

enter image description here

 \documentclass[12pt]{article}
    \usepackage[utf8]{inputenc}
    \usepackage{graphicx}
    \usepackage[left=1.27cm,right=1.27cm,top=0.7cm,bottom=1.3cm]{geometry}
    \usepackage{fancyhdr}
    \usepackage{array,multirow,makecell}
    \usepackage{colortbl} 
    \usepackage{xcolor}
    \usepackage{here}
    \newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
    \newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
    \newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
    \pagestyle{fancy}
    
    
    % pour les pieds de page
    \cfoot{ \textsubscript{ Trame du document : FOR\_TEMPLATE }}
    \rfoot{\textsubscript{ \color{red} Ne pas reproduire / Copie contrôlée}}
    \begin{document}
    \begin{table}[!h]
        \centering
        \begin{tabular}{|C{3cm}|L{13.9cm}|}
            \hline
            \rowcolor[RGB]{33,88,104}\multicolumn{2}{|c|}{\textbf{\color{white} Abbreviation }} \\ \hline
            \textbf{Abbreviation} &  \textbf{Meaning} \\ \hline
            COO & Chief Operating Officer   \\ \hline
            RQ \& AR    & Regulatory Affairs and Quality Manager  \\ \hline
            ANSM & Agence Nationale de Sécurité du Médicament et des produits de santé (National drug and medical devices agency) \\ \hline
            CPP & Comité de Protection des Personnes (Ethics Committee) \\ \hline
            CNIL & Commission Nationale Informatique et Liberté (French data protection agency) \\ \hline
            CER & Clinical Evaluation Report \\ \hline 
            IFU &   Instructions For Use \\ \hline
            NC &    Non-conformity \\ \hline
            PMSR &  Post-Market Surveillance Report \\ \hline
            PSUR &  Periodic Safety Update Report  \\ \hline
            CAPA &  Corrective and Preventive Actions \\ \hline
            
        \end{tabular}
    \end{table}
    
    \end{document}

Best Answer

With tabularray package is simple:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage[hmargin=1.27cm,top=0.7cm,bottom=1.3cm]{geometry}
\usepackage{xcolor}
\usepackage{tabularray}

\begin{document}
    \begin{table}
\begin{tblr}{hlines, vlines,
             colspec = {Q[l,m] X[l, m]},
              row{1} = {font=\bfseries, bg=teal, fg=white}
              row{2} = {font=\bfseries}
              }
\SetCell[c=2]{c}  Abbreviation
            &                                           \\
Abbreviation    &   Meaning                             \\ 
COO         & Chief Operating Officer                   \\
RQ \& AR    & Regulatory Affairs and Quality Manager    \\
ANSM        & Agence Nationale de Sécurité du Médicament 
et des produits de santé (National drug and medical devices agency) \\
CPP         & Comité de Protection des Personnes (Ethics Committee) \\
CNIL        & Commission Nationale Informatique et Liberté (French data protection agency)  \\
CER         & Clinical Evaluation Report \\
IFU         & Instructions For Use \\
NC          & Non-conformity \\
PMSR        & Post-Market Surveillance Report \\
PSUR        & Periodic Safety Update Report  \\
CAPA        & Corrective and Preventive Actions \\ 
\end{tblr}
    \end{table}
\end{document}

enter image description here

but you may liked the following table design:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage[hmargin=1.27cm,top=0.7cm,bottom=1.3cm]{geometry}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}
  \ExplSyntaxOn
\NewChildSelector{eachthree}
  {
    \int_step_inline:nnnn {6}{3}{\l_tblr_childs_total_tl}
      { \clist_put_right:Nn \l_tblr_childs_clist {##1} }
  }
\ExplSyntaxOff

\begin{document}
    \begin{table}
\begin{tblr}{colspec = {Q[l] X[l]},
              row{1} = {font=\bfseries, bg=teal, fg=white},
              row{2} = {font=\bfseries},
             row{3-Z} = {rowsep=0.5pt},
             row{eachthree} = {abovesep=1.5ex}
             }
\SetCell[c=2]{c}  Abbreviation
            &                                           \\
Abbreviation    &   Meaning                             \\ 
    \midrule
COO         & Chief Operating Officer                   \\
RQ \& AR    & Regulatory Affairs and Quality Manager    \\
ANSM        & Agence Nationale de Sécurité du Médicament 
et des produits de santé (National drug and medical devices agency) \\
CPP         & Comité de Protection des Personnes (Ethics Committee) \\
CNIL        & Commission Nationale Informatique et Liberté (French data protection agency)  \\
CER         & Clinical Evaluation Report            \\
IFU         & Instructions For Use                  \\
NC          & Non-conformity                        \\
PMSR        & Post-Market Surveillance Report       \\
PSUR        & Periodic Safety Update Report         \\
CAPA        & Corrective and Preventive Actions     \\ 
    \bottomrule
\end{tblr}
    \end{table}
\end{document}

enter image description here

Related Question