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...
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...
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...
Copy link to clipboard
Copied
If we assume that 1st field - as per screenshot:
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.
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.
Copy link to clipboard
Copied
You can do this with GREP Styles.
You would need to list all possibilities and pair with CharStyles.