Changeset 503 in kBuild for trunk/src/gmake/config/texinfo.tex
- Timestamp:
- Sep 15, 2006 5:09:38 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/config/texinfo.tex
r151 r503 4 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 5 5 % 6 \def\texinfoversion{200 4-02-25.17}6 \def\texinfoversion{2006-03-21.13} 7 7 % 8 8 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software10 % Foundation, Inc.9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free 10 % Software Foundation, Inc. 11 11 % 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., 5 9 Temple Place - Suite 330,25 % Boston, MA 0211 1-1307, USA.24 % to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 25 % Boston, MA 02110-1301, USA. 26 26 % 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 29 29 % restriction. (This has been our intent since Texinfo was invented.) 30 % 30 % 31 31 % Please try the latest version of texinfo.tex before submitting bug 32 32 % reports; you can get the latest version from: … … 56 56 % extent. You can get the existing language-specific files from the 57 57 % full Texinfo distribution. 58 % 58 % 59 59 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. 60 60 … … 90 90 \let\ptexi=\i 91 91 \let\ptexindent=\indent 92 \let\ptexnoindent=\noindent93 92 \let\ptexinsert=\insert 94 93 \let\ptexlbrace=\{ 95 94 \let\ptexless=< 95 \let\ptexnewwrite\newwrite 96 \let\ptexnoindent=\noindent 96 97 \let\ptexplus=+ 97 98 \let\ptexrbrace=\} … … 153 154 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi 154 155 155 % In some macros, we cannot use the `\? notation---the left quote is 156 % in some cases the escape char. 157 \chardef\colonChar = `\: 158 \chardef\commaChar = `\, 159 \chardef\dotChar = `\. 160 \chardef\exclamChar= `\! 161 \chardef\questChar = `\? 162 \chardef\semiChar = `\; 163 \chardef\underChar = `\_ 164 165 \chardef\spaceChar = `\ % 156 % Since the category of space is not known, we have to be careful. 166 157 \chardef\spacecat = 10 167 \def\spaceisspace{\catcode \spaceChar=\spacecat}158 \def\spaceisspace{\catcode`\ =\spacecat} 168 159 169 160 % Ignore a token. … … 176 167 % Hyphenation fixes. 177 168 \hyphenation{ 178 Flor-i-da Ghost-script Ghost-view Mac-OS ap-pen-dix bit-map bit-maps 169 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script 170 ap-pen-dix bit-map bit-maps 179 171 data-base data-bases eshell fall-ing half-way long-est man-u-script 180 172 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm 181 par-a-digms rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces 173 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces 174 spell-ing spell-ings 182 175 stand-alone strong-est time-stamp time-stamps which-ever white-space 183 176 wide-spread wrap-around … … 300 293 % before the \shipout runs. 301 294 % 302 \escapechar = `\\ % use backslash in output files.303 295 \indexdummies % don't expand commands in the output. 304 296 \normalturnoffactive % \ in index entries must not stay \, e.g., if 305 % the page break happens to be in the middle of an example. 297 % the page break happens to be in the middle of an example. 298 % We don't want .vr (or whatever) entries like this: 299 % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} 300 % "\acronym" won't work when it's read back in; 301 % it needs to be 302 % {\code {{\tt \backslashcurfont }acronym} 306 303 \shipout\vbox{% 307 304 % Do this early so pdf references go to the beginning of the page. … … 354 351 \fi 355 352 }% end of \shipout\vbox 356 }% end of group with \ normalturnoffactive353 }% end of group with \indexdummies 357 354 \advancepageno 358 355 \ifnum\outputpenalty>-20000 \else\dosupereject\fi … … 389 386 \def\parsearg{\parseargusing{}} 390 387 \def\parseargusing#1#2{% 391 \def\ next{#2}%388 \def\argtorun{#2}% 392 389 \begingroup 393 390 \obeylines … … 420 417 \def\temp{#3}% 421 418 \ifx\temp\empty 422 % We cannot use \next here, as it holds the macro to run; 423 % thus we reuse \temp. 419 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: 424 420 \let\temp\finishparsearg 425 421 \else … … 433 429 % to get _exactly_ the rest of the line, we had to prevent such situation. 434 430 % We prepended an \empty token at the very beginning and we expand it now, 435 % just before passing the control to \ next.431 % just before passing the control to \argtorun. 436 432 % (Similarily, we have to think about #3 of \argcheckspacesY above: it is 437 433 % either the null string, or it ends with \^^M---thus there is no danger … … 440 436 % But first, we have to remove the trailing space token. 441 437 % 442 \def\finishparsearg#1 \ArgTerm{\expandafter\ next\expandafter{#1}}438 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} 443 439 444 440 % \parseargdef\foo{...} … … 480 476 481 477 % Define the framework for environments in texinfo.tex. It's used like this: 482 % 478 % 483 479 % \envdef\foo{...} 484 480 % \def\Efoo{...} 485 % 481 % 486 482 % It's the responsibility of \envdef to insert \begingroup before the 487 483 % actual body; @end closes the group after calling \Efoo. \envdef also … … 489 485 % whether the environment name matches. The \checkenv macro can also be 490 486 % used to check whether the current environment is the one expected. 491 % 487 % 492 488 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they 493 489 % are not treated as enviroments; they don't open a group. (The … … 564 560 \begingroup 565 561 % Definitions to produce \{ and \} commands for indices, 566 % and @{ and @} for the aux file.562 % and @{ and @} for the aux/toc files. 567 563 \catcode`\{ = \other \catcode`\} = \other 568 564 \catcode`\[ = 1 \catcode`\] = 2 … … 606 602 % The \TeX{} logo, as in plain, but resetting the spacing so that a 607 603 % period following counts as ending a sentence. (Idea found in latex.) 608 % 609 \edef\TeX{\TeX \spacefactor= 3000 }604 % 605 \edef\TeX{\TeX \spacefactor=1000 } 610 606 611 607 % @LaTeX{} logo. Not quite the same results as the definition in … … 614 610 % the \scriptstyle font (since we don't reset \scriptstyle and 615 611 % \scriptscriptstyle). 616 % 612 % 617 613 \def\LaTeX{% 618 614 L\kern-.36em … … 645 641 646 642 % @. is an end-of-sentence period. 647 \def\.{.\spacefactor= 3000}643 \def\.{.\spacefactor=\endofsentencespacefactor\space} 648 644 649 645 % @! is an end-of-sentence bang. 650 \def\!{!\spacefactor= 3000}646 \def\!{!\spacefactor=\endofsentencespacefactor\space} 651 647 652 648 % @? is an end-of-sentence query. 653 \def\?{?\spacefactor=3000 } 649 \def\?{?\spacefactor=\endofsentencespacefactor\space} 650 651 % @frenchspacing on|off says whether to put extra space after punctuation. 652 % 653 \def\onword{on} 654 \def\offword{off} 655 % 656 \parseargdef\frenchspacing{% 657 \def\temp{#1}% 658 \ifx\temp\onword \plainfrenchspacing 659 \else\ifx\temp\offword \plainnonfrenchspacing 660 \else 661 \errhelp = \EMsimple 662 \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% 663 \fi\fi 664 } 654 665 655 666 % @w prevents a word break. Without the \leavevmode, @w at the … … 1029 1040 % which is what @var uses. 1030 1041 { 1031 \catcode \underChar= \active1042 \catcode`\_ = \active 1032 1043 \gdef\mathunderscore{% 1033 \catcode \underChar=\active1044 \catcode`\_=\active 1034 1045 \def_{\ifnum\fam=\slfam \_\else\sb\fi}% 1035 1046 } … … 1090 1101 \def\enddots{% 1091 1102 \dots 1092 \spacefactor= 30001103 \spacefactor=\endofsentencespacefactor 1093 1104 } 1094 1105 1095 1106 % @comma{} is so commas can be inserted into text without messing up 1096 1107 % Texinfo's parsing. 1097 % 1108 % 1098 1109 \let\comma = , 1099 1110 … … 1161 1172 \newif\ifpdfmakepagedest 1162 1173 1174 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 1175 % can be set). So we test for \relax and 0 as well as \undefined, 1176 % borrowed from ifpdf.sty. 1163 1177 \ifx\pdfoutput\undefined 1164 \pdffalse1165 \let\pdfmkdest = \gobble1166 \let\pdfurl = \gobble1167 \let\endlink = \relax1168 \let\linkcolor = \relax1169 \let\pdfmakeoutlines = \relax1170 1178 \else 1171 \pdftrue 1172 \pdfoutput = 1 1179 \ifx\pdfoutput\relax 1180 \else 1181 \ifcase\pdfoutput 1182 \else 1183 \pdftrue 1184 \fi 1185 \fi 1186 \fi 1187 1188 % PDF uses PostScript string constants for the names of xref targets, 1189 % for display in the outlines, and in other places. Thus, we have to 1190 % double any backslashes. Otherwise, a name like "\node" will be 1191 % interpreted as a newline (\n), followed by o, d, e. Not good. 1192 % http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html 1193 % (and related messages, the final outcome is that it is up to the TeX 1194 % user to double the backslashes and otherwise make the string valid, so 1195 % that's what we do). 1196 1197 % double active backslashes. 1198 % 1199 {\catcode`\@=0 \catcode`\\=\active 1200 @gdef@activebackslashdouble{% 1201 @catcode`@\=@active 1202 @let\=@doublebackslash} 1203 } 1204 1205 % To handle parens, we must adopt a different approach, since parens are 1206 % not active characters. hyperref.dtx (which has the same problem as 1207 % us) handles it with this amazing macro to replace tokens. I've 1208 % tinkered with it a little for texinfo, but it's definitely from there. 1209 % 1210 % #1 is the tokens to replace. 1211 % #2 is the replacement. 1212 % #3 is the control sequence with the string. 1213 % 1214 \def\HyPsdSubst#1#2#3{% 1215 \def\HyPsdReplace##1#1##2\END{% 1216 ##1% 1217 \ifx\\##2\\% 1218 \else 1219 #2% 1220 \HyReturnAfterFi{% 1221 \HyPsdReplace##2\END 1222 }% 1223 \fi 1224 }% 1225 \xdef#3{\expandafter\HyPsdReplace#3#1\END}% 1226 } 1227 \long\def\HyReturnAfterFi#1\fi{\fi#1} 1228 1229 % #1 is a control sequence in which to do the replacements. 1230 \def\backslashparens#1{% 1231 \xdef#1{#1}% redefine it as its expansion; the definition is simply 1232 % \lastnode when called from \setref -> \pdfmkdest. 1233 \HyPsdSubst{(}{\realbackslash(}{#1}% 1234 \HyPsdSubst{)}{\realbackslash)}{#1}% 1235 } 1236 1237 \ifpdf 1173 1238 \input pdfcolor 1174 1239 \pdfcatalog{/PageMode /UseOutlines}% … … 1194 1259 \fi} 1195 1260 \def\pdfmkdest#1{{% 1196 % We have to set dummies so commands such as @code in a section title1197 % aren't expanded.1261 % We have to set dummies so commands such as @code, and characters 1262 % such as \, aren't expanded when present in a section title. 1198 1263 \atdummies 1199 \normalturnoffactive 1200 \pdfdest name{#1} xyz% 1201 }} 1202 \def\pdfmkpgn#1{#1} 1264 \activebackslashdouble 1265 \def\pdfdestname{#1}% 1266 \backslashparens\pdfdestname 1267 \pdfdest name{\pdfdestname} xyz% 1268 }}% 1269 % 1270 % used to mark target names; must be expandable. 1271 \def\pdfmkpgn#1{#1}% 1272 % 1203 1273 \let\linkcolor = \Blue % was Cyan, but that seems light? 1204 1274 \def\endlink{\Black\pdfendlink} … … 1211 1281 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} 1212 1282 % 1213 % #1 is the section text. #2 is the pdf expression for the number 1214 % of subentries (or empty, for subsubsections). #3 is the node 1215 % text, which might be empty if this toc entry had no 1216 % corresponding node. #4 is the page number. 1217 % 1283 % #1 is the section text, which is what will be displayed in the 1284 % outline by the pdf viewer. #2 is the pdf expression for the number 1285 % of subentries (or empty, for subsubsections). #3 is the node text, 1286 % which might be empty if this toc entry had no corresponding node. 1287 % #4 is the page number 1288 % 1218 1289 \def\dopdfoutline#1#2#3#4{% 1219 1290 % Generate a link to the node text if that exists; else, use the 1220 1291 % page number. We could generate a destination for the section 1221 1292 % text in the case where a section has no node, but it doesn't 1222 % seem worth while, since most documents are normally structured.1293 % seem worth the trouble, since most documents are normally structured. 1223 1294 \def\pdfoutlinedest{#3}% 1224 \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi 1295 \ifx\pdfoutlinedest\empty 1296 \def\pdfoutlinedest{#4}% 1297 \else 1298 % Doubled backslashes in the name. 1299 {\activebackslashdouble \xdef\pdfoutlinedest{#3}% 1300 \backslashparens\pdfoutlinedest}% 1301 \fi 1225 1302 % 1226 \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}% 1303 % Also double the backslashes in the display string. 1304 {\activebackslashdouble \xdef\pdfoutlinetext{#1}% 1305 \backslashparens\pdfoutlinetext}% 1306 % 1307 \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% 1227 1308 } 1228 1309 % … … 1236 1317 \def\numchapentry##1##2##3##4{% 1237 1318 \def\thischapnum{##2}% 1238 \ let\thissecnum\empty1239 \ let\thissubsecnum\empty1319 \def\thissecnum{0}% 1320 \def\thissubsecnum{0}% 1240 1321 }% 1241 1322 \def\numsecentry##1##2##3##4{% 1242 1323 \advancenumber{chap\thischapnum}% 1243 1324 \def\thissecnum{##2}% 1244 \ let\thissubsecnum\empty1325 \def\thissubsecnum{0}% 1245 1326 }% 1246 1327 \def\numsubsecentry##1##2##3##4{% … … 1251 1332 \advancenumber{subsec\thissubsecnum}% 1252 1333 }% 1253 \ let\thischapnum\empty1254 \ let\thissecnum\empty1255 \ let\thissubsecnum\empty1334 \def\thischapnum{0}% 1335 \def\thissecnum{0}% 1336 \def\thissubsecnum{0}% 1256 1337 % 1257 1338 % use \def rather than \let here because we redefine \chapentry et … … 1265 1346 \def\unnsubsecentry{\numsubsecentry}% 1266 1347 \def\unnsubsubsecentry{\numsubsubsecentry}% 1267 \ input \jobname.toc1348 \readdatafile{toc}% 1268 1349 % 1269 1350 % Read toc second time, this time actually producing the outlines. 1270 1351 % The `-' means take the \expnumber as the absolute number of 1271 1352 % subentries, which we calculated on our first read of the .toc above. 1272 % 1353 % 1273 1354 % We use the node names as the destinations. 1274 1355 \def\numchapentry##1##2##3##4{% … … 1286 1367 % Latin 2 (0xea) gets translated to a | character. Info from 1287 1368 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. 1288 % 1369 % 1289 1370 % xx to do this right, we have to translate 8-bit characters to 1290 1371 % their "best" equivalent, based on the @documentencoding. Right 1291 1372 % now, I guess we'll just let the pdf reader have its way. 1292 1373 \indexnofonts 1293 \turnoffactive 1374 \setupdatafile 1375 \catcode`\\=\active \otherbackslash 1294 1376 \input \jobname.toc 1295 1377 \endgroup 1296 1378 } 1297 1379 % 1298 \def\makelinks #1,{%1299 \def\params{#1}\def\E{END}%1300 \ifx\params\E1301 \let\nextmakelinks=\relax1302 \else1303 \let\nextmakelinks=\makelinks1304 \ifnum\lnkcount>0,\fi1305 \picknum{#1}%1306 \startlink attr{/Border [0 0 0]}1307 goto name{\pdfmkpgn{\the\pgn}}%1308 \linkcolor #1%1309 \advance\lnkcount by 1%1310 \endlink1311 \fi1312 \nextmakelinks1313 }1314 \def\picknum#1{\expandafter\pn#1}1315 \def\pn#1{%1316 \def\p{#1}%1317 \ifx\p\lbrace1318 \let\nextpn=\ppn1319 \else1320 \let\nextpn=\ppnn1321 \def\first{#1}1322 \fi1323 \nextpn1324 }1325 \def\ppn#1{\pgn=#1\gobble}1326 \def\ppnn{\pgn=\first}1327 \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}1328 1380 \def\skipspaces#1{\def\PP{#1}\def\D{|}% 1329 1381 \ifx\PP\D\let\nextsp\relax … … 1340 1392 \let \startlink \pdfstartlink 1341 1393 \fi 1394 % make a live url in pdf output. 1342 1395 \def\pdfurl#1{% 1343 1396 \begingroup 1344 \normalturnoffactive\def\@{@}% 1397 % it seems we really need yet another set of dummies; have not 1398 % tried to figure out what each command should do in the context 1399 % of @url. for now, just make @/ a no-op, that's the only one 1400 % people have actually reported a problem with. 1401 % 1402 \normalturnoffactive 1403 \def\@{@}% 1404 \let\/=\empty 1345 1405 \makevalueexpandable 1346 1406 \leavevmode\Red … … 1373 1433 \linkcolor #1\endlink} 1374 1434 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} 1375 \fi % \ifx\pdfoutput 1435 \else 1436 \let\pdfmkdest = \gobble 1437 \let\pdfurl = \gobble 1438 \let\endlink = \relax 1439 \let\linkcolor = \relax 1440 \let\pdfmakeoutlines = \relax 1441 \fi % \ifx\pdfoutput 1376 1442 1377 1443 … … 1381 1447 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in 1382 1448 % italics, not bold italics. 1383 % 1449 % 1384 1450 \def\setfontstyle#1{% 1385 1451 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. … … 1388 1454 1389 1455 % Select #1 fonts with the current style. 1390 % 1456 % 1391 1457 \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} 1392 1458 … … 1394 1460 \def\it{\fam=\itfam \setfontstyle{it}} 1395 1461 \def\sl{\fam=\slfam \setfontstyle{sl}} 1396 \def\bf{\fam=\bffam \setfontstyle{bf}} 1462 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} 1397 1463 \def\tt{\fam=\ttfam \setfontstyle{tt}} 1398 1464 … … 1456 1522 1457 1523 % Text fonts (11.2pt, magstep1). 1458 \newcount\mainmagstep 1459 \ifx\bigger\relax 1460 % not really supported. 1461 \mainmagstep=\magstep1 1462 \setfont\textrm\rmshape{12}{1000} 1463 \setfont\texttt\ttshape{12}{1000} 1464 \else 1465 \mainmagstep=\magstephalf 1466 \setfont\textrm\rmshape{10}{\mainmagstep} 1467 \setfont\texttt\ttshape{10}{\mainmagstep} 1468 \fi 1524 \def\textnominalsize{11pt} 1525 \edef\mainmagstep{\magstephalf} 1526 \setfont\textrm\rmshape{10}{\mainmagstep} 1527 \setfont\texttt\ttshape{10}{\mainmagstep} 1469 1528 \setfont\textbf\bfshape{10}{\mainmagstep} 1470 1529 \setfont\textit\itshape{10}{\mainmagstep} … … 1483 1542 1484 1543 % Fonts for indices, footnotes, small examples (9pt). 1544 \def\smallnominalsize{9pt} 1485 1545 \setfont\smallrm\rmshape{9}{1000} 1486 1546 \setfont\smalltt\ttshape{9}{1000} … … 1495 1555 1496 1556 % Fonts for small examples (8pt). 1557 \def\smallernominalsize{8pt} 1497 1558 \setfont\smallerrm\rmshape{8}{1000} 1498 1559 \setfont\smallertt\ttshape{8}{1000} … … 1507 1568 1508 1569 % Fonts for title page (20.4pt): 1570 \def\titlenominalsize{20pt} 1509 1571 \setfont\titlerm\rmbshape{12}{\magstep3} 1510 1572 \setfont\titleit\itbshape{10}{\magstep4} … … 1521 1583 1522 1584 % Chapter (and unnumbered) fonts (17.28pt). 1585 \def\chapnominalsize{17pt} 1523 1586 \setfont\chaprm\rmbshape{12}{\magstep2} 1524 1587 \setfont\chapit\itbshape{10}{\magstep3} … … 1533 1596 1534 1597 % Section fonts (14.4pt). 1598 \def\secnominalsize{14pt} 1535 1599 \setfont\secrm\rmbshape{12}{\magstep1} 1536 1600 \setfont\secit\itbshape{10}{\magstep2} … … 1545 1609 1546 1610 % Subsection fonts (13.15pt). 1611 \def\ssecnominalsize{13pt} 1547 1612 \setfont\ssecrm\rmbshape{12}{\magstephalf} 1548 1613 \setfont\ssecit\itbshape{10}{1315} … … 1557 1622 1558 1623 % Reduced fonts for @acro in text (10pt). 1624 \def\reducednominalsize{10pt} 1559 1625 \setfont\reducedrm\rmshape{10}{1000} 1560 1626 \setfont\reducedtt\ttshape{10}{1000} … … 1584 1650 % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire 1585 1651 % \tenSTYLE to set the current font. 1586 % 1652 % 1587 1653 % Each font-changing command also sets the names \lsize (one size lower) 1588 1654 % and \lllsize (three sizes lower). These relative commands are used in 1589 1655 % the LaTeX logo and acronyms. 1590 % 1656 % 1591 1657 % This all needs generalizing, badly. 1592 % 1658 % 1593 1659 \def\textfonts{% 1594 1660 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl … … 1596 1662 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy 1597 1663 \let\tenttsl=\textttsl 1664 \def\curfontsize{text}% 1598 1665 \def\lsize{reduced}\def\lllsize{smaller}% 1599 1666 \resetmathfonts \setleading{\textleading}} … … 1603 1670 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy 1604 1671 \let\tenttsl=\titlettsl 1672 \def\curfontsize{title}% 1605 1673 \def\lsize{chap}\def\lllsize{subsec}% 1606 1674 \resetmathfonts \setleading{25pt}} … … 1609 1677 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl 1610 1678 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc 1611 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl 1679 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy 1680 \let\tenttsl=\chapttsl 1681 \def\curfontsize{chap}% 1612 1682 \def\lsize{sec}\def\lllsize{text}% 1613 1683 \resetmathfonts \setleading{19pt}} … … 1617 1687 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy 1618 1688 \let\tenttsl=\secttsl 1689 \def\curfontsize{sec}% 1619 1690 \def\lsize{subsec}\def\lllsize{reduced}% 1620 1691 \resetmathfonts \setleading{16pt}} … … 1624 1695 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy 1625 1696 \let\tenttsl=\ssecttsl 1697 \def\curfontsize{ssec}% 1626 1698 \def\lsize{text}\def\lllsize{small}% 1627 1699 \resetmathfonts \setleading{15pt}} … … 1632 1704 \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy 1633 1705 \let\tenttsl=\reducedttsl 1706 \def\curfontsize{reduced}% 1634 1707 \def\lsize{small}\def\lllsize{smaller}% 1635 1708 \resetmathfonts \setleading{10.5pt}} … … 1639 1712 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy 1640 1713 \let\tenttsl=\smallttsl 1714 \def\curfontsize{small}% 1641 1715 \def\lsize{smaller}\def\lllsize{smaller}% 1642 1716 \resetmathfonts \setleading{10.5pt}} … … 1646 1720 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy 1647 1721 \let\tenttsl=\smallerttsl 1722 \def\curfontsize{smaller}% 1648 1723 \def\lsize{smaller}\def\lllsize{smaller}% 1649 1724 \resetmathfonts \setleading{9.5pt}} … … 1703 1778 1704 1779 \let\i=\smartitalic 1780 \let\slanted=\smartslanted 1705 1781 \let\var=\smartslanted 1706 1782 \let\dfn=\smartslanted 1707 1783 \let\emph=\smartitalic 1708 1784 1785 % @b, explicit bold. 1709 1786 \def\b#1{{\bf #1}} 1710 1787 \let\strong=\b 1788 1789 % @sansserif, explicit sans. 1790 \def\sansserif#1{{\sf #1}} 1711 1791 1712 1792 % We can't just use \exhyphenpenalty, because that only has effect at … … 1721 1801 % sometimes \x has an active definition that messes things up. 1722 1802 % 1803 \chardef\colonChar = `\: 1804 \chardef\commaChar = `\, 1805 \chardef\dotChar = `\. 1806 \chardef\exclamChar= `\! 1807 \chardef\questChar = `\? 1808 \chardef\semiChar = `\; 1809 % 1723 1810 \catcode`@=11 1724 \def\ frenchspacing{%1811 \def\plainfrenchspacing{% 1725 1812 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m 1726 1813 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m 1814 \def\endofsentencespacefactor{1000}% for @. and friends 1815 } 1816 \def\plainnonfrenchspacing{% 1817 \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 1818 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 1819 \def\endofsentencespacefactor{3000}% for @. and friends 1727 1820 } 1728 1821 \catcode`@=\other 1822 \def\endofsentencespacefactor{3000}% default 1729 1823 1730 1824 \def\t#1{% 1731 {\tt \rawbackslash \ frenchspacing #1}%1825 {\tt \rawbackslash \plainfrenchspacing #1}% 1732 1826 \null 1733 1827 } … … 1766 1860 % 1767 1861 \rawbackslash 1768 \ frenchspacing1862 \plainfrenchspacing 1769 1863 #1% 1770 1864 }% … … 1786 1880 % 1787 1881 \global\def\code{\begingroup 1788 \catcode`\-=\active \let-\codedash 1789 \catcode`\_=\active \let_\codeunder 1882 \catcode`\-=\active \catcode`\_=\active 1883 \ifallowcodebreaks 1884 \let-\codedash 1885 \let_\codeunder 1886 \else 1887 \let-\realdash 1888 \let_\realunder 1889 \fi 1790 1890 \codex 1791 1891 } … … 1807 1907 \def\codex #1{\tclose{#1}\endgroup} 1808 1908 1909 % An additional complication: the above will allow breaks after, e.g., 1910 % each of the four underscores in __typeof__. This is undesirable in 1911 % some manuals, especially if they don't have long identifiers in 1912 % general. @allowcodebreaks provides a way to control this. 1913 % 1914 \newif\ifallowcodebreaks \allowcodebreakstrue 1915 1916 \def\keywordtrue{true} 1917 \def\keywordfalse{false} 1918 1919 \parseargdef\allowcodebreaks{% 1920 \def\txiarg{#1}% 1921 \ifx\txiarg\keywordtrue 1922 \allowcodebreakstrue 1923 \else\ifx\txiarg\keywordfalse 1924 \allowcodebreaksfalse 1925 \else 1926 \errhelp = \EMsimple 1927 \errmessage{Unknown @allowcodebreaks option `\txiarg'}% 1928 \fi\fi 1929 } 1930 1809 1931 % @kbd is like @code, except that if the argument is just one @key command, 1810 1932 % then @kbd has no effect. … … 1814 1936 % or `code' (@kbd uses normal tty font always). 1815 1937 \parseargdef\kbdinputstyle{% 1816 \def\ arg{#1}%1817 \ifx\ arg\worddistinct1938 \def\txiarg{#1}% 1939 \ifx\txiarg\worddistinct 1818 1940 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% 1819 \else\ifx\ arg\wordexample1941 \else\ifx\txiarg\wordexample 1820 1942 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% 1821 \else\ifx\ arg\wordcode1943 \else\ifx\txiarg\wordcode 1822 1944 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% 1823 1945 \else 1824 1946 \errhelp = \EMsimple 1825 \errmessage{Unknown @kbdinputstyle option `\ arg'}%1947 \errmessage{Unknown @kbdinputstyle option `\txiarg'}% 1826 1948 \fi\fi\fi 1827 1949 } … … 1839 1961 \else{\tclose{\kbdfont\look}}\fi} 1840 1962 1841 % For @ url, @env, @command quotes seem unnecessary, so use \code.1842 \let\ url=\code1963 % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. 1964 \let\indicateurl=\code 1843 1965 \let\env=\code 1844 1966 \let\command=\code … … 1872 1994 \endgroup} 1873 1995 1996 % @url synonym for @uref, since that's how everyone uses it. 1997 % 1998 \let\url=\uref 1999 1874 2000 % rms does not like angle brackets --karl, 17may97. 1875 2001 % So now @email is just like @uref, unless we are pdf. … … 1913 2039 \def\ii#1{{\it #1}} % italic font 1914 2040 2041 % @acronym for "FBI", "NATO", and the like. 2042 % We print this one point size smaller, since it's intended for 2043 % all-uppercase. 2044 % 1915 2045 \def\acronym#1{\doacronym #1,,\finish} 1916 2046 \def\doacronym#1,#2,#3\finish{% … … 1922 2052 } 1923 2053 1924 % @pounds{} is a sterling sign, which is in the CM italic font. 2054 % @abbr for "Comput. J." and the like. 2055 % No font change, but don't do end-of-sentence spacing. 1925 2056 % 2057 \def\abbr#1{\doabbr #1,,\finish} 2058 \def\doabbr#1,#2,#3\finish{% 2059 {\plainfrenchspacing #1}% 2060 \def\temp{#2}% 2061 \ifx\temp\empty \else 2062 \space ({\unsepspaces \ignorespaces \temp \unskip})% 2063 \fi 2064 } 2065 2066 % @pounds{} is a sterling sign, which Knuth put in the CM italic font. 2067 % 1926 2068 \def\pounds{{\it\$}} 2069 2070 % @euro{} comes from a separate font, depending on the current style. 2071 % We use the free feym* fonts from the eurosym package by Henrik 2072 % Theiling, which support regular, slanted, bold and bold slanted (and 2073 % "outlined" (blackboard board, sort of) versions, which we don't need). 2074 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. 2075 % 2076 % Although only regular is the truly official Euro symbol, we ignore 2077 % that. The Euro is designed to be slightly taller than the regular 2078 % font height. 2079 % 2080 % feymr - regular 2081 % feymo - slanted 2082 % feybr - bold 2083 % feybo - bold slanted 2084 % 2085 % There is no good (free) typewriter version, to my knowledge. 2086 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. 2087 % Hmm. 2088 % 2089 % Also doesn't work in math. Do we need to do math with euro symbols? 2090 % Hope not. 2091 % 2092 % 2093 \def\euro{{\eurofont e}} 2094 \def\eurofont{% 2095 % We set the font at each command, rather than predefining it in 2096 % \textfonts and the other font-switching commands, so that 2097 % installations which never need the symbol don't have to have the 2098 % font installed. 2099 % 2100 % There is only one designed size (nominal 10pt), so we always scale 2101 % that to the current nominal size. 2102 % 2103 % By the way, simply using "at 1em" works for cmr10 and the like, but 2104 % does not work for cmbx10 and other extended/shrunken fonts. 2105 % 2106 \def\eurosize{\csname\curfontsize nominalsize\endcsname}% 2107 % 2108 \ifx\curfontstyle\bfstylename 2109 % bold: 2110 \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize 2111 \else 2112 % regular: 2113 \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize 2114 \fi 2115 \thiseurofont 2116 } 1927 2117 1928 2118 % @registeredsymbol - R in a circle. The font for the R should really … … 1935 2125 }$% 1936 2126 } 2127 2128 % Laurent Siebenmann reports \Orb undefined with: 2129 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 2130 % so we'll define it if necessary. 2131 % 2132 \ifx\Orb\undefined 2133 \def\Orb{\mathhexbox20D} 2134 \fi 1937 2135 1938 2136 … … 2038 2236 % @author should come last, but may come many times. 2039 2237 % It can also be used inside @quotation. 2040 % 2238 % 2041 2239 \parseargdef\author{% 2042 2240 \def\temp{\quotation}% … … 2241 2439 \nobreak \vskip-\parskip 2242 2440 % 2243 % Stop a page break at the \parskip glue coming up. (Unfortunately 2244 % we can't prevent a possible page break at the following 2245 % \baselineskip glue.) However, if what follows is an environment 2246 % such as @example, there will be no \parskip glue; then 2247 % the negative vskip we just would cause the example and the item to 2248 % crash together. So we use this bizarre value of 10001 as a signal 2249 % to \aboveenvbreak to insert \parskip glue after all. 2250 % (Possibly there are other commands that could be followed by 2251 % @example which need the same treatment, but not section titles; or 2252 % maybe section titles are the only special case and they should be 2253 % penalty 10001...) 2441 % Stop a page break at the \parskip glue coming up. However, if 2442 % what follows is an environment such as @example, there will be no 2443 % \parskip glue; then the negative vskip we just inserted would 2444 % cause the example and the item to crash together. So we use this 2445 % bizarre value of 10001 as a signal to \aboveenvbreak to insert 2446 % \parskip glue after all. Section titles are handled this way also. 2447 % 2254 2448 \penalty 10001 2255 2449 \endgroup … … 2277 2471 \envdef\table{% 2278 2472 \let\itemindex\gobble 2279 \table x2473 \tablecheck{table}% 2280 2474 } 2281 2475 \envdef\ftable{% 2282 2476 \def\itemindex ##1{\doind {fn}{\code{##1}}}% 2283 \table x2477 \tablecheck{ftable}% 2284 2478 } 2285 2479 \envdef\vtable{% 2286 2480 \def\itemindex ##1{\doind {vr}{\code{##1}}}% 2287 \tablex 2481 \tablecheck{vtable}% 2482 } 2483 \def\tablecheck#1{% 2484 \ifnum \the\catcode`\^^M=\active 2485 \endgroup 2486 \errmessage{This command won't work in this context; perhaps the problem is 2487 that we are \inenvironment\thisenv}% 2488 \def\next{\doignore{#1}}% 2489 \else 2490 \let\next\tablex 2491 \fi 2492 \next 2288 2493 } 2289 2494 \def\tablex#1{% … … 2538 2743 % #1 is the @columnfraction, usually a decimal number like .5, but might 2539 2744 % be just 1. We just use it, whatever it is. 2540 % 2745 % 2541 2746 \def\pickupwholefraction#1 {% 2542 2747 \global\advance\colcount by 1 … … 2596 2801 % 2597 2802 % @item within a multitable starts a normal row. 2598 \let\item\crcr 2803 % We use \def instead of \let so that if one of the multitable entries 2804 % contains an @itemize, we don't choke on the \item (seen as \crcr aka 2805 % \endtemplate) expanding \doitemize. 2806 \def\item{\crcr}% 2599 2807 % 2600 2808 \tolerance=9500 … … 2681 2889 } 2682 2890 2683 \def\setmultitablespacing{% test to see if user has set \multitablelinespace. 2684 % If so, do nothing. If not, give it an appropriate dimension based on 2685 % current baselineskip. 2891 \def\setmultitablespacing{% 2892 \def\multistrut{\strut}% just use the standard line spacing 2893 % 2894 % Compute \multitablelinespace (if not defined by user) for use in 2895 % \multitableparskip calculation. We used define \multistrut based on 2896 % this, but (ironically) that caused the spacing to be off. 2897 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. 2686 2898 \ifdim\multitablelinespace=0pt 2687 2899 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip 2688 2900 \global\advance\multitablelinespace by-\ht0 2689 %% strut to put in table in case some entry doesn't have descenders, 2690 %% to keep lines equally spaced 2691 \let\multistrut = \strut 2692 \else 2693 %% FIXME: what is \box0 supposed to be? 2694 \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 2695 width0pt\relax} \fi 2901 \fi 2696 2902 %% Test to see if parskip is larger than space between lines of 2697 2903 %% table. If not, do nothing. … … 2751 2957 \def\doignore#1{\begingroup 2752 2958 % Scan in ``verbatim'' mode: 2959 \obeylines 2753 2960 \catcode`\@ = \other 2754 2961 \catcode`\{ = \other … … 2762 2969 % 2763 2970 % Swallow text until we reach the matching `@end #1'. 2764 \dodoignore 2971 \dodoignore{#1}% 2765 2972 } 2766 2973 … … 2769 2976 % 2770 2977 \gdef\dodoignore#1{% 2771 % #1 contains the string`ifinfo'.2978 % #1 contains the command name as a string, e.g., `ifinfo'. 2772 2979 % 2773 % Define a command to find the next `@end #1', which must be on a line 2774 % by itself. 2775 \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}% 2980 % Define a command to find the next `@end #1'. 2981 \long\def\doignoretext##1^^M@end #1{% 2982 \doignoretextyyy##1^^M@#1\_STOP_}% 2983 % 2776 2984 % And this command to find another #1 command, at the beginning of a 2777 2985 % line. (Otherwise, we would consider a line `@c @ifset', for … … 2780 2988 % 2781 2989 % And now expand that command. 2782 \obeylines %2783 2990 \doignoretext ^^M% 2784 2991 }% … … 2798 3005 2799 3006 % We have to swallow the remaining "\_STOP_". 2800 % 3007 % 2801 3008 \def\doignoretextzzz#1{% 2802 3009 \ifnum\doignorecount = 0 % We have just found the outermost @end. … … 2810 3017 2811 3018 % Finish off ignored text. 2812 \def\enddoignore{\endgroup\ignorespaces} 3019 { \obeylines% 3020 % Ignore anything after the last `@end #1'; this matters in verbatim 3021 % environments, where otherwise the newline after an ignored conditional 3022 % would result in a blank line in the output. 3023 \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% 3024 } 2813 3025 2814 3026 … … 2923 3135 2924 3136 % Define \newwrite to be identical to plain tex's \newwrite 2925 % except not \outer, so it can be used within \newindex. 2926 {\catcode`\@=11 2927 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} 3137 % except not \outer, so it can be used within macros and \if's. 3138 \edef\newwrite{\makecsname{ptexnewwrite}} 2928 3139 2929 3140 % \newindex {foo} defines an index named foo. … … 3011 3222 % 3012 3223 \def\indexdummies{% 3224 \escapechar = `\\ % use backslash in output files. 3013 3225 \def\@{@}% change to @@ when we switch to @ as escape char in index files. 3014 3226 \def\ {\realbackslash\space }% … … 3019 3231 \let\} = \myrbrace 3020 3232 % 3021 % \definedummyword defines \#1 as \realbackslash #1\space, thus3022 % effectively preventing its expansion. This is used only for control3023 % words, not control letters, because the \space would be incorrect3024 % for control characters, but is needed to separate the control word3025 % from whatever follows.3026 %3027 % For control letters, we have \definedummyletter, which omits the3028 % space.3029 %3030 % These can be used both for control words that take an argument and3031 % those that do not. If it is followed by {arg} in the input, then3032 % that will dutifully get written to the index (or wherever).3033 %3034 \def\definedummyword##1{%3035 \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%3036 }%3037 \def\definedummyletter##1{%3038 \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%3039 }%3040 %3041 3233 % Do the redefinitions. 3042 3234 \commondummies 3043 3235 } 3044 3236 3045 % For the aux file, @ is the escape character. So we want to redefine 3046 % everything using @ instead of \realbackslash. When everything uses 3047 % @, this will be simpler. 3237 % For the aux and toc files, @ is the escape character. So we want to 3238 % redefine everything using @ as the escape character (instead of 3239 % \realbackslash, still used for index files). When everything uses @, 3240 % this will be simpler. 3048 3241 % 3049 3242 \def\atdummies{% … … 3053 3246 \let\} = \rbraceatcmd 3054 3247 % 3055 % (See comments in \indexdummies.)3056 \def\definedummyword##1{%3057 \expandafter\def\csname ##1\endcsname{@##1\space}%3058 }%3059 \def\definedummyletter##1{%3060 \expandafter\def\csname ##1\endcsname{@##1}%3061 }%3062 %3063 3248 % Do the redefinitions. 3064 3249 \commondummies 3065 } 3066 3067 % Called from \indexdummies and \atdummies. \definedummyword and 3068 % \definedummyletter must be defined first.3250 \otherbackslash 3251 } 3252 3253 % Called from \indexdummies and \atdummies. 3069 3254 % 3070 3255 \def\commondummies{% 3071 3256 % 3257 % \definedummyword defines \#1 as \string\#1\space, thus effectively 3258 % preventing its expansion. This is used only for control% words, 3259 % not control letters, because the \space would be incorrect for 3260 % control characters, but is needed to separate the control word 3261 % from whatever follows. 3262 % 3263 % For control letters, we have \definedummyletter, which omits the 3264 % space. 3265 % 3266 % These can be used both for control words that take an argument and 3267 % those that do not. If it is followed by {arg} in the input, then 3268 % that will dutifully get written to the index (or wherever). 3269 % 3270 \def\definedummyword ##1{\def##1{\string##1\space}}% 3271 \def\definedummyletter##1{\def##1{\string##1}}% 3272 \let\definedummyaccent\definedummyletter 3273 % 3274 \commondummiesnofonts 3275 % 3276 \definedummyletter\_% 3277 % 3278 % Non-English letters. 3279 \definedummyword\AA 3280 \definedummyword\AE 3281 \definedummyword\L 3282 \definedummyword\OE 3283 \definedummyword\O 3284 \definedummyword\aa 3285 \definedummyword\ae 3286 \definedummyword\l 3287 \definedummyword\oe 3288 \definedummyword\o 3289 \definedummyword\ss 3290 \definedummyword\exclamdown 3291 \definedummyword\questiondown 3292 \definedummyword\ordf 3293 \definedummyword\ordm 3294 % 3295 % Although these internal commands shouldn't show up, sometimes they do. 3296 \definedummyword\bf 3297 \definedummyword\gtr 3298 \definedummyword\hat 3299 \definedummyword\less 3300 \definedummyword\sf 3301 \definedummyword\sl 3302 \definedummyword\tclose 3303 \definedummyword\tt 3304 % 3305 \definedummyword\LaTeX 3306 \definedummyword\TeX 3307 % 3308 % Assorted special characters. 3309 \definedummyword\bullet 3310 \definedummyword\comma 3311 \definedummyword\copyright 3312 \definedummyword\registeredsymbol 3313 \definedummyword\dots 3314 \definedummyword\enddots 3315 \definedummyword\equiv 3316 \definedummyword\error 3317 \definedummyword\euro 3318 \definedummyword\expansion 3319 \definedummyword\minus 3320 \definedummyword\pounds 3321 \definedummyword\point 3322 \definedummyword\print 3323 \definedummyword\result 3324 % 3325 % We want to disable all macros so that they are not expanded by \write. 3326 \macrolist 3327 % 3072 3328 \normalturnoffactive 3073 %3074 \commondummiesnofonts3075 %3076 \definedummyletter{_}%3077 %3078 % Non-English letters.3079 \definedummyword{AA}%3080 \definedummyword{AE}%3081 \definedummyword{L}%3082 \definedummyword{OE}%3083 \definedummyword{O}%3084 \definedummyword{aa}%3085 \definedummyword{ae}%3086 \definedummyword{l}%3087 \definedummyword{oe}%3088 \definedummyword{o}%3089 \definedummyword{ss}%3090 \definedummyword{exclamdown}%3091 \definedummyword{questiondown}%3092 \definedummyword{ordf}%3093 \definedummyword{ordm}%3094 %3095 % Although these internal commands shouldn't show up, sometimes they do.3096 \definedummyword{bf}%3097 \definedummyword{gtr}%3098 \definedummyword{hat}%3099 \definedummyword{less}%3100 \definedummyword{sf}%3101 \definedummyword{sl}%3102 \definedummyword{tclose}%3103 \definedummyword{tt}%3104 %3105 \definedummyword{LaTeX}%3106 \definedummyword{TeX}%3107 %3108 % Assorted special characters.3109 \definedummyword{bullet}%3110 \definedummyword{copyright}%3111 \definedummyword{registeredsymbol}%3112 \definedummyword{dots}%3113 \definedummyword{enddots}%3114 \definedummyword{equiv}%3115 \definedummyword{error}%3116 \definedummyword{expansion}%3117 \definedummyword{minus}%3118 \definedummyword{pounds}%3119 \definedummyword{point}%3120 \definedummyword{print}%3121 \definedummyword{result}%3122 3329 % 3123 3330 % Handle some cases of @value -- where it does not contain any 3124 3331 % (non-fully-expandable) commands. 3125 3332 \makevalueexpandable 3126 %3127 % Normal spaces, not active ones.3128 \unsepspaces3129 %3130 % No macro expansion.3131 \turnoffmacros3132 3333 } 3133 3334 3134 3335 % \commondummiesnofonts: common to \commondummies and \indexnofonts. 3135 3336 % 3136 % Better have this without active chars. 3137 { 3138 \catcode`\~=\other 3139 \gdef\commondummiesnofonts{% 3140 % Control letters and accents. 3141 \definedummyletter{!}% 3142 \definedummyletter{"}% 3143 \definedummyletter{'}% 3144 \definedummyletter{*}% 3145 \definedummyletter{,}% 3146 \definedummyletter{.}% 3147 \definedummyletter{/}% 3148 \definedummyletter{:}% 3149 \definedummyletter{=}% 3150 \definedummyletter{?}% 3151 \definedummyletter{^}% 3152 \definedummyletter{`}% 3153 \definedummyletter{~}% 3154 \definedummyword{u}% 3155 \definedummyword{v}% 3156 \definedummyword{H}% 3157 \definedummyword{dotaccent}% 3158 \definedummyword{ringaccent}% 3159 \definedummyword{tieaccent}% 3160 \definedummyword{ubaraccent}% 3161 \definedummyword{udotaccent}% 3162 \definedummyword{dotless}% 3163 % 3164 % Texinfo font commands. 3165 \definedummyword{b}% 3166 \definedummyword{i}% 3167 \definedummyword{r}% 3168 \definedummyword{sc}% 3169 \definedummyword{t}% 3170 % 3171 % Commands that take arguments. 3172 \definedummyword{acronym}% 3173 \definedummyword{cite}% 3174 \definedummyword{code}% 3175 \definedummyword{command}% 3176 \definedummyword{dfn}% 3177 \definedummyword{emph}% 3178 \definedummyword{env}% 3179 \definedummyword{file}% 3180 \definedummyword{kbd}% 3181 \definedummyword{key}% 3182 \definedummyword{math}% 3183 \definedummyword{option}% 3184 \definedummyword{samp}% 3185 \definedummyword{strong}% 3186 \definedummyword{tie}% 3187 \definedummyword{uref}% 3188 \definedummyword{url}% 3189 \definedummyword{var}% 3190 \definedummyword{verb}% 3191 \definedummyword{w}% 3192 } 3337 \def\commondummiesnofonts{% 3338 % Control letters and accents. 3339 \definedummyletter\!% 3340 \definedummyaccent\"% 3341 \definedummyaccent\'% 3342 \definedummyletter\*% 3343 \definedummyaccent\,% 3344 \definedummyletter\.% 3345 \definedummyletter\/% 3346 \definedummyletter\:% 3347 \definedummyaccent\=% 3348 \definedummyletter\?% 3349 \definedummyaccent\^% 3350 \definedummyaccent\`% 3351 \definedummyaccent\~% 3352 \definedummyword\u 3353 \definedummyword\v 3354 \definedummyword\H 3355 \definedummyword\dotaccent 3356 \definedummyword\ringaccent 3357 \definedummyword\tieaccent 3358 \definedummyword\ubaraccent 3359 \definedummyword\udotaccent 3360 \definedummyword\dotless 3361 % 3362 % Texinfo font commands. 3363 \definedummyword\b 3364 \definedummyword\i 3365 \definedummyword\r 3366 \definedummyword\sc 3367 \definedummyword\t 3368 % 3369 % Commands that take arguments. 3370 \definedummyword\acronym 3371 \definedummyword\cite 3372 \definedummyword\code 3373 \definedummyword\command 3374 \definedummyword\dfn 3375 \definedummyword\emph 3376 \definedummyword\env 3377 \definedummyword\file 3378 \definedummyword\kbd 3379 \definedummyword\key 3380 \definedummyword\math 3381 \definedummyword\option 3382 \definedummyword\pxref 3383 \definedummyword\ref 3384 \definedummyword\samp 3385 \definedummyword\strong 3386 \definedummyword\tie 3387 \definedummyword\uref 3388 \definedummyword\url 3389 \definedummyword\var 3390 \definedummyword\verb 3391 \definedummyword\w 3392 \definedummyword\xref 3193 3393 } 3194 3394 … … 3199 3399 % 3200 3400 \def\indexnofonts{% 3201 \def\definedummyword##1{% 3202 \expandafter\let\csname ##1\endcsname\asis 3203 }% 3204 \let\definedummyletter=\definedummyword 3401 % Accent commands should become @asis. 3402 \def\definedummyaccent##1{\let##1\asis}% 3403 % We can just ignore other control letters. 3404 \def\definedummyletter##1{\let##1\empty}% 3405 % Hopefully, all control words can become @asis. 3406 \let\definedummyword\definedummyaccent 3205 3407 % 3206 3408 \commondummiesnofonts … … 3239 3441 % (The following {} will end up in the sort string, but that's ok.) 3240 3442 \def\bullet{bullet}% 3443 \def\comma{,}% 3241 3444 \def\copyright{copyright}% 3242 3445 \def\registeredsymbol{R}% … … 3245 3448 \def\equiv{==}% 3246 3449 \def\error{error}% 3450 \def\euro{euro}% 3247 3451 \def\expansion{==>}% 3248 3452 \def\minus{-}% … … 3251 3455 \def\print{-|}% 3252 3456 \def\result{=>}% 3457 % 3458 % We need to get rid of all macros, leaving only the arguments (if present). 3459 % Of course this is not nearly correct, but it is the best we can do for now. 3460 % makeinfo does not expand macros in the argument to @deffn, which ends up 3461 % writing an index entry, and texindex isn't prepared for an index sort entry 3462 % that starts with \. 3463 % 3464 % Since macro invocations are followed by braces, we can just redefine them 3465 % to take a single TeX argument. The case of a macro invocation that 3466 % goes to end-of-line is not handled. 3467 % 3468 \macrolist 3253 3469 } 3254 3470 … … 3297 3513 % Remember, we are within a group. 3298 3514 \indexdummies % Must do this here, since \bf, etc expand at this stage 3299 \escapechar=`\\3300 3515 \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now 3301 3516 % so it will be output as is; and it will print as backslash. … … 3371 3586 % 3372 3587 \ifx\lastskipmacro\zeroskipmacro 3373 % if \lastskip was zero, perhaps the last item was a 3374 % penalty, and perhaps it was >=10000, e.g., a \nobreak. 3375 % In that case, we want to re-insert the penalty; since we 3376 % just inserted a non-discardable item, any following glue 3377 % (such as a \parskip) would be a breakpoint. For example: 3588 % If \lastskip was zero, perhaps the last item was a penalty, and 3589 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want 3590 % to re-insert the same penalty (values >10000 are used for various 3591 % signals); since we just inserted a non-discardable item, any 3592 % following glue (such as a \parskip) would be a breakpoint. For example: 3593 % 3378 3594 % @deffn deffn-whatever 3379 3595 % @vindex index-whatever … … 3381 3597 % would allow a break between the index-whatever whatsit 3382 3598 % and the "Description." paragraph. 3383 \ifnum\count255>9999 \ nobreak\fi3599 \ifnum\count255>9999 \penalty\count255 \fi 3384 3600 \else 3385 3601 % On the other hand, if we had a nonzero \lastskip, … … 3479 3695 % 3480 3696 % We like breaks before the index initials, so insert a bonus. 3481 \penalty -300 3697 \nobreak 3698 \vskip 0pt plus 3\baselineskip 3699 \penalty 0 3700 \vskip 0pt plus -3\baselineskip 3482 3701 % 3483 3702 % Typeset the initial. Making this add up to a whole number of … … 3489 3708 \vskip 1.67\baselineskip plus .5\baselineskip 3490 3709 \leftline{\secbf #1}% 3491 \vskip .33\baselineskip plus .1\baselineskip3492 %3493 3710 % Do our best not to break after the initial. 3494 3711 \nobreak 3712 \vskip .33\baselineskip plus .1\baselineskip 3495 3713 }} 3496 3714 … … 3504 3722 % @code, which sets - active. This problem was fixed by a kludge--- 3505 3723 % ``-'' was active throughout whole index, but this isn't really right. 3506 % 3724 % 3507 3725 % The right solution is to prevent \entry from swallowing the whole text. 3508 3726 % --kasal, 21nov03 … … 3770 3988 % construct for the sake of pdftex, which needs the actual 3771 3989 % letter in the expansion, not just typeset. 3772 % 3990 % 3773 3991 \def\appendixletter{% 3774 3992 \ifnum\appendixno=`A A% … … 3907 4125 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset 3908 4126 % all lower-level sectioning counters to zero. 3909 % 4127 % 3910 4128 % Also set \chaplevelprefix, which we prepend to @float sequence numbers 3911 4129 % (e.g., figures), q.v. By default (before any chapter), that is empty. 3912 4130 \let\chaplevelprefix = \empty 3913 % 4131 % 3914 4132 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz 3915 4133 \def\chapterzzz#1{% … … 4135 4353 4136 4354 % Chapter opening. 4137 % 4355 % 4138 4356 % #1 is the text, #2 is the section type (Ynumbered, Ynothing, 4139 4357 % Yappendix, Yomitfromtoc), #3 the chapter number. 4140 % 4358 % 4141 4359 % To test against our argument. 4142 4360 \def\Ynothingkeyword{Ynothing} … … 4161 4379 \setbox0 = \hbox{}% 4162 4380 \def\toctype{unnchap}% 4163 \ def\thischapter{#1}%4381 \gdef\thischapter{#1}% 4164 4382 \else\ifx\temptype\Yomitfromtockeyword 4165 4383 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry 4166 4384 \def\toctype{omit}% 4167 \ xdef\thischapter{}%4385 \gdef\thischapter{}% 4168 4386 \else\ifx\temptype\Yappendixkeyword 4169 4387 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% … … 4214 4432 % I don't think this chapter style is supported any more, so I'm not 4215 4433 % updating it with the new noderef stuff. We'll see. --karl, 11aug03. 4216 % 4434 % 4217 4435 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} 4218 4436 % … … 4238 4456 % Section titles. These macros combine the section number parts and 4239 4457 % call the generic \sectionheading to do the printing. 4240 % 4458 % 4241 4459 \newskip\secheadingskip 4242 4460 \def\secheadingbreak{\dobreak \secheadingskip{-1000}} … … 4252 4470 4253 4471 % Print any size, any type, section title. 4254 % 4472 % 4255 4473 % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is 4256 4474 % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the 4257 4475 % section number. 4258 % 4476 % 4259 4477 \def\sectionheading#1#2#3#4{% 4260 4478 {% … … 4289 4507 \fi\fi\fi 4290 4508 % 4291 % Write the toc entry (before \donoderef). See comments in \ch fplain.4509 % Write the toc entry (before \donoderef). See comments in \chapmacro. 4292 4510 \writetocentry{\toctype\sectionlevel}{#1}{#4}% 4293 4511 % 4294 4512 % Write the node reference (= pdf destination for pdftex). 4295 % Again, see comments in \ch fplain.4513 % Again, see comments in \chapmacro. 4296 4514 \donoderef{#3}% 4515 % 4516 % Interline glue will be inserted when the vbox is completed. 4517 % That glue will be a valid breakpoint for the page, since it'll be 4518 % preceded by a whatsit (usually from the \donoderef, or from the 4519 % \writetocentry if there was no node). We don't want to allow that 4520 % break, since then the whatsits could end up on page n while the 4521 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. 4522 \nobreak 4297 4523 % 4298 4524 % Output the actual section heading. … … 4313 4539 % discardable item.) 4314 4540 \vskip-\parskip 4315 % 4316 % This \nobreak is purely so the last item on the list is a \penalty4317 % of 10000. This is so other code, for instance \parsebodycommon, can4318 % check for and avoid allowing breakpoints. Otherwise, it would4319 % insert a valid breakpoint between:4541 % 4542 % This is purely so the last item on the list is a known \penalty > 4543 % 10000. This is so \startdefun can avoid allowing breakpoints after 4544 % section headings. Otherwise, it would insert a valid breakpoint between: 4545 % 4320 4546 % @section sec-whatever 4321 4547 % @deffn def-whatever 4322 \ nobreak4548 \penalty 10001 4323 4549 } 4324 4550 … … 4329 4555 4330 4556 % Write an entry to the toc file, opening it if necessary. 4331 % Called from @chapter, etc. 4332 % 4557 % Called from @chapter, etc. 4558 % 4333 4559 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} 4334 4560 % We append the current node name (if any) and page number as additional … … 4336 4562 % read this. The node name is used in the pdf outlines as the 4337 4563 % destination to jump to. 4338 % 4564 % 4339 4565 % We open the .toc file for writing here instead of at @setfilename (or 4340 4566 % any other fixed time) so that @contents can be anywhere in the document. … … 4354 4580 % 4355 4581 \iflinks 4356 \toks0 = {#2}%4357 \toks2 = \expandafter{\lastnode}%4358 \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}%4359 {\the\toks2}{\noexpand\folio}}}%4360 \temp4582 {\atdummies 4583 \edef\temp{% 4584 \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% 4585 \temp 4586 }% 4361 4587 \fi 4362 4588 \fi … … 4371 4597 } 4372 4598 4599 4600 % These characters do not print properly in the Computer Modern roman 4601 % fonts, so we must take special care. This is more or less redundant 4602 % with the Texinfo input format setup at the end of this file. 4603 % 4604 \def\activecatcodes{% 4605 \catcode`\"=\active 4606 \catcode`\$=\active 4607 \catcode`\<=\active 4608 \catcode`\>=\active 4609 \catcode`\\=\active 4610 \catcode`\^=\active 4611 \catcode`\_=\active 4612 \catcode`\|=\active 4613 \catcode`\~=\active 4614 } 4615 4616 4617 % Read the toc file, which is essentially Texinfo input. 4618 \def\readtocfile{% 4619 \setupdatafile 4620 \activecatcodes 4621 \input \jobname.toc 4622 } 4623 4373 4624 \newskip\contentsrightmargin \contentsrightmargin=1in 4374 4625 \newcount\savepageno … … 4392 4643 \savepageno = \pageno 4393 4644 \begingroup % Set up to handle contents files properly. 4394 \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 4395 % We can't do this, because then an actual ^ in a section 4396 % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. 4397 %\catcode`\^=7 % to see ^^e4 as \"a etc. [email protected] 4398 \raggedbottom % Worry more about breakpoints than the bottom. 4645 \raggedbottom % Worry more about breakpoints than the bottom. 4399 4646 \advance\hsize by -\contentsrightmargin % Don't use the full line length. 4400 4647 % … … 4409 4656 \openin 1 \jobname.toc 4410 4657 \ifeof 1 \else 4411 \ input \jobname.toc4658 \readtocfile 4412 4659 \fi 4413 4660 \vfill \eject … … 4447 4694 \openin 1 \jobname.toc 4448 4695 \ifeof 1 \else 4449 \ input \jobname.toc4696 \readtocfile 4450 4697 \fi 4451 4698 \closein 1 … … 4467 4714 % (This space doesn't include the extra space that gets added after 4468 4715 % the label; that gets put in by \shortchapentry above.) 4469 % 4716 % 4470 4717 % We'd like to right-justify chapter numbers, but that looks strange 4471 4718 % with appendix letters. And right-justifying numbers and … … 4492 4739 % Appendices, in the main contents. 4493 4740 % Need the word Appendix, and a fixed-size box. 4494 % 4741 % 4495 4742 \def\appendixbox#1{% 4496 4743 % We use M since it's probably the widest letter. … … 4637 4884 \let\*=\ptexstar 4638 4885 \let\t=\ptext 4886 \let\frenchspacing=\plainfrenchspacing 4639 4887 % 4640 4888 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% … … 4665 4913 % 4666 4914 \def\aboveenvbreak{{% 4667 % =10000 instead of <10000 because of a special case in \itemzzz, q.v. 4915 % =10000 instead of <10000 because of a special case in \itemzzz and 4916 % \sectionheading, q.v. 4668 4917 \ifnum \lastpenalty=10000 \else 4669 4918 \advance\envskipamount by \parskip … … 4681 4930 \let\afterenvbreak = \aboveenvbreak 4682 4931 4683 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. 4932 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will 4933 % also clear it, so that its embedded environments do the narrowing again. 4684 4934 \let\nonarrowing=\relax 4685 4935 … … 4718 4968 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip 4719 4969 % Flag to tell @lisp, etc., not to narrow margin. 4720 \let\nonarrowing =\comment4970 \let\nonarrowing = t% 4721 4971 \vbox\bgroup 4722 4972 \baselineskip=0pt\parskip=0pt\lineskip=0pt … … 4758 5008 \parindent = 0pt 4759 5009 \emergencystretch = 0pt % don't try to avoid overfull boxes 4760 % @cartouche defines \nonarrowing to inhibit narrowing4761 % at next level down.4762 5010 \ifx\nonarrowing\relax 4763 5011 \advance \leftskip by \lispnarrowing 4764 5012 \exdentamount=\lispnarrowing 5013 \else 5014 \let\nonarrowing = \relax 4765 5015 \fi 4766 5016 \let\exdent=\nofillexdent … … 4862 5112 \advance\rightskip by \lispnarrowing 4863 5113 \exdentamount = \lispnarrowing 5114 \else 4864 5115 \let\nonarrowing = \relax 4865 5116 \fi … … 4869 5120 % We have retained a nonzero parskip for the environment, since we're 4870 5121 % doing normal filling. 4871 % 5122 % 4872 5123 \def\Equotation{% 4873 5124 \par … … 4954 5205 \endgroup 4955 5206 \def\setupverbatim{% 5207 \let\nonarrowing = t% 4956 5208 \nonfillstart 4957 \advance\leftskip by -\defbodyindent4958 5209 % Easiest (and conventionally used) font for verbatim 4959 5210 \tt … … 5026 5277 5027 5278 % @copying ... @end copying. 5028 % Save the text away for @insertcopying later. Many commands won't be 5029 % allowed in this context, but that's ok. 5279 % Save the text away for @insertcopying later. 5030 5280 % 5031 5281 % We save the uninterpreted tokens, rather than creating a box. … … 5036 5286 % possible is very desirable. 5037 5287 % 5038 \def\copying{\begingroup 5039 % Define a command to swallow text until we reach `@end copying'. 5040 % \ is the escape char in this texinfo.tex file, so it is the 5041 % delimiter for the command; @ will be the escape char when we read 5042 % it, but that doesn't matter. 5043 \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% 5044 % 5045 % We must preserve ^^M's in the input file; see \insertcopying below. 5046 \catcode`\^^M = \active 5047 \docopying 5048 } 5049 5050 % What we do to finish off the copying text. 5051 % 5052 \def\enddocopying{\endgroup\ignorespaces} 5053 5054 % @insertcopying. Here we must play games with ^^M's. On the one hand, 5055 % we need them to delimit commands such as `@end quotation', so they 5056 % must be active. On the other hand, we certainly don't want every 5057 % end-of-line to be a \par, as would happen with the normal active 5058 % definition of ^^M. On the third hand, two ^^M's in a row should still 5059 % generate a \par. 5060 % 5061 % Our approach is to make ^^M insert a space and a penalty1 normally; 5062 % then it can also check if \lastpenalty=1. If it does, then manually 5063 % do \par. 5064 % 5065 % This messes up the normal definitions of @c[omment], so we redefine 5066 % it. Similarly for @ignore. (These commands are used in the gcc 5067 % manual for man page generation.) 5068 % 5069 % Seems pretty fragile, most line-oriented commands will presumably 5070 % fail, but for the limited use of getting the copying text (which 5071 % should be quite simple) inserted, we can hope it's ok. 5072 % 5073 {\catcode`\^^M=\active % 5074 \gdef\insertcopying{\begingroup % 5075 \parindent = 0pt % looks wrong on title page 5076 \def^^M{% 5077 \ifnum \lastpenalty=1 % 5078 \par % 5079 \else % 5080 \space \penalty 1 % 5081 \fi % 5082 }% 5083 % 5084 % Fix @c[omment] for catcode 13 ^^M's. 5085 \def\c##1^^M{\ignorespaces}% 5086 \let\comment = \c % 5087 % 5088 % Don't bother jumping through all the hoops that \doignore does, it 5089 % would be very hard since the catcodes are already set. 5090 \long\def\ignore##1\end ignore{\ignorespaces}% 5091 % 5092 \copyingtext % 5093 \endgroup}% 5288 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} 5289 \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} 5290 % 5291 \def\insertcopying{% 5292 \begingroup 5293 \parindent = 0pt % paragraph indentation looks wrong on title page 5294 \scanexp\copyingtext 5295 \endgroup 5094 5296 } 5095 5297 … … 5109 5311 % which is there to keep the function description together with its 5110 5312 % header. But if there's nothing but headers, we need to allow a 5111 % break somewhere. Check for penalty 10002 (inserted by 5112 % \defargscommonending) instead of 10000, since the sectioning 5113 % commands insert a \penalty10000, and we don't want to allow a break 5114 % between a section heading and a defun. 5313 % break somewhere. Check specifically for penalty 10002, inserted 5314 % by \defargscommonending, instead of 10000, since the sectioning 5315 % commands also insert a nobreak penalty, and we don't want to allow 5316 % a break between a section heading and a defun. 5317 % 5115 5318 \ifnum\lastpenalty=10002 \penalty2000 \fi 5116 5319 % … … 5272 5475 % #2 is the return type, if any. 5273 5476 % #3 is the function name. 5274 % 5477 % 5275 5478 % We are followed by (but not passed) the arguments, if any. 5276 5479 % … … 5330 5533 % the argument list (groff manual), and ttsl and tt are not very 5331 5534 % distinguishable. Prevent hyphenation at `-' chars. 5332 % 5535 % 5333 5536 \def\defunargs#1{% 5334 % use sl by default (not ttsl), 5537 % use sl by default (not ttsl), 5335 5538 % tt for the names. 5336 5539 \df \sl \hyphenchar\font=0 … … 5436 5639 \newwrite\macscribble 5437 5640 \def\scantokens#1{% 5438 \toks0={#1 \endinput}%5641 \toks0={#1}% 5439 5642 \immediate\openout\macscribble=\jobname.tmp 5440 5643 \immediate\write\macscribble{\the\toks0}% … … 5449 5652 \let\xeatspaces\eatspaces 5450 5653 % Undo catcode changes of \startcontents and \doprintindex 5451 \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ 5654 % When called from @insertcopying or (short)caption, we need active 5655 % backslash to get it printed correctly. Previously, we had 5656 % \catcode`\\=\other instead. We'll see whether a problem appears 5657 % with macro expansion. --kasal, 19aug04 5658 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ 5452 5659 % ... and \example 5453 5660 \spaceisspace … … 5461 5668 } 5462 5669 5670 \def\scanexp#1{% 5671 \edef\temp{\noexpand\scanmacro{#1}}% 5672 \temp 5673 } 5674 5463 5675 \newcount\paramno % Count of parameters 5464 5676 \newtoks\macname % Macro name 5465 5677 \newif\ifrecursive % Is it recursive? 5466 \def\macrolist{} % List of all defined macros in the form 5467 % \do\macro1\do\macro2... 5678 5679 % List of all defined macros in the form 5680 % \definedummyword\macro1\definedummyword\macro2... 5681 % Currently is also contains all @aliases; the list can be split 5682 % if there is a need. 5683 \def\macrolist{} 5684 5685 % Add the macro to \macrolist 5686 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} 5687 \def\addtomacrolistxxx#1{% 5688 \toks0 = \expandafter{\macrolist\definedummyword#1}% 5689 \xdef\macrolist{\the\toks0}% 5690 } 5468 5691 5469 5692 % Utility routines. 5470 % This does \let #1 = #2, except with \csnames. 5693 % This does \let #1 = #2, with \csnames; that is, 5694 % \let \csname#1\endcsname = \csname#2\endcsname 5695 % (except of course we have to play expansion games). 5696 % 5471 5697 \def\cslet#1#2{% 5472 \expandafter\expandafter 5473 \expandafter\let 5474 \expandafter\expandafter 5475 \csname#1\endcsname 5476 \csname#2\endcsname} 5698 \expandafter\let 5699 \csname#1\expandafter\endcsname 5700 \csname#2\endcsname 5701 } 5477 5702 5478 5703 % Trim leading and trailing spaces off a string. … … 5501 5726 % body, and then making it the \newlinechar in \scanmacro. 5502 5727 5503 \def\macrobodyctxt{% 5504 \catcode`\~=\other 5728 \def\scanctxt{% 5729 \catcode`\"=\other 5730 \catcode`\+=\other 5731 \catcode`\<=\other 5732 \catcode`\>=\other 5733 \catcode`\@=\other 5505 5734 \catcode`\^=\other 5506 5735 \catcode`\_=\other 5507 5736 \catcode`\|=\other 5508 \catcode`\<=\other 5509 \catcode`\>=\other 5510 \catcode`\+=\other 5737 \catcode`\~=\other 5738 } 5739 5740 \def\scanargctxt{% 5741 \scanctxt 5742 \catcode`\\=\other 5743 \catcode`\^^M=\other 5744 } 5745 5746 \def\macrobodyctxt{% 5747 \scanctxt 5511 5748 \catcode`\{=\other 5512 5749 \catcode`\}=\other 5513 \catcode`\@=\other5514 5750 \catcode`\^^M=\other 5515 \usembodybackslash} 5751 \usembodybackslash 5752 } 5516 5753 5517 5754 \def\macroargctxt{% 5518 \catcode`\~=\other 5519 \catcode`\^=\other 5520 \catcode`\_=\other 5521 \catcode`\|=\other 5522 \catcode`\<=\other 5523 \catcode`\>=\other 5524 \catcode`\+=\other 5525 \catcode`\@=\other 5526 \catcode`\\=\other} 5755 \scanctxt 5756 \catcode`\\=\other 5757 } 5527 5758 5528 5759 % \mbodybackslash is the definition of \ in @macro bodies. … … 5555 5786 \global\cslet{macsave.\the\macname}{\the\macname}% 5556 5787 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% 5557 % Add the macroname to \macrolist 5558 \toks0 = \expandafter{\macrolist\do}% 5559 \xdef\macrolist{\the\toks0 5560 \expandafter\noexpand\csname\the\macname\endcsname}% 5788 \addtomacrolist{\the\macname}% 5561 5789 \fi 5562 5790 \begingroup \macrobodyctxt … … 5572 5800 \begingroup 5573 5801 \expandafter\let\csname#1\endcsname \relax 5574 \let\d o\unmacrodo5802 \let\definedummyword\unmacrodo 5575 5803 \xdef\macrolist{\macrolist}% 5576 5804 \endgroup … … 5584 5812 % 5585 5813 \def\unmacrodo#1{% 5586 \ifx #1\relax5814 \ifx #1\relax 5587 5815 % remove this 5588 5816 \else 5589 \noexpand\d o \noexpand#1%5817 \noexpand\definedummyword \noexpand#1% 5590 5818 \fi 5591 5819 } … … 5700 5928 % line. Whatever was read is then fed to the next control sequence 5701 5929 % as an argument (by \parsebrace or \parsearg) 5702 \def\braceorline#1{\let\ next=#1\futurelet\nchar\braceorlinexxx}5930 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} 5703 5931 \def\braceorlinexxx{% 5704 5932 \ifx\nchar\bgroup\else 5705 5933 \expandafter\parsearg 5706 \fi \next} 5707 5708 % We mant to disable all macros during \shipout so that they are not 5709 % expanded by \write. 5710 \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% 5711 \edef\next{\macrolist}\expandafter\endgroup\next} 5934 \fi \macnamexxx} 5712 5935 5713 5936 … … 5720 5943 {% 5721 5944 \expandafter\let\obeyedspace=\empty 5945 \addtomacrolist{#1}% 5722 5946 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% 5723 5947 }% … … 5739 5963 5740 5964 % @node's only job in TeX is to define \lastnode, which is used in 5741 % cross-references. 5742 \parseargdef\node{\checkenv{}\nodexxx #1,\finishnodeparse} 5743 \def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}} 5965 % cross-references. The @node line might or might not have commas, and 5966 % might or might not have spaces before the first comma, like: 5967 % @node foo , bar , ... 5968 % We don't want such trailing spaces in the node name. 5969 % 5970 \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} 5971 % 5972 % also remove a trailing comma, in case of something like this: 5973 % @node Help-Cross, , , Cross-refs 5974 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} 5975 \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} 5976 5744 5977 \let\nwnode=\node 5745 5978 \let\lastnode=\empty … … 5747 5980 % Write a cross-reference definition for the current node. #1 is the 5748 5981 % type (Ynumbered, Yappendix, Ynothing). 5749 % 5982 % 5750 5983 \def\donoderef#1{% 5751 5984 \ifx\lastnode\empty\else … … 5770 6003 % empty for anchors. 5771 6004 % 3) NAME-pg - the page number. 5772 % 6005 % 5773 6006 % This is called from \donoderef, \anchor, and \dofloat. In the case of 5774 6007 % floats, there is an additional part, which is not written here: 5775 6008 % 4) NAME-lof - the text as it should appear in a @listoffloats. 5776 % 6009 % 5777 6010 \def\setref#1#2{% 5778 6011 \pdfmkdest{#1}% … … 5780 6013 {% 5781 6014 \atdummies % preserve commands, but don't expand them 5782 \turnoffactive5783 \otherbackslash5784 6015 \edef\writexrdef##1##2{% 5785 6016 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef … … 5835 6066 \leavevmode 5836 6067 \getfilename{#4}% 5837 {\turnoffactive \otherbackslash 6068 {\turnoffactive 6069 % See comments at \activebackslashdouble. 6070 {\activebackslashdouble \xdef\pdfxrefdest{#1}% 6071 \backslashparens\pdfxrefdest}% 6072 % 5838 6073 \ifnum\filenamelength>0 5839 6074 \startlink attr{/Border [0 0 0]}% 5840 goto file{\the\filename.pdf} name{ #1}%6075 goto file{\the\filename.pdf} name{\pdfxrefdest}% 5841 6076 \else 5842 6077 \startlink attr{/Border [0 0 0]}% 5843 goto name{\pdfmkpgn{ #1}}%6078 goto name{\pdfmkpgn{\pdfxrefdest}}% 5844 6079 \fi 5845 6080 }% … … 5855 6090 \indexnofonts 5856 6091 \turnoffactive 5857 \otherbackslash5858 6092 \expandafter\global\expandafter\let\expandafter\Xthisreftitle 5859 6093 \csname XR#1-title\endcsname … … 5863 6097 % print it instead of our usual "Figure 1.2". 5864 6098 \ifdim\wd0 = 0pt 5865 \refx{#1-snt} %6099 \refx{#1-snt}{}% 5866 6100 \else 5867 6101 \printedrefname … … 5869 6103 % 5870 6104 % if the user also gave the printed manual name (fifth arg), append 5871 % "in MANUALNAME". 6105 % "in MANUALNAME". 5872 6106 \ifdim \wd1 > 0pt 5873 6107 \space \putwordin{} \cite{\printedmanual}% … … 5875 6109 \else 5876 6110 % node/anchor (non-float) references. 5877 % 6111 % 5878 6112 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not 5879 6113 % insert empty discretionaries after hyphens, which means that it will … … 5890 6124 % printing. So we \turnoffactive for the \refx-snt, back on for the 5891 6125 % printing, back off for the \refx-pg. 5892 {\turnoffactive \otherbackslash6126 {\turnoffactive 5893 6127 % Only output a following space if the -snt ref is nonempty; for 5894 6128 % @unnumbered and @anchor, it won't be. … … 5903 6137 % 5904 6138 % output the `page 3'. 5905 \turnoffactive \ otherbackslash \putwordpage\tie\refx{#1-pg}{}%6139 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% 5906 6140 \fi 5907 6141 \fi … … 5986 6220 \expandafter\let\expandafter\floatlist 5987 6221 \csname floatlist\iffloattype\endcsname 5988 % 6222 % 5989 6223 % Is this the first time we've seen this float type? 5990 6224 \expandafter\ifx\floatlist\relax … … 6002 6236 6003 6237 % Read the last existing aux file, if any. No error if none exists. 6004 % 6238 % 6005 6239 \def\tryauxfile{% 6006 6240 \openin 1 \jobname.aux 6007 6241 \ifeof 1 \else 6008 \read auxfile6242 \readdatafile{aux}% 6009 6243 \global\havexrefstrue 6010 6244 \fi … … 6012 6246 } 6013 6247 6014 \def\ readauxfile{\begingroup6248 \def\setupdatafile{% 6015 6249 \catcode`\^^@=\other 6016 6250 \catcode`\^^A=\other … … 6081 6315 % Make the characters 128-255 be printing characters. 6082 6316 {% 6083 \count 6317 \count1=128 6084 6318 \def\loop{% 6085 \catcode\count 6086 \advance\count 6087 \ifnum \count 6319 \catcode\count1=\other 6320 \advance\count1 by 1 6321 \ifnum \count1<256 \loop \fi 6088 6322 }% 6089 6323 }% … … 6093 6327 \catcode`\}=2 6094 6328 \catcode`\@=0 6095 % 6096 \input \jobname.aux 6329 } 6330 6331 \def\readdatafile#1{% 6332 \begingroup 6333 \setupdatafile 6334 \input\jobname.#1 6097 6335 \endgroup} 6098 6099 6336 6100 6337 \message{insertions,} … … 6290 6527 \nobreak\vskip\parskip 6291 6528 \nobreak 6292 \line\bgroup \hss6529 \line\bgroup 6293 6530 \fi 6294 6531 % … … 6303 6540 \fi 6304 6541 % 6305 \ifimagevmode \ hss \egroup \bigbreak \fi % space after the image6542 \ifimagevmode \egroup \bigbreak \fi % space after the image 6306 6543 \endgroup} 6307 6544 6308 6545 6309 % @float FLOATTYPE,LOC ... @end float for displayed figures, tables, etc. 6310 % We don't actually implement floating yet, we just plop the float "here". 6311 % But it seemed the best name for the future. 6312 % 6313 \envparseargdef\float{\dofloat #1,,,\finish} 6546 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, 6547 % etc. We don't actually implement floating yet, we always include the 6548 % float "here". But it seemed the best name for the future. 6549 % 6550 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} 6551 6552 % There may be a space before second and/or third parameter; delete it. 6553 \def\eatcommaspace#1, {#1,} 6314 6554 6315 6555 % #1 is the optional FLOATTYPE, the text label for this float, typically 6316 6556 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, 6317 6557 % this float will not be numbered and cannot be referred to. 6318 % 6558 % 6319 6559 % #2 is the optional xref label. Also must be present for the float to 6320 6560 % be referable. 6321 % 6561 % 6322 6562 % #3 is the optional positioning argument; for now, it is ignored. It 6323 6563 % will somehow specify the positions allowed to float to (here, top, bottom). 6324 % 6564 % 6325 6565 % We keep a separate counter for each FLOATTYPE, which we reset at each 6326 6566 % chapter-level command. … … 6332 6572 % 6333 6573 % don't lose footnotes inside @float. 6574 % 6575 % BEWARE: when the floats start float, we have to issue warning whenever an 6576 % insert appears inside a float which could possibly float. --kasal, 26may04 6577 % 6334 6578 \startsavinginserts 6335 6579 % … … 6358 6602 % We want each FLOATTYPE to be numbered separately (Figure 1, 6359 6603 % Table 1, Figure 2, ...). (And if no label, no number.) 6360 % 6604 % 6361 6605 \expandafter\getfloatno\csname\safefloattype floatno\endcsname 6362 6606 \global\advance\floatno by 1 … … 6368 6612 % node and anchor labels. And \xrdef uses it to construct the 6369 6613 % lists of floats. 6370 % 6614 % 6371 6615 \edef\thissection{\floatmagic=\safefloattype}% 6372 6616 \setref{\floatlabel}{Yfloat}% … … 6416 6660 % 6417 6661 % caption text. 6418 \appendtomacro\captionline \thiscaption6662 \appendtomacro\captionline{\scanexp\thiscaption}% 6419 6663 \fi 6420 6664 % … … 6424 6668 \vskip.5\parskip 6425 6669 \captionline 6670 % 6671 % Space below caption. 6672 \vskip\parskip 6426 6673 \fi 6427 6674 % … … 6433 6680 % caption if specified, else the full caption if specified, else nothing. 6434 6681 {% 6435 \atdummies \turnoffactive \otherbackslash 6436 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{% 6437 \floatident 6438 \ifx\thisshortcaption\empty 6439 \ifx\thiscaption\empty \else : \thiscaption \fi 6440 \else 6441 : \thisshortcaption 6442 \fi 6443 }}% 6682 \atdummies 6683 % 6684 % since we read the caption text in the macro world, where ^^M 6685 % is turned into a normal character, we have to scan it back, so 6686 % we don't write the literal three characters "^^M" into the aux file. 6687 \scanexp{% 6688 \xdef\noexpand\gtemp{% 6689 \ifx\thisshortcaption\empty 6690 \thiscaption 6691 \else 6692 \thisshortcaption 6693 \fi 6694 }% 6695 }% 6696 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident 6697 \ifx\gtemp\empty \else : \gtemp \fi}}% 6444 6698 }% 6445 6699 \fi 6446 %6447 % Space below caption, if we printed anything.6448 \ifx\printedsomething\empty \else \vskip\parskip \fi6449 6700 \egroup % end of \vtop 6701 % 6702 % place the captured inserts 6703 % 6704 % BEWARE: when the floats start floating, we have to issue warning 6705 % whenever an insert appears inside a float which could possibly 6706 % float. --kasal, 26may04 6707 % 6450 6708 \checkinserts 6451 6709 } 6452 6710 6453 6711 % Append the tokens #2 to the definition of macro #1, not expanding either. 6454 % 6455 \newtoks\appendtomacroAtoks 6456 \newtoks\appendtomacroBtoks 6712 % 6457 6713 \def\appendtomacro#1#2{% 6458 \ appendtomacroAtoks = \expandafter{#1}%6459 \appendtomacroBtoks = {#2}% 6460 \edef#1{\the\appendtomacroAtoks \the\appendtomacroBtoks}% 6461 } 6462 6463 % @caption, @shortcaption are easy. 6464 % 6465 \ long\def\caption#1{\checkenv\float \def\thiscaption{#1}}6466 \def\ shortcaption#1{\checkenv\float \def\thisshortcaption{#1}}6714 \expandafter\def\expandafter#1\expandafter{#1#2}% 6715 } 6716 6717 % @caption, @shortcaption 6718 % 6719 \def\caption{\docaption\thiscaption} 6720 \def\shortcaption{\docaption\thisshortcaption} 6721 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} 6722 \def\defcaption#1#2{\egroup \def#1{#2}} 6467 6723 6468 6724 % The parameter is the control sequence identifying the counter we are … … 6483 6739 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we 6484 6740 % first read the @float command. 6485 % 6741 % 6486 6742 \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% 6487 6743 … … 6493 6749 % which is true if #1 represents a float ref. That is, the magic 6494 6750 % \thissection value which we \setref above. 6495 % 6751 % 6496 6752 \def\iffloat#1{\expandafter\doiffloat#1==\finish} 6497 6753 % 6498 6754 % #1 is (maybe) the \floatmagic string. If so, #2 will be the 6499 6755 % (safe) float type for this float. We set \iffloattype to #2. 6500 % 6756 % 6501 6757 \def\doiffloat#1=#2=#3\finish{% 6502 6758 \def\temp{#1}% … … 6506 6762 6507 6763 % @listoffloats FLOATTYPE - print a list of floats like a table of contents. 6508 % 6764 % 6509 6765 \parseargdef\listoffloats{% 6510 6766 \def\floattype{#1}% floattype … … 6536 6792 % aux file. We strip off the -title and look up \XRLABEL-lof, which 6537 6793 % has the text we're supposed to typeset here. 6538 % 6794 % 6539 6795 % Figures without xref labels will not be included in the list (since 6540 6796 % they won't appear in the aux file). 6541 % 6797 % 6542 6798 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} 6543 6799 \def\listoffloatsdoentry#1-title\finish{{% … … 6616 6872 } 6617 6873 6618 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;6619 % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)6620 % physical page width.6874 % Parameters in order: 1) textheight; 2) textwidth; 6875 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; 6876 % 7) physical page height; 8) physical page width. 6621 6877 % 6622 6878 % We also call \setleading{\textleading}, so the caller should define … … 6665 6921 }} 6666 6922 6667 % Use @smallbook to reset parameters for 7x9. 5 (or so) format.6923 % Use @smallbook to reset parameters for 7x9.25 trim size. 6668 6924 \def\smallbook{{\globaldefs = 1 6669 6925 \parskip = 2pt plus 1pt … … 6680 6936 \contentsrightmargin = 0pt 6681 6937 \defbodyindent = .5cm 6938 }} 6939 6940 % Use @smallerbook to reset parameters for 6x9 trim size. 6941 % (Just testing, parameters still in flux.) 6942 \def\smallerbook{{\globaldefs = 1 6943 \parskip = 1.5pt plus 1pt 6944 \textleading = 12pt 6945 % 6946 \internalpagesizes{7.4in}{4.8in}% 6947 {-.2in}{-.4in}% 6948 {0pt}{14pt}% 6949 {9in}{6in}% 6950 % 6951 \lispnarrowing = 0.25in 6952 \tolerance = 700 6953 \hfuzz = 1pt 6954 \contentsrightmargin = 0pt 6955 \defbodyindent = .4cm 6682 6956 }} 6683 6957 … … 6834 7108 \catcode`\_=\active 6835 7109 \def_{\ifusingtt\normalunderscore\_} 7110 \let\realunder=_ 6836 7111 % Subroutine for the previous macro. 6837 7112 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } … … 6856 7131 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} 6857 7132 7133 % Used sometimes to turn off (effectively) the active characters even after 7134 % parsing them. 7135 \def\turnoffactive{% 7136 \normalturnoffactive 7137 \otherbackslash 7138 } 7139 6858 7140 \catcode`\@=0 6859 7141 … … 6863 7145 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work 6864 7146 7147 % \realbackslash is an actual character `\' with catcode other, and 7148 % \doublebackslash is two of them (for the pdf outlines). 7149 {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} 7150 7151 % In texinfo, backslash is an active character; it prints the backslash 7152 % in fixed width font. 7153 \catcode`\\=\active 7154 @def@normalbackslash{{@tt@backslashcurfont}} 7155 % On startup, @fixbackslash assigns: 7156 % @let \ = @normalbackslash 7157 6865 7158 % \rawbackslash defines an active \ to do \backslashcurfont. 6866 7159 % \otherbackslash defines an active \ to be a literal `\' character with 6867 7160 % catcode other. 6868 {\catcode`\\=\active 6869 @gdef@rawbackslash{@let\=@backslashcurfont} 6870 @gdef@otherbackslash{@let\=@realbackslash} 6871 } 6872 6873 % \realbackslash is an actual character `\' with catcode other. 6874 {\catcode`\\=\other @gdef@realbackslash{\}} 6875 6876 % \normalbackslash outputs one backslash in fixed width font. 6877 \def\normalbackslash{{\tt\backslashcurfont}} 6878 6879 \catcode`\\=\active 6880 6881 % Used sometimes to turn off (effectively) the active characters 6882 % even after parsing them. 6883 @def@turnoffactive{% 7161 @gdef@rawbackslash{@let\=@backslashcurfont} 7162 @gdef@otherbackslash{@let\=@realbackslash} 7163 7164 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of 7165 % the literal character `\'. 7166 % 7167 @def@normalturnoffactive{% 7168 @let\=@normalbackslash 6884 7169 @let"=@normaldoublequote 6885 @let\=@realbackslash6886 7170 @let~=@normaltilde 6887 7171 @let^=@normalcaret … … 6895 7179 } 6896 7180 6897 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of6898 % the literal character `\'. (Thus, \ is not expandable when this is in6899 % effect.)6900 %6901 @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}6902 6903 7181 % Make _ and + \other characters, temporarily. 6904 7182 % This is canceled by @fixbackslash. … … 6913 7191 6914 7192 % On the other hand, perhaps the file did not have a `\input texinfo'. Then 6915 % the first `\ {in the file would cause an error. This macro tries to fix7193 % the first `\' in the file would cause an error. This macro tries to fix 6916 7194 % that, assuming it is called before the first `\' could plausibly occur. 6917 % Also back turnon active characters that might appear in the input7195 % Also turn back on active characters that might appear in the input 6918 7196 % file name, in case not using a pre-dumped format. 6919 7197 %
Note:
See TracChangeset
for help on using the changeset viewer.