From e7eb77a396781b559566d894ea10bd4ba5f0d6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Fabian=20Kr=C3=BCger?= Date: Wed, 2 Jun 2021 21:15:37 +0200 Subject: [PATCH] Offset in pdf mode should default to last node Otherwise superscript/subscripts don't work correctly --- pdfmml-showlists.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdfmml-showlists.lua b/pdfmml-showlists.lua index 012046a..af7f191 100644 --- a/pdfmml-showlists.lua +++ b/pdfmml-showlists.lua @@ -119,7 +119,8 @@ function parse_list(lines, i, prefix, marks) local mark = mark_whatsit:match(line) if mark then local mark_table = assert(load('return {' .. assert(marks[mark], 'Undefined mark encountered') .. '}', nil, 't', mark_environment))() - current_mark, current_count, current_offset = mark_table, mark_table.count or 1, mark_table.offset or 1 + current_mark, current_count = mark_table, mark_table.count or 1 + current_offset = mark_table.offset or current_count i = i + 1 else print(line, prefix, i)