3
3
% Load plain if necessary, i.e., if running under initex.
4
4
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
6
\def\texinfoversion{2004-11-25.16}
6
\def\texinfoversion{2005-07-05.19}
8
8
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
9
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
12
12
% This texinfo.tex file is free software; you can redistribute it and/or
22
22
% You should have received a copy of the GNU General Public License
23
23
% along with this texinfo.tex file; see the file COPYING. If not, write
24
% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25
% Boston, MA 02111-1307, USA.
24
% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25
% Boston, MA 02110-1301, USA.
27
27
% As a special exception, when this file is read by TeX when processing
28
28
% a Texinfo source document, you may use the result without
302
310
% take effect in \write's, yet the group defined by the \vbox ends
303
311
% before the \shipout runs.
305
\escapechar = `\\ % use backslash in output files.
306
313
\indexdummies % don't expand commands in the output.
307
\normalturnoffactive % \ in index entries must not stay \, e.g., if
308
% the page break happens to be in the middle of an example.
310
315
% Do this early so pdf references go to the beginning of the page.
311
316
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
568
573
% Definitions to produce \{ and \} commands for indices,
569
% and @{ and @} for the aux file.
574
% and @{ and @} for the aux/toc files.
570
575
\catcode`\{ = \other \catcode`\} = \other
571
576
\catcode`\[ = 1 \catcode`\] = 2
572
577
\catcode`\! = 0 \catcode`\\ = \other
647
652
\let\/=\allowbreak
649
654
% @. is an end-of-sentence period.
650
\def\.{.\spacefactor=3000 }
655
\def\.{.\spacefactor=\endofsentencespacefactor\space}
652
657
% @! is an end-of-sentence bang.
653
\def\!{!\spacefactor=3000 }
658
\def\!{!\spacefactor=\endofsentencespacefactor\space}
655
660
% @? is an end-of-sentence query.
656
\def\?{?\spacefactor=3000 }
661
\def\?{?\spacefactor=\endofsentencespacefactor\space}
663
% @frenchspacing on|off says whether to put extra space after punctuation.
668
\parseargdef\frenchspacing{%
670
\ifx\temp\onword \plainfrenchspacing
671
\else\ifx\temp\offword \plainnonfrenchspacing
674
\errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
658
678
% @w prevents a word break. Without the \leavevmode, @w at the
659
679
% beginning of a paragraph, when TeX is still in vertical mode, would
1200
% PDF uses PostScript string constants for the names of xref targets, to
1201
% for display in the outlines, and in other places. Thus, we have to
1202
% double any backslashes. Otherwise, a name like "\node" will be
1203
% interpreted as a newline (\n), followed by o, d, e. Not good.
1204
% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
1205
% (and related messages, the final outcome is that it is up to the TeX
1206
% user to double the backslashes and otherwise make the string valid, so
1209
% double active backslashes.
1211
{\catcode`\@=0 \catcode`\\=\active
1212
@gdef@activebackslash{@catcode`@\=@active @otherbackslash}
1213
@gdef@activebackslashdouble{%
1214
@catcode@backChar=@active
1215
@let\=@doublebackslash}
1218
% To handle parens, we must adopt a different approach, since parens are
1219
% not active characters. hyperref.dtx (which has the same problem as
1220
% us) handles it with this amazing macro to replace tokens. I've
1221
% tinkered with it a little for texinfo, but it's definitely from there.
1223
% #1 is the tokens to replace.
1224
% #2 is the replacement.
1225
% #3 is the control sequence with the string.
1227
\def\HyPsdSubst#1#2#3{%
1228
\def\HyPsdReplace##1#1##2\END{%
1234
\HyPsdReplace##2\END
1238
\xdef#3{\expandafter\HyPsdReplace#3#1\END}%
1240
\long\def\HyReturnAfterFi#1\fi{\fi#1}
1242
% #1 is a control sequence in which to do the replacements.
1243
\def\backslashparens#1{%
1244
\xdef#1{#1}% redefine it as its expansion; the definition is simply
1245
% \lastnode when called from \setref -> \pdfmkdest.
1246
\HyPsdSubst{(}{\backslashlparen}{#1}%
1247
\HyPsdSubst{)}{\backslashrparen}{#1}%
1250
{\catcode\exclamChar = 0 \catcode\backChar = \other
1251
!gdef!backslashlparen{\(}%
1252
!gdef!backslashrparen{\)}%
1181
1256
\input pdfcolor
1182
1257
\pdfcatalog{/PageMode /UseOutlines}%
1201
1276
\pdfrefximage \pdflastximage
1203
1278
\def\pdfmkdest#1{{%
1204
% We have to set dummies so commands such as @code in a section title
1279
% We have to set dummies so commands such as @code, and characters
1280
% such as \, aren't expanded when present in a section title.
1207
\normalturnoffactive
1208
\pdfdest name{#1} xyz%
1282
\activebackslashdouble
1283
\def\pdfdestname{#1}%
1284
\backslashparens\pdfdestname
1285
\pdfdest name{\pdfdestname} xyz%
1288
% used to mark target names; must be expandable.
1289
\def\pdfmkpgn#1{#1}%
1211
1291
\let\linkcolor = \Blue % was Cyan, but that seems light?
1212
1292
\def\endlink{\Black\pdfendlink}
1213
1293
% Adding outlines to PDF; macros for calculating structure of outlines
1218
1298
\advance\tempnum by 1
1219
1299
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1221
% #1 is the section text. #2 is the pdf expression for the number
1222
% of subentries (or empty, for subsubsections). #3 is the node
1223
% text, which might be empty if this toc entry had no
1224
% corresponding node. #4 is the page number.
1301
% #1 is the section text, which is what will be displayed in the
1302
% outline by the pdf viewer. #2 is the pdf expression for the number
1303
% of subentries (or empty, for subsubsections). #3 is the node text,
1304
% which might be empty if this toc entry had no corresponding node.
1305
% #4 is the page number
1226
1307
\def\dopdfoutline#1#2#3#4{%
1227
1308
% Generate a link to the node text if that exists; else, use the
1228
1309
% page number. We could generate a destination for the section
1229
1310
% text in the case where a section has no node, but it doesn't
1230
% seem worthwhile, since most documents are normally structured.
1311
% seem worth the trouble, since most documents are normally structured.
1231
1312
\def\pdfoutlinedest{#3}%
1232
\ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
1234
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
1313
\ifx\pdfoutlinedest\empty
1314
\def\pdfoutlinedest{#4}%
1316
% Doubled backslashes in the name.
1317
{\activebackslashdouble \xdef\pdfoutlinedest{#3}%
1318
\backslashparens\pdfoutlinedest}%
1321
% Also double the backslashes in the display string.
1322
{\activebackslashdouble \xdef\pdfoutlinetext{#1}%
1323
\backslashparens\pdfoutlinetext}%
1325
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1237
1328
\def\pdfmakeoutlines{%
1298
1389
% their "best" equivalent, based on the @documentencoding. Right
1299
1390
% now, I guess we'll just let the pdf reader have its way.
1302
1394
\input \jobname.toc
1306
\def\makelinks #1,{%
1307
\def\params{#1}\def\E{END}%
1309
\let\nextmakelinks=\relax
1311
\let\nextmakelinks=\makelinks
1312
\ifnum\lnkcount>0,\fi
1314
\startlink attr{/Border [0 0 0]}
1315
goto name{\pdfmkpgn{\the\pgn}}%
1317
\advance\lnkcount by 1%
1322
\def\picknum#1{\expandafter\pn#1}
1333
\def\ppn#1{\pgn=#1\gobble}
1334
\def\ppnn{\pgn=\first}
1335
\def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
1336
1398
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
1337
1399
\ifx\PP\D\let\nextsp\relax
1338
1400
\else\let\nextsp\skipspaces
1749
1811
% sometimes \x has an active definition that messes things up.
1752
\def\frenchspacing{%
1814
\def\plainfrenchspacing{%
1753
1815
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
1754
1816
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
1817
\def\endofsentencespacefactor{1000}% for @. and friends
1819
\def\plainnonfrenchspacing{%
1820
\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
1821
\sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
1822
\def\endofsentencespacefactor{3000}% for @. and friends
1756
1824
\catcode`@=\other
1825
\def\endofsentencespacefactor{3000}% default
1759
{\tt \rawbackslash \frenchspacing #1}%
1828
{\tt \rawbackslash \plainfrenchspacing #1}%
1762
1831
\def\samp#1{`\tclose{#1}'\null}
1835
1910
\def\codex #1{\tclose{#1}\endgroup}
1912
% An additional complication: the above will allow breaks after, e.g.,
1913
% each of the four underscores in __typeof__. This is undesirable in
1914
% some manuals, especially if they don't have long identifiers in
1915
% general. @allowcodebreaks provides a way to control this.
1917
\newif\ifallowcodebreaks \allowcodebreakstrue
1919
\def\keywordtrue{true}
1920
\def\keywordfalse{false}
1922
\parseargdef\allowcodebreaks{%
1924
\ifx\txiarg\keywordtrue
1925
\allowcodebreakstrue
1926
\else\ifx\txiarg\keywordfalse
1927
\allowcodebreaksfalse
1929
\errhelp = \EMsimple
1930
\errmessage{Unknown @allowcodebreaks option `\txiarg'}%
1837
1934
% @kbd is like @code, except that if the argument is just one @key command,
1838
1935
% then @kbd has no effect.
1841
1938
% `example' (@kbd uses ttsl only inside of @example and friends),
1842
1939
% or `code' (@kbd uses normal tty font always).
1843
1940
\parseargdef\kbdinputstyle{%
1845
\ifx\arg\worddistinct
1942
\ifx\txiarg\worddistinct
1846
1943
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
1847
\else\ifx\arg\wordexample
1944
\else\ifx\txiarg\wordexample
1848
1945
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
1849
\else\ifx\arg\wordcode
1946
\else\ifx\txiarg\wordcode
1850
1947
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
1852
1949
\errhelp = \EMsimple
1853
\errmessage{Unknown @kbdinputstyle option `\arg'}%
1950
\errmessage{Unknown @kbdinputstyle option `\txiarg'}%
1856
1953
\def\worddistinct{distinct}
2000
2097
\def\eurofont{%
2001
2098
% We set the font at each command, rather than predefining it in
2002
2099
% \textfonts and the other font-switching commands, so that
2003
% installations which never need the symbold don't have to have the
2100
% installations which never need the symbol don't have to have the
2004
2101
% font installed.
2006
2103
% There is only one designed size (nominal 10pt), so we always scale
3129
3227
\let\{ = \mylbrace
3130
3228
\let\} = \myrbrace
3132
% \definedummyword defines \#1 as \realbackslash #1\space, thus
3133
% effectively preventing its expansion. This is used only for control
3134
% words, not control letters, because the \space would be incorrect
3135
% for control characters, but is needed to separate the control word
3230
% Do the redefinitions.
3234
% For the aux and toc files, @ is the escape character. So we want to
3235
% redefine everything using @ as the escape character (instead of
3236
% \realbackslash, still used for index files). When everything uses @,
3237
% this will be simpler.
3242
\let\{ = \lbraceatcmd
3243
\let\} = \rbraceatcmd
3245
% Do the redefinitions.
3249
% Called from \indexdummies and \atdummies.
3251
\def\commondummies{%
3253
% \definedummyword defines \#1 as \string\#1\space, thus effectively
3254
% preventing its expansion. This is used only for control% words,
3255
% not control letters, because the \space would be incorrect for
3256
% control characters, but is needed to separate the control word
3136
3257
% from whatever follows.
3138
3259
% For control letters, we have \definedummyletter, which omits the
3142
3263
% those that do not. If it is followed by {arg} in the input, then
3143
3264
% that will dutifully get written to the index (or wherever).
3145
\def\definedummyword##1{%
3146
\expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
3148
\def\definedummyletter##1{%
3149
\expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
3151
\let\definedummyaccent\definedummyletter
3153
% Do the redefinitions.
3157
% For the aux file, @ is the escape character. So we want to redefine
3158
% everything using @ instead of \realbackslash. When everything uses
3159
% @, this will be simpler.
3164
\let\{ = \lbraceatcmd
3165
\let\} = \rbraceatcmd
3167
% (See comments in \indexdummies.)
3168
\def\definedummyword##1{%
3169
\expandafter\def\csname ##1\endcsname{@##1\space}%
3171
\def\definedummyletter##1{%
3172
\expandafter\def\csname ##1\endcsname{@##1}%
3174
\let\definedummyaccent\definedummyletter
3176
% Do the redefinitions.
3180
% Called from \indexdummies and \atdummies. \definedummyword and
3181
% \definedummyletter must be defined first.
3183
\def\commondummies{%
3266
\def\definedummyword ##1{\def##1{\string##1\space}}%
3267
\def\definedummyletter##1{\def##1{\string##1}}%
3268
\let\definedummyaccent\definedummyletter
3270
\commondummiesnofonts
3272
\definedummyletter\_%
3274
% Non-English letters.
3286
\definedummyword\exclamdown
3287
\definedummyword\questiondown
3288
\definedummyword\ordf
3289
\definedummyword\ordm
3291
% Although these internal commands shouldn't show up, sometimes they do.
3293
\definedummyword\gtr
3294
\definedummyword\hat
3295
\definedummyword\less
3298
\definedummyword\tclose
3301
\definedummyword\LaTeX
3302
\definedummyword\TeX
3304
% Assorted special characters.
3305
\definedummyword\bullet
3306
\definedummyword\comma
3307
\definedummyword\copyright
3308
\definedummyword\registeredsymbol
3309
\definedummyword\dots
3310
\definedummyword\enddots
3311
\definedummyword\equiv
3312
\definedummyword\error
3313
\definedummyword\euro
3314
\definedummyword\expansion
3315
\definedummyword\minus
3316
\definedummyword\pounds
3317
\definedummyword\point
3318
\definedummyword\print
3319
\definedummyword\result
3321
% We want to disable all macros so that they are not expanded by \write.
3185
3324
\normalturnoffactive
3187
\commondummiesnofonts
3189
\definedummyletter{_}%
3191
% Non-English letters.
3192
\definedummyword{AA}%
3193
\definedummyword{AE}%
3194
\definedummyword{L}%
3195
\definedummyword{OE}%
3196
\definedummyword{O}%
3197
\definedummyword{aa}%
3198
\definedummyword{ae}%
3199
\definedummyword{l}%
3200
\definedummyword{oe}%
3201
\definedummyword{o}%
3202
\definedummyword{ss}%
3203
\definedummyword{exclamdown}%
3204
\definedummyword{questiondown}%
3205
\definedummyword{ordf}%
3206
\definedummyword{ordm}%
3208
% Although these internal commands shouldn't show up, sometimes they do.
3209
\definedummyword{bf}%
3210
\definedummyword{gtr}%
3211
\definedummyword{hat}%
3212
\definedummyword{less}%
3213
\definedummyword{sf}%
3214
\definedummyword{sl}%
3215
\definedummyword{tclose}%
3216
\definedummyword{tt}%
3218
\definedummyword{LaTeX}%
3219
\definedummyword{TeX}%
3221
% Assorted special characters.
3222
\definedummyword{bullet}%
3223
\definedummyword{comma}%
3224
\definedummyword{copyright}%
3225
\definedummyword{registeredsymbol}%
3226
\definedummyword{dots}%
3227
\definedummyword{enddots}%
3228
\definedummyword{equiv}%
3229
\definedummyword{error}%
3230
\definedummyword{euro}%
3231
\definedummyword{expansion}%
3232
\definedummyword{minus}%
3233
\definedummyword{pounds}%
3234
\definedummyword{point}%
3235
\definedummyword{print}%
3236
\definedummyword{result}%
3238
3326
% Handle some cases of @value -- where it does not contain any
3239
3327
% (non-fully-expandable) commands.
3240
3328
\makevalueexpandable
3242
% Normal spaces, not active ones.
3245
% No macro expansion.
3249
3331
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
3253
3335
\catcode`\~=\other
3254
3336
\gdef\commondummiesnofonts{%
3255
3337
% Control letters and accents.
3256
\definedummyletter{!}%
3257
\definedummyaccent{"}%
3258
\definedummyaccent{'}%
3259
\definedummyletter{*}%
3260
\definedummyaccent{,}%
3261
\definedummyletter{.}%
3262
\definedummyletter{/}%
3263
\definedummyletter{:}%
3264
\definedummyaccent{=}%
3265
\definedummyletter{?}%
3266
\definedummyaccent{^}%
3267
\definedummyaccent{`}%
3268
\definedummyaccent{~}%
3269
\definedummyword{u}%
3270
\definedummyword{v}%
3271
\definedummyword{H}%
3272
\definedummyword{dotaccent}%
3273
\definedummyword{ringaccent}%
3274
\definedummyword{tieaccent}%
3275
\definedummyword{ubaraccent}%
3276
\definedummyword{udotaccent}%
3277
\definedummyword{dotless}%
3338
\definedummyletter\!%
3339
\definedummyaccent\"%
3340
\definedummyaccent\'%
3341
\definedummyletter\*%
3342
\definedummyaccent\,%
3343
\definedummyletter\.%
3344
\definedummyletter\/%
3345
\definedummyletter\:%
3346
\definedummyaccent\=%
3347
\definedummyletter\?%
3348
\definedummyaccent\^%
3349
\definedummyaccent\`%
3350
\definedummyaccent\~%
3354
\definedummyword\dotaccent
3355
\definedummyword\ringaccent
3356
\definedummyword\tieaccent
3357
\definedummyword\ubaraccent
3358
\definedummyword\udotaccent
3359
\definedummyword\dotless
3279
3361
% Texinfo font commands.
3280
\definedummyword{b}%
3281
\definedummyword{i}%
3282
\definedummyword{r}%
3283
\definedummyword{sc}%
3284
\definedummyword{t}%
3286
3368
% Commands that take arguments.
3287
\definedummyword{acronym}%
3288
\definedummyword{cite}%
3289
\definedummyword{code}%
3290
\definedummyword{command}%
3291
\definedummyword{dfn}%
3292
\definedummyword{emph}%
3293
\definedummyword{env}%
3294
\definedummyword{file}%
3295
\definedummyword{kbd}%
3296
\definedummyword{key}%
3297
\definedummyword{math}%
3298
\definedummyword{option}%
3299
\definedummyword{samp}%
3300
\definedummyword{strong}%
3301
\definedummyword{tie}%
3302
\definedummyword{uref}%
3303
\definedummyword{url}%
3304
\definedummyword{var}%
3305
\definedummyword{verb}%
3306
\definedummyword{w}%
3369
\definedummyword\acronym
3370
\definedummyword\cite
3371
\definedummyword\code
3372
\definedummyword\command
3373
\definedummyword\dfn
3374
\definedummyword\emph
3375
\definedummyword\env
3376
\definedummyword\file
3377
\definedummyword\kbd
3378
\definedummyword\key
3379
\definedummyword\math
3380
\definedummyword\option
3381
\definedummyword\samp
3382
\definedummyword\strong
3383
\definedummyword\tie
3384
\definedummyword\uref
3385
\definedummyword\url
3386
\definedummyword\var
3387
\definedummyword\verb
3315
3397
\def\indexnofonts{%
3316
3398
% Accent commands should become @asis.
3317
\def\definedummyaccent##1{%
3318
\expandafter\let\csname ##1\endcsname\asis
3399
\def\definedummyaccent##1{\let##1\asis}%
3320
3400
% We can just ignore other control letters.
3321
\def\definedummyletter##1{%
3322
\expandafter\def\csname ##1\endcsname{}%
3401
\def\definedummyletter##1{\let##1\empty}%
3324
3402
% Hopefully, all control words can become @asis.
3325
3403
\let\definedummyword\definedummyaccent
3374
3452
\def\print{-|}%
3375
3453
\def\result{=>}%
3377
% Don't write macro names.
3455
% We need to get rid of all macros, leaving only the arguments (if present).
3456
% Of course this is not nearly correct, but it is the best we can do for now.
3457
% makeinfo does not expand macros in the argument to @deffn, which ends up
3458
% writing an index entry, and texindex isn't prepared for an index sort entry
3459
% that starts with \.
3461
% Since macro invocations are followed by braces, we can just redefine them
3462
% to take a single TeX argument. The case of a macro invocation that
3463
% goes to end-of-line is not handled.
3381
3468
\let\indexbackslash=0 %overridden during \printindex.
4499
4585
\ifpdf \global\pdfmakepagedesttrue \fi
4589
% These characters do not print properly in the Computer Modern roman
4590
% fonts, so we must take special care. This is more or less redundant
4591
% with the Texinfo input format setup at the end of this file.
4593
\def\activecatcodes{%
4606
% Read the toc file, which is essentially Texinfo input.
4502
4613
\newskip\contentsrightmargin \contentsrightmargin=1in
4503
4614
\newcount\savepageno
4504
4615
\newcount\lastnegativepageno \lastnegativepageno = -1
4521
4632
\savepageno = \pageno
4522
4633
\begingroup % Set up to handle contents files properly.
4523
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
4524
% We can't do this, because then an actual ^ in a section
4525
% title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
4526
%\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
4527
\raggedbottom % Worry more about breakpoints than the bottom.
4634
\raggedbottom % Worry more about breakpoints than the bottom.
4528
4635
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
4530
4637
% Roman numerals for page numbers.
4811
4919
\let\afterenvbreak = \aboveenvbreak
4813
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
4921
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
4922
% also clear it, so that its embedded environments do the narrowing again.
4814
4923
\let\nonarrowing=\relax
4816
4925
% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
4847
4956
% each corner char, and rule thickness
4848
4957
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
4849
4958
% Flag to tell @lisp, etc., not to narrow margin.
4850
\let\nonarrowing=\comment
4959
\let\nonarrowing = t%
4852
4961
\baselineskip=0pt\parskip=0pt\lineskip=0pt
5554
5664
\newcount\paramno % Count of parameters
5555
5665
\newtoks\macname % Macro name
5556
5666
\newif\ifrecursive % Is it recursive?
5557
\def\macrolist{} % List of all defined macros in the form
5558
% \do\macro1\do\macro2...
5668
% List of all defined macros in the form
5669
% \definedummyword\macro1\definedummyword\macro2...
5670
% Currently is also contains all @aliases; the list can be split
5671
% if there is a need.
5674
% Add the macro to \macrolist
5675
\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
5676
\def\addtomacrolistxxx#1{%
5677
\toks0 = \expandafter{\macrolist\definedummyword#1}%
5678
\xdef\macrolist{\the\toks0}%
5560
5681
% Utility routines.
5561
5682
% This does \let #1 = #2, with \csnames; that is,
5653
5774
\else \errmessage{Macro name \the\macname\space already defined}\fi
5654
5775
\global\cslet{macsave.\the\macname}{\the\macname}%
5655
5776
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
5656
% Add the macroname to \macrolist
5657
\toks0 = \expandafter{\macrolist\do}%
5658
\xdef\macrolist{\the\toks0
5659
\expandafter\noexpand\csname\the\macname\endcsname}%
5777
\addtomacrolist{\the\macname}%
5661
5779
\begingroup \macrobodyctxt
5662
5780
\ifrecursive \expandafter\parsermacbody
5804
5922
\expandafter\parsearg
5807
% We want to disable all macros during \shipout so that they are not
5808
% expanded by \write.
5809
\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
5810
\edef\next{\macrolist}\expandafter\endgroup\next}
5812
% For \indexnofonts, we need to get rid of all macros, leaving only the
5813
% arguments (if present). Of course this is not nearly correct, but it
5814
% is the best we can do for now. makeinfo does not expand macros in the
5815
% argument to @deffn, which ends up writing an index entry, and texindex
5816
% isn't prepared for an index sort entry that starts with \.
5818
% Since macro invocations are followed by braces, we can just redefine them
5819
% to take a single TeX argument. The case of a macro invocation that
5820
% goes to end-of-line is not handled.
5822
\def\emptyusermacros{\begingroup
5823
\def\do##1{\let\noexpand##1=\noexpand\asis}%
5824
\edef\next{\macrolist}\expandafter\endgroup\next}
5828
5927
% We need some trickery to remove the optional spaces around the equal
5958
6056
\getfilename{#4}%
5959
{\turnoffactive \otherbackslash
6058
% See comments at \activebackslashdouble.
6059
{\activebackslashdouble \xdef\pdfxrefdest{#1}%
6060
\backslashparens\pdfxrefdest}%
5960
6062
\ifnum\filenamelength>0
5961
6063
\startlink attr{/Border [0 0 0]}%
5962
goto file{\the\filename.pdf} name{#1}%
6064
goto file{\the\filename.pdf} name{\pdfxrefdest}%
5964
6066
\startlink attr{/Border [0 0 0]}%
5965
goto name{\pdfmkpgn{#1}}%
6067
goto name{\pdfmkpgn{\pdfxrefdest}}%
6011
6112
% into the usual \leavevmode...\vrule stuff for purposes of
6012
6113
% printing. So we \turnoffactive for the \refx-snt, back on for the
6013
6114
% printing, back off for the \refx-pg.
6014
{\turnoffactive \otherbackslash
6015
6116
% Only output a following space if the -snt ref is nonempty; for
6016
6117
% @unnumbered and @anchor, it won't be.
6017
6118
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
6564
6668
% \floatlabel-lof. Besides \floatident, we include the short
6565
6669
% caption if specified, else the full caption if specified, else nothing.
6567
\atdummies \turnoffactive \otherbackslash
6568
6672
% since we read the caption text in the macro world, where ^^M
6569
6673
% is turned into a normal character, we have to scan it back, so
6570
6674
% we don't write the literal three characters "^^M" into the aux file.
6757
% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
6758
% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
6759
% physical page width.
6861
% Parameters in order: 1) textheight; 2) textwidth;
6862
% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
6863
% 7) physical page height; 8) physical page width.
6761
6865
% We also call \setleading{\textleading}, so the caller should define
6762
6866
% \textleading. The caller should also set \parskip.
6820
6924
\defbodyindent = .5cm
6927
% Use @smallerbook to reset parameters for 6x9 trim size.
6928
% (Just testing, parameters still in flux.)
6929
\def\smallerbook{{\globaldefs = 1
6930
\parskip = 1.5pt plus 1pt
6933
\internalpagesizes{7.4in}{4.8in}%
6938
\lispnarrowing = 0.25in
6941
\contentsrightmargin = 0pt
6942
\defbodyindent = .4cm
6823
6945
% Use @afourpaper to print on European A4 paper.
6824
6946
\def\afourpaper{{\globaldefs = 1
6825
6947
\parskip = 3pt plus 2pt minus 1pt
7009
7132
@gdef@otherbackslash{@let\=@realbackslash}
7012
% \realbackslash is an actual character `\' with catcode other.
7013
{\catcode`\\=\other @gdef@realbackslash{\}}
7135
% \realbackslash is an actual character `\' with catcode other, and
7136
% \doublebackslash is two of them (for the pdf outlines).
7137
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
7015
7139
% \normalbackslash outputs one backslash in fixed width font.
7016
7140
\def\normalbackslash{{\tt\backslashcurfont}}
7053
7177
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
7054
7178
% the first `\{ in the file would cause an error. This macro tries to fix
7055
7179
% that, assuming it is called before the first `\' could plausibly occur.
7056
% Also back turn on active characters that might appear in the input
7180
% Also turn back on active characters that might appear in the input
7057
7181
% file name, in case not using a pre-dumped format.
7059
7183
@gdef@fixbackslash{%