+1 vote
We have a use case where the team wants to distribute individual chapters to different team members for review. There is a code snippet to force books to start on an odd page. \setbookhook{start}{MAT}{\zNeedOddPage}

Is there a similar code that can be used to force chapters to start on an odd page?
PTXprint by (148 points)

1 Answer

0 votes

There might be a better/different way to do this in the .tex file using a hook, but there's also a simple method using changes.txt to inject a \pb (pagebreak) and \zNeedOddPage before every chapter number:

"\\c" > "\\pb\n\\zNeedOddPage\n\\c"

This seems to work well enough.

by (3.2k points)
Thanks, Mark. This does work for a single language. What I failed to mention is that the above project is a diglot with a source (Secondary) and a target (Primary) language. Applying the code, each chapter starts on an even page in the PDF. It looks like an unnecessary blank page is added before the first chapter. I've tried adding the script to just the Primary project and also to both the Primary and the Secondary project. No change.

I should also note that \there is a \cl before \c 1.

On a side note, is there a way to exclude \c 1 so that the first chapter starts on the same page as the book title?
I'm trying that string out in my changes.txt  and it is starting every chapter (except chapter 1) on a new page, but it is not starting every chapter on an odd page.

PtxPrint 3.01.

Page-breaks in diglots are much more of a polite request to start the next column on a new page rather than the 'stop reading HERE and print everything you have so far' that they are in normal text. Normally, of course, you want that, otherwise a \pb in one column will stop the next from getting aligned properly.
 This means that \zneedoddpage probably won't work as expected for a diglot.

Thanks. This makes sense and matches our experience.
We came up with a work around for the draft copies for this case. Check "Start all other chapters on a new page" on the Body tab. If appearance is not critical, use "Document Based" algorithm on the Diglot tab. All chapters other than \c 1 will start on a new page. We manually add \pb where needed in the usfm file to push chapters that start on an even page to an odd page. This also works with the "Scored" algorithm. More \pb's are needed since not every chapter starts on a new page, but the page appearance is nicer.

Related questions

Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Make every effort to keep the unity of the Spirit through the bond of peace.
Ephesians 4:3
3,032 questions
5,987 answers
5,653 comments
2,019 users