From 7360ff8fe0d71f980a161b6e8973bde284f46df7 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Thu, 3 Feb 2022 19:47:08 +0900 Subject: [PATCH] small fix --- src/ltj-jfmglue.lua | 10 ++++++---- src/ltj-ruby.lua | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ltj-jfmglue.lua b/src/ltj-jfmglue.lua index a2bede6..2adcd7c 100644 --- a/src/ltj-jfmglue.lua +++ b/src/ltj-jfmglue.lua @@ -1104,7 +1104,9 @@ do luatexbase.call_callback("luatexja.jfmglue.special_jaglue_after", Nq.nuc) end, [id_pbox_w]= function() - luatexbase.call_callback("luatexja.jfmglue.whatsit_after", false, Nq, Np) + local hh = luatexbase.call_callback("luatexja.jfmglue.whatsit_after", false, Nq, Np, head) + -- hh: new head of false (nott processed) + if hh then head = hh end end, } @@ -1323,7 +1325,7 @@ do end end - local function whatsit_after_callback(s, Nq, Np) + local function whatsit_after_callback(s, Nq, Np, head) if not s and getfield(Nq.nuc, 'user_id') == BPAR then local x, y = node_prev(Nq.nuc), Nq.nuc Nq.first, Nq.nuc, Nq.last = x, x, x @@ -1334,7 +1336,7 @@ do Nq.met = Np.met; Nq.pre = 0; Nq.post = 0; Nq.xspc = 0 Nq.auto_xspc, Nq.auto_kspc = 0, 0 end - head = node_remove(head, y) + s = node_remove(head, y) node_free(y) elseif not s and getfield(Nq.nuc, 'user_id') == BOXB then local x, y = node_prev(Nq.nuc), Nq.nuc @@ -1346,7 +1348,7 @@ do Nq.met = Np.met; Nq.pre = 0; Nq.post = 0; Nq.xspc = 0 Nq.auto_xspc, Nq.auto_kspc = 0, 0 end - head = node_remove(head, y) + s = node_remove(head, y) node_free(y) end return s diff --git a/src/ltj-ruby.lua b/src/ltj-ruby.lua index d5bc393..f038d70 100644 --- a/src/ltj-ruby.lua +++ b/src/ltj-ruby.lua @@ -764,7 +764,7 @@ do end local RIPOST = luatexja.stack_table_index.RIPOST local abs = math.abs - local function whatsit_after_callback(s, Nq, Np) + local function whatsit_after_callback(s, Nq, Np, head) if not s and getfield(Nq.nuc, 'user_id') == RUBY_PRE then if Np then local last_glue = node_new(id_glue) @@ -802,7 +802,7 @@ do rst.post = 0 end end - return true + return head else return s end -- 2.11.0