0

I'm trying to do a table with 10 columns but it goes out of the page. I would like to know if it is possible to resolve that problem.

enter image description here

Here's an MWE:

\begin{table*}
\small
\centering
\caption{Some Typical Commands}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|l|} \hline
\multirow{4}{*}{Années} & \multicolumn{3}{c|}{\makecell[cc]{Utilisateurs Internet\\(en millions)}} & \multicolumn{3}{c|}{\makecell[cc]{Utilisateurs Internet mobile\\(en millions)}} & \multicolumn{3}{c|}{\makecell[cc]{Utilisateurs en zones\\rurales (en \%)}}\\ \cline{2-10}
 & \makecell[cc]{Chine\\continentale} & Hongkong & Macao & \makecell[cc]{Chine\\continentale} & Hongkong & Macao & \makecell[cc]{Chine\\continentale} & Hongkong & Macao\\ \hline

2007 & 210 & 4.5 & 0.2 & 50 & 10.8 & 0.8 & N/D & 0 & 0 \ \hline 2008 & 298 & 4.7 & 0.3 & 118 & 11.6 & 0.9 & 28.4 & 0 & 0 \ \hline 2009 & 384 & 4.8 & 0.3 & 233 & 12.6 & 1 & 27.8 & 0 & 0 \ \hline 2010 & 457 & 5.1 & 0.3 & 303 & 13.8 & 1.1 & 27.3 & 0 & 0 \ \hline 2011 & 513 & 5.1 & 0.3 & 356 & 15.3 & 1.4 & 26.5 & 0 & 0 \ \hline 2012 & 564 & 5.2 & 0.4 & 420 & 16.4 & 1.6 & 27.6 & 0 & 0 \ \hline \end{tabular} \end{table*}

Thank you in advance!

  • I would be better if you transpose the table, switching rows with columns and viceversa. Otherwise, you can use the landscape enviroment, of the pdflscape package to put the table in a landscape page. – Mane32 Apr 20 '23 at 18:20
  • 3
    The good news is that most of the space is taken up by titles. Abreviate? Rotate text 90 defgrees? – John Kormylo Apr 20 '23 at 18:48
  • 1
    just use headings such as Chine HK Macao You could add text under the table clarifying Chine = Chine continentale – David Carlisle Apr 20 '23 at 20:30
  • Thank you all! I tested all your suggestions and the better idea was to reduce the titles ("Chine continentale" into "Chine", aso.). Thank you everyone! – Guillaume Apr 21 '23 at 10:13

1 Answers1

1

Like this?

enter image description here

One option with simple code is to use talltblr of tabularray package and at table footnote explain that with "China" is considered Continental China:

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

\begin{document} \begin{table} \centering \begin{talltblr}[ caption = {Some Typical Commands}, label = {tab:?}, note{a} = {Continental China} ]{hlines, vlines, colspec = { l {9}{c}} } \SetCell[r=2]{c} Années & \SetCell[c=3]{c} {Utilisateurs Internet\(en millions)} & & & \SetCell[c=3]{c} {Utilisateurs Internet mobile\(en millions)} & & & \SetCell[c=3]{c} {Utilisateurs en zones\rurales (en %)} & & \ & China\TblrNote{a} & Hongkong & Macao & China\TblrNote{a} & Hongkong & Macao & China\TblrNote{a} & Hongkong & Macao \

2007 & 210 & 4.5 & 0.2 & 50 & 10.8 & 0.8 & N/D & 0 & 0 \ 2008 & 298 & 4.7 & 0.3 & 118 & 11.6 & 0.9 & 28.4 & 0 & 0 \ 2009 & 384 & 4.8 & 0.3 & 233 & 12.6 & 1 & 27.8 & 0 & 0 \ 2010 & 457 & 5.1 & 0.3 & 303 & 13.8 & 1.1 & 27.3 & 0 & 0 \ 2011 & 513 & 5.1 & 0.3 & 356 & 15.3 & 1.4 & 26.5 & 0 & 0 \ 2012 & 564 & 5.2 & 0.4 & 420 & 16.4 & 1.6 & 27.6 & 0 & 0 \ \end{talltblr} \end{table*} \end{document}

Edit:
Regarding to you comment, you can abbreviate "Hongkong" to HK too. With this the width of table further shrink and make a space to make all last nine columns equal width by use of X[c] column type insead c:

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

\begin{document} \begin{table} \centering \begin{talltblr}[ caption = {Some Typical Commands}, label = {tab:?}, note{a} = {Continental China}, note{b} = {Hongkong} ]{hlines, vlines, colspec = { l {9}{X[c]}} } \SetCell[r=2]{c} Années & \SetCell[c=3]{c} {Utilisateurs Internet\(en millions)} & & & \SetCell[c=3]{c} {Utilisateurs Internet mobile\(en millions)} & & & \SetCell[c=3]{c} {Utilisateurs en zones\rurales (en %)} & & \ & China\TblrNote{a} & HK\TblrNote{b} & Macao & China\TblrNote{a} & HK\TblrNote{b} & Macao & China\TblrNote{a} & HK\TblrNote{b} & Macao \

2007 & 210 & 4.5 & 0.2 & 50 & 10.8 & 0.8 & N/D & 0 & 0 \ 2008 & 298 & 4.7 & 0.3 & 118 & 11.6 & 0.9 & 28.4 & 0 & 0 \ 2009 & 384 & 4.8 & 0.3 & 233 & 12.6 & 1 & 27.8 & 0 & 0 \ 2010 & 457 & 5.1 & 0.3 & 303 & 13.8 & 1.1 & 27.3 & 0 & 0 \ 2011 & 513 & 5.1 & 0.3 & 356 & 15.3 & 1.4 & 26.5 & 0 & 0 \ 2012 & 564 & 5.2 & 0.4 & 420 & 16.4 & 1.6 & 27.6 & 0 & 0 \ \end{talltblr} \end{table*} \end{document}

enter image description here

Zarko
  • 296,517
  • Thank you! Your idea is the same as David Carlisle's and 'John Kormylo's. I abbreviated « Chine continentale » into « Chine » and « Hongkong » into « HK ». As your table is better than mine, I'll keep it! – Guillaume Apr 21 '23 at 10:11
  • @Guillaume, you still can abbreviate "HongKong" to HK. Well, extend their ideaa a bit by adding table notes ... – Zarko Apr 21 '23 at 10:24
  • I've tried but I don't know how to add a new note. How can I do it? I've tried that but it didn't work:

    note{a} = {Chine continentale} note{b} = {Hongkong} ...

    – Guillaume Apr 21 '23 at 10:33
  • 1
    @Guillaume, eee edited answer. – Zarko Apr 21 '23 at 11:02
  • thank youuuuuuu! :) – Guillaume Apr 22 '23 at 15:32