doc-src/sedindex
author wenzelm
Sun, 30 May 2010 21:34:19 +0200
changeset 37198 3af985b10550
parent 3096 ccc2c92bb232
permissions -rwxr-xr-x
replaced ML_Lex.read_antiq by more concise ML_Lex.read, which includes full read/report with explicit position information; ML_Context.eval/expression expect explicit ML_Lex source, which allows surrounding further text without loosing position information; fall back on ML_Context.eval_text if there is no position or no surrounding text; proper Args.name_source_position for method "tactic" and "raw_tactic"; tuned;

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