# floating sideways table on a rotated page in pdf-viewer

I am attempting to create very wide tables in LaTeX. For this, I want to put only these large tables sideways on the page - The rest of the work is in portrait mode.

I have experimented with "sidewaystable" from the "rotating"-package, and "pdflscape". The MWE is below.

The problem is: the first table is as I would like it, but the page is not displayed horizontally in the PDF-file. I need it to be such that when the file is opened, the page with the rotated table on it is also displayed sideways, so that the table is easily readable on the computer screen.

The second table achieves it: the page with the table 2 on it looks just as the page before with the table 1 on it - but it is actually rotated so that the table is readable. However, the second table does not have a float around it - the "blindtext" stops in the middle of the previous page.

So what I want to achieve is to combine the two: have the page with the sideways table displayed sideways when the PDF-file is opened (by the TeX-editor, Adobe Acrobat, etc.), but at the same time have the text float around the table so that the page before the table is not half-empty.

\documentclass[12pt, titlepage, twoside,headsepline]{scrartcl}
\usepackage{rotating}
%\usepackage{endfloat}
\usepackage{pdflscape}
\usepackage{blindtext}
\usepackage{dcolumn}
\usepackage{caption}

\begin{document}
\Blindtext TEXT 1 END

\begin{sidewaystable}
%\makebox[\linewidth][c]{
\begin{tabular}{l*{8}{D{.}{.}{-1}}}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline
\end{tabular}
%}
\caption{Table1}
\end{sidewaystable}

\Blindtext TEXT 2 END

\begin{landscape}
\begin{table}
%\makebox[\linewidth][c]{
\begin{tabular}{l*{8}{D{.}{.}{-1}}}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline
\end{tabular}
%}
\caption{Table2}
\end{table}
\end{landscape}

\Blindtext TEXT 3 END

\end{document}


in your landscape case the package afterpage can help. see:

\documentclass[12pt, titlepage, twoside,headsepline]{scrartcl}
\usepackage{rotating}
%\usepackage{endfloat}
\usepackage{pdflscape}
\usepackage{blindtext}
\usepackage{caption}
\usepackage{dcolumn}
\usepackage{afterpage} % <---

\begin{document}
\Blindtext TEXT 1 END

\begin{sidewaystable}
%\makebox[\linewidth][c]{
\begin{tabular}{l*{8}{D{.}{.}{-1}}}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline
\end{tabular}
%}
\caption{Table1}
\end{sidewaystable}

\Blindtext TEXT 2 END

\afterpage{% <---
\begin{landscape}
\begin{table}
%\makebox[\linewidth][c]{
\begin{tabular}{l*{8}{D{.}{.}{-1}}}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ \hline
\end{tabular}
%}
\caption{Table2}
\end{table}
\end{landscape}
}
\Blindtext TEXT 3 END

\end{document}

• There are many similar questions, but your answer hit the nail on the head for me. Thanks! – Ross Dec 8 '18 at 21:21