# Why landscape move double-sided page number up in LaTeX?

I need a longtable in my appendix so I used the package lscape or pdflscape, but landscape environment seems to move up the page number of the page just before it. See code below.

\documentclass[twoside, openright]{report}
\usepackage{lscape}

\begin{document}

\chapter{ch1}
this is ch1

\begin{landscape}
\chapter{ch2 is a long table}
there is a long table
\end{landscape}

\end{document}

-

## migrated from stackoverflow.comMay 2 '13 at 10:59

This question came from our site for professional and enthusiast programmers.

The chapter heading code isn't expecting to be landscaped and gets a little confused. The normal usage is

\documentclass[twoside, openright]{report}
\usepackage{lscape}

\begin{document}

\chapter{ch1}
this is ch1

\chapter{ch2 is a long table}

\begin{landscape}

there is a long table
\end{landscape}

\end{document}


Alternatively this also works it ships out the blank page to get to an odd page before the landscape starts.

\documentclass[twoside, openright]{report}
\usepackage{lscape}

\begin{document}

\chapter{ch1}
this is ch1

\cleardoublepage
\begin{landscape}
\chapter{ch2 is a long table}
there is a long table
\end{landscape}

\end{document}

-
But this actually cause there is a long table to fall into the next page, while the title of ch2 ch2 is a long talbe to be almost empty. Would it be possible that the title stays with the table? – wlnirvana May 2 '13 at 13:16
@wlnirvana see update – David Carlisle May 2 '13 at 13:29
Amazing! Thanks a lot. – wlnirvana May 3 '13 at 0:06