Skip to content

Commit 6941e45

Browse files
authored
Tweaks to gapmacro.tex and etc/convert.pl (#6115)
* Remove trailing whitespace in gapmacros related files * gapmacro: indicate which labels have changed to help debug the 'Labels have changed, run again' warning * etc/convert.pl: remove 'Chapter has no sections' warning
1 parent 6c81e09 commit 6941e45

File tree

3 files changed

+218
-220
lines changed

3 files changed

+218
-220
lines changed

doc/gapmacro.tex

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -57,39 +57,39 @@
5757
%%
5858
%% The following macros can be used just after inputting gapmacro.tex to control
5959
%% the layout.
60-
%% \casesensitivetrue makes labels case sensitive (this is still experimental
60+
%% \casesensitivetrue makes labels case sensitive (this is still experimental
6161
%% and not currently supported by the html converter)
6262
%% \casesensitivefalse & (default) labels are case insensitive
6363
%%
64-
%% \addlinks (default) This inserts pdf links within the document, so
64+
%% \addlinks (default) This inserts pdf links within the document, so
6565
%% that you can click on a reference or citation. This will only work
6666
%% with pdftex, otherwise this has no effect.
6767
%%
6868
%% \nolinks This switches off additional pdf links within the document.
6969
%%
70-
%% \citebookstrue References to external books will be
71-
%% "GAP Reference Manual, 2.7.12" instead of just "2.7.12", similarly
72-
%% for the GAP tutorial. If you cite other books, you have to define
73-
%% macros \xxxManual which must expand to the text which you want to
70+
%% \citebookstrue References to external books will be
71+
%% "GAP Reference Manual, 2.7.12" instead of just "2.7.12", similarly
72+
%% for the GAP tutorial. If you cite other books, you have to define
73+
%% macros \xxxManual which must expand to the text which you want to
7474
%% be inserted before the number for package xxx (lower case).
7575
%% \citebooksfalse (default) just print the number
7676
%%
7777
%% \usepsfonts (default) use the standard Postscript fonts for typesetting
7878
%% \usecmfonts use the TeX standard fonts
7979
%%
80-
%% \biblitemfalse (default) In the bibliography, print abbreviations for
80+
%% \biblitemfalse (default) In the bibliography, print abbreviations for
8181
%% papers right-aligned (as in gapmacro.tex)
8282
%% \biblitemtrue print abbreviations left-aligned
83-
%% \bibindent (default: 3 pc) indentation used in the bibliography -
84-
%% depending
85-
%% on the abbreviations you use, you may need more (this is not very
83+
%% \bibindent (default: 3 pc) indentation used in the bibliography -
84+
%% depending
85+
%% on the abbreviations you use, you may need more (this is not very
8686
%% obvious if you use \biblitemfalse because long abbreviations will
8787
%% protrude into the left margin only, but will cause overfull hboxes
8888
%% when using \biblitemtrue
8989

9090
\input amssym.tex
9191

92-
\catcode`@=11
92+
\catcode`@=11
9393

9494
% Page dimensions and double column output.
9595
\hsize 39pc
@@ -113,7 +113,7 @@
113113
\gdef\endlink{\pdfliteral{0 0 0 rg}\pdfendlink\endgroup}%
114114
}
115115

116-
% do we run pdftex?
116+
% do we run pdftex?
117117
\ifx\pdfdest\undefined
118118
\immediate\write16{Running TeX}
119119
% no: define dummy bookmarking functions
@@ -148,7 +148,7 @@
148148
\fi
149149

150150
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151-
%
151+
%
152152
% Generic double column output.
153153
%
154154
% Modified from a routine written by Donald Knuth (The TeXBook, App. E)
@@ -244,7 +244,7 @@
244244
\font\tenbf=ptmb7t at 10pt % boldface extended
245245
\font\sevenbf=ptmb7t at 7pt
246246
\font\fivebf=ptmb7t at 5pt
247-
% additional fonts needed by gapmacro.tex
247+
% additional fonts needed by gapmacro.tex
248248
\font\tentt=cmtt10 % typewriter
249249
\font\tensl=ptmro7t at 10pt
250250
\font\tenit=ptmri7t at 10pt % text italic
@@ -256,8 +256,8 @@
256256
\font\sf=phvr7t at 10 pt
257257
\font\bsf=phvb7t at 10 pt
258258
\font\smallrom=ptmr7t at 8pt
259-
\font\sevenit=ptmri7t at 7pt
260-
\font\fiveit=ptmri7t at 5pt
259+
\font\sevenit=ptmri7t at 7pt
260+
\font\fiveit=ptmri7t at 5pt
261261
\inst@allfonts
262262
}
263263
\outer\def\usecmfonts{
@@ -290,7 +290,7 @@
290290
\font\bsf=cmssdc10
291291
\font\smallrom=cmr8
292292
\font\sevenit=cmti10 at 7pt
293-
\font\fiveit=cmti10 at 5pt
293+
\font\fiveit=cmti10 at 5pt
294294
\inst@allfonts
295295
}
296296

@@ -395,7 +395,7 @@
395395
\newif\iftestexample\global\testexampletrue
396396
\newread \labelin \newread \indexin \newread \tocin \newread \citein
397397
\countdef\chapno=1 \newcount\secno \newcount\subsecno \newcount\exno
398-
\newcount\indentno
398+
\newcount\indentno
399399
\newcount\chapnum %GG \chapnum is a numerical \chapno for the .six file
400400
\def\chapterno{{\edef\tempa{\thechapter}\tempa}}
401401
%\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else
@@ -408,14 +408,14 @@
408408
%AH
409409
\def\folio{\ifnum\pageno<0 \romannumeral-\pageno \else
410410
\number\pageno\fi}
411-
411+
412412
%\def\doindex#1#2#3{\protectedwrite\indexout{\noexpand\indexentry{#1#2#3}%
413413
% {\ifnum\pageno<0\romannumeral-\pageno\else%
414414
% \number\pageno\fi}}%
415415
% \ifvmode\nobreak\else\unskip\fi}
416416
417-
{\catcode`<=\active \catcode`_=\active \catcode`!=\active \catcode`*=\active
418-
\catcode``=\active
417+
{\catcode`<=\active \catcode`_=\active \catcode`!=\active \catcode`*=\active
418+
\catcode``=\active
419419
420420
\global\let\n@exp\noexpand
421421
@@ -442,7 +442,7 @@
442442
\catcode`*=\active \def*{\ifmmode\let\next=\*\else\let\next=\bold\fi\next}
443443
\def\bold#1*{{\bf #1\/}} \chardef\*=`*
444444
\catcode`<=\active \def<#1>{{\chardef*=`*\let_=\_\it#1\/}}
445-
445+
446446
\catcode`"=\active \def"{\begingroup\undoquotes\doref} \chardef\"=`"
447447
\chardef\\=`\\
448448
@@ -463,12 +463,12 @@
463463
\def\printbookref#1:#2:"{\printref{#1:#2}}
464464
465465
% Macros which write labels, citations and index entries on auxiliary files.
466-
%
466+
%
467467
% 1. Some code was moved around so that all the labels and indexing stuff
468468
% would be together.
469469
% 2. Modified \makelabel, \printref and \label to be more like the LaTeX
470470
% commands \newlabel, \ref and \label, respectively. The commands:
471-
% \@xp, \@firstoftwo, \@secondoftwo, \namedef, \@ifundefined
471+
% \@xp, \@firstoftwo, \@secondoftwo, \namedef, \@ifundefined
472472
% \protectedwrite are adapted pieces of LaTeX code (\@xp is actually
473473
% AmSLaTeX's abbreviation of \expandafter).
474474
% 3. The upshot of 2. is that now underscore is allowed in labels and
@@ -511,15 +511,15 @@
511511
\ifcitebooks\expandafter\csname\next Manual\endcsname,\space\fi
512512
\csname r@\xpandlowr\endcsname\fi}
513513
514-
\newif\ifnewlab
514+
\newif\ifnewlab
515515
516516
% Macros which write labels, citations and index entries on auxiliary files.
517517
\gdef\label#1{\@xplowr{#1}%
518518
\ifnum\secno=0 \edef\@currentlabel{\thechapter}\else
519519
\ifnum\subsecno=0 \edef\@currentlabel{\thechapter.\the\secno}\else
520520
\edef\@currentlabel{\thechapter.\the\secno.\the\subsecno}\fi\fi
521521
\@xp\ifx\csname r@\book:\xpandlowr\endcsname\@currentlabel\else%
522-
%\immediate\write16{Label `\book:#1' has changed.}%
522+
\immediate\write16{Label `\book:#1' has changed.}%
523523
\global\labchangedtrue\fi%
524524
\expandafter\ifx\csname pdfdest@\xpandlowr\endcsname\relax
525525
\nameddest{\xpandlowr}%
@@ -591,8 +591,8 @@
591591
\xdef\ors{\the\ortoks}\endgroup}
592592
\def\setors{{\xdef\ors{} \count0=\chapno
593593
\loop\ifnum\count0>0 \addor \advance\count0 by -1\repeat}}
594-
\def\appno#1{\expandafter\ifcase\expandafter#1\ors\or A\or B\or C\or D\or E\or
595-
F\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\or
594+
\def\appno#1{\expandafter\ifcase\expandafter#1\ors\or A\or B\or C\or D\or E\or
595+
F\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\or
596596
U\or V\or W\or X\or Y\or Z\else\immediate\write16{Counter too large} \fi}
597597
598598
% Macros for chapter and section headings.
@@ -601,7 +601,7 @@
601601
\outer\def\Input#1{\def\filename{#1.tex}\input #1}
602602
\def\emptychapter{\noexpand\tocstrut}
603603
\def\normalchapter{\the\chapno}
604-
% GG
604+
% GG
605605
\def\appendixchapter{\appno\chapno} % \appno behaves like LaTeX's \Alph
606606
\newif\ifchapter % set to true when \thechapter = \normalchapter
607607
% ... or ... when \thechapter = \appendixchapter
@@ -798,7 +798,7 @@
798798
% The date
799799
800800
\def\Today{{\Day} {\Month} {\Year}}
801-
801+
802802
% Miscellaneous macros.
803803
\def\N{{\Bbb N}} \def\Z{{\Bbb Z}} \def\Q{{\Bbb Q}} \def\R{{\Bbb R}}
804804
\def\C{{\Bbb C}} \def\F{{\Bbb F}} \def\calR{{\cal R}}
@@ -832,7 +832,7 @@
832832
%\setbox0=\vbox{\Bibliography}
833833
\endgroup
834834
\labchangedfalse
835-
835+
836836
% Open the auxiliary files for output.
837837
\immediate\openout\tocout =\jobname.toc
838838
\immediate\openout\labelout =\jobname.lab
@@ -845,18 +845,18 @@
845845
\ifodd\pageno\else\headlinefalse\null\vfill\eject\fi
846846
% \pageno=1
847847
}
848-
848+
849849
\outer\def\Chapters{\vfill\eject
850850
\chapno=0 \let\thechapter=\normalchapter \chaptertrue
851851
\def\lefthead{{\it Chapter \the\chapno. \chapname}}
852852
\def\righthead{\ifx\botmark\empty\lefthead\else{\it \botmark}\fi}}
853853
854854
% GG
855-
% Rather than reset \chapno in \Appendices, for the .six file (which GAP's
856-
% help uses), we number appendices as if they were chapters (via \the\chapno)
857-
% i.e. if the last chapter was numbered 7 then for the .six file the first
855+
% Rather than reset \chapno in \Appendices, for the .six file (which GAP's
856+
% help uses), we number appendices as if they were chapters (via \the\chapno)
857+
% i.e. if the last chapter was numbered 7 then for the .six file the first
858858
% appendix would be numbered 8.
859-
% The \setors macro puts (\number\chapno - 1) \or s in the \ors macro so that
859+
% The \setors macro puts (\number\chapno - 1) \or s in the \ors macro so that
860860
% \appno\chapno (= \appendixchapter) numbers the appendices sequentially from A
861861
% for the .lab file (which TeX uses).
862862
\outer\def\Appendices{\vfill\eject
@@ -1011,7 +1011,7 @@
10111011
\begingroup\undoquotes\frenchspacing
10121012
\parindent\bibindent
10131013
\pretolerance=5000 %badness allowed for hypenation
1014-
\tolerance=5000 %badness allowed before overfull boxes appear
1014+
\tolerance=5000 %badness allowed before overfull boxes appear
10151015
\parskip 1ex plus 0.5ex minus 0.5ex
10161016
\def\begin##1##2{} \def\end##1{}
10171017
\let\newblock=\relax \let\em=\sl
@@ -1046,7 +1046,7 @@
10461046
\bigskip
10471047
\begindoublecolumns
10481048
\pretolerance=5000 %badness allowed for hypenation
1049-
\tolerance=5000 %badness allowed before overfull boxes appear
1049+
\tolerance=5000 %badness allowed before overfull boxes appear
10501050
\parindent 0pt \parskip 0pt \rightskip 0pt plus2em \emergencystretch 2em
10511051
\everypar{\hangindent\smallmanindent}
10521052
\def\par{\endgraf\leftskip 0pt}

0 commit comments

Comments
 (0)