I'm writing a book for which I produce sections for glossaries, acronyms and index entries using the
makeidx packages on a template derived from the Springer book template. To support this I have a build process using SED to run around 230 sed commands like this:
\myac command is defined as:
That is, try to find matching whole words and insert acronym, glossary or index entries.
This approach is very fragile - if the glossary entries get inserted into captions or labels my build process almost always fails.
Is there some way to define
\myac, or any other command for that matter, so that it will not interfere with things like labels or other commands and environments if it finds itself embedded somewhere it shouldn't be?
Or, alternatively, is there a better way to batch index a document? My doc is about 250 pages, and I don't really have time to go through it all manually entering index entries.