home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / progs / pari / pari_137 / tex / index.tex < prev    next >
Encoding:
Text File  |  1992-05-20  |  1.3 KB  |  50 lines

  1. \pageno=111
  2. \vsize=24cm
  3. \newdimen\fullhsize
  4. \fullhsize=6.5in\hsize=3.2in
  5. \def\fullline{\hbox to\fullhsize}
  6. \let\lr=L\newbox\leftcolumn
  7.  
  8. \headline={\hfil\ifnum\pageno=111Index\fi\hfil}
  9. \def\makeheadline{\vbox to 0pt{\vskip-22.5pt
  10.     \fullline{\vbox to8.5pt{}\the\headline}\vss}
  11.     \nointerlineskip}
  12. \def\makefootline{\baselineskip=24pt\fullline{\the\footline}}
  13. \output={\if L\lr   %pique dans le TeXbook, p257
  14.     \global\setbox\leftcolumn=\columnbox\global\let\lr=R
  15.     \else\doubleformat\global\let\lr=L\fi
  16.     \ifnum\outputpenalty>-20000\else\dosupereject\fi}
  17. \def\doubleformat{\shipout\vbox
  18.     {\makeheadline
  19.     \fullline{\box\leftcolumn\hfil\columnbox}
  20.     \makefootline}
  21.     \advancepageno}
  22. \def\columnbox{\leftline{\pagebody}}
  23. \def\parse !#1!#2! {\def\theword{#1}\def\thepage{#2}}
  24. \def\theoldword{}
  25. \def\theend{The End }
  26. \newif\ifencore
  27. \newread\std
  28. \openin\std users.std
  29. \parskip=0pt plus 1pt
  30. \parindent=0pt
  31.  
  32. %\centerline{Index}\vskip1cm
  33.  
  34. \def\dotfill{\leaders\hbox to 3truemm{\hfil.\hfil}\hfill}
  35. \loop%
  36. \read\std to\theline%
  37. \ifx\theline\theend\encorefalse\else\encoretrue\fi%
  38. \ifencore%
  39. \expandafter\parse\theline%
  40. \ifx\theword\theoldword%
  41. \ifx\thepage\theoldpage\else, \thepage\fi%
  42. \else%
  43. \relax\endgraf\theword\dotfill\thepage\let\theoldword=\theword%
  44. \fi%
  45. \let\theoldpage=\thepage%
  46. \repeat%
  47.  
  48. \vfill\eject
  49. \end
  50.