1
% $Header: /a/tampa/h/tampa_a/fac/levy/texts/geombook/RCS/geombook.sty,v 1.13 94/07/22 09:55:37 levy Exp Locker: levy $
4
% This is the geom style book file, by Silvio Levy.
5
% It contains modifications to book.sty of <24 Nov 89>.
7
% \typeout{Reading geombook.sty $Revision: 1.13 $ (changes to book.sty)}
9
% Marginpars go on right side of page.
13
% Input size-dependent information. \@ptsize.sty is defined in book.sty.
15
\input geombk1\@ptsize.sty\relax
24
% syntatic sugar for \includeonly
25
% \chap1{34} expands to chap1/1.3,chap1/1.4
27
\def\chap#1#2{\ch@p#1#2!}
28
\def\ch@p#1#2{\if#2!\else chap#1/#1.#2,\expandafter\ch@p\expandafter#1\fi}
30
% First two levels of enumerations are (a) and (i), respectively,
31
% rather than 1. and (a).
33
\let\@@currentlabel\relax %assign initial value
35
\def\labelenumi{\theenumi}
36
\def\theenumi{(\alph{enumi})}
37
\def\p@enumi{\@@currentlabel}
39
\def\labelenumii{\theenumii}
40
\def\theenumii{(\roman{enumii})}
41
\def\p@enumii{\@@currentlabel}
43
\def\p@enumiii{\@@currentlabel}
45
\def\p@enumiv{\@@currentlabel}
47
% Less space around contents of \fbox (2pt instead of 3pt)
51
% mess with \addcontentsline; \chapheadsize instead of \Huge
53
\def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax % IF secnumdepth > -2
54
\refstepcounter{part} % THEN step part counter
55
\def\@tempa{\addcontentsline{toc}{part}} %
56
\expandafter\@tempa\expandafter{\thepart % add toc line
57
\hspace{1em}#1}\else % ELSE add unnumbered line
58
\addcontentsline{toc}{part}{#1}\fi % FI
61
\ifnum \c@secnumdepth >-2\relax % IF secnumdepth > -2
62
\huge\bf Part \thepart % THEN Print 'Part' and number
64
\vskip 20pt \fi % Add space before title.
65
\chapheadsize \bf % FI
68
\def\@spart#1{\ifnum \c@secnumdepth >-2\relax % IF secnumdepth > -2
69
\def\@tempa{\addcontentsline{toc}{spart}} %
70
\expandafter\@tempa\expandafter{#1}\else % ELSE add unnumbered line
71
\addcontentsline{toc}{spart}{#1}\fi % FI
72
{\centering \chapheadsize \bf #1\par}\@endpart}
74
% No explicit \@mkboth needed in \tableofcontents
75
% marks are automatically added by \chapter*
77
\@ifundefined{contentsname}{\def\contentsname{Contents}}{}
78
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
79
\fi{\starredcontentsfalse\chapter*{\contentsname}}%
80
\@starttoc{toc}\if@restonecol\twocolumn\fi}
82
% Contents line for chapter
84
\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
85
\vskip 1.0em plus 1pt % space above chapter line
86
\@tempdima 1.5em % width of box holding chapter number
88
\def\\{\unskip\ \ignorespaces} % deal with \\ in chapter titles --SL
89
\hyphenpenalty10000 % prohibit hyphenation --SL
91
\rightskip \@pnumwidth plus 3em % allow ragged right
92
\parfillskip -\rightskip % when line wraps around --SL
93
\hangindent 1.5em % hangindent is same as l@section below --SL
95
\leavevmode % TeX command to enter horizontal mode.
96
\advance\leftskip\@tempdima %% added 5 Feb 88 to conform to
97
\hskip -\leftskip %% 25 Jan 88 change to \numberline
98
#1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par
99
\penalty\@highpenalty %% added 24 May 89 as suggested by J. Leichter
102
% Contents line for part is the same as for chapter
104
\let\l@part\l@chapter
105
\let\l@spart\l@chapter
107
\let\l@schapter\l@chapter
108
\def\l@ssection{\@dottedtocline{1}{1.5em}{0em}}
109
\def\l@ssubsection{\@dottedtocline{2}{3.8em}{0em}}
110
\def\l@ssubsubsection{\@dottedtocline{3}{7.0em}{0em}}
111
\def\l@sparagraph{\@dottedtocline{4}{10em}{0em}}
112
\def\l@ssubparagraph{\@dottedtocline{5}{12em}{0em}}
114
% No explicit \@mkboth needed in \listoffigures \listoftables \thebibliography
115
% marks are automatically added by \chapter*
117
\@ifundefined{listfigurename}{\def\listfigurename{List of Figures}}{}
118
\@ifundefined{listtablename}{\def\listtablename{List of Tables}}{}
119
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
120
\fi\chapter*{\listfigurename}\@starttoc{lof}\if@restonecol
123
\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
124
\fi\chapter*{\listtablename}\@starttoc{lot}\if@restonecol
127
% no indentation for figure contents line, since there are
128
% no higher-level entries
130
\def\l@figure{\@dottedtocline{1}{0em}{2.3em}}
131
\let\l@table\l@figure
133
\@ifundefined{bibname}{\def\bibname{Bibliography}}{}
134
\def\thebibliography#1{\chapter*{\bibname}\list
135
{[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
136
\advance\leftmargin\labelsep
138
\def\newblock{\hskip .11em plus .33em minus .07em}
139
\sloppy\clubpenalty4000\widowpenalty4000
140
\sfcode`\.=1000\relax}
142
% Index uses two columns and smaller type.
144
\@ifundefined{indexname}{\def\indexname{Index}}{}
145
\def\theindex{\begingroup\chapter*{\indexname}\small
147
\parskip\z@ plus .3pt\relax\let\item\@idxitem
149
\def\endtheindex{\end{multicols}\endgroup}
151
\def\glo#1{${}^{\dagger}$#1\index{\dag #1}}
153
\@ifundefined{glossaryname}{\def\glossaryname{Glossary}}{}
154
\newenvironment{theglossary}%
155
{\begingroup\chapter*{\glossaryname}\small
157
{\end{multicols}\endgroup}
158
\def\entry{\medbreak\@ifnextchar[{\entry@}{\entry@@}}
159
\def\entry@@#1{\par\noindent{\bf #1.}\enspace\ignorespaces}
160
\def\entry@[#1]#2{\par\noindent{\bf #2} #1.\enspace\ignorespaces}
162
% Indentation in index is smaller (12pt instead of 40pt)
164
\def\@idxitem{\par\hangindent 12pt}
166
% Allow more of the page to be taken by figures.
168
\def\bottomfraction{.7}
169
\def\floatpagefraction{.7}
171
% Captions at set with a width somewhat smaller than the main text width
173
\newdimen\@captionmargin\@captionmargin=\parindent
174
\newdimen\@captionwidth %not set here because depends on hsize
176
% left and right footers (normally set by RCS)
181
% Definition of 'headings' page style.
183
\def\ps@headings{\let\@mkboth\markboth
184
\def\@oddfoot{\ifproofing\leftfoot\hfil\rightfoot\else\hfil\fi}%
185
\def\@evenfoot{\ifproofing\leftfoot\hfil\rightfoot\else\hfil\fi}%
186
\def\@evenhead{\footnotesize\rm\thepage\hfil\leftmark}% Left heading.
187
\def\@oddhead{\footnotesize\rm\hbox{}\rightmark\hfil\thepage}%Right heading
188
\def\chaptermark##1{{% Expand the \ifnum, not the ##1
189
\edef\@tempa{\ifnum \c@secnumdepth >\m@ne \@chapapp\ \thechapter. \fi}%
190
\expandafter \markboth \expandafter{\@tempa ##1}{}}}%
191
\def\schaptermark##1{\markboth {##1}{##1}}%
192
\def\ssectionmark##1{\markbothsame{##1}}%
193
\def\sectionmark##1{{% Expand the \ifnum, not the ##1
194
\edef\@tempa{\ifnum \c@secnumdepth >\z@ \thesection. \fi}%
195
\expandafter \markright \expandafter{\@tempa ##1}}}}
197
% footline in \ps@plain and \ps@chapter gets no page number
199
\def\ps@chapter{\let\@mkboth\markboth
200
\def\@oddfoot{\ifproofing\leftfoot\hfil\rightfoot\else\hfil\fi}%
201
\def\@evenfoot{\ifproofing\leftfoot\hfil\rightfoot\else\hfil\fi}%
202
\def\@evenhead{\hfil}\def\@oddhead{\hfil}}
204
\def\ps@plain{\let\@mkboth\@gobbletwo
205
\def\@oddhead{}\def\@oddfoot{}%
206
\def\@evenhead{}\let\@evenfoot\@oddfoot}
208
% Put the new \ps@headings into effect.
212
% $Log: geombook.sty,v $
213
%Revision 1.13 94/07/22 09:55:37 levy
216
%Revision 1.12 1994/05/11 17:07:26 levy
217
%*** empty log message ***
219
%Revision 1.11 1994/05/08 06:05:01 levy
222
%Revision 1.10 1994/04/27 07:15:50 levy
225
%Revision 1.9 1994/04/08 22:04:06 levy
226
%initial value for @@currentlabel
228
%Revision 1.8 92/07/17 13:44:19 levy
229
%*** empty log message ***
231
%Revision 1.7 92/07/13 21:54:25 levy
232
%further cleaned up the environments
234
%Revision 1.6 92/07/13 08:46:31 levy
235
%theoremSt -> Theorem
237
%Revision 1.5 92/06/18 16:55:56 levy
238
%footers in chapter openers
241
%Revision 1.4 92/04/07 09:09:09 levy
242
%*** empty log message ***
244
%Revision 1.3 1992/03/20 22:39:40 levy
245
%*** empty log message ***
247
%Revision 1.2 1992/03/20 19:17:42 levy
248
%*** empty log message ***