I'm writing a document where I had to change all instances of the variable i to x and the document is already considerably long. Is there a editor that will allow me to do this, or in general, replace text inside math environments?
|
|
|||
|
|
|
emacs can do this sort of thing fairly easily
this looks for Starting from a document such as
then executing
Note it hasn't changed anything out of math and it only changes |
|||||||||
|
|
I once wrote a perl script to do just that. It's called MathGrep and can be obtained from http://www.math.ntnu.no/~stacey/HowDidIDoThat/LaTeX/mathgrep.html. The biggest caveat is that it doesn't recognise dollars (see Are \( and \) preferable to $?), but then I also wrote a script to convert all dollars to I'm struggling to think of a use-case where this would beat David's Emacs script though ... |
|||
|
|