landscape

StartSearchLaTeX for Beginners F.A.Q.LaTeX faqLaTeX topicsfont sizearrowsminipageitalicsboldtext colormatrixfontslistingstables

1 landscape

In principle, at least for some document classes there is the option landscape which should ensure that the document is set in landscape format. It is not recommended to use this option, especially if pdflatex is used as compiler.

1.1 landscape per geometry

In case the whole document should be set in landscape format, the geometry package should be used. By setting the corresponding option landscape to the value true the document can be set transversely.

\documentclass{article}
...
\usepackage[landscape=true]{geometry}
\begin{document}
Hint: The geometry package is only suitable for setting an entire document in landscape format. The \newgeometry command cannot be used to insert a transverse page into a vertical document. Rather, if \newgeometry{landscape} was used, you get the following warning:
 Package geometry Warning: `landscape': not available in `\newgeometry'; skipped.
Individual pages in landscape format must therefore be inserted differently.

1.2 lscape or pdflscape

The lscape package and its adaptation to pdflatex pdflscape provide the new environment landscape. With this new environment individual pages can be rotated. In case the document is compiled with pdflatex and viewed with a PDF viewer, the pdflscape package should be used. When using lscape, the document is in landscape format, but is displayed upright.

1.2.1 Integration

The package is included with \usepackage{pdflscape}.

1.3 landscape Environment

The landscape environment is set around the content to be displayed in landscape format, for example an extra wide table.
...
\usepackage{pdflscape}
...
\begin{document}
Content that is portrait ...

\begin{landscape}
Content that is landscape ...
\end{landscpae}

Content that should be portrait again...
\end{document}
Before the pages are displayed in landscape format, the page borders should be adjusted, as this is a rotated page. The easiest way to do this is to use the geometry package.
...
\usepackage{pdflscape}
...
\usepackage[Options]{geometry}
\begin{document}
Content that is portrait ...
\newgeometry{margin=1cm} % and smaller margins
\begin{landscape}
Content that is landscape ...
\end{landscpae}
\restoregeometry % get the old settings back to work 
Content that should be portrait again...
\end{document}
After \begin{landscape} and \end{landscape} an automatic page break occurs. Since the pages are rotated, the page number is no longer at the bottom but in the margin.

1.3.1 Without page number in the margin

One possibility to set a rotated page without page number in the margin is to completely omit the page number on this page.
...
\usepackage{pdflscape}
...
\usepackage[Options]{geometry}
\begin{document}
Content that is portrait ...
\newgeometry{margin=1cm} % and smaller margins 
\begin{landscape}
\thispagestyle{empty}
Content that should be landscape and without page number  
\end{landscpae}
\restoregeometry % get the old settings back to work 
Content that should be portrait again...
\end{document}

1.3.2 Landscape format and centered page number

In the case that one or more pages are to be inserted transversely with a page number centered at the bottom, there is a more complex solution.

With the help of the geometry package all pages that are to be landscape are created in a separate document that is completely in landscape format. The page numbers are then set with the help of the command \setcounter{page}{value}.

\documentclass{article}
\usepackage[landscape=true]{geometry}
\begin{document}
\setcounter{page}{2}
Landscape on page 2!
\newpage
\setcounter{page}{17}
Landscape on page 17!
\end{document}
For example landscape.tex and corresponding landscape.pdf.
The rest of the document (orignal.tex) is set to portrait.
\documentclass{article}
...
\begin{document}
original ... Normal text ...
\newpage 
Page 2 that becomes landscape
\newpage 
Normal text ...
...
...
\newpage
Page 17 become landscape again
\newpage
Continue in normal text
...
\end{document}

After compiling you have two documents landscape.pdf and orginal.pdf . Then the pages are inserted from landscape.pdf with the \includepdf command from the pdfpages package into the upright document (orignal.tex).

\documentclass{article}
...
\usepackage{pdfpages}
...
\begin{document}
original ... Normal text ...
\newpage 
\includepdf[pages=1, landscape=true]{landscape.pdf}
\newpage 
Normal text ...
...
...
\newpage
\includepdf[pages=2, landscape=true]{landscape.pdf}
\newpage
Continue in normal text
...
\end{document}

Contact   Privacy Policy   disclosures

accept decline

This website uses cookies and pixel tags to ensure you get the best experience on our website. By using this website, you consent to the use of cookies.learn more about cookies see also our privacy policy