• R/O
  • HTTP
  • SSH
  • HTTPS

luatexja: コミット

ソースコードの管理場所


コミットメタ情報

リビジョンcfee177443f3a2ffd5c2aa1c5774405b6f4ce6fe (tree)
日時2020-01-13 12:04:36
作者Hironori Kitagawa <h_kitagawa2001@yaho...>
コミッターHironori Kitagawa

ログメッセージ

Merge branch 'kitagawa_test' into kitagawa_nfss

変更サマリ

差分

--- a/src/ltj-math.lua
+++ b/src/ltj-math.lua
@@ -165,17 +165,27 @@ function (p, sty)
165165 return p
166166 end
167167
168-luatexbase.add_to_callback('mlist_to_hlist',
169- function (n, display_type, penalties)
170- n = to_direct(n); list_dir = ltjd_get_dir_count()
171- if getid(n)==id_whatsit and getsubtype(n)==sid_user and
168+do
169+ local mlist_to_hlist = node.mlist_to_hlist
170+ local function mlist_callback_ltja(n)
171+ local n = to_direct(n); list_dir = ltjd_get_dir_count()
172+ if getid(n)==id_whatsit and getsubtype(n)==sid_user and
172173 getfield(n, 'user_id') == DIR then
173- local old_n = n; n = node_remove(n, n)
174- node_free(old_n); if not n then return nil end
175- end
176- return node.mlist_to_hlist(
177- to_node(conv_jchar_to_hbox(n, 0)),
178- display_type, penalties)
179- end,'ltj.mlist_to_hlist', 1)
174+ local old_n = n; n = node_remove(n, n)
175+ node_free(old_n); if not n then return nil end
176+ end
177+ return to_node(conv_jchar_to_hbox(n, 0))
178+ end
179+ -- LaTeX 2020-02-02 seems to have pre_mlist_to_hlist callback
180+ if luatexbase.callbacktypes['pre_mlist_to_hlist'] then
181+ luatexbase.add_to_callback('pre_mlist_to_hlist',
182+ mlist_callback_ltja(n), 'ltj.mlist_to_hlist_pre', 1)
183+ else
184+ luatexbase.add_to_callback('mlist_to_hlist',
185+ function (n, display_type, penalties)
186+ return mlist_to_hlist(mlist_callback_ltja(n),display_type, penalties)
187+ end,'ltj.mlist_to_hlist', 1)
188+ end
189+end
180190
181191 luatexja.math = { is_math_letters = is_math_letters }
旧リポジトリブラウザで表示