sillsdev / ptx2pdf

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

When using a RANGE starting at v1, the section heading is not included #895

Open davidc86 opened 11 months ago

davidc86 commented 11 months ago

When we print a range of verses, and the first verse is 1, the result does not include the section heading or the paragraphing for that verse:

image

This is how it looks if I specify starting at verse "0":

image

I realize that section heading, section references, and the paragraph SFM is BEFORE \v1 but that is just a vestige of the ancient USFM design. We all know that all of this stuff goes with the FOLLOWING verse, not the previous verse (though Paratext itself still messes this up). Specifying "0" is unintuitive and will be problematic if that throws in the Intro material when the user actually wants just v1 onward.

NOTE: The range behavior works CORRECTLY with mid-chapter ranges, like LUK 1:26-38, where PTXprint picks up the section heading information:

image

So it looks like the logic to grab this information is in there somewhere, it just doesn't seem to kick in if the verse range starts with 1.

davidg-sil commented 11 months ago

This is also at #866

davidg-sil commented 8 months ago

@davidc86 There was a fix for https://github.com/sillsdev/ptx2pdf/issues/894 which might have fixed this issue as well. Could you please check-n-confirm, and close the issue if all is well now. (Note that the auto-inserted \zsetref code might cause issues when exporting USFM to SAB, so keep your eyes open for surprises there.)

davidg-sil commented 8 months ago

This is almost a duplicate of #812 (where the code is still broken). As you noted, it seems that there is some special handling of v1 compared to other verses.