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

add a paragraph style within a paragraph style

Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Hi there,

 

I have a small issue when making a catalogue of over 200 pages: can I put a Paragraph Style within a Paragraph Style?

 

There is a specific piece of text in my document, that appears every so often, which automatically gets a specific paragraph style (I use a plugin for this). However, when this text with 'Paragraph Style A' contains a digit, I want it to change to 'Paragraph Style B'. 

 

Is this in any way possible? 

I know you can nest a character style, or use GREP to add a character style, but 'Paragraph Style A' specifically contains a Paragraph Rule in a certain color, so Character Style won't do the trick as 'Paragraph Style B' has a different color Rule, which can't be adjusted with just a Character Style...

TOPICS
How to , Type

Views

534

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

correct answers 1 Correct answer

Community Expert , Dec 06, 2023 Dec 06, 2023

No problem. 

 

So those are separate pieces of text / information? 

 

Can you / do you want to join them together? 

 

My approach was - they are separate - @rob day treat it as a single paragraph...

 

Both approaches have positives and negatives - but I think you need to clarify and decide which way is better for you... 

 

Votes

Translate

Translate
Community Expert ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

A paragraph can have only one single paragraph style as it name says. 
But you can use Character Styles in a Paragraph Style. You can do it in an automatic way with GREP and Nested Styles. 

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
Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Hi Will,

 

Thanks for replying. And yes, I do know about the possibilities with character style, however I need a paragraph style change as it's the paragraph rule that needs to change color.

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Use Underline with the exact position as character style. It is not possible to apply 2 paragraph styles to the same paragraph and it will never be. 

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
Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Thanks for that, but I was hoping maybe someone could help me find a solution. 'Underline' has a different effect from paragraph rule anyways, it doesn't go outside the word length. If you say 'it will never be possible', I happily welcome alternative ideas as well! Would make life much easier as I now have to change it manually. The catalogue is pretty big in number of pages and items to then adjust.

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Use paragraph frames instead of paragraph rulers, they offer more flexibility.

You can place a word as anchored frame. Text in a frame can have a different paragraph style.

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
Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Not sure how that would work within my current setup here,  but I'll give it a go and look into it, thx

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Hi @TRIXIE , Maybe you could show a screen capture of what you are trying to do--there is no way to apply multiple paragraph styles to a single 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
Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Here's a screen cap but I think it'll only be confusing, as I'm using a plugin and that should not need to have anything to do with the issue, I think it should have to be able to be solved outside the plugin. The basic thing I need is: when I import all my text, and it all has Paragraph Style A, how can I say: ok, I want every word that has a digit to be Paragraph Style B?
example.png
To explain what you see in the screencap: 

These green tags are grouped within one frame, with anchored frames within, the individual tags that are green. This is being added automatically (through plugin), the one big frame with the green tags within it. The outside frame has NO color = the first Paragraph Style (as it is used to keep the white space between the different green frames) and then every anchored frame has Paragraph style A. they all get that style at once, so I need to find a way to say, ok when I have a frame with digits in it, I want my paragraph style to be a different colour = Paragraph Style B.

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

You can use a GREP Find&Change to search for a digit - in a particular ParaStyle - then change to a differrent ParaStyle:

 

RobertTkaczyk_0-1701096075310.png

 

Change to: is empty.

 

And next time - PLEASE start from example screenshots of BEFORE & AFTER - you'll get an answer much quicker...

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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
Explorer ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

Hi Robert,
Yes you ar right, and that is how I am doing it right now. However, as far as I know (correct me if I'm wrong because I'm no GREP expert!!), I can only do this manually. This means that, whenever the original data / text in my catalogue is being changed, I have to manually adjust this again and again. So I thought I could indeed use GREP but when you want to link a GREP style into a Paragraph Style (so it'll update the layout automatically, every time something changes in the text), that's not possible. As there is only the option to use Character Styles and no Paragraph Styles when applying a GREP Style in there.

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

What kind of a plugin are you using? 

 

That's why my tool beats all other tools combined...

 

With my tool, you can import data and do post-processing at the same time - or in between "fields" / records in the database - during import ...

 

You can import text - and then use it as a template - so you don't have to specify "fields" in your original template - you can have "fields" in the new text that you're importing - and those "fields" can be filled with data from the same record ... 

 

So kind of conditional data import - without setting any conditions ... 

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

You can do it with a CharacterStyle using Underlines. Here the is an en-space on either side of the words, with no character style applied to the em space between.

 

Screen Shot 24.pngScreen Shot 25.png

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

@rob day, but @TRIXIE wants ONLY first part of the text with a different color - those texts aren't in the same block of text - they're are in a separate TFs anchored in another TF.

 

Screenshot_2023-11-27-18-51-21-558-edit_com.android.chrome.jpg

 

To explain what you see in the screencap: 

 

These green tags are grouped within one frame, with anchored frames within, the individual tags that are green.

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

they're are in a separate TFs anchored in another TF.

 

I saw the anchors, but I think it would be easier to remove the anchors and use a single nested Paragraph style on the first line with no anchored text frame—this is 3 clicks. I’ve attached the example:

 

Screen Shot 28.png

Screen Shot 29.png

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 ,
Nov 27, 2023 Nov 27, 2023

Copy link to clipboard

Copied

The 3rd Nested Style rule wants to be 2 en spaces not words:

 

Screen Shot 30.png

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
Explorer ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

Hi Rob,

 

This suggests that I would have to add En- and Em-spaces in my original data?

It might be a good alternative to how the green tags are being made now, but this doesn't seem to solve the issue of being able to appoint tags with digits in them to have a different colour (whether underline of paragraph border)?

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 ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

This suggests that I would have to add En- and Em-spaces in my original data?

 

Right, or some other white space combination—this uses regular spaces:

 

Screen Shot 2.png

 

You might be able to change color with some kind of GREP Style, or you could make a Paragraph/Character Style for each color and apply via a script or search.

 

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 ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

@TRIXIE Can you clarify which part of the text you want to format differently?

 

Because, @rob day in all his screenshots / examples is using the same CharStyle to both parts - but from your initial post - if I understand you correctly - you want only part with digits formatted differently?

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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
Explorer ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

Yes, the thing is: I get several pieces of text at once: the age (3y+) and the text next to it. So it's the age that I want to put in a different color. It would also be a different color for different ages. 

So only the 'tags' that contain digits.

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 ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

So the answer to your problem is either my earlier reply - https://community.adobe.com/t5/indesign-discussions/add-a-paragraph-style-within-a-paragraph-style/m... - or you would have to use GREP Styles?

 

Nested could be - as long as your part with digit(s) is always in the same place... 

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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 ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

quote

So only the 'tags' that contain digits.


By @TRIXIE

 

Wait a minute... Can you clarify what do you mean by "tags that contain digits"? 

 

You mean name of the "tag" - or contents / text after importing "tag"? 

 

Because those are two different things. 

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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
Explorer ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

I apologize, English is not my mother tongue and by 'tags' I just referred to the way they 'look' like tags. So I just meant the green underlined parts, like '3y+' is a tag. But I didn't mean it technically.

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 ,
Dec 06, 2023 Dec 06, 2023

Copy link to clipboard

Copied

No problem. 

 

So those are separate pieces of text / information? 

 

Can you / do you want to join them together? 

 

My approach was - they are separate - @rob day treat it as a single paragraph...

 

Both approaches have positives and negatives - but I think you need to clarify and decide which way is better for you... 

 

▒► ID-Tasker / ID-Tasker Server - work smart not hard ◄▒

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 ,
Nov 28, 2023 Nov 28, 2023

Copy link to clipboard

Copied

Nested Styles can use mixed Character Styles:

 

Screen Shot 5.png

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