sillsdev / ptx2pdf

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

Diglot errors #196

Closed viverechristus closed 4 years ago

viverechristus commented 4 years ago

If I select RUT chapter 1 in our main project (JraKhmr) and then turn on diglot and select our manual transliteration project JraLM, then print, I get the following:

image

After clicking OK, I get this:

image

No output.

If I fix the two instances of \xta in RUT 1 by adding \xta* at the end of the added text, save, go back to PTXPrint and click "Print", nothing at all happens. No blue bar, nothing.

mhosken commented 4 years ago

This is probably due to a bug in your custom.sty where you probably have:

\Marker xta
\TextType notetext

The parser is case dependent here and needs the case correct:

\Marker xta
\TextType NoteText

After that, everything should be fine. Mind you I agree the parser is not correctly handling the automatic closing of character styles outside of notes.

mhosken commented 4 years ago

Tagged with not a bug since in this case there is no bug in ptxprint. But it does raise the spectre of a different bug which would be good to fix in due course.

viverechristus commented 4 years ago

I fixed custom.sty, and I no longer get the first error, but the subsequent one (which prevents any output) remains:

image

Note, by the way, that (as I understand it), custom.sty is produced not by the end user but distributed by the PT developers, so probably everyone and her brother has the same custom.sty error. It's also quite odd that even though the very same custom.sty stylesheet is used by all my outputs of every book in both our projects, I only get this error when I'm trying to do a diglot.

viverechristus commented 4 years ago

Please let me know if I should test something else, or provide you with any additional information.

Now that the (monoglot) problem with MAT in JarLM is resolved (issue #195 ), I'm getting the same error for MAT as for RUT if I try to create a diglot.

viverechristus commented 4 years ago

Now that other problems are resolved, I can get an output by turning off "Apply Stylesheet Overrides" in the primary project. I'll see whether I can narrow down which part(s) of the stylesheet are causing trouble and report back.

viverechristus commented 4 years ago

Simply calling ptxprint-mods.sty gives the error in my earlier comment, regardless of the contents of the file.

If I click on "Edit..." next to "Apply Stylesheet Overrides" and delete the file's contents (so that it's a blank file), then click "Save", then click "Print," I continue to get the same error. (This was after trying to comment out lots of lines, with no effect.) However, if I deselect "Apply Stylesheet Overrides", I get a successful output.

mhosken commented 4 years ago

I hold that #195 is dependent on fixing #196. BTW it's far more helpful to submit the last few lines (ignoring the statistics) from the .log file from the Viewer (or an editor for long files) than the dialog which sometimes misses the gold in the error, as in this case.

viverechristus commented 4 years ago

I know this is overkill, but here's the whole thing:

This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/W32TeX) (preloaded format=xetex 2019.8.14)  28 AUG 2020 09:47
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**ptxprint-Ruth-TwoScript-MATJraKhmr.tex

(c:/My Paratext 8 Projects/JraKhmr/PrintDraft/ptxprint-Ruth-TwoScript-MATJraKhm
r.tex (c:/Program Files/PTXprint/ptx2pdf/paratext2.tex
\@ndhooks=\toks13
\@nithooks=\toks14
\@veryparhooks=\toks15
\p@rstylehooks=\toks16

(c:/Program Files/PTXprint/ptx2pdf/ptx-diglot.tex
\diglotTRcount=\count28
\diglotDbgJoinboxes=\count29
\leftho@ks=\toks17
\rightho@ks=\toks18
\FontSizeUnitL=\dimen16
\FontSizeUnitR=\dimen17
\le@dingunitL=\dimen18
\le@dingunitR=\dimen19
\verticalsp@ceunitL=\dimen20
\verticalsp@ceunitR=\dimen21
\IndentUnitL=\dimen22
\IndentUnitR=\dimen23
\partialL=\box16
\excessL=\box17
\excessR=\box18
\partialR=\box19
\savedpenalty=\count30
\tmppenalty=\count31
\Lchunkpenalty=\count32
\Lboxpenalty=\count33
\partialLpenalty=\count34
\Rchunkpenalty=\count35
\Rboxpenalty=\count36
\partialRpenalty=\count37
\lastsavedLpenalty=\count38
\lastsavedRpenalty=\count39
\columnLwidth=\dimen24
\columnRwidth=\dimen25
\availhtL=\dimen26
\availhtR=\dimen27
\chunkDelta=\dimen28
\baselineDelta=\dimen29
\thisjointDelta=\dimen30
\cumulativeDelta=\count40
\adjustp@ge=\dimen31
\Lht=\dimen32
\Rht=\dimen33
\TempDim=\dimen34
\LeftBox=\box20
\RightBox=\box21
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-tracing.tex
\TRACEcount=\count41
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-para-style.tex
\c@rrentcols=\count42
\he@dingbox=\box22
\lastdepth=\dimen35
\p@rlocs=\write0
\readp@rlocs=\read1
\prev@y=\count43
\this@y=\count44
\chap@y=\count45
\pr@vdelay=\count46
\th@sdelay=\count47
\j@nkbox=\box23
\ch@pterwd=\dimen36
\ch@pterbox=\box24
\ch@pternote=\box25
\str@tbox=\box26
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-char-style.tex
\n@tenesting=\count48
\p@ranesting=\count49
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-note-style.tex
\n@tecl@sses=\toks19
\AboveNoteSpace=\dimen37
\InterNoteSpace=\dimen38
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-stylesheet.tex
\dropnumbersize=\dimen39
\dropnumberraise=\dimen40
\v@rsehooks=\toks20
\prev@rsehooks=\toks21
\styl@sheet=\read2
\origb@selineskip=\dimen41
\t@stread=\read3
\AdjListPath=\toks22
\PicListPath=\toks23
\PtxFilePath=\toks24
\do@ctive=\toks25
\FontSizeUnit=\dimen42
\IndentUnit=\dimen43
\PaperWidth=\dimen44
\PaperHeight=\dimen45
\MarginUnit=\dimen46
\BindingGutter=\dimen47
\TitleColumns=\count50
\IntroColumns=\count51
\BodyColumns=\count52
\le@dingunit=\dimen48
\verticalsp@ceunit=\dimen49
\topm@rgin=\dimen50
\bottomm@rgin=\dimen51
\textwidth=\dimen52
\textheight=\dimen53
\colwidth=\dimen54
\ExtraRMargin=\dimen55
\gutter=\dimen56
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-references.tex
\c@untA=\count53
\c@untB=\count54
\oddhead=\toks26
\evenhead=\toks27
\titlehead=\toks28
\noVoddhead=\toks29
\noVevenhead=\toks30
\oddfoot=\toks31
\evenfoot=\toks32
\titlefoot=\toks33
\noVoddfoot=\toks34
\noVevenfoot=\toks35
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-cropmarks.tex
\topcr@p=\box27
\bottomcr@p=\box28
\pdfcropwidth=\dimen57
\pdfcropheight=\dimen58
\b@rder=\box29
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-toc.tex
\t@cfile=\write1
\tocc@l=\count55
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-tables.tex
\cellb@x=\box30
\t@talwidth=\dimen59
\linec@unt=\count56
\lct@mp=\count57
\sp@re=\dimen60
\exc@ss=\dimen61
\thr@shold=\dimen62
\nth@line=\count58
\tabler@ws=\count59
\maxtablec@l=\count60
\tablec@l=\count61
\@col=\count62
\@row=\count63
\allocatedtablec@ls=\count64
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-adj-list.tex
\@djparindex=\count65
\@djlist=\read4
\curr@djpar=\count66
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-pic-list.tex
\p@clist=\read5
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-cutouts.tex
\@numcuts=\count67
\@parshapelines=\count68
\@index=\count69
\@line=\count70
\@after=\count71
\@until=\count72
\@width=\dimen63
\@indent=\dimen64
\@hsize=\dimen65
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-callers.tex
\c@llernum=\count73
\numc@llers=\count74
\n@tepages=\write2
\n@tepagetest=\read6
\AutoCallerStartChar=\count75
\AutoCallerNumChars=\count76
)
(c:/Program Files/PTXprint/ptx2pdf/ptx-figure.tex
\bottomins=\insert252
\topleftins=\insert251
\toprightins=\insert250
\bottomleftins=\insert249
\bottomrightins=\insert248
\wholepagepic=\box31
\PicPath=\toks36
\picb@x=\box32
\p@ramnumber=\count77
\p@cinswid=\dimen66
\p@cwidth=\dimen67
\p@cheight=\dimen68
\otherinsht=\dimen69
\picl@ctest=\read7
\picp@ges=\write3
)
(c:/Program Files/PTXprint/ptx2pdf/ptxplus-character-kerning.tex
\quotekernamount=\dimen70
)
\he@dingnotes=\box33
\f@@tstrut=\box34
\n@tewidth=\dimen71
\intern@teskip=\skip18
\noteRag=\skip19
\RHruleposition=\dimen72
\partial=\box35
\galley=\box36
\galleypenalty=\count78
\trialheight=\dimen73
\s@vedpage=\box37
\availht=\dimen74
\shortavail=\dimen75
\colhtA=\dimen76
\colhtB=\dimen77
\colA=\box38
\colB=\box39
\loopcount=\count79
\availA=\dimen78
\availB=\dimen79
\columnshift=\dimen80
\ColumnGutterRuleSkip=\dimen81
\totalp@ges=\count80
\whichp@ge=\count81
\im@gecount=\count82
\badspacepenalty=\count83
)
Reading Paratext stylesheet "../../usfm.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 \ms1
\ms2 \ms3 \mr \s \s1 \s2 \s3 \s4 \sr \r \sp \d \sd \sd1 \sd2 \sd3 \sd4 \tr
\th1 \th2 \th3 \th4 \th5 \tc1 \tc2 \tc3 \tc4 \tc5 \thc1 \thc2 \thc3 \thc4
\thc5 \tcc1 \tcc2 \tcc3 \tcc4 \tcc5 \thr1 \thr2 \thr3 \thr4 \thr5 \tcr1 \tcr2
\tcr3 \tcr4 \tcr5 \lh \li \li1 \li2 \li3 \li4 \lf \lim \lim1 \lim2 \lim3 \lim4
\litl \lik \liv \liv1 \liv2 \liv3 \liv4 \liv5 \f
\note-f=\insert247
\note-fR=\insert246
 \fe
\note-fe=\insert245
\note-feR=\insert244
 \fr \ft \fk \fq \fqa \fl
\fw \fp \fv \fdc \fm \x
\note-x=\insert243
\note-xR=\insert242
 \xo \xop \xt \xta \xk \xq \xot \xnt \xdc \rq \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 \ph \ph1 \ph2 \ph3 \phi \tr1 \tr2 \ps \psi \fs \wr \pub
\toc \pref \intro \conc \glo \idx \maps \cov \spine \pubinfo \zpa-xb \zpa-xc
\zpa-xv \zpa-d
Reading Paratext stylesheet "C:/Program Files/PTXprint/ptx2pdf/ptx2pdf.sty"...
Reading Paratext stylesheet "../../JraKhmr/custom.sty"... \po \qd \lh \lf \lim
\lim1 \lim2 \lim3 \lim4 \xop \xta \pn \png \wa \ior \zkh \zjv
Reading Paratext stylesheet "../shared/ptxprint/Ruth-TwoScript/NestedStylesR.st
y"...
Reading Paratext stylesheet "../shared/ptxprint/Ruth-TwoScript/NestedStyles.sty
"...
! Paratext stylesheet "../../JraLM/shared/ptxprint/Jarai-Roman/ptxprint-mods.st
y" not found.
\stylesheet ...Paratext stylesheet "#1" not found}
                                                  \else \message {Reading Pa...

\stylesheetR ...\gdef \ds@ffix {R}\stylesheet {#1}
                                                  \gdef \ds@ffix {}
l.23 ...ed/ptxprint/Jarai-Roman/ptxprint-mods.sty}
                                                   % Right-side/Diglot Secon...
No pages of output.
davidg-sil commented 4 years ago

Paratext stylesheet "../../JraLM/shared/ptxprint/Jarai-Roman/ptxprint-mods.sty" not found. Is the error that ought to have been picked up on. Quite why it wasn't found is possibly due to some kind of python issue, but a quick and dirty work-around might be to find wherever JraLM is, go down through these directories: shared; ptxprint; and finally Jarai-Roman. And then make a file ptxprint-mods.sty there, e.g with your favourite programming editor or by copying another style file and emptying it (or putting anything sane you need in there).

viverechristus commented 4 years ago

That fixes the problem. Thanks.

Note on (this) user's expectations: in my secondary project's saved configuration, I had not checked "Apply Stylesheet Overrides." I would have assumed that in producing a diglot, if the Stylesheet Overrides is checked in the primary project but not in the secondary project configuration, PTXprint would run ptxprint-mods.sty only for the primary project column.

(I suspect that when there's detailed documentation, that will include details about which settings from the secondary project configuration are respected in the diglot production, and which ones are overridden by the primary project's configuration.)