Mobile app version of vmapp.org
Login or Join
Heady304

: Automatically adding a sequence of characters Is there any way of adding specific sequences of characters at the start and/or end of every instance of a determined paragraph style? I could do

@Heady304

Posted in: #AdobeIndesign #IndesignScripting

Is there any way of adding specific sequences of characters at the start and/or end of every instance of a determined paragraph style?

I could do this using Grep find & replace, but then the text would be 'fixed'.

What I'm searching for is a way to emulate adding content using ::before and ::after pseudo-elements in CSS...

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady304

2 Comments

Sorted by latest first Latest Oldest Best

 

@Murphy569

I don't have any help for similar-to ::after functionality, but the following should work for ::before.

Though it likely wasn't intended for this purpose, you can just customize a numbered list to accomplish this. Just choose List Type: Numbers, and in the Numbering Style section, change Number: to desired string sequence of characters.



At any time, you can go back in to the Paragraph Style, and update that Number field to change it throughout.

10% popularity Vote Up Vote Down


 

@Hamm6457569

You can do this with text variables: Type > Text Variables.

In this case, you'd select Custom Text as the variable type when you define them, and insert the appropriate text. Any time you change the text in the variable definition, it will change in the layout.

One caveat: a variable looks like text, but it is actually a single character. That means you can't nest character styles inside a variable, and there is no such thing as a line break. If you need either of these, then you'll have to use a script.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme