| author | wenzelm | 
| Mon, 12 Dec 2022 13:28:18 +0100 | |
| changeset 76627 | 2542ea382215 | 
| parent 73740 | c46ff0efa1ce | 
| permissions | -rwxr-xr-x | 
| 103 | 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  | 
#  | 
|
| 357 | 8  | 
# a space terminates the \tt part to allow \index{*NE theorem}, etc.
 | 
9  | 
#  | 
|
| 3096 | 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}  
 | 
|
| 103 | 15  | 
# where IDENT is any string not containing | ! or @  | 
16  | 
# FOUR backslashes: to escape the shell AND sed  | 
|
| 3096 | 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
 | 
|
| 
73740
 
c46ff0efa1ce
more direct use of latex tools: avoid diversion into "isabelle latex -o pdf" and its confusion of ISABELLE_PDFLATEX vs. ISABELLE_LUALATEX;
 
wenzelm 
parents: 
48985 
diff
changeset
 | 
21  | 
s~\*\([^ |!@{}][^ |!@{}]*\)~\1@{\\\\tt \1}~g" $1.idx | $ISABELLE_MAKEINDEX -o $1.ind
 |