doc-src/sedindex
author Walther Neuper <neuper@ist.tugraz.at>
Thu, 23 Sep 2010 14:49:23 +0200
branchisac-update-Isa09-2
changeset 38014 3e11e3c2dc42
parent 3096 ccc2c92bb232
permissions -rwxr-xr-x
updated "op +", "op -", "op *". "HOL.divide" in src & test

find . -type f -exec sed -i s/"\"op +\""/"\"Groups.plus_class.plus\""/g {} \;
find . -type f -exec sed -i s/"\"op -\""/"\"Groups.minus_class.minus\""/g {} \;
find . -type f -exec sed -i s/"\"op *\""/"\"Groups.times_class.times\""/g {} \;
find . -type f -exec sed -i s/"\"HOL.divide\""/"\"Rings.inverse_class.divide\""/g {} \;
     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{*NE theorem}, etc.
     9 #
    10 # change *"X"Y"Z"W  to  "X"Y"Z"W@{\tt "X"Y"Z"W}
    11 # change *"X"Y"Z    to  "X"Y"Z@{\tt "X"Y"Z}
    12 # change *"X"Y      to  "X"Y@{\tt "X"Y}
    13 # change *"X        to  "X@{\tt "X}
    14 # change *IDENT  to  IDENT@{\tt IDENT}  
    15 #    where IDENT is any string not containing | ! or @
    16 # FOUR backslashes: to escape the shell AND sed
    17 sed -e "s~\*\(\".\".\".\".\)~\1@{\\\\tt \1}~g
    18 s~\*\(\".\".\".\)~\1@{\\\\tt \1}~g
    19 s~\*\(\".\".\)~\1@{\\\\tt \1}~g
    20 s~\*\(\".\)~\1@{\\\\tt \1}~g
    21 s~\*\([^ |!@{}][^ |!@{}]*\)~\1@{\\\\tt \1}~g" $1.idx | makeindex -c -q -o $1.ind