From db535e9a3afd3dc6db06a099e20d16cfecc88c01 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 3 Apr 1998 21:56:54 +0000 Subject: [PATCH] new files from fsf --- ChangeLog | 3 + ansi2knr.c | 5 + lib/ansi2knr.c | 5 + lib/texinfo.tex | 296 ++++++++++++++++++++++++++++++-------------------------- texinfo.tex | 296 ++++++++++++++++++++++++++++++-------------------------- 5 files changed, 335 insertions(+), 270 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07cc0cb..eb17a6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Fri Apr 3 13:07:58 1998 Tom Tromey + * ansi2knr.c, texinfo.tex: New versions from respective + maintainers. + * automake.in (scan_one_configure_file): Exclude INSTALL_DATA from configure_vars. Test instdata.test. diff --git a/ansi2knr.c b/ansi2knr.c index 3dd5086..8008685 100644 --- a/ansi2knr.c +++ b/ansi2knr.c @@ -1,3 +1,8 @@ +/* Copyright (C) 1989, 1997 Aladdin Enterprises. All rights reserved. */ + +/*$Id: ansi2knr.c,v 1.9 1998/04/03 21:56:52 tromey Exp $*/ +/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ + /* ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the diff --git a/lib/ansi2knr.c b/lib/ansi2knr.c index 3dd5086..8008685 100644 --- a/lib/ansi2knr.c +++ b/lib/ansi2knr.c @@ -1,3 +1,8 @@ +/* Copyright (C) 1989, 1997 Aladdin Enterprises. All rights reserved. */ + +/*$Id: ansi2knr.c,v 1.9 1998/04/03 21:56:52 tromey Exp $*/ +/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ + /* ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the diff --git a/lib/texinfo.tex b/lib/texinfo.tex index e48e841..0822be2 100644 --- a/lib/texinfo.tex +++ b/lib/texinfo.tex @@ -1,32 +1,40 @@ -%% TeX macros to handle Texinfo files. -%% $Id: texinfo.tex,v 1.10 1998/02/24 19:40:30 tromey Exp $ - -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, -% 94, 95, 96, 97 Free Software Foundation, Inc. - -%This texinfo.tex file is free software; you can redistribute it and/or -%modify it under the terms of the GNU General Public License as -%published by the Free Software Foundation; either version 2, or (at -%your option) any later version. - -%This texinfo.tex file is distributed in the hope that it will be -%useful, but WITHOUT ANY WARRANTY; without even the implied warranty -%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%General Public License for more details. - -%You should have received a copy of the GNU General Public License -%along with this texinfo.tex file; see the file COPYING. If not, write -%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -%Boston, MA 02111-1307, USA. - - -%In other words, you are welcome to use, share and improve this program. -%You are forbidden to forbid anyone else to use, share and improve -%what you give them. Help stamp out software-hoarding! - - -% Send bug reports to bug-texinfo@prep.ai.mit.edu. -% Please include a *precise* test case in each bug report. +% texinfo.tex -- TeX macros to handle Texinfo files. +% $Id: texinfo.tex,v 1.11 1998/04/03 21:56:54 tromey Exp $ +% +% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 +% Free Software Foundation, Inc. +% +% This texinfo.tex file is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2, or (at +% your option) any later version. +% +% This texinfo.tex file is distributed in the hope that it will be +% useful, but WITHOUT ANY WARRANTY; without even the implied warranty +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this texinfo.tex file; see the file COPYING. If not, write +% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +% Boston, MA 02111-1307, USA. +% +% In other words, you are welcome to use, share and improve this program. +% You are forbidden to forbid anyone else to use, share and improve +% what you give them. Help stamp out software-hoarding! +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex +% /home/gd/gnu/doc/texinfo.tex on the GNU machines. +% +% Send bug reports to bug-texinfo@gnu.org. +% Please include a precise test case in each bug report, +% including a complete document with which we can reproduce the problem. +% +% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You +% have to run makeinfo -E to expand macros first; the texi2dvi script +% does this. % Make it possible to create a .fmt file just by loading this file: @@ -36,7 +44,7 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 1.10 $ +\deftexinfoversion$Revision: 1.11 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number @@ -54,7 +62,8 @@ \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end -\let\ptexequiv = \equiv +\let\ptexequiv=\equiv +\let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} @@ -1278,6 +1287,10 @@ where each line of input produces a line of output.} % \textfonts +% Define these so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 @@ -1315,15 +1328,15 @@ where each line of input produces a line of output.} \null } \let\ttfont=\t -\def\samp #1{`\tclose{#1}'\null} +\def\samp#1{`\tclose{#1}'\null} \setfont\smallrm\rmshape{8}{1000} \font\smallsy=cmsy9 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% - \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% + \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt - \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% + \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} + \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -1436,7 +1449,7 @@ where each line of input produces a line of output.} % rms does not like the angle brackets --karl, 17may97. % So now @email is just like @uref. -%\def\email#1{$\langle${\tt #1}$\rangle$} +%\def\email#1{\angleleft{\tt #1}\angleright} \let\email=\uref % Check if we are currently using a typewriter font. Since all the @@ -2058,10 +2071,7 @@ July\or August\or September\or October\or November\or December\fi % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. - -%%%% -% Dimensions - +% \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace @@ -2071,15 +2081,15 @@ July\or August\or September\or October\or November\or December\fi \multitablecolspace=12pt \multitablelinespace=0pt -%%%% % Macros used to set up halign preamble: +% \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent -%% 2/1/96, to allow fractions to be given with more than one digit. +% 2/1/96, to allow fractions to be given with more than one digit. \def\pickupwholefraction#1 {\global\advance\colcount by1 % \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% \setuptable} @@ -2105,80 +2115,84 @@ July\or August\or September\or October\or November\or December\fi \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% \fi\go} -%%%% % multitable syntax \def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used. - -%%%% % @multitable ... @end multitable definitions: \def\multitable{\parsearg\dotable} - \def\dotable#1{\bgroup -\let\item\cr -\tolerance=9500 -\hbadness=9500 -\setmultitablespacing -\parskip=\multitableparskip -\parindent=\multitableparindent -\overfullrule=0pt -\global\colcount=0\relax% -\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% - % To parse everything between @multitable and @item : -\setuptable#1 \endsetuptable - % Need to reset this to 0 after \setuptable. -\global\colcount=0\relax% - % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. -\halign\bgroup&\global\advance\colcount by 1\relax% -\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns after - % the first one. - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % If user has set preamble in terms of percent of \hsize - % we will use that dimension as the width of the column, and - % the \leftskip will keep entries from bumping into each other. - % Table will start at left margin and final column will justify at - % right margin. -\ifnum\colcount=1 -\else - \ifsetpercent + \vskip\parskip + \let\item\crcr + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% + % + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % \everycr will reset column counter, \colcount, at the end of + % each line. Every column entry will cause \colcount to advance by one. + % The table preamble + % looks at the current \colcount to find the correct column width. + \everycr{\noalign{% + % + % \filbreak%% keeps underfull box messages off when table breaks over pages. + % Maybe so, but it also creates really weird page breaks when the table + % breaks over pages. Wouldn't \vfil be better? Wait until the problem + % manifests itself, so it can be fixed for real --karl. + \global\colcount=0\relax}}% + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup&\global\advance\colcount by 1\relax + \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip \else - % If user has set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace - \advance\hsize by \multitablecolspace + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace \fi - % In either case we will make \leftskip=\multitablecolspace: -\leftskip=\multitablecolspace -\fi - % Ignoring space at the beginning and end avoids an occasional spurious - % blank line, when TeX decides to break the line at the space before the - % box from the multistrut, so the strut ends up on a line by itself. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole country. - % Is automatically provided with highlighting sequences respectively marking - % characters. - \noindent\ignorespaces##\unskip\multistrut}\cr - % \everycr will reset column counter, \colcount, at the end of - % each line. Every column entry will cause \colcount to advance by one. - % The table preamble - % looks at the current \colcount to find the correct column width. -\global\everycr{\noalign{% -% \filbreak%% keeps underfull box messages off when table breaks over pages. -% Maybe so, but it also creates really weird page breaks when the table -% breaks over pages Wouldn't \vfil be better? Wait until the problem -% manifests itself, so it can be fixed for real --karl. -\global\colcount=0\relax}} + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively marking + % characters. + \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. @@ -2525,6 +2539,11 @@ width0pt\relax} \fi \indexbreaks % % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, @@ -2546,7 +2565,6 @@ width0pt\relax} \fi % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 - \catcode`\@ = 11 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s @@ -3513,30 +3531,35 @@ width0pt\relax} \fi % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup -\catcode `\\=0 \catcode `\{=1 \catcode `\}=2 -\catcode `\$=3 \catcode `\&=4 \catcode `\#=6 -\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie -\catcode `\%=14 -\catcode 43=12 % plus -\catcode`\"=12 -\catcode`\==12 -\catcode`\|=12 -\catcode`\<=12 -\catcode`\>=12 -\escapechar=`\\ -% -\let\,=\ptexcomma -\let\{=\ptexlbrace -\let\}=\ptexrbrace -\let\.=\ptexdot -\let\*=\ptexstar -\let\dots=\ptexdots -\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% -\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% -\def\@{@}% -\let\bullet=\ptexbullet -\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext -% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie + \catcode `\%=14 + \catcode 43=12 % plus + \catcode`\"=12 + \catcode`\==12 + \catcode`\|=12 + \catcode`\<=12 + \catcode`\>=12 + \escapechar=`\\ + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\{=\ptexlbrace + \let\}=\ptexrbrace + \let\*=\ptexstar + \let\t=\ptext + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @endlisp. @@ -4389,7 +4412,7 @@ width0pt\relax} \fi \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. - $\langle$un\-de\-fined$\rangle$% + \angleleft un\-de\-fined\angleright \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else @@ -4406,10 +4429,13 @@ width0pt\relax} \fi } % This is the macro invoked by entries in the aux file. -\def\xrdef #1#2{{% - \catcode`\'=\other - \expandafter\gdef\csname X#1\endcsname{#2}% -}} +% +\def\xrdef#1{\begingroup + % Reenable \ as an escape while reading the second argument. + \catcode`\\ = 0 + \afterassignment\endgroup + \expandafter\gdef\csname X#1\endcsname +} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup diff --git a/texinfo.tex b/texinfo.tex index e48e841..0822be2 100644 --- a/texinfo.tex +++ b/texinfo.tex @@ -1,32 +1,40 @@ -%% TeX macros to handle Texinfo files. -%% $Id: texinfo.tex,v 1.10 1998/02/24 19:40:30 tromey Exp $ - -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, -% 94, 95, 96, 97 Free Software Foundation, Inc. - -%This texinfo.tex file is free software; you can redistribute it and/or -%modify it under the terms of the GNU General Public License as -%published by the Free Software Foundation; either version 2, or (at -%your option) any later version. - -%This texinfo.tex file is distributed in the hope that it will be -%useful, but WITHOUT ANY WARRANTY; without even the implied warranty -%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%General Public License for more details. - -%You should have received a copy of the GNU General Public License -%along with this texinfo.tex file; see the file COPYING. If not, write -%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -%Boston, MA 02111-1307, USA. - - -%In other words, you are welcome to use, share and improve this program. -%You are forbidden to forbid anyone else to use, share and improve -%what you give them. Help stamp out software-hoarding! - - -% Send bug reports to bug-texinfo@prep.ai.mit.edu. -% Please include a *precise* test case in each bug report. +% texinfo.tex -- TeX macros to handle Texinfo files. +% $Id: texinfo.tex,v 1.11 1998/04/03 21:56:54 tromey Exp $ +% +% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 +% Free Software Foundation, Inc. +% +% This texinfo.tex file is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2, or (at +% your option) any later version. +% +% This texinfo.tex file is distributed in the hope that it will be +% useful, but WITHOUT ANY WARRANTY; without even the implied warranty +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with this texinfo.tex file; see the file COPYING. If not, write +% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +% Boston, MA 02111-1307, USA. +% +% In other words, you are welcome to use, share and improve this program. +% You are forbidden to forbid anyone else to use, share and improve +% what you give them. Help stamp out software-hoarding! +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex +% /home/gd/gnu/doc/texinfo.tex on the GNU machines. +% +% Send bug reports to bug-texinfo@gnu.org. +% Please include a precise test case in each bug report, +% including a complete document with which we can reproduce the problem. +% +% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You +% have to run makeinfo -E to expand macros first; the texi2dvi script +% does this. % Make it possible to create a .fmt file just by loading this file: @@ -36,7 +44,7 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 1.10 $ +\deftexinfoversion$Revision: 1.11 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number @@ -54,7 +62,8 @@ \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end -\let\ptexequiv = \equiv +\let\ptexequiv=\equiv +\let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} @@ -1278,6 +1287,10 @@ where each line of input produces a line of output.} % \textfonts +% Define these so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 @@ -1315,15 +1328,15 @@ where each line of input produces a line of output.} \null } \let\ttfont=\t -\def\samp #1{`\tclose{#1}'\null} +\def\samp#1{`\tclose{#1}'\null} \setfont\smallrm\rmshape{8}{1000} \font\smallsy=cmsy9 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% - \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% + \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt - \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% + \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} + \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -1436,7 +1449,7 @@ where each line of input produces a line of output.} % rms does not like the angle brackets --karl, 17may97. % So now @email is just like @uref. -%\def\email#1{$\langle${\tt #1}$\rangle$} +%\def\email#1{\angleleft{\tt #1}\angleright} \let\email=\uref % Check if we are currently using a typewriter font. Since all the @@ -2058,10 +2071,7 @@ July\or August\or September\or October\or November\or December\fi % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. - -%%%% -% Dimensions - +% \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace @@ -2071,15 +2081,15 @@ July\or August\or September\or October\or November\or December\fi \multitablecolspace=12pt \multitablelinespace=0pt -%%%% % Macros used to set up halign preamble: +% \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent -%% 2/1/96, to allow fractions to be given with more than one digit. +% 2/1/96, to allow fractions to be given with more than one digit. \def\pickupwholefraction#1 {\global\advance\colcount by1 % \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% \setuptable} @@ -2105,80 +2115,84 @@ July\or August\or September\or October\or November\or December\fi \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% \fi\go} -%%%% % multitable syntax \def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used. - -%%%% % @multitable ... @end multitable definitions: \def\multitable{\parsearg\dotable} - \def\dotable#1{\bgroup -\let\item\cr -\tolerance=9500 -\hbadness=9500 -\setmultitablespacing -\parskip=\multitableparskip -\parindent=\multitableparindent -\overfullrule=0pt -\global\colcount=0\relax% -\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% - % To parse everything between @multitable and @item : -\setuptable#1 \endsetuptable - % Need to reset this to 0 after \setuptable. -\global\colcount=0\relax% - % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. -\halign\bgroup&\global\advance\colcount by 1\relax% -\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns after - % the first one. - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % If user has set preamble in terms of percent of \hsize - % we will use that dimension as the width of the column, and - % the \leftskip will keep entries from bumping into each other. - % Table will start at left margin and final column will justify at - % right margin. -\ifnum\colcount=1 -\else - \ifsetpercent + \vskip\parskip + \let\item\crcr + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% + % + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % \everycr will reset column counter, \colcount, at the end of + % each line. Every column entry will cause \colcount to advance by one. + % The table preamble + % looks at the current \colcount to find the correct column width. + \everycr{\noalign{% + % + % \filbreak%% keeps underfull box messages off when table breaks over pages. + % Maybe so, but it also creates really weird page breaks when the table + % breaks over pages. Wouldn't \vfil be better? Wait until the problem + % manifests itself, so it can be fixed for real --karl. + \global\colcount=0\relax}}% + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup&\global\advance\colcount by 1\relax + \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip \else - % If user has set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace - \advance\hsize by \multitablecolspace + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace \fi - % In either case we will make \leftskip=\multitablecolspace: -\leftskip=\multitablecolspace -\fi - % Ignoring space at the beginning and end avoids an occasional spurious - % blank line, when TeX decides to break the line at the space before the - % box from the multistrut, so the strut ends up on a line by itself. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole country. - % Is automatically provided with highlighting sequences respectively marking - % characters. - \noindent\ignorespaces##\unskip\multistrut}\cr - % \everycr will reset column counter, \colcount, at the end of - % each line. Every column entry will cause \colcount to advance by one. - % The table preamble - % looks at the current \colcount to find the correct column width. -\global\everycr{\noalign{% -% \filbreak%% keeps underfull box messages off when table breaks over pages. -% Maybe so, but it also creates really weird page breaks when the table -% breaks over pages Wouldn't \vfil be better? Wait until the problem -% manifests itself, so it can be fixed for real --karl. -\global\colcount=0\relax}} + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively marking + % characters. + \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. @@ -2525,6 +2539,11 @@ width0pt\relax} \fi \indexbreaks % % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, @@ -2546,7 +2565,6 @@ width0pt\relax} \fi % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 - \catcode`\@ = 11 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s @@ -3513,30 +3531,35 @@ width0pt\relax} \fi % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup -\catcode `\\=0 \catcode `\{=1 \catcode `\}=2 -\catcode `\$=3 \catcode `\&=4 \catcode `\#=6 -\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie -\catcode `\%=14 -\catcode 43=12 % plus -\catcode`\"=12 -\catcode`\==12 -\catcode`\|=12 -\catcode`\<=12 -\catcode`\>=12 -\escapechar=`\\ -% -\let\,=\ptexcomma -\let\{=\ptexlbrace -\let\}=\ptexrbrace -\let\.=\ptexdot -\let\*=\ptexstar -\let\dots=\ptexdots -\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% -\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% -\def\@{@}% -\let\bullet=\ptexbullet -\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext -% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie + \catcode `\%=14 + \catcode 43=12 % plus + \catcode`\"=12 + \catcode`\==12 + \catcode`\|=12 + \catcode`\<=12 + \catcode`\>=12 + \escapechar=`\\ + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\{=\ptexlbrace + \let\}=\ptexrbrace + \let\*=\ptexstar + \let\t=\ptext + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @endlisp. @@ -4389,7 +4412,7 @@ width0pt\relax} \fi \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. - $\langle$un\-de\-fined$\rangle$% + \angleleft un\-de\-fined\angleright \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else @@ -4406,10 +4429,13 @@ width0pt\relax} \fi } % This is the macro invoked by entries in the aux file. -\def\xrdef #1#2{{% - \catcode`\'=\other - \expandafter\gdef\csname X#1\endcsname{#2}% -}} +% +\def\xrdef#1{\begingroup + % Reenable \ as an escape while reading the second argument. + \catcode`\\ = 0 + \afterassignment\endgroup + \expandafter\gdef\csname X#1\endcsname +} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup -- 2.7.4