(\doprintindex): Change catcode of @ before \read, in case of

\initial{@} being the line that is read.
Reported by: Drew Csillag <drew_csillag@geocities.com>
This commit is contained in:
Karl Berry 1998-02-25 22:54:34 +00:00
parent dc70a3bc0b
commit 1290679bc3

View file

@ -2539,6 +2539,11 @@ width0pt\relax} \fi
\indexbreaks \indexbreaks
% %
% See if the index file exists and is nonempty. % 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 \openin 1 \jobname.#1s
\ifeof 1 \ifeof 1
% \enddoublecolumns gets confused if there is no text in the index, % \enddoublecolumns gets confused if there is no text in the index,
@ -2560,7 +2565,6 @@ width0pt\relax} \fi
% to make right now. % to make right now.
\def\indexbackslash{\rawbackslashxx}% \def\indexbackslash{\rawbackslashxx}%
\catcode`\\ = 0 \catcode`\\ = 0
\catcode`\@ = 11
\escapechar = `\\ \escapechar = `\\
\begindoublecolumns \begindoublecolumns
\input \jobname.#1s \input \jobname.#1s