[OS X TeX] search & replace commands

Maarten Sneep maarten.sneep at xs4all.nl
Thu Jul 8 16:29:01 CEST 2004

On Jul 8, 2004, at 10:12 AM, Alain Schremmer wrote:

> Is there a way in TeXshop to search and replace
> 	\sfbf{Hamiltons}
> by
> 	$\denom{Hamiltons}$
> In other words, is there a wild card?

Also known (more commonly at least) as regular expression search and 
replace. iTexMac, BBEdit, emacs, vim, SubEthaEdit, Xcode, ... all have 
this, TeXShop doesn't. The BBEdit is payware, Subethaedit is free for 
personal non-commercial use, Xcode is free as in beer, the rest are 
free in less restricted senses (GNU to Postcard-ware).

Most of these use perl compatible regular expressions, and (at least 
for BBEdit which I use), you'd have to search for "\\sfbf\{(.+?)\}" 
(without the quotes) and replace with "$\\denom{\01}$" (again without 
the quotes). Things become tricky when Hamilton contains curly braces.


Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.

More information about the macostex-archives mailing list