Graphics, Figures & TablesFit a tabular environment to the page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Fit a tabular environment to the page

Post by omkardpd »

Hi,

I am use Table-Tabular environment. I have not been able to get the entire table printed on page. The table is cut from right and bottom of the page. I tried both portrait and landscape types. I don't want table printed on two pages even. I would prefer to shrink it so that it fits the right margin. Any suggestion please?

Thank you,

Omkar

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Fit a tabular environment to the page

Post by localghost »

There is very often the possibility to optimize a table. If you would provide the code we would have something to tinker.

Apart from that you could put the whole tabular environment into a \scalebox from the graphicx package or decrease the font size inside the table environment.


Best regards
Thorsten¹
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Fit a tabular environment to the page

Post by omkardpd »

Hi,

Here is the code that I am using. There are in all 30 rows below the last row (with numbers) that I am giving as a sample. Margins for the printed pdf are 1 inch on all sides. Also, a screenshot is attached.

Code: Select all

%\begin{landscape}
\begin{table}[htbp]
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline 
\multicolumn{2}{|c|}{$\mathbf{n = 11}$} & \multicolumn{4}{c|}{\textbf{Low Range}} & \multicolumn{4}{c|}{\textbf{Moderate Range}} & \multicolumn{4}{c|}{\textbf{High Range}} \\ 
\hline 
$\mathbf{\beta}$ & $\mathbf{\alpha}$ & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} \\
\hline 
\multirow{9}{*}{0.25} & 0.1 & 152.54 & 68.13 & 440.33 & 55166.15 & 159.67 & 93.22 & 665.20 & 178530.35 & 167.19 & 113.59 & 910.44 & 382588.17 \\
 & 0.2 & 149.13 & 49.83 & 612.20 & 69655.78 & 154.84 & 68.71 & 909.13 & 229200.43 & 161.19 & 83.73 & 1212.42 & 483189.14 \\
Thank you,

Omkar
Attachments
table.jpg
table.jpg (131.63 KiB) Viewed 3311 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Fit a tabular environment to the page

Post by localghost »

You could have tried on your own with the commands provided by the graphicx package or a switch to decrease the font size as described in my last reply.

Code: Select all

\begin{table}[!ht]
\centering
\tiny
\begin{tabular}{|*{14}{c|}} \hline
\multicolumn{2}{|c|}{$\mathbf{n = 11}$} & \multicolumn{4}{c|}{\textbf{Low Range}} & \multicolumn{4}{c|}{\textbf{Moderate Range}} & \multicolumn{4}{c|}{\textbf{High Range}} \\ \hline
$\mathbf{\beta}$ & $\mathbf{\alpha}$ & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} \\ \hline
\multirow{9}{*}{0.25} & 0.1 & 152.54 & 68.13 & 440.33 & 55166.15 & 159.67 & 93.22 & 665.20 & 178530.35 & 167.19 & 113.59 & 910.44 & 382588.17 \\
& 0.2 & 149.13 & 49.83 & 612.20 & 69655.78 & 154.84 & 68.71 & 909.13 & 229200.43 & 161.19 & 83.73 & 1212.42 & 483189.14 \\ \hline
\end{tabular}
\end{table}

Code: Select all

\begin{table}[!ht]
\centering
\scalebox{0.6}{
\begin{tabular}{|*{14}{c|}} \hline
\multicolumn{2}{|c|}{$\mathbf{n = 11}$} & \multicolumn{4}{c|}{\textbf{Low Range}} & \multicolumn{4}{c|}{\textbf{Moderate Range}} & \multicolumn{4}{c|}{\textbf{High Range}} \\ \hline
$\mathbf{\beta}$ & $\mathbf{\alpha}$ & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} & $\mathbf{Q^N}$ & $\mathbf{Q_1}$ & $\mathbf{\Pi^N}$ & \textbf{Var} \\ \hline
\multirow{9}{*}{0.25} & 0.1 & 152.54 & 68.13 & 440.33 & 55166.15 & 159.67 & 93.22 & 665.20 & 178530.35 & 167.19 & 113.59 & 910.44 & 382588.17 \\
& 0.2 & 149.13 & 49.83 & 612.20 & 69655.78 & 154.84 & 68.71 & 909.13 & 229200.43 & 161.19 & 83.73 & 1212.42 & 483189.14 \\ \hline
\end{tabular}
}
\end{table}
Post Reply