blob: 18ce2ae91c888dc2a06cc1f7451d2af4898eda0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
%%
%% 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'.
|