Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
11

Script for chapter margin note number collating

Engaged ,
Nov 17, 2023 Nov 17, 2023

I have a lengthy coffee table-style book where all  footnotes are given as sidenotes (margin notes). These were manually arranged and do not have any automatic collating as note references are added or deleted. Each note number and reference number in the text was added manually. Such sidenote numbering is an ideal candidate for scripting to automatically recollate as notes are added or deleted. Numbering must restart from the beginning for each chapter.

 

Does a script for this exist?

TOPICS
Scripting
3.7K
Translate
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
Engaged ,
Dec 02, 2023 Dec 02, 2023

I must ask how to undo the script; ctrl+Z isn't working and I don't see an Undo. Or is it that once you do further work, any immediately available Undo option disappears? 

Translate
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 02, 2023 Dec 02, 2023

The script cannot be undone. You should save the document before running the script. Then to undo the script's action, close the document without saving it.

 

It's possible to add undo functionality to a script, but the posted script doesn't have it.

Translate
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
Engaged ,
Dec 03, 2023 Dec 03, 2023

Is there a means to restart numbering from 1 for each chapter?

Translate
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 03, 2023 Dec 03, 2023

Yes. The numbering is handled by InDesign's paragraph numbering. To restart numbering at a particular paragraph, right-click in it, then select Restart Numbering from the menu. (Or click in the paragraph and do Type > Bulleted & Numbered Lists > Restart Numbering.)

 

That's the manual approach. It can be automated.

Translate
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
Engaged ,
Dec 03, 2023 Dec 03, 2023

I'm using the same doc you worked with but so far not seeing this option, both when right clicking within the paragraph (with the cursor in the paragraph and right click, or by selecting the paragraph first before right clicking — in either case, no Restart Numbering appears in the menu) and when going to Type > Bulleted & Numbered Lists > Restart Numbering. The latter is faded. 

Translate
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 04, 2023 Dec 04, 2023
LATEST

The cursor should be in the note, see the screenshot, where it's right before Icabo.

But anyway, concentrate on Robert's solution.

 

PeterKahrel_0-1701682003062.png

 

Translate
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