Search code examples
latex

Latex Table goes out of margins


I have the following code which worked in my previous latex template, but now I have to submit to a journal and the tables goes out of the margin. I tried to use \resizebox{\textwidth}{!}{% ...} it does work. I have attached the code below for help.

\documentclass[10pt, twoside]{article}
\usepackage[b5j,hmargin={1 in,0.6 in},vmargin={1 in,0.6 in}]{geometry}
\usepackage{times}
\usepackage[labelsep=space, labelfont=bf]{caption}
\usepackage{amsmath,amssymb,amsthm,latexsym}


\begin{document}

\begin{table}[htbp]
\caption{Parameter estimates }
\label{tab:Application_MOTLOBXL1}
\begin{tabular}{lccccccccccccc}
\hline
Distribution & \multicolumn{4}{c}{Estimates} & -2Log(L) & AIC   & AICC  & BIC   & $W^{*}$ & $A^{*}$ & K-S    &  P-value & SS \\ \hline
MOTLOBX-L       & \begin{tabular}[c]{@{}c@{}}$\alpha$\\  2.62$\times 10^{-3}$\\ (8.33$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 1.21$\times 10^{1}$\\ (2.94$\times 10^{-4}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\delta$\\  1.06$\times 10^{3}$\\ (1.41$\times 10^{-9}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 1.13\\ (5.42$\times 10^{-2}$)\end{tabular}  & 24.4  & 32.4 & 33.1 & 41.0 & 0.0639 & 0.3929  & 0.0891 & 0.6998 &  0.0581          \\ \hline
MOTLOBX-W         & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 5.71$\times 10^{-3}$\\ (2.01$\times 10^{-3}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 8.45$\times 10^{1}$\\ (6.09$\times 10^{-6}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\delta$\\ 8.12$\times 10^{2}$\\ (1.28$\times 10^{-8}$)\end{tabular}  & \begin{tabular}[c]{@{}c@{}}$\lambda$\\ 3.61$\times 10^{-1}$\\ (2.07$\times 10^{-2}$)\end{tabular}  & 25.1  & 33.1 & 33.8 & 41.7 & 0.1076  & 0.6042 & 0.0971 &  0.5928 &  0.0840                    \\ \hline
WL          & \begin{tabular}[c]{@{}c@{}}$a$\\ 3.29$\times 10^{-1}$\\ (6.38$\times 10^{-2}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$b$\\ 3.97\\ (3.85$\times 10^{-1}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 7.24$\times 10^{3}$\\ (6.30$\times 10^{-5}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 1.41$\times 10^{4}$\\ (3.25$\times 10^{-5}$)\end{tabular}    & 29.1 & 37.1 & 37.8 & 45.6 &  0.1962 & 1.0892  & 0.1425 & 0.1544 & 0.1813\\ \hline
GBXII          & \begin{tabular}[c]{@{}c@{}}$a$\\ 3.01$\times 10^{-2}$\\ (3.27$\times 10^{-2}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$b$\\ 1.42\\ (5.97$\times 10^{-1}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$c$\\ 1.57\\ (5.42$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 3.22\\ (1.87)\end{tabular}    & 28.0 & 36.0 & 36.7 & 44.6 &  0.1616 & 0.9076  & 0.1318 & 0.2240 & 0.1504\\ \hline
MOOBII-Lo         & \begin{tabular}[c]{@{}c@{}}$\delta$\\ 4.51$\times 10^{2}$\\ (4.34$\times 10^{-6}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 1.96\\ (1.71$\times 10^{-1}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 9.20$\times 10^{-2}$\\ (4.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\lambda$\\ 4.45\\ (7.51$\times 10^{-2}$)\end{tabular}    & 40.4 & 48.4 & 49.1 & 57.0 &  0.3724 & 2.0787  & 0.1412 & 0.1619 & 0.2428\\ \hline
MOOBII-L         & \begin{tabular}[c]{@{}c@{}}$\delta$\\ 7.08$\times 10^{2}$\\ (1.74$\times 10^{-1}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 1.07$\times 10^{2}$\\ (3.24$\times 10^{-1}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 1.14$\times 10^{1}$\\ (1.14$\times 10^{1}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}}$\lambda$\\ 1.84$\times 10^{1}$\\ (1.89)\end{tabular}    & 32.0 & 40.0 & 40.7 & 48.6 &  0.2639 & 1.4517  & 0.1257 & 0.2727 & 0.1704\\ \hline
TLOBX-L           & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 3.17$\times 10^{-1}$\\ (1.56$\times 10^{-1}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 1.99$\times 10^{1}$\\ (8.88)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 9.13$\times 10^{-1}$\\ (6.17$\times 10^{-2}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}} - \end{tabular}  & 42.3  & 48.3 & 48.7 & 54.7 & 0.4676  & 2.5657  & 0.2280 & 0.0029 & 0.6164                     \\ \hline
TL-L           & \begin{tabular}[c]{@{}c@{}}$\alpha$\\ 4.22$\times 10^{-1}$\\ (2.96$\times 10^{-1}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 9.53\\ (5.85)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 3.53\\ (3.85$\times 10^{-1}$)\end{tabular} & \begin{tabular}[c]{@{}c@{}} - \end{tabular}  & 62.6  & 68.6 & 69.0 & 75.0 & 0.6755 & 3.6946  & 0.3781 & $<0.0001$ & 2.4809                    \\ \hline
MO-L           & \begin{tabular}[c]{@{}c@{}}$\delta$\\ 2.85$\times 10^{1}$\\ (1.27$\times 10^{1}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 7.92\\ (8.73$\times 10^{-1}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}-\end{tabular} & \begin{tabular}[c]{@{}c@{}} - \end{tabular}  & 45.6  & 49.6 & 49.8 & 53.9 & 0.4969 & 2.7489  & 0.1537 & 0.1019
 & 0.3005                     \\ \hline
OBX-L           & \begin{tabular}[c]{@{}c@{}}$\theta$\\ 5.83\\ (7.73$\times 10^{-1}$)\end{tabular}          & \begin{tabular}[c]{@{}c@{}}$\beta$\\ 1.03\\ (6.09$\times 10^{-2}$)\end{tabular}            & \begin{tabular}[c]{@{}c@{}}-\end{tabular} & \begin{tabular}[c]{@{}c@{}} - \end{tabular}  & 45.6  & 51.7 & 51.9 & 56.0 &  0.5629 & 3.0915  & 0.2313 & 0.0024 & 0.6509                     \\ \hline
\end{tabular}%
\end{table}

\end{document}

Solution

  • I am not sure if you have already submitted but I'd have a few improvements for you. Mostly, I changed to slightly better rules, formatted numbers and added extra vertical spaces for better presentation (also see the comments in the code)

    enter image description here

    \documentclass[10pt, twoside]{article}
    \usepackage[b5j,hmargin={1 in,0.6 in},vmargin={1 in,0.6 in}]{geometry}
    \usepackage{array}
    \usepackage{times}
    \usepackage{caption}
    \usepackage{amsmath,amssymb,amsthm}
    \usepackage{rotating}
        % sidwaystable environment does not rotate pages when viewing PDFs
        % In twoside documents and no option is given to the package,
        % sidewaystable rotates table such that bottom edge is facing outer margin.
        %    figuresright - bottom edge always turned to the right
        %    figureleft   - bottom edge always turned to the left
    \usepackage{booktabs}  % improved rules
    \usepackage{siunitx}   % S type column to formnat numbers
    
    \captionsetup[table]{
      skip=3pt,
      position=top,
      labelsep=space,
      labelfont=bf,
    }
    \sisetup{
      round-mode=places,
      round-precision=2,
      table-format=1.2,
    }
    
    \newcommand\mlrule{\midrule[\cmidrulewidth]}
    
    
    \begin{document}
    \begin{sidewaystable}[htbp]
      \renewcommand*{\arraystretch}{1.05}
      \setlength\extrarowheight{-3pt}
      \small
      \centering
      \caption{Parameter estimates}\label{tab:Application_MOTLOBXL1}
      \begin{tabular}{l *8{c} *5{S}}
        \toprule\rule[-4pt]{0pt}{13pt}
        Distribution & \multicolumn{4}{c}{Estimates} & -2Log(L) & AIC & AICC & BIC & {$W^{*}$} & {$A^{*}$} & {K-S} & {P-value} & {SS} \\ \midrule
        MOTLOBX-L
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$             \\
            2.62$\times 10^{-3}$\\
            (8.33$\times 10^{-4}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$            \\
            1.21$\times 10^{1}$ \\
            (2.94$\times 10^{-4}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\delta$            \\
            1.06$\times 10^{3}$ \\
            (1.41$\times 10^{-9}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$ \\
            1.13 \\
            (5.42$\times 10^{-2}$)
        \end{tabular} & 24.4 & 32.4 & 33.1 & 41.0 & 0.0639 & 0.3929 & 0.0891 & 0.6998 & 0.0581 \\ \mlrule
        MOTLOBX-W
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$             \\
            5.71$\times 10^{-3}$ \\
            (2.01$\times 10^{-3}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$            \\
            8.45$\times 10^{1}$ \\
            (6.09$\times 10^{-6}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\delta$            \\
            8.12$\times 10^{2}$ \\
            (1.28$\times 10^{-8}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\lambda$            \\
            3.61$\times 10^{-1}$ \\
            (2.07$\times 10^{-2}$)
        \end{tabular} & 25.1 & 33.1 & 33.8 & 41.7 & 0.1076 & 0.6042 & 0.0971 & 0.5928 & 0.0840 \\ \mlrule
        WL
        & \begin{tabular}[c]{@{}c@{}}
            $a$                  \\
            3.29$\times 10^{-1}$ \\
            (6.38$\times 10^{-2}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $b$  \\
            3.97 \\
            (3.85$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$            \\
            7.24$\times 10^{3}$ \\
            (6.30$\times 10^{-5}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$             \\
            1.41$\times 10^{4}$ \\
            (3.25$\times 10^{-5}$)
        \end{tabular} & 29.1 & 37.1 & 37.8 & 45.6 & 0.1962 & 1.0892 & 0.1425 & 0.1544 & 0.1813 \\ \mlrule
        GBXII
        & \begin{tabular}[c]{@{}c@{}}
            $a$                  \\
            3.01$\times 10^{-2}$ \\
            (3.27$\times 10^{-2}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $b$  \\
            1.42 \\
            (5.97$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $c$  \\
            1.57 \\
            (5.42$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$ \\
            3.22 \\
            (1.87)
        \end{tabular} & 28.0 & 36.0 & 36.7 & 44.6 & 0.1616 & 0.9076 & 0.1318 & 0.2240 & 0.1504 \\ \mlrule
        MOOBII-Lo
        & \begin{tabular}[c]{@{}c@{}}
            $\delta$            \\
            4.51$\times 10^{2}$ \\
            (4.34$\times 10^{-6}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$ \\
            1.96 \\
            (1.71$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$              \\
            9.20$\times 10^{-2}$ \\
            (4.17$\times 10^{-2}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\lambda$ \\
            4.45 \\
            (7.51$\times 10^{-2}$)
        \end{tabular} & 40.4 & 48.4 & 49.1 & 57.0 & 0.3724 & 2.0787 & 0.1412 & 0.1619 & 0.2428 \\ \mlrule
        MOOBII-L
        & \begin{tabular}[c]{@{}c@{}}
            $\delta$            \\
            7.08$\times 10^{2}$ \\
            (1.74$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$            \\
            1.07$\times 10^{2}$ \\
            (3.24$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$             \\
            1.14$\times 10^{1}$ \\
            (1.14$\times 10^{1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\lambda$           \\
            1.84$\times 10^{1}$ \\
            (1.89)
        \end{tabular} & 32.0 & 40.0 & 40.7 & 48.6 & 0.2639 & 1.4517 & 0.1257 & 0.2727 & 0.1704 \\ \mlrule
        TLOBX-L
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$             \\
            3.17$\times 10^{-1}$ \\
            (1.56$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$            \\
            1.99$\times 10^{1}$ \\
            (8.88)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$              \\
            9.13$\times 10^{-1}$ \\
            (6.17$\times 10^{-2}$)
        \end{tabular}
        & -- & 42.3 & 48.3 & 48.7 & 54.7 & 0.4676 & 2.5657 & 0.2280 & 0.0029$^{**}$ & 0.6164 \\ \mlrule
        TL-L
        & \begin{tabular}[c]{@{}c@{}}
            $\alpha$             \\
            4.22$\times 10^{-1}$ \\
            (2.96$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$ \\
            9.53 \\
            (5.85)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$ \\
            3.53 \\
            (3.85$\times 10^{-1}$)
        \end{tabular}
        & -- & 62.6 & 68.6 & 69.0 & 75.0 & 0.6755 & 3.6946 & 0.3781 & 0.0001$^{*}$ & 2.4809 \\ \mlrule
        MO-L
        & \begin{tabular}[c]{@{}c@{}}
            $\delta$            \\
            2.85$\times 10^{1}$ \\
            (1.27$\times 10^{1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$ \\
            7.92 \\
            (8.73$\times 10^{-1}$)
        \end{tabular}
        & -- & -- & 45.6 & 49.6 & 49.8 & 53.9 & 0.4969 & 2.7489 & 0.1537 & 0.1019
        & 0.3005  \\
        \mlrule
        OBX-L
        & \begin{tabular}[c]{@{}c@{}}
            $\theta$ \\
            5.83 \\
            (7.73$\times 10^{-1}$)
        \end{tabular}
        & \begin{tabular}[c]{@{}c@{}}
            $\beta$ \\
            1.03 \\
            (6.09$\times 10^{-2}$)
        \end{tabular}
        & -- & -- & 45.6 & 51.7 & 51.9 & 56.0 & 0.5629 & 3.0915 & 0.2313 & 0.0024$^{**}$ & 0.6509 \\ \midrule[\heavyrulewidth]
        \multicolumn{14}{@{}l}{$^{*}$p-value $<0.0001$, \qquad$^{**}$p-value $<0.005$}
      \end{tabular}%
    \end{sidewaystable}
    \end{document}