auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Replace something in math mode only


From: Ralf Angeli
Subject: Re: [AUCTeX] Replace something in math mode only
Date: Sun, 28 Jan 2007 20:36:26 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux)

* Alexey Romanov (2007-01-28) writes:

> I find that I often need, when editing papers, to change
> notation. Let's say I need to rename k to f. Obviously, simply using
> query-replace is not a good idea -- it will find all appearances of
> the letter k in the text.  Is there any way to do the same as
> query-replace -- but only within math and displaymath modes?

M-x query-replace-regexp-eval RET k RET (if (texmathp) "f" "k") RET

This will still find all appearances of "k" but only replace those
which are in math constructs (unless `texmathp', the function to check
that, fails).

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]