Kevin Pfeiffer wrote: > Hi all, > > I followed the directions for making an index and this worked well, but > two questions arose. > > 1. The Index does not appear in the TOC.
http://www.math.upenn.edu/tex_docs/help/faq/uktug-faq/FAQ162.html > 2. Can I change the name? Now it says "Index", but I am working on a > German-language document. > > > BTW, thanks to Angus's tip earlier, here is a simple little script that > lets you tag entries for the index without cluttering up your text with > inline Idx tags. I suppose I could easily extend this to read a separate > list of entries, but perhaps someone has already done a fancier version > of something similar? > > -Kevin > > > # A wrapper script that preprocesses the lyx file to add a few Index > # tags to the .tex file before it is sent to the LaTeX compiler > # to use this, under preferences select this script as the > # converter for LaTeX -> dvi > > # adds Indexing on these 5 example names > # Smith1, Joe H. > # Smith2, Mary Holliston > # Smith3, Reinhold > # Smith4, Tom G. > # Smith5, Robert H. > > sed -e 's/\(Smith1\)/\1\\index{\1, Joe H.}/ > s/\(Smith2\)/\1\\index{\1, Mary Holliston}/ > s/\(Smith3\)/\1\\index{\1, Reinhold}/ > s/\(Smith4\)/\1\\index{\1, Tom G.}/ > s/\(Smith5\)/\1\\index{\1, Robert H.}/' \ > "$1" > "$1.$$" || die "sed died!" you're mixing perl with sh. The shell script way is sed -e '...' "$1" > "$1.$$" || { echo "sed died" >&2 exit 1 } > > mv -f "$1.$$" "$1" > > # run LaTeX compiler > latex "$1" > > # end -- Angus
