texlive[65913]

commits+karl at tug.org commits+karl at tug.org
Sun Feb 19 03:01:23 CET 2023


Revision: 65913
          http://tug.org/svn/texlive?view=revision&revision=65913
Author:   karl
Date:     2023-02-19 03:01:23 +0100 (Sun, 19 Feb 2023)
Log Message:
-----------
luapstricks (19feb23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/tex/lualatex/luapstricks/luapstricks.lua

Modified: trunk/Master/texmf-dist/tex/lualatex/luapstricks/luapstricks.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luapstricks/luapstricks.lua	2023-02-19 02:01:12 UTC (rev 65912)
+++ trunk/Master/texmf-dist/tex/lualatex/luapstricks/luapstricks.lua	2023-02-19 02:01:23 UTC (rev 65913)
@@ -18,8 +18,8 @@
 if luatexbase then
   luatexbase.provides_module {
     name = 'luapstricks',
-    version = 'v0.6',
-    date = '2022-09-10',
+    version = 'v0.8',
+    date = '2023-02-17',
     description = 'PSTricks backend for LuaLaTeX',
   }
 end
@@ -3016,11 +3016,16 @@
       texio.write_nl('term and log', ps_to_string(operand_stack[i]))
     end
   end,
+  pstack = function()
+    for i=#operand_stack, 1, -1 do
+      texio.write_nl('term and log', ps_to_string(require'inspect'(operand_stack[i])))
+    end
+  end,
   ['='] = function()
     texio.write_nl('term and log', ps_to_string(pop()))
   end,
   ['=='] = function() -- FIXME: Should give a better representation
-    texio.write_nl('term and log', ps_to_string(pop()))
+    texio.write_nl('term and log', require'inspect'((pop())))
   end,
 
   stringwidth = function()
@@ -3941,12 +3946,14 @@
     local op = function()
       flush_delayed()
       local state = graphics_stack[#graphics_stack]
-      local w, h, d = node.direct.dimensions(box.box)
+      local copied = node.direct.copy(box.box)
+      local w, h, d = node.direct.dimensions(copied)
       register_point(state, 0, -d/65781.76)
       register_point(state, w/65781.76, h/65781.76)
       vf.push()
-      vf.node(box.box)
+      vf.node(copied)
       vf.pop()
+      node.direct.free(copied)
     end
     lua_node_lookup[op] = box
     dict[id] = op
@@ -4155,7 +4162,11 @@
   local tokens = token.scan_argument(true)
   if file then
     context = tokens
-    local f = io.open(kpse.find_file(tokens, 'PostScript header'), 'r')
+    local resolved, msg = kpse.find_file(tokens, 'PostScript header')
+    if not resolved then
+      return tex.error(string.format('luapstricks: Unable to open %q: %s', tokens, msg))
+    end
+    local f = io.open(resolved, 'r')
     tokens = f:read'a'
     f:close()
   end



More information about the tex-live-commits mailing list.