paulson@11400: #! /bin/sh paulson@11400: # paulson@11400: #sedindex - shell script to create indexes, preprocessing LaTeX's .idx file paulson@11400: # paulson@11400: # puts strings prefixed by * into \tt font paulson@11400: # terminator characters for strings are |!@{} paulson@11400: # paulson@11400: # a space terminates the \tt part to allow \index{*notE theorem}, etc. paulson@11400: # paulson@11400: # note that makeindex uses a dboule quote (") to delimit special characters. paulson@11400: # paulson@11400: # change *"X"Y"Z"W to "X"Y"Z"W@{\tt "X"Y"Z"W} paulson@11400: # change *"X"Y"Z to "X"Y"Z@{\tt "X"Y"Z} paulson@11400: # change *"X"Y to "X"Y@{\tt "X"Y} paulson@11400: # change *"X to "X@{\tt "X} paulson@11400: # change *IDENT to IDENT@{\tt IDENT} paulson@11400: # where IDENT is any string not containing | ! or @ paulson@11400: # FOUR backslashes: to escape the shell AND sed paulson@11404: sed -e "s~\*\(\".\".\".\".\)~\1@\\\\isa {\1}~g paulson@11404: s~\*\(\".\".\".\)~\1@\\\\isa {\1}~g paulson@11404: s~\*\(\".\".\)~\1@\\\\isa {\1}~g paulson@11404: s~\*\(\".\)~\1@\\\\isa {\1}~g paulson@11404: s~\*\([^ |!@{}][^ |!@{}]*\)~\1@\\\\isa {\1}~g" $1.idx | makeindex -c -q -o $1.ind