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

Running Headers to pull from previous page

New Here ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

Firstly, I am a beginner and have never done any scripting! Is there a way that I can custom script a text variable for a paragraph/character style to pull from previous page? Or has this already been done? We are currently only given first on page and last on page and I need more options.

Example: I am working on a book with chapters and verses, and would like each page header to show the following:

first chapter number:first verse number-last chapter number:last verse number.

Currently if the page starts with a verse it will pull the first verse available but then pull the chapter number from further down the page and will be incorrect. Frequently the chapters cross a page and the page will start with a verse. Therefore if the page starts with a verse the variable needs to pull the previous chapter number. 

 

Added to that - is it possible to have it do an if/then... if the chapter header is at the top of the page it uses that, but if a verse is at the top of the page it pulls the chapter number from previous page. 

 

Please keep in mind that this is all very new to me! Thank you.

TOPICS
Scripting , UXP Scripting

Views

381

Translate

Translate

Report

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 ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

Put a textvariable in a text frame on top of the master/parent page in a layer on top of all other layers. InDesign will take the last entry, even if it is on a previous page, until another comes. Use Paragraph Styles for every text.

Votes

Translate

Translate

Report

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 ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

No need to script that. That is basic functionality of InDesign.

Votes

Translate

Translate

Report

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
New Here ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

LATEST

I am not sure what I am doing wrong. I am including a page from my book. As you can see, on the first page the header should say Matthew 2:13-3:9, but it says 3:13-3:9. On the second page there is the same problem. 

 

My master page looks like this: Matthew<1st Ch Number>:<1st Verse Number>-<Last Ch Number>:<Last verse number>

 

Here is a screen shot of my variable set-up.

Lindsay22674412sou9_0-1681512871501.png

 

Can you see what I am doing wrong? Thank you!

Votes

Translate

Translate

Report

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