Embedded GREP style to change text case?

1,114 views
Skip to first unread message

Evans, Rebecca

unread,
Mar 16, 2011, 3:49:53 PM3/16/11
to InDesign Talk
Is there a way to use a GREP style to change Clc text to all lowercase? 

We have a book with lowercase section and recipe titles. I can change the text to lowercase myself, but when the book is converted to an eBook, it will no longer display using the same font and all the lowercase titles will look like mistakes, IMHO. We can ask the conversion house to change them back to Clc but I'm guessing that would not be an error-free change.

One workaround I thought of was to make the Clc titles an invisible character or paragraph style (I still have to experiment) and then insert a text variable that picks up the title and changes the case. As far as I know, text variables are the only instance where InDesign offers the option to automatically change case.

Anyone know an easier way?

Rebecca

Kathleen

unread,
Mar 18, 2011, 1:41:38 PM3/18/11
to indesi...@googlegroups.com
At the end of the job before you eBook you might try creating a lower case character style then in GREP style type in \u (for all your upper case characters) and select the lower case character style.
kat

Rick Gordon

unread,
Mar 18, 2011, 3:02:00 PM3/18/11
to indesi...@googlegroups.com
An additional complication to any solution is that you'll want any prepositions and artiles to be fully lowercase rather than caps-lowercase.

Also, as an aside, when you move into an ebook version, note that (the appalling) ADE (which drives the Nook, Kobo, Sony, and most other hardware ePub readers) does not support CSS text-transform, and therefore you cannot do styled all caps or small caps, but rather need to hard-code uppercase or small caps with resized uppercase (a big pain).

Rick Gordon

------------------

On 3/18/11 at 10:41 AM -0700, Kathleen wrote in a message entitled
"Re: [ID] Embedded GREP style to change text case?":

--
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW: http://www.shelterpub.com

Kathleen

unread,
Mar 18, 2011, 3:19:24 PM3/18/11
to indesi...@googlegroups.com
What does hard-code mean?
kat

> hard-code uppercase or small caps

> --
> you are subscribed to "InDesign talk" on Google Groups, to post: send email to indesi...@googlegroups.com, to unsubscribe: send email to indesign-tal...@googlegroups.com, for more options visit http://groups.google.com/group/indesign-talk

Kat
McGraphics Design
(626) 799-2195
http://www.mcgraphics.us

Evans, Rebecca

unread,
Mar 18, 2011, 3:53:40 PM3/18/11
to InDesign list
"Hard code" means to type it in as you want it rather than get a style to
change it for you.

Character styles will not change text to all lowercase. Sigh. If I could
use a character style, I would be so happy.

We've decided to change the titles to all lowercase by hand, then have the
eBook conversion company use boldface for them.

Can you use GREP to change an uppercase character to a lowercase one?
Find: \u and change to \l didn't work (and I felt silly when it changed
the first capital letter to "\l").

R

Rick Gordon

unread,
Mar 18, 2011, 6:41:02 PM3/18/11
to indesi...@googlegroups.com
Yes, via scripting. You script to find each instance of the GREP find what string, change it to lowercase, find the next instance, etc., etc.

Rick Gordon

------------------

On 3/18/11 at 7:53 PM +0000, Evans, Rebecca wrote in a message entitled


"Re: [ID] Embedded GREP style to change text case?":

>Can you use GREP to change an uppercase character to a lowercase one?


>Find: \u and change to \l didn't work (and I felt silly when it changed
>the first capital letter to "\l").

--

Roy McCoy

unread,
Mar 18, 2011, 6:49:30 PM3/18/11
to indesi...@googlegroups.com
Or all instances at once - which is far easier, and which you always prefer when you can.

Roy

Rick Gordon

unread,
Mar 18, 2011, 7:53:23 PM3/18/11
to indesi...@googlegroups.com
Yeah, actually my thought is find all instances, and than traverse through the found list, changing to caps-lowercase (and then dealing with prepositions and articles).

Where is the damn dictionary for caps-lowercase exceptions, anyway?

Rick

------------------

On 3/18/11 at 11:49 PM +0100, Roy McCoy wrote in a message entitled


"Re: [ID] Embedded GREP style to change text case?":

>Or all instances at once - which is far easier, and which you always prefer when you can.

>--
>you are subscribed to "InDesign talk" on Google Groups, to post: send email to indesi...@googlegroups.com, to unsubscribe: send email to indesign-tal...@googlegroups.com, for more options visit http://groups.google.com/group/indesign-talk

Roy McCoy

unread,
Mar 18, 2011, 7:23:40 PM3/18/11
to indesi...@googlegroups.com
Have you ever done that? It's tricky because it normally doesn't let you see the current find in order to be able to decide whether to change it or not. I've posted what I use for this before, but here it is again:

set find what of find text preferences to "!."
set change to of change text preferences to "!"
set theFinds to find text document 1
repeat with j from (count of theFinds) to 1 by -1
select item j of theFinds
set zoom percentage of layout window 1 to (get zoom percentage of layout window 1)
display dialog "Change this one?" buttons {"Yes", "No", "Cancel"} ¬
default button "Yes"
if button returned of result is "Yes" then
change text item j of theFinds
end if
end repeat
beep

The beep lets you know it's moved on to the next operation. I'm suddenly not at all sure I need to check on this one, and I don't if I always change all of them; but there aren't that many instances of !. in my doc so I don't realy need to worry about changing the script, regardless.

I'm not sure there is a user-accessible dictionary for the title case exceptions, but you should at least be able to find out what they are. Whether you can or not is another question - I'm not sure, and I don't know where to find them myself.


Roy

Reply all
Reply to author
Forward
0 new messages