LaTeX forum ⇒ Graphics, Figures & TablesProblem with table Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Athene_47
Posts: 15
Joined: Fri Apr 06, 2018 5:02 pm

Problem with table

Postby Athene_47 » Sun Oct 07, 2018 5:33 pm

Hi guys !! I have a problem with this table. As you can see from the image below I can't close the right - margin of the table

Help me !!

Here the code

  1. \usepackage{setspace}
  2. \usepackage{multirow}
  3. \usepackage{diagbox}
  4. \usepackage{slashbox}
  5. \usepackage[round-mode=places, round-integer-to-decimal, round-precision=2,
  6. table-number-alignment=center,
  7. round-integer-to-decimal
  8. ]{siunitx}
  9. \begin{table}
  10. \small\sf\centering
  11. \caption{Variations of ICT-related and social capital variables from 2006 to 2013.}
  12. \begin{tabular}{|c|c|c|c|c|c|c|}
  13. \toprule
  14. \backslashbox[30mm]{Regions}{Indicators}
  15. \multirow{1}{*} {} &
  16. \multicolumn{1}{|p{2cm}}{\centering Social partecipation \\ activities} &
  17. \multicolumn{1}{|p{2cm}}{\centering Unpaid work \\ for organizations or volunteer groups} &
  18. \multicolumn{1}{|p{2cm}}{\centering Founded \\ associations} &
  19. \multicolumn{1}{|p{2cm}}{\centering Ordered/bought over the internet} &
  20. \multicolumn{1}{|p{2cm}}{\centering Accessed the Internet} &
  21. \multicolumn{1}{|p{2cm}}{\centering Broadband connection}\\
  22. \hline
  23. Piemonte & -3,4 & 0,3 & -3,9 & 0,9 & 20,5 & 44,4\\
  24. Valle D'Aosta & -5,9 & -2,3 & -2,9 & 1,2 & 25,6 & 46,4 \\
  25. Liguria & -1,4 & 0,0 & -3,6 & 2,9 & 21,6 & 37,1 \\
  26. Lombardia & -1,3 & -0,4 & -6,6 & 3,0 & 18,1 & 47,2 \\
  27. Trentino Alto Adige & -5,0 & -1,2 & -5,3 & 1,6 & 19,6 & 48,4 \\
  28. Veneto & -4,2 & 1,9 & -3,6 & 2,0 & 22,5 & 50,8\\
  29. Friuli Venezia Giulia & 3,6 & -0,5 & -3,7 & 1,5 & 24,1 & 42,8\\
  30. Emilia Romagna & -0,6 & 0,2 & -6,3 & 1,5 & 21,5 & 47,4\\
  31. Toscana & -2,5 & 0,6 & -2,4 & -1,2 & 20,5 & 46,9\\
  32. Umbria & -2,7 & 1,1 & -7,1 & 2,7 & 18,5 & 47,8\\
  33. Marche & -3,6 & 2,5 & -2,6 & 4,0 & 21,7 & 49,4\\
  34. Lazio & 0,1 & 1,0 & -4,1 & 1,0 & 21,3 & 45,1\\
  35. Abruzzo & 0,0 & 2,0 & -1,7 & 0,9 & 21,6 & 47,9 \\
  36. Molise & -1,8 & 2,8 & -1,7 & 0,3 & 17,8 & 40,8\\
  37. Campania & -3,9 & 0,7 & -3,3 & 0,7 & 20,1 & 42,3\\
  38. Puglia & -2,8 & 1,7 & -3,4 & 1,4 & 21,9 & 41,0\\
  39. Basilicata & -2,0 & 0,3 & -5,3 & 1,5 & 18,7 & 40,7\\
  40. Calabria & -3,5 & -0,2 & -3,7 & 3,6 & 18,7 & 42,2\\
  41. Sicilia & -4,0 & 0,6 & -3,2 & 1,6 & 22,3 & 40,2\\
  42. Sardegna & -6,3 & 1,0 & -4,1 & 4,4 & 21,5 & 48,0\\
  43. \textbf{Italy} & \textbf{-2,6} & \textbf{0,6} & \textbf{-3,9} & \textbf{1,8} & \textbf{20,9} & \textbf{44,8}\\
  44. \bottomrule
  45. \end{tabular}
  46. \end{table}
  47.  
  48. \end{document}
Attachments
result.JPG
result.JPG (54.32 KiB) Viewed 193 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9192
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Oct 07, 2018 6:45 pm

Hi,

you just need to add the second | in this line here:

\multicolumn{1}{|p{2cm}|}{\centering Broadband connection}\\

That's because you override the |c| column style by p, and need to re-add the | too.

Stefan
Site admin

Athene_47
Posts: 15
Joined: Fri Apr 06, 2018 5:02 pm

Postby Athene_47 » Mon Oct 08, 2018 9:50 am

It works !!

Thanks Stefan :)


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 7 guests