Copy link to clipboard
Copied
Hi,
I figured out that GREP Styles has a limit in numbers 😮 ...
This is a strong issue for me, can I apply 2 Paragraph Styles at the same time ?
I'm really noob with Paragraph Styles, so I never really used it other that with the GREP Style fonction.
I saw a zone "From" and "Next" in the "General" tab of my main Paragraph Style.
In "From", I dont see my other Paragraph Style I created for testing purpose, but in "Next" I can see it.
Please, help 😮 !
Yes! If you do something like
(word1|word3)
this mean is will match either "word1" or "word3".
By the way we would have suggested this straight away if you showed us a mock-up. 🙂
- Mark
Just to be precise the pipe does mean OR. But then, in this case, the grep engine keeps moving forward. So it matches (word1 OR word3) then continues and again matches the next (word1 OR word3) and so on until end of text.
Anyway glad you got it working.
- Mark
Copy link to clipboard
Copied
Hi @Nemesis666first, can you make an example file showing what you want to do? I don't think you can apply 2 paragraph styles to the same text in a normal case, but there may be ways around it. Perhaps a script can apply multiple styles' properties to some text, but it won't be a paragraph style per se.
- Mark
Copy link to clipboard
Copied
Hi M1B,
Lets say for example i want to apply a Paragraph Style (P. S.) with à GREP Style (G. S. ; Lets imagine its limited to one).
Now, I want an other G. S., how can i do that ?
With a parent PS ? Children PS ? Modifying the settings of the software ?
Copy link to clipboard
Copied
(i cant create a file, since i dont know how to do what xD )
Copy link to clipboard
Copied
That*
Copy link to clipboard
Copied
Okay I think I see. My apologies if I'm explaining what you already know. Well you can combine multiple GREP Styles within a single Paragraph Style. However, they must be carefully designed and implemented in order so that they achieve what you want. The properties applied via the assigned Character Style are added in order, so if you design it so that they add together nicely it can work. See my example below. It is a single Paragraph Style with 2 GREP styles applied together—the word "test" has two separate Character Styles applied to it.
If your needs are not solved by that approach, please mock-up a couple of examples of what you would need a single Paragraph Style to handle. I mean mock-up, so it doesn't need to be a working Paragraph Style—just fudge it for us.
- Mark
Copy link to clipboard
Copied
I am using GREP Styles for separated words, like for example :
"word1" => apply style X.
"word2" => apply style Y.
"word3" => apply style X.
"word4" => apply style Y.
Can I put "word1" and "word3" into the same entry of G.S. ? I could gain a lot of available G.S. 😛 !
Copy link to clipboard
Copied
Yes! If you do something like
(word1|word3)
this mean is will match either "word1" or "word3".
By the way we would have suggested this straight away if you showed us a mock-up. 🙂
- Mark
Copy link to clipboard
Copied
Pipe "|" is for "or", okay, and for "and", is it something like the ampersand "&" ?
Copy link to clipboard
Copied
What do you want to get? Can you show an example? If you follow the @m1b instructions, the style you will define will apply to word1 AND word3 if both are present in the paragraph.
Copy link to clipboard
Copied
Oh, okay, pipe is not for "or" then, it stands for "and", okay okay.
If I take my previous example :
word1|word3 => apply style X
word2|word4 => apply style Y
If I appy, I should find :
"I find that the word1 is different from the word2, and that's perfect. Even word3 and word4, in the same sencen, are different ! Wonderful !"
I will test that immediately 😉 !
Copy link to clipboard
Copied
Yes, that's exactly that.
Copy link to clipboard
Copied
It seems that's working 😛 !
Thx you 😉 !
Copy link to clipboard
Copied
Just to be precise the pipe does mean OR. But then, in this case, the grep engine keeps moving forward. So it matches (word1 OR word3) then continues and again matches the next (word1 OR word3) and so on until end of text.
Anyway glad you got it working.
- Mark
Copy link to clipboard
Copied
Of course, you are right @m1b
I answered too fast and when I wrote “Yes, that's exactly that”, it was about the end of the word1|word3 => apply style X
word2|word4 => apply style Y part
Copy link to clipboard
Copied
I suspect you're translating "From" and "Next" from another language, right? In English ID interface these are, I'm guessing "Based On" and "Next Style." They're unrelated; Based On is for one style that is based on a parent style. Next Style is totally separate, that is for when you want to select a large number of paragraphs and then apply Style A to the first, then style B to the second, and so on. Neither one is going to be useful in your attempt to apply two Paragraph Styles to a single paragraph. At no time can you have two Paragraph Styles applied to a single paragraph.
If you need multiple variants of styled text in a single paragraph, you can apply GREP Styles that apply Character Styles (which you obviously already know), as well as Line Styles and Nested Styles (which, like GREP Styles, apply Character Styles according to a set of rules). You can also just select some text and apply a Character Style to it. That's the main way to have multiple styles within a single paragraph.
So, there's lots of tools for styling text in InDesign. I think that m1b is correct in asking you to make an example file. These tools can be pretty deep, and there is likely a way to get the styling you want with a fairly small number of clicks, and a fairly small number of styles. I mean, I have never yet personally encountered a numerical limit on the number of GREP styles I can apply, and I'm kind of a GREP Style abuser:) , so it is likely that you're overusing the GREP Style tool a little.
Copy link to clipboard
Copied
I think I might be a GREP Style abuser, too. Haha. 🙂
Copy link to clipboard
Copied
Indeed, you got me 😛 !
Thk you for the explanation of the Based On & Next Style purpose 😉 !
Copy link to clipboard
Copied
You can't apply multiple paragraph styles at the same time: imagine that one of this paragraph style is setup with a justified text and another one with a left aligned text; how would it be possible.
GREP styles are character styles, automatically applied over a paragraph style.