sillsdev / ptx2pdf

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

Adding 'Adjust' change results in Syntax Error warning. #925

Closed klassenjm closed 8 months ago

klassenjm commented 8 months ago

Using PTXPrint 2.4

I have a simple 1 column layout for the books of JAS, with 3 pictures. When I add one or more entries to changes.txt to adjust the length of paragraphs, like:

at JAS 3:5 '\\p' > '\\p^95 '

PTXPrint is returning a Syntax Error warning, like this.

image

Interestingly, in PTXPrint 2.3.54, this error did not occur -- but oddly the introduction remained in the layout, even though I de-selected book introductions on the Body tab settings. If I removed the changes.txt entries, then the book introductions were removed, as configured. If I put an adjustment change back into changes.txt, then the introduction would appear again.

Can't seem to debug what's happening here. I've sent an archive named: GNTPTXP-A5-1B-Reader-Gentium9_5-11_5PTXprintArchive.zip

markpenny commented 8 months ago

Hi @klassenjm , congrats on picking up 2.4 minutes after we released it :-)

I don't think we've changed anything here since yesterday's release. But this Syntax Error (WARNING) Message hides itself under either of these conditions, so that might explain why you didn't see it before: a) When Quick Run is enabled [which is the default now, but people can turn it off for their final print] b) When Auto-Correct USFM is unchecked

Now, about the warning itself, YES - it is a bug/feature. The syntax checker is overzealous and because it doesn't find \p^95 in its list, it complains. I think @mhosken already has it on his radar to tidy up one of these days...

PS. I see in the archive you sent that you made sure there was a space after the initial '\p' i.e. '\p ' and that is usually important to avoid unexpected side effects.

klassenjm commented 8 months ago

Thanks for the explanations, @markpenny . I'm still puzzled though - why adding the adjust to changes.txt seems to render the option to remove introductions ineffective.

markpenny commented 8 months ago

Aha - yes, now I see what you're referring to. Indeed, as soon as ^95 is included in a changes.txt rule, the Intro and Intro Outline turn up uninvited.

markpenny commented 8 months ago

Fixed in 2.4.1 - about to be released later today.

klassenjm commented 8 months ago

2.4.1 is working for me.