summaryrefslogtreecommitdiff
path: root/graphics/pstricks/contrib/luapstricks/luapstricks.lua
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pstricks/contrib/luapstricks/luapstricks.lua')
-rw-r--r--graphics/pstricks/contrib/luapstricks/luapstricks.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/graphics/pstricks/contrib/luapstricks/luapstricks.lua b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
index 8ae9eed76d..7da1c9c133 100644
--- a/graphics/pstricks/contrib/luapstricks/luapstricks.lua
+++ b/graphics/pstricks/contrib/luapstricks/luapstricks.lua
@@ -18,8 +18,8 @@
if luatexbase then
luatexbase.provides_module {
name = 'luapstricks',
- version = 'v0.2',
- date = '2021-09-30',
+ version = 'v0.3',
+ date = '2021-11-12',
description = 'PSTricks backend for LuaLaTeX',
}
end
@@ -3892,7 +3892,10 @@ local fid = font.define{
local tokens, direct = assert(ps_tokens), ps_direct
ps_tokens = nil
local x, y = pdf.getpos()
+ local TeXDict = userdict.value.TeXDict.value
+ local saved_ocount = TeXDict.ocount
local height = #operand_stack
+ TeXDict.ocount = height
operand_stack[height + 1], operand_stack[height + 2] = ps_pos_x/65781.76, ps_pos_y/65781.76
ps_pos_x, ps_pos_y = nil
if direct then
@@ -3914,11 +3917,13 @@ local fid = font.define{
flush_delayed()
if not direct then
systemdict.value.grestore()
+ height = TeXDict.ocount or height
local new_height = #operand_stack
assert(new_height >= height)
for k = height + 1, new_height do
operand_stack[k] = nil
end
+ TeXDict.ocount = saved_ocount
end
end}
}