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

Running Headers with numbered paragraphs. UXP script for testing

Participant ,
Oct 31, 2023 Oct 31, 2023

InDesign 2024 Enhanced Running Headers

There are many colleagues who work with scientific literature, textbooks, etc. And runs into the problem of numbered headers. The problem is that such headings appear in the page's running headers... without numbers.

 

I'd like to experiment with writing a UXP script that puts paragraph numbers in running headings. There is a first UXP working version of the script that is built on Windows 10, and it would be nice if someone tried to run it on macOS.

The script needs to be placed in the UXPScript folder, it is immediately ready to work. A test document is also attached.

The script does not currently declare any specific rules. The names of paragraph styles and text variables can be anything you like.

The script  works with text variables based on Paragraph Styles. There was no need to use Character Styles yet.

 

InDesign 2024 (19)InDesign 2024 (19)

 

GitHub:  https://github.com/vnh1968/ERH 

TOPICS
Experiment , UXP Scripting
209
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 ,
Oct 31, 2023 Oct 31, 2023

Hi @vnh68, here's the resulting document after running your script on your demo document. (ID2024, MacOS 14.1)

- Mark

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
Participant ,
Nov 01, 2023 Nov 01, 2023
LATEST

Hi Mark,

Thanks for the help, at least now I know the script works on macOS too.

To see exactly what is being done, you need to reapply the parent pages to all pages. 

The action of the script will be canceled, it will be visible as it was intended.

If you run the script, the result will be as you have already seen.
It's all in the details that still need to be found.

 

I noticed that the header is not being generated on the first page. I will look for a reason. But on the first pages, many titles of different levels usually accumulate, so on such pages, the running header is often removed.  

New test file. The script has not yet been run in it. As you can see, the top of the page is just a standard text variable.

 

I added a new test file. The script has not yet been run in it. That's more logical.

As you can see, the top of the page is just an instance of a standard text variable.

 

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