GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1%%2%A gapmacro.tex GAP manual Frank Celler3%A Heiko Theissen4%A Alexander Hulpke5%%6%% @(#)$Id: gapmacro.tex,v 1.1 1999/11/26 02:10:01 gap Exp $7%%8%% DO NOT RELY ON MACRO DEFINITIONS IN THIS FILE!9%% The official definition of the manual style is to be found in the file10%% `ext:document.tex'.11%%12%% The following macros are defined in this file.13%%14%% `text' set text in typewriter style (use `\<' instead of `<')15%% <text> set text in italics (use $\<$ instead of $<$ for less than)16%% *text* set text in emphasized style (i.e. slanted)17%% $a.b$ same as $a \cdot b$ (use $\.$ instead of $.$ for full stop)18%% "ref" refer to a label (like "function!for category")19%% \pif sets a single '20%% \cite{.} make a citation21%% \index{.} \indextt{.} make index entry (\indextt in typewriter style)22%%23%% \beginitems produce itemized texts with 3pc hanging indentation24%% item & text25%%26%% item & text ...27%% \enditems28%%29%% \begintt verbatim text in typewriter style30%% verbatim material31%% \endtt32%% \beginexample verbatim text in typewriter style33%% verbatim material34%% \endexample35%%36%% \Input{file} includes file `file.tex' (not recommended for appendices)37%% \Chapter title \par38%% \Section{title} \par39%% make chapter or section title. Automatically generates table of40%% contents. \null after \Section{...} inhibits indexing.41%% \>function( arguments )!{ index subentry }42%% \>`a binop b'{binary operation}!{ index subentry }43%% make a heading for a subsection explaining a function or a binary44%% operation. This automatically generates a label and an index entry45%% (with optional subentry).46%% \){\fmark ...}47%% the same without label and index entry48%%49%% \BeginningOfBook50%% \FrontMatter, \Chapters, \Appendices parts of the book51%% \Bibliography, \Index, \TableOfContents make these chapters (w/o head)52%% \EndOfBook53%%5455\input amssym.tex5657% Page dimensions and double column output.58\hsize 39pc59\vsize 52pc6061%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%62%63% Generic double column output.64%65% Modified from a routine written by Donald Knuth (The TeXBook, App. E)66%67%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%68%69% The user may modify the following to his tastes:70%71% \pagewidth vertical length of page.72% \pageheight horizontal width of page.73% \colwidth column width74% \separator macro to generate column separator. Default is nothing.75% \rulesep sets it to \vrule. \norulesep doesn't.76% \makepage default is what is contained in plain.77\catcode`@=11 % from plain.tex78% Create and initialize new dimensions.79\newdimen\pagewidth \newdimen\pageheight \newdimen\colwidth80\pagewidth=\hsize \pageheight=\vsize \colwidth=3.2truein8182\def\draft{\hsize 42pc\vsize 63pc\pagewidth=\hsize \pageheight=\vsize}8384\def\pif{\char39}8586% This routine is used by \output ; this is different from87% the one found in App. E.88\def\onepageout#1{{\setbox255=\vbox{#1}89\hsize=\pagewidth \vsize=\pageheight \plainoutput}}90\def\normaloutput{\onepageout{\unvbox255}}91\maxdeadcycles=100 % \output is called quite often9293\output={\normaloutput}94\newbox\partialpage \newdimen\origvsize \newif\ifrigid95\def\begindoublecolumns{\global\origvsize=\vsize \begingroup96\output={\global\setbox\partialpage=\vbox{\unvbox255\kern0pt}}\eject97\output={\doublecolumnout} \hsize=\colwidth \dimen@=\pageheight98\advance\dimen@ by-\ht\partialpage \multiply\dimen@ by299\ifdim\dimen@<2\baselineskip \dimen@=2\baselineskip\fi100\vsize=\dimen@}101\def\enddoublecolumns{\output={\balancecolumns}\eject102\endgroup \global\vsize=\origvsize \pagegoal=\vsize}103\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth104\setbox0=\vsplit255 to.5\vsize \setbox2=\vsplit255 to.5\vsize105%\setbox0=\vbox{A\unvbox0B\vfill}\setbox2=\vbox{C\unvbox2D\vfill}%106\onepageout\pagesofar \global\vsize=2\pageheight107\unvbox255 \penalty\outputpenalty}108\def\pagesofar{\unvbox\partialpage109\wd0=\hsize \wd2=\hsize110%\hbox to\pagewidth{\box0\hfil\separator\hfil\box2}}111\hbox to\pagewidth{\valign{##\vfill\cr%112\vbox{\unvbox0}\cr\noalign{\hfil\separator\hfil}\vbox{\unvbox2}\cr}}}113\def\norulesep{\let\separator=\relax}114\def\rulesep{\let\separator=\vrule}115\let\separator=\relax116\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0117\advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip118\divide\dimen@ by2 \splittopskip=\topskip119{\vbadness=10000 \loop \global\setbox3=\copy0120\global\setbox1=\vsplit3 to\dimen@121\ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}122\ifrigid123\setbox0=\vtop{\unvbox1}124\setbox2=\vtop{\unvbox3}125\else126\setbox0=\vbox to\dimen@{\unvbox1}127\setbox2=\vbox to\dimen@{\dimen2=\dp3 \unvbox3\kern-\dimen2 \vfil}128\fi129\global\vsize=\origvsize \pagesofar}130\catcode`@=12131%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%132133\colwidth 19pc134\newdimen\manindent \manindent 3pc135\newdimen\smallmanindent \smallmanindent 1pc136\parskip 1ex plus 0.5ex minus 0.5ex137\parindent 0pt138139% Additional fonts.140\font\inchhigh=cminch141\font\titlefont=cmssdc10 at 40pt142\font\secfont=cmssdc10 at 14pt143\font\sf=cmss10144\font\bsf=cmssdc10145\font\smallrom=cmr8146\font\sevenit=cmti10 at 7pt \scriptfont\itfam=\sevenit147\font\fiveit=cmti10 at 5pt \scriptscriptfont\itfam=\fiveit148149% If you don't have `msb' fonts, replace the next 4 lines by `\let\Bbb=\bf'.150\newfam\msbfam \def\Bbb{\fam\msbfam}151\font\tenmsb=msbm10 \textfont\msbfam=\tenmsb152\font\sevenmsb=msbm7 \scriptfont\msbfam=\sevenmsb153\font\fivemsb=msbm5 \scriptscriptfont\msbfam=\fivemsb154\font\sevenmsa=msam7155156% the dark triangle157\def\darktriangleright{\raise.4ex\hbox{\sevenmsa\char"49}}158159% Math mode should use text italic.160{\count0=\itfam \advance\count0 by-1 \multiply\count0 by"100161\count1=`A162\loop \count2=\mathcode\count1 \advance\count2 by\count0163\global\mathcode\count1=\count2164{\advance\count1 by'040165\count2=\mathcode\count1 \advance\count2 by\count0166\global\mathcode\count1=\count2}167\ifnum\count1<`Z \advance\count1 by1\repeat}168169% macros for verbatim scanning (almost copied from `The TeXbook')170\chardef\other=12171\def\undocatcodespecials{\catcode`\\=\other \catcode`\{=\other172\catcode`\}=\other \catcode`\<=\other \catcode`\$=\other173\catcode`\%=\other \catcode`\~=\other \catcode`\^=\other174\catcode`\_=\other \catcode`\*=\other \catcode`\`=\other175\catcode`\!=\other \catcode`\"=\other \catcode`\&=\other176\catcode`\#=\other \catcode`\|=\other}177\def\ttindent{5mm} % indentation amount of verbatim examples178{\obeyspaces\global\let =\ }179{\obeylines\gdef\obeylines{\catcode`^^M=\active}\gdef^^M{\par}%180\catcode`#=\active \catcode`&=6 \gdef#{\char35}%181%\catcode`#=\active \catcode`&=6 \gdef#&1^^M{\hbox{\char35 &1}^^M}%182\gdef\ttverbatim{\begingroup\undocatcodespecials \catcode`\#=\active%183\parindent 0pt \def\_^^M{\allowbreak}\def\${$}\def\`{`}%184\def\par{\ifvmode\allowbreak\vskip 1pc plus 1pt\else\endgraf\penalty100\relax\fi}%185\obeyspaces \obeylines \tt}}186\outer\def\begintt{\par187\begingroup\advance\leftskip by \ttindent188\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \ttfinish}189{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character190|obeylines % end of line is active191|gdef||{|char124} %192|gdef|ttfinish#1^^M#2\endtt{#1|medskip{#2}|endgroup %193|endgroup%194|vskip-|parskip|medskip|noindent|ignorespaces}}195\outer\def\beginexample{\par196\begingroup\advance\leftskip by \ttindent197\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \examplefinish}198{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character199|obeylines % end of line is active200|gdef||{|char124} %201|gdef|examplefinish#1^^M#2\endexample{#1|medskip{#2}|endgroup %202|endgroup%203|vskip-|parskip|medskip|noindent|ignorespaces}}204205% Input/output streams. Chapter and section counters.206\newwrite\labelout \newwrite\indexout \newwrite\secindout207\newwrite\tocout \newwrite\citeout \newwrite\ans208\newread \labelin \newread \indexin \newread \tocin \newread \citein209\countdef\chapno=1 \newcount\secno \newcount\subsecno \newcount\exno210\def\chapterno{{\edef\tempa{\thechapter}\tempa}}211%\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else212% \chapterno\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}213%\def\doindex#1#2#3{\write\indexout{\noexpand\indexentry{#1#2#3}%214% {\ifnum\pageno<0 \romannumeral-\pageno \else215% \thechapter\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}}%216% \ifvmode\nobreak\fi}217218%AH219\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else220\number\pageno\fi}221\def\doindex#1#2#3{\write\indexout{\noexpand\indexentry{#1#2#3}%222{\ifnum\pageno<0 \romannumeral-\pageno \else223\number\pageno\fi}}%224\ifvmode\nobreak\fi}225226% Additional active characters and their default meanings.227\mathcode`.="2201 \mathchardef\.="702E228\def\undoquotes{\catcode`'=12 \catcode``=12 \def\"##1{{\accent127 ##1}}}229\def\excl{!} \chardef\lqq=`\\ \let\underscore=\_230\catcode`!=\active \let!=\excl231\catcode`^=\active \def^{\ifmmode\sp\else{\char`\^}\fi}232\catcode`_=\active \def_{\ifmmode\sb\else\_\fi} \let\_=\underscore233\catcode`*=\active \def*{\ifmmode\let\next=\*\else\let\next=\bold\fi\next}234\def\bold#1*{{\bf #1\/}} \chardef\*=`*235\catcode`<=\active \def<#1>{{\chardef*=`*\let_=\_\it#1\/}}236\chardef\<=`<237\catcode`"=\active \def"{\begingroup\undoquotes\doref} \chardef\"=`"238\chardef\\=`\\239240% Labels (which are automatically generated by ``\Section'' and ``\>'').241\newif\iflabundef242\def\doref#1"{\bookref#1:"}243\def\bookref#1:#2"{\def\tempa{#2}\ifx\tempa\empty\printref{\book:#1}\else244\printbookref#1:#2"\fi}245\def\printbookref#1:#2:"{\printref{#1:#2}}246247248{\catcode`@=11%249%250\gdef\makelabel#1#2{\expandafter\gdef\csname r@#1\endcsname{#2}}251\gdef\printref#1{%252\let\next=\relax%253\expandafter\edef\next{\def\noexpand\xpandlowr{#1}}%254\lowercase\expandafter{\next}%255\expandafter\ifx\csname r@\xpandlowr\endcsname\relax\lqq\xpandlowr''%256\immediate\write16{Label `#1' undefined.}\global\labundeftrue%257\else \csname r@\xpandlowr\endcsname \fi\endgroup}258}259260% Macros for generating the table of contents.261\newif\iffirstsec \firstsectrue262\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}263264\def\appcontents#1#2#3{}265266\def\chapcontents#1#2#3{%267%\iffirstsec\firstsecfalse\else\line{}\fi% empty line268\par\penalty-5\medskip269\line{\bf\kern\manindent\vbox{\advance\hsize by-\manindent270\advance\hsize by-1.5em271\rightskip 0pt plus1fil \emergencystretch 3em272\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut273#2~\hfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}274275\def\seccontents#1#2#3{276\line{\kern\manindent\vbox{\advance\hsize by-\manindent277\advance\hsize by-1.5em278\rightskip 0pt plus1fil \emergencystretch 3em279\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut280#2~\dotsfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}281282\def\appno#1{{\count0=#1\advance\count0 by64 \char\count0}}283284% Macros which write labels, citations and index entries on auxiliary files.285\newif\iflabchanged286{\catcode`|=0 \catcode`\\=12 |gdef|bs{\}}287{\catcode`@=11288\gdef\label#1{{\catcode`_=11\def_{X}289{\let\next=\relax290\expandafter\edef\next{\def\noexpand\xpandlowr{#1}}291\lowercase\expandafter{\next}292\ifnum\secno=0 \edef\next{\the\chapno}\else293\ifnum\subsecno=0 \edef\next{\the\chapno.\the\secno}\else294\edef\next{\the\chapno.\the\secno.\the\subsecno}\fi295\expandafter\ifx\csname r@\book:\xpandlowr\endcsname\next\else296%\immediate\write16{Label `\book:#1' has changed.}297\global\labchangedtrue\fi\fi298\immediate\write\labelout{\noexpand\makelabel{\book:\xpandlowr}{\next}}}}}299300301\gdef\sigel#1{[\expandafter\ifx\csname c@#1\endcsname\relax302\immediate\write16{Reference `#1' undefined.}\global\labundeftrue303#1\else \csname c@#1\endcsname\fi]}304\gdef\bibitem[#1]#2{\expandafter\gdef\csname c@#2\endcsname{#1}%305\item{\sigel{#2}}}}306\def\cite#1{\write\citeout{\bs citation{#1}}\sigel{#1}}307\def\dosecindex#1#2#3{\ifx\thechapter\normalchapter{\let\ =\space308\immediate\write\secindout{#1 \thechapter.\the\secno. #2#3}}\fi}309\def\bothindex#1#2#3#4{\doindex{#2}{#3}{#4}\dosecindex{#1}{#2}{#4}}310\def\index#1{\bothindex I{#1}{}{}}311\def\atindex#1#2{\bothindex I{#1}{#2}{}}312\def\indextt#1{\atindex{#1}{@`#1'}}313\def\indexit#1{{\it #1}}314315% Macros for chapter and section headings.316\def\filename{appendix}317\def\tocstrut{{\setbox0=\hbox{1}\vrule width 0pt height\ht0}}318\outer\def\Input#1{\def\filename{#1.tex}\input #1}319\def\emptychapter{\noexpand\tocstrut}320\def\normalchapter{\the\chapno}321322\def\Chapter#1 \par{\vfill\supereject \headlinefalse323% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi324\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi325\def\chapname{#1} \label{#1}326\write\tocout{\noexpand\chapcontents{\thechapter}{#1}{\the\pageno}}327\ifx\thechapter\normalchapter328\immediate\write\secindout{C \filename\space\thechapter. \chapname}329\fi330\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}331\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em332% \hyphenpenalty=10000 \linepenalty=10000333\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1}334\line{\box0\hfil\box1}\nobreak \vskip 40pt}335336% start hack added by TB337\def\PreliminaryChapter#1 \par{\vfill\supereject \headlinefalse338% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi339\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi340\def\chapname{#1 (preliminary)} \label{#1}341\write\tocout{\noexpand\chapcontents{\thechapter}{#1 (preliminary)}{\the\pageno}}342\ifx\thechapter\normalchapter343\immediate\write\secindout{C \filename\space\thechapter. \chapname}\fi344\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}345\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em346% \hyphenpenalty=10000 \linepenalty=10000347\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1 (preliminary)}348\line{\box0\hfil\box1}\nobreak \vskip 40pt}349% end hack added by TB350351\outer\def\Section#1#2\par{\bigbreak \advance\secno by1352\subsecno=0353\ifx\thechapter\emptychapter354\edef\tempa{\the\secno}355\else356\edef\tempa{\thechapter.\the\secno}%357\fi%358\expandafter\writesecline\tempa\\{#1}359\dosecindex S{#1}{}{\let\ =\space\label{#1}}360\ifx#2\null\else \edef\tempb{{#1@#1}}361\expandafter\doindex\tempb{|indexit}{}\fi362\noindent{\baselineskip 18pt\let!=\space \mark{Section \the\secno. #1}%363\secfont \tempa \enspace #1}\par\nobreak\medskip}364365\def\writesecline#1\\#2{\write\tocout{\noexpand\seccontents{#1}{#2}366{\the\pageno}}}367\def\letter#1{\medskip{\secfont #1}\endgraf\nobreak}368369% Macros for generating paragraph headings (e.g., function descriptions).370\def\fmark{\noindent\llap{\darktriangleright\rm\enspace}}371\def\moveup#1{\leavevmode \raise.16ex\hbox{\rm #1}}372\def\fpar{\endgraf\endgroup\nobreak\smallskip\noindent\ignorespaces}373\def\>{\begingroup\undoquotes\obeylines\angle}374\def\){\begingroup\obeylines\cloparen}375{\obeylines376\gdef\angle#1377{\endgroup \ifx\par\fpar \global\def\susemarker{\fmark}\else%378\global\advance\subsecno by1%379\global\def\susemarker{\noindent\llap{\smallrom\the\subsecno\kern.5ex%380\darktriangleright\rm\enspace}}%381\ifvmode \vskip -\lastskip \fi \medskip%382\begingroup\let\par=\fpar \parskip 0pt \fi%383\endgraf\nobreak\oporfunc#1\end}%384\gdef\cloparen#1385{\endgroup \ifx\par\fpar \else%386\ifvmode \vskip -\lastskip \fi \medskip%387\begingroup\let\par=\fpar \parskip 0pt \fi%388\endgraf{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}\def\|{\vrule\relax}%389\noindent\typewriter#1'}}%390\gdef\scanparen#1(#2\end{\def\tempa{#2}\ifx\tempa\empty%391\def\next{\begingroup\cloparen\susemarker#1392\label{#1}\bothindex F{#1}{@`#1'}{}}%393\else\def\next{\delparen#1(#2\end}\fi \next}}394\def\delparen#1(\end{\function#1}395\def\oporfunc#1#2\end{\ifx#1`\def\next{\operation#1#2}\else396\def\next{\scanparen#1#2(\end}\fi \next}397\long\def\operation`#1'#2#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%398\def\|{\vrule\relax}}399\susemarker\typewriter#1'%400\ifx#3!\def\next{\suboperation{#2}}401\else\ifx#3@\def\next{\subatoperation{#2}}402\else\endheaderline \label{#2}%403\bothindex F{#2}{}{}\let\next=#3\fi\fi\next}404\long\def\function#1(#2)#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%405\def\|{\vrule\relax}406\susemarker\typewriter#1(#2)'}%407\ifx#3!\def\next{\subfunction{#1}}\else408\endheaderline\label{#1}\bothindex F{#1}{@`#1'}{}%409\let\next=#3\fi\next}410\def\subfunction#1#2{\endheaderline\label{#1!#2}%411\bothindex F{#1}{@`#1'}{!#2}}412\def\suboperation#1#2{\endheaderline\label{#1!#2}%413\bothindex F{#1}{}{!#2}}414\def\subatoperation#1#2{\endheaderline\label{#1}%415\bothindex F{#1}{@#2}{}}416417\def\endheaderline{\hskip 0pt plus 1filll}418419% Macro for item lists.420\catcode`&=\active421\def\beginitems{%422\smallskip423\begingroup424\def&{\par \nobreak \hangindent\manindent \hangafter 0425{\parskip 0pt\noindent}\ignorespaces}426\parindent 0pt427\catcode`&=\active428}429\def\enditems{\par \endgroup \smallskip \noindent \ignorespaces}430431% Macro for item lists.432\def\beginlist{%433\smallskip434\begingroup435\parindent=2em436}437\def\endlist{\par \endgroup \smallskip \noindent \ignorespaces}438\catcode`&=4439440% Macros for exercises.441\outer\def\exercise{\advance\exno by1\begingroup442\def\par{\endgraf\endgroup\medskip\noindent}443\medskip\noindent{\bf Exercise \chapterno.\the\exno.}\quad}444\outer\def\answer{\immediate\write\ans{}%445\immediate\write\ans{\noexpand\answerto{\thechapter.\the\exno.}}%446\copytoblankline}447\def\answerto#1{{\noindent\bf #1}}448\def\copytoblankline{\begingroup\setupcopy\copyans}449{\undoquotes450\gdef\setupcopy{\undocatcodespecials \obeylines \obeyspaces}451\obeylines \gdef\copyans#1452{\def\next{#1}%453\ifx\next\empty\let\next=\endgroup %454\else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}455456% Macros for the active backquote character (`).457{\catcode`.=\active \gdef.{\char'056 \penalty0}}458\def\writetyper{\catcode`.=\active \chardef\{ =`{ \chardef\}=`}459\chardef*=`* \chardef"=`" \chardef~=`~}460\catcode``=\active461\def`{\futurelet\next\backquote}462\def\typewriter#1'{\leavevmode{\writetyper \chardef`=96 \tt #1}}463\def\backquote{\ifx\next`\let\next=\doublebackquote464\else\let\next=\typewriter \fi \next}465\def\doublebackquote`{\lqq}466467% Miscellaneous macros.468\def\GAP{{\sf GAP}}469\def\MOC{{\sf MOC}}470\def\ATLAS{{\sf ATLAS}}471\def\N{{\Bbb N}} \def\Z{{\Bbb Z}} \def\Q{{\Bbb Q}} \def\R{{\Bbb R}}472\def\C{{\Bbb C}} \def\F{{\Bbb F}}473474%T do we want these475%\def\stars{\bigskip\centerline{\*\qquad\*\qquad\*}\bigskip}476477% Page numbers and running heads.478\newif\ifheadline479\nopagenumbers480\def\makeheadline{\vbox to0pt{\vskip-22.5pt\hbox to\pagewidth{\vbox to8.5pt481{}\the\headline}\vss}\nointerlineskip}482\headline={\ifheadline\ifodd\pageno \righthead\hfil{\rm\folio}\else483{\rm\folio}\hfil\lefthead \fi484\else\global\headlinetrue \hfil\fi}485486% Macro for inputting an auxiliary file.487\def\inputaux#1#2#3{\immediate\openin#1=#2\jobname.#3488\ifeof#1\immediate\write16{No file #2\jobname.#3.}\else489\immediate\closein#1 \input#2\jobname.#3 \fi}490491% Macros for the parts of the manual.492\outer\def\FrontMatter{%493\let\thechapter=\emptychapter494\def\lefthead{\it\chapname} \let\righthead=\lefthead495496\begingroup497\undoquotes498\inputaux\labelin{}{lab}499\setbox0=\vbox{\Bibliography}500\endgroup501\labchangedfalse502503% Open the auxiliary files for output.504\immediate\openout\tocout =\jobname.toc505\immediate\openout\labelout =\jobname.lab506\immediate\openout\indexout =\jobname.idx507\immediate\openout\secindout=\jobname.six508\immediate\openout\citeout =\jobname.aux509% \immediate\openout\ans=answers510\immediate\write\citeout{\bs bibstyle{alpha}}511512\ifodd\pageno\else\headlinefalse\null\vfill\eject\fi513% \pageno=1514}515516\outer\def\Chapters{\vfill\eject517\chapno=0 \let\thechapter=\normalchapter518\def\lefthead{{\it Chapter \the\chapno. \chapname}}519\def\righthead{\ifx\botmark\empty\lefthead\else{\it \botmark}\fi}}520521\outer\def\Appendices{\vfill\eject522\def\filename{appendix}523\chapno=0 \def\thechapter{}% was: {\noexpand\appno{\the\chapno}}524%\def\lefthead{{\it Appendix \appno{\the\chapno}. \chapname}}525\def\lefthead{{\it \chapname}}526\let\righthead=\lefthead}527528529%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%530%%531%F \BeginningOfBook . . . . . . . . . . . . . . . . . . . . start the book532%%533\def\BeginningOfBook#1{%534\def\book{#1}%535\pageno=-1%536\pageno=1%537\headlinefalse%538\let\thechapter=\emptychapter%539\def\lefthead{\it\chapname}%540\let\righthead=\lefthead%541}542%543%544%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%545%%546%F \UseReferences{<book-path>} . . . use references from book in <book-path>547%%548\def\UseReferences#1{{\undoquotes549\inputaux\labelin{#1/}{lab}}550}551%552%553%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%554%%555%F \EndOfBook . . . . . . . . . . . . . . . . . . . . . . . . end the book556%%557\def\EndOfBook{\vfill\supereject558\immediate\write16{##}559\immediate\closeout\citeout560\immediate\write16{## Citations for BibTeX written on \jobname.aux.}561\immediate\closeout\indexout562\immediate\write16{## Index entries for makeindex written on \jobname.idx.}563\immediate\closeout\secindout564\immediate\write16{## Section index entries written on \jobname.six.}565\immediate\closeout\labelout566\immediate\write16{## Label definitions written on \jobname.lab.}567\immediate\closeout\tocout568\immediate\write16{## Table of contents written on \jobname.toc.}569\iflabundef\immediate\write16{## There were undefined labels or570references.}\fi571\iflabchanged\immediate\write16{## Labels have changed, run again. (Or572they were multiply defined.)}\fi573\immediate\write16{##}574\end575}576%577%578%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%579%%580%F \TableOfContents . . . . . . . . . . . . . . produce a table of contents581%%582% name of the chapter containing the table of contents583\def\TOCHeader{Contents}584585% explanation at the beginning of the table of contents586\def\TOCMatter{%587}588589% macros for generating the table of contents590%\newif\iffirstsec\firstsectrue591\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}592593% produce the chapter "Contents"594\outer\def\TableOfContents{\Chapter{\TOCHeader}595596\TOCMatter597\vskip 20pt598\begingroup599\rigidfalse600\let!=\space601%\begindoublecolumns602\inputaux\tocin{}{toc}\vfill\eject603%\enddoublecolumns604\endgroup605}606607%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%608%%609%F \TitlePage{<text>} . . . . . . . . . . . . . . . . generate a title page610%%611\long\def\TitlePage#1{%612\null\vfill#1\null\vfill\eject613}614615%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%616%%617%F \Colophon{<text>} . . . . . . . . . . . . . . generate a colophon page618%%619\long\def\Colophon#1{\Chapter{}620621#1\null\vfill\eject622}623624625%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%626%%627%F \Answers . . . . . . . . . . . . . produce the answers to the exercises628%%629% header for the answers630\def\AnswersHeader{Answers to the Exercises}631%632% produce the chapter "Answers"633\def\Answers{\Chapter{\AnswersHeader}634635\parindent\manindent636\parskip 1ex plus 0.5ex minus 0.5ex637\immediate\closeout\ans638\input answers639}640641%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%642%%643%F \Bibliography . . . . . . . . . . . . produce the chapter "Bibliography"644%%645% header for the bibliography646\def\BibHeader{Bibliography}647648% produce the chapter bibliography649\def\Bibliography{\Chapter{\BibHeader}650651\begingroup\undoquotes\frenchspacing652\parindent\manindent653\parskip 1ex plus 0.5ex minus 0.5ex654\def\begin##1##2{} \def\end##1{}655\let\newblock=\relax \let\em=\sl656\inputaux\citein{}{bbl}657\endgroup658}659660%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%661%%662%F \Index . . . . . . . . . . . . . . . . . . produce the chapter "Index"663%%664% header for the index665\def\IndexHeader{Index}666667% explanation at the beginning of the index668\def\IndexMatter{%669This index covers only this manual.670A page number in {\it italics} refers to a whole section which is devoted to671the indexed subject. Keywords are sorted with case and spaces ignored,672e.g., ```PermutationCharacter''' comes before ``permutation group''.%673}674675% kerning in full index after letter676\def\idxkern{\kern.3em}677678% produce the chapter index679\def\Index{\Chapter{\IndexHeader}680681\IndexMatter682\bigskip683\begindoublecolumns684\parindent 0pt \parskip 0pt \rightskip 0pt plus2em \emergencystretch 2em685\everypar{\hangindent\smallmanindent}686\def\par{\endgraf\leftskip 0pt}687\def\sub{\advance\leftskip by\smallmanindent}688\def\subsub{\advance\leftskip by2\smallmanindent}689\obeylines690\inputaux\indexin{}{ind}691\enddoublecolumns692}693694% pseudo chapters used for authors, preface, copyright &c.695\def\PseudoInput#1#2{%696\advance\chapno by1\secno=0\subsecno=0697\immediate\write\secindout{C #1.tex \thechapter. #2}}698699% some often-used LaTeX functions700\def\frac#1#2{{{#1}\over{#2}}}701\def\etalchar#1{$^{#1}$}702703% nasty trick to cope with the `newcommand' created by bibtex704\def\newcommand#1#2#3#4#5{}705706% ragged bottom will avoid large blank spaces707\raggedbottom708\frenchspacing709\vfuzz=2pt710711712