|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 1928 (0x788)
Types: TextFile
Names: »make-permuted-index«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
└─⟦c06c473ab⟧ »./UNRELEASED/lispref.tar.Z«
└─⟦1b57a2ffe⟧
└─⟦this⟧ »make-permuted-index«
#!/bin/csh -f
# Generate a permuted index of all names.
# The result is a file called index.fns. Call tex on index.texinfo to
# build a double column index.
# You will need to modify this for your needs.
# goto 4
set TEXINDEX=texindex # path to texindex command
#set EMACS=gnuemacs # your emacs command
#set TEX=tex # your tex command
set MANUAL=elisp # the base name of the manual
1:
echo "Extract raw index from texinfo fn and vr indexes."
# Use texindex to combine duplicate entries.
# But it wants to protect non-alphanumerics thus confusing ptx.
# Also change `\ ' to just a ` ', since texindex will fail. This is produced
# by `@findex two words' in an example environment (no doubt among others).
cat ${MANUAL}.fn ${MANUAL}.vr | sed -e 's,\\ , ,g' -e 's/ \.//' \
-e 's/{/ /g' -e 's/}/ /g' | awk '{print $3, $2}' >! permuted.index.raw
2:
# build break file for ptx.
cat <<EOF > permuted.index.break
-
EOF
echo "Make troff permuted index."
ptx -i /dev/null -f -r -b permuted.index.break < permuted.index.raw >! permuted.index.t
3:
echo "Extract the desired fields and resort."
# ptx doesnt do a very good job of sorting the fields.
# Added little section to
# get rid of the ttfam lines... [weltyc]
sed -e 's/""/-/g' -e 's/"//g' -e 's/^.*ttfam$//g' permuted.index.t | \
awk '{print $3,$4,$6}' | sort -f +1 -2 +0 -1 >! permuted.index.fields
4:
echo "Format for texinfo."
awk 'NF>0 {if ($1=="-") {\
print "\entry {" $2 "}{" $3 "}{" $2 "}" }\
else {\
print "\entry {" $2 ", " $1 "}{" $3 "}{" $2 ", " $1 "}"} }'\
< permuted.index.fields > permuted.index.fn
5:
# This index.fns will be read when we run TeX on the manual the second time.
echo "Sort with texindex."
${TEXINDEX} permuted.index.fn
mv permuted.index.fns index.fns
#${TEX} index.texinfo
6:
echo "Clean up."
rm -f permuted.index.fields permuted.index.t permuted.index.raw
rm -f permuted.index.break permuted.index.fn