[OS X TeX] Boldface

Alain Schremmer Schremmer.Alain at verizon.net
Sun Feb 13 16:28:53 EST 2005


It can matter—a bit: Say you were writing about three "occurrences" of 
something and that you wanted to index "occurence".
But this is really a shortcoming of NewTerm.
I think that there are a couple of occurences of this in my book but I 
will change the wording around it as I come across them (in one of my 
many rereads).

What I am curious about is what the difference is between (.+?) and 
[^}]* (I assume that this is to allow the reference \1.)

find
\\textbf{(.+?)}\\index{\1}
replace with
\\NewTerm{\1}"
and

find
\\textbf{[^}]*}\\index{
replace with:
\\NewTerm{

Regards
--schremmer


Peder Axensten wrote:

> I guess that in practise it doesn't really matter, but using 
> "\\textbf{(.+?)}\\index{.+?}" would incorrectly change "\textbf{one 
> text}\index{different text}" to " \NewTerm{one text}".
>
> I suggest find "\\textbf{(.+?)}\\index{\1}", replace with 
> "\\NewTerm{\1}".
>
> On 13 feb 2005, at 21.05, Maarten Sneep wrote:
>
>> 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.
>
>
> /Peder
>
> --------------------- 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>
>
>
>
--------------------- 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 MacOSX-TeX mailing list