0 votes
I'm trying to print a trial run of a single book (Gospel of John) with the Glossary entries contained in that book. I can export fine when it's just JHN, but adding GLO gives me this error I can't seem to understand: In case this isn't enough info, I'll copy the whole XeTeX log in a reply.

PTXprint [2.4.21] - Error!
Failed to create: KDF_JohnTrialPrint_JHN-GLO_ptxp.pdf
! File ended while scanning use of \@nxxt.
<inserted text>
      \par
<to be read again>
       \relax
\ptxfile ...the \PtxFilePath #1"\relax }\fi \n@xt
                  \gdef \atn@xtptxfile {}\fi...
l.520 \ptxfile{A9GLOKDF-JohnTrialPrint.SFM}
------------------------------------------------------------------------------------------
Try turning off various settings on the Advanced tab.

PTXprint Version 2.4.21
PTXprint ago by (120 points)

3 Answers

+1 vote
Best answer
Hmm. "File ended while scanning use of ...." is basically the result of a parsing error, there is an error in the (final) USFM or how it's being read, where there is something expecting an end-marker and it doesn't get it.

That doesn't help you very much, so I did some more digging:  \@nxxt is a used as part of a macro that grabs the parameter for an identifier like  \h or \id, where *any* other marker ends the parameter. (\h and \id cannot be followed by general USFM, only by unmarked text).
My guess is that your final SFM is ending with \h or \id, OR there is a marker within \h or \id which is expecting a parameter.

e.g. \h something \c <END OF FILE>

-----------
Over-detailed explanation:
In processing \h, it will read each letter of "something ", adding them to the stored parameter in turn until it reads something  which is not a simple letter.  That non-letter is assigned to \@nxxt  (the macro defined by \c is certainly not a simple letter). It would then do whatever's necessary with the parameter "something ", and then execute the remembered macro \@nxxt.
\c (and hence \@nxxt) expects to read a space-terminated chapter number (new lines count) if  the file ends before that chapter number and end-marking-space is found, then  you'll trigger the error.
------------

Similarly, if the first thing after the \h / \id is not a paragraph style but instead a \k, and there is no \k* to mark the end of the keyword,  you'll end up with the same error. There are a few even stranger situations, but I hope this is enough of pointer.

You need to have a careful read of the final SFM (see the view/edit tab) for the glossary, compare it with the original glossary, and discover where the problem lies.
ago by (831 points)
ago selected by
Thanks DG for the very detailed response! I think I'm doing something very wrong, because when I look at the final SFM for the GLO book, here's what I have:

\id GLO

That's it. When I look at my GLO .sfm file, it's as expected:

\id GLO
\p \k Keleptote kana Werong\k* ke usongana le kewangkongkoyae la Yerusalem, mae loramantene ke le karauso Nutu lonayae aere nae kitu pe
\p \k killa\k* oro kalapamanangana le pananne Nutu papangana
\p \k kulangalala\k* kemanna le kanauso kulele mae weyae kumangkae
\p \k kumangpumana\k* kemanna le weyae kanauso kumangkae wae kana wanga sao
\p \k Lengkita\k* kemanna le Nutu kulele ato laepe ma nei mae rumule inta la wengkita pesaongana  
\p \k nananga'ela\k* kemanna le nanne pangalomatanayae nae kelaetete utaona i weyae
\p \k Nutu Waleyae Usongana\k* maesing kana wale le mis la Yerusalem
\p \k palilisita\k* kemanna le rare Nutu kaona nae mongkeyae la kemanna
\p \k tanga\k* lonamatene mae rumanna, annowaena longae, nanne nena weyae
\p \k Tawa\k* Nutu maeliyae le taelle saosao
\p \k wangapa\k* kengate kao nena kitungturu la kemanna
\p \k wingana\k* yaena tao nena kelopae I
\p \k Yesus\k* Karausora

Is there some reason PTXprint would just cut it off after the initial \id?

...Ok so as I was writing that last question, it hit me. I hadn't actually linked the renderings to the glossary entries in this book. <facepalm> Just went through and did that, and it's working fine now. My fault! Crisis averted. Thanks again for your thorough attention and help!
0 votes
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xetex 2023.8.18)  15 JAN 2025 15:35
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**KDF_JohnTrialPrint_JHN-GLO_ptxp.tex
(c:/My Paratext 9 Projects/KDF/local/ptxprint/JohnTrialPrint/KDF_JohnTrialPrint_JHN-GLO_ptxp.tex (c:/Program Files/PTXprint/ptx2pdf/paratext2.tex This is xetex "0" "999995"
\@ndhooks=\toks13
\st@rtptxhooks=\toks14
\@ndptxhooks=\toks15
\@nithooks=\toks16
\@idhooks=\toks17
\@veryparhooks=\toks18
\@veryparstarthooks=\toks19
\p@rstylehooks=\toks20
 (c:/Program Files/PTXprint/ptx2pdf/ptx-constants.tex) (c:/Program Files/PTXprint/ptx2pdf/ptx-utility.tex
\s@vedeofdepth=\count28
) (c:/Program Files/PTXprint/ptx2pdf/ptx-tracing.tex
\TRACEcount=\count29
) (c:/Program Files/PTXprint/ptx2pdf/ptx-diglot.tex
\diglotDbgJoinboxes=\count30
 Special penalty dgl@tPenColSwap is -10002 Special penalty dgl@tPenInternalRpt is -10003 Special penalty dgl@tPenLtrialEnd is -10004 Special penalty dgl@tPenRtrialEnd is -10005
\diglotLho@ks=\toks21
\diglotRho@ks=\toks22
\FontSizeUnitL=\dimen20
\FontSizeUnitR=\dimen21
\le@dingunitL=\dimen22
\le@dingunitR=\dimen23
\onel@neunitL=\dimen24
\onel@neunitR=\dimen25
\verticalsp@ceunitL=\dimen26
\verticalsp@ceunitR=\dimen27
\IndentUnitL=\dimen28
\IndentUnitR=\dimen29
\p@rlinesgone-L=\count31
\p@rlinesgone-R=\count32
\curr@djparL=\count33
\curr@djparR=\count34
\p@rnumL=\count35
\p@rnumR=\count36
\n@xtpartialNrml=\box20
\n@xtpartialRev=\box21
\galleyexc@ss=\box22
\partialL=\box23
\excessL=\box24
\excessR=\box25
\partialR=\box26
\trialbox=\box27
\savedpenalty=\count37
\tmpcount=\count38
\curactivecols=\count39
\Lboxpenalty=\count40
\Rboxpenalty=\count41
\partialLpenalty=\count42
\partialRpenalty=\count43
\endtri@lpen@lty=\count44
\chunkpenalty=\count45
\lastchunkpenalty=\count46
\columnLwidth=\dimen30
\columnRwidth=\dimen31
\availhtL=\dimen32
\availhtR=\dimen33
\chunkDelta=\dimen34
\p@geChunkDelta=\dimen35
\baselineDelta=\dimen36
\baselineDeltaL=\dimen37
\baselineDeltaR=\dimen38
\thisjointDelta=\dimen39
\cumulativeDeltaL=\count47
\cumulativeDeltaR=\count48
\cumulativeDelta=\count49
\adjustp@ge=\dimen40
\Lht=\dimen41
\Rht=\dimen42
\TempDim=\dimen43
\Lbox=\box28
\Rbox=\box29
\MaxPages=\count50
\topchunk=\box30
\botchunk=\box31
\notechunk=\box32
\triall@@pcount=\count51
) (c:/Program Files/PTXprint/ptx2pdf/ptx-para-style.tex
\c@rrentcols=\count52
\headingtopspace=\dimen44
\headingmidspace=\dimen45
\he@dingbox=\box33
\upwardsHackDiff=\dimen46
\lastdepth=\dimen47
\dropped@ther@lines=\count53
\p@rlocs=\write0
\readp@rlocs=\read1
\prev@y=\count54
\this@y=\count55
\thing@y=\count56
\tmp@lines=\count57
\thispar@lines=\count58
\p@rlinesgoneMonoglot=\count59
\pr@vdelay=\count60
\th@sdelay=\count61
\j@nkbox=\box34
\ch@pterwd=\dimen48
\ch@pterbox=\box35
\ch@pternote=\box36
\str@tbox=\box37
\tagCount=\count62
) (c:/Program Files/PTXprint/ptx2pdf/ptx-char-style.tex
\f@ntl@g=\write1
\end@box@run=\toks23
\start@box@run=\toks24
\ulb@x=\box38
\n@tenesting=\count63
\p@ranesting=\count64
) (c:/Program Files/PTXprint/ptx2pdf/ptx-milestone-style.tex
\tmpt@ks=\toks25
\it@mcount=\count65
\afterwordpages=\count66
\num@rgs=\count67
\ISBNfontdim=\dimen49
) (c:/Program Files/PTXprint/ptx2pdf/ptx-note-style.tex
\n@tecl@sses=\toks26
\n@teid=\count68
\AboveNoteSpace=\dimen50
\InterNoteSpace=\dimen51
\NoteCallerWidth=\dimen52
\NoteCallerSpace=\dimen53
\he@dingnotes=\box39
\t@blenotes=\box40
\n@tetmp=\box41
\d@note=\toks27
\endn@teclasses=\toks28
\plac@ndnotes=\toks29
\f@@tstrut=\box42
\AboveEndNoteSpace=\dimen54
\n@tewidth=\dimen55
\lastnoteinterlinepenalty=\count69
\lastnoteparpenalty=\count70
\lastnotewidowpenalty=\count71
\lastnoteclubpenalty=\count72
\internoteskip=\skip18
\noteRag=\skip19
\xr@fbox=\box43
\XrefB@x=\box44
\XrefSkip=\dimen56
) (c:/Program Files/PTXprint/ptx2pdf/ptx-stylesheet.tex
\pstr@t=\box45
\dropnumbersize=\dimen57
\dropnumberraise=\dimen58
\v@rsehooks=\toks30
\prev@rsehooks=\toks31
\gr@btoks=\toks32
\styl@sheet=\read2
\origb@selineskip=\dimen59
\t@stread=\read3
\AdjListPath=\toks33
\PicListPath=\toks34
\TrigListPath=\toks35
\PtxFilePath=\toks36
\do@ctive=\toks37
DefineActiveChar: 91
DefineActiveChar: 40
\c@th@@ks=\toks38
\afterh@@ks=\toks39
\FontSizeUnit=\dimen60
\IndentUnit=\dimen61
\PaperWidth=\dimen62
\PaperHeight=\dimen63
\MarginUnit=\dimen64
\BindingGutter=\dimen65
\TitleColumns=\count73
\IntroColumns=\count74
\BodyColumns=\count75
\le@dingunit=\dimen66
\onel@neunit=\dimen67
\verticalsp@ceunit=\dimen68
\topm@rgin=\dimen69
\bottomm@rgin=\dimen70
\bmg@p=\dimen71
\textwidth=\dimen72
\textheight=\dimen73
\colwidth=\dimen74
\ExtraRMargin=\dimen75
\gutter=\dimen76
\XrefNotesWidth=\dimen77
\XrefNotesMargin=\dimen78
) (c:/Program Files/PTXprint/ptx2pdf/ptx-periph.tex
\periphdepth=\count76
\an@nymousperiphs=\count77
) (c:/Program Files/PTXprint/ptx2pdf/ptx-attribute.tex) (c:/Program Files/PTXprint/ptx2pdf/ptx-references.tex
\c@untA=\count78
\c@untB=\count79
\oddhead=\toks40
\evenhead=\toks41
\titleoddhead=\toks42
\titleevenhead=\toks43
\noVoddhead=\toks44
\noVevenhead=\toks45
\oddfoot=\toks46
\evenfoot=\toks47
\titleevenfoot=\toks48
\titleoddfoot=\toks49
\noVoddfoot=\toks50
\noVevenfoot=\toks51
) (c:/Program Files/PTXprint/ptx2pdf/ptx-cropmarks.tex
\topcr@p=\box46
\bottomcr@p=\box47
\pdfcropwidth=\dimen79
\pdfcropheight=\dimen80
\tabheight=\dimen81
\tabwidth=\dimen82
\TabsStart=\dimen83
\TabsEnd=\dimen84
\NumTabs=\count80
\gp@boxN=\box48
\gp@boxL=\box49
\gp@boxR=\box50
\b@rder=\box51
\instopcr@p=\box52
\insbottomcr@p=\box53
\sp@newidth=\dimen85
\bl@eds=\dimen86
) (c:/Program Files/PTXprint/ptx2pdf/ptx-toc.tex
\t@cfile=\write2
\tocc@l=\count81
\t@ccount=\count82
) (c:/Program Files/PTXprint/ptx2pdf/ptx-tables.tex
\t@bleinserts=\box54
\s@vedm@rks=\toks52
\s@vedmarkcount=\count83
\cellb@x=\box55
\t@talwidth=\dimen87
\linec@unt=\count84
\lct@mp=\count85
\sp@re=\dimen88
\exc@ss=\dimen89
\thr@shold=\dimen90
\nth@line=\count86
\tabler@ws=\count87
\maxtablec@l=\count88
\tablec@l=\count89
\@col=\count90
\@row=\count91
\allocatedtablec@ls=\count92
) (c:/Program Files/PTXprint/ptx2pdf/ptx-triggers.tex
\trigg@rchecks=\toks53
\p@rnum=\count93
) (c:/Program Files/PTXprint/ptx2pdf/ptx-adj-list.tex
\@djparindex=\count94
\@djlist=\read4
\curr@djpar=\count95
) (c:/Program Files/PTXprint/ptx2pdf/ptx-pic-list.tex
\p@clistsuff=\count96
\p@clistentries=\count97
\p@clistused=\count98
\p@cusecheck=\toks54
\p@clist=\read5
) (c:/Program Files/PTXprint/ptx2pdf/ptx-cutouts.tex
\@numcuts=\count99
\@parshapelines=\count100
\@index=\count101
\@line=\count102
\@after=\count103
\@until=\count104
\@width=\dimen91
\@indent=\dimen92
\@hsize=\dimen93
) (c:/Program Files/PTXprint/ptx2pdf/ptx-callers.tex
\c@llernum=\count105
\numc@llers=\count106
\n@tepages=\write3
\n@tepagetest=\read6
\AutoCallerStartChar=\count107
\AutoCallerNumChars=\count108
) (c:/Program Files/PTXprint/ptx2pdf/ptx-figure.tex
\bottomins=\insert252
\verybottomins=\insert251
\topleftins=\insert250
\toprightins=\insert249
\bottomleftins=\insert248
\bottomrightins=\insert247
\tmpcountB=\count109
\c@ptionbox=\box56
\FigCreditPadding=\dimen94
\FigCreditOverEdgeV=\dimen95
\FigCreditOverEdgeH=\dimen96
\PicPath=\toks55
\newpicb@x=\box57
\picb@x=\box58
\picb@xR=\box59
\wholepagepic=\box60
\p@ramnumber=\count110
\notim@gecount=\count111
\p@cinswid=\dimen97
\p@cwidth=\dimen98
\p@cheight=\dimen99
\p@chshift=\dimen100
\otherinsht=\dimen101
\picl@ctest=\read7
\picp@ges=\write4
\onship@ut=\toks56
) (c:/Program Files/PTXprint/ptx2pdf/ptxplus-character-kerning.tex
\quotekernamount=\dimen102
DefineActiveChar: 8216
DefineActiveChar: 8217
DefineActiveChar: 8220
DefineActiveChar: 8221
) (c:/Program Files/PTXprint/ptx2pdf/ptx-unicode.tex
\KclassVir=\XeTeXcharclass4
\KclassCM=\XeTeXcharclass5
\KclassNum=\XeTeXcharclass6
) (c:/Program Files/PTXprint/ptx2pdf/ptx-extended.tex
\extb@x=\box61
\extchunkb@x=\box62
\sid@barnotes=\box63
\old@bx=\toks57
\feintb@xnum=\count112
\sb@rwidth=\dimen103
\sb@rchunkh@ight=\dimen104
\sb@rus@dheightl=\dimen105
\sb@rus@dheightr=\dimen106
) (c:/Program Files/PTXprint/ptx2pdf/ptx-borders.tex
\b@rderbox=\box64
) (c:/Program Files/PTXprint/ptx2pdf/ptx-labels.tex) (c:/Program Files/PTXprint/ptx2pdf/ptx-output.tex
\RHruleposition=\dimen107
\t@xttrialheight=\dimen108
\partial=\box65
\ornXFids=\count113
\ornXobjects=\box66
\galley=\box67
\galleypenalty=\count114
\trialheight=\dimen109
\lastd@pth=\dimen110
\s@vedpage=\box68
\availht=\dimen111
\shortavail=\dimen112
\colhtA=\dimen113
\colhtB=\dimen114
\colA=\box69
\colB=\box70
\loopcount=\count115
\availA=\dimen115
\availB=\dimen116
\b@lbestavail=\dimen117
\b@lbestdiff=\dimen118
\t@vailht=\dimen119
\sh@vedim=\dimen120
\sh@venotes=\toks58
\coln@tebox=\box71
\n@tesbox=\box72
\n@tesoverrun=\box73
\bestavailht=\dimen121
\und@rfill=\dimen122
\columnshift=\dimen123
\ColumnGutterRuleSkip=\dimen124
\RuleThickness=\dimen125
\StudyColumnGutterRuleSkip=\dimen126
\t@mpfile=\read8
) (c:/Program Files/PTXprint/ptx2pdf/ptx-plugins.tex)
\pdfp@ges=\count116
\whichp@ge=\count117
\im@gecount=\count118
\totalp@ges=\count119
\badspacepenalty=\count120
) (c:/Program Files/PTXprint/ptx2pdf/ptx-ptxprint.tex) Reading Paratext stylesheet "usfm_sb.sty" ()... [\id ] [\usfm ] [\ide ] [\h ] [\h1 ] [\h2 ] [\h3 ] [\toc1 ] [\toc2 ] [\toc3 ] [\toca1 ] [\toca2 ] [\toca3 ] [\rem ] [\sts ] [\restore ] [\imt ] [\imt1 ] [\imt2 ] [\imt3 ] [\imt4 ] [\imte ] [\imte1 ] [\imte2 ] [\is ] [\is1 ] [\is2 ] [\iot ] [\io ] [\io1 ] [\io2 ] [\io3 ] [\io4 ] [\ior ] [\ip ] [\im ] [\ipi ] [\imi ] [\ili ] [\ili1 ] [\ili2 ] [\ipq ] [\imq ] [\ipr ] [\ib ] [\iq ] [\iq1 ] [\iq2 ] [\iq3 ] [\iex ] [\iqt ] [\ie ] [\c ] [\ca ] [\cp ] [\cl ] [\cd ] [\v ] [\va ] [\vp ] [\p ] [\m ] [\po ] [\pr ] [\cls ] [\pmo ] [\pm ] [\pmc ] [\pmr ] [\pi ] [\pi1 ] [\pi2 ] [\pi3 ] [\pc ] [\mi ] [\nb ] [\q ] [\q1 ] [\q2 ] [\q3 ] [\q4 ] [\qc ] [\qr ] [\qs ] [\qa ] [\qac ] [\qm ] [\qm1 ] [\qm2 ] [\qm3 ] [\qd ] [\b ] [\mt ] [\mt1 ] [\mt2 ] [\mt3 ] [\mt4 ] [\mte ] [\mte1 ] [\mte2 ] [\ms ] [\mse ] [\ms1 ] [\ms2 ] [\ms2e ] [\ms3 ] [\ms3e ] [\mr ] [\s ] [\s1 ] [\s1e ] [\s2 ] [\s2e ] [\s3 ] [\s3e ] [\s4 ] [\s4e ] [\sr ] [\r ] [\sp ] [\d ] [\sd ] [\sd1 ] [\sd2 ] [\sd3 ] [\sd4 ] [\tr ] [\th1 ] [\th2 ] [\th3 ] [\th4 ] [\th5 ] [\th6 ] [\th7 ] [\th8 ] [\tc1 ] [\tc2 ] [\tc3 ] [\tc4 ] [\tc5 ] [\tc6 ] [\tc7 ] [\tc8 ] [\thc1 ] [\thc2 ] [\thc3 ] [\thc4 ] [\thc5 ] [\thc6 ] [\thc7 ] [\thc8 ] [\tcc1 ] [\tcc2 ] [\tcc3 ] [\tcc4 ] [\tcc5 ] [\tcc6 ] [\tcc7 ] [\tcc8 ] [\thr1 ] [\thr2 ] [\thr3 ] [\thr4 ] [\thr5 ] [\thr6 ] [\thr7 ] [\thr8 ] [\tcr1 ] [\tcr2 ] [\tcr3 ] [\tcr4 ] [\tcr5 ] [\tcr6 ] [\tcr7 ] [\tcr8 ] [\lh ] [\li ] [\li1 ] [\li2 ] [\li3 ] [\li4 ] [\lf ] [\lim ] [\lim1 ] [\lim2 ] [\lim3 ] [\lim4 ] [\litl ] [\lik ] [\liv ] [\liv1 ] [\liv2 ] [\liv3 ] [\liv4 ] [\f
\note-f=\insert246
\notesave1-f=\box74
\notesave2-f=\box75
 ] [\fe
\note-fe=\insert245
\notesave1-fe=\box76
\notesave2-fe=\box77
 ] [\fr ] [\ft ] [\fk ] [\fq ] [\fqa ] [\fl ] [\fw ] [\fp ] [\fs ] [\fv ] [\fdc ] [\fm ] [\x
\note-x=\insert244
\notesave1-x=\box78
\notesave2-x=\box79
 ] [\xo ] [\xop ] [\xt ] [\xta ] [\xk ] [\xq ] [\xot ] [\xnt ] [\xdc ] [\rq ] [\ef
\note-ef=\insert243
\notesave1-ef=\box80
\notesave2-ef=\box81
 ] [\ex
\note-ex=\insert242
\notesave1-ex=\box82
\notesave2-ex=\box83
 ] [\esb ] [\esbe ] [\erq ] [\erqe ] [\cat ] [\qt ] [\nd ] [\tl ] [\dc ] [\bk ] [\sig ] [\pn ] [\png ] [\addpn ] [\wj ] [\k ] [\sls ] [\ord ] [\add ] [\lit ] [\no ] [\it ] [\bd ] [\bdit ] [\em ] [\sc ] [\sup ] [\pb ] [\fig ] [\jmp ] [\pro ] [\rb ] [\w ] [\wh ] [\wg ] [\wa ] [\ndx ] [\periph ] [\p1 ] [\p2 ] [\k1 ] [\k2 ] [\xtsee ] [\xtseealso ] [\qt-s ] [\qt1-s ] [\qt2-s ] [\qt3-s ] [\qt4-s ] [\qt5-s ] [\ts-s ] [\ph ] [\ph1 ] [\ph2 ] [\ph3 ] [\phi ] [\tr1 ] [\tr2 ] [\ps ] [\psi ] [\wr ] [\pub ] [\toc ] [\pref ] [\intro ] [\conc ] [\glo ] [\idx ] [\maps ] [\cov ] [\spine ] [\pubinfo ] [\zpa-xb ] [\zpa-xc ] [\zpa-xv ] [\zpa-d ] Reading Paratext stylesheet "ptx2pdf.sty" ()... [\k [\imt [\imt1 [\imt2 [\imt3 [\imt4 [\imte [\imte1 [\i
ago by (120 points)
+1 vote
I just noticed that you are running PTXprint version 2.4.21 which is almost a year old (and 35 versions behind the latest!)
Please update to something more recent - like 2.7.12 or soon-to-be-released 2.7.13 to see if it solves the issue.
ago by (2.6k points)
Thanks for pointing that out! I just upgraded, but no difference.

Related questions

0 votes
3 answers
0 votes
1 answer
0 votes
2 answers
0 votes
2 answers
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
There is neither Jew nor Gentile, neither slave nor free, nor is there male and female, for you are all one in Christ Jesus.
Galatians 3:28
2,664 questions
5,423 answers
5,083 comments
1,479 users