sillsdev / ptx2pdf

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

PTXprint flags error on a rerun #889

Closed davidc86 closed 11 months ago

davidc86 commented 11 months ago

Here is the error message

image

It ran fine the first time.

Now it flags an error at LUK 5:1

Looking at PT text, I see an error in the original file like this:

\p \v Leran va'a Yesus ndir vaar waren Genesaret, tomat vangled hir rabyat i fo hir denar Duad ninagruhi len....

Where the verse has no number and the word "Leran" is displayed as a verse number.

The first time I ran this process, I got this in the PDF:

image

So, PTXprint did a very good job of recovering from a bad typo. But the NEXT time I run the process, PTXprint fails, because it sees an unknown character <?> at Luk. 5:1... which tells me that PTXprint is "cheating" and building off of the output of a previous process rather than off the original source text in Paratext.

I wonder if this is what is causing the hanging problem that I was seeing in #888, I need to look into that more.

I would MUCH prefer if PTXprint by default cleaned out the previous processes and started fresh each time, especially since I changed contents for the output in this case! (The initial test was for all of Luke, and that worked. Then I asked for a range of verses from Luke 2 (none from chapter 5) and I got this error concerning Luke 5:1.)

Hmmm. It may be more nuanced than that, because I cleared out the temp files from ...\local\ptxprint and it still flags the error.

The only difference now that I can see is that when I ran it the first time I ran a whole book. The second time I ran it, I used the multiple book option (for MAT and LUK) and it was with verse ranges specified. And maybe it is this option that is causing the error?

BTW, we are wanting to format a "Christmas Book", so the verse ranges are: LUK 1:26-38 MAT 1:18-24 LUK 2:1-20 MAT 2:1-12 Where we alternate back and forth between Luke and Matthew. Is that even possible?

Thanks for any help with this.

markpenny commented 11 months ago

Yes @davidc86 we're aware of this issue (you're the 2nd person this week to raise it). And we're working on it.

Different code is used when you select a range, compared to when the the whole text is processed.

davidc86 commented 11 months ago

Things seem to be working again, but the project changed (fixed some of the SFM errors), so it might be that. We'll see if rerunning, tweaking, and rerunning, will still cause PTXprint to hang. for now, we'll close this.