1

I am new to overleaf and trying to finish a manuscript using an overleaf template "Template for INFORMS Journal on Data Science" I am trying to rotate a table with 15 columns but the following code does not allow me to fit the table in the page width. I didn't use the sidewaystable methods as I found that informs template has suggested me using \begin{rotate} to rotate the table. The template is from as follows: https://www.overleaf.com/latex/templates/template-for-informs-journal-on-data-science/srqvhmybxgfn


\documentclass[ijds,nonblindrev]{informs-ijds}

\OneAndAHalfSpacedXI

\begin{document}


\RUNTITLE{Tis a Butter Place}


\TITLE{Tis a Far, Far Butter Place}

\KEYWORDS{butter, margarine, silliness} \HISTORY{This paper was
first submitted on April 12, 1922 and has been with the authors for
83 years for 65 revisions.}

\maketitle

\begin{rotate}
\begin{table}
\TABLE
{Posterior covariance of estimation $\bar{\beta}$}
{\begin{tabular}{p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} p{1.2cm} }
\hline

Variable & \centering $Intercept$ & \centering $CC1$ & \centering $CC2$ & \centering $CCCCC3$ & \centering $CCC4$ &
     \centering $CC1 \times TS(STD)$ & \centering $CC2 \times TS(STD)$ & \centering $CCCC3 \times TS(STD)$ & \centering $CCC4 \times TS(STD)$ &
     \centering $CC1 \times IT(STD)$ & \centering $CC2 \times IT(STD)$ & \centering $CCCC3 \times IT(STD)$ & \centering $CCC4 \times IT(STD)$ & \centering $Switching$ & \centering $Price Fee_{\log}$\\

\hline
\end{tabular}}
{}
\end{table}
\end{rotate}

\end{document}


I tried the adjustbox and resizebox method but it does not make any difference. Please kindly advise if there is anyway to fit all the columns in the page. Appreciate!

And how to make the caption same as this one? enter image description here

3
  • Welcome to TeX.SE! Please extend your code fragment to complete small document with your rotate table. Does your table occupy whole page? If yes, than try to use sidewaystable of rotating package.
    – Zarko
    Commented Oct 12, 2023 at 8:28
  • Thank you for the heads-up! I have expanded the code. As for the sidewaystable and rotating, it seems that the default setting for the template have conflict with the rotating package. That's why I am not sure how to solve this. Many thanks! (and it will make the caption, number etc of the table different from the other tables).
    – lcwu
    Commented Oct 12, 2023 at 8:38
  • 1
    Your table has (at least) two issues: (i) column headers are wider than column width, so it contents protrude into adjacent columns, (ii) width of whole table seems to be (far) wider as is available space for it, even if you significantly reduce used font size in table. One option can be rotate column headers, but since table contents is unknown, I'm not sure if this would solve your problem. Please, extend your table example width some rows in table body.
    – Zarko
    Commented Oct 12, 2023 at 11:14

1 Answer 1

0

I don't understand your apparent reluctance to employ a sidewaystable environment. I would also allow more flexibility in finding line break points in the header cell.

The following code employs the article document class since I don't have the informs-ijds document class on my system. I trust you'll be able to figure out how to adapt the code to the requirements of the informs-ijds class.

enter image description here

\documentclass{article}  %[ijds,nonblindrev]{informs-ijds}

%\OneAndAHalfSpacedXI

\usepackage{rotating} % for 'sidewaystable' env.
\usepackage{tabularx} % for 'tabularx' env. and 'X' column type
\usepackage{ragged2e} % for '\Centering' macro
% Optional -- set page parameters as needed:
\usepackage[a4paper,margin=2.5cm]{geometry} 

\begin{document}

%\RUNTITLE{Tis a Butter Place}
%\TITLE{Tis a Far, Far Butter Place}
%\KEYWORDS{butter, margarine, silliness} 
%\HISTORY{This paper was first submitted on 
% April 12, 1922 and has been with the authors 
% for 83 years for 65 revisions.}
%\maketitle

\begin{sidewaystable}

\setlength\extrarowheight{2pt} % for a more open "look"
\setlength\tabcolsep{3pt} % default: 6pt

\caption{Posterior covariance of estimation $\bar{\beta}$}

\smallskip
\begin{tabularx}{\textwidth}{ | *{16}{ >{\Centering\hspace{0pt}}X | } }
\hline
Variable & Intercept & CC1 & CC2 & CCCCC3 & CCC4 
& CC1 $\times$ TS (STD)   & CC2  $\times$ TS (STD) 
& CCCC3 $\times$ TS (STD) & CCC4 $\times$ TS (STD) 
& CC1   $\times$ IT (STD) & CC2  $\times$ IT (STD) 
& CCCC3 $\times$ IT (STD) & CCC4 $\times$ IT (STD) 
& Switching & Price Fee\textsubscript{log} \\
\hline
\end{tabularx}

\end{sidewaystable}

\end{document}

enter image description here

1
  • Mi Mico, thank you for the suggestion. In this case, is there anyway to adjust the caption? By using the sidewaystable, the caption format is completely different from the original table (I guess it's because of the default environment). Is there anyway to make the table caption same as the picture above? Really appreciate your help.
    – lcwu
    Commented Oct 14, 2023 at 2:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .