summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-06 21:12:39 +0000
committerKarl Berry <karl@freefriends.org>2019-04-06 21:12:39 +0000
commita214e25aa35703933434387c49111d827d19ebca (patch)
tree12e128e6b383b8cbc114c088360f88206345187f /Master/texmf-dist/doc
parentcb80c8476ad28cf03650f087acc7062a148268a6 (diff)
keyindex (6apr19)
git-svn-id: svn://tug.org/texlive/trunk@50814 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/keyindex/README.md10
-rw-r--r--Master/texmf-dist/doc/latex/keyindex/keyindex.pdfbin0 -> 144968 bytes
-rwxr-xr-xMaster/texmf-dist/doc/latex/keyindex/makenameindex31
3 files changed, 41 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/keyindex/README.md b/Master/texmf-dist/doc/latex/keyindex/README.md
new file mode 100644
index 00000000000..8a2d6f821b5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keyindex/README.md
@@ -0,0 +1,10 @@
+keyindex
+========
+
+A LaTeX package that functionality for producing an index without
+directly entering index entries into the text using the \index
+command, but instead by looking up short keys and printing a
+predefined string in the main text and adding a corresponding index
+entry. The standard use case is the production of an index of names.
+
+It is distributed under the terms of the LPPL 1.3c
diff --git a/Master/texmf-dist/doc/latex/keyindex/keyindex.pdf b/Master/texmf-dist/doc/latex/keyindex/keyindex.pdf
new file mode 100644
index 00000000000..c60d626560e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keyindex/keyindex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/keyindex/makenameindex b/Master/texmf-dist/doc/latex/keyindex/makenameindex
new file mode 100755
index 00000000000..32e70da4199
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/keyindex/makenameindex
@@ -0,0 +1,31 @@
+if [ -z $1 ]; then
+echo usage: makenameindex infile
+echo
+echo Produces a file infile.kix, suitable for importing in the preamble of
+echo a LaTeX file, which provides the command \name\<key\>. Usually, \<key\>
+echo will be a last name, and \name\<key\> will insert the last name in the
+echo text as well as an index entry of the form last name, first name. The
+echo file is generated from infile.txt, which contains lines of the form
+echo
+echo last name, first name
+echo key\|last name, first name
+echo key@indexentry
+echo
+echo key\|last name, first name is used to disambiguate people with the same
+echo last name. key@indexentry is used to typeset \<key\> in the text
+echo but index indexentry, e.g., Euklid@Euclid.
+else
+echo makenameindex $1.txt, writing to $1.kix
+for key in `grep -o '^[^|@,]*' $1.txt` ; do
+if [ `grep -c "^$key[|@,]" $1.txt` -gt 1 ]; then
+ echo "Key $key defined more than once!"
+fi
+done
+echo "% $1.kix" > $1.kix
+echo "% Generated from $1.txt on `date`" >> $1.kix
+grep '|' $1.txt | sed 's/^\([^|]*\)|\([^,]*\), *\(.*\)/\\keyindexentry{\1}{\2}{\2, \3}/' >>$1.kix
+grep '@' $1.txt | grep -v '@.*@' | sed 's/^\([^@]*\)@\(.*\)/\\keyindexentry{\1}{\1}{\2}/' >>$1.kix
+grep '@' $1.txt | grep '@.*@' | sed 's/^\([^@]*\)@\([^@]*\)@\(.*\)/\\keyindexentry{\1}{\2}{\3}/' >>$1.kix
+grep -v '[|@]' $1.txt | sed 's/^\([^,]*\), *\(.*\)/\\keyindexentry{\1}{\1}{\1, \2}/' >>$1.kix
+sort -o $1.kix $1.kix
+fi \ No newline at end of file