doc-src/sedindex
changeset 103 30bd42401ab2
child 357 a2c5cd25906e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc-src/sedindex	Tue Nov 09 16:47:38 1993 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +#! /bin/sh
     1.5 +#
     1.6 +#sedindex - shell script to create indexes, preprocessing LaTeX's .idx file
     1.7 +#
     1.8 +#  puts strings prefixed by * into \tt font
     1.9 +#    terminator characters for strings are |!@{}
    1.10 +#
    1.11 +# change *"X"Y"Z"W  to  "X"Y"Z"W@{\tt "X"Y"Z"W}
    1.12 +# change *"X"Y"Z    to  "X"Y"Z@{\tt "X"Y"Z}
    1.13 +# change *"X"Y      to  "X"Y@{\tt "X"Y}
    1.14 +# change *"X        to  "X@{\tt "X}
    1.15 +# change *IDENT  to  IDENT@{\tt IDENT}  
    1.16 +#    where IDENT is any string not containing | ! or @
    1.17 +# FOUR backslashes: to escape the shell AND sed
    1.18 +sed -e "s~\*\(\".\".\".\".\)~\1@{\\\\tt \1}~g
    1.19 +s~\*\(\".\".\".\)~\1@{\\\\tt \1}~g
    1.20 +s~\*\(\".\".\)~\1@{\\\\tt \1}~g
    1.21 +s~\*\(\".\)~\1@{\\\\tt \1}~g
    1.22 +s~\*\([^|!@{}][^|!@{}]*\)~\1@{\\\\tt \1}~g" $1.idx | makeindex -q -o $1.ind