I know there are a few posts with similar titles. But my case is different. When I use \documentclass{article}
, my table fits properly on the page. But when I use my university's document class \documentclass{ucr}
, my table becomes stretched and goes beyond the page width.
The code that works:
\documentclass[12pt]{article}
%\usepackage[top=1in, left=1in, right=1in, bottom=1in]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{table}[!h]
\centering{}%
\begin{tabular}{>{\centering}p{2cm}>{\centering}p{2cm}>{\centering}p{2cm}}
\toprule
\centering{}Parameters & \centering{}GARCH-N & \centering{}GARCH-t\tabularnewline
\midrule
\midrule
$\delta$ & \centering{}0.1106{*} (6.50) & \centering{}.1084{*} (6.1425) \tabularnewline
$\beta_{1}$ & \centering{}0.630{*} (9.64) & \centering{}0.629{*} (9.031) \tabularnewline
$\alpha_{0}$ & \centering{}0.008{*} (2.86) & \centering{}0.008{*} (2.855) \tabularnewline
$\alpha_{1}$ & \centering{}0.203{*} (4.15) & \centering{}0.232{*} (4.412) \tabularnewline
$\alpha_{2}$ & \centering{}0.663{*} (10.34) & \centering{}0.639{*} (9.261) \tabularnewline
$\text{\ensuremath{\nu}}$ & & \centering{}5.51{*} (63.53) \tabularnewline
Log- Likelihood & 14.603 & 26.318\tabularnewline
\bottomrule
\end{tabular}
%\begin{doublespace}
\caption{Blah blah}
%\end{doublespace}
\end{table}
\end{document}
The code that does not work is the same as the above except the first line:
\documentclass[12pt]{ucr}
You can download the ucr class file called LaTex Template (Chairperson)* from http://graduate.ucr.edu/filingresources.html
I will be grateful if you could provide some suggestions here.
\begin{tabular}{>{\centering}p{2cm}>{\centering}p{2cm}>{\centering}p{2cm}}
so assuming you have 6cm (+36pt cell padding) available. If a different class has a narrower text width than that then the table will not fit. You do not need p columns here anyway why not simply usec
columns and let the table be its natural widthc
columns then the standard errors (numbers inside the parentheses) do not get placed under the coefficients, rather they are placed on the right side of each coefficient. How can I overcome this?c
type columns and keep the standard errors in the line underneath the coefficient of you insert your data in two rows as follows:$\delta$ & 0.1106 & .1084 \\ & (6.50) & (6.1425) \\
p
column type might appear to be convenient at first, but it precludes you from implementing truly decent typesetting practices such as aligning the numbers on their respective decimal markers.