1

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.)

  • 3
    Possible duplicate of Rotate single PDF page when viewing – nox Sep 18 '18 at 18:02
  • 1
    Multiple solutions in the link above. I think the easiest one is to use the package pdflscape instead of lscape. – nox Sep 18 '18 at 18:04
  • @Skillmon correct! – Ben L Sep 18 '18 at 19:16
  • 2
    This is no duplicate of the question linked by @nox as this question not only asks to rotate the pdf page but also to keep it as a float. – Skillmon likes topanswers.xyz Sep 18 '18 at 19:16
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}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.