I ask for your help. I need to make a complex table (for my noobie level at LaTeX) for my master's thesis.
- That's the table I would like to do:
I tried some codes, but I always get a fatal error, like that one below:
\begin{table}[H]
\centering
\begin{tabular}{|l|l|}
& \multicolumn{3}{c}{Entreprises}\\
\hline
& \multicolumn{2}{c}{Baidu} & \multicolumn{2}{c}{Huawei} & \multicolumn{2}{c}{Tencent} \\ \hline
Années & \multicolumn{2}{c}{Croissance des revenus bruts (USD | RMB)} & \multicolumn{2}{c}{Croissance des profits nets (USD | RMB)} & Croissance des revenus bruts (RMB) & Croissance des profits nets (RMB) & Croissance des revenus bruts (RMB) & Croissance des profits nets (RMB) \\ \hline \hline
\renewcommand{\arraystretch}{2}
2007-2008 & 96,03\% & 83,34\% & 78,17 \% & 66,64\% & 33,50\% & 132,72\% & 83,25\% & 79,57\%\\
\end{tabular}
\renewcommand{\arraystretch}{1}
\caption{Croissance des revenus et profits des BATX chinoises.}
\captionsetup{font={footnotesize, bf}}
\caption*{Source : CNNIC, Rapports statistiques. Réalisé par l'auteur.}
\label{table:2}
\end{table}
Could you please guys tried to help me? I would very appreciate it! :)
Guillaume.
EDIT 1bis.
Thank your for your help! However, I have a problem with your tables because of the complete datas, the table goes out of page.
There is the code I have for the first table:
\documentclass[a4paper,12pt]{book}
\usepackage[left=30mm,top=30mm,right=30mm,bottom=30mm]{geometry}
\usepackage{bookmark, tabularx, varwidth, nicematrix, array, tabularray, ragged2e}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{D}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax}C}
\newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}
\newcolumntype{Z}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{\hspace*{-\tabcolsep}}}
\newcommand{\mcA}[2]{\multicolumn{#1}{c|}{#2}} % just to save some keystrokes
\newcommand{\mcB}[2]{\multicolumn{#1}{c}{#2}} % just to save some keystrokes
\newcolumntype{L}{>{\RaggedRight}X}
\begin{table}[htbp]
\centering
\begin{tabular}{|l|*{8}{c|}}
\hline
& \mcA{8}{\textbf{Croissances des entreprises}} \\ \cline{2-9}
& \mcA{4}{\textbf{Baidu}} & \mcA{2}{\textbf{Huawei}} & \mcA{2}{\textbf{Tencent}} \\ \hline
\textbf{Années} & \mcA{2}{Revenus bruts (RMB | USD)} & \mcA{2}{Profits (RMB | USD)} & Revenus bruts (RMB) & Profits (RMB) & Revenus bruts (RMB) & Profits (RMB) \\ \hline
\textbf{2007-2008} & 83,34\% & 96,03\% & 66,64\% & 78,17\% & 33,50\% & 132,74\% & 83,25\% & 79,57\% \\ \hline
\end{tabular}
\caption{Croissance des revenus et profits des BATX chinoises.
\centering
\newline\footnotesize\textbf{Source: Rapports annuels des entreprises concernées. Réalisé par l'auteur.}}
\label{tab:2}
\end{table}
\end{document}
Edit 2.
Thank you Zarko! Your table is perfect. I'm sorry about my bad MWE. I'm new at LaTeX and my file is very complex to understand with all packages, also. So I wouldn't to share with you all the mess.
I would have just one question about your table: is it possible to retire italic to the remark{Source}?