|
|
1.1 root 1: \newwrite\indexfile
2: \def\makeindex{%
3: \immediate\openout\indexfile=\jobname.idx%
4: \def\index{\bsphack\begingroup%
5: \def\protect####1{\string####1\space}%
6: \wrindex\indexfile}\typeout%
7: {Writing index file \jobname.idx }}
8: \def\wrindex#1#2{\let\pageno\relax%
9: \xdef\gtempa{\write#1{%\string
10: #2<tab>\number\count0}}\endgroup\gtempa\esphack}
11: \def\index{\begingroup \xindex}
12: \def\xindex#1{\endgroup}
13: \newdimen\savsk
14: \newcount\savsf
15: \newdimen\zro
16: \zro=0pt
17: \def\bsphack{\savsk\lastskip
18: \ifhmode\savsf\spacefactor\fi}
19:
20: \def\esphack{\relax\ifhmode\spacefactor\savsf
21: {}\ifdim \savsk >\zro \ignorespaces
22: \fi \fi}
23: \makeindex
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.