Mercurial > gnulib
comparison build-aux/texinfo.tex @ 14397:b105fc8bafd1
update from texinfo
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Sun, 27 Feb 2011 17:03:03 -0800 |
parents | 27d889831e45 |
children | bcaffcfa06a0 |
comparison
equal
deleted
inserted
replaced
14396:b1384cbe7082 | 14397:b105fc8bafd1 |
---|---|
1 % texinfo.tex -- TeX macros to handle Texinfo files. | 1 % texinfo.tex -- TeX macros to handle Texinfo files. |
2 % | 2 % |
3 % Load plain if necessary, i.e., if running under initex. | 3 % Load plain if necessary, i.e., if running under initex. |
4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi | 4 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi |
5 % | 5 % |
6 \def\texinfoversion{2011-02-14.11} | 6 \def\texinfoversion{2011-02-24.09} |
7 % | 7 % |
8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
10 % 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. | 10 % 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
11 % | 11 % |
216 \tracingparagraphs1 | 216 \tracingparagraphs1 |
217 \tracingoutput1 | 217 \tracingoutput1 |
218 \tracingmacros2 | 218 \tracingmacros2 |
219 \tracingrestores1 | 219 \tracingrestores1 |
220 \showboxbreadth\maxdimen \showboxdepth\maxdimen | 220 \showboxbreadth\maxdimen \showboxdepth\maxdimen |
221 \ifx\eTeXversion\undefined\else % etex gives us more logging | 221 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging |
222 \tracingscantokens1 | 222 \tracingscantokens1 |
223 \tracingifs1 | 223 \tracingifs1 |
224 \tracinggroups1 | 224 \tracinggroups1 |
225 \tracingnesting2 | 225 \tracingnesting2 |
226 \tracingassigns1 | 226 \tracingassigns1 |
609 \def\temp{#1}% | 609 \def\temp{#1}% |
610 \ifx\temp\onword \plainfrenchspacing | 610 \ifx\temp\onword \plainfrenchspacing |
611 \else\ifx\temp\offword \plainnonfrenchspacing | 611 \else\ifx\temp\offword \plainnonfrenchspacing |
612 \else | 612 \else |
613 \errhelp = \EMsimple | 613 \errhelp = \EMsimple |
614 \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% | 614 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% |
615 \fi\fi | 615 \fi\fi |
616 } | 616 } |
617 | 617 |
618 % @w prevents a word break. Without the \leavevmode, @w at the | 618 % @w prevents a word break. Without the \leavevmode, @w at the |
619 % beginning of a paragraph, when TeX is still in vertical mode, would | 619 % beginning of a paragraph, when TeX is still in vertical mode, would |
1080 \newcount\countA | 1080 \newcount\countA |
1081 \newif\ifpdf | 1081 \newif\ifpdf |
1082 \newif\ifpdfmakepagedest | 1082 \newif\ifpdfmakepagedest |
1083 | 1083 |
1084 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 | 1084 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 |
1085 % can be set). So we test for \relax and 0 as well as \undefined, | 1085 % can be set). So we test for \relax and 0 as well as being undefined. |
1086 % borrowed from ifpdf.sty. | 1086 \ifx\pdfoutput\thisisundefined |
1087 \ifx\pdfoutput\undefined | |
1088 \else | 1087 \else |
1089 \ifx\pdfoutput\relax | 1088 \ifx\pdfoutput\relax |
1090 \else | 1089 \else |
1091 \ifcase\pdfoutput | 1090 \ifcase\pdfoutput |
1092 \else | 1091 \else |
1514 \expandafter\let\csname cmapOT1TT\endcsname\gobble | 1513 \expandafter\let\csname cmapOT1TT\endcsname\gobble |
1515 | 1514 |
1516 % if we are producing pdf, and we have \pdffontattr, then define cmaps. | 1515 % if we are producing pdf, and we have \pdffontattr, then define cmaps. |
1517 % (\pdffontattr was introduced many years ago, but people still run | 1516 % (\pdffontattr was introduced many years ago, but people still run |
1518 % older pdftex's; it's easy to conditionalize, so we do.) | 1517 % older pdftex's; it's easy to conditionalize, so we do.) |
1519 \ifpdf \ifx\pdffontattr\undefined \else | 1518 \ifpdf \ifx\pdffontattr\thisisundefined \else |
1520 \begingroup | 1519 \begingroup |
1521 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. | 1520 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. |
1522 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap | 1521 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap |
1523 %%DocumentNeededResources: ProcSet (CIDInit) | 1522 %%DocumentNeededResources: ProcSet (CIDInit) |
1524 %%IncludeResource: ProcSet (CIDInit) | 1523 %%IncludeResource: ProcSet (CIDInit) |
1781 % emacs-page end of cmaps | 1780 % emacs-page end of cmaps |
1782 | 1781 |
1783 % Use cm as the default font prefix. | 1782 % Use cm as the default font prefix. |
1784 % To specify the font prefix, you must define \fontprefix | 1783 % To specify the font prefix, you must define \fontprefix |
1785 % before you read in texinfo.tex. | 1784 % before you read in texinfo.tex. |
1786 \ifx\fontprefix\undefined | 1785 \ifx\fontprefix\thisisundefined |
1787 \def\fontprefix{cm} | 1786 \def\fontprefix{cm} |
1788 \fi | 1787 \fi |
1789 % Support font families that don't use the same naming scheme as CM. | 1788 % Support font families that don't use the same naming scheme as CM. |
1790 \def\rmshape{r} | 1789 \def\rmshape{r} |
1791 \def\rmbshape{bx} %where the normal face is bold | 1790 \def\rmbshape{bx} %where the normal face is bold |
2295 \let\markupsetuplqverbatim \markupsetcodequoteleft | 2294 \let\markupsetuplqverbatim \markupsetcodequoteleft |
2296 \let\markupsetuprqverbatim \markupsetcodequoteright | 2295 \let\markupsetuprqverbatim \markupsetcodequoteright |
2297 | 2296 |
2298 \let\markupsetuplqkbd \markupsetnoligaturesquoteleft | 2297 \let\markupsetuplqkbd \markupsetnoligaturesquoteleft |
2299 | 2298 |
2300 % Allow an option to not replace quotes with a regular directed right | 2299 % Allow an option to not use regular directed right quote/apostrophe |
2301 % quote/apostrophe (char 0x27), but instead use the undirected quote | 2300 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). |
2302 % from cmtt (char 0x0d). The undirected quote is ugly, so don't make it | 2301 % The undirected quote is ugly, so don't make it the default, but it |
2303 % the default, but it works for pasting with more pdf viewers (at least | 2302 % works for pasting with more pdf viewers (at least evince), the |
2304 % evince), the lilypond developers report. xpdf does work with the | 2303 % lilypond developers report. xpdf does work with the regular 0x27. |
2305 % regular 0x27. | |
2306 % | 2304 % |
2307 \def\codequoteright{% | 2305 \def\codequoteright{% |
2308 \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax | 2306 \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax |
2309 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax | 2307 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax |
2310 '% | 2308 '% |
2322 % [Knuth] pp. 380,381,391 | 2320 % [Knuth] pp. 380,381,391 |
2323 % \relax disables Spanish ligatures ?` and !` of \tt font. | 2321 % \relax disables Spanish ligatures ?` and !` of \tt font. |
2324 \relax`% | 2322 \relax`% |
2325 \else \char'22 \fi | 2323 \else \char'22 \fi |
2326 \else \char'22 \fi | 2324 \else \char'22 \fi |
2325 } | |
2326 | |
2327 % Commands to set the quote options. | |
2328 % | |
2329 \parseargdef\codequoteundirected{% | |
2330 \def\temp{#1}% | |
2331 \ifx\temp\onword | |
2332 \expandafter\let\csname SETtxicodequoteundirected\endcsname | |
2333 = t% | |
2334 \else\ifx\temp\offword | |
2335 \expandafter\let\csname SETtxicodequoteundirected\endcsname | |
2336 = \relax | |
2337 \else | |
2338 \errhelp = \EMsimple | |
2339 \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% | |
2340 \fi\fi | |
2341 } | |
2342 % | |
2343 \parseargdef\codequotebacktick{% | |
2344 \def\temp{#1}% | |
2345 \ifx\temp\onword | |
2346 \expandafter\let\csname SETtxicodequotebacktick\endcsname | |
2347 = t% | |
2348 \else\ifx\temp\offword | |
2349 \expandafter\let\csname SETtxicodequotebacktick\endcsname | |
2350 = \relax | |
2351 \else | |
2352 \errhelp = \EMsimple | |
2353 \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% | |
2354 \fi\fi | |
2327 } | 2355 } |
2328 | 2356 |
2329 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. | 2357 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. |
2330 \def\noligaturesquoteleft{\relax\lq} | 2358 \def\noligaturesquoteleft{\relax\lq} |
2331 | 2359 |
2525 \allowcodebreakstrue | 2553 \allowcodebreakstrue |
2526 \else\ifx\txiarg\keywordfalse | 2554 \else\ifx\txiarg\keywordfalse |
2527 \allowcodebreaksfalse | 2555 \allowcodebreaksfalse |
2528 \else | 2556 \else |
2529 \errhelp = \EMsimple | 2557 \errhelp = \EMsimple |
2530 \errmessage{Unknown @allowcodebreaks option `\txiarg'}% | 2558 \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% |
2531 \fi\fi | 2559 \fi\fi |
2532 } | 2560 } |
2533 | 2561 |
2534 % @uref (abbreviation for `urlref') takes an optional (comma-separated) | 2562 % @uref (abbreviation for `urlref') takes an optional (comma-separated) |
2535 % second argument specifying the text to display and an optional third | 2563 % second argument specifying the text to display and an optional third |
3107 | 3135 |
3108 % Laurent Siebenmann reports \Orb undefined with: | 3136 % Laurent Siebenmann reports \Orb undefined with: |
3109 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 | 3137 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 |
3110 % so we'll define it if necessary. | 3138 % so we'll define it if necessary. |
3111 % | 3139 % |
3112 \ifx\Orb\undefined | 3140 \ifx\Orb\thisisundefined |
3113 \def\Orb{\mathhexbox20D} | 3141 \def\Orb{\mathhexbox20D} |
3114 \fi | 3142 \fi |
3115 | 3143 |
3116 % Quotes. | 3144 % Quotes. |
3117 \chardef\quotedblleft="5C | 3145 \chardef\quotedblleft="5C |
3382 | 3410 |
3383 % Subroutines used in generating headings | 3411 % Subroutines used in generating headings |
3384 % This produces Day Month Year style of output. | 3412 % This produces Day Month Year style of output. |
3385 % Only define if not already defined, in case a txi-??.tex file has set | 3413 % Only define if not already defined, in case a txi-??.tex file has set |
3386 % up a different format (e.g., txi-cs.tex does this). | 3414 % up a different format (e.g., txi-cs.tex does this). |
3387 \ifx\today\undefined | 3415 \ifx\today\thisisundefined |
3388 \def\today{% | 3416 \def\today{% |
3389 \number\day\space | 3417 \number\day\space |
3390 \ifcase\month | 3418 \ifcase\month |
3391 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr | 3419 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr |
3392 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug | 3420 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug |
6463 % We have retained a nonzero parskip for the environment, since we're | 6491 % We have retained a nonzero parskip for the environment, since we're |
6464 % doing normal filling. | 6492 % doing normal filling. |
6465 % | 6493 % |
6466 \def\Equotation{% | 6494 \def\Equotation{% |
6467 \par | 6495 \par |
6468 \ifx\quotationauthor\undefined\else | 6496 \ifx\quotationauthor\thisisundefined\else |
6469 % indent a bit. | 6497 % indent a bit. |
6470 \leftline{\kern 2\leftskip \sl ---\quotationauthor}% | 6498 \leftline{\kern 2\leftskip \sl ---\quotationauthor}% |
6471 \fi | 6499 \fi |
6472 {\parskip=0pt \afterenvbreak}% | 6500 {\parskip=0pt \afterenvbreak}% |
6473 } | 6501 } |
6998 \message{macros,} | 7026 \message{macros,} |
6999 % @macro. | 7027 % @macro. |
7000 | 7028 |
7001 % To do this right we need a feature of e-TeX, \scantokens, | 7029 % To do this right we need a feature of e-TeX, \scantokens, |
7002 % which we arrange to emulate with a temporary file in ordinary TeX. | 7030 % which we arrange to emulate with a temporary file in ordinary TeX. |
7003 \ifx\eTeXversion\undefined | 7031 \ifx\eTeXversion\thisisundefined |
7004 \newwrite\macscribble | 7032 \newwrite\macscribble |
7005 \def\scantokens#1{% | 7033 \def\scantokens#1{% |
7006 \toks0={#1}% | 7034 \toks0={#1}% |
7007 \immediate\openout\macscribble=\jobname.tmp | 7035 \immediate\openout\macscribble=\jobname.tmp |
7008 \immediate\write\macscribble{\the\toks0}% | 7036 \immediate\write\macscribble{\the\toks0}% |
7420 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout | 7448 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout |
7421 }% | 7449 }% |
7422 \fi | 7450 \fi |
7423 } | 7451 } |
7424 | 7452 |
7453 % @xrefautosectiontitle on|off says whether @section(ing) names are used | |
7454 % automatically in xrefs, if the third arg is not explicitly specified. | |
7455 % This was provided as a "secret" @set xref-automatic-section-title | |
7456 % variable, now it's official. | |
7457 % | |
7458 \parseargdef\xrefautomaticsectiontitle{% | |
7459 \def\temp{#1}% | |
7460 \ifx\temp\onword | |
7461 \expandafter\let\csname SETxref-automatic-section-title\endcsname | |
7462 = \empty | |
7463 \else\ifx\temp\offword | |
7464 \expandafter\let\csname SETxref-automatic-section-title\endcsname | |
7465 = \relax | |
7466 \else | |
7467 \errhelp = \EMsimple | |
7468 \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', | |
7469 must be on|off}% | |
7470 \fi\fi | |
7471 } | |
7472 | |
7473 | |
7425 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is | 7474 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is |
7426 % the node name, #2 the name of the Info cross-reference, #3 the printed | 7475 % the node name, #2 the name of the Info cross-reference, #3 the printed |
7427 % node name, #4 the name of the Info file, #5 the name of the printed | 7476 % node name, #4 the name of the Info file, #5 the name of the printed |
7428 % manual. All but the node name can be omitted. | 7477 % manual. All but the node name can be omitted. |
7429 % | 7478 % |
7436 \def\printedrefname{\ignorespaces #3}% | 7485 \def\printedrefname{\ignorespaces #3}% |
7437 \setbox1=\hbox{\printedmanual\unskip}% | 7486 \setbox1=\hbox{\printedmanual\unskip}% |
7438 \setbox0=\hbox{\printedrefname\unskip}% | 7487 \setbox0=\hbox{\printedrefname\unskip}% |
7439 \ifdim \wd0 = 0pt | 7488 \ifdim \wd0 = 0pt |
7440 % No printed node name was explicitly given. | 7489 % No printed node name was explicitly given. |
7441 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax | 7490 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax |
7442 % Use the node name inside the square brackets. | 7491 % Use the node name inside the square brackets. |
7443 \def\printedrefname{\ignorespaces #1}% | 7492 \def\printedrefname{\ignorespaces #1}% |
7444 \else | 7493 \else |
7445 % Use the actual chapter/section title appear inside | 7494 % Use the actual chapter/section title appear inside |
7446 % the square brackets. Use the real section title if we have it. | 7495 % the square brackets. Use the real section title if we have it. |
7906 \newhelp\noepsfhelp{epsf.tex must be installed for images to | 7955 \newhelp\noepsfhelp{epsf.tex must be installed for images to |
7907 work. It is also included in the Texinfo distribution, or you can get | 7956 work. It is also included in the Texinfo distribution, or you can get |
7908 it from ftp://tug.org/tex/epsf.tex.} | 7957 it from ftp://tug.org/tex/epsf.tex.} |
7909 % | 7958 % |
7910 \def\image#1{% | 7959 \def\image#1{% |
7911 \ifx\epsfbox\undefined | 7960 \ifx\epsfbox\thisiundefined |
7912 \ifwarnednoepsf \else | 7961 \ifwarnednoepsf \else |
7913 \errhelp = \noepsfhelp | 7962 \errhelp = \noepsfhelp |
7914 \errmessage{epsf.tex not found, images will be ignored}% | 7963 \errmessage{epsf.tex not found, images will be ignored}% |
7915 \global\warnednoepsftrue | 7964 \global\warnednoepsftrue |
7916 \fi | 7965 \fi |