sillsdev / ptx2pdf

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

Pictures in Introductory paragraphs not detected #952

Closed sewhite closed 2 weeks ago

sewhite commented 2 months ago

In my test project, if I insert a picture in the introductory paragraph, PTXPrint does not detect it. If I put that same picture in the verse text, it does detect it as expected. Version 2.4.21.

Archive attached. IIT-DefaultPTXprintArchive.zip

davidg-sil commented 1 month ago

Interesting... having run your archive (first deleting the included .piclist files) I can mostly confirm what you're saying. The figure has been detected enough to remove it from the input stream, but it has not been added to any piclist.

My best guess, half-understanding the python code is that the read_sfm() function in piclists.py is ignoring the chunk from the start of the book until the first chapter number. For such bits of usfm, the code ought to call _readpics with c=0 and isperiph=true, I think. Maybe Mark or Martin can confirm and code, it.