Copy link to clipboard
Copied
Hi everyone,
I’m trying to apply paragraph shading to a specific text segment (e.g., "Job Title:") with rounded corners in InDesign while leaving the rest of the text (e.g., "Truck Driver/Operator") unshaded. I also want to change the font style and size for the shaded part and then remove the colon ":" after applying the styles.
I’ve attempted this using paragraph styles and characters style in nested styles, but the paragraph shading is being applied to the entire line instead of just the specific segment. I need a way to:
Any guidance on how to achieve this would be greatly appreciated!
Thanks!
<Title renamed by MOD>
Copy link to clipboard
Copied
Since you want it to apply only to selected text and not a paragraph, then you will have to build a Character Style; not a paragraph style.
Your character style can change the font size for the underlined (shaded) portion. Choose a thick underline amount and make the Line Style a "dotted line" in order to get the rounded ends. Choose a swatch color for the dotted line as well as the gap in the dotted line. This will make it seem like a solid line with rounded ends. You will like have to add En Spaces on each side of Job Title to push the rounding out past the words (by a find/change). A find/change could hunt down the colon you do not want to see, or else a nested style could color it to make it invisible.
Copy link to clipboard
Copied
Hi Mike,
Thanks for your help! I am having trouble finding the dotted line option in the character style settings. Could you please guide me on how to locate it? i am using indesign 2020
Copy link to clipboard
Copied
In the Character Style, Underline options, Type controls the line type. Dotted is one of the choices.
This technique works, and is an extremely artful example of (almost literally) how to color outside the lines with ID features, but is extremely fussy (such as needing the line weight to be less than the leading, more or less) and requires the extra spaces to be added before and after the shaded text. There's also no control of the corner rounding; you get 180-degree ends or nothin'.
While it can be achieved, and nested/GREP styles could automate it a bit, I find it too "carpentered" and fragile for anything like routine use. Since it sounds like this needs to be a repeated, workaday enhancement, I'd search for something more... stable to enhance a phrase within a line.
Copy link to clipboard
Copied
It's a little less "flowing," but, I think, a lot sturdier and flexible: I'd use a two-cell table. That gives you two paragraph styles on a line that you can do anything with, in fairly basic ID fashion:, with almost limitless tweaking and variations:
Copy link to clipboard
Copied
You can write this word in a separate frame and make this as an inline anchored frame. With an Object Style you an define position in line, applied paragraph style for that word, automatic sizing. Etc
Copy link to clipboard
Copied
A better solution than using a table if you want to keep most of the text part of a continuous flow.
(But the takeway here, for the OP, is that there's no direct way to apply two different paragraph styles in the same line/paragraph, so everything has to be a workaround of one sort or another. Choose the one that fits your layout and working model best.)
Copy link to clipboard
Copied
Hi @Muhammad Sattar:
This is a visual of Mike's approach, which seems pretty straightforward/stable to me.
~Barb
Copy link to clipboard
Copied
No question it works, and is the only method to shade part of any given paragraph.
But the amount of "carpentry" needed seems high to me, the shading is limited vertically (by leading, it seems) and you can only have 180-degree end caps. If those drawbacks outweigh the preference for a truly inline/blended effect, it's a good option.