Skip to main content
Participant
Apr 20, 2025 8:16 PM UTC
Question

Anchored side notes for bracketed numbers

What is the script to programmatically extract all numbers enclosed in square brackets (e.g. [12]) from a text frame in InDesign, create anchored text frames on the left side of the main text flow for each, and apply a specific paragraph style (e.g. 'Number Style') to the extracted numbers within those anchored frames?

3 replies

m1b
Community Expert
Community Expert
Apr 27, 2025 8:00 AM UTC

Hi @Dafna367384030n39 did you get anywhere with this? As Dave and Robert mentioned, a more-usual approach to this would be to use a "hanging indent" where the text is indented, say 10mm and the first line only is "indented" by –10mm so it lines up with the column edge again.

 

Here's a quick mockup in Indesign for you to look at. Open the attached demo.indd. But if that still isn't what you need, let us know.

- Mark

 

Here's annoted screenshot, too:

Translate
Dave Creamer of IDEAS
Community Expert
Community Expert
Apr 20, 2025 9:07 PM UTC

Of course, the hanging numbers are simply a left indent with a negative first line indent.

For the extraction, were you thinking of this script:

https://www.id-extras.com/products/grep-anchored-object/

 

Translate
David Creamer: Community Expert (ACI and ACE 1995-2023)
Robert at ID-Tasker
Legend
Apr 20, 2025 8:55 PM UTC

You could do it with left indent - with or without widening your TextFrame to the left. 

 

Translate