• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Applying Selective Paragraph Shading with Rounded Corners in InDesign

Community Beginner ,
Oct 26, 2024 Oct 26, 2024

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:

 

  1. Apply paragraph shading with rounded corners to only the selected text (e.g., "Job Title:").
  2. Change the font and size for the shaded portion.
  3. Remove the colon ":" after applying the styles.
  4. Do this efficiently for multiple headings.|

Any guidance on how to achieve this would be greatly appreciated!

Thanks!

 

 

<Title renamed by MOD>

TOPICS
How to , Type

Views

251

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2024 Oct 26, 2024

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.

Mike Witherell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2024 Oct 26, 2024

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2024 Oct 26, 2024

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.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2024 Oct 26, 2024

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:

 

JamesGiffordNitroPress_0-1729971778538.png

 


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2024 Oct 27, 2024

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2024 Oct 27, 2024

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.)


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2024 Oct 27, 2024

Copy link to clipboard

Copied

Hi @Muhammad Sattar:

 

This is a visual of Mike's approach, which seems pretty straightforward/stable to me. 

 

2024-10-27_20-06-02 (1).gif

 

  • First I ran a find/change to add spaces before and after "job title", and to remove the colon
    2024-10-27_20-14-42.png
  • I created a custom underline called Rounded Endcap
    2024-10-27_20-09-29.png
  • Then created a character style to make the Rounded Endcap thicker and assign the offset so that it appears behind the text (and changed the type size and weight)
    2024-10-27_20-11-33.png
  • And finally, assigned it via a GREP Style
    2024-10-27_20-13-01.png

~Barb

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 28, 2024 Oct 28, 2024

Copy link to clipboard

Copied

LATEST

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.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines