[OS X TeX] Multiple Search/Replace in one script?
jkock at start.no
Thu May 31 03:43:51 EDT 2007
> I am looking for a way to automate (and also archive) my most
> common ten or twenty search/replace runs.
> I have to admit, I have no idea about scripting. But I guess there
> should be a way in Applecript/Perl/Rupy/Whatever to write down
> several entries with...
> ... what should be the search string
> ... what should be the replace string
> ... what kind of search should be opeated (regulr expression, case
> sensitive, etc.)
> Any recommendations?
Alpha has precisely this functionality, through what it calls
Filters. A filter is a file with a search-and-replace pattern per
line, each pattern being represented by a search string, then a
replace string, and then a flag to control whether the search is
regexp, literal, case insensitive, etc.
There is ample support for manipulating and applying such filters,
but the Filters Menu is not activated by default. To turn it on,
go to "Config -> Global Setup -> Menus" and check the Filters
Alternatively, the usual Search dialogue (cmd-F) has a popup menu
that allows you to save search-and-replace patterns.
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX