u-fischer / newpax

12 stars 3 forks source link

module 'newpax' not found #14

Closed vulpes2 closed 2 years ago

vulpes2 commented 2 years ago

Hi, I've noticed both newpax.lua and newpax.sty have been deleted in a past commit, and they are no longer included in the archive from CTAN either: https://mirrors.ctan.org/macros/latex/contrib/newpax.zip

This renders the package completely useless:

$ lualatex test.tex
This is LuaHBTeX, Version 1.13.0 (TeX Live 2021) 
 restricted system commands enabled.
(./test.tex
LaTeX2e <2020-10-01> patch level 4
 L3 programming layer <2021-05-07>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))[\directlua]:1: modul
e 'newpax' not found:
        no field package.preload['newpax']
        [kpse lua searcher] file not found: 'newpax'
stack traceback:
        [C]: in function 'require'
        [\directlua]:1: in main chunk.
l.3 \directlua{require("newpax")}

? 

If they were deleted by accident, please restore them and publish a new release on CTAN, thanks.

u-fischer commented 2 years ago

the .sty and the .lua are both packaged in the .dtx. Either install texlive 2022 and use its package manager to install the newest package version, or use the provided .ins file to unpack the .dtx manually.

vulpes2 commented 2 years ago

I was unaware that texlive 2022 changed the packaging format and was confused by the missing files. I'm able to manually unpack the files and annotation extraction seems to work okay, but any attempts to include the annotated PDF will fail with an error about PDF management (despite the fact that pdfmanagement-testphase is installed). I guess this probably won't work without texlive 2022 then, will try to just switch to that instead of trying to make it work with texlive 2021.

u-fischer commented 2 years ago

newpax was packaged by me this way already in texlive 2021. The tex systems unpack if you use their package manager, but if you install manually you have to do it yourself.

despite the fact that pdfmanagement-testphase is installed

It is not enough to install it, you must also use it in the document. Check the documentation.

vulpes2 commented 2 years ago

I did check the documentation, as well as the documentation of pdfmanagement-testphase, it did not make any difference.

\RequirePackage{pdfmanagement-testphase}
\DocumentMetadata{uncompress}

Having this in my test file will give me an error which I am not able to troubleshoot any further:

$ lualatex test.tex
This is LuaHBTeX, Version 1.13.0 (TeX Live 2021) 
 restricted system commands enabled.
(./test.tex
LaTeX2e <2020-10-01> patch level 4
 L3 programming layer <2021-05-07>
(/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-
testphase.sty
(/usr/share/texlive/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-
testphase.ltx
(/usr/share/texlive/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty))
)
! Undefined control sequence.
<recently read> \DocumentMetadata 

l.2 \DocumentMetadata
                   {uncompress}
?
u-fischer commented 2 years ago

well LaTeX2e <2020-10-01> patch level 4 is bit old. \DocumentMetadata requires LaTeX 2022-06-01.

Don't mix versions from different tex systems.

vulpes2 commented 2 years ago

So is there a way to use newpax with texlive 2021 at all? At this point almost no linux distros ship texlive 2022 in their repos which makes using it rather difficult.

u-fischer commented 2 years ago

sure. It was already in texlive 2021. Simply install it with the package manager of texlive 2021 and then check the older documentation.

vulpes2 commented 2 years ago

I was mixing versions earlier because I hit this bug and was not able to extract the annotations: #10 , which has been fixed recently. The release of newpax from the package manager was from 2021 so it can't extract the annotations from my documents. Guess I'll just have to remove texlive 2021 and use the installation script on tug.org to install a fresh copy of texlive 2022 then, thanks for all the help.

vulpes2 commented 2 years ago

I've tested this with texlive 2022 and it works perfectly, thank you.