OSDN Git Service

small fix
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 3 Feb 2022 10:47:08 +0000 (19:47 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 3 Feb 2022 10:47:08 +0000 (19:47 +0900)
src/ltj-jfmglue.lua
src/ltj-ruby.lua

index a2bede6..2adcd7c 100644 (file)
@@ -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
index d5bc393..f038d70 100644 (file)
@@ -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