3

I have a sidewaysfigure, however I'd like to rotate the pdf page containing this table, avoiding the use of pdflscape package. How can I do this?

\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{rotating}
\begin{document}
\blindtext\par
%
\begin{sidewaysfigure}
\centering
I'd like to rotate this page
\caption{An example}
\end{sidewaysfigure}
\Blindtext
\end{document}

enter image description here

  • As I discovered while trying to place the figure... there are problems with the above answer and it needs some expansion. I gave a try and got a good result but did not really used sideways figure... Just used tikz package and placed everything in a rotated minipage as a hack. I also had to get rid of the pagenumber. – koleygr Sep 23 '17 at 0:27
0

Edit:

\documentclass{article}
\usepackage{blindtext}
\usepackage{rotating}
\usepackage{caption}
\usepackage{tikz}
\begin{document}
\blindtext\par

\pagebreak


\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}

\thispagestyle{empty}

\begin{tikzpicture}
\node[rotate=90] at (0,0) {\begin{minipage}{\textheight}
                   \begin{center}
                   I'd like to rotate this page
                   \end{center}
                   \blindtext

                   \centering
                   \includegraphics[width=0.3\textwidth]{example-image-a}
                      \captionof{figure}{Test caption}
                \end{minipage}};
\end{tikzpicture}
\pagebreak

\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
\Blindtext


\end{document}

From the answer here: https://tex.stackexchange.com/a/40692/120578

\documentclass{article}
\begin{document}
  text

  \pagebreak[4]
  \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
  text
  \pagebreak

  \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
  text
\end{document}

I didn't want to change the original answer, so I wrote this here as an answer to a duplicate question (I am going to flag it but I will reffer to it in the comments in the original answer).

|improve this answer|||||
  • It didn't work in my example – Daniel Valencia C. Sep 23 '17 at 0:28
  • Did you tried my edit? – koleygr Sep 23 '17 at 0:29
  • I tryed, however I didn't like the result, because the text in the last page was centered – Daniel Valencia C. Sep 23 '17 at 0:32
  • Sorry for that... my mistake ... fixed (just remove the \centering after \thispagestyle) – koleygr Sep 23 '17 at 0:34

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