Graphics, Figures & TablesTable runs off page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ThijsZaan
Posts: 1
Joined: Wed Jul 03, 2019 6:18 pm

Table runs off page

Post by ThijsZaan »

Dear all,

For my MSc thesis, I'm trying to show a large table on a page. However, the right side of the table runs off the page, and I have no idea how to tackle this problem. I hope someone here can help me. Thanks in advance!

The code for the table:

Code: Select all

\begin{landscape}

\begin{table*}[!h]
	\raggedright
	\caption{cap}
	\label{tab: ..}	
	\centering
	\begin{tabular}{p{6cm}cccccc}
		\toprule
		& \textbf{Soil Cover Practices} & \textbf{Use of OM}   & \textbf{ISFM}        & \textbf{Crop Rotation} & \textbf{Intercropping} & \textbf{Trees on Farm} \\
		\midrule
		Diversity of Income Sources          & 0.42 - 0.87          & 0.45 - 093  & 0.26 - 0.79 & 0.40 - 0.85   &             & 0.59 - 1.04  \\
		Sales Opportunities                  &                      &             &             & 0.07 - 0.71   & 0.72 - 1.40 & 1.19 - 1.80  \\
		Access to Financial Capital          & 0.38 - 1.11          & 1.13 - 1.83 & 0.68 - 1.52 &               & 0.25 - 1.04 & 1.15 - 1.22  \\
		\textbf{Income Diversity  }          & 0.38 - 0.77          & 0.55 - 0.93 & 0.36 - 0.81 & 0.23 - 0.62   & 0.43 - 0.86 & 0.85 - 1.22  \\
		\midrule
		Diversity in Annual Crops            & 0.19 - 0.74          & 0.20 - 0.78 & 0.34 - 0.97 & 0.89 - 1.42   &   & 0.66 - 1.20            \\
		Diversity in Perennial Crops         & 0.08 - 0.73          &             & 0.10 - 0.85 & 0.76 - 1.39   & 0.31 - 1.01 & 1.06 - 1.68  \\
		Cash Crops                           & 0.32 - 1.07          & 0.45 - 1.25 & 0.44 - 1.31 & 1.12 - 1.86   & 0.36 - 1.18 & 0.67 - 1.50  \\
		\textbf{Crop Diversity}              & 0.27 - 0.77          & 0.25 - 0.78 & 0.38 - 0.95 & 1.00 - 1.47   & 0.22 - 0.76 & 0.90 - 1.38  \\
		\midrule
		Diversity in Livestock Type          & 0.43 - 1.15          & 0.80 - 1.55 & 0.73 - 1.55 & 0.51 - 1.22   & 0.05 - 0.84 & 0.52 - 1.24  \\
		Livestock Health                     & 0.65 - 1.71          & 0.48 - 1.60 & 0.93 - 2.16 & 0.8 - 1.86    & 0.12 - 1.30 & 0.82 - 1.88  \\
		Feed Availability                    & 0.72 - 1.63          & 1.21 - 2.17 & 1.00 - 2.05 & 0.75 - 1.65   & 0.24 - 1.24 & 0.87 - 1.78  \\
		\textbf{State of Livestock}          & 0.63 - 1.47          & 0.86 - 1.74 & 0.93 - 1.88 & 0.72 - 1.55   & 0.18 - 1.09 & 0.42 - 0.86  \\
		\midrule
		Food Security \& Nutrition           &                      &             &             &               &             & 0.03 - 0.14  \\
		Education and Training               & 1.08 - 1.70          & 0.25 - 0.91 &             & 0.76 - 1.38   &             & 0.54 - 1.18  \\
		Assets                               & 1.36 - 2.03          & 0.40 - 1.13 &             & 0.87 - 1.55   &             & 0.92 - 1.60  \\
		\textbf{Living Conditions}           & 0.83 - 1.22          & 0.18 - 0.60 &             & 0.55 - 0.94   &             & 0.42 - 0.86  \\
		\midrule
		Impact of Shocks                     & 0.87 - 1.30          & 0.31 - 0.76 & 0.19 - 0.70 & 0.49 - 0.92   &             & 0.42 - 0.86  \\
		Ability to Cope and Mitigate Impacts & 0.47 - 1.39          & 0.29 - 1.27 & 0.63 - 1.69 & 1.21 - 2.10   & 0.43 - 1.42 & 1.52 - 2.40  \\
		Trust in External Organizations      & 0.41 - 1.14          & 0.18 - 0.96 & 0.49 - 1.09 & 0.42 - 1.15   & 0.22 - 1.03 & 0.93 - 1.65  \\
		\textbf{Coping Mechanisms}           & 0.68 - 1.18          & 0.35 - 0.90 & 0.49 - 1.09 & 0.80 - 1.30   & 0.26 - 0.82 & 1.05 - 1.54  \\
		
		\bottomrule
		\textbf{Farm Resilience}             & 0.35 - 0.90          & 0.52 - 0.88 & 0.49 - 0.89 & 0.74 - 1.07 & 0.29 - 0.67   & 0.89 - 1.22
	\end{tabular}
\end{table*}
\end{landscape}
It looks like this:

Image

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Table runs off page

Post by kaiserkarl13 »

I can't reproduce the somewhat strange bottom margin without knowledge of the document class you're using, but if I use the standard report class with the booktabs and lscape packages, it fits on the page (though not perfectly) if I put the first column heading in a 1 inch wide column, like so:

Code: Select all

\multicolumn{1}{p{1in}}{\raggedright\textbf{Soil Cover Practices}}
In the future, remember to post a Infominimal working example so we can reproduce what you see.
Post Reply