I'm using pdflscape to place some landscape pages in a long portrait document, because it contains some very wide floats.

However, when a float is so big that it needs its own page, it is no longer rotated correctly:

The following code:




\caption{Some text, rotated correctly.}

\caption{Some more text, wrong side up.}



Produces that output:

PDF output

How can I correctly rotate float-only pages?

1 Answer 1


Package pdflscape is just a wrapper for package lscape. It sets the /Rotate entry in the PDF page data structure. Thus the question shows the correct orientation of the paper, pages 2 and 3 are in landscape.

However the contents of the third page is not shown correctly. Package lscape hooks into macros of the output routine that constructs the page contents and rotates the output box. But it misses a case:

\usepackage[a6paper]{geometry}% smaller images for answer

\caption{Some text, not rotated, wrong footer}

Page 1:

Page 1

Page 2:

Page 2

Package lscape hooks into

  • \@makecol: normal page
  • \@makefcolumn: float page. It calls \@tryfcolumn inside a group and the actual work is done in macro \@vtryfc.

But this misses a case. The output routine starts with:

\output {%
  \let \par \@@par
  \ifnum \outputpenalty<-\@M
    \@whilesw \if@fcolmade \fi

\@makecol constructs the first page, it is caught by package lscape and rotated. \@opcol outputs the page. Then \@startcolumn is called. It also invokes \@tryfcolumn, but not \@makefcolumn. Thus an output page is constructed, but not detected by package lscape. (The same happens to \@startdblcolumn that also invokes \@tryfcolumn, but I have not tested, whether twocolumn stuff works at all.)

Fix suggestion (after package lscape or pdflscape):


Then the second page of the example becomes:

Page 2, corrected

And the last page of the question is also correct:

Last page of question, corrected

You must log in to answer this question.

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