Mercurial > emacs
comparison man/texinfo.tex @ 71093:6155393edd3b
autoupdate
author | Karl Berry <karl@gnu.org> |
---|---|
date | Tue, 30 May 2006 14:20:02 +0000 |
parents | edd2bdf83f35 |
children | cf0c35ec7c54 a8190f7e546e |
comparison
equal
deleted
inserted
replaced
71092:d0758b1b38eb | 71093:6155393edd3b |
---|---|
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{2006-05-07.15} | 6 \def\texinfoversion{2006-05-28.17} |
7 % | 7 % |
8 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, | 8 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, |
9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free | 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free |
10 % Software Foundation, Inc. | 10 % Software Foundation, Inc. |
11 % | 11 % |
1082 % @bullet and @minus need the same treatment as @math, just above. | 1082 % @bullet and @minus need the same treatment as @math, just above. |
1083 \def\bullet{$\ptexbullet$} | 1083 \def\bullet{$\ptexbullet$} |
1084 \def\minus{$-$} | 1084 \def\minus{$-$} |
1085 | 1085 |
1086 % @dots{} outputs an ellipsis using the current font. | 1086 % @dots{} outputs an ellipsis using the current font. |
1087 % We do .5em per period so that it has the same spacing in a typewriter | 1087 % We do .5em per period so that it has the same spacing in the cm |
1088 % font as three actual period characters. | 1088 % typewriter fonts as three actual period characters; on the other hand, |
1089 % in other typewriter fonts three periods are wider than 1.5em. So do | |
1090 % whichever is larger. | |
1089 % | 1091 % |
1090 \def\dots{% | 1092 \def\dots{% |
1091 \leavevmode | 1093 \leavevmode |
1092 \hbox to 1.5em{% | 1094 \setbox0=\hbox{...}% get width of three periods |
1093 \hskip 0pt plus 0.25fil | 1095 \ifdim\wd0 > 1.5em |
1094 .\hfil.\hfil.% | 1096 \dimen0 = \wd0 |
1095 \hskip 0pt plus 0.5fil | 1097 \else |
1098 \dimen0 = 1.5em | |
1099 \fi | |
1100 \hbox to \dimen0{% | |
1101 \hskip 0pt plus.25fil | |
1102 .\hskip 0pt plus1fil | |
1103 .\hskip 0pt plus1fil | |
1104 .\hskip 0pt plus.5fil | |
1096 }% | 1105 }% |
1097 } | 1106 } |
1098 | 1107 |
1099 % @enddots{} is an end-of-sentence ellipsis. | 1108 % @enddots{} is an end-of-sentence ellipsis. |
1100 % | 1109 % |
3389 % | 3398 % |
3390 \def\indexdummies{% | 3399 \def\indexdummies{% |
3391 \escapechar = `\\ % use backslash in output files. | 3400 \escapechar = `\\ % use backslash in output files. |
3392 \def\@{@}% change to @@ when we switch to @ as escape char in index files. | 3401 \def\@{@}% change to @@ when we switch to @ as escape char in index files. |
3393 \def\ {\realbackslash\space }% | 3402 \def\ {\realbackslash\space }% |
3403 % | |
3394 % Need these in case \tex is in effect and \{ is a \delimiter again. | 3404 % Need these in case \tex is in effect and \{ is a \delimiter again. |
3395 % But can't use \lbracecmd and \rbracecmd because texindex assumes | 3405 % But can't use \lbracecmd and \rbracecmd because texindex assumes |
3396 % braces and backslashes are used only as delimiters. | 3406 % braces and backslashes are used only as delimiters. |
3397 \let\{ = \mylbrace | 3407 \let\{ = \mylbrace |
3398 \let\} = \myrbrace | 3408 \let\} = \myrbrace |
3409 % | |
3410 % I don't entirely understand this, but when an index entry is | |
3411 % generated from a macro call, the \endinput which \scanmacro inserts | |
3412 % causes processing to be prematurely terminated. This is, | |
3413 % apparently, because \indexsorttmp is fully expanded, and \endinput | |
3414 % is an expandable command. The redefinition below makes \endinput | |
3415 % disappear altogether for that purpose -- although logging shows that | |
3416 % processing continues to some further point. On the other hand, it | |
3417 % seems \endinput does not hurt in the printed index arg, since that | |
3418 % is still getting written without apparent harm. | |
3419 % | |
3420 % Sample source (mac-idx3.tex, reported by Graham Percival to | |
3421 % help-texinfo, 22may06): | |
3422 % @macro funindex {WORD} | |
3423 % @findex xyz | |
3424 % @end macro | |
3425 % ... | |
3426 % @funindex commtest | |
3427 % | |
3428 % The above is not enough to reproduce the bug, but it gives the flavor. | |
3429 % | |
3430 % Sample whatsit resulting: | |
3431 % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} | |
3432 % | |
3433 % So: | |
3434 \let\endinput = \empty | |
3399 % | 3435 % |
3400 % Do the redefinitions. | 3436 % Do the redefinitions. |
3401 \commondummies | 3437 \commondummies |
3402 } | 3438 } |
3403 | 3439 |
5825 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ | 5861 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ |
5826 % ... and \example | 5862 % ... and \example |
5827 \spaceisspace | 5863 \spaceisspace |
5828 % | 5864 % |
5829 % Append \endinput to make sure that TeX does not see the ending newline. | 5865 % Append \endinput to make sure that TeX does not see the ending newline. |
5830 % | |
5831 % I've verified that it is necessary both for e-TeX and for ordinary TeX | 5866 % I've verified that it is necessary both for e-TeX and for ordinary TeX |
5832 % --kasal, 29nov03 | 5867 % --kasal, 29nov03 |
5833 \scantokens{#1\endinput}% | 5868 \scantokens{#1\endinput}% |
5834 \endgroup | 5869 \endgroup |
5835 } | 5870 } |