[OS X TeX] math replace
Peter_Dyballa at Web.DE
Thu Jun 27 13:43:09 EDT 2013
Am 27.06.2013 um 19:20 schrieb Herbert Schulz:
> Assuming my interpretation is correct
It is! (And the important thing is the sequence _ before ^, because otherwise ^ would mean NOT [SET NOT containing "_"], i.e., every occurrence of i NOT preceded by _.)
> this will NOT do what George wants because he explicitly said that the i's were NOT always super or subscripts.
Without exact and complete description of this other case (or these other cases – but then regular expressions are pretty useless) my crystal ball does not show anything else than mist.
One can assume that lines exist that have ^i or _i and also i, explaining its interval of values. One can now spend a few days to find the complete reg-exp. Something more useful would be to change the easy ones and save the file, then compare the new state with the previous one (in GNU Emacs something basic) and apply further changes, in case they are needed, on the lines with found differences. A keyboard macro would then be useful (available in …).
A sed or awk script would search for a line in math mode and then simply replace every i with k.
"I'm a rabid typist."
More information about the MacOSX-TeX