4 %% lscape.dtx Copyright (C) 1994 1999-2000 David Carlisle
5 %% Copyright (C) 2000--2015 David Carlisle, LaTeX3 Project
7 %% This file is part of the Standard LaTeX `Graphics Bundle'.
8 %% It may be distributed under the terms of the LaTeX Project Public
9 %% License, as described in lppl.txt in the base LaTeX distribution.
10 %% Either version 1.3c or, at your option, any later version.
13 \ProvidesFile{lscape.dtx}
15 %<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
16 %<package>\ProvidesPackage{lscape}
17 %<driver> \ProvidesFile{lscape.drv}
19 % \ProvidesFile{lscape.dtx}
20 [2000/10/22 v3.01 Landscape Pages (DPC)]
24 \documentclass{ltxdoc}
32 % \GetFileInfo{lscape.dtx}
34 % \title{The \textsf{lscape} package\thanks{This file
35 % has version number \fileversion, last
36 % revised \filedate.}}
37 % \author{D. P. Carlisle}
42 % \MaintainedByLaTeXTeam{graphics}
45 % All text, within the \texttt{landscape} environment is rotated through
46 % 90 degrees. The environment may span several pages. It works well
47 % with, and was originally created for, use with \textsf{longtable} to
48 % produce long wide tables.
50 % All the work is done by the \textsf{graphics} package, the trick is to
51 % call it at the right place in the output routine to rotate the current
52 % page before the page head and foot are added.
55 % \StopEventually{\end{landscape}}
56 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 % \changes{v1.00}{1992/04/28}{Initial release}
59 % \changes{v2.00}{1992/11/18}{Support for footnotes and floats.
60 % Special thanks to Sarah J. McQuay for testing this release}
61 % \changes{v3.00}{1994/10/05}{Update using LaTeX2e graphics package}
62 % \changes{v3.01}{1999/06/22}{Added better pdfTeX support
63 % by Scott Pakin, from graphics/3063}
69 % Here is what Scott Pakin wrote about the pdftex option:
71 % I've made a minor improvement to lscape.dtx that I'd like to share
72 % with the world. My addition makes lscape rotate the PDF "paper" --
73 % not just the text on the page -- when given the "pdftex" option.
74 % (Naturally, this works only with pdfLaTeX.) The result is that the
75 % text is viewable online without the reader having to rotate his/her
76 % head 90 degrees. The document still prints normally.
83 \DeclareOption{pdftex}{%
84 \PassOptionsToPackage\CurrentOption{graphics}
87 \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
89 \RequirePackage{graphics}
93 \let\LS@makecol=\@makecol
94 \let\LS@makefcolumn=\@makefcolumn
96 \setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
99 % First set up the page size for landscape.
112 % Rotate the page body (text and float pages).
114 \def\@makecol{\LS@makecol\LS@rot}%
115 \def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
118 % Restore everything. This is where the pdftex option makes a
123 \pdfpageattr{/Rotate 90}
127 \global\@colht=\textheight
128 \global\vsize=\textheight
129 \global\@colroom=\textheight}