[OS X TeX] Boldface

Maarten Sneep maarten.sneep at xs4all.nl
Sun Feb 13 21:05:17 CET 2005


On 13 feb 2005, at 19:28, Alain Schremmer wrote:

> Of course, it works very nicely but good deeds are always punished: I 
> need more help as now I have the problem to
>
> find
>        \textbf{text}\index{text}
> and replace it with
>        \NewTerm{text}
>
> I tinkered a bit with the Find panel but there does not seem to be a 
> wild card and I know nothing of regular expressions.
>
> Could someone
>    (a) give me the magic formula?
>    (b) direct me to an intro to regular expressions for dummies?

Get a copy of TextWrangler and install it (it is no cost software). 
TeXShop and iTeXMac also have regex available in their search panels, 
but it may be a slightly different variant, and TextWrangler uses the 
same syntax as BBEdit, and for that I'm sure how things work. You may 
try TeXShop in 'pcre' mode, but be careful.

Search for:
     \\textbf{(.+?)}\\index{.+?}

Replace with:
     \\NewTerm{\01}

The TextWrangler help contains an explanation of what you're doing 
here, I suggest you read it.

Maarten

http://www.barebones.com/products/textwrangler/index.shtml

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list