lcp@103: #! /bin/sh lcp@103: # lcp@103: #sedindex - shell script to create indexes, preprocessing LaTeX's .idx file lcp@103: # lcp@103: # puts strings prefixed by * into \tt font lcp@103: # terminator characters for strings are |!@{} lcp@103: # lcp@103: # change *"X"Y"Z"W to "X"Y"Z"W@{\tt "X"Y"Z"W} lcp@103: # change *"X"Y"Z to "X"Y"Z@{\tt "X"Y"Z} lcp@103: # change *"X"Y to "X"Y@{\tt "X"Y} lcp@103: # change *"X to "X@{\tt "X} lcp@103: # change *IDENT to IDENT@{\tt IDENT} lcp@103: # where IDENT is any string not containing | ! or @ lcp@103: # FOUR backslashes: to escape the shell AND sed lcp@103: sed -e "s~\*\(\".\".\".\".\)~\1@{\\\\tt \1}~g lcp@103: s~\*\(\".\".\".\)~\1@{\\\\tt \1}~g lcp@103: s~\*\(\".\".\)~\1@{\\\\tt \1}~g lcp@103: s~\*\(\".\)~\1@{\\\\tt \1}~g lcp@103: s~\*\([^|!@{}][^|!@{}]*\)~\1@{\\\\tt \1}~g" $1.idx | makeindex -q -o $1.ind