%  POLYIND.STY
%  \makeindex[name]
%  \index[name]{entry}
%  \printindex[name]
\renewcommand{\makeindex}[1][]
 {\expandafter\newwrite\csname @#1ind\endcsname
  \expandafter\immediate\openout%
    \csname @#1ind\endcsname=\jobname.#1idx
  \typeout{writing index file \jobname.#1idx}
 }

\renewcommand{\index}
 {\@bsphack\begingroup
  \@sanitize\@wrindex
 }

\renewcommand{\@wrindex}[2][]
 {\expandafter\protected@write%
   \csname @#1ind\endcsname{}%
  {\string\indexentry{#2}{\thepage}}%
  \endgroup\@esphack
 }

\newcommand{\printindex}[1][]
 {\InputIfFileExists{\jobname.#1ind}
  {}
  {\typeout{Don't forget to process \jobname.#1idx!}}
 }

\providecommand{\seename}{siehe}
\providecommand*{\see}[2]{\emph{\seename} #1}