The lscape package^{∗}

D. P. Carlisle

1994/10/05

All text, within the landscape environment is rotated through 90 degrees. The environment may span several pages. It works well with, and was originally created for, use with longtable to produce long wide tables.

All the work is done by the graphics package, the trick is to call it at the right place in the output routine to rotate the current page before the page head and foot are added.

1 ⟨∗package⟩

2 \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
3 \ProcessOptions
4 \RequirePackage{graphics}
5 \let\LS@makecol=\@makecol
6 \let\LS@makefcolumn=\@makefcolumn
7 \def\LS@rot{%
8 \setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}

First set up the page size for landscape.

9 \def\landscape{%
10 \clearpage
11 \begingroup

∗This file has version number v3.0, last revised 1994/10/05.

12 \vsize=\textwidth
13 \hsize=\textheight
14 \linewidth=\hsize
15 \columnwidth=\hsize
16 \@colroom=\vsize
17 \textheight=\vsize
18 \@colht=\vsize

Rotate the page body (text and float pages).

19 \def\@makecol{\LS@makecol\LS@rot}%
20 \def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}

Restore everything.

21 \def\endlandscape{%
22 \clearpage
23 \endgroup
24 \global\@colht=\textheight
25 \global\vsize=\textheight
26 \global\@colroom=\textheight}

27 ⟨/package⟩