%
% \iffalse
%
%% lscape.dtx Copyright (C) 1994 David Carlisle
%%
%% This file is part of the Standard LaTeX `Graphics Bundle'.
%%
%% It should be distributed *unchanged* and together with all other
%% files in the graphics bundle. The file 00readme.txt contains a list
%% of all of these files.
%%
%% A modified version of this file may be distributed, but it should
%% be distributed with a *different* name. Changed files must be
%% distributed *together with a complete and unchanged* distribution
%% of these files.
%%
%<*dtx>
\ProvidesFile{lscape.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1994/06/01]
%<package>\ProvidesPackage{lscape}
%<driver> \ProvidesFile{lscape.drv}
% \fi
% \ProvidesFile{lscape.dtx}
[1994/10/05 v3.0 Landscape Pages (DPC)]
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\usepackage{lscape}
\begin{document}
\DocInput{lscape.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{lscape.dtx}
%
% \title{The \textsf{lscape} package\thanks{This file
% has version number \fileversion, last
% revised \filedate.}}
% \author{D. P. Carlisle}
% \date{\filedate}
%
% \CheckSum{59}
%
% \begin{landscape}
% \maketitle
%
% All text, within the \texttt{landscape} environment is rotated through
% 90 degrees. The environment may span several pages. It works well
% with, and was originally created for, use with \textsf{longtable} to
% produce long wide tables.
%
% All the work is done by the \textsf{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.
%
%
% \StopEventually{\end{landscape}}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \changes{v1.00}{1992/04/28}{Initial release}
% \changes{v2.00}{1992/11/18}{Support for footnotes and floats.
% Special thanks to Sarah J. McQuay for testing this release}
% \changes{v3.00}{1994/10/05}{Update using LaTeX2e graphics package}
%
%
% \begin{macrocode}
%<*package>
% \end{macrocode}
%
% \begin{macrocode}
\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
\ProcessOptions
\RequirePackage{graphics}
% \end{macrocode}
%
% \begin{macrocode}
\let\LS@makecol=\@makecol
\let\LS@makefcolumn=\@makefcolumn
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
% \end{macrocode}
%
% First set up the page size for landscape.
% \begin{macrocode}
\def\landscape{%
\clearpage
\begingroup
\vsize=\textwidth
\hsize=\textheight
\linewidth=\hsize
\columnwidth=\hsize
\@colroom=\vsize
\textheight=\vsize
\@colht=\vsize
% \end{macrocode}
% Rotate the page body (text and float pages).
% \begin{macrocode}
\def\@makecol{\LS@makecol\LS@rot}%
\def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
% \end{macrocode}
%
% Restore everything.
% \begin{macrocode}
\def\endlandscape{%
\clearpage
\endgroup
\global\@colht=\textheight
\global\vsize=\textheight
\global\@colroom=\textheight}
%</package>
% \end{macrocode}
%
%
% \Finale
%
|