| author | bulwahn | 
| Sun, 05 Feb 2012 17:43:15 +0100 | |
| changeset 46434 | 6d2af424d0f8 | 
| parent 11404 | 280436a346ca | 
| permissions | -rwxr-xr-x | 
| 11400 | 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 | |
| 11404 
280436a346ca
careful changes to make its output identical to that of indexing macros
 paulson parents: 
11400diff
changeset | 19 | sed -e "s~\*\(\".\".\".\".\)~\1@\\\\isa {\1}~g
 | 
| 
280436a346ca
careful changes to make its output identical to that of indexing macros
 paulson parents: 
11400diff
changeset | 20 | s~\*\(\".\".\".\)~\1@\\\\isa {\1}~g
 | 
| 
280436a346ca
careful changes to make its output identical to that of indexing macros
 paulson parents: 
11400diff
changeset | 21 | s~\*\(\".\".\)~\1@\\\\isa {\1}~g
 | 
| 
280436a346ca
careful changes to make its output identical to that of indexing macros
 paulson parents: 
11400diff
changeset | 22 | s~\*\(\".\)~\1@\\\\isa {\1}~g
 | 
| 
280436a346ca
careful changes to make its output identical to that of indexing macros
 paulson parents: 
11400diff
changeset | 23 | s~\*\([^ |!@{}][^ |!@{}]*\)~\1@\\\\isa {\1}~g" $1.idx | makeindex -c -q -o $1.ind
 |