2

I have this construct in my document of a table that goes over the whole landscaped page.

\documentclass{article}
\begin{document}
\begin{landscape}
    \begin{table}
         % lot of information, goes over whole page
    \end{table}
\end{landscape}
\end{document}

The only problem is the table goes exactly where I place it. The problem with using \begin{sidewaystable} from the rotating package is that it does not rotate the page when viewing it on PDF.

EDIT: Goal is to rotate the object and keep it as floating at the same time. (As pointed out by @Skillmon.)

Ben L
  • 21

2 Answers2

2

enter image description here

\documentclass{article}
\usepackage{rotating,fancyhdr,ifthen}
\fancyhead[L]{%
\ifthenelse{\equal{\value{page}}{\pageref{tt}}}
           {landscape \global\pdfpageattr{/Rotate 90}}
           {portrait \global\pdfpageattr{}}}
\pagestyle{fancy}
\begin{document}

aaaa

    \begin{sidewaystable}
         \centering
       TTTTTTTTTTTTTTTTTTTT
         \caption{ttttt\label{tt}}

    \end{sidewaystable}


aaaaa

\pagebreak

aaaaa

aaaaa



\end{document}
David Carlisle
  • 757,742
0

This might be a duplicate of an older question here: How to wrap text around landscape page, although it's hard to say, since it's a bit strangely worded.

Anyway, the answer using the afterpage package did the trick for me.

\afterpage{%
\begin{landscape}
    \begin{table}
         % lot of information, goes over whole page
    \end{table}
\end{landscape}
}