mybook.sty 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. % book.sty 28-Apr-88
  2. \typeout{Document Style `book' <26 Apr 88>.}
  3. \typeout{Modified by John Fitch for better indexing 13 Aug 95}
  4. \def\@ptsize{0} \@namedef{ds@11pt}{\def\@ptsize{1}}
  5. \@namedef{ds@12pt}{\def\@ptsize{2}}
  6. \@twosidetrue \@mparswitchtrue \def\ds@draft{\overfullrule 5pt}
  7. \@options
  8. \input bk1\@ptsize.sty\relax
  9. \def\labelenumi{\theenumi.}
  10. \def\theenumi{\arabic{enumi}}
  11. \def\labelenumii{(\theenumii)}
  12. \def\theenumii{\alph{enumii}}
  13. \def\p@enumii{\theenumi}
  14. \def\labelenumiii{\theenumiii.}
  15. \def\theenumiii{\roman{enumiii}}
  16. \def\p@enumiii{\theenumi(\theenumii)}
  17. \def\labelenumiv{\theenumiv.}
  18. \def\theenumiv{\Alph{enumiv}}
  19. \def\p@enumiv{\p@enumiii\theenumiii}
  20. \def\labelitemi{$\bullet$}
  21. \def\labelitemii{\bf --}
  22. \def\labelitemiii{$\ast$}
  23. \def\labelitemiv{$\cdot$}
  24. \def\verse{\let\\=\@centercr
  25. \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent
  26. \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
  27. \let\endverse\endlist
  28. \def\quotation{\list{}{\listparindent 1.5em
  29. \itemindent\listparindent
  30. \rightmargin\leftmargin\parsep 0pt plus 1pt}\item[]}
  31. \let\endquotation=\endlist
  32. \def\quote{\list{}{\rightmargin\leftmargin}\item[]}
  33. \let\endquote=\endlist
  34. \def\descriptionlabel#1{\hspace\labelsep \bf #1}
  35. \def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin
  36. \let\makelabel\descriptionlabel}}
  37. \let\enddescription\endlist
  38. \newdimen\descriptionmargin
  39. \descriptionmargin=3em
  40. \def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  41. \else \newpage \fi \thispagestyle{empty}\c@page\z@}
  42. \def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
  43. \arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt
  44. \tabbingsep \labelsep
  45. \skip\@mpfootins = \skip\footins
  46. \fboxsep = 3pt \fboxrule = .4pt
  47. \newcounter{part}
  48. \newcounter {chapter}
  49. \newcounter {section}[chapter]
  50. \newcounter {subsection}[section]
  51. \newcounter {subsubsection}[subsection]
  52. \newcounter {paragraph}[subsubsection]
  53. \newcounter {subparagraph}[paragraph]
  54. \def\thepart {\Roman{part}}
  55. \def\thechapter {\arabic{chapter}}
  56. \def\thesection {\thechapter.\arabic{section}}
  57. \def\thesubsection {\thesection.\arabic{subsection}}
  58. \def\thesubsubsection {\thesubsection .\arabic{subsubsection}}
  59. \def\theparagraph {\thesubsubsection.\arabic{paragraph}}
  60. \def\thesubparagraph {\theparagraph.\arabic{subparagraph}}
  61. \def\@chapapp{Chapter}
  62. \def\part{\cleardoublepage \thispagestyle{plain} \if@twocolumn \onecolumn
  63. \@tempswatrue \else \@tempswafalse \fi \hbox{}\vfil \secdef\@part\@spart}
  64. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax \refstepcounter{part}
  65. \addcontentsline{toc}{part}{\thepart \hspace{1em}#1}\else
  66. \addcontentsline{toc}{part}{#1}\fi \markboth{}{}
  67. {\centering \ifnum \c@secnumdepth >-2\relax \huge\bf Part \thepart \par
  68. \vskip 20pt \fi \Huge \bf #1\par}\@endpart}
  69. \def\@endpart{\vfil\newpage \if@twoside \hbox{} \thispagestyle{empty}
  70. \newpage
  71. \fi \if@tempswa \twocolumn \fi}
  72. \def\@spart#1{{\centering \Huge \bf #1\par}\@endpart}
  73. \def\@pnumwidth{1.55em}
  74. \def\@tocrmarg {2.55em}
  75. \def\@dotsep{4.5}
  76. \setcounter{tocdepth}{2}
  77. \def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  78. \fi\chapter*{Contents\@mkboth{CONTENTS}{CONTENTS}}
  79. \@starttoc{toc}\if@restonecol\twocolumn\fi}
  80. \def\l@part#1#2{\addpenalty{-\@highpenalty}
  81. \addvspace{2.25em plus 1pt} \begingroup
  82. \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip
  83. -\@pnumwidth
  84. {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
  85. \nobreak \endgroup}
  86. \def\l@chapter#1#2{\pagebreak[3]
  87. \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup
  88. \parindent \z@ \rightskip \@pnumwidth
  89. \parfillskip -\@pnumwidth
  90. \bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil
  91. \nobreak\hbox to\@pnumwidth{\hss #2}\par
  92. \endgroup}
  93. %% Changed here ************************************
  94. \def\l@section{\@dottedtocline{1}{1.5em}{2.8em}}
  95. \def\l@subsection{\@dottedtocline{2}{4.3em}{3.2em}}
  96. \def\l@subsubsection{\@dottedtocline{3}{7.5em}{4.2em}}
  97. \def\l@paragraph{\@dottedtocline{4}{10.5em}{5em}}
  98. \def\l@subparagraph{\@dottedtocline{5}{12.5em}{6em}}
  99. %% End Change here **********************************
  100. \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  101. \fi\chapter*{List of Figures\@mkboth
  102. {LIST OF FIGURES}{LIST OF FIGURES}}\@starttoc{lof}\if@restonecol
  103. \twocolumn\fi}
  104. \def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
  105. \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  106. \fi\chapter*{List of Tables\@mkboth
  107. {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}\if@restonecol
  108. \twocolumn\fi}
  109. \let\l@table\l@figure
  110. \def\thebibliography#1{\chapter*{Bibliography\@mkboth
  111. {BIBLIOGRAPHY}{BIBLIOGRAPHY}}\list
  112. {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
  113. \advance\leftmargin\labelsep
  114. \usecounter{enumi}}
  115. \def\newblock{\hskip .11em plus .33em minus .07em}
  116. \sloppy\clubpenalty4000\widowpenalty4000
  117. \sfcode`\.=1000\relax}
  118. \let\endthebibliography=\endlist
  119. \newif\if@restonecol
  120. \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi
  121. \columnseprule \z@
  122. \columnsep 35pt\twocolumn[\@makeschapterhead{Index}]
  123. \@mkboth{INDEX}{INDEX}\thispagestyle{plain}\parindent\z@
  124. \parskip\z@ plus .3pt\relax\let\item\@idxitem}
  125. \def\@idxitem{\par\hangindent 40pt}
  126. \def\subitem{\par\hangindent 40pt \hspace*{20pt}}
  127. \def\subsubitem{\par\hangindent 40pt \hspace*{30pt}}
  128. \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi}
  129. \def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax}
  130. \def\footnoterule{\kern-3\p@
  131. \hrule width .4\columnwidth
  132. \kern 2.6\p@}
  133. \@addtoreset{footnote}{chapter}
  134. \long\def\@makefntext#1{\parindent 1em\noindent
  135. \hbox to 1.8em{\hss$^{\@thefnmark}$}#1}
  136. \setcounter{topnumber}{2}
  137. \def\topfraction{.7}
  138. \setcounter{bottomnumber}{1}
  139. \def\bottomfraction{.3}
  140. \setcounter{totalnumber}{3}
  141. \def\textfraction{.2}
  142. \def\floatpagefraction{.5}
  143. \setcounter{dbltopnumber}{2}
  144. \def\dbltopfraction{.7}
  145. \def\dblfloatpagefraction{.5}
  146. \long\def\@makecaption#1#2{
  147. \vskip 10pt
  148. \setbox\@tempboxa\hbox{#1: #2}
  149. \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \hbox
  150. to\hsize{\hfil\box\@tempboxa\hfil}
  151. \fi}
  152. \newcounter{figure}[chapter]
  153. \def\thefigure{\thechapter.\@arabic\c@figure}
  154. \def\fps@figure{tbp}
  155. \def\ftype@figure{1}
  156. \def\ext@figure{lof}
  157. \def\fnum@figure{Figure \thefigure}
  158. \def\figure{\@float{figure}}
  159. \let\endfigure\end@float
  160. \@namedef{figure*}{\@dblfloat{figure}}
  161. \@namedef{endfigure*}{\end@dblfloat}
  162. \newcounter{table}[chapter]
  163. \def\thetable{\thechapter.\@arabic\c@table}
  164. \def\fps@table{tbp}
  165. \def\ftype@table{2}
  166. \def\ext@table{lot}
  167. \def\fnum@table{Table \thetable}
  168. \def\table{\@float{table}}
  169. \let\endtable\end@float
  170. \@namedef{table*}{\@dblfloat{table}}
  171. \@namedef{endtable*}{\end@dblfloat}
  172. \def\maketitle{\begin{titlepage}
  173. \let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}
  174. \null
  175. \vfil
  176. \vskip 60pt \begin{center}
  177. {\LARGE \@title \par} \vskip 3em {\large \lineskip .75em
  178. \begin{tabular}[t]{c}\@author
  179. \end{tabular}\par}
  180. \vskip 1.5em {\large \@date \par} \end{center} \par
  181. \@thanks
  182. \vfil
  183. \null
  184. \end{titlepage}
  185. \setcounter{footnote}{0} \let\thanks\relax
  186. \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\maketitle\relax}
  187. \mark{{}{}}
  188. \def\ps@headings{\let\@mkboth\markboth
  189. \def\@oddfoot{}\def\@evenfoot{}\def\@evenhead{\rm \thepage\hfil \sl
  190. \leftmark}\def\@oddhead{\hbox{}\sl \rightmark \hfil
  191. \rm\thepage}\def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth
  192. >\m@ne
  193. \@chapapp\ \thechapter. \ \fi ##1}}{}}\def\sectionmark##1{\markright
  194. {\uppercase{\ifnum \c@secnumdepth >\z@
  195. \thesection. \ \fi ##1}}}}
  196. \def\ps@myheadings{\let\@mkboth\@gobbletwo
  197. \def\@oddhead{\hbox{}\sl\rightmark \hfil
  198. \rm\thepage}\def\@oddfoot{}\def\@evenhead{\rm \thepage\hfil\sl\leftmark\hbox
  199. {}}\def\@evenfoot{}\def\chaptermark##1{}%
  200. \def\sectionmark##1{}\def\subsectionmark##1{}}
  201. \def\today{\ifcase\month\or
  202. January\or February\or March\or April\or May\or June\or
  203. July\or August\or September\or October\or November\or December\fi
  204. \space\number\day, \number\year}
  205. \@addtoreset{equation}{chapter}
  206. \def\theequation{\thechapter.\arabic{equation}}
  207. \ps@headings \pagenumbering{arabic} \onecolumn