: InDesign: Resetting character style after end of paragraph Is there a way (a setting or a shortcut) in InDesign to reset a character style to None after the end of a paragraph? Paragraph styles
Is there a way (a setting or a shortcut) in InDesign to reset a character style to None after the end of a paragraph?
Paragraph styles have the option for Next Style, but this does not apply to character styling.
Currently I'm using Quick Apply (ctrl+return+None) after each paragraph to reset the character style, but it is very time consuming if you have many lines with two or more different character styles.
NOTE: I'm using character styling because as far as I know you cannot have two different paragraph styles on the same line. See screenshot below for use example.
More posts by @Odierno310
1 Comments
Sorted by latest first Latest Oldest Best
In your case I would have maybe used GREP styles shown on the image below.
Here ~h stands for End Nested Style Here character which serves as a style divider (visible in special characters mode as a backslash). If you feel more comfortable with any other character feel free to replace all the ~h-s with anything you like from the drop-down menu.
The application order of the styles matters. Here are the expressions so that you could copy them:
For Style 2: ~h.*
For Style 1: ~h[^~h]*~h?
In case you are interested in regular expressions used in GREP styles, here's how the above construction works:
First we apply Style 2 to everything from the first End Nested Style Here character (inclusive) to the end of the paragraph. . means any character, .* means any characters, any times which basically means all characters. So, the whole expression means ENSH character and everything after.
Then we apply Style 1 to everything between two ENSH characters (inclusive). [^~h] means anything but a ENSH character. Thus, [^~h]* means anything but an ENSH character, any times or, to put it simpler, everything until an ENSH character. So, ~h[^~h]* will mean everything starting from an ENSH character until the next ENSH character.
If we now leave the second expression as it is, the Style 1 will be applied to EVERY
“ENSH + text” pair. But if we include the following ENSH characher into this group too, the text AFTER the second ENSH will not meet the condition, just as needed. So we add ~h to the end of the expression and change it to ~h? to indicate that this ENSH is optional (as on line 3 on the example image).
You can learn more about the GREP syntax on any website that describes regular expressions like this one.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.