summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjw/cjwoutl.sty
blob: 8bce48cf2839b5642f034069930ca4f22b7ab5be (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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
%%
%% This is file `cjwoutl.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cjwoutl.dtx  (with options: `package')
%% 
%% Copyright (C) 1995 by Colin J. Wynne
%% 
%% This file is part of cjwoutl, a package
%% for generating outlines with LaTeX2e.
%% 
\def\fileversion{0.6}
\def\filedate{1996/04/26}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cjwoutl}
  [1995/04/24 v0.5 Auto-Numbered Outlines--CJW]

\DeclareOption*{%
  \PackageWarning{cjwoutl}{Unknown option `\CurrentOption'}}

\ProcessOptions

\newif\ifoutl@group
\newlength{\aboveoutlskip}
  \setlength{\aboveoutlskip}{\abovedisplayskip}
\newlength{\belowoutlskip}
  \setlength{\belowoutlskip}{\belowdisplayskip}
\newlength{\outlindent}
  \setlength{\outlindent}{\parindent}
\newcounter {outl@indsize}
\newcounter {outl@lastind}
\newcounter {outli}            % I.
\newcounter {outlii} [outli]   %   A.
\newcounter {outliii}[outlii]  %     1.
\newcounter {outliv} [outliii] %       a.
\newcounter {outlv}  [outliv]  %         i.
\newcounter {outlvi} [outlv]   %          (a)
\newcounter {outlvii}[outlvi]  %            (i)
\newcounter {outldef}[outlvii]
\renewcommand{\theoutli}    {\Roman{outli}}
\renewcommand{\theoutlii}   {\Alph{outlii}}
\renewcommand{\theoutliii}  {\arabic{outliii}}
\renewcommand{\theoutliv}   {\alph{outliv}}
\renewcommand{\theoutlv}    {\roman{outlv}}
\renewcommand{\theoutlvi}   {\alph{outlvi}}
\renewcommand{\theoutlvii}  {\roman{outlvii}}
\renewcommand{\theoutldef}  {}
\newcommand{\labeloutli}    {\theoutli.}
\newcommand{\labeloutlii}   {\theoutlii.}
\newcommand{\labeloutliii}  {\theoutliii.}
\newcommand{\labeloutliv}   {\theoutliv.}
\newcommand{\labeloutlv}    {\theoutlv.}
\newcommand{\labeloutlvi}   {(\theoutlvi)}
\newcommand{\labeloutlvii}  {(\theoutlvii)}
\newcommand{\labeloutldef}  {\ensuremath{\bullet}}
\renewcommand{\p@outli}     {}
\renewcommand{\p@outlii}    {\theoutli.}
\renewcommand{\p@outliii}   {\p@outlii\theoutlii.}
\renewcommand{\p@outliv}    {\p@outliii\theoutliii.}
\renewcommand{\p@outlv}     {\p@outliv\theoutliv.}
\renewcommand{\p@outlvi}    {\p@outlv\labeloutlv.}
\renewcommand{\p@outlvii}   {\p@outlvi\labeloutlvi.}
\renewcommand{\p@outldef}   {\p@outlvii\ldots}
\newenvironment{outline}[1][keep]%
  {\def\@tempa{#1} \def\@tempb{new}
   \ifx\@tempa\@tempb
     \outl@reset
   \fi
   \penalty\predisplaypenalty\vspace{\aboveoutlskip}}%
  {\par\endgroup\global\outl@groupfalse%
   \penalty\postdisplaypenalty\vspace{\belowoutlskip}}
\newcommand{\outl@reset}{%
  \setcounter{outli}  {0}
  \setcounter{outlii} {0}
  \setcounter{outliii}{0}
  \setcounter{outliv} {0}
  \setcounter{outlv}  {0}
  \setcounter{outlvi} {0}
  \setcounter{outlvii}{0}}
\newcommand{\outlstyle}[1]{%
  \@ifundefined{ols@#1}
    {\PackageWarning{cjwoutl}{Outline style `#1' is undefined.  Using
                              style `plain' instead}%
     \def\outl@style{\ols@plain}}
    {\def\outl@style{\csname ols@#1\endcsname}}}
\def\ols@plain{\@empty}
\def\ols@firstpar#1\par{%
  \bgroup\firstparfont #1\par\egroup}

\DeclareOldFontCommand{\firstparfont}{\normalfont\itshape}{\relax}
\outlstyle{plain}
\newcommand{\ol}[2]{%
  \outl@checkgroups \outl@processlvl{#1}%
  \ifnum \c@outl@indsize < 1\relax%
    \setcounter{outl@indsize}{0}%
    \leftskip = 0pt%
  \else%
    \leftskip = \c@outl@indsize\outlindent%
  \fi%
  \noindent\theoutlabel{#2}%
  \ignorespaces\outl@style}
\newcommand{\npp}[1]{\ol{#1}{\null}\null\indent}
\newcommand{\unpp}[1]{\ol{#1}{\null}}
\newcommand{\outl}[1]{%
  \outl@checkgroups \outl@processlvl{#1}%
  \ifnum \c@outl@indsize < 1\relax%
    \setcounter{outl@indsize}{0}%
    \leftskip = 0pt%
  \else%
    \leftskip = \c@outl@indsize\outlindent%
  \fi%
  \noindent\outl@label{\c@outl@indsize}%
  \ignorespaces\outl@style}
\newcommand{\outl@checkgroups}{%
  \ifoutl@group
    \par\endgroup\global\outl@groupfalse
    \smallbreak
  \fi
  \setcounter{outl@lastind}{\c@outl@indsize}
  \smallbreak
  \begingroup
    \global\outl@grouptrue}
\newcommand{\outl@processlvl}[1]{%
  \def\@tempa{+}\def\@tempb{-}\def\@tempc{=}
  \def\@tempd{#1}
  \ifx\@tempa\@tempd
    \addtocounter{outl@indsize}{1}
  \else\ifx\@tempb\@tempd
         \addtocounter{outl@indsize}{-1}
       \else\ifx\@tempc\@tempd
              % Nothing---stay at same level.
            \else
              \setcounter{outl@indsize}{\@tempd}
              \addtocounter{outl@indsize}{-1}
            \fi
       \fi
  \fi}
\newcommand{\outl@label}[1]{%
  \ifcase #1
    \@dolabeli\or\@dolabelii\or\@dolabeliii%
    \or\@dolabeliv\or\@dolabelv\or\@dolabelvi%
    \or\@dolabelvii\else\@dolabeldef%
  \fi}
\@ifundefined{labelfont}
  {\DeclareOldFontCommand{\labelfont}%
    {\normalfont\bfseries\mathversion{bold}}{\mathbf}}
  {} % Do nothing---|\labelfont| is already defined
\newcommand{\theoutlabel}[1]{%
  \llap{\hbox{\labelfont#1\enskip}}}
\newcommand{\@dolabeli}{%
  \refstepcounter{outli}\theoutlabel{\labeloutli}}
\newcommand{\@dolabelii}{%
  \refstepcounter{outlii}\theoutlabel{\labeloutlii}}
\newcommand{\@dolabeliii}{%
  \refstepcounter{outliii}\theoutlabel{\labeloutliii}}
\newcommand{\@dolabeliv}{%
  \refstepcounter{outliv}\theoutlabel{\labeloutliv}}
\newcommand{\@dolabelv}{%
  \refstepcounter{outlv}\theoutlabel{\labeloutlv}}
\newcommand{\@dolabelvi}{%
  \refstepcounter{outlvi}\theoutlabel{\labeloutlvi}}
\newcommand{\@dolabelvii}{%
  \refstepcounter{outlvii}\theoutlabel{\labeloutlvii}}
\newcommand{\@dolabeldef}{%
  \refstepcounter{outldef}\theoutlabel{\labeloutldef}}
\endinput
%%
%% End of file `cjwoutl.sty'.