[OS X TeX] Search with .* but how to replace?

Herbert Schulz herbs at wideopenwest.com
Sat Apr 26 19:55:48 CEST 2014


On Apr 26, 2014, at 12:00 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:

> 
> On Apr 26, 2014, at 11:43 AM, Alain Schremmer <schremmer.alain at gmail.com> wrote:
> 
>> 
>> (*) I need to replace \NewTerm{blah} by \textbf{blah}\index{blah} (which is what \NewTerm does) because, occasionally, I need to edit to, say, \textbf{blahs}\index{blah} or  \textbf{blahs}\index{blah (to)}.
>> 
> 
> Howdy,
> 
> With the default Ruby set as the regex language:
> 
> Find: \\NewTerm{(.*)}
> 
> Replace: \\texbd{\1}\\index{\1}
> 
> Just like \( and \) you've got to quote \, i.e., \\, in the Find section to get the character \.
> 
> Good Luck,
> 
> Herb Schulz
> (herbs at wideopenwest dot com)

Howdy,

That should be in both the Find and Replace sections here.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list