u-fischer / newpax

12 stars 3 forks source link

Unstable aux #26

Closed cristiklein closed 11 months ago

cristiklein commented 12 months ago

newpax.sty 2023-09-11 v0.54 seems to produce an unstable aux. latexmk dislikes this and ends with:

------------
Run number 5 of rule 'pdflatex'
------------
------------
Running 'lualatex --synctex=1 --interaction=nonstopmode --halt-on-error  -recorder -output-directory="out"  "main.tex"'
------------
This is LuaHBTeX, Version 1.17.0 (TeX Live 2023) 
 restricted system commands enabled.

[...]

Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex':  Reasons for rerun
Changed files or newly in use/created:
  out/02-cv.aux

Latexmk: Maximum runs of pdflatex reached without getting stable files
Latexmk: All targets () are up-to-date
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'main.tex':
   'pdflatex' needed too many passes
----------------------

Here is an example of the aux instability:

After first run:

\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand{\NEWPAX@DestReq}[2]{}
\providecommand{\NEWPAX@DestProv}[2]{}
\NEWPAX@DestProv{cv.newpax}{table.2}
\NEWPAX@DestProv{cv.newpax}{table.1}
\NEWPAX@DestProv{cv.newpax}{Doc-Start}
\NEWPAX@DestProv{cv.newpax}{table.4}
\NEWPAX@DestProv{cv.newpax}{table.3}
\NEWPAX@DestProv{cv.newpax}{table.5}
[...]

After last run:

\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand{\NEWPAX@DestReq}[2]{}
\providecommand{\NEWPAX@DestProv}[2]{}
\NEWPAX@DestProv{cv.newpax}{table.2}
\NEWPAX@DestProv{cv.newpax}{table.4}
\NEWPAX@DestProv{cv.newpax}{table.1}
\NEWPAX@DestProv{cv.newpax}{Doc-Start}
\NEWPAX@DestProv{cv.newpax}{table.3}
\NEWPAX@DestProv{cv.newpax}{table.5}
[...]

I don't "speak Lua" fluently, but based on my Python intuition, this looks like iterating over a dictionary in "memory" order, instead of first sorting the keys.

Happy to privately share a GitHub repo with a (not-so-minimal) MVP if it helps. :smile:

u-fischer commented 12 months ago

there is already a pull request about that: https://github.com/u-fischer/newpax/pull/25. I will look at it.

cristiklein commented 12 months ago

@u-fischer Sorry, I looked at the open issues and neglected to look at the PRs. :facepalm:

I tested the PR and it fixes the issue.

u-fischer commented 11 months ago

I have uploaded a new version that sorts the destination and hopefully resolves the problem.

cristiklein commented 11 months ago

Hi,

I just checked newpax 0.55 2023-11-08 via the registry.gitlab.com/islandoftex/images/texlive:TL2023-2023-11-12-full Docker image from the Island of TeX.

It works like a charm and the output is stable.

Thanks!