From 780bd4382b3b7803a36b64d30b3de49c7a3e27ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Wed, 1 Jul 2020 22:50:50 +0200 Subject: [PATCH] Allow numeric literal modes --- luametalatex-nodewriter.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/luametalatex-nodewriter.lua b/luametalatex-nodewriter.lua index 07fd02d..67d78fe 100644 --- a/luametalatex-nodewriter.lua +++ b/luametalatex-nodewriter.lua @@ -498,8 +498,12 @@ function pdf.write_matrix(a, b, c, d, e, f, p) pending[1], pending[2], pending[3], pending[4], pending[5], pending[6] = a, b, c, d, e, f end local write_matrix = pdf.write_matrix +local literal_type_names = { [0] = + 'origin', 'page', 'direct', 'raw', 'text' +} function pdf.write(mode, text, x, y, p) x, y, p = x or global_x, y or global_y, p or global_p + mode = literal_type_names[mode] or mode if mode == "page" then topage(p) p.strings[#p.strings + 1] = text