summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-25 20:56:18 +0000
committerKarl Berry <karl@freefriends.org>2018-08-25 20:56:18 +0000
commit21a58c30431c4e45b1b0bc9f94f4e696bab9a217 (patch)
tree6f66df0c8d0bc0893a4dc129d740b7a709ab61d3 /Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
parent07d445bda7b2504536050450a2f1cc433ed3899e (diff)
luatexja (25aug18)
git-svn-id: svn://tug.org/texlive/trunk@48483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty58
1 files changed, 25 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
index acca226a7f0..9c8bbfca9f9 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
@@ -1,49 +1,41 @@
%
-% lltjp-unicode-math.sty
+% lltjp-unicode-math.sty 2018-08-24
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-unicode-math}[2018/01/14 Patch to unicode-math for LuaTeX-ja]
\RequirePackage{unicode-math,luatexja,etoolbox}
\ExplSyntaxOn
-\group_begin:
- \bool_new:N \__lltjp_um_patch_mathgroup_bool
- \bool_set_true:N \__lltjp_um_patch_mathgroup_bool
- \cs_gset:Nn \__um_define_math_chars: {
- \group_begin:
- \cs_set:Npn \__um_sym:nnn ##1##2##3
- {
- \tl_if_in:nnT
- { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
- {##3}
- {
- \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
- \ltjsetmathletter{ ##1 }
- }
- }
- \__um_input_math_symbol_table:
- \group_end:
- }
-
-\bool_if:NT \__lltjp_um_patch_mathgroup_bool {
- \cs_gset:Npn \use@mathgroup #1 #2
- {
- %\typeout{UM <#1><#2>}
- \mode_if_math:T % <- not sure if this is really necessary since we've just checked for mmode and raised an error if not!
+\cs_set:Nn \__um_define_math_chars: {
+ \group_begin:
+ \cs_set:Npn \__um_sym:nnn ##1##2##3
{
- \math@bgroup
- \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
- \__um_switchto_literal:
- \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
- \ifin@ \jfam #2 \relax \else \mathgroup #2 \relax \fi
- \math@egroup
+ \ltjsetmathletter{ ##1 }
+ \tl_if_in:nnT
+ { \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
+ {##3}
+ {
+ \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
+ }
}
+ \__um_input_math_symbol_table:
+ \group_end:
+}
+\cs_set:Npn \use@mathgroup #1 #2
+{
+ %\typeout{UM <#1><#2>}
+ \mode_if_math:T % <- not sure
+ {
+ \math@bgroup
+ \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
+ \__um_switchto_literal:
+ \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
+ \ifin@ \jfam #2 \relax \else \mathgroup #2 \relax \fi
+ \math@egroup
}
}
-\group_end:
\ifcsname jsc@mag@xrealtrue \endcsname \else
\expandafter\expandafter\expandafter \ExplSyntaxOff \expandafter \endinput