Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1%%2%A gapmacro.tex GAP manual Frank Celler3%A Heiko Theissen4%A Alexander Hulpke5%%6%% @(#)$Id: gapmacro.tex,v 1.2 2000/11/06 10:38:46 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%% \URL{url}50%% \Mailto{}51%%52%% \BeginningOfBook53%% \FrontMatter, \Chapters, \Appendices parts of the book54%% \Bibliography, \Index, \TableOfContents make these chapters (w/o head)55%% \EndOfBook56%%5758\input amssym.tex59%\input mymacro.tex6061% Page dimensions and double column output.62\hsize 39pc63\vsize 52pc6465% do we run pdftex?66\expandafter\ifx\csname pdfdest\endcsname\relax67\immediate\write16{Running TeX}68% no: define dummy bookmarking functions69\global\def\bookmarkdestin#1{}70\global\def\setbookmarkind#1#2{}71\global\def\setbookmark#1#2{}72\global\def\indexbookmark#1#2{}73\else74\immediate\write16{Running PDFTeX}75% yes: define macros to do pdf stuff and set some parameters76\global\def\bookmarkdestin#1{\pdfdest name {#1} xyz}77\global\def\setbookmarkind#1#2{%78\setindent{\chapterlen{\the\chapno}}79\pdfoutline goto name {#1} count -\indentno {#2}}80\global\def\setbookmark#1#2{%81\setindent{\chapterlen{\the\chapno}}82\pdfoutline goto name {#1} count 0 {#2}}83% special treatment for the index to get proper indention84\global\def\indexbookmark#1#2{%85\pdfoutline goto name {#1} count -27 {#2}}86\pdfinfo{87/Subject (GAP Manual)88/Author (The GAP Group)89}90\pdfcatalog{91/URI (http://www-gap.dcs.st-and.ac.uk)92/PageMode /UseOutlines}93\pdfcompresslevel 994\fi9596%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%97%98% Generic double column output.99%100% Modified from a routine written by Donald Knuth (The TeXBook, App. E)101%102%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%103%104% The user may modify the following to his tastes:105%106% \pagewidth vertical length of page.107% \pageheight horizontal width of page.108% \colwidth column width109% \separator macro to generate column separator. Default is nothing.110% \rulesep sets it to \vrule. \norulesep doesn't.111% \makepage default is what is contained in plain.112\catcode`@=11 % from plain.tex113% Create and initialize new dimensions.114\newdimen\pagewidth \newdimen\pageheight \newdimen\colwidth115\pagewidth=\hsize \pageheight=\vsize \colwidth=3.2truein116117\def\draft{\hsize 42pc\vsize 63pc\pagewidth=\hsize \pageheight=\vsize}118119\def\pif{\char39}120121% This routine is used by \output ; this is different from122% the one found in App. E.123\def\onepageout#1{{\setbox255=\vbox{#1}124\hsize=\pagewidth \vsize=\pageheight \plainoutput}}125\def\normaloutput{\onepageout{\unvbox255}}126\maxdeadcycles=100 % \output is called quite often127128\output={\normaloutput}129\newbox\partialpage \newdimen\origvsize \newif\ifrigid130\def\begindoublecolumns{\global\origvsize=\vsize \begingroup131\output={\global\setbox\partialpage=\vbox{\unvbox255\kern0pt}}\eject132\output={\doublecolumnout} \hsize=\colwidth \dimen@=\pageheight133\advance\dimen@ by-\ht\partialpage \multiply\dimen@ by2134\ifdim\dimen@<2\baselineskip \dimen@=2\baselineskip\fi135\vsize=\dimen@}136\def\enddoublecolumns{\output={\balancecolumns}\eject137\endgroup \global\vsize=\origvsize \pagegoal=\vsize}138\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth139\setbox0=\vsplit255 to.5\vsize \setbox2=\vsplit255 to.5\vsize140%\setbox0=\vbox{A\unvbox0B\vfill}\setbox2=\vbox{C\unvbox2D\vfill}%141\onepageout\pagesofar \global\vsize=2\pageheight142\unvbox255 \penalty\outputpenalty}143\def\pagesofar{\unvbox\partialpage144\wd0=\hsize \wd2=\hsize145%\hbox to\pagewidth{\box0\hfil\separator\hfil\box2}}146\hbox to\pagewidth{\valign{##\vfill\cr%147\vbox{\unvbox0}\cr\noalign{\hfil\separator\hfil}\vbox{\unvbox2}\cr}}}148\def\norulesep{\let\separator=\relax}149\def\rulesep{\let\separator=\vrule}150\let\separator=\relax151\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen@=\ht0152\advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip153\divide\dimen@ by2 \splittopskip=\topskip154{\vbadness=10000 \loop \global\setbox3=\copy0155\global\setbox1=\vsplit3 to\dimen@156\ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}157\ifrigid158\setbox0=\vtop{\unvbox1}159\setbox2=\vtop{\unvbox3}160\else161\setbox0=\vbox to\dimen@{\unvbox1}162\setbox2=\vbox to\dimen@{\dimen2=\dp3 \unvbox3\kern-\dimen2 \vfil}163\fi164\global\vsize=\origvsize \pagesofar}165\catcode`@=12166%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%167168\colwidth 19pc169\newdimen\manindent \manindent 3pc170\newdimen\smallmanindent \smallmanindent 1pc171\parskip 1ex plus 0.5ex minus 0.5ex172\parindent 0pt173174% Additional fonts.175\font\inchhigh=cminch176\font\titlefont=cmssdc10 at 40pt177\font\secfont=cmssdc10 at 14pt178\font\sf=cmss10179\font\bsf=cmssdc10180\font\smallrom=cmr8181\font\sevenit=cmti10 at 7pt \scriptfont\itfam=\sevenit182\font\fiveit=cmti10 at 5pt \scriptscriptfont\itfam=\fiveit183184% If you don't have `msb' fonts, replace the next 4 lines by `\let\Bbb=\bf'.185\newfam\msbfam \def\Bbb{\fam\msbfam}186\font\tenmsb=msbm10 \textfont\msbfam=\tenmsb187\font\sevenmsb=msbm7 \scriptfont\msbfam=\sevenmsb188\font\fivemsb=msbm5 \scriptscriptfont\msbfam=\fivemsb189\font\sevenmsa=msam7190191% the dark triangle192\def\darktriangleright{\raise.4ex\hbox{\sevenmsa\char"49}}193194% Math mode should use text italic.195{\count0=\itfam \advance\count0 by-1 \multiply\count0 by"100196\count1=`A197\loop \count2=\mathcode\count1 \advance\count2 by\count0198\global\mathcode\count1=\count2199{\advance\count1 by'040200\count2=\mathcode\count1 \advance\count2 by\count0201\global\mathcode\count1=\count2}202\ifnum\count1<`Z \advance\count1 by1\repeat}203204% macros for verbatim scanning (almost copied from `The TeXbook')205\chardef\other=12206\def\undocatcodespecials{\catcode`\\=\other \catcode`\{=\other207\catcode`\}=\other \catcode`\<=\other \catcode`\$=\other208\catcode`\%=\other \catcode`\~=\other \catcode`\^=\other209\catcode`\_=\other \catcode`\*=\other \catcode`\`=\other210\catcode`\!=\other \catcode`\"=\other \catcode`\&=\other211\catcode`\#=\other \catcode`\|=\other}212\def\ttindent{5mm} % indentation amount of verbatim examples213{\obeyspaces\global\let =\ }214{\obeylines\gdef\obeylines{\catcode`^^M=\active}\gdef^^M{\par}%215\catcode`#=\active \catcode`&=6 \gdef#{\char35}%216%\catcode`#=\active \catcode`&=6 \gdef#&1^^M{\hbox{\char35 &1}^^M}%217\gdef\ttverbatim{\begingroup\undocatcodespecials \catcode`\#=\active%218\parindent 0pt \def\_^^M{\allowbreak}\def\${$}\def\`{`}%219\def\par{\ifvmode\allowbreak\vskip 1pc plus 1pt\else\endgraf\penalty100\relax\fi}%220\obeyspaces \obeylines \tt}}221\outer\def\begintt{\par222\begingroup\advance\leftskip by \ttindent223\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \ttfinish}224{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character225|obeylines % end of line is active226|gdef||{|char124} %227|gdef|ttfinish#1^^M#2\endtt{#1|medskip{#2}|endgroup %228|endgroup%229|vskip-|parskip|medskip|noindent|ignorespaces}}230\outer\def\beginexample{\par231\begingroup\advance\leftskip by \ttindent232\ttverbatim \parskip=0pt \catcode`\|=0 \rightskip-5pc \examplefinish}233{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character234|obeylines % end of line is active235|gdef||{|char124} %236|gdef|examplefinish#1^^M#2\endexample{#1|medskip{#2}|endgroup %237|endgroup%238|vskip-|parskip|medskip|noindent|ignorespaces}}239240% Input/output streams. Chapter and section counters.241\newwrite\labelout \newwrite\indexout \newwrite\secindout242\newwrite\tocout \newwrite\citeout \newwrite\ans243\newread \labelin \newread \indexin \newread \tocin \newread \citein244\countdef\chapno=1 \newcount\secno \newcount\subsecno \newcount\exno245\newcount\indentno246\def\chapterno{{\edef\tempa{\thechapter}\tempa}}247%\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else248% \chapterno\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}249%\def\doindex#1#2#3{\write\indexout{\noexpand\indexentry{#1#2#3}%250% {\ifnum\pageno<0 \romannumeral-\pageno \else251% \thechapter\ifx\thechapter\emptychapter\else--\fi \number\pageno\fi}}%252% \ifvmode\nobreak\fi}253254%AH255\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else256\number\pageno\fi}257\def\doindex#1#2#3{\write\indexout{\noexpand\indexentry{#1#2#3}%258{\ifnum\pageno<0 \romannumeral-\pageno \else259\number\pageno\fi}}%260\ifvmode\nobreak\fi}261262% Additional active characters and their default meanings.263\mathcode`.="2201 \mathchardef\.="702E264\def\undoquotes{\catcode`'=12 \catcode``=12 \def\"##1{{\accent127 ##1}}}265\def\excl{!} \chardef\lqq=`\\ \let\underscore=\_266\catcode`!=\active \let!=\excl267\catcode`^=\active \def^{\ifmmode\sp\else{\char`\^}\fi}268\catcode`_=\active \def_{\ifmmode\sb\else\_\fi} \let\_=\underscore269\catcode`*=\active \def*{\ifmmode\let\next=\*\else\let\next=\bold\fi\next}270\def\bold#1*{{\bf #1\/}} \chardef\*=`*271\catcode`<=\active \def<#1>{{\chardef*=`*\let_=\_\it#1\/}}272\chardef\<=`<273\catcode`"=\active \def"{\begingroup\undoquotes\doref} \chardef\"=`"274\chardef\\=`\\275276% Labels (which are automatically generated by ``\Section'' and ``\>'').277\newif\iflabundef278\def\doref#1"{\bookref#1:"}279\def\bookref#1:#2"{\def\tempa{#2}\ifx\tempa\empty\printref{\book:#1}\else280\printbookref#1:#2"\fi}281\def\printbookref#1:#2:"{\printref{#1:#2}}282283284{\catcode`@=11%285%286\gdef\makelabel#1#2{\expandafter\gdef\csname r@#1\endcsname{#2}}287\gdef\printref#1{%288\let\next=\relax%289\expandafter\edef\next{\def\noexpand\xpandlowr{#1}}%290\lowercase\expandafter{\next}%291\expandafter\ifx\csname r@\xpandlowr\endcsname\relax\lqq\xpandlowr''%292\immediate\write16{Label `#1' undefined.}\global\labundeftrue%293\else \csname r@\xpandlowr\endcsname \fi\endgroup}294}295296% Macros for generating the table of contents.297\newif\iffirstsec \firstsectrue298\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}299300\def\appcontents#1#2#3{}301302\def\chapcontents#1#2#3{%303%\iffirstsec\firstsecfalse\else\line{}\fi% empty line304\par\penalty-5\medskip305\line{\bf\kern\manindent\vbox{\advance\hsize by-\manindent306\advance\hsize by-1.5em307\rightskip 0pt plus1fil \emergencystretch 3em308\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut309#2~\hfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}310311\def\seccontents#1#2#3{312\par\penalty-5\medskip313\setchapterlen#1.314\line{\kern\manindent\vbox{\advance\hsize by-\manindent315\advance\hsize by-1.5em316\rightskip 0pt plus1fil \emergencystretch 3em317\noindent\llap{\hbox to\manindent{\hss #1\kern\smallmanindent}}\strut318#2~\dotsfill \strut\rlap{\hbox to1.5em{\hss #3}}}\hfil}}319320\def\appno#1{{\count0=#1\advance\count0 by64 \char\count0}}321322% Macros which write labels, citations and index entries on auxiliary files.323\newif\iflabchanged324{\catcode`|=0 \catcode`\\=12 |gdef|bs{\}}325{\catcode`@=11326\gdef\label#1{{\catcode`_=11\def_{X}327{\let\next=\relax328\expandafter\edef\next{\def\noexpand\xpandlowr{#1}}329\lowercase\expandafter{\next}330\ifnum\secno=0 \edef\next{\the\chapno}\else331\ifnum\subsecno=0 \edef\next{\the\chapno.\the\secno}\else332\edef\next{\the\chapno.\the\secno.\the\subsecno}\fi333\expandafter\ifx\csname r@\book:\xpandlowr\endcsname\next\else334%\immediate\write16{Label `\book:#1' has changed.}335\global\labchangedtrue\fi\fi336\immediate\write\labelout{\noexpand\makelabel{\book:\xpandlowr}{\next}}}}}337338339\gdef\sigel#1{[\expandafter\ifx\csname c@#1\endcsname\relax340\immediate\write16{Reference `#1' undefined.}\global\labundeftrue341#1\else \csname c@#1\endcsname\fi]}342\gdef\bibitem[#1]#2{\expandafter\gdef\csname c@#2\endcsname{#1}%343\item{\sigel{#2}}344\immediate\write\labelout{\noexpand\setcitlab{#2}\noexpand{#1}}}345\gdef\setcitlab#1#2{\expandafter\gdef\csname c@#1\endcsname{#2}}}346\def\cite#1{\write\citeout{\bs citation{#1}}\sigel{#1}}347\def\dosecindex#1#2#3{\ifx\thechapter\normalchapter{\let\ =\space348\immediate\write\secindout{#1 \thechapter.\the\secno. #2#3}}\fi}349\def\bothindex#1#2#3#4{\doindex{#2}{#3}{#4}\dosecindex{#1}{#2}{#4}}350\def\index#1{\bothindex I{#1}{}{}}351\def\atindex#1#2{\bothindex I{#1}{#2}{}}352\def\indextt#1{\atindex{#1}{@`#1'}}353\def\indexit#1{{\it #1}}354355% Macros for chapter and section headings.356\def\filename{appendix}357\def\tocstrut{{\setbox0=\hbox{1}\vrule width 0pt height\ht0}}358\outer\def\Input#1{\def\filename{#1.tex}\input #1}359\def\emptychapter{\noexpand\tocstrut}360\def\normalchapter{\the\chapno}361362{\catcode`@=11%363%364\gdef\setchapterlen#1.#2.{\expandafter\gdef\csname ch@#1\endcsname{#2}}365\gdef\chapterlen#1{%366\ifx\thechapter\normalchapter367\expandafter\ifx\csname ch@#1\endcsname\relax%3680%369\else\csname ch@#1\endcsname\fi370\else 0\fi}%371}372\def\setindent#1{\indentno=#1}373374375\def\Chapter#1 \par{\vfill\supereject \headlinefalse376% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi377\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi378\bookmarkdestin{#1}379\def\chapname{#1} \label{#1}380\immediate\write16{Chapter `#1' .}%381\write\tocout{\noexpand\chapcontents{\thechapter}{#1}{\the\pageno}}382\ifx\thechapter\normalchapter383\immediate\write\secindout{C \filename\space\thechapter. \chapname}384\fi385\setbookmarkind{#1}{#1}386\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}387\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em388% \hyphenpenalty=10000 \linepenalty=10000389\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1}390\line{\box0\hfil\box1}\nobreak \mark{}\vskip 40pt}391392% start hack added by TB393\def\PreliminaryChapter#1 \par{\vfill\supereject \headlinefalse394% \ifodd\pageno\else\null\vfill\eject\headlinefalse\fi395\advance\chapno by1 \secno=0\subsecno=0\exno=0%\ifnum\pageno>0 \pageno=1 \fi396\bookmarkdestin{#1}397\def\chapname{#1 (preliminary)} \label{#1}398\write\tocout{\noexpand\chapcontents{\thechapter}{#1 (preliminary)}{\the\pageno}}399\ifx\thechapter\normalchapter400\immediate\write\secindout{C \filename\space\thechapter. \chapname}\fi401\setbookmarkind{#1}{#1}402\setbox0=\hbox{\inchhigh\kern-.075em \chapterno}403\setbox1=\vbox{\titlefont \advance\hsize by-\wd0 \advance\hsize by-1em404% \hyphenpenalty=10000 \linepenalty=10000405\leftskip 0pt plus\hsize \parfillskip 0pt \baselineskip 44pt\relax #1 (preliminary)}406\line{\box0\hfil\box1}\nobreak \mark{}\vskip 40pt}407% end hack added by TB408409\outer\def\Section#1#2\par{\bigbreak \advance\secno by1410\subsecno=0411\ifx\thechapter\emptychapter412\edef\tempa{\the\secno}413\else414\edef\tempa{\thechapter.\the\secno}%415\fi%416\bookmarkdestin{\tempa}417\setbookmark{\tempa}{#1}418\expandafter\writesecline\tempa\\{#1}419\dosecindex S{#1}{}{\let\ =\space\label{#1}}420\ifx#2\null\else \edef\tempb{{#1@#1}}421\expandafter\doindex\tempb{|indexit}{}\fi422\noindent{\baselineskip 18pt\let!=\space \mark{Section \the\secno. #1}%423\secfont \tempa \enspace #1}\par\nobreak\medskip}424425\def\writesecline#1\\#2{\write\tocout{\noexpand\seccontents{#1}{#2}426{\the\pageno}}}427\def\letter#1{\medskip{\secfont #1}\endgraf\nobreak%428\edef\tempa{LeTtEr#1}%429\bookmarkdestin{\tempa}%430\setbookmark{\tempa}{#1}%431}432433% Macros for generating paragraph headings (e.g., function descriptions).434\def\fmark{\noindent\llap{\darktriangleright\rm\enspace}}435\def\moveup#1{\leavevmode \raise.16ex\hbox{\rm #1}}436\def\fpar{\endgraf\endgroup\nobreak\smallskip\noindent\ignorespaces}437\def\>{\begingroup\undoquotes\obeylines\angle}438\def\){\begingroup\obeylines\cloparen}439{\obeylines440\gdef\angle#1441{\endgroup \ifx\par\fpar \global\def\susemarker{\fmark}\else%442\global\advance\subsecno by1%443\global\def\susemarker{\noindent\llap{\smallrom\the\subsecno\kern.5ex%444\darktriangleright\rm\enspace}}%445\ifvmode \vskip -\lastskip \fi \medskip%446\begingroup\let\par=\fpar \parskip 0pt \fi%447\endgraf\nobreak\oporfunc#1\end}%448\gdef\cloparen#1449{\endgroup \ifx\par\fpar \else%450\ifvmode \vskip -\lastskip \fi \medskip%451\begingroup\let\par=\fpar \parskip 0pt \fi%452\endgraf{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}\def\|{\vrule\relax}%453\noindent\typewriter#1'}}%454\gdef\scanparen#1(#2\end{\def\tempa{#2}\ifx\tempa\empty%455\def\next{\begingroup\cloparen\susemarker#1456\label{#1}\bothindex F{#1}{@`#1'}{}}%457\else\def\next{\delparen#1(#2\end}\fi \next}}458\def\delparen#1(\end{\function#1}459\def\oporfunc#1#2\end{\ifx#1`\def\next{\operation#1#2}\else460\def\next{\scanparen#1#2(\end}\fi \next}461\long\def\operation`#1'#2#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%462\def\|{\vrule\relax}}463\susemarker\typewriter#1'%464\ifx#3!\def\next{\suboperation{#2}}465\else\ifx#3@\def\next{\subatoperation{#2}}466\else\endheaderline \label{#2}%467\bothindex F{#2}{}{}\let\next=#3\fi\fi\next}468\long\def\function#1(#2)#3{{\def\[{\moveup\lbrack}\def\]{\moveup\rbrack}%469\def\|{\vrule\relax}470\susemarker\typewriter#1(#2)'}%471\ifx#3!\def\next{\subfunction{#1}}\else472\endheaderline\label{#1}\bothindex F{#1}{@`#1'}{}%473\let\next=#3\fi\next}474\def\subfunction#1#2{\endheaderline\label{#1!#2}%475\bothindex F{#1}{@`#1'}{!#2}}476\def\suboperation#1#2{\endheaderline\label{#1!#2}%477\bothindex F{#1}{}{!#2}}478\def\subatoperation#1#2{\endheaderline\label{#1}%479\bothindex F{#1}{@#2}{}}480481\def\endheaderline{\hskip 0pt plus 1filll}482483% Macro for item lists.484\catcode`&=\active485\def\beginitems{%486\smallskip487\begingroup488\def&{\par \nobreak \hangindent\manindent \hangafter 0489{\parskip 0pt\noindent}\ignorespaces}490\parindent 0pt491\catcode`&=\active492}493\def\enditems{\par \endgroup \smallskip \noindent \ignorespaces}494495% Macro for item lists.496\def\beginlist{%497\smallskip498\begingroup499\parindent=2em500}501\def\endlist{\par \endgroup \smallskip \noindent \ignorespaces}502\catcode`&=4503504% Macros for exercises.505\outer\def\exercise{\advance\exno by1\begingroup506\def\par{\endgraf\endgroup\medskip\noindent}507\medskip\noindent{\bf Exercise \chapterno.\the\exno.}\quad}508\outer\def\answer{\immediate\write\ans{}%509\immediate\write\ans{\noexpand\answerto{\thechapter.\the\exno.}}%510\copytoblankline}511\def\answerto#1{{\noindent\bf #1}}512\def\copytoblankline{\begingroup\setupcopy\copyans}513{\undoquotes514\gdef\setupcopy{\undocatcodespecials \obeylines \obeyspaces}515\obeylines \gdef\copyans#1516{\def\next{#1}%517\ifx\next\empty\let\next=\endgroup %518\else\immediate\write\ans{\next}\let\next=\copyans\fi\next}}519520% Macros for the active backquote character (`).521{\catcode`.=\active \gdef.{\char'056 \penalty0}}522\def\writetyper{\catcode`.=\active \chardef\{ =`{ \chardef\}=`}523\chardef*=`* \chardef"=`" \chardef~=`~}524\catcode``=\active525\def`{\futurelet\next\backquote}526\def\typewriter#1'{\leavevmode{\writetyper \chardef`=96 \tt #1}}527\def\backquote{\ifx\next`\let\next=\doublebackquote528\else\let\next=\typewriter \fi \next}529\def\doublebackquote`{\lqq}530531% Miscellaneous macros.532\def\GAP{{\sf GAP}}533\def\MOC{{\sf MOC}}534\def\ATLAS{{\sf ATLAS}}535\def\N{{\Bbb N}} \def\Z{{\Bbb Z}} \def\Q{{\Bbb Q}} \def\R{{\Bbb R}}536\def\C{{\Bbb C}} \def\F{{\Bbb F}}537538%T do we want these539%\def\stars{\bigskip\centerline{\*\qquad\*\qquad\*}\bigskip}540541% Page numbers and running heads.542\newif\ifheadline543\nopagenumbers544\def\makeheadline{\vbox to0pt{\vskip-22.5pt\hbox to\pagewidth{\vbox to8.5pt545{}\the\headline}\vss}\nointerlineskip}546\headline={\ifheadline\ifodd\pageno \righthead\hfil{\rm\folio}\else547{\rm\folio}\hfil\lefthead \fi548\else\global\headlinetrue \hfil\fi}549550% Macro for inputting an auxiliary file.551\def\inputaux#1#2#3{\immediate\openin#1=#2\jobname.#3552\ifeof#1\immediate\write16{No file #2\jobname.#3.}\else553\immediate\closein#1 \input#2\jobname.#3 \fi}554555% Macros for the parts of the manual.556\outer\def\FrontMatter{%557\let\thechapter=\emptychapter558\def\lefthead{\it\chapname} \let\righthead=\lefthead559560\begingroup561\undoquotes562\inputaux\labelin{}{lab}563%\setbox0=\vbox{\Bibliography}564\endgroup565\labchangedfalse566567% Open the auxiliary files for output.568\immediate\openout\tocout =\jobname.toc569\immediate\openout\labelout =\jobname.lab570\immediate\openout\indexout =\jobname.idx571\immediate\openout\secindout=\jobname.six572\immediate\openout\citeout =\jobname.aux573% \immediate\openout\ans=answers574\immediate\write\citeout{\bs bibstyle{alpha}}575576\ifodd\pageno\else\headlinefalse\null\vfill\eject\fi577% \pageno=1578}579580\outer\def\Chapters{\vfill\eject581\chapno=0 \let\thechapter=\normalchapter582\def\lefthead{{\it Chapter \the\chapno. \chapname}}583\def\righthead{\ifx\botmark\empty\lefthead\else{\it \botmark}\fi}}584585\outer\def\Appendices{\vfill\eject586\def\filename{appendix}587\chapno=0 \def\thechapter{}% was: {\noexpand\appno{\the\chapno}}588%\def\lefthead{{\it Appendix \appno{\the\chapno}. \chapname}}589\def\lefthead{{\it \chapname}}590\let\righthead=\lefthead}591592593%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%594%%595%F \BeginningOfBook . . . . . . . . . . . . . . . . . . . . start the book596%%597\def\BeginningOfBook#1{%598\def\book{#1}%599\pageno=-1%600\pageno=1%601\headlinefalse%602\let\thechapter=\emptychapter%603\def\lefthead{\it\chapname}%604\let\righthead=\lefthead%605}606%607%608%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%609%%610%F \UseReferences{<book-path>} . . . use references from book in <book-path>611%%612\def\UseReferences#1{{\undoquotes613\inputaux\labelin{#1/}{lab}}614}615%616%617%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%618%%619%F \EndOfBook . . . . . . . . . . . . . . . . . . . . . . . . end the book620%%621\def\EndOfBook{\vfill\supereject622\immediate\write16{##}623\immediate\closeout\citeout624\immediate\write16{## Citations for BibTeX written on \jobname.aux.}625\immediate\closeout\indexout626\immediate\write16{## Index entries for makeindex written on \jobname.idx.}627\immediate\closeout\secindout628\immediate\write16{## Section index entries written on \jobname.six.}629\immediate\closeout\labelout630\immediate\write16{## Label definitions written on \jobname.lab.}631\immediate\closeout\tocout632\immediate\write16{## Table of contents written on \jobname.toc.}633\iflabundef\immediate\write16{## There were undefined labels or634references.}\fi635\iflabchanged\immediate\write16{## Labels have changed, run again. (Or636they were multiply defined.)}\fi637\immediate\write16{##}638\end639}640%641%642%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%643%%644%F \TableOfContents . . . . . . . . . . . . . . produce a table of contents645%%646% name of the chapter containing the table of contents647\def\TOCHeader{Contents}648649% explanation at the beginning of the table of contents650\def\TOCMatter{%651}652653% macros for generating the table of contents654%\newif\iffirstsec\firstsectrue655\def\dotsfill{\leaders\hbox to12pt{\hss.\hss}\hfill}656657% produce the chapter "Contents"658\outer\def\TableOfContents{\Chapter{\TOCHeader}659660\TOCMatter661\vskip 20pt662\begingroup663\rigidfalse664\let!=\space665\begindoublecolumns666\inputaux\tocin{}{toc}\vfill\eject667\enddoublecolumns668\endgroup669}670671%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%672%%673%F \TitlePage{<text>} . . . . . . . . . . . . . . . . generate a title page674%%675\long\def\TitlePage#1{%676\null\vfill#1\null\vfill\eject677}678679%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%680%%681%F \Colophon{<text>} . . . . . . . . . . . . . . generate a colophon page682%%683\long\def\Colophon#1{\Chapter{}684685#1\null\vfill\eject686}687688689%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%690%%691%F \Answers . . . . . . . . . . . . . produce the answers to the exercises692%%693% header for the answers694\def\AnswersHeader{Answers to the Exercises}695%696% produce the chapter "Answers"697\def\Answers{\Chapter{\AnswersHeader}698699\parindent\manindent700\parskip 1ex plus 0.5ex minus 0.5ex701\immediate\closeout\ans702\input answers703}704705%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%706%%707%F \Bibliography . . . . . . . . . . . . produce the chapter "Bibliography"708%%709% header for the bibliography710\def\BibHeader{Bibliography}711712% produce the chapter bibliography713\def\Bibliography{\Chapter{\BibHeader}714715\begingroup\undoquotes\frenchspacing716\parindent\manindent717\parskip 1ex plus 0.5ex minus 0.5ex718\def\begin##1##2{} \def\end##1{}719\let\newblock=\relax \let\em=\sl720\inputaux\citein{}{bbl}721\endgroup722}723724%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%725%%726%F \Index . . . . . . . . . . . . . . . . . . produce the chapter "Index"727%%728% header for the index729\def\IndexHeader{Index}730731% explanation at the beginning of the index732\def\IndexMatter{%733This index covers only this manual.734A page number in {\it italics} refers to a whole section which is devoted to735the indexed subject. Keywords are sorted with case and spaces ignored,736e.g., ```PermutationCharacter''' comes before ``permutation group''.%737}738739% kerning in full index after letter740\def\idxkern{\kern.3em}741742% produce the chapter index743\def\Index{%744% get the proper bookmarking function745\global\let\setbookmarkind=\indexbookmark%746\Chapter{\IndexHeader}747748\IndexMatter749\bigskip750\begindoublecolumns751\parindent 0pt \parskip 0pt \rightskip 0pt plus2em \emergencystretch 2em752\everypar{\hangindent\smallmanindent}753\def\par{\endgraf\leftskip 0pt}754\def\sub{\advance\leftskip by\smallmanindent}755\def\subsub{\advance\leftskip by2\smallmanindent}756\obeylines757\inputaux\indexin{}{ind}758\enddoublecolumns759}760761% pseudo chapters used for authors, preface, copyright &c.762\def\PseudoInput#1#2{%763\advance\chapno by1\secno=0\subsecno=0764\immediate\write\secindout{C #1.tex \thechapter. #2}}765766% some often-used LaTeX functions767\def\frac#1#2{{{#1}\over{#2}}}768769% as the etalchar gets written out in manual.lab, better make it nonfancy770% (otherwise something breaks).771\def\etalchar#1{#1}772773% nasty trick to cope with the `newcommand' created by bibtex774\def\newcommand#1#2#3#4#5{}775776% URL stuff777\def\URL#1{\par\quad\hbox{`#1'}\qquad}778\def\Mailto#1{\penalty-1000\hskip 0pt plus10cm\hbox{`#1'}}779780% ragged bottom will avoid large blank spaces781\raggedbottom782\frenchspacing783\vfuzz=2pt784785786