sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

New page for Chapter #1002

Open mnjames opened 5 days ago

mnjames commented 5 days ago

When I choose this sequence Image somehow... magically... a new page shows up before chapter 1. I say magically because the temporary .SFM file which is produced doesn't include \pb anywhere.

When I choose this sequence, I get \pb's where expected and everything works. Image

But, since this sequence leads to the 2nd tick box being grayed out, I assumed it was equivalent to the first sequence. Image In reality it's not, it's equivalent to the 2nd sequence.

Personally, I'd like the two buttons to be completely independent. One which says Start 1st Chapter on a New Page and which adds \pb in the .SFM file before \c 1, and a 2nd button which says Start All Other Chapters on a New Page and which adds \pb only before \c 2 and later.

If I'm printing a book without intros but with book titles, I'd like to be able to add chapter breaks only for chapters 2 and later.

markpenny commented 3 days ago

Understood. We'll get to it soon.

mnjames commented 3 days ago

One side note: I can use changes.txt to add the page breaks myself, but only by using \pagebreak. Any regex involving \pb doesn't work. Is there a reason for that? '\\c ' > '\\pagebreak\\c ' works '\\c ' > '\\pb\\c ' doesn't

markpenny commented 17 hours ago

That last comment seems strange to me. I have tested these and they behave identically on my system. (So I wonder what else might be different in your USFM, or are there other rules doing something strange?)

"\\c " > "\\pb\\c "
"\\c " > "\\pagebreak\\c "

Although, for neatness, I prefer: "\\c " > "\\pb\n\\c "