GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1%%2%% This file was modified by Marc Roeder ([email protected])3%% The \printref command now prints a label like pkgname:labelname4%% just as the online manual and the html manual do.5%%6%% This choice was made to have clickable function names in the html7%% version of the documentation of RDS.8%%9%% Galway, 7th January 2008.10%%111213%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%14%%15%A gapmacro.tex GAP manual Frank Celler16%A Heiko Theissen17%A Alexander Hulpke18%%19%% @(#)$Id: gapmacro.tex,v 4.64.4.1 2005/08/26 08:59:57 gap Exp $20%%21%% DO NOT RELY ON MACRO DEFINITIONS IN THIS FILE!22%% The official definition of the manual style is to be found in the file23%% `ext:document.tex'.24%%25%% The following macros are defined in this file.26%%27%% `text' set text in typewriter style (use `\<' instead of `<')28%% <text> set text in italics (use $\<$ instead of $<$ for less than)29%% *text* set text in emphasized style (i.e. slanted)30%% $a.b$ same as $a \cdot b$ (use $\.$ instead of $.$ for full stop)31%% "ref" refer to a label (like "function!for category")32%% \pif sets a single '33%% \cite{.} make a citation34%% \index{.} \indextt{.} make index entry (\indextt in typewriter style)35%%36%% \beginitems produce itemized texts with 3pc hanging indentation37%% item & text38%%39%% item & text ...40%% \enditems41%%42%% \begintt verbatim text in typewriter style43%% verbatim material44%% \endtt45%% \beginexample verbatim text in typewriter style46%% verbatim material47%% \endexample48%%49%% \Input{file} includes file `file.tex'50%% \Chapter{title} followed by a blank line51%% \Section{title} followed by a blank line52%% make chapter or section title. Automatically generates table of53%% contents. \null after \Section{...} inhibits indexing.54%% \>function( arguments )!{ index subentry }55%% \>`a binop b'{binary operation}!{ index subentry }56%% make a heading for a subsection explaining a function or a binary57%% operation. This automatically generates a label and an index entry58%% (with optional subentry).59%% \){\fmark ...}60%% the same without label and index entry61%%62%% \URL{url}63%% \Mailto{}64%%65%% \BeginningOfBook66%% \FrontMatter, \Chapters, \Appendices, \EndMatter parts of the book67%% \Bibliography, \Index, \TableOfContents make these chapters (w/o head)68%% \EndOfBook69%%7071\input amssym.tex7273% Page dimensions and double column output.74\hsize 39pc75\vsize 52pc7677% do we run pdftex?78\expandafter\ifx\csname pdfdest\endcsname\relax79\immediate\write16{Running TeX}80% no: define dummy bookmarking functions81\global\def\bookmarkdestin#1{}82\global\def\setbookmarkind#1#2{}83\global\def\setbookmark#1#2{}84\global\def\indexbookmark#1#2{}85\else86\immediate\write16{Running PDFTeX}87% yes: define macros to do pdf stuff and set some parameters88\global\def\bookmarkdestin#1{\pdfdest name {#1} xyz}89\global\def\setbookmarkind#1#2{%90\setindent{\chapterlen{\the\chapno}}91\pdfoutline goto name {#1} count -\indentno {#2}}92\global\def\setbookmark#1#2{%93\setindent{\chapterlen{\the\chapno}}94\pdfoutline goto name {#1} count 0 {#2}}95% special treatment for the index to get proper indention96\global\def\indexbookmark#1#2{%97\pdfoutline goto name {#1} count -27 {#2}}98\pdfinfo{99/Subject (GAP Manual)100/Author (The GAP Group)101}102\pdfcatalog{103/URI (http://www.gap-system.org)104/PageMode /UseOutlines}105\pdfcompresslevel 9106\fi107108%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%109%110% Generic double column output.111%112% Modified from a routine written by Donald Knuth (The TeXBook, App. E)113%114%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%115%116% The user may modify the following to his tastes:117%118% \pagewidth vertical length of page.119% \pageheight horizontal width of page.120% \colwidth column width121% \separator macro to generate column separator. Default is nothing.122% \rulesep sets it to \vrule. \norulesep doesn't.123% \makepage default is what is contained in plain.124\catcode`@=11 % from plain.tex125% Create and initialize new dimensions.126\newdimen\pagewidth \newdimen\pageheight \newdimen\colwidth127\pagewidth=\hsize \pageheight=\vsize \colwidth=3.2truein128129\def\draft{\hsize 42pc\vsize 63pc\pagewidth=\hsize \pageheight=\vsize}130131\def\pif{\char39}132133% This routine is used by \output ; this is different from134% the one found in App. E.135\def\onepageout#1{{\setbox255=\vbox{#1}136\hsize=\pagewidth \vsize=\pageheight \plainoutput}}137\def\normaloutput{\onepageout{\unvbox255}}138\maxdeadcycles=100 % \output is called quite often139140\output={\normaloutput}141\newbox\partialpage \newdimen\origvsize \newif\ifrigid142\def\begindoublecolumns{\global\origvsize=\vsize \begingroup143\output={\global\setbox\partialpage=\vbox{\unvbox255\kern0pt}}\eject144\output={\doublecolumnout} \hsize=\colwidth \dimen@=\pageheight145\advance\dimen@ by-\ht\partialpage \multiply\dimen@ by2146\ifdim\dimen@<2\baselineskip \dimen@=2\baselineskip\fi147\vsize=\dimen@}148\def\enddoublecolumns{\output={\balancecolumns}\eject149\endgroup \global\vsize=\origvsize \pagegoal=\vsize}150\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth151\setbox0=\vsplit255 to.46\vsize \setbox2=\vsplit255 to.46\vsize152%\setbox0=\vbox{A\unvbox0B\vfill}\setbox2=\vbox{C\unvbox2D\vfill}%153\onepageout\pagesofar \global\vsize=2\pageheight154\unvbox255 \penalty\outputpenalty}155\def\pagesofar{\unvbox\partialpage156\wd0=\hsize \wd2=\hsize157%\hbox to\pagewidth{\box0\hfil\separator\hfil\box2}}158\hbox to\pagewidth{\valign{##\vfill\cr%159\vbox{\unvbox0}\cr\noalign{\hfil\separator\hfil}\vbox{\unvbox2}\cr}}}160\def\norulesep{\let\separator=\relax}161\def\rulesep{\let\separator=\vrule}162\let\separator=\relax163\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0164\advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip165\divide\dimen@ by2 \splittopskip=\topskip166{\vbadness=10000 \loop \global\setbox3=\copy0167\global\setbox1=\vsplit3 to\dimen@168\ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}169\ifrigid170\setbox0=\vtop{\unvbox1}171\setbox2=\vtop{\unvbox3}172\else173\setbox0=\vbox to\dimen@{\unvbox1}174\setbox2=\vbox to\dimen@{\dimen2=\dp3 \unvbox3\kern-\dimen2 \vfil}175\fi176\global\vsize=\origvsize \pagesofar}177\catcode`@=12178%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%179180\colwidth 19pc181\newdimen\manindent \manindent 3pc182\newdimen\smallmanindent \smallmanindent 1pc183\parskip 1ex plus 0.5ex minus 0.5ex184\parindent 0pt185186% Additional fonts.187\font\inchhigh=cminch188\font\titlefont=cmssdc10 at 40pt189\font\subtitlefont=cmssdc10 at 24pt190\font\secfont=cmssdc10 at 14pt191\font\sf=cmss10192\font\bsf=cmssdc10193\font\smallrom=cmr8194\font\sevenit=cmti10 at 7pt \scriptfont\itfam=\sevenit195\font\fiveit=cmti10 at 5pt \scriptscriptfont\itfam=\fiveit196197% If you don't have `msb' fonts, replace the next 4 lines by `\let\Bbb=\bf'.198\newfam\msbfam \def\Bbb{\fam\msbfam}199\font\tenmsb=msbm10 \textfont\msbfam=\tenmsb200\font\sevenmsb=msbm7 \scriptfont\msbfam=\sevenmsb201\font\fivemsb=msbm5 \scriptscriptfont\msbfam=\fivemsb202\font\sevenmsa=msam7203204% the dark triangle205\def\darktriangleright{\raise.4ex\hbox{\sevenmsa\char"49}}206207% Math mode should use text italic.208{\count0=\itfam \advance\count0 by-1 \multiply\count0 by"100209\count1=`A210\loop \count2=\mathcode\count1 \advance\count2 by\count0211\global\mathcode\count1=\count2212{\advance\count1 by'040213\count2=\mathcode\count1 \advance\count2 by\count0214\global\mathcode\count1=\count2}215\ifnum\count1<`Z \advance\count1 by1\repeat}216217% macros for verbatim scanning (almost copied from `The TeXbook')218\chardef\other=12219\def\undocatcodespecials{\catcode`\\=\other \catcode`\{=\other220\catcode`\}=\other \catcode`\<=\other \catcode`\$=\other221\catcode`\%=\other \catcode`\~=\other \catcode`\^=\other222\catcode`\_=\other \catcode`\*=\other \catcode`\`=\other223\catcode`\!=\other \catcode`\"=\other \catcode`\&=\other224\catcode`\#=\other \catcode`\|=\other}225\def\ttindent{5mm} % indentation amount of verbatim examples226\def\kernttindent{\hskip\ttindent\relax} % for use in %\begintt227{\obeyspaces\global\let =\ }228{\obeylines\gdef\obeylines{\catcode`^^M=\active}\gdef^^M{\par}%229\catcode`#=\active \catcode`&=6 \gdef#{\char35}%230%\catcode`#=\active \catcode`&=6 \gdef#&1^^M{\hbox{\char35 &1}^^M}%231\gdef\ttverbatim{\begingroup\undocatcodespecials \catcode`\#=\active%232\parindent 0pt \def\_^^M{\allowbreak}\def\${$}\def\`{`}%233\def\par{\ifvmode\allowbreak\vskip 1pc plus 1pt\else\endgraf\penalty100\relax\fi}%234\obeyspaces \obeylines \tt}}235\outer\def\begintt{\par236\begingroup\advance\leftskip by \ttindent237\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \ttfinish}238{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character239|obeylines % end of line is active240|gdef||{|char124} %241|gdef|ttfinish#1^^M#2\endtt{#1|medskip{#2}|endgroup %242|endgroup%243|vskip-|parskip|medskip|noindent|ignorespaces}}244\def\unstableoutput{}245\outer\def\beginexample{\par246\begingroup\advance\leftskip by \ttindent247\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \examplefinish}248{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character249|obeylines % end of line is active250|gdef||{|char124} %251|gdef|examplefinish#1^^M#2\endexample{#1|medskip{#2}|endgroup %252|endgroup%253|vskip-|parskip|medskip|noindent|ignorespaces}}254255% Input/output streams. Chapter and section counters.256\newwrite\labelout \newwrite\indexout \newwrite\secindout257\newwrite\tocout \newwrite\citeout \newwrite\ans258\newread \labelin \newread \indexin \newread \tocin \newread \citein259\countdef\chapno=1 \newcount\secno \newcount\subsecno \newcount\exno260\newcount\indentno261\newcount\chapnum %GG \chapnum is a numerical \chapno for the .six file262\def\chapterno{{\edef\tempa{\thechapter}\tempa}}263%\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else264% \chapterno\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}265%\def\doindex#1#2#3{\write\indexout{\noexpand\indexentry{#1#2#3}%266% {\ifnum\pageno<0 \romannumeral-\pageno \else267% \thechapter\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}}%268% \ifvmode\nobreak\fi}269270%AH271\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else272\number\pageno\fi}273274%\def\doindex#1#2#3{\protectedwrite\indexout{\noexpand\indexentry{#1#2#3}%275% {\ifnum\pageno<0\romannumeral-\pageno\else%276% \number\pageno\fi}}%277% \ifvmode\nobreak\else\unskip\fi}278{\catcode`@=11279\catcode`<=\active \catcode`_=\active \catcode`!=\active \catcode`*=\active280\catcode``=\active281282\global\let\n@exp\noexpand283284\gdef\doindex#1#2#3{\begingroup285%\let_\underscore\let`\lq\let<\<\let!\excl286\def\noexpand{}% this kills noexpands from some index entries287\def\protect{\n@exp\n@exp\n@exp}%288\def_{\protect_}\def*{\protect*}\def`{\protect `}\def<{\protect <}\def!{\protect!}%289\edef\tmp{\n@exp\n@exp\n@exp\indexentry{#1#2#3}}%290\expandafter\write\expandafter\indexout\expandafter{\tmp{\folio}}%291%{\scrollmode\errorcontextlines 1\show\tmp\errorstopmode}%292\ifvmode\nobreak\else\unskip\fi\endgroup}%293}294295% Additional active characters and their default meanings.296\mathcode`.="2201 \mathchardef\.="702E297\def\undoquotes{\catcode`'=12 \catcode``=12 \def\"##1{{\accent127 ##1}}}298\def\excl{!} \chardef\lqq=`\\ \let\underscore=\_299\chardef\<=`<300\catcode`!=\active \let!=\excl301\catcode`^=\active \def^{\ifmmode\sp\else{\char`\^}\fi}302\catcode`_=\active \def\activeusc{\ifmmode\sb\else\_\fi}303\let_=\activeusc \let\_=\underscore304\catcode`*=\active \def*{\ifmmode\let\next=\*\else\let\next=\bold\fi\next}305\def\bold#1*{{\bf #1\/}} \chardef\*=`*306\catcode`<=\active \def<#1>{{\chardef*=`*\let_=\_\it#1\/}}307308\catcode`"=\active \def"{\begingroup\undoquotes\doref} \chardef\"=`"309\chardef\\=`\\310311{\catcode`|=0 \catcode`\\=12 |gdef|bs{\}}312% Labels (which are automatically generated by ``\Section'' and ``\>'').313%\newif\iflabmultdef314\newif\iflabundef315\newif\iflabchanged316\def\doref#1"{\bookref#1:"}317\def\bookref#1:#2"{\def\tempa{#2}\ifx\tempa\empty\printref{\book:#1}\else318\printbookref#1:#2"\fi}319\def\printbookref#1:#2:"{\printref{#1:#2}}320321% Macros which write labels, citations and index entries on auxiliary files.322%323% 1. Some code was moved around so that all the labels and indexing stuff324% would be together.325% 2. Modified \makelabel, \printref and \label to be more like the LaTeX326% commands \newlabel, \ref and \label, respectively. The commands:327% \@xp, \@firstoftwo, \@secondoftwo, \namedef, \@ifundefined328% \protectedwrite are adapted pieces of LaTeX code (\@xp is actually329% AmSLaTeX's abbreviation of \expandafter).330% 3. The upshot of 2. is that now underscore is allowed in labels and331% index-entries and that the \makelabel commands written to the332% manual.lab files have arguments that are no longer put in lowercase.333% The labels formed inside TeX from the \makelabel commands maps334% underscores to | (needed to be a non-active character) and then335% converts to lowercase.336% 4. Since GapDoc uses < and > in some of its labels a temporary re-defintion337% of <#1> was necessary, inside \@xplowr.338% - GG 2001/06/11, 2001/09/02339\catcode`@=11340\let\@xp\expandafter341\long\def\@firstoftwo#1#2{#1}342\long\def\@secondoftwo#1#2{#2}343\def\namedef#1{\expandafter\def\csname #1\endcsname}344\def\@ifundefined#1{\@xplowr{#1}%345\@xp\ifx\csname \xpandlowr\endcsname\relax%346\@xp\@firstoftwo%347\else%348\@xp\@secondoftwo%349\fi}350\def\protectedwrite#1#2{\begingroup\let_\relax\immediate\write#1{#2}\endgroup}351\def\@xplowr#1{\begingroup\def_{|}\def<##1>{|##1|}\let\next=\relax%352\expandafter\edef\next{\gdef\noexpand\xpandlowr{#1}}%353\lowercase\expandafter{\next}\endgroup}354\def\makelabel#1#2{\@xplowr{r@#1}%355\@ifundefined{\xpandlowr}%356\relax%357{\let_\activeusc}%\protectedwrite{16}{Label `#1' multiply defined.}}%358\let_\activeusc%\protectedwrite{16}{Defined label `#1'.}%359\begingroup\edef_{|}\global\namedef{\xpandlowr}{#2}\endgroup}360361%%%%%%%%%% Changed the following paragraph:362%\gdef\printref#1{\@xplowr{#1}%363% \@xp\ifx\csname r@\xpandlowr\endcsname\relax\lqq\xpandlowr''%364% \protectedwrite{16}{Label `#1' undefined.}\global\labundeftrue%365% \else\csname r@\xpandlowr\endcsname\fi\endgroup\let_\activeusc}366%% to:367\gdef\printref#1{\@xplowr{#1}%368\@xp\ifx\csname r@\xpandlowr\endcsname\relax\lqq\xpandlowr''%369\protectedwrite{16}{Label `#1' undefined.}\global\labundeftrue%370\else {\tt#1}\fi\endgroup\let_\activeusc}371%%%%%%%%%%372%% End of changes.373374375% Macros which write labels, citations and index entries on auxiliary files.376\gdef\label#1{\@xplowr{#1}377\ifnum\secno=0 \edef\@currentlabel{\thechapter}\else378\ifnum\subsecno=0 \edef\@currentlabel{\thechapter.\the\secno}\else379\edef\@currentlabel{\thechapter.\the\secno.\the\subsecno}\fi\fi380\@xp\ifx\csname r@\book:\xpandlowr\endcsname\@currentlabel\else%381%\immediate\write16{Label `\book:#1' has changed.}382\global\labchangedtrue\fi383\protectedwrite\labelout{\string\makelabel{\book:#1}{\@currentlabel}}%384\let_\activeusc}385386\gdef\sigel#1{[\expandafter\ifx\csname c@#1\endcsname\relax387\immediate\write16{Reference `#1' undefined.}\global\labundeftrue388#1\else \csname c@#1\endcsname\fi]}389\gdef\bibitem[#1]#2{\expandafter\gdef\csname c@#2\endcsname{#1}%390\item{\sigel{#2}}%391\immediate\write\labelout{\noexpand\setcitlab{#2}\noexpand{#1}}}392\gdef\setcitlab#1#2{\expandafter\gdef\csname c@#1\endcsname{#2}}393\catcode`@=12%394395\def\cite#1{\write\citeout{\bs citation{#1}}\sigel{#1}}396\def\dosecindex#1#2#3{\ifchapter{\let\ =\space%397\protectedwrite\secindout{#1 \the\chapno.\the\secno. #2#3}}\fi}398\def\bothindex#1#2#3#4{\doindex{#2}{#3}{#4}\dosecindex{#1}{#2}{#4}}399\def\index#1{\bothindex I{#1}{}{}}400\def\atindex#1#2{\doindex{\scrubafterexcl#1!\end}{#2}{}\dosecindex I{#1}{}}401\def\indextt#1{\doindex{\scrubafterexcl#1!\end}%402{@`\scrubafterexcl#1!\end'\scrubbeforeexcl#1!\end}{}\dosecindex I{#1}{}}403%\def\indextt#1{\atindex{#1}{@`#1'}}404\def\indexit#1{{\it #1}}405406% Macros for generating the table of contents.407\newif\iffirstsec \firstsectrue408\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}409410\def\appcontents#1#2#3{}411412\def\chapcontents#1#2#3{%413%\iffirstsec\firstsecfalse\else\line{}\fi% empty line414\par\penalty-5\medskip415\line{\bf\kern\manindent\vbox{\advance\hsize by-\manindent416\advance\hsize by-1.5em417\rightskip 0pt plus1fil \emergencystretch 3em418\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut419#2~\hfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}420421\def\seccontents#1#2#3{422\par\penalty-5\medskip423\setchapterlen#1.424\line{\kern\manindent\vbox{\advance\hsize by-\manindent425\advance\hsize by-1.5em426\rightskip 0pt plus1fil \emergencystretch 3em427\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut428#2~\dotsfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}429430% GG ... the idea of \ors is to put the right no. of \or s in the \appno431% macro so that for an appendix:432% 1. \the\chapno gives the number needed in the .six file, and433% 2. \appno\chapno gives the right letter A, B, ... for the .lab file434\newtoks\ortoks435\long\def\addor{\begingroup\ortoks\expandafter{\ors\or}436\xdef\ors{\the\ortoks}\endgroup}437\def\setors{{\xdef\ors{} \count0=\chapno438\loop\ifnum\count0>0 \addor \advance\count0 by -1\repeat}}439\def\appno#1{\expandafter\ifcase\expandafter#1\ors\or A\or B\or C\or D\or E\or440F\or G\or H\or I\or J\or K\or L\or M\or N\or O\or P\or Q\or R\or S\or T\or441U\or V\or W\or X\or Y\or Z\else\immediate\write16{Counter too large} \fi}442443% Macros for chapter and section headings.444\def\filename{appendix}445\def\tocstrut{{\setbox0=\hbox{1}\vrule width 0pt height\ht0}}446\outer\def\Input#1{\def\filename{#1.tex}\input #1}447\def\emptychapter{\noexpand\tocstrut}448\def\normalchapter{\the\chapno}449% GG450\def\appendixchapter{\appno\chapno} % \appno behaves like LaTeX's \Alph451\newif\ifchapter % set to true when \thechapter = \normalchapter452% ... or ... when \thechapter = \appendixchapter453454{\catcode`@=11%455%456\gdef\setchapterlen#1.#2.{\expandafter\gdef\csname ch@#1\endcsname{#2}}457\gdef\chapterlen#1{%458\ifchapter459\expandafter\ifx\csname ch@#1\endcsname\relax%4600%461\else\csname ch@#1\endcsname\fi462\else 0\fi}%463}464\def\setindent#1{\indentno=#1}465466467\def\Chapter#1 \par{\vfill\supereject \headlinefalse468% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi469\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi470\bookmarkdestin{#1}471\def\chapname{#1} \label{#1}472\immediate\write16{Chapter `#1' .}%473\write\tocout{\noexpand\chapcontents{\thechapter}{#1}{\the\pageno}}474\ifchapter475\immediate\write\secindout{C \filename\space\the\chapno. \chapname}\fi476\setbookmarkind{#1}{#1}477\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}478\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em479% \hyphenpenalty=10000 \linepenalty=10000480\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1}481\line{\box0\hfil\box1}\nobreak \mark{}\vskip 40pt}482483% start hack added by TB484\def\PreliminaryChapter#1 \par{\vfill\supereject \headlinefalse485% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi486\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi487\bookmarkdestin{#1}488\def\chapname{#1 (preliminary)} \label{#1}489\write\tocout{\noexpand\chapcontents{\thechapter}{#1 (preliminary)}{\the\pageno}}490\ifchapter491\immediate\write\secindout{C \filename\space\the\chapno. \chapname}\fi492\setbookmarkind{#1}{#1}493\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}494\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em495% \hyphenpenalty=10000 \linepenalty=10000496\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1 (preliminary)}497\line{\box0\hfil\box1}\nobreak \mark{}\vskip 40pt}498% end hack added by TB499500\outer\def\Section#1#2\par{\bigbreak \advance\secno by1501\subsecno=0502\ifx\thechapter\emptychapter503\edef\tempa{\the\secno}504\else505\edef\tempa{\thechapter.\the\secno}%506\fi%507\bookmarkdestin{\tempa}508\setbookmark{\tempa}{#1}509\expandafter\writesecline\tempa\\{#1}510\dosecindex S{#1}{}511\ifx#2\nolabel\else{\let\ =\space\label{#1}}\fi512\ifx#2\null\else \edef\tempb{{#1@#1}}513\expandafter\doindex\tempb{|indexit}{}\fi514\noindent{\baselineskip 18pt\let!=\space \mark{Section \the\secno. #1}%515\secfont \tempa \enspace #1}\par\nobreak\medskip}516517\def\writesecline#1\\#2{\write\tocout{\noexpand\seccontents{#1}{#2}518{\the\pageno}}}519\def\letter#1{\medskip{\secfont #1}\endgraf\nobreak%520\edef\tempa{LeTtEr#1}%521\bookmarkdestin{\tempa}%522\setbookmark{\tempa}{#1}%523}524525% Macros for generating paragraph headings (e.g., function descriptions).526\def\fmark{\noindent\llap{\darktriangleright\rm\enspace}}527\def\moveup#1{\leavevmode \raise.16ex\hbox{\rm #1}}528\def\fpar{\endgraf\endgroup\nobreak\smallskip\noindent\ignorespaces}529\def\>{\begingroup\undoquotes\obeylines\angle}530\def\){\begingroup\obeylines\cloparen}531{\obeylines532\gdef\angle#1533{\endgroup \ifx\par\fpar \global\def\susemarker{\fmark}\else%534\global\advance\subsecno by1%535\global\def\susemarker{\noindent\llap{\smallrom\the\subsecno\kern.5ex%536\darktriangleright\rm\enspace}}%537\ifvmode \vskip -\lastskip \fi \medskip%538\begingroup\let\par=\fpar \parskip 0pt \fi%539\endgraf\nobreak\oporfunc#1\end}%540\gdef\cloparen#1541{\endgroup \ifx\par\fpar \else%542\ifvmode \vskip -\lastskip \fi \medskip%543\begingroup\let\par=\fpar \parskip 0pt \fi%544\endgraf{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}\def\|{\vrule\relax}%545\noindent\typewriter#1'}}%546\gdef\scanparen#1(#2\end{\def\tempa{#2}\ifx\tempa\empty%547\def\next{\begingroup\cloparen\susemarker#1548\label{#1}\bothindex F{#1}{@`#1'}{}}%549\else\def\next{\delparen#1(#2\end}\fi \next}}550\def\delparen#1(\end{\function#1}551\def\oporfunc#1#2\end{\ifx#1`\def\next{\oporvalue#1#2}\else552\def\next{\scanparen#1#2(\end}\fi \next}553\long\def\oporvalue`#1'#2{\ifx#2V\def\next{\operation`#1'{#1}@{`#1'} V}\else554\def\next{\operation`#1'{#2}}\fi \next}555\long\def\operation`#1'#2#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%556\def\|{\vrule\relax}}557\susemarker\typewriter#1'%558\ifx#3!\def\next{\suboperation{#2}}559\else\ifx#3@\def\next{\subatoperation{#2}}560\else\endheaderline \label{#2}%561\bothindex F{#2}{}{}\let\next=#3\fi\fi\next}562\long\def\function#1(#2)#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%563\def\|{\vrule\relax}564\susemarker\typewriter#1(#2)'}%565\ifx#3!\def\next{\subfunction{#1}}\else566\endheaderline\label{#1}\bothindex F{#1}{@`#1'}{}%567\let\next=#3\fi\next}568\def\subfunction#1#2{\endheaderline\label{#1!#2}%569\bothindex F{#1}{@`#1'}{!#2}}570\def\suboperation#1#2{\endheaderline\label{#1!#2}%571\bothindex F{#1}{}{!#2}}572\def\subatoperation#1#2{\endheaderline\label{#1}%573\doindex{\scrubafterexcl#1!\end}{@#2}{}574\dosecindex F{#1}{}}575\def\scrubafterexcl#1!#2\end{#1}576\def\scrubbeforeexcl#1!#2\end{\if\relax#2\else!\removeendexcl#2\fi}577\def\removeendexcl#1!{#1}578579\def\endheaderline{\hskip 0pt plus 1filll}580581% Macro for item lists.582\catcode`&=\active583\def\beginitems{%584\smallskip585\begingroup586\def&{\par \nobreak \hangindent\manindent \hangafter 0587{\parskip 0pt\noindent}\ignorespaces}588\parindent 0pt589\catcode`&=\active590}591\def\enditems{\par \endgroup \smallskip \noindent \ignorespaces}592593% Macro for item lists.594\def\beginlist{%595\smallskip596\begingroup597\parindent=2em598}599\def\endlist{\par \endgroup \smallskip \noindent \ignorespaces}600\catcode`&=4601602% Macros for exercises.603\outer\def\exercise{\advance\exno by1\begingroup604\def\par{\endgraf\endgroup\medskip\noindent}605\medskip\noindent{\bf Exercise \chapterno.\the\exno.}\quad}606\outer\def\answer{\immediate\write\ans{}%607\immediate\write\ans{\noexpand\answerto{\thechapter.\the\exno.}}%608\copytoblankline}609\def\answerto#1{{\noindent\bf #1}}610\def\copytoblankline{\begingroup\setupcopy\copyans}611{\undoquotes612\gdef\setupcopy{\undocatcodespecials \obeylines \obeyspaces}613\obeylines \gdef\copyans#1614{\def\next{#1}%615\ifx\next\empty\let\next=\endgroup %616\else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}617618% Macros for the active backquote character (`).619{\catcode`.=\active \gdef.{\char'056 \penalty0}}620\def\writetyper{\catcode`.=\active \chardef\{ =`{ \chardef\}=`}621\chardef*=`* \chardef"=`" \chardef~=`~}622\catcode``=\active623\def`{\futurelet\next\backquote}624\def\typewriter#1'{\leavevmode{\writetyper \chardef`=96 \tt #1}}625\def\backquote{\ifx\next`\let\next=\doublebackquote626\else\let\next=\typewriter \fi \next}627\def\doublebackquote`{\lqq}628629% The \Package command for argument <pkg> defines a macro \<pkg> that630% sets the text <pkg> in sans-serif i.e. a share package author should631% put a \Package{<pkg>} in their manual.tex file and then use {\<pkg>}632% when they refer to package <pkg>.633634\def\Package#1{\namedef{#1}{{\sf #1}}}635\Package{GAP}636\Package{MOC}637\Package{ATLAS}638639% For one-off references to a share package there is the following:640641\def\package#1{{\sf #1}}642643% The day644645\def\Day{\number\day}646647% The month in words648649\def\Month{\ifcase\month\or January\or February\or March\or April\or May\or650June\or July\or August\or September\or October\or November\or December\fi}651652% The year653654\def\Year{\number\year}655656% The date657658\def\Today{{\Day} {\Month} {\Year}}659660% Miscellaneous macros.661\def\N{{\Bbb N}} \def\Z{{\Bbb Z}} \def\Q{{\Bbb Q}} \def\R{{\Bbb R}}662\def\C{{\Bbb C}} \def\F{{\Bbb F}} \def\calR{{\cal R}}663664%T do we want these665%\def\stars{\bigskip\centerline{\*\qquad\*\qquad\*}\bigskip}666667% Page numbers and running heads.668\newif\ifheadline669\nopagenumbers670\def\makeheadline{\vbox to0pt{\vskip-22.5pt\hbox to\pagewidth{\vbox to8.5pt671{}\the\headline}\vss}\nointerlineskip}672\headline={\ifheadline\ifodd\pageno \righthead\hfil{\rm\folio}\else673{\rm\folio}\hfil\lefthead \fi674\else\global\headlinetrue \hfil\fi}675676% Macro for inputting an auxiliary file.677\def\inputaux#1#2#3{\immediate\openin#1=#2\jobname.#3678\ifeof#1\immediate\write16{No file #2\jobname.#3.}\else679\immediate\closein#1 \input#2\jobname.#3 \fi}680681% Macros for the parts of the manual.682\outer\def\FrontMatter{%683\let\thechapter=\emptychapter684\def\lefthead{\it\chapname} \let\righthead=\lefthead685686\begingroup687\undoquotes688\inputaux\labelin{}{lab}689%\setbox0=\vbox{\Bibliography}690\endgroup691\labchangedfalse692693% Open the auxiliary files for output.694\immediate\openout\tocout =\jobname.toc695\immediate\openout\labelout =\jobname.lab696\immediate\openout\indexout =\jobname.idx697\immediate\openout\secindout=\jobname.six698\immediate\openout\citeout =\jobname.aux699% \immediate\openout\ans=answers700\immediate\write\citeout{\bs bibstyle{alpha}}701702\ifodd\pageno\else\headlinefalse\null\vfill\eject\fi703% \pageno=1704}705706\outer\def\Chapters{\vfill\eject707\chapno=0 \let\thechapter=\normalchapter \chaptertrue708\def\lefthead{{\it Chapter \the\chapno. \chapname}}709\def\righthead{\ifx\botmark\empty\lefthead\else{\it \botmark}\fi}}710711% GG712% Rather than reset \chapno in \Appendices, for the .six file (which GAP's713% help uses), we number appendices as if they were chapters (via \the\chapno)714% i.e. if the last chapter was numbered 7 then for the .six file the first715% appendix would be numbered 8.716% The \setors macro puts (\number\chapno - 1) \or s in the \ors macro so that717% \appno\chapno (= \appendixchapter) numbers the appendices sequentially from A718% for the .lab file (which TeX uses).719\outer\def\Appendices{\vfill\eject720\setors \let\thechapter=\appendixchapter \chaptertrue721\def\lefthead{{\it Appendix \thechapter. \chapname}}722\def\righthead{\ifx\botmark\empty\lefthead\else{\it \botmark}\fi}}723724\def\EndMatter{\vfill\eject725\def\thechapter{} \chapterfalse726\def\lefthead{{\it \chapname}}727\let\righthead=\lefthead728\hbadness=5000\relax729\gdef\EndMatter{}}730731%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%732%%733%F \BeginningOfBook . . . . . . . . . . . . . . . . . . . . start the book734%%735\def\BeginningOfBook#1{%736\def\book{#1}%737\pageno=-1%738\pageno=1%739\headlinefalse%740\let\thechapter=\emptychapter%741\def\lefthead{\it\chapname}%742\let\righthead=\lefthead%743}744%745%746%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%747%%748%F \UseReferences{<book-path>} . . . use references from book in <book-path>749%%750\def\UseReferences#1{{\undoquotes751\inputaux\labelin{#1/}{lab}}752}753\let\UseGapDocReferences\UseReferences %needed so that the HTML converter754%can tell the difference755%756%757%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%758%%759%F \EndOfBook . . . . . . . . . . . . . . . . . . . . . . . . end the book760%%761\def\EndOfBook{\vfill\supereject762\immediate\write16{##}763\immediate\closeout\citeout764\immediate\write16{## Citations for BibTeX written on \jobname.aux.}765\immediate\closeout\indexout766\immediate\write16{## Index entries for makeindex written on \jobname.idx.}767\immediate\closeout\secindout768\immediate\write16{## Section index entries written on \jobname.six.}769\immediate\closeout\labelout770\immediate\write16{## Label definitions written on \jobname.lab.}771\immediate\closeout\tocout772\immediate\write16{## Table of contents written on \jobname.toc.}773%\iflabmultdef\immediate\write16{## There were multiply-defined labels.}\fi774\iflabundef\immediate\write16{## There were undefined labels or775references.}\fi776\iflabchanged\immediate\write16{## Labels have changed, run again. (Or777they were multiply defined.)}\fi778\immediate\write16{##}779\end780}781%782%783%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%784%%785%F \TableOfContents . . . . . . . . . . . . . . produce a table of contents786%%787% name of the chapter containing the table of contents788\def\TOCHeader{Contents}789790% explanation at the beginning of the table of contents791\def\TOCMatter{%792}793794% macros for generating the table of contents795%\newif\iffirstsec\firstsectrue796\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}797798% produce the chapter "Contents"799\outer\def\TableOfContents{\Chapter{\TOCHeader}800801\TOCMatter802\vskip 20pt803\begingroup804\rigidfalse805\let!=\space806\begindoublecolumns807\inputaux\tocin{}{toc}\vfill\eject808\enddoublecolumns809\endgroup810}811812% a one column version of \TableOfContents for short manuals813\outer\def\OneColumnTableOfContents{\Chapter{\TOCHeader}814815\TOCMatter816\vskip 20pt817\begingroup818\rigidfalse819\let!=\space820\inputaux\tocin{}{toc}\vfill\eject821\endgroup822}823824%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%825%%826%F \TitlePage{<text>} . . . . . . . . . . . . . . . . generate a title page827%%828\long\def\TitlePage#1{%829\null\vfill#1\null\vfill\eject830}831832%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%833%%834%F \Colophon{<text>} . . . . . . . . . . . . . . generate a colophon page835%%836\long\def\Colophon#1{\Chapter{}837838#1\null\vfill\eject839}840841842%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%843%%844%F \Answers . . . . . . . . . . . . . produce the answers to the exercises845%%846% header for the answers847\def\AnswersHeader{Answers to the Exercises}848%849% produce the chapter "Answers"850\def\Answers{\Chapter{\AnswersHeader}851852\parindent\manindent853\parskip 1ex plus 0.5ex minus 0.5ex854\immediate\closeout\ans855\input answers856}857858%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%859%%860%F \Bibliography . . . . . . . . . . . . produce the chapter "Bibliography"861%%862% header for the bibliography863\def\BibHeader{Bibliography}864865% produce the chapter bibliography866\def\Bibliography{\EndMatter\Chapter{\BibHeader}867868\begingroup\undoquotes\frenchspacing869\parindent\manindent870\pretolerance=5000 %badness allowed for hypenation871\tolerance=5000 %badness allowed before overfull boxes appear872\parskip 1ex plus 0.5ex minus 0.5ex873\def\begin##1##2{} \def\end##1{}874\let\newblock=\relax \let\em=\sl875\inputaux\citein{}{bbl}876\endgroup877}878879%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%880%%881%F \Index . . . . . . . . . . . . . . . . . . produce the chapter "Index"882%%883% header for the index884\def\IndexHeader{Index}885886% explanation at the beginning of the index887\def\IndexMatter{%888This index covers only this manual.889A page number in {\it italics} refers to a whole section which is devoted to890the indexed subject. Keywords are sorted with case and spaces ignored,891e.g., ```PermutationCharacter''' comes before ``permutation group''.%892}893894% kerning in full index after letter895\def\idxkern{\kern.3em}896897% produce the chapter index898\def\Index{\EndMatter%899% get the proper bookmarking function900\global\let\setbookmarkind=\indexbookmark%901\Chapter{\IndexHeader}902903\IndexMatter904\bigskip905\begindoublecolumns906\pretolerance=5000 %badness allowed for hypenation907\tolerance=5000 %badness allowed before overfull boxes appear908\parindent 0pt \parskip 0pt \rightskip 0pt plus2em \emergencystretch 2em909\everypar{\hangindent\smallmanindent}910\def\par{\endgraf\leftskip 0pt}911\def\sub{\advance\leftskip by\smallmanindent}912\def\subsub{\advance\leftskip by2\smallmanindent}913\obeylines914\inputaux\indexin{}{ind}915\enddoublecolumns916}917918% pseudo chapters used for authors, preface, copyright &c.919\def\PseudoInput#1#2#3{%920\vfill\eject% to ensure the pseudo-chapter no. doesn't get into headline921\advance\chapno by1\secno=0\subsecno=0922\immediate\write\secindout{C #1.tex \thechapter. #2}923\label{#2}\label{#3}} % we do this for the benefit of the HTML manuals924925% some often-used LaTeX functions926\def\frac#1#2{{{#1}\over{#2}}}927928% as the etalchar gets written out in manual.lab, better make it nonfancy929% (otherwise something breaks).930\def\etalchar#1{$^{#1}$}931\def\etalchar#1{#1}932933% nasty trick to cope with the `newcommand' created by bibtex934\def\newcommand#1#2#3#4#5{}935936% URL stuff937\def\URL#1{\par\kernttindent\hbox{`#1'}\ifx\EndMatter\empty\else\qquad\fi}938\def\Mailto#1{\penalty-1000\hskip 0pt plus10cm\hbox{`#1'}}939940% ragged bottom will avoid large blank spaces941\raggedbottom942\frenchspacing943\vfuzz=2pt944945946