OSDN Git Service

fix? #37871
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 12 Jan 2018 12:25:21 +0000 (21:25 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 12 Jan 2018 12:25:21 +0000 (21:25 +0900)
src/patches/lltjfont.sty
src/patches/lltjp-unicode-math.sty

index cfff0f0..747d372 100644 (file)
 }
 \def\ltj@selectfont@patch{%
  \directlua{luatexja.base.start_time_measure('selectfont')}%
+ \global\let\ltj@afont@name=\font@name
  \let\tmp@error@fontshape\error@fontshape
   \let\error@fontshape\error@kfontshape
   \directlua{luatexja.jfont.is_kyenc('\luatexluaescapestring{\k@encoding}')}\ifin@%
        % 警告: 再び \selectfont を呼んでいる.無限ループの可能性あり
     \fi
   \fi
+  \global\let\font@name=\ltj@afont@name
   \directlua{luatexja.base.stop_time_measure('selectfont')}%
 }
 \EverySelectfont{\ltj@selectfont@patch}
index 2642dd1..d761f83 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-unicode-math}[2017/11/12 Patch to unicode-math for LuaTeX-ja]
+\ProvidesPackage{lltjp-unicode-math}[2018/01/12 Patch to unicode-math for LuaTeX-ja]
 
 \RequirePackage{unicode-math,luatexja}
 
@@ -12,8 +12,6 @@
 \group_begin:
   \bool_new:N \lltjp_um_patch_mathgroup_bool
   \bool_set_true:N \lltjp_um_patch_mathgroup_bool
-%% Recent unicode-math (2017-10-02, v0.8g) does not have \ProvidesPackage,
-%% So we can't use the date option of \@ifpackageloaded.
   \cs_gset:Nn \__um_define_math_chars: {
     \group_begin:
       \cs_set:Npn \__um_sym:nnn ##1##2##3
@@ -22,7 +20,7 @@
          { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
          {##3}
         {
-          \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \Ucharcat ##1 ~ 12 ~ }
+          \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
           \ltjsetmathletter{ ##1 }
         }
        }
@@ -46,7 +44,6 @@
    }
 }
 \group_end:
-
 \ExplSyntaxOff
 
 \endinput