2 % lltjp-unicode-math.sty
5 \NeedsTeXFormat{LaTeX2e}
6 \ProvidesPackage{lltjp-unicode-math}[2013/05/14 Patch to unicode-math for LuaTeX-ja]
8 \RequirePackage{unicode-math,luatexja}
13 \cs_gset:Nn \um_define_math_chars: {
15 \char_set_catcode_math_superscript:N \^
16 \cs_set:Npn \_um_sym:nnn ##1##2##3 {
17 \bool_if:nTF { \cs_if_eq_p:NN ##3 \mathaccent ||
18 \cs_if_eq_p:NN ##3 \mathopen ||
19 \cs_if_eq_p:NN ##3 \mathclose ||
20 \cs_if_eq_p:NN ##3 \mathover ||
21 \cs_if_eq_p:NN ##3 \mathunder ||
22 \cs_if_eq_p:NN ##3 \mathbotaccent } {
23 \ltjsetmathletter{ ##1 }
25 \um_cs_set_eq_active_char:Nw ##2 = ##1 \q_nil \ignorespaces
28 \char_set_catcode_other:N \#
29 \um_input_math_symbol_table:
32 \cs_gset:Npn \um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil {%"
34 %\typeout {um: \string#1, \int_from_hexadecimal:n {#2}, #2}% <- for debug
35 \char_set_lccode:nn { `! } { "#2 }%"
37 \tl_set:Nn \l_tmpa_tl {\relax\ifmmode!\else{\directlua{tex.globaldefs = 0}\ltj@allalchar!}\fi}
38 \cs_gset_eq:NN #1 \l_tmpa_tl
40 \ltjsetmathletter{ \int_from_hexadecimal:n {#2} }