1

I have tried many options that are presented here, adjust box resizing etc. Either the table is hard (almost impossible to read) or it is out of the page and unreadable.

What i want to happen is something i have seen in some published papers, with a new page being introduced (larger in size) which manages to accommodate for that table. I have created the table in R using xtable(), which returns a table like this:

    \begin{table}[ht]
\centering
\begin{tabular}{rrrrrrrrrrrrrrrrrrrrrrrrr}
  \hline
 & DP & DY & EP & DE & SVAR & BM & NTIS & TBL & LTY & LTR & TMS & DFY & DFR & INFL & EquityPrem & ATM.IV & IVskew & IVspread & PCratio & PCratioOI & OTMputRatio & OTMputRatioInterest & OTMcallRatio & OTMcallRatioInterest \\ 
  \hline
DP & 1.000 & 0.978 & -0.008 & 0.478 & 0.301 & 0.691 & -0.464 & -0.566 & -0.521 & 0.023 & 0.400 & 0.605 & 0.012 & -0.174 & -0.077 & -0.044 & -0.016 & -0.274 & 0.097 & 0.391 & 0.121 & 0.061 & 0.133 & 0.223 \\ 
  DY & 0.978 & 1.000 & -0.011 & 0.471 & 0.221 & 0.671 & -0.436 & -0.563 & -0.518 & -0.018 & 0.397 & 0.574 & 0.103 & -0.176 & 0.130 & -0.049 & -0.008 & -0.312 & -0.030 & 0.403 & 0.129 & 0.075 & 0.113 & 0.197 \\ 
  EP & -0.008 & -0.011 & 1.000 & -0.882 & -0.283 & 0.418 & 0.095 & -0.021 & -0.246 & 0.041 & -0.213 & -0.519 & -0.191 & 0.120 & -0.021 & -0.592 & -0.325 & -0.386 & -0.175 & 0.514 & 0.102 & 0.157 & -0.029 & -0.073 \\ 
  DE & 0.478 & 0.471 & -0.882 & 1.000 & 0.390 & -0.042 & -0.302 & -0.248 & -0.029 & -0.025 & 0.375 & 0.741 & 0.173 & -0.188 & -0.018 & 0.499 & 0.278 & 0.210 & 0.199 & -0.267 & -0.032 & -0.109 & 0.088 & 0.170 \\ 
  SVAR & 0.301 & 0.221 & -0.283 & 0.390 & 1.000 & 0.073 & -0.327 & -0.104 & -0.025 & 0.182 & 0.144 & 0.595 & -0.246 & -0.231 & -0.359 & 0.456 & 0.066 & 0.473 & 0.488 & -0.249 & 0.070 & -0.080 & 0.154 & 0.057 \\ 
  BM & 0.691 & 0.671 & 0.418 & -0.042 & 0.073 & 1.000 & -0.244 & -0.690 & -0.762 & 0.049 & 0.359 & 0.331 & -0.036 & -0.115 & -0.070 & -0.336 & -0.179 & -0.451 & 0.038 & 0.550 & 0.151 & 0.160 & 0.049 & 0.229 \\ 
  NTIS & -0.464 & -0.436 & 0.095 & -0.302 & -0.327 & -0.244 & 1.000 & 0.238 & 0.428 & 0.025 & 0.042 & -0.574 & 0.047 & 0.046 & 0.123 & 0.027 & 0.066 & 0.013 & -0.212 & -0.222 & -0.175 & -0.123 & -0.253 & -0.179 \\ 
  TBL & -0.566 & -0.563 & -0.021 & -0.248 & -0.104 & -0.690 & 0.238 & 1.000 & 0.813 & 0.004 & -0.812 & -0.434 & -0.071 & 0.170 & -0.022 & 0.143 & 0.020 & 0.354 & -0.110 & -0.322 & -0.095 & -0.056 & -0.065 & -0.093 \\ 
  LTY & -0.521 & -0.518 & -0.246 & -0.029 & -0.025 & -0.762 & 0.428 & 0.813 & 1.000 & -0.084 & -0.320 & -0.330 & 0.000 & 0.179 & -0.017 & 0.334 & 0.129 & 0.401 & -0.050 & -0.500 & -0.119 & -0.112 & -0.064 & -0.119 \\ 
  LTR & 0.023 & -0.018 & 0.041 & -0.025 & 0.182 & 0.049 & 0.025 & 0.004 & -0.084 & 1.000 & -0.091 & 0.017 & -0.467 & -0.069 & -0.206 & 0.158 & 0.067 & 0.136 & 0.253 & -0.030 & 0.030 & -0.019 & 0.125 & -0.077 \\ 
  TMS & 0.400 & 0.397 & -0.213 & 0.375 & 0.144 & 0.359 & 0.042 & -0.812 & -0.320 & -0.091 & 1.000 & 0.376 & 0.116 & -0.097 & 0.020 & 0.102 & 0.096 & -0.173 & 0.129 & 0.022 & 0.035 & -0.022 & 0.042 & 0.033 \\ 
  DFY & 0.605 & 0.574 & -0.519 & 0.741 & 0.595 & 0.331 & -0.574 & -0.434 & -0.330 & 0.017 & 0.376 & 1.000 & 0.127 & -0.306 & -0.119 & 0.456 & 0.183 & 0.172 & 0.319 & -0.157 & 0.115 & 0.030 & 0.151 & 0.224 \\ 
  DFR & 0.012 & 0.103 & -0.191 & 0.173 & -0.246 & -0.036 & 0.047 & -0.071 & 0.000 & -0.467 & 0.116 & 0.127 & 1.000 & -0.128 & 0.439 & 0.091 & 0.138 & -0.121 & -0.340 & -0.067 & 0.045 & 0.074 & -0.116 & -0.038 \\ 
  INFL & -0.174 & -0.176 & 0.120 & -0.188 & -0.231 & -0.115 & 0.046 & 0.170 & 0.179 & -0.069 & -0.097 & -0.306 & -0.128 & 1.000 & -0.018 & -0.167 & -0.110 & -0.127 & 0.040 & 0.027 & 0.060 & 0.123 & 0.016 & 0.092 \\ 
  EquityPrem & -0.077 & 0.130 & -0.021 & -0.018 & -0.359 & -0.070 & 0.123 & -0.022 & -0.017 & -0.206 & 0.020 & -0.119 & 0.439 & -0.018 & 1.000 & -0.013 & 0.042 & -0.186 & -0.604 & 0.059 & 0.040 & 0.070 & -0.098 & -0.117 \\ 
  ATM.IV & -0.044 & -0.049 & -0.592 & 0.499 & 0.456 & -0.336 & 0.027 & 0.143 & 0.334 & 0.158 & 0.102 & 0.456 & 0.091 & -0.167 & -0.013 & 1.000 & 0.453 & 0.562 & 0.306 & -0.623 & 0.045 & -0.057 & 0.086 & 0.007 \\ 
  IVskew & -0.016 & -0.008 & -0.325 & 0.278 & 0.066 & -0.179 & 0.066 & 0.020 & 0.129 & 0.067 & 0.096 & 0.183 & 0.138 & -0.110 & 0.042 & 0.453 & 1.000 & 0.164 & 0.132 & -0.207 & 0.066 & -0.019 & -0.012 & -0.078 \\ 
  IVspread & -0.274 & -0.312 & -0.386 & 0.210 & 0.473 & -0.451 & 0.013 & 0.354 & 0.401 & 0.136 & -0.173 & 0.172 & -0.121 & -0.127 & -0.186 & 0.562 & 0.164 & 1.000 & 0.296 & -0.560 & -0.042 & -0.180 & 0.086 & -0.076 \\ 
  PCratio & 0.097 & -0.030 & -0.175 & 0.199 & 0.488 & 0.038 & -0.212 & -0.110 & -0.050 & 0.253 & 0.129 & 0.319 & -0.340 & 0.040 & -0.604 & 0.306 & 0.132 & 0.296 & 1.000 & -0.173 & 0.098 & 0.030 & 0.158 & 0.042 \\ 
  PCratioOI & 0.391 & 0.403 & 0.514 & -0.267 & -0.249 & 0.550 & -0.222 & -0.322 & -0.500 & -0.030 & 0.022 & -0.157 & -0.067 & 0.027 & 0.059 & -0.623 & -0.207 & -0.560 & -0.173 & 1.000 & 0.104 & 0.178 & -0.007 & 0.096 \\ 
  OTMputRatio & 0.121 & 0.129 & 0.102 & -0.032 & 0.070 & 0.151 & -0.175 & -0.095 & -0.119 & 0.030 & 0.035 & 0.115 & 0.045 & 0.060 & 0.040 & 0.045 & 0.066 & -0.042 & 0.098 & 0.104 & 1.000 & 0.563 & 0.153 & -0.000 \\ 
  OTMputRatioInterest & 0.061 & 0.075 & 0.157 & -0.109 & -0.080 & 0.160 & -0.123 & -0.056 & -0.112 & -0.019 & -0.022 & 0.030 & 0.074 & 0.123 & 0.070 & -0.057 & -0.019 & -0.180 & 0.030 & 0.178 & 0.563 & 1.000 & 0.123 & 0.019 \\ 
  OTMcallRatio & 0.133 & 0.113 & -0.029 & 0.088 & 0.154 & 0.049 & -0.253 & -0.065 & -0.064 & 0.125 & 0.042 & 0.151 & -0.116 & 0.016 & -0.098 & 0.086 & -0.012 & 0.086 & 0.158 & -0.007 & 0.153 & 0.123 & 1.000 & 0.066 \\ 
  OTMcallRatioInterest & 0.223 & 0.197 & -0.073 & 0.170 & 0.057 & 0.229 & -0.179 & -0.093 & -0.119 & -0.077 & 0.033 & 0.224 & -0.038 & 0.092 & -0.117 & 0.007 & -0.078 & -0.076 & 0.042 & 0.096 & -0.000 & 0.019 & 0.066 & 1.000 \\ 
   \hline
\end{tabular}
\end{table}

Also i am constructing a \begin{document} class document. What i used to fit it is:

\begin{adjustbox}{angle=90}    
%\begin{table}[ht]

\resizebox{2\textwidth}{!}{\begin{tabular}{ccccccccccccccccccccccccc}
    \hline 
Table contents
    \hline
    \end{tabular}}
%\end{table}
\end{adjustbox}
  • This is going to depend so much on the table contents that we really can't start to address it. You should include that if you want help. – Chris H May 25 '17 at 15:35
  • The table is basically a correlation matrix. Do the first column and row contain the names of the variables. The rest are filled with arithmetic values – Hercules Apergis May 25 '17 at 15:36
  • Also all documents have \begin{document} so that's not particularly relevant. Do you mean you're making a custom class? We'd need to see that as well. There's a package called geometry that might help if you want to insert a page of a different size. – Chris H May 25 '17 at 15:36
  • 1 is an arithmetic value. So is 0.0123456789012345689. How they affect this table will be very different – Chris H May 25 '17 at 15:37
  • I see what you mean, the digits are maximum 3. Same sized as the Variable names. I am not making a custom class. – Hercules Apergis May 25 '17 at 15:41
  • The thing is that i have 25x25 table. If you shrink it you can't read it, rotating works well, if only the page was taller. – Hercules Apergis May 25 '17 at 15:48
  • That's why i think that creating a new page (landscape) to accommodate it is better. – Hercules Apergis May 25 '17 at 15:48
  • 1
    Presumably you already have the table typeset properly by xtable, so why not just provide it here so we have something to work with? – Troy May 25 '17 at 16:08
  • Sorry for the delay!! I attached the table! – Hercules Apergis May 27 '17 at 11:13
  • Would you please specify which steps you have taken and tried to get it on your page? – TeXnician May 27 '17 at 11:32
  • I added the commands used. The thing is it is way to small when i fit it and can't read anything on a A4 page, No matter the angle of the text. – Hercules Apergis May 27 '17 at 11:38
  • The code is not working, because class etc. is missing. So we even do not know the page layout. Have you tried to use pdflscape? – Schweinebacke May 27 '17 at 11:46
  • you mean this: `\documentclass[12pt]{article} \usepackage{bm} \usepackage{mathrsfs} \usepackage{amsmath} \usepackage{graphicx} \usepackage{adjustbox}

    \renewcommand{\baselinestretch}{1.5}

    \begin{document}` ?

    – Hercules Apergis May 27 '17 at 12:03
  • Is it still viable to do this in LaTeX? – Hercules Apergis Jun 01 '17 at 09:57

0 Answers0