~ubuntu-branches/debian/wheezy/texlive-extra/wheezy

« back to all changes in this revision

Viewing changes to texmf-dist/tex/latex/geomsty/geom.sty

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-01-15 09:56:54 UTC
  • mfrom: (1.3.1 upstream) (11.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090115095654-71ev5rcx4pi5loe1
Tags: 2007.dfsg.15-1
upgrade bibleref to version from upstream which changes the license
to LPPL (Closes: #511843) RC->medium

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
% $Header: /usr/home/levy/texts/geomsty/RCS/geom.sty,v 1.21 95/08/02 16:22:57 levy Exp Locker: levy $
2
 
% NFSS2 mods 95/06/18 by J Rawnsley
3
 
 
4
 
% Test for LaTeX2e
5
 
\def\format@e{LaTeX2e}
6
 
 
7
 
\ifx\fmtname\format@e
8
 
 \ProvidesPackage{geom}[95/06/18]
9
 
\fi
10
 
 
11
 
\ifx\DeclareFontShape\@undefined
12
 
\else
13
 
 \let\normalshape\normalfont
14
 
 \let\mediumseries\relax
15
 
\fi
16
 
 
17
 
%
18
 
% This is the geom style master file, by Silvio Levy.
19
 
% It contains modifications to latex.tex and lplain.tex.
20
 
% LATEX VERSION 2.09 <14 January 1991>
21
 
%
22
 
\typeout{Reading Geometry Center style by Silvio Levy, $Revision: 1.21 $}
23
 
\typeout{NFSS2 compatibility by J. Rawnsley, Maths Institute, Warwick 95/06/18}
24
 
 
25
 
% Find out which style has been loaded (book or article).
26
 
% If \chapter is undefined we assume the style is article, otherwise book.
27
 
 
28
 
\def\@article{\@@article} \def\@book{\@@book}
29
 
\@ifundefined{chapter}{\def\@style{\@@article}}{\def\@style{\@@book}}
30
 
 
31
 
% Load an appropriate file with changes to book.sty or article.sty.
32
 
 
33
 
\ifx\@style\@book \input geombook.sty \else \input geomart.sty \fi
34
 
 
35
 
% Load in other definitions.
36
 
 
37
 
\input geomenv.sty  % environments
38
 
\input geomfig.sty  % figures
39
 
\input geomfnt.sty  % new fonts
40
 
\input geomindx.sty % indexing macros 
41
 
\ifx\fmtname\format@e
42
 
 %\usepackage{multicol} % two-column formatting
43
 
 \input multicol.sty % two-column formatting
44
 
\else
45
 
 \input multicol.sty % two-column formatting
46
 
\fi
47
 
%      ****************************************
48
 
%      *            USEFUL HACKS              *
49
 
%      ****************************************
50
 
%
51
 
% \@@warning and \@warning don't need the word ``LaTeX''.
52
 
%
53
 
\def\@@warning#1{\typeout{Warning: #1.}}
54
 
 
55
 
%      **********************************************
56
 
%      *     SPACING / LINE AND PAGE BREAKING       *
57
 
%      **********************************************
58
 
 
59
 
% Avoid the lack of spacing after a list when the first item is run-in.
60
 
 
61
 
\def\endtrivlist{\if@newlist\@noitemerr\fi 
62
 
   \if@inlabel\indent\fi 
63
 
   \ifhmode\unskip \par\fi 
64
 
%   \if@noparlist \else
65
 
      \ifdim\lastskip >\z@ \@tempskipa\lastskip \vskip -\lastskip
66
 
         \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip 
67
 
         \vskip\@tempskipa
68
 
   \fi\@endparenv
69
 
%  \fi
70
 
}
71
 
\let\endcenter=\endtrivlist
72
 
\let\endflushleft=\endtrivlist
73
 
\let\endflushright=\endtrivlist
74
 
\let\endverbatim=\endtrivlist
75
 
\expandafter\let\csname endverbatim*\endcsname =\endtrivlist
76
 
 
77
 
%     ****************************************
78
 
%     *           FILE HANDLING              *
79
 
%     ****************************************
80
 
%
81
 
% Proofing is true by default.
82
 
%
83
 
\newif\ifproofing\proofingtrue
84
 
\def\include#1{\ifproofing\@include#1 \else\input{#1.tex}\fi}
85
 
\def\noproofing{\noexpand\proofingfalse}
86
 
\def\@proofingfalse{\proofingfalse}
87
 
\def\checkproofing{\ifx\@partlist\@proofingfalse\proofingfalse\fi}
88
 
\def\includeonly#1{\@partswtrue\edef\@partlist{#1}\checkproofing}
89
 
 
90
 
%          ****************************************
91
 
%          *      CROSS-REFERENCING MACROS        *
92
 
%          ****************************************
93
 
 
94
 
\let\@xf\expandafter
95
 
%
96
 
% The main differences between these macros and LaTeX's are that keys
97
 
% are not expanded, and the first field in the record's value contains
98
 
% the type of object referred to.  For example,
99
 
% \newlabel{square torus in space}{{problem 1.1.1}{5}}
100
 
% This information is read at the time the record is formed
101
 
% from the \object@type.  Expansion of the key is inhibited by storing
102
 
% it into the token list \@key, with everything protected by \noexpand's.
103
 
%
104
 
\def\object@type{??}
105
 
\def\setlabeltype#1{\edef\object@type{#1}}
106
 
\newtoks\@key
107
 
\def\set@key#1{{\aftergroup\@key\aftergroup{\sanitize#1\endsanity}}}
108
 
 
109
 
%
110
 
% These are the user-level macros:
111
 
%
112
 
% \fullref{...} expands to   theorem~3.7
113
 
% \Fullref{...} expands to   Theorem~3.7
114
 
% \ref{...}     expands to   3.7
115
 
% \pageref{...} expands to   377
116
 
 
117
 
\def\fullref{\@ref{\@xf\@car}}
118
 
\def\Fullref{\@ref{\@xf\@xf\@xf\cap@first\@xf\@car}}
119
 
\def\pageref{\@ref{\@xf\@cdr}}
120
 
\def\ref{\@ref{\@xf\@xf\@xf\discard@first\@xf\@car}}
121
 
\def\reftype{\@ref{\@xf\@xf\@xf\discard@second\@xf\@car}}
122
 
\def\Reftype{\@ref{\@xf\@xf\@xf\@xf\@xf\@xf\@xf\discard@second
123
 
                                        \@xf\@xf\@xf\cap@first\@xf\@car}}
124
 
\def\cap@first#1{\uppercase{#1}}
125
 
\def\discard@first#1~{}
126
 
\def\discard@second#1~\preref{#1\@gobble}
127
 
 
128
 
%
129
 
% This is similar to \ref in LaTeX, but has two arguments: the second
130
 
% is the key, which is not expanded; the first is an operator to be
131
 
% applied to the value of the record.
132
 
%
133
 
\newtoks\@value
134
 
\def\@ref#1{\@ifnextchar*{\@r@f{#1}}{\@r@f{#1}+}}
135
 
\def\@r@f#1#2#3{\set@key{#3}\@ifundefined{r@\the\@key}%
136
 
 {{\bf ??}\@warning{Reference `\expand@key' %on page \thepage\space 
137
 
                undefined}}%
138
 
 {\@value=\@xf\@xf\@xf{\csname r@\the\@key\endcsname}#1\the\@value\@nil\null}%
139
 
  \if#2*\refindex{#3} (#3)\else\refinvindex{#3}\fi}
140
 
\def\expand@key{\@xf\empty\the\@key}
141
 
 
142
 
\def\@lbibitem[#1]#2{\set@key{#2}\item[\@biblabel{#1}]\if@filesw
143
 
      \xdef\@gtempa{\immediate\write\@auxout{\string\bibcite{\the\@key}{#1}}}
144
 
      \@gtempa\fi\ignorespaces}
145
 
 
146
 
%
147
 
% Like \label in LaTeX, but follows the conventions explained at the
148
 
% top of this file.  The \label* variant creates a more comprehensive
149
 
% index entry.
150
 
%
151
 
\def\preref#1{#1}
152
 
\def\label{\@ifnextchar*{\l@bel}{\l@bel+}}
153
 
\def\l@bel#1#2{\set@key{#2}\@bsphack\if@filesw 
154
 
  {\let\thepage\relax
155
 
    \xdef\@gtempa{\write\@auxout{\string\newlabel{\the\@key}%
156
 
      {{\object@type\string~\string\preref{\@currentlabel}}%
157
 
       {\string\preref{\thepage}}}%
158
 
  }}}\@gtempa 
159
 
  \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack
160
 
  \if#1*\labelindex{#2}\else\index{#2}\fi\ignorespaces}
161
 
 
162
 
\def\newlabel{\bgroup\@sanitize\afterassignment\@readlabel\global\@key}
163
 
\def\bibcite{\bgroup\@sanitize\afterassignment\@readbibcite\global\@key}
164
 
\def\@readlabel{\egroup\r@adlabel r}
165
 
\def\@readbibcite{\egroup\r@adlabel b}
166
 
\def\r@adlabel#1#2{\@ifundefined{#1@\the\@key}{}%
167
 
    {\@warning{Label `\expand@key' multiply defined}}%
168
 
  \global\@namedef{#1@\the\@key}{#2}}
169
 
 
170
 
%
171
 
% sanitize
172
 
%
173
 
\def\citeseparator{,}
174
 
\def\@citex[#1]#2{\set@key{#2}\if@filesw
175
 
  \xdef\@gtempa{\immediate\write\@auxout{\string\citation{\the\@key}}}\@gtempa\fi
176
 
  \let\@citea\@empty
177
 
  \@xf\@cite\@xf{\@xf\@for\@xf\@citeb\@xf:\@xf=\the\@key\do
178
 
    {\@citea\def\@citea{\citeseparator\penalty\@m\ }%
179
 
     \def\@tempa##1##2\@nil{\edef\@citeb{\if##1\space##2\else##1##2\fi}}%
180
 
     \expandafter\@tempa\@citeb\@nil
181
 
     \@ifundefined{b@\@citeb}{{\reset@font\bf ?}\@warning
182
 
       {Citation `\@citeb' %on page \thepage \space 
183
 
                undefined}}%
184
 
     {\csname b@\@citeb\endcsname}}}{#1}}
185
 
 
186
 
%
187
 
% add a preref
188
 
%
189
 
\def\@cite#1#2{\preref{[{#1\if@tempswa , #2\fi}]}}
190
 
 
191
 
\def\nocite#1{\set@key{#1}\@bsphack\if@filesw
192
 
  \xdef\@gtempa{\immediate\write\@auxout{\string\citation{\the\@key}}}\@gtempa\fi
193
 
  \@esphack}
194
 
 
195
 
\def\@testdef #1#2#3{\set@key{#2}\def\@tempa{#3}%
196
 
  \@xf\ifx\csname #1@\the\@key\endcsname\@tempa\else\@tempswatrue\fi}
197
 
 
198
 
\def\\{\let\stoken= } \\
199
 
\def\sanitize{\futurelet\next\sanswitch}
200
 
\def\sanswitch{\let\@tempa\relax \ifx\next\endsanity \let\@tempa\endsanity
201
 
  \else\ifcat\noexpand\next\stoken\aftergroup\space\let\@tempa\eat
202
 
   \else\ifcat\noexpand\next\bgroup\aftergroup{\let\@tempa\eat
203
 
    \else\ifcat\noexpand\next\egroup\aftergroup}\let\@tempa\eat
204
 
     \else\let\@tempa\copytoken\fi\fi\fi\fi \@tempa}
205
 
\def\eat{\afterassignment\sanitize \let\next= }
206
 
\long\def\copytoken#1{%
207
 
  \ifcat\noexpand#1##\aftergroup\string\aftergroup\string##\aftergroup\string
208
 
    \else\ifcat\noexpand#1\noexpand~\aftergroup\string
209
 
      \else\ifcat\noexpand#1\relax\aftergroup\str@ng \fi\fi\fi
210
 
  \aftergroup#1\sanitize}
211
 
\def\endsanity\endsanity{}
212
 
\def\str@ng#1{\string#1\expandafter\if@secondletter\string #1\next\nex}
213
 
\def\if@secondletter#1#2#3\nex{\ifx #2\next\else\ifnum`#2<`A \else
214
 
  \ifnum`#2<`Z \space\else\ifnum`#2<`a \else\ifnum`#2<`z \space\fi\fi\fi\fi\fi}
215
 
 
216
 
% Labels are automatically added to theorems, section headings and the
217
 
% like if \autolabel is true.
218
 
 
219
 
\newif\ifautolabel\autolabeltrue
220
 
 
221
 
%          ****************************************
222
 
%          *            ENVIRONMENTS              *
223
 
%          ****************************************
224
 
 
225
 
\long\def\@writefile#1#2{\@ifundefined{tf@#1}{}{
226
 
\edef\@tempa{\immediate\write\csname tf@#1\endcsname}
227
 
{\aftergroup\@tempa\aftergroup{\sanitize #2\endsanity}}}}
228
 
 
229
 
%      **********************************************
230
 
%      *               MATH ENVIRONMENTS            *
231
 
%      **********************************************
232
 
 
233
 
%% following RmS 91/09/29: \reset@font added.
234
 
 
235
 
\def\@eqnnum{{\reset@font\rm (\theequation)}}
236
 
 
237
 
%
238
 
% set object type
239
 
%
240
 
\def\equation{$$ % $$ BRACE MATCHING HACK
241
 
  \def\object@type{equation}\refstepcounter{equation}}
242
 
 
243
 
%% following RmS 92/01/10: put \hbox around \@eqnnum 
244
 
 
245
 
\def\endequation{\eqno \hbox{\@eqnnum}% $$ BRACE MATCHING HACK
246
 
$$\global\@ignoretrue}
247
 
 
248
 
\def\eqnarray{\def\object@type{equation}%
249
 
  \stepcounter{equation}\edef\@currentlabel{\theequation}%
250
 
\global\@eqnswtrue\m@th
251
 
\global\@eqcnt\z@\tabskip\@centering\let\\\@eqncr
252
 
$$\halign to\displaywidth\bgroup\@eqnsel\hskip\@centering
253
 
  $\displaystyle\tabskip\z@{##}$&\global\@eqcnt\@ne
254
 
  \hskip 2\arraycolsep \hfil${##}$\hfil
255
 
  &\global\@eqcnt\tw@ \hskip 2\arraycolsep $\displaystyle\tabskip\z@{##}$\hfil
256
 
   \tabskip\@centering&\llap{##}\tabskip\z@\cr}
257
 
\def\@eqncr{{\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
258
 
    \@yeqncr}{\global\@eqpen\interdisplaylinepenalty \@yeqncr}%
259
 
    \edef\@currentlabel{\theequation}}
260
 
 
261
 
%
262
 
% allow equations to be numbered with other environments
263
 
%
264
 
 
265
 
\def\equationwith#1{%
266
 
  \@xf\edef\@xf\c@equation\@xf{\csname c@#1\endcsname}%
267
 
  \@xf\let\@xf\theequation\csname the#1\endcsname
268
 
}
269
 
 
270
 
%
271
 
% Bring back \eqalign from plain TeX (for less than full-width alignments)
272
 
%
273
 
\def\eqalign#1{\null\,\vcenter{\openup\jot\m@th
274
 
  \ialign{\strut\hfil$\displaystyle{##}$&$\displaystyle{{}##}$\hfil
275
 
      \crcr#1\crcr}}\,}
276
 
 
277
 
%       ****************************************
278
 
%       *         THE LIST ENVIRONMENT         *
279
 
%       ****************************************
280
 
 
281
 
% make the \listparindent non-zero
282
 
 
283
 
\def\list#1#2{\ifnum \@listdepth >5\relax \@toodeep 
284
 
     \else \global\advance\@listdepth\@ne \fi
285
 
  \rightmargin \z@ \listparindent.8\parindent \itemindent\z@
286
 
  \csname @list\romannumeral\the\@listdepth\endcsname 
287
 
  \def\@itemlabel{#1}\let\makelabel\@mklab \@nmbrlistfalse #2\relax
288
 
  \@trivlist
289
 
  \parskip\parsep \parindent\listparindent
290
 
  \advance\linewidth -\rightmargin \advance\linewidth -\leftmargin
291
 
  \advance\@totalleftmargin \leftmargin
292
 
  \parshape \@ne \@totalleftmargin \linewidth 
293
 
  \ignorespaces}
294
 
 
295
 
% for bibliography
296
 
\def\@mklab#1{#1\hskip 0pt plus .0001fil\relax}
297
 
 
298
 
% Use \unhbox instead of \box for labels like theorems etc.
299
 
% Add normalshape
300
 
% Removed a \penalty0 to avoid line ending with blank space
301
 
%
302
 
% to make part (a) of an enumerate that immediate follows a label
303
 
% start on a fresh line, change the last line of \@item to:
304
 
%
305
 
%\def\@item[#1]{\if@noparitem \@donoparitem
306
 
% ...
307
 
%       \hskip \labelsep}\vrule width 0pt \ignorespaces}
308
 
%
309
 
\def\@item[#1]{\if@noparitem \@donoparitem
310
 
  \else \if@inlabel \indent \par \fi
311
 
         \ifhmode \unskip\unskip \par \fi 
312
 
         \if@newlist \if@nobreak \@nbitem \else
313
 
                        \addpenalty\@beginparpenalty
314
 
                        \addvspace\@topsep \addvspace{-\parskip}\fi
315
 
           \else \addpenalty\@itempenalty \addvspace\itemsep 
316
 
          \fi 
317
 
    \global\@inlabeltrue 
318
 
\fi
319
 
\everypar{\global\@minipagefalse\global\@newlistfalse 
320
 
          \if@inlabel\global\@inlabelfalse \hskip -\parindent \unhbox\@labels
321
 
%             \penalty\z@ \fi
322
 
             \fi
323
 
          \everypar{}}\global\@nobreakfalse
324
 
\if@noitemarg \@noitemargfalse \if@nmbrlist \refstepcounter{\@listctr}\fi \fi
325
 
\setbox\@tempboxa\hbox{\makelabel{#1}}%
326
 
%\setbox\@tempboxa\hbox{\makelabel{\normalshape #1}}% this would kill \sc
327
 
\global\setbox\@labels
328
 
 \hbox{\unhbox\@labels \hskip \itemindent
329
 
       \hskip -\labelwidth \hskip -\labelsep 
330
 
       \ifdim \wd\@tempboxa >\labelwidth 
331
 
                \unhbox\@tempboxa
332
 
          \else \hbox to\labelwidth {\makelabel{\normalshape #1}}\fi
333
 
       \hskip \labelsep}\ignorespaces}
334
 
 
335
 
%      ****************************************
336
 
%      *        ITEMIZE AND ENUMERATE         *
337
 
%      ****************************************
338
 
 
339
 
% Save \@currentlabel to allow correct label in the cases like this:
340
 
341
 
% \begin{theorem}
342
 
% \begin{equation}       
343
 
% \end{equation}       
344
 
% \begin{enumerate}
345
 
%   \label
346
 
%
347
 
 
348
 
\def\enumerate{\ifnum \@enumdepth >3 \@toodeep\else
349
 
      \advance\@enumdepth \@ne
350
 
      \edef\@enumctr{enum\romannumeral\the\@enumdepth}\list
351
 
      {\csname label\@enumctr\endcsname}{\usecounter
352
 
        {\@enumctr}\def\makelabel##1{\hss\llap{\normalshape ##1}}}\fi
353
 
         \let\@@currentlabel\@currentlabel}
354
 
 
355
 
% commented out Jan 11 93; had been added to version 1.14, but I have no
356
 
% idea how it was supposed to work, or what unrobustness it was trying
357
 
% to solve (see log).  With this code, \@@currentlabel was never assigned.
358
 
%
359
 
%        \let\@savecurrentlabel\@currentlabel}
360
 
%
361
 
%\@ifundefined{@@currentlabel}{\@currentlabel}{\@savecurrentlabel}
362
 
 
363
 
%       ****************************************
364
 
%       *         THEOREM ENVIRONMENTS         *
365
 
%       ****************************************
366
 
 
367
 
%       See geomenv.sty
368
 
 
369
 
%     *****************************************
370
 
%     *              SECTIONING               *
371
 
%     *****************************************
372
 
 
373
 
% Allow up to \presection at bottom of page before new section
374
 
% to encourage section to start on fresh page
375
 
 
376
 
\newskip\presection \presection 0pt plus 10ex \relax
377
 
 
378
 
\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
379
 
   \par \@tempskipa #4\relax
380
 
   \@afterindenttrue
381
 
   \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi
382
 
   \advance\@tempskipa by\presection
383
 
   \if@nobreak \everypar{}\else
384
 
     \addpenalty{\@secpenalty}\addvspace{\@tempskipa}%
385
 
     \allowbreak\vskip -\presection \fi \@ifstar
386
 
     {\@ssect{#1}{#2}{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
387
 
 
388
 
% Add a . after section number instead of skipping 1em 
389
 
% Mess with \addcontentsline
390
 
% Automatic labels
391
 
 
392
 
\def\@sect#1#2#3#4#5#6[#7]#8{\def\object@type{#1}%
393
 
     \ifnum #2>\c@secnumdepth\def\@svsec{}\def\@tempb{}%
394
 
     \else\refstepcounter{#1}\edef\@svsec{\csname the#1\endcsname. }%
395
 
       \edef\@tempb{\noexpand\numberline{\csname the#1\endcsname}} \fi
396
 
     \@tempskipa #5\relax
397
 
     \def\@tempa{\addcontentsline{toc}{#1}}%
398
 
     \ifdim \@tempskipa>\z@ 
399
 
        \begingroup #6\relax
400
 
          \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
401
 
        \endgroup
402
 
        \csname #1mark\endcsname{#7}%
403
 
        \expandafter\@tempa\expandafter{\@tempb #7}%
404
 
        \ifautolabel\label*{#8}\fi
405
 
     \else
406
 
        \def\@svsechd{#6\hskip #3\relax
407
 
           \@svsec #8\csname #1mark\endcsname {#7}%
408
 
           \expandafter\@tempa\expandafter{\@tempb #7}%
409
 
           \ifautolabel\label*{#8}\fi}\fi
410
 
     \@xsect{#5}}
411
 
 
412
 
% Add automatic content line and label
413
 
 
414
 
\def\@ssect#1#2#3#4#5#6#7{%
415
 
     \ifnum #2>\c@secnumdepth\def\@tempb{}%
416
 
     \else \def\@tempb{\numberline{}}\fi
417
 
     \@tempskipa #5\relax
418
 
     \def\@tempa{\addcontentsline{toc}{s#1}}%
419
 
     \ifdim \@tempskipa>\z@
420
 
        \begingroup #6\relax
421
 
           \@hangfrom{\hskip #3}{\interlinepenalty \@M #7\par}%
422
 
        \endgroup
423
 
        \csname s#1mark\endcsname{#7}%
424
 
        \ifstarredcontents\expandafter\@tempa\expandafter{\@tempb #7}\fi
425
 
        \ifautolabel\label*{#7}\fi
426
 
     \else 
427
 
        \def\@svsechd{#6\hskip #3\relax #7%
428
 
           \csname s#1mark\endcsname {#7}%
429
 
        \ifautolabel\label*{#7}\fi}\fi
430
 
     \@xsect{#5}}
431
 
 
432
 
\newif\ifstarredcontents\starredcontentstrue
433
 
\def\ssubsectionmark#1{}
434
 
\def\ssubsubsectionmark#1{}
435
 
\def\sparagraphmark#1{}
436
 
\def\ssubparagraphmark#1{}
437
 
 
438
 
%     *****************************************
439
 
%     *        TABLE OF CONTENTS, ETC.        *
440
 
%     *****************************************
441
 
 
442
 
% Don't expand macros when writing lines for the table of contents.
443
 
 
444
 
\def\addcontentsline#1#2#3{\if@filesw \begingroup
445
 
\set@key{#3}%
446
 
\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
447
 
  {\let\thepage\relax
448
 
\xdef\@gtempa{\write \@auxout{\string\@writefile{#1}{\noexpand\string
449
 
     \noexpand\contentsline{#2}{\the\@key}{\thepage}}}}\@gtempa}
450
 
   \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
451
 
 
452
 
\long\def\addtocontents#1#2{\if@filesw \begingroup
453
 
\set@key{#2}%
454
 
\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
455
 
\edef\@tempa{\write \@auxout {\string\@writefile{#1}{\the\@key}}}\@tempa
456
 
  \if@nobreak \ifvmode\nobreak\fi\fi\endgroup\fi}
457
 
 
458
 
%     ****************************************
459
 
%     *               FLOATS                 *
460
 
%     ****************************************
461
 
 
462
 
% Make marginal pars tiny and ragged right
463
 
 
464
 
\long\def\@savemarbox#1#2{\global\setbox#1\vtop{\hsize\marginparwidth 
465
 
   \@parboxrestore\marginparstyle #2}}
466
 
 
467
 
\def\marginparstyle{\tiny\normalshape\mediumseries\raggedright}
468
 
 
469
 
%          ****************************************
470
 
%          *    INITIAL DECLARATION COMMANDS      *
471
 
%          ****************************************
472
 
 
473
 
% Don't expand macros in marks.
474
 
 
475
 
\newtoks\@mark
476
 
\def\markboth#1#2{{\global\@mark={{#1}{#2}}{%
477
 
     \mark{\the\@mark}}\if@nobreak\ifvmode\nobreak\fi\fi}}
478
 
 
479
 
\def\markbothsame#1{{\global\@mark={{#1}{#1}}{%
480
 
     \mark{\the\@mark}}\if@nobreak\ifvmode\nobreak\fi\fi}}
481
 
 
482
 
\def\markright#1{{\expandafter\@markright\the\@mark
483
 
     {#1}\mark{\the\@mark}}\if@nobreak\ifvmode\nobreak\fi\fi}
484
 
 
485
 
\def\@markright#1#2#3{\global\@mark{{#1}{#3}}}
486
 
 
487
 
\@mark{{}{}}
488
 
 
489
 
%     ****************************************
490
 
%     *               OUTPUT                 *
491
 
%     ****************************************
492
 
 
493
 
% CHECK if this bug really has disappeared.
494
 
% the two lines after ``here was the bug'' 
495
 
% avoid disappearing \write's before a \marginpar
496
 
% at the top of a page (SL 900302).  The bug is exemplified by
497
 
% \documentstyle{article}
498
 
% \begin{document}
499
 
% \label{foo}\marginpar{foo}
500
 
% \end{document}
501
 
%
502
 
\def\@specialoutput{\ifnum\outputpenalty > -\@Mii
503
 
    \@doclearpage
504
 
  \else
505
 
    \ifnum \outputpenalty <-\@Miii
506
 
       \ifnum\outputpenalty<-\@MM \deadcycles\z@\fi
507
 
       \global\setbox\@holdpg\vbox{\unvbox\@cclv}%
508
 
    \else  % here was the bug
509
 
        \ifdim\ht\@cclv=\pagegoal\else
510
 
        \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa\fi
511
 
        \setbox\@tempboxa\box\@cclv
512
 
        \@pagedp\dp\@holdpg \@pageht\ht\@holdpg
513
 
        \unvbox\@holdpg
514
 
        \@next\@currbox\@currlist{\ifnum\count\@currbox >\z@
515
 
           \ifvoid\footins\else\advance\@pageht\ht\footins
516
 
             \advance\@pageht\skip\footins \advance\@pagedp\dp\footins
517
 
             \insert\footins{\unvbox\footins}\fi
518
 
            \@addtocurcol\else
519
 
           \ifvoid\footins\else\insert\footins{\unvbox\footins}\fi
520
 
            \@addmarginpar\fi}\@latexbug
521
 
    \ifnum \outputpenalty <\z@ \penalty\interlinepenalty\fi
522
 
  \fi\fi}
523
 
 
524
 
% Avoid headers on blank pages 
525
 
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
526
 
    \thispagestyle{plain}\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}
527
 
 
528
 
% $Log: geom.sty,v $
529
 
%Revision 1.21  95/08/02  16:22:57  levy
530
 
%introduced cite separator
531
 
%
532
 
%Revision 1.20  95/07/18  18:19:57  levy
533
 
%\normalshape migrated from \@item to \enumerate, so \sc will work w/
534
 
%\description, say
535
 
%
536
 
%Revision 1.19  95/07/03  14:08:49  levy
537
 
%NFSS2 changes by John Rawnsley
538
 
%
539
 
%Revision 1.19  95/07/03  14:07:58  levy
540
 
%*** empty log message ***
541
 
%
542
 
%Revision 1.17  93/08/04  10:00:53  levy
543
 
%fixed problem with \ssectionmark (so running heads for Bibliography etc.
544
 
%are correct).
545
 
%
546
 
%Revision 1.16  93/01/31  16:15:20  levy
547
 
%created \marginparstyle
548
 
%
549
 
%Revision 1.16  93/01/12  01:50:02  levy
550
 
%*** empty log message ***
551
 
%
552
 
%Revision 1.15  1992/08/25  19:53:57  levy
553
 
%fixed \@mklab (previous fix was nonsense)
554
 
%
555
 
%Revision 1.14  92/08/25  19:33:50  levy
556
 
%@@currentlabel more robust
557
 
%
558
 
%Revision 1.13  92/07/31  09:50:26  levy
559
 
%redefine \@mklab
560
 
%
561
 
%Revision 1.12  92/07/17  13:44:12  levy
562
 
%*** empty log message ***
563
 
%
564
 
%Revision 1.11  92/07/13  21:54:14  levy
565
 
%further cleaned up the environments
566
 
%
567
 
%Revision 1.10  92/07/13  11:11:48  levy
568
 
%*** empty log message ***
569
 
%
570
 
%Revision 1.9  92/07/13  08:57:20  levy
571
 
%changes to geomenv.sty
572
 
%
573
 
%Revision 1.8  1992/07/06  19:04:42  levy
574
 
%sanitize \bibcite, \cite
575
 
%
576
 
%Revision 1.7  92/06/26  18:46:57  levy
577
 
%\reftype
578
 
%
579
 
%Revision 1.6  92/06/03  11:25:59  levy
580
 
%*** empty log message ***
581
 
%
582
 
%Revision 1.5  92/04/16  12:58:26  levy
583
 
%*** empty log message ***
584
 
%
585
 
%Revision 1.4  92/04/07  09:09:03  levy
586
 
%*** empty log message ***
587
 
%
588
 
%Revision 1.3  1992/03/21  02:37:06  levy
589
 
%*** empty log message ***
590
 
%
591
 
%Revision 1.2  1992/03/20  22:39:40  levy
592
 
%*** empty log message ***
593
 
%
594
 
%Revision 1.1  1992/03/20  19:09:34  levy
595
 
%Initial revision
596
 
%
597