# How to wrap text around landscape page

I have from time to time a landscape page. I would like that text around it just normally flows. So something how figure environment works. So that it is not really important where you exactly define the figure, LaTeX moves it around so that text nicely flows. With landscape it does not do that.

-
Currently I am using pdflscape with landscape environment. –  Mitar Feb 19 '11 at 23:35

It depends a little on the kind of landscape page you want to create. The easiest way to do it is to put your landscape material into a caption-less [p] float (except it is a figure or table which should have a caption). Without the caption the float number isn't increased so it doesn't affect other, "real" floats.

You can create the landscape mode then by yourself by rotating the content. If this is a image use \includegraphics[angle=90,width=\textheight]{file}. For text you can use the following code or something similar. With this method the header and footer of the landscape page will not be different then on other pages. This might be want you want or not.

(The lipsum package and macros are just for adding a dummy text to show the result and are not required in the final document.)

\documentclass{article}

\usepackage{graphicx}
\usepackage{lipsum}% for dummy text

\begin{document}

\lipsum[1-10]

\begin{figure}[p]
\rotatebox{90}{%
\begin{minipage}{\textheight}%
\lipsum[1-5]
\end{minipage}%
}%
% No caption, then the figure number is not changed
\end{figure}

\lipsum[1-10]
\end{document}


If the minipage contains any special things like verbatim material you need to use either \Rotatebox from the realboxes package or the adjustbox macro or environment from the adjustbox package to do the rotation (and even the minipage:
\begin{adjustbox}{minipage=\textheight,angle=90} ... \end{adjustbox})

Or you can use the afterpage package and macro to place the landscape content onto the next page. This doesn't allow for verbatim content but for the use of pdflscape which rotates the pages also inside the PDF viewer:

\documentclass{article}

\usepackage{lipsum}% for dummy text
\usepackage{afterpage}
\usepackage{pdflscape}

\begin{document}

\lipsum[1-10]

\afterpage{%
\clearpage% To flush out all floats, might not be what you want
\begin{landscape}
\lipsum[1-5]
% must not include verbatim content
\end{landscape}
}

\lipsum[1-10]
\end{document}

-
Is there any way to make the afterpage solution work if there are other non-landscape floats defined on the same page? When I try it (with or without clearpage), the other non-landscape floats on the same page, even those that are defined after the landscape float, appear before it in the output. –  Mike Shulman Oct 25 '11 at 3:28
@MikeShulman: Using \afterpage the landscape is not a real float and the \clearpage or may some command inside \begin{landscape} is flushing all floats. You might try the flafter package which forces floats to only appear after where they are defined in the text, never before. –  Martin Scharrer Oct 25 '11 at 7:11
+1 fantastic answer. \afterpage was just what I needed. –  wakjah May 6 '13 at 12:54
afterpage doesn't seem to work with the chapterfolder package. It complains about a missing file if an \input is wrapped inside the \afterpage macro. –  gozzilli Mar 20 at 17:53