From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 macros/latex/contrib/index/autind.sty | 80 +++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 macros/latex/contrib/index/autind.sty

(limited to 'macros/latex/contrib/index/autind.sty')

diff --git a/macros/latex/contrib/index/autind.sty b/macros/latex/contrib/index/autind.sty
new file mode 100644
index 0000000000..5e433831af
--- /dev/null
+++ b/macros/latex/contrib/index/autind.sty
@@ -0,0 +1,80 @@
+%%% ====================================================================
+%%%  @LaTeX-style-file{
+%%%     filename        = "autind.sty",
+%%%     version         = "1.0beta",
+%%%     date            = "28 September 1995",
+%%%     time            = "23:00:49 EDT",
+%%%     author          = "David M. Jones",
+%%%     address         = "MIT Laboratory for Computer Science
+%%%                        Room NE43-316
+%%%                        545 Technology Square
+%%%                        Cambridge, MA 02139
+%%%                        USA",
+%%%     telephone       = "(617) 253-5936",
+%%%     FAX             = "(617) 253-3480",
+%%%     checksum        = "41079 80 198 2750",
+%%%     email           = "dmjones@theory.lcs.mit.edu",
+%%%     codetable       = "ISO/ASCII",
+%%%     keywords        = "",
+%%%     supported       = "yes",
+%%%     abstract        = "",
+%%%     docstring       = "See autind.tex for documentation.
+%%%
+%%%                        The checksum field above contains a CRC-16
+%%%                        checksum as the first value, followed by the
+%%%                        equivalent of the standard UNIX wc (word
+%%%                        count) utility output of lines, words, and
+%%%                        characters.  This is produced by Robert
+%%%                        Solovay's checksum utility.",
+%%%  }
+%%% ====================================================================
+
+\def\authorindextag{aut}
+
+\def\authorindex@cite#1{%
+    \begingroup
+        \def\do{\index[\authorindextag]}%
+        \@for\@tempa:=#1\do{%
+            \csname b@autind@\@tempa\endcsname
+        }%
+    \endgroup
+}
+
+\def\authorindexentries#1#2{%
+    \if@filesw
+        \def\@tempa{#2}%
+        \edef\@tempa{%
+            \write\@auxout{%
+                \string\bibcite{autind@#1}{\@nearverbatim\@tempa}%
+            }%
+        }%
+        \@tempa
+    \fi
+    \begingroup
+        \def\do{\index[\authorindextag]}%
+        #2%
+    \endgroup
+}
+
+\def\adjustcitation#1{%
+    \edef\@tempa{\string#1}%
+    \edef\@tempb{%
+        \let\expandafter\noexpand\csname ord@\@tempa\endcsname\noexpand#1%
+        \def\noexpand#1{%
+            \noexpand\@ifnextchar [
+                {\expandafter\noexpand\csname a@\@tempa\endcsname}
+                {\expandafter\noexpand\csname b@\@tempa\endcsname}%
+        }%
+        \def\expandafter\noexpand\csname a@\@tempa\endcsname[####1]####2{%
+            \noexpand\authorindex@cite{####2}%
+            \expandafter\noexpand\csname ord@\@tempa\endcsname[####1]{####2}%
+        }%
+        \def\expandafter\noexpand\csname b@\@tempa\endcsname ####1{%
+            \noexpand\authorindex@cite{####1}%
+            \expandafter\noexpand\csname ord@\@tempa\endcsname{####1}%
+        }%
+    }%
+    \@tempb
+}
+
+\endinput
-- 
cgit v1.2.3

