1

I'm looking for a solution to rotate pages in my PDF output in the opposite direction to what seems to be the standard for most packages. I have a header and footer on my page and for aesthetic reasons would like the page to rotate to a landscape orientation by turning counterclockwise i.e. the content appears to rotate clockwise and the footer appears on the right hand side.

I've tried the pdflscape package, which rotates it in the opposite direction by default and seemingly no option to alter rotation direction:

\begin{landscape}
... 
\end{landscape}

And I've also tried the rotation package, which achieves the layout that I want, but leaves the page in portrait mode when viewing in a PDF viewer:

\begin{turn}{-90}
\begin{minipage}
... 
\end{minipage}
\end{turn}

I'd like to keep the header and footer in their "portrait" positions for consistency within the document, as is the case in both of these solutions.

So, is there any way to achieve a landscape pageview in a PDF, whilst simply rotating the page in a counterclockwise direction?

0
1

This solution creates a new environment: clandscape (counter rotate).

\documentclass{article}
\usepackage{pdflscape}
\usepackage{etoolbox}
\usepackage{lipsum}

\makeatletter
\let\clandscape=\landscape
\let\endclandscape=\endlandscape
\patchcmd{\clandscape}{\PLS@Rotate{90}}{\PLS@Rotate{-90}}{}{}
\makeatother

\begin{document}
\lipsum[1]
\begin{clandscape}
\lipsum[2]
\end{clandscape}
\begin{landscape}
\lipsum[3]
\end{landscape}
\end{document}

The actual implementation of landscape is probably handled by the shipout hook, but so far all attempts to modify \ShipoutBox have failed.. For single pages one can use \rotatebox (adjustbox package) and a minipage.

\documentclass{article}
\usepackage{pdflscape}
\usepackage{etoolbox}
\usepackage{lipsum}
\usepackage{adjustbox}

\makeatletter
\let\clandscape=\landscape
\let\endclandscape=\endlandscape
\patchcmd{\clandscape}{\PLS@Rotate{90}}{\PLS@Rotate{-90}}{}{}
\makeatother

\begin{document}
\lipsum[1]
\begin{clandscape}
\rotatebox{180}{\begin{minipage}[t][\textheight][t]{\linewidth}
\lipsum[2]
\end{minipage}}% flip page
\end{clandscape}
\begin{landscape}
\lipsum[3]
\end{landscape}
\end{document}
1
  • Hi, many thanks for the answer here and apologies for the very slow follow-up! I tried this solution and it results in the page footer being oriented in the firection that I want, but the page-content is rotated in the opposite direction and thus appears upside down. I've tried nesting a turn environment from the rotating package in there to crrect this but it throws a compilation error. Did you have any idea why this might be the case? – awenborn Jan 30 at 13:52

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.