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}
43 % \MaintainedByLaTeXTeam{graphics}
46 % All text, within the \texttt{landscape} environment is rotated through
47 % 90 degrees. The environment may span several pages. It works well
48 % with, and was originally created for, use with \textsf{longtable} to
49 % produce long wide tables.
51 % All the work is done by the \textsf{graphics} package, the trick is to
52 % call it at the right place in the output routine to rotate the current
53 % page before the page head and foot are added.
56 % \StopEventually{\end{landscape}}
57 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 % \changes{v1.00}{1992/04/28}{Initial release}
60 % \changes{v2.00}{1992/11/18}{Support for footnotes and floats.
61 % Special thanks to Sarah J. McQuay for testing this release}
62 % \changes{v3.00}{1994/10/05}{Update using LaTeX2e graphics package}
63 % \changes{v3.01}{1999/06/22}{Added better pdfTeX support
64 % by Scott Pakin, from graphics/3063}
70 % Here is what Scott Pakin wrote about the pdftex option:
72 % I've made a minor improvement to lscape.dtx that I'd like to share
73 % with the world. My addition makes lscape rotate the PDF "paper" --
74 % not just the text on the page -- when given the "pdftex" option.
75 % (Naturally, this works only with pdfLaTeX.) The result is that the
76 % text is viewable online without the reader having to rotate his/her
77 % head 90 degrees. The document still prints normally.
84 \DeclareOption{pdftex}{%
85 \PassOptionsToPackage\CurrentOption{graphics}
88 \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
90 \RequirePackage{graphics}
94 \let\LS@makecol=\@makecol
95 \let\LS@makefcolumn=\@makefcolumn
97 \setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
100 % First set up the page size for landscape.
113 % Rotate the page body (text and float pages).
115 \def\@makecol{\LS@makecol\LS@rot}%
116 \def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
119 % Restore everything. This is where the pdftex option makes a
124 \pdfpageattr{/Rotate 90}
128 \global\@colht=\textheight
129 \global\vsize=\textheight
130 \global\@colroom=\textheight}