0

how can I have both well organized arrays with the same number of lines and organize the underlining in each part of the array ??

\documentclass{report}
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{array,multirow,makecell}
\usepackage[table]{xcolor}
\usepackage{colortbl}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }m{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}\renewcommand{\arraystretch}{1.2}
\definecolor{Gray}{gray}{0.9}
\begin{document}
\begin{table}[!h]
\begin{center}
\begin{tabular}{C{8.5cm}C{8.5cm}}
\begin{tabular}[t]{C{1.5cm}L{7cm}}
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}A} &\multicolumn{1}{m{7cm}}{} \\ 
AIX & Advanced Interactive eXecutive\\
AMP & Access Module Processor\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}B} &\multicolumn{1}{m{7cm}}{} \\ 
BDDF & Banque De Détail en France\\\
BI & Business Intelligence\\
BNPP & Banque Nationale de Paris Paribas\\
BO & Business Objects \\
BPF & Banque Privée France\\
BTEQ & Batch \textbf{TE}radata Query\\ \hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}C} &\multicolumn{1}{m{7cm}}{} \\ 
CBP & Centre de Banque Privée\\
CEO & Chief Executive Officer\\ \hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}D} &\multicolumn{1}{m{7cm}}{} \\ 
DR & Direction Régionale\\
DTU & Dossier de Test Unitaires\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}E} &\multicolumn{1}{m{7cm}}{} \\ 
ENSA & Ecole Nationale des Sciences Appliquées\\
ETL & Extract Transform Load \\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}F} &\multicolumn{1}{m{7cm}}{} \\ 
FDC & Fond De Commerce externe\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}G} &\multicolumn{1}{m{7cm}}{} \\ 
GL & Génie Logiciel\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}I} &\multicolumn{1}{m{7cm}}{} \\
IAC & Info centre Animation Commercial\\
IBM & International Business Machines\\
IBM AT & IBM Applications \& Technologies\\ 
\end{tabular}
&
\begin{tabular}[t]{C{1.5cm}L{7cm}}
\multicolumn{1}{C{1.5cm}}{} &\multicolumn{1}{m{6cm}}{}\\
IHM & Interface Hommes Machines\\
IPS & IT Production Services\\
IT &  Information Technology\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}K} &\multicolumn{1}{m{7cm}}{} \\ 
KM & Knowledge Management\\
KSH & Korn shell\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}M} &\multicolumn{1}{m{6cm}}{} \\ 
MEP & la Mise En Pr oduction\\
MEQ & la Mise En Qualification\\
MOA & Maitrise d’OuvrAge\\
MOE  & Maitrise d’Oeuvre \\
MPP & Massively Parallel Processing\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}O} &\multicolumn{1}{m{6cm}}{} \\ 
ODBC & Open DataBase Connectivity\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}P} &\multicolumn{1}{m{6cm}}{} \\ PE & Parsing Engine\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}S} &\multicolumn{1}{m{6cm}}{}\\ SGBDR & Système de Gestion de Bases de Données Relationnelles\\
SQL & Structured Query Language\\
SSH & Secure Shell\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}T} &\multicolumn{1}{m{6cm}}{} \\
TMA & Tierce Maintenance Applicative\\
TPT & Teradata Parallel Transporter\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}U} &\multicolumn{1}{m{6cm}}{} \\ UO & Unités Organisationnelles\\\hline
\multicolumn{1}{C{1.5cm}}{\cellcolor{Gray}W} &\multicolumn{1}{m{6cm}}{} \\WEBI & WEB Intelligence\\\hline
\end{tabular}
\end{tabular}
\end{center}
\end{table}
\end{document}
  • 2
    your tables are to wide to bi fit in the used text width. you have two possibilities: (i) increase text width, or (ii) reduce table width. also your tables contain lot of clutter ... – Zarko Jun 4 '18 at 11:46
  • can you help me organize it !!!! – YounessGI Jun 4 '18 at 11:57
  • Help me to resolve it !! – YounessGI Jun 4 '18 at 12:11
1

try the following:

\documentclass{report}
%\usepackage{geometry}                                     % for determine page layout
\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{array, multirow, makecell,
            tabularx}                                       % added
\usepackage[table]{xcolor}
\usepackage{colortbl}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }m{#1}}   % not used
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}  % not used
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}    % not used
\renewcommand{\arraystretch}{1.1}                           % changed from 1.2
\definecolor{Gray}{gray}{0.9}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{table}[htb]
\centering
\setlength\tabcolsep{3pt}
\begin{tabular*}{\linewidth}{@{}
                    *{2}{p{\dimexpr0.5\linewidth-2\tabcolsep\relax}}
                             @{}}
    \begin{tabularx}{\linewidth}[t]{c >{\raggedright\arraybackslash}X}
\cellcolor{Gray} A  &                                       \\
AIX                 & Advanced Interactive eXecutive        \\
AMP                 & Access Module Processor               \\  \hline
\cellcolor{Gray} B  &                                       \\
BDDF                & Banque De Détail en France            \\
BI                  & Business Intelligence                 \\
BNPP                & Banque Nationale de Paris Paribas     \\
BO                  & Business Objects                      \\
BPF                 & Banque Privée France                  \\
BTEQ                & Batch \textbf{TE}radata Query         \\ \hline
\cellcolor{Gray} C  &                                       \\
CBP                 & Centre de Banque Privée               \\
CEO                 & Chief Executive Officer               \\ \hline
\cellcolor{Gray} D  &                                       \\
DR                  & Direction Régionale                   \\
DTU                 & Dossier de Test Unitaires             \\  \hline
\cellcolor{Gray} E  &                                       \\
ENSA                & Ecole Nationale des Sciences Appliquées   \\
ETL                 & Extract Transform Load                \\  \hline
\cellcolor{Gray} F  &                                       \\
FDC                 & Fond De Commerce externe              \\  \hline
\cellcolor{Gray} G  &                                       \\
GL                  & Génie Logiciel                        \\  \hline
\cellcolor{Gray} I  &                                       \\
IAC                 & Info centre Animation Commercial      \\
IBM                 & International Business Machines       \\
IBM AT              & IBM Applications \& Technologies      \\
\end{tabularx}
    &
    \begin{tabularx}{\linewidth}[t]{c >{\raggedright\arraybackslash}X}
                    &                                       \\
IHM                 & Interface Hommes Machines\\
IPS                 & IT Production Services\\
IT                  &  Information Technology               \\  \hline
\cellcolor{Gray} K  &                                       \\
KM & Knowledge Management\\
KSH & Korn shell\\\hline
\cellcolor{Gray}M   &                                       \\
MEP                 & la Mise En Pr oduction\\
MEQ                 & la Mise En Qualification\\
MOA                 & Maitrise d’OuvrAge\\
MOE                 & Maitrise d’Oeuvre \\
MPP                 & Massively Parallel Processing\\\hline
\cellcolor{Gray} O  &                                       \\
ODBC                & Open DataBase Connectivity\\\hline
\cellcolor{Gray} P  &                                       \\
PE                  & Parsing Engine\\\hline
\cellcolor{Gray} S  &                                       \\
SGBDR               & Système de Gestion de Bases de Données Relationnelles\\
SQL                 & Structured Query Language\\
SSH                 & Secure Shell\\\hline
\cellcolor{Gray} T  &                                       \\
TMA                 & Tierce Maintenance Applicative\\
TPT                 & Teradata Parallel Transporter\\\hline
\cellcolor{Gray} U  &                                       \\
UO                  & Unités Organisationnelles\\\hline
\cellcolor{Gray} W  &                                       \\
WEBI                & WEB Intelligence                      \\  \hline
\end{tabularx}
\end{tabular*}
    \end{table}
\end{document}


\documentclass{report}
\usepackage{geometry}
%\usepackage[francais]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{array, multirow, makecell,
            tabularx}                                       % added
\usepackage[table]{xcolor}
\usepackage{colortbl}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }m{#1}}   % not used
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}  % not used
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}    % not used
\renewcommand{\arraystretch}{1.1}                           % changed from 1.2
\definecolor{Gray}{gray}{0.9}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{table}[htb]
\centering
\setlength\tabcolsep{3pt}
\begin{tabular*}{\linewidth}{@{}
                    *{2}{p{\dimexpr0.5\linewidth-2\tabcolsep\relax}}
                             @{}}
    \begin{tabularx}{\linewidth}[t]{c >{\raggedright\arraybackslash}X}
\cellcolor{Gray} A  &                                       \\
AIX                 & Advanced Interactive eXecutive        \\
AMP                 & Access Module Processor               \\  \hline
\cellcolor{Gray} B  &                                       \\
BDDF                & Banque De Détail en France            \\
BI                  & Business Intelligence                 \\
BNPP                & Banque Nationale de Paris Paribas     \\
BO                  & Business Objects                      \\
BPF                 & Banque Privée France                  \\
BTEQ                & Batch \textbf{TE}radata Query         \\ \hline
\cellcolor{Gray} C  &                                       \\
CBP                 & Centre de Banque Privée               \\
CEO                 & Chief Executive Officer               \\ \hline
\cellcolor{Gray} D  &                                       \\
DR                  & Direction Régionale                   \\
DTU                 & Dossier de Test Unitaires             \\  \hline
\cellcolor{Gray} E  &                                       \\
ENSA                & Ecole Nationale des Sciences Appliquées   \\
ETL                 & Extract Transform Load                \\  \hline
\cellcolor{Gray} F  &                                       \\
FDC                 & Fond De Commerce externe              \\  \hline
\cellcolor{Gray} G  &                                       \\
GL                  & Génie Logiciel                        \\  \hline
\cellcolor{Gray} I  &                                       \\
IAC                 & Info centre Animation Commercial      \\
IBM                 & International Business Machines       \\
IBM AT              & IBM Applications \& Technologies      \\
\end{tabularx}
    &
    \begin{tabularx}{\linewidth}[t]{c >{\raggedright\arraybackslash}X}
                    &                                       \\
IHM                 & Interface Hommes Machines\\
IPS                 & IT Production Services\\
IT                  &  Information Technology               \\  \hline
\cellcolor{Gray} K  &                                       \\
KM & Knowledge Management\\
KSH & Korn shell\\\hline
\cellcolor{Gray}M   &                                       \\
MEP                 & la Mise En Pr oduction\\
MEQ                 & la Mise En Qualification\\
MOA                 & Maitrise d’OuvrAge\\
MOE                 & Maitrise d’Oeuvre \\
MPP                 & Massively Parallel Processing\\\hline
\cellcolor{Gray} O  &                                       \\
ODBC                & Open DataBase Connectivity\\\hline
\cellcolor{Gray} P  &                                       \\
PE                  & Parsing Engine\\\hline
\cellcolor{Gray} S  &                                       \\
SGBDR               & Système de Gestion de Bases de Données Relationnelles\\
SQL                 & Structured Query Language\\
SSH                 & Secure Shell\\\hline
\cellcolor{Gray} T  &                                       \\
TMA                 & Tierce Maintenance Applicative\\
TPT                 & Teradata Parallel Transporter\\\hline
\cellcolor{Gray} U  &                                       \\
UO                  & Unités Organisationnelles\\\hline
\cellcolor{Gray} W  &                                       \\
WEBI                & WEB Intelligence                      \\  \hline
\end{tabularx}
\end{tabular*}
    \end{table}
\end{document}

enter image description here

even beter result you will obtain if you will uncomment row with \usepackage{geometry}. in this case the table will look as follows:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.