OSDN Git Service

ltj-ruby.lua: fix forum:3103
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 4 May 2021 11:24:13 +0000 (20:24 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 4 May 2021 11:24:13 +0000 (20:24 +0900)
doc/luatexja-ruby.tex
src/ltj-ruby.lua

index 08bb579..a01994f 100644 (file)
@@ -853,6 +853,8 @@ $r_2$,~$g_2$を行Bから除去・メモリ解放し,代わりに$n_3$を行B
   ◆\ruby{A}{◆◆◆◆◆}◆\\◆\ruby{A}{◆◆◆◆◆◆}◆\\◆A◆
   
   \makebox[10\zw][s]{値とは\ruby{\texttt{;}}{セミコロン}で区切}%
+
+  \ltjruby{痛}{いたみ}(\ltjruby{病}{びやう}あ
 }
 \fbox{\box0}
 
index cd8b98a..d5bc393 100644 (file)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.ruby',
-  date = '2020-10-30',
+  date = '2021-05-04',
   description = 'Ruby annotation',
 })
 luatexja.ruby = {}
@@ -544,12 +544,13 @@ local function pre_high(ahead)
              local op = (atr>0) and (old_break_info[atr] or post_intrusion_backup) or 0
              max_allow_pre = max(0, -max_allow_pre - op)
          end
-         if rst.exclude_pre_from_prev_ruby  and ((atr>0) and (old_break_info[-atr]>0) or post_jfmgk_backup) then
+         if rst.exclude_pre_from_prev_ruby  and atr>0 and old_break_info[-atr]
+           and (old_break_info[-atr]>0 or post_jfmgk_backup) then
             -- 「直前のルビが JFM グルーに進入→現在のルビの前文字進入はなし」という状況
             max_allow_pre = 0; rst.exclude_pre_from_prev_ruby=false
          end
          if rst.exclude_pre_jfmgk_from_prev_ruby
-            and (atr>0) and ((old_break_info[atr]  or post_intrusion_backup) > 0) then
+            and atr>0 and ((old_break_info[atr]  or post_intrusion_backup) > 0) then
             -- 「直前のルビが文字に進入→現在のルビの和文処理グルーへの進入はなし」という状況
             rst.before_jfmgk = 0
          end