3

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

4
  • 3
    Possible duplicate of Rotate single PDF page when viewing
    – nox
    Commented Sep 18, 2018 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
    Commented Sep 18, 2018 at 18:04
  • @Skillmon correct!
    – Ben L
    Commented Sep 18, 2018 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
    Commented Sep 18, 2018 at 19:16

2 Answers 2

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}
1

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}
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .