2

I am writing a report and I want to place a big sidewaystable inside an appendix. More specifically, this appendix does not contain anything else but the table.

\newpage\begin{appendices}

\section{References}
%\addcontentsline{toc}{section}{References}

\bibliographystyle{IEEEtran}
\bibliography{bibliography}

\newpage
\section{Pitch - Frequency Table} \label{pitchfrequency}
\begin{sidewaystable}[htbp!]
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|}
  ...a lot of cell data...
\end{tabular}
\caption{Something.}
\end{sidewaystable}

\end{appendices}

I want the result to be one page for the appendix Pitch - Frequency Table, consisting of the appendix name and the table. However, the above code creates two pages, one for the appendix name and one for the sideways table. Any tips?

These are the two pages shown in Overleaf:

table

THIS CAN BE REPRODUCED HERE: https://www.overleaf.com/9856935hhnzmbvssdhw

pavlos163
  • 147
  • presumably it's too big to fit under the section heading but as you have shown no example, or said how big the table or your page is, impossible to suggest any change. – David Carlisle Jun 04 '17 at 16:25
  • I just added a picture of the table. Please do tell me if you need anything else. – pavlos163 Jun 04 '17 at 16:30
  • 3
    A ful MWE would be nice, so we don't have to guess what packages to load. – John Kormylo Jun 04 '17 at 16:32
  • 1
    it is virtually impossible to tell anything from an image, (questions are always clearer if they provide an example to reproduce the problem) but as i say it's presumably just too big stick \small before the \begin{tabular} – David Carlisle Jun 04 '17 at 16:32
  • 2
    From the manual: two new environments, sidewaystable and sidewaysfigure, each of which produces a single page-size float with contents rotated ±90 degrees; – JPi Jun 04 '17 at 16:47
  • I added a link to reproduce. – pavlos163 Jun 04 '17 at 16:55

2 Answers2

3

As noted in my comment, sidewaystable creates a page-size float regardless of its contents. You can do the following. Provided that there's room on the page, things can work out as desired. If you're desperate then you can use the float package with [H] option.

\documentclass{article}

\usepackage{rotating}

\begin{document}

\appendix

\section{References}


\newpage
\section{Pitch - Frequency Table} \label{pitchfrequency}
\begin{table}[h!]
\rotatebox{90}{ \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|}
        ...a lot of cell data...
    \end{tabular}}
\caption{Something.}
\end{table}



\end{document}
JPi
  • 13,595
1

This will rotate the caption.

\documentclass{ieeetran}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}
\begin{appendices}

\section{References}
%\addcontentsline{toc}{section}{References}

%\bibliographystyle{IEEEtran}
%\bibliography{bibliography}

\newpage
\section{Pitch - Frequency Table} \label{pitchfrequency}
\vfil
% get width of tabular
\sbox0{\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|c|c|}
  ... & a & lot & of & cell & data & ...
\end{tabular}}
{\centering
\rotatebox[origin=c]{90}{\begin{minipage}{\wd0}
\usebox0
\captionof{table}{Something.}
\end{minipage}}%
}
\end{appendices}
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120