Skip to main content
Participant
April 14, 2023
Question

Running Headers to pull from previous page

  • April 14, 2023
  • 1 reply
  • 662 views

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.

1 reply

Willi Adelberger
Community Expert
Community Expert
April 14, 2023

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.

Willi Adelberger
Community Expert
Community Expert
April 14, 2023

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

Participant
April 14, 2023

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.

 

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