Mercurial > gnulib
comparison build-aux/texinfo.tex @ 9018:d09491a6c8f2
update from texinfo
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Fri, 29 Jun 2007 20:20:49 +0000 |
parents | 9df95c094ca7 |
children | c7bc1d05ce5f |
comparison
equal
deleted
inserted
replaced
9017:eebc72c6fadc | 9018:d09491a6c8f2 |
---|---|
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{2007-06-24.14} | 6 \def\texinfoversion{2007-06-29.13} |
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, | 9 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
10 % 2007 Free Software Foundation, Inc. | 10 % 2007 Free Software Foundation, Inc. |
11 % | 11 % |
12 % This texinfo.tex file is free software; you can redistribute it and/or | 12 % This texinfo.tex file is free software; you can redistribute it and/or |
13 % modify it under the terms of the GNU General Public License as | 13 % modify it under the terms of the GNU General Public License as |
14 % published by the Free Software Foundation; either version 2, or (at | 14 % published by the Free Software Foundation; either version 3, or (at |
15 % your option) any later version. | 15 % your option) any later version. |
16 % | 16 % |
17 % This texinfo.tex file is distributed in the hope that it will be | 17 % This texinfo.tex file is distributed in the hope that it will be |
18 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty | 18 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
19 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
6330 | 6330 |
6331 % Macro bodies are absorbed as an argument in a context where | 6331 % Macro bodies are absorbed as an argument in a context where |
6332 % all characters are catcode 10, 11 or 12, except \ which is active | 6332 % all characters are catcode 10, 11 or 12, except \ which is active |
6333 % (as in normal texinfo). It is necessary to change the definition of \. | 6333 % (as in normal texinfo). It is necessary to change the definition of \. |
6334 | 6334 |
6335 % Non-ASCII encodings make 8-bit characters active, so un-activate | |
6336 % them to avoid their expansion. Must do this non-globally, to | |
6337 % confine the change to the current group. | |
6338 | |
6335 % It's necessary to have hard CRs when the macro is executed. This is | 6339 % It's necessary to have hard CRs when the macro is executed. This is |
6336 % done by making ^^M (\endlinechar) catcode 12 when reading the macro | 6340 % done by making ^^M (\endlinechar) catcode 12 when reading the macro |
6337 % body, and then making it the \newlinechar in \scanmacro. | 6341 % body, and then making it the \newlinechar in \scanmacro. |
6338 | 6342 |
6339 \def\scanctxt{% | 6343 \def\scanctxt{% |
6344 \catcode`\@=\other | 6348 \catcode`\@=\other |
6345 \catcode`\^=\other | 6349 \catcode`\^=\other |
6346 \catcode`\_=\other | 6350 \catcode`\_=\other |
6347 \catcode`\|=\other | 6351 \catcode`\|=\other |
6348 \catcode`\~=\other | 6352 \catcode`\~=\other |
6353 \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi | |
6349 } | 6354 } |
6350 | 6355 |
6351 \def\scanargctxt{% | 6356 \def\scanargctxt{% |
6352 \scanctxt | 6357 \scanctxt |
6353 \catcode`\\=\other | 6358 \catcode`\\=\other |
7481 \global\catcode\count255=#1 | 7486 \global\catcode\count255=#1 |
7482 \advance\count255 by 1 | 7487 \advance\count255 by 1 |
7483 \repeat | 7488 \repeat |
7484 } | 7489 } |
7485 | 7490 |
7491 \def\setnonasciicharscatcodenonglobal#1{% | |
7492 \count255=128 | |
7493 \loop\ifnum\count255<256 | |
7494 \catcode\count255=#1 | |
7495 \advance\count255 by 1 | |
7496 \repeat | |
7497 } | |
7498 | |
7486 % @documentencoding sets the definition of non-ASCII characters | 7499 % @documentencoding sets the definition of non-ASCII characters |
7487 % according to the specified encoding. | 7500 % according to the specified encoding. |
7488 % | 7501 % |
7489 \parseargdef\documentencoding{% | 7502 \parseargdef\documentencoding{% |
7490 % Encoding being declared for the document. | 7503 % Encoding being declared for the document. |