Copy link to clipboard
Copied
Hey everyone, I have a question about Nested Styles. I've created a "Generate Static Caption" style that creates the correct styling for the cutline, but I have to manually style the photo credit each time. Is there a way to create a nested style that will possibly style the photo credit to be different than the cutline. Maybe something that could style the line of text in reverse until the last period? I'm not sure how to do it, because you can't have it maintain one style up until the period, because sometimes, a cutline can have multiple periods within it. If anyone has any hacks for this. I'd appreciate it. Thanks! I've attached an example below.
Copy link to clipboard
Copied
Hi Flathead Beacon. Yes, you can do this with a nested style you just need to inverse the logic: set up the font for the paragraph style, and then create a character style for the description.
Nest the character style through 1 Sentences.
Then assign the paragraph style via the captions dialog box.
~Barb
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi.
It's more a job for grep styles than for nested styles.
If your cutline always end with a period, the following regex should do the job:
Regex deleted like Adobe did with the old valuable posts and international forum posts
Otherwise, you need to add the ending characters in the negative character class (between the square brackets)
Here's an example that allows you to end your legend with ?, ! or ellipsis:
Regex deleted like Adobe did with the old valuable posts and international forum posts
https://community.adobe.com/t5/InDesign/Call-to-strike-on-Adobe-Forum/m-p/10656317
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Flathead Beacon. The GREP Vinny provided works from the end of the paragraph back to the last period (the opposite of the nested style). So if you have one or more periods on the line, you will still be OK (as long as the final character isn't a period—which it isn't in either of the two examples shared so far). Note that formatting logic reversed again. Now you will want to define the paragraph style to work for the cutline and apply the character style to the photo credit.
~Barb