%%
%% This is file `textarea.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% textarea.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% 
%% This file is a generated file from the sources of the `ncctools'
%% bundle.
%% 
%% You are not allowed to modify this file.
%% 
%% You are allowed to distribute this file if and only if
%% it is distributed with the corresponding source files in
%% the `ncctools' bundle.
%% 
%% For the copying and distribution conditions of the source files,
%% see the README file distributed with the ncctools bundle.
%%
%% File: textarea.dtx Copyright (C) 2005 by Alexander I. Rozhenko
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{textarea}
         [2005/12/26 v1.0 Text area control (NCC)]
\@ifpackageloaded{nccsect}{}{%
  \newcommand\StartFromTextArea{\par
    {\parskip\z@ \strut\par}\vskip -\baselineskip
  }
  \newcommand\StartFromHeaderArea{%
    \StartFromTextArea
    \vskip -\headsep \vskip -\ht\strutbox
  }
}
\newcommand*\RestoreTextArea{}
\newcommand*\ExpandTextArea[1][*]{%
  \if@twocolumn
    \PackageError{textarea}%
                 {The \string\ExpandTextArea\space command\MessageBreak
                  cannot work in two-column mode}{}%
  \else
   \def\@tempa{*}\edef\@tempb{#1}%
   \ifx\@tempa\@tempb
     \StartFromHeaderArea
   \else
    \ifx\RestoreTextArea\@empty
     \let\NCC@h\@empty \global\let\NCC@restore@h\@empty
     \let\NCC@f\@empty \global\let\NCC@restore@f\@empty
     \let\NCC@m\@empty \global\let\NCC@restore@m\@empty
     \expandafter\@tfor\expandafter\@tempa\expandafter:\expandafter=#1\do{%
       \if h\@tempa
        \def\NCC@h{\NCC@adjusttoheader{}}%
        \gdef\NCC@restore@h{\NCC@adjusttoheader-}%
       \else
        \if f\@tempa
         \def\NCC@f{\NCC@adjusttofooter{}}%
         \gdef\NCC@restore@f{\NCC@adjusttofooter-}%
        \else
         \if m\@tempa
          \if@reversemargin \@tempcnta\@ne \else \@tempcnta\tw@ \fi
          \edef\NCC@m{\noexpand\NCC@adjusttomargin{}{\the\@tempcnta}}%
          \xdef\NCC@restore@m{\noexpand\NCC@adjusttomargin-{\the\@tempcnta}}%
         \fi
        \fi
       \fi
     }%
     \NCC@h\NCC@f\NCC@m
     \StartFromTextArea
     \gdef\RestoreTextArea{%
       \NCC@restore@h\NCC@restore@f\NCC@restore@m
       \global\let\RestoreTextArea\@empty
     }%
     \def\NCC@restoretextarea{\RestoreTextArea}%
    \fi
   \fi
  \fi
}
\def\NCC@adjusttoheader#1{%
  \@tempdima #1\headheight
  \advance\@tempdima #1\headsep
  \global\advance\textheight\@tempdima
  \global\advance\topmargin-\@tempdima
  \global\@colht\textheight
  \global\@colroom\textheight
  \global\vsize\textheight
}
\def\NCC@adjusttofooter#1{%
  \global\advance\textheight#1\footskip
  \global\@colht\textheight
  \global\@colroom\textheight
  \global\vsize\textheight
}
\def\NCC@adjusttomargin#1#2{%
  \@tempdima #1\marginparwidth
  \advance\@tempdima #1\marginparsep
  \@tempcnta#2%
  \ifodd\@tempcnta
    \global\advance\oddsidemargin -\@tempdima
  \else
    \global\advance\evensidemargin -\@tempdima
  \fi
  \global\advance\textwidth\@tempdima
  \global\columnwidth\textwidth
  \global\linewidth\textwidth
  \global\hsize\textwidth
}
\let\NCC@restoretextarea\@empty
\endinput
%%
%% End of file `textarea.sty'.
