help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Capitalize letter after brace


From: Ross A. Laird
Subject: Re: Capitalize letter after brace
Date: Tue, 14 Oct 2008 22:44:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Thanks for the help. It got me started, and with a bit of
tinkering I came up with this:

\\index{\([a-z]\)  -->  \\index{\,(upcase \1)

I figured I better escape that first slash, as the word "index" may
appear on its own in my document. The above works perfectly.

Thanks again.

Cheers.

Ross

"Andrea Vettorello" <address@hidden> writes:

> On Wed, Oct 15, 2008 at 7:02 AM, Ross A. Laird <address@hidden> wrote:
>> This is the type of thing that would take me a day to figure out on my
>> own (though, probably, I could eventually figure it out), but most
>> readers of this group can probably throw me a line in a few seconds:
>>
>> I have some index entries in my tex file that are capitalized
>> \index{Capitalized} and others that are not \index{not}. I want to make
>> all entries consistently capitalized. This means a search for the first
>> character after the opening index brace and a change of its case. What's
>> the magic formula (please...).
>>
>
> Not tested, probably needs some escaping (I'm not sure if the opening
> brace should be escaped), anyway something like:
>
> M-x replace-regexp Enter
> Replace regexp: index{\(w\) Enter
> with: index{\,(capitalize \1) Enter
>
> The above should capitalize the first word after every "index{" in
> your tex file.
>
>
> -- 
> Andrea
>
>
>

-- 
Ross A. Laird, PhD
www.rosslaird.info





reply via email to

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