Graphics, Figures & TablesProblem with table

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

Problem with table

Post by Athene_47 »

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

Code: Select all

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

\end{document}
Attachments
result.JPG
result.JPG (54.32 KiB) Viewed 2401 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Problem with table

Post by Stefan Kottwitz »

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
LaTeX.org admin
Athene_47
Posts: 15
Joined: Fri Apr 06, 2018 5:02 pm

Problem with table

Post by Athene_47 »

It works !!

Thanks Stefan :)
Post Reply