summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty')
-rw-r--r--Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty31
1 files changed, 31 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty
new file mode 100644
index 00000000000..342d832d7d6
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/polyind.sty
@@ -0,0 +1,31 @@
+% 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} \ No newline at end of file