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

How To Create Background Shading For Every Other Line Of Text In A Text Box

New Here ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Could really use some help here.  I have some extensive catalog work to do with lots of product descriptions and part numbers.  I'm trying to figure out how to highlight every other line of text automatically.  Tables / Cells don't work great for the type of application charts i need to create.  I can't belive there isn't already an option for this in Indesign at this point.  Maybe there is, but Im missing it? 

In the past i would just create a colored box and paste that behind every other row as that was the easy solution.  This is not a viable solution for this catalog.  I will be inserting mass data from excel files and when i copy / paste that data i would like every other line to automatically highlight.  Is this a possiblity? 

 

I've attached an image sample of what Im looking for.  This was done by manually putting grey filled boxes behind every other line and adjusting to fit.  Moving forward i just want this done automatically inside the text box itself.

 

Views

2.3K

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 ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Tables would be the best way to do it, but if you say that's not an option, then scripting is probably your next best bet. You can also fake it by going into Character, setting an Underline and adjusting the Underline options to mimic a highlight. You could then run a GREP search to find every other paragraph and apply a style with your saved underline setting to that paragraph. 

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 ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

To highlight every other line of a paragraph, you can use line styles (under drop caps and nested styles) in the paragraph style definition, there defining three entries

1.  [None] for 1 line (assuming to start highlighting on the second line)

2.  choose highlight character style for 1 line

3.  [Repeat] for 2 lines

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
Guide ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

Hi geng,

I'm afraid this would not work since character style would only allow you to highlight text without expanding up to the whole column.

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
Valorous Hero ,
Sep 13, 2019 Sep 13, 2019

Copy link to clipboard

Copied

You could make your two paragraph style loop with Apply/apply next. While it will still take intervention, selecting each block of records and the apply/apply next is reasonably quick.

 

I have usually created either a merge file along with Em Software's Data Merge plug-in or simply made tagged text. Either way the data comes in with the formating applied (assuming your styles are created).

 

I also prefer text shading for this type of records. Much better than tables.

 

Mike

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
New Here ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

LATEST

I just wanted to thank all of you guys for your input and advise.  I really didn't know this type of community was out there, but i can see its a good one.  I will be testing out all of your theories in the next few days and let you know the results 🙂 

Thanks again guys.  I appreicate it. 

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