From bb5795c1bfc9e294a9ad18112ffc0817513988d6 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Sat, 21 May 2022 21:18:04 +0900 Subject: [PATCH] fix '(linebreak): invalid list tail, probably missing glue' error --- src/addons/luatexja-preset.sty | 1 - src/ltj-setwidth.lua | 3 +-- src/luatexja.lua | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/addons/luatexja-preset.sty b/src/addons/luatexja-preset.sty index b0ce39b..3da21dd 100644 --- a/src/addons/luatexja-preset.sty +++ b/src/addons/luatexja-preset.sty @@ -110,7 +110,6 @@ gt-m .code:n = % gtfamily , medium series \prop_put:Nnn \g__ltjpreset_font_prop { gt-u } {#1} \prop_put:Nnn \g__ltjpreset_font_prop { gt-d } {#1}, - % gt-d, gt-u は隠し gt .groups:n = { preset }, gt .value_required:n = true, gt-m .groups:n = { preset }, gt-m .value_required:n = true, } diff --git a/src/ltj-setwidth.lua b/src/ltj-setwidth.lua index a407393..0e8e39f 100644 --- a/src/ltj-setwidth.lua +++ b/src/ltj-setwidth.lua @@ -128,8 +128,7 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir) end end - local q - head, q = node_remove(head, p) + local q; head, q = node_remove(head, p) if pwidth > fwidth then if char_data.round_threshold then local frac = pwidth / fwidth diff --git a/src/luatexja.lua b/src/luatexja.lua index f375d72..f7957a1 100644 --- a/src/luatexja.lua +++ b/src/luatexja.lua @@ -323,13 +323,14 @@ do local to_node = node.direct.tonode local to_direct = node.direct.todirect local ensure_tex_attr = ltjb.ensure_tex_attr - + local slide = node.slide -- mode = true iff main_process is called from pre_linebreak_filter local function main_process(head, mode, dir, gc) ensure_tex_attr(attr_icflag, 0) if gc == 'fin_row' then return head else start_time_measure('jfmglue') + slide(head); local p = ltjj.main(to_direct(head),mode, dir) stop_time_measure('jfmglue') return to_node(p) -- 2.11.0