1

I'm dealing with rotated figures on my document. I have 2 alternatives:

  1. sidewaysfigurefrom the rotating package
  2. landscape environment from the pdflscape package

I prefer the sidewaysfigure because the figure floats better, however, I'd like to get the PDF as what landscape makes. I don't like to use landscape because I have to add \afterpage{...} to avoid undesirable white space in the document before the rotated page and sometimes, is not compatible with other packages.

Is there a way, using slidewaysfigure, to rotate the PDF the page with the figure?

\documentclass[12pt,a4paper]{article}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{rotating}
\usepackage{graphics, graphicx}

\begin{document}

\blindtext\par%
%
\begin{sidewaysfigure}%<-- Perfect placement of the figure and text before and after
\centering
\includegraphics[width=0.7\linewidth]{example-image-a}
\caption{Figure a}
\label{Fig:a}
\end{sidewaysfigure}%
%
\Blindtext\par%
%
\begin{landscape}%<-- makes undesirable withe space before the rotated page
\begin{figure}[h]
\centering
\includegraphics[width=0.7\linewidth]{example-image-b}
\caption{Figure b}
\label{Fig:b}
\end{figure}
\end{landscape}%
%
\Blindtext\par%
%
\afterpage{%<-- undesirable use
\begin{landscape}
\begin{figure}[h]
\centering
\includegraphics[width=0.7\linewidth]{example-image-c}
\caption{Figure c}
\label{Fig:c}
\end{figure}
\end{landscape}%
}%
%
\blindtext
\end{document}
AboAmmar
  • 46,352
  • 4
  • 58
  • 127
  • This worked for me: https://tex.stackexchange.com/questions/471472/how-to-make-figures-appear-landscape-properly – Claudio Feb 17 '19 at 16:17
  • You can also use \afterpage (afterpage package) with pdflscape. Best example I could find was https://tex.stackexchange.com/questions/295270/how-to-get-rotated-landscape-page-in-latex-without-flushing-other-floats?r=SearchResults&s=2|42.6875 – John Kormylo Feb 17 '19 at 20:41

0 Answers0