summaryrefslogtreecommitdiff
path: root/info/examples/ltt/polyind.sty
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/ltt/polyind.sty')
-rw-r--r--info/examples/ltt/polyind.sty31
1 files changed, 31 insertions, 0 deletions
diff --git a/info/examples/ltt/polyind.sty b/info/examples/ltt/polyind.sty
new file mode 100644
index 0000000000..752650fff2
--- /dev/null
+++ b/info/examples/ltt/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