• 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

925

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

Copy link to clipboard

Copied

Yes, I know - but you need to "hardcode" their order and "size"... 

 

So if part with a digit will be later in the text... 

 

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

If we assume that 1st field - as per screenshot:

RobertTkaczyk_0-1701189063940.jpeg

is always there AND alone AND there is always a digit - then the whole topic is rather pointless...

 

If we assume, that it can be a single text with two parts "3y+" & "stainless steel" - then your solution @rob day, with Nested Styles is the right one.

 

But if we assume, that "3y+" can be anywhere - alone or not - then Text or GREP Find/Change - with a change to a new Char or Para Style - or as a GREP Style in a ParaStyle definition.

 

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

Yes, the simple usage of both GREP and Nested Styles does get me to be able to give the first part, with the age number, a different colour. It is actually easier than before. I gave the original data extra em- and en-spaces through the plugin (EasyCatalog) and then gave the first word a different underline colour. Simple.
However, this only adjusts 'the first word', and not a word with specific text or digits. So '3y+' will be the same colour as, say '2-7y'. So I'm looking for a way to give specific colours to specific words. And yes, I could do this manually through 'Find', but for a big catalogue where the data sometimes changes without me knowing, it's not very handy.

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

Copy link to clipboard

Copied

LATEST

You can do this with GREP Styles. 

 

You would need to list all possibilities and pair with CharStyles. 

 

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