\pageno=111
\vsize=24cm
\newdimen\fullhsize
\fullhsize=6.5in\hsize=3.2in
\def\fullline{\hbox to\fullhsize}
\let\lr=L\newbox\leftcolumn

\headline={\hfil\ifnum\pageno=111Index\fi\hfil}
\def\makeheadline{\vbox to 0pt{\vskip-22.5pt
    \fullline{\vbox to8.5pt{}\the\headline}\vss}
    \nointerlineskip}
\def\makefootline{\baselineskip=24pt\fullline{\the\footline}}
\output={\if L\lr   %pique dans le TeXbook, p257
    \global\setbox\leftcolumn=\columnbox\global\let\lr=R
    \else\doubleformat\global\let\lr=L\fi
    \ifnum\outputpenalty>-20000\else\dosupereject\fi}
\def\doubleformat{\shipout\vbox
    {\makeheadline
    \fullline{\box\leftcolumn\hfil\columnbox}
    \makefootline}
    \advancepageno}
\def\columnbox{\leftline{\pagebody}}
\def\parse !#1!#2! {\def\theword{#1}\def\thepage{#2}}
\def\theoldword{}
\def\theend{The End }
\newif\ifencore
\newread\std
\openin\std users.std
\parskip=0pt plus 1pt
\parindent=0pt

%\centerline{Index}\vskip1cm

\def\dotfill{\leaders\hbox to 3truemm{\hfil.\hfil}\hfill}
\loop%
\read\std to\theline%
\ifx\theline\theend\encorefalse\else\encoretrue\fi%
\ifencore%
\expandafter\parse\theline%
\ifx\theword\theoldword%
\ifx\thepage\theoldpage\else, \thepage\fi%
\else%
\relax\endgraf\theword\dotfill\thepage\let\theoldword=\theword%
\fi%
\let\theoldpage=\thepage%
\repeat%

\vfill\eject
\end
