Skip to main content
alisonl0shi
Known Participant
January 19, 2023
Answered

Applying a paragraph style that can also change the character style to "None"

  • January 19, 2023
  • 4 replies
  • 710 views

Hi all--

I have a very long list of events that I need to format. Each proceeded by a date. So I'm doing a Find/Change on each month (e.g. "September") and applying the paragraph style "event date". However when I do this, it won't override the character style. Is there a way that I can make the paragraph style override the character style? I've added a Character Style "None" to the Find/Change but it still leaves the actual month days e.g. in "September 12" it will only apply the paragraph style to the September and not the 12. I'm looking for a solution that will change the *entire* paragraph, not just the word that I've used to find the paragraph.

Thanks so much!

 

 

 

This topic has been closed for replies.
Correct answer James Gifford—NitroPress

I am not entirely clear on the workflow here, but have you looked at using a GREP style in that Paragraph Style? You can define a GREP string and have a Character Style applied to it automatically.

 

See the Paragraph Style menu, GREP Style pane. You do need to know the basics of GREP (or ask — there are some good contributors here who do), but it's a very powerful little feature and sounds like it's exactly what you need.

 

4 replies

Barb Binder
Community Expert
Community Expert
January 19, 2023

Hi @alisonl0shi:

 

It looks like you're good to go but just making sure you aware of the Clear Overrides in Selection Button. It's the ¶+ button at the bottom of the Paragraph Styles panel. That and the Style Override Highlighter button [a+] button at the top of the Paragraph and Character Styles panels are game-changers when it comes to managing overrides.

 

~Barb

~Barb at Rocky Mountain Training
Community Expert
January 19, 2023

When you're applying the paragraph style hold down modifier keys.

This would be ALT CMD (or ALT shift) I can't remember off the top of my head - I know the modifiers when I'm working but couldn't tell you in a chat.

 

anyway - some combination of two keys in the bottom left of the keyboar, CTRL SHIFT ALT (CMD) OPtion or whatever is there.

 

When you hold the modifier key and select the paragraph style it removes the character style.

James Gifford—NitroPress
Legend
January 19, 2023

This is probably more on-point than my suggestion. (FWIW, I was reading the query as needing a partial character style change, not completely clearing it.) Alt-[click style] does it for me.

 

Again, probably scriptable if this is a lengthy or repeated task.

 

James Gifford—NitroPress
Legend
January 19, 2023

I am not entirely clear on the workflow here, but have you looked at using a GREP style in that Paragraph Style? You can define a GREP string and have a Character Style applied to it automatically.

 

See the Paragraph Style menu, GREP Style pane. You do need to know the basics of GREP (or ask — there are some good contributors here who do), but it's a very powerful little feature and sounds like it's exactly what you need.

 

alisonl0shi
Known Participant
January 19, 2023

Hi James, I think this sounds like the way to go, because when you hit "Change all" in the Find/Change menu, I don't know how to also hit Alt/Command (or whatever it is), or if that's even possible (is it?). I will learn about GREP. I've been putting that off ... for obvious reasons!

James Gifford—NitroPress
Legend
January 19, 2023

The shift-style method would work only with individual selections, not with 'find/change all' actions. So yes, the GREP style approach might be the right one. (What's really needed here is a good script, I think, but.) This hack might work:

 

Redefine the style with a simple GREP style to apply [None] character style to all characters. That should more or less instantly clear the character overrides on that newly applied style only. The GREP wildcard . (period) should select all characters except line breaks; someone with more expertise might have a better string.

 

Then, probably, remove the GREP style from the style, so that it won't interfere with further formatting, and won't slow the document actions down. (GREP styles that apply to a lot of the text can take appreciable time to update with each text change.)

 

alisonl0shi
Known Participant
January 19, 2023

OK--I've actually figured out how to solve the immediate problem, by applying the paragraph style and then afterwards running another F/C that strips the character style so that the paragraph style is dominant... it's only slightly less efficient.