% chngpage.sty
%
% Provides commands to change the page layout in the middle of a document.
%
% author: Peter Wilson (CUA)
%         (now at peter.r.wilson@boeing.com)
% Copyright 2000
% Released under the Latex Project Public License
%
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{chngpage}[2000/06/04 v1.0 change page layout]

\newcommand{\changetext}[5]{%
  \addtolength{\textheight}{#1}%
  \addtolength{\textwidth}{#2}%
  \addtolength{\evensidemargin}{#3}%
  \addtolength{\oddsidemargin}{#4}%
  \addtolength{\columnsep}{#5}%
  \@colht\textheight \@colroom\textheight \vsize\textheight
  \columnwidth\textwidth
  \if@twocolumn
    \advance\columnwidth-\columnsep \divide\columnwidth\tw@
    \hsize\columnwidth \@firstcolumntrue
  \fi
  \hsize\columnwidth \linewidth\hsize}

\newcommand{\changepage}[9]{%
  \changetext{#1}{#2}{#3}{#4}{#5}%
  \addtolength{\topmargin}{#6}%
  \addtolength{\headheight}{#7}%
  \addtolength{\headsep}{#8}%
  \addtolength{\footskip}{#9}%
}

\endinput

% Usage:
%
%     The \changetext command is for changing the size and horizontal position
% of the text block on a page. The command takes 5 arguments, each of which 
% is a length. i.e.,
%
% \changetext{textheight}{textwidth}{evensidemargin}{oddsidemargin}{columnsep}
%
% The given lengths are added to the corresponding current lengths and
% the remainder of the current page is typeset using the changed text block 
% layout. The new layout remains in effect until another \change... command 
% is issued.
%
%     The \changepage command is for changing the general layout of
% a page. The command takes 9 arguments, each of which is a length. The
% first 5 arguments are the same as for \changetext and have the same effect.
% The last four arguments are:
%
% \changepage{5 args}{topmargin}{headheight}{headsep}{footskip}
%
% These lengths are added to the corresponding current lengths and
% thus modify the vertical positions of the elements of the page. The
% remainder of the current page is typeset using the changed text block 
% and page layout. The new layout remains in effect until another 
% \change... command is issued.
%
%     For example, to change from single column pages to double column
% pages where the text block is both shorter and wider, then to revert
% back to the initial layout:
% ... single column normal page
% \newpage % or \clearpage
% \changetext{-5\baselineskip}{10em}{-5em}{-5em}{0pt}
% \twocolumn
% ... two column pages
% \clearpage 
% \changetext{5\baselineskip}{-10em}{5em}{5em}{0pt}
% \onecolumn
% ... normal pages
%
% Note the adjustments to the margins which will keep the vertical centerline
% of the textblock at the same position on the page.
%
%    As another example, to increase the width of a single paragraph:
%
% \changetext{0pt}{5em}{0pt}{0pt}{0pt}%
% Start of wider paragraph text ...
% ... end of paragraph.
%
% \changetext{0pt}{-5em}{0pt}{0pt}{0pt}
%
% Start of a normal paragraph ...
%
% 
% Peter W.
%
%
