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

Different text style in every second cell

Community Beginner ,
May 20, 2019 May 20, 2019

Hello everyone,

is there any way to change tables text formatting in every second cell?

I have a table with 100 cells and 1 column. I want to change every second cells text formating (font family, font size and font colour).

I know it is possible to change every second cell style but i can't find similar solution for text formatting in every second cell.

Do you have any idea how I can do it?

text_formatting_every_second_cell.jpg

1.9K
Translate
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

correct answers 1 Correct answer

Guide , May 21, 2019 May 21, 2019

Jose,

I only come back here to post this and give you the most simplistic way to fix your issue [in bold below]!

• You have a table as you said [It could a basic table].

• Create (if not already done) 2 cell styles you could call "Title" (including the grey background and the "Title" para style) and "Description" (including the white (or no) background and the "Description" para style).

[Link the 2 para styles has no interest.]

• Just apply (manually) the cell style "Title" to the first cell of the t

...
Translate
Mentor ,
May 20, 2019 May 20, 2019

In case your longest Title is still shorter then the shortest Example Text, it is doable with GREP.

1. Apply Example Text para style to the whole table.

2. Use this GREP query ^.{1,20}$ to locate any paragraph ranging from 1 to 20 characters long, and apply Title style to it. Sure, you can use any number instead of 20, which fits your threshold.

Translate
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 ,
May 20, 2019 May 20, 2019

winterm​ thank you. Unfortunately sometimes Title is longer then Example Text.

So your solution won't work.

Translate
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
Mentor ,
May 20, 2019 May 20, 2019

OK, amount of characters was just the first thing to try, since titles usually are shorter then descriptions. Well, not always.

What else you can say about your text, how machine could tell title from description? Maybe there's always a certain number(s), or any punctuation, or words in ALL CAPS somewhere in descriptions, but never - in titles? (Almost) anything can be used. Could you say about something: this is always found in Titles, but never - in Descriptions, or vice versa.

Translate
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
LEGEND ,
May 20, 2019 May 20, 2019

https://forums.adobe.com/people/Jose+Arcadio  wrote

I know it is possible to change every second cell style but i can't find similar solution for text formatting in every second cell.

Cell styles can contain paragraph styles, so applying alternating cell styles is the way to apply alternating text formatting,

Screenshot 2019-05-20 08.41.48.png

Translate
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 ,
May 20, 2019 May 20, 2019

SJRiegel​ yes but it doesn't work for every second cell. Your solution works globaly for whole table.

Translate
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
LEGEND ,
May 20, 2019 May 20, 2019

https://forums.adobe.com/people/Jose+Arcadio  wrote

SJRiegel  yes but it doesn't work for every second cell. Your solution works globaly for whole table.

I see. You said you had a way of alternating cell styles, but I think you must have meant alternating fills.

A table option for alternating cell styles would be a great feature request.

Translate
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 ,
May 20, 2019 May 20, 2019

Try Smart Styles - a plugin from WoodWing.

You can give the trial a free spin for a whole month.

I'm not sure if it will be able to set and apply alternating text formatting or styles – that would be the easiest and best solution ! But if it doesn't work that way, then maybe you can painstakingly set up one proper example, grab the style of it, and hope it will retain the alternating effect when applying it to another table.

Translate
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 ,
May 20, 2019 May 20, 2019

Hi Peter,

SmartStyles is indeed able to detect a design pattern like the use of alternating formats in cells.

So yes, this is really worth testing.

A small sample of a table as template is enough so that SmartStyles will be able to analyze the pattern.

And if that saved smart style will be applied to a different table the styles will be applied like the analyzed template.

Just like the sample is doing this.

Regards,
Uwe

Translate
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
Mentor ,
May 20, 2019 May 20, 2019

Worked with WoodWing Smart Styles plugin in the early days of ID v.3 (CS) and was really impressed by its ability to catch quite complex patterns. The only drawback - it's cooostly, and, unless you're dealing with tables every day, you may have a hard time to justify the purchase to your boss or your own wallet.

On the other hand, it is applicable not only to tables…

Why oh why Adobe couldn't buy it and include in, say, version 15.

Translate
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 ,
May 20, 2019 May 20, 2019

Based on your screen shot example, you could try formatting text first, with a next style (title > next style description, description > next style title) and then convert to a table and apply a table style with alternating rows.

Translate
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 ,
May 20, 2019 May 20, 2019

Oooh, that's a nice example of out-of-the-box/cell/table thinking !

Translate
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 ,
May 21, 2019 May 21, 2019

@Jeffrey_Smith, I have created Title with next style Description, and Description with next Title as you said. But I dont understund your next step.

Can you please explain it with more details or with screenshots what to do?

Translate
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 ,
May 21, 2019 May 21, 2019

Once you have the styles created with the associated next style:

-select the entire range of unformatted text

-have the paragraph style panel open

-contextually (right-mouse) select the first style in the style panel

-drop down to Apply "Title" and then Next Style

This will format the range with the sequence of next styles

next-style.jpg

Translate
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 ,
May 21, 2019 May 21, 2019

Great, thank you. It works.

Shame (for Adobe) it is not as easy as should be (Adobe should think about fill styles).

Translate
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 ,
May 21, 2019 May 21, 2019

Jose,

I only come back here to post this and give you the most simplistic way to fix your issue [in bold below]!

• You have a table as you said [It could a basic table].

• Create (if not already done) 2 cell styles you could call "Title" (including the grey background and the "Title" para style) and "Description" (including the white (or no) background and the "Description" para style).

[Link the 2 para styles has no interest.]

• Just apply (manually) the cell style "Title" to the first cell of the table.

• Just apply (manually) the cell style "Description" to the second cell of the table.

Normally, all I previously mentioned has already be done by you when you posted your question!!

So, now, you just needed to do this:

Select these 2 first cells … and play this script!

Dropbox - FRIdNGE-0499_TableCellStyles.jsxbin - Simplify your life

Done! The cell styles have been alternatively applied to all the cells!

Have a good day! … and next time, read your Adobe private messages!

Best,

Michel, for FRIdNGE

Translate
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 ,
May 21, 2019 May 21, 2019

Thank you! I will test it a the day after tomorrow and give you my feedback.

Translate
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 ,
May 27, 2019 May 27, 2019

Sorry for delay but I was sick for a few days. I checked your script but it doesn't work on my InDeisgn CS6.

EDIT: I've checked again and now it doesn't crush (I think I made smth wrong previously) but it doesn't change styles but texts in every cell changing to the same as first and second cells.

Translate
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 ,
May 30, 2019 May 30, 2019
LATEST

Hallo Everyone,

Michel [FRIdNGE]​ send me in private a script that totally works!

Thank you all for your ideas and brainstorming.

Translate
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