doc-src/TutorialI/isa-index
changeset 11400 ddcfdc38090d
child 11404 280436a346ca
equal deleted inserted replaced
11399:1605aeb98fd5 11400:ddcfdc38090d
       
     1 #! /bin/sh
       
     2 #
       
     3 #sedindex - shell script to create indexes, preprocessing LaTeX's .idx file
       
     4 #
       
     5 #  puts strings prefixed by * into \tt font
       
     6 #    terminator characters for strings are |!@{}
       
     7 #
       
     8 # a space terminates the \tt part to allow \index{*notE theorem}, etc.
       
     9 #
       
    10 # note that makeindex uses a dboule quote (") to delimit special characters.
       
    11 #
       
    12 # change *"X"Y"Z"W  to  "X"Y"Z"W@{\tt "X"Y"Z"W}
       
    13 # change *"X"Y"Z    to  "X"Y"Z@{\tt "X"Y"Z}
       
    14 # change *"X"Y      to  "X"Y@{\tt "X"Y}
       
    15 # change *"X        to  "X@{\tt "X}
       
    16 # change *IDENT  to  IDENT@{\tt IDENT}  
       
    17 #    where IDENT is any string not containing | ! or @
       
    18 # FOUR backslashes: to escape the shell AND sed
       
    19 sed -e "s~\*\(\".\".\".\".\)~\1@{\\\\isa{\1}}~g
       
    20 s~\*\(\".\".\".\)~\1@{\\\\isa{\1}}~g
       
    21 s~\*\(\".\".\)~\1@{\\\\isa{\1}}~g
       
    22 s~\*\(\".\)~\1@{\\\\isa{\1}}~g
       
    23 s~\*\([^ |!@{}][^ |!@{}]*\)~\1@{\\\\isa{\1}}~g" $1.idx | makeindex -c -q -o $1.ind