zauguin / luapstricks

8 stars 0 forks source link

pst-geo #23

Closed hvoss49 closed 2 years ago

hvoss49 commented 2 years ago

pst-geo uses a lot of external PS files. But run is unknown. Minimal example:

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass{article}
\usepackage{pstricks}
\begin{filecontents*}{test.ps}
/myData [
[0 1]
[2 3] 
] def
\end{filecontents*}
\begin{document}
\begin{pspicture*}(-10,-138.5)(11,-117.5) % Zentrum auf Rom setzen
\pstVerb{ (test.ps) run }
\end{pspicture*}
\end{document}

Log:

[2...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:467: Unknown name
 "run"
stack traceback:
    [C]: in function 'error'
    ...ive/texmf-local/tex/generic/pstricks-lua/luapstricks.lua:467: in upvalue 'l
ookup'
zauguin commented 2 years ago

run wouldn't be too hard to add, but the next step is much more complicated. Most of these files are compressed with zlib and a PNG predictor. The used currentfile ... filter construction is incompatible with how luapstricks's parser works so it would require quite some refactoring and while LuaTeX does have a zlib binding, it does not (in contrast to luametatex) expose a PNG decoder. So this must be implemented manually. I think I still have some code for that somewhere, but it would probably be extremely slow.

hvoss49 commented 2 years ago

run wouldn't be too hard to add, but the next step is much more complicated. Most of these files are compressed with zlib and a PNG predictor. The used currentfile ... filter construction is incompatible with how luapstricks's parser works so

does it help, if we use the shell-escape option and run Ghostscript or pst-geo-decompress.pl for decompression?? Or I simply upload the uncompressed data files.