Publishing Assistant

  • Registration
  • Downloads
  • Support
  • Features
  • News
You are here: Home

September 4, 2018

List of Chapters Instead of Chapters Range in the Header

  1. Home
  2. Knowledge Base
  3. Tips and Tricks
  4. List of Chapters Instead of Chapters Range in the Header
  1. Home
  2. Knowledge Base
  3. Changes Solutions
  4. List of Chapters Instead of Chapters Range in the Header
  1. Home
  2. Knowledge Base
  3. Advanced Topics
  4. List of Chapters Instead of Chapters Range in the Header

The Problem:

Normally Publishing Assistant puts a chapter range in the header, for example 28-30. How can I change this to say 28, 29, 30?

Solution:

The first step is to get the exact character codes used in chapter ranges in headers. Highlight the character in a header in InDesign and go Window > Info. Pay close attention to whether there are spaces (e.g. zero width spaces) around the character.

One example I looked at was “Nambas 29​–​31”. Using the Info dialog box in InDesign, I was able to get these character codes:

  • b  (U+0062)
  • a (U+0061)
  • s (U+0073)
  • Figure space (U+2007)
  • 2 (U+0032)
  • 9 (U+0039)
  • Zero width space (U+200B)
  • En-dash (U+2013)
  • Zero width space (U+200B)
  • 3 (U+0033)
  • 1 (U+0031)

So, in this case chapter ranges are marked with u200Bu2013u200B. It’s also important to notice that there is a figure space (U+2007) before the first chapter number.

The second step is to determine the exact character codes desired between numbers in a list. It might be something simple like comma (U+002C) and figure space (U+2007).

In PA open HeaderChanges.txt (Menu > Edit > Edit HeaderChanges.txt).

At the end add one line which converts “1-2” into “1, 2”. Using the character codes figured out above, that would be:

"u20071u200Bu2013u200B2"  > "u20071,u20072" 

We could add a helpful comment at the end, just to clarify what’s happening

"u20071u200Bu2013u200B2"  > "u20071,u20072" # "1-2" > "1, 2"

Repeat this line 149 times and replace the chapter numbers so that the changes file now looks something like:

"u20071u200Bu2013u200B2"  > "u20071,u20072" # "1-2" > "1, 2"
"u20072u200Bu2013u200B3"  > "u20072,u20073" # "2-3" > "2, 3"
...
"u2007148u200Bu2013u200B149"  > "u2007148,u2007149" # "148-149" > "148, 149"
"u2007149u200Bu2013u200B150"  > "u2007149,u2007150" # "149-150" > "149, 150"

Between the first two lines, add a line which converts “1-” into “1, 2-”. Using the characters codes we figured out above, that would be

"u20071u200Bu2013u200B"  > "u20071,u20072u200Bu2013u200B"     # "1-" > "1, 2-"

Put a similar line to this between all the pairs of lines that already exist, adjusting the chapter numbers as appropriate. The changes file now looks like:

"u20071u200Bu2013u200B2"  > "u20071,u20072" # "1-2" > "1, 2"
"u20071u200Bu2013u200B"  > "u20071,u20072u200Bu2013u200B"     # "1-" > "1, 2-"
"u20072u200Bu2013u200B3"  > "u20072,u20073" # "2-3" > "2, 3"
"u20072u200Bu2013u200B"  > "u20072,u20073u200Bu2013u200B"     # "2-" > "2, 3-"
…
"u2007147u200Bu2013u200B148"  > "u2007147,u2007148" # "147-148" > "147, 148"
"u2007147u200Bu2013u200B"  > "u2007147,u2007148u200Bu2013u200B"     # "147-" > "147, 148-"
"u2007148u200Bu2013u200B149"  > "u2007148,u2007149" # "148-149" > "148, 149"
"u2007148u200Bu2013u200B"  > "u2007148,u2007149u200Bu2013u200B"     # "148-" > "148, 149-"
"u2007149u200Bu2013u200B150"  > "u2007149,u2007150" # "149-150" > "149, 150"

 

At the very end of this document you will find the complete file. You can copy and paste it into headerChanges.txt for your job. If your job uses different character codes, you can do a global replace for “u200Bu2013u200B” and “,u2007”.

How does it work?

If you don’t care how it works, skip to the bottom of this document and you will find the file. But, if you happen to be curious about such things, read on.

For this explanation, it’s helpful to know that the changes in HeaderChanges.txt are applied one at a time.

Suppose that a header contains “Numbas 28-31”. The first change to apply is:

"u200728u200Bu2013u200B"  > "u200728,u200729u200Bu2013u200B"     # "28-" > "28, 29-"

And the result is “Numbas 28, 29-31”. The next change doesn’t apply:

"u200729u200Bu2013u200B30"  > "u200729,u200730" # "29-30" > "29, 30"

So the header still contains “Numbas 28, 29-31”. The next change applies:

"u200729u200Bu2013u200B"  > "u200729,u200730u200Bu2013u200B"     # "29-" > "29, 30-"

And now the header contains “Numbas 28, 29, 30-31”. The next change applies:

"u200730u200Bu2013u200B31"  > "u200730,u200731" # "30-31" > "30, 31"

Giving the final result “Numbas 28, 29, 30, 31”.

Download the full HeaderChanges.txt file.

PublishingAssistant 6 UsersManual (8.3M)
PublishingAssistant 6 UsersManual (4.5M)

Was this article helpful?

Yes No

Related Articles

  • Having double and single column books in a single PA job
    • 0
    • 49
  • Backing Up PA job
    • 0
    • 41
  • Use \h Content In Running Header
    • 0
    • 76
  • Put Chapter Numbers in the Margin?
    • 0
    • 64
  • Chapter Number in Running Head as Hebrew Characters
    • 0
    • 77
  • Change the Running Headers in a Job after the Typesetting Is Complete
    • 0
    • 57

Quick Support Links

  • Getting Started
  • User Documentation
  • Scripture Markup (USFM)

News and Updates

  • What’s New in Publishing Assistant 6.1 August 25, 2020
  • What’s New in InDesign 2019–2020 December 10, 2019
  • Improved Custom Layout – PA 6.1 December 10, 2019
  • USFM 3 Support – PA 6.1 December 10, 2019
  • PA 6.0 and 5.1 Released July 25, 2018

Privacy/Terms

  • Paratext Terms of Use
  • Publishing Assistant Distribution Policy
  • Privacy Policy

Development Partners

  • United Bible Societies
  • SIL International
  • Every Tribe Every Nation

Scripture Ecosystem

  • Paratext
  • Paratext Registry
  • Scripture Markup (USFM/USX)
  • Publishing Assistant
  • The Digital Bible Library

Copyright © 2019, United Bible Societies & SIL International, All Rights Reserved.