summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/index/autind.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/index/autind.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/index/autind.sty')
-rw-r--r--macros/latex/contrib/index/autind.sty80
1 files changed, 80 insertions, 0 deletions
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