3

I'm a novice in LaTeX, started just few days ago, but I have to complete report in a few days and I'm asking for help. This is code for a table:

\begin{table}
\centering
\caption{Measurements made by local people}
\label{tab:t1}\
\footnotesize\setlength{\tabcolsep}{5pt}
\begin{tabular}{l@{\hspace{10pt}} *{11}{c}}
\hline
\multirow{2}{*}{Regions} & \multirow{2}{*}{Total}& \multicolumn{3}{|c|}{Types of forest canopy} & \multicolumn{2}{|c|}{Location of forest} & \multirow{2}{*}{Open type in Community Forest} & \multirow{2}{*}{Open type in private forest} & \multirow{2}{*}{Close type in Community forest} & \multirow{2}{*}{Close type in private fores}\\
\cline{3-7}
& &Open&Close&None&Community forest&Private forest& & & & \\
\hline
Chitwan& 183 & 28 & 153 & 2 & 179 & 4 & 27 &  1 &  151 & 2\\
Gorkha& 191 & 33 & 157 & 1 & 185 & 6 & 33 &  0 &  151 & 6\\
\hline
Total&374&61&310&3&364&10& \multicolumn{2}{c}{61} &  \multicolumn{2}{c}{310} \\
\hline
\end{tabular}
\end{table}

But the table does not fit the page and I don't know what to do. I need this table on one page fitted by width like here:

enter image description here

  • 1
    welcome to tex.sx, but please always provide a complete document including \documentclass and ending \end{document} It's hard to suggest ways of making something fit if we don't know the size of the thing it's fitting in to:-) probably \multcolumn{1}{p{2cm}}{Community forest} to allow line breaking in the heading is what you are looking for – David Carlisle Apr 11 '14 at 14:17
5

I see several possibilities

  • Restructure your table. You could change column to rows (transpose), or you could combine some columns.
  • Define columns with fixed width by using p{<width>}; this will force linebreaking. You can also use manual line breaks in the table header.
  • Or reduce the font size in your tabular, by using

    {\small
    \begin{tabular}...
    \end{tabular}
    }   
    

    Available font sizes are \tiny, \scriptsize, \footnotesize, \small, \normalsize, \large, \Large, \LARGE, \huge, \Huge

  • Or you scale the whole table to the size needed.

    \scalebox{0.7}{ \begin{tabular}... \end{tabular} }
    

    or with the \resizebox command

  • use a landscape page for your table, by using sidewaystable from the package rotating.

Hope that helps.

  • +1 for transpose -- if this is actually the whole table (which it may well be as it adds up) -- if this is 2 rows from a bigger table for clarity that's a different matter, and landscape might be a better option. – Chris H Apr 11 '14 at 14:45
  • Welcome to TeX.SX! A tip: You can use backticks ` to mark your inline code as I did in my edit. – jub0bs Apr 11 '14 at 14:56
  • Resizing a table is considered bad practise. – Skillmon Apr 4 '18 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.