summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
blob: d33e44f3787c832e0772492a7cdc510ac7e75e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%
% lltjp-unicode-math.sty
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lltjp-unicode-math}[2013/05/14 Patch to unicode-math for LuaTeX-ja]

\RequirePackage{unicode-math,luatexja}

\ExplSyntaxOn

\group_begin:
  \cs_gset:Npn \um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil {%"
    \group_begin:
      %\typeout {um: \string#1, \int_from_hexadecimal:n {#2}, #2}% <- for debug
      \char_set_lccode:nn { `! } { "#2 }%"
      \tex_lowercase:D {
        \tl_set:Nn \l_tmpa_tl {  \relax
          \ifmmode!\else{\directlua{tex.globaldefs = 0}\ltj@allalchar!}\fi}
        \cs_gset_eq:NN #1 \l_tmpa_tl
      }
      \ltjsetmathletter{ \int_from_hexadecimal:n {#2} }
    \group_end:
  }
\group_end:

\ExplSyntaxOff

\endinput