zauguin / luapstricks

8 stars 0 forks source link

pst-barcode and missing currentglobal #38

Closed hvoss49 closed 3 years ago

hvoss49 commented 3 years ago

All barcode example don't work:


) (/usr/local/texlive/texmf-local/tex/generic/pstricks/generic/pst-fp.tex
`pst-fp' v0.06, 2020/11/20 (hv)))
(/usr/local/texlive/texmf-local/tex/generic/pst-barcode/pst-barcode.tex
`PST-barcode' v0.18, 2017/08/22 (tb,hv)...ive/texmf-local/tex/generic/pstricks-
lua/luapstricks.lua:569: Unknown name "currentglobal"
stack traceback:
    [C]: in function 'error'
    ...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:569: in upvalue 'l
ookup'
\documentclass[border=5mm]{standalone}
\usepackage{pst-barcode}
\begin{document}
\begin{pspicture}(3.5,1.1in)
  \psbarcode{1234567}{includetext}{ean8}
\end{pspicture}
\begin{pspicture}(-2,-1.5)(0.5,0.2in)
  \psbarcode[rotate=90,linecolor=red,transy=-1.5cm]{1234567}{includetext  guardwhitespace height=0.6}{ean8}
\end{pspicture}
\begin{pspicture}(3.5,1.1in)
  \psbarcode[scalex=1.5,scaley=0.5]{1234567}{includetext inkspread=0.5}{ean8}
\end{pspicture}
\end{document}
zauguin commented 3 years ago

currentglobal is implemented now, but only as a dummy (Since the whole local/global distinction is missing mostly by design we always report currentglobal to be true.)

hvoss49 commented 3 years ago

There is another issue:

Extended graphic state modifications dropped since `pdfmanagement-testphase' is
 not loaded....ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:569: Un
known name "findresource"
stack traceback:
    [C]: in function 'error'
    ...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:569: in upvalue 'l
ookup'
pablgonz commented 3 years ago

currentglobal is implemented now, but only as a dummy (Since the whole local/global distinction is missing mostly by design we always report currentglobal to be true.)

@zauguin In which commit is that?

I still get:

`PST-barcode' v0.18, 2017/08/22 (tb,hv)./luapstricks.lua:569: Unknown name "cur
rentglobal"
stack traceback:
    [C]: in function 'error'
    ./luapstricks.lua:569: in upvalue 'lookup'
    ./luapstricks.lua:3023: in upvalue 'execute_tok'
    ./luapstricks.lua:3053: in upvalue 'execute_ps'
    ./luapstricks.lua:3065: in function <./luapstricks.lua:3059>.
l.31 \pstheader{pst-barcode.pro}

? 
(/usr/local/texlive/2021/texmf-dist/tex/latex/marginnote/marginnote.sty)))
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(./test.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) [1./luapstricks.lua:569: Unknown name "findresource"
stack traceback:
    [C]: in function 'error'
    ./luapstricks.lua:569: in upvalue 'lookup'
    ./luapstricks.lua:3023: in upvalue 'execute_tok'
    ./luapstricks.lua:3053: in upvalue 'execute_ps'
    ./luapstricks.lua:3114: in function <./luapstricks.lua:3111>
    [C]: in function 'vf.node'
    ./luapstricks.lua:3104: in function <./luapstricks.lua:3095>.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 
                                                  \__shipout_drop_firstpage_...

l.17 \end{document}

"currentglobal" still returns error :(

zauguin commented 3 years ago

In which commit is that?

Ups, I forgot to commit that. Now it's there. But as Herbert said there is still the resource system missing.

pablgonz commented 3 years ago

@zauguin Now return

) [1./luapstricks.lua:992: ./luapstricks.lua:569: Unknown name "token"
stack traceback:
    [C]: in function 'error'
    ./luapstricks.lua:992: in function <./luapstricks.lua:984>
    (...tail calls...)
    ./luapstricks.lua:3282: in upvalue 'execute_ps'
    ./luapstricks.lua:911: in function <./luapstricks.lua:907>
    (...tail calls...)
    ./luapstricks.lua:3282: in function <./luapstricks.lua:3280>
    (...tail calls...)
    ./luapstricks.lua:3282: in upvalue 'execute_ps'
    ./luapstricks.lua:3343: in function <./luapstricks.lua:3340>
    [C]: in function 'vf.node'
    ./luapstricks.lua:3333: in function <./luapstricks.lua:3324>.
<argument> ...not:N \tex_shipout:D \box_use:N \l_shipout_box 
                                                  \__shipout_drop_firstpage_...

l.17 \end{document}
zauguin commented 3 years ago

Some progress here, but it's still not working. Currently the issue is missing support for "Immediately Evaluated Names".

zauguin commented 3 years ago

This should work now.

hvoss49 commented 3 years ago

I get an unknown cvrs

) [84...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:1003: ...ive/t
exmf-local/tex/generic/pstricks-lua/luapstricks.lua:1026: ...ive/texmf-local/te
x/generic/pstricks-lua/luapstricks.lua:970: ...ive/texmf-local/tex/generic/pstr
icks-lua/luapstricks.lua:570: Unknown name "cvrs"
stack traceback:
    [C]: in function 'error'
    ...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:1003: in function 
<...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:973>
    (...tail calls...)
pablgonz commented 3 years ago

@hvoss49 This works now :D ... Before closing a query... With only visual inspection, we are sure that the barcodes are equivalent (exact output)?

zauguin commented 3 years ago

Before closing a query... With only visual inspection, we are sure that the barcodes are equivalent (exact output)?

The EAN-8 barcodes are equivalent, the QR codes I looked at seemed fine too. (At least they scan correctly and don't look obviously different, visual comparisons is hard for QR codes.)

hvoss49 commented 3 years ago

I uploaded pst-barcode-pdf, created with latest luapstricks.lua. Everything looks fine.

pablgonz commented 3 years ago

@hvoss49 Close this?