From ca4208ab5d96c12b345e9ebe3462cb7dfb81591c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 10 Sep 2015 20:56:13 +0000 Subject: unicode-math (10sep15) git-svn-id: svn://tug.org/texlive/trunk@38337 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/unicode-math/unicode-math-luatex.sty | 47 ++++++---------------- .../tex/latex/unicode-math/unicode-math-xetex.sty | 38 +++-------------- .../tex/latex/unicode-math/unicode-math.sty | 4 +- 3 files changed, 22 insertions(+), 67 deletions(-) (limited to 'Master/texmf-dist/tex/latex/unicode-math') diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty index 1866de6a515..06bf4687261 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty @@ -530,7 +530,10 @@ \tl_new:N \l__um_radicals_tl \tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision} \cs_new_protected_nopar:Nn \__um_new_cramped_style:N - { \cs_new_eq:Nc #1 { luatex \cs_to_str:N #1 } } + { + \cs_if_exist:NF #1 + { \cs_new_eq:Nc #1 { luatex \cs_to_str:N #1 } } + } \__um_new_cramped_style:N \crampeddisplaystyle \__um_new_cramped_style:N \crampedtextstyle \__um_new_cramped_style:N \crampedscriptstyle @@ -1160,26 +1163,12 @@ } \CatchFileEdef \g__um_mathtable_tl {unicode-math-table.tex} {\__um_symbol_setup:} \cs_new:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl} +\cs_set:Npn \__um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil + { + \exp_last_unbraced:NNx \cs_gset_eq:NN #1 { \Ucharcat "#2 ~ 12 ~ } + } \group_begin: \char_set_catcode_other:N \^ - \cs_gset:Npn \__um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil - { - \tex_lowercase:D - { - \tl_rescan:nn - { - \ExplSyntaxOn - \char_set_catcode_other:N \{ - \char_set_catcode_other:N \} - \char_set_catcode_other:N \& - \char_set_catcode_other:N \% - \char_set_catcode_other:N \$ - } - { - \cs_gset_eq:NN #1 ^^^^^#2 - } - } - } \cs_new:Npn \__um_active_char_set:wc "#1 \q_nil #2 { \tex_lowercase:D @@ -1207,18 +1196,6 @@ \__um_input_math_symbol_table: \group_end: } -\group_begin: - \lccode`\*=`\\ - \char_set_catcode_escape:N \| - \char_set_catcode_other:N \\ - |lowercase - { - |AtBeginDocument - { - |let|backslash=* - } - } -|group_end: \AtBeginDocument { \__um_load_lm_if_necessary: } \cs_new:Nn \__um_load_lm_if_necessary: { @@ -1510,6 +1487,8 @@ \cs_set_eq:NN ^^^^2037 \__um_scan_sup_backtrprime: } \group_end: +\cs_if_exist:NF \Uroot + { \cs_new_eq:NN \Uroot \luatexUroot } \AtBeginDocument{\__um_redefine_radical:} \cs_new:Nn \__um_redefine_radical: { @@ -1517,7 +1496,7 @@ { \cs_set:Npn \root ##1 \of ##2 { - \luatexUroot \l__um_radical_sqrt_tl { ##1 } { ##2 } + \Uroot \l__um_radical_sqrt_tl { ##1 } { ##2 } } } } @@ -1869,7 +1848,7 @@ && \int_compare_p:nNn { \leftroot@ } = { \c_zero } } { - \luatexUroot \l__um_radical_sqrt_tl { #1 } { #2 } + \Uroot \l__um_radical_sqrt_tl { #1 } { #2 } } { \hbox_set:Nn \rootbox @@ -1910,7 +1889,7 @@ \mskip \uproot@ mu \c_math_toggle_token } - \luatexUroot \l__um_radical_sqrt_tl + \Uroot \l__um_radical_sqrt_tl { \box_move_up:nn { \box_wd:N \l_tmpa_box } { diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty index b7b7113ee80..a5cac59aec8 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty @@ -1188,26 +1188,12 @@ } \CatchFileEdef \g__um_mathtable_tl {unicode-math-table.tex} {\__um_symbol_setup:} \cs_new:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl} +\cs_set:Npn \__um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil + { + \exp_last_unbraced:NNx \cs_gset_eq:NN #1 { \Ucharcat "#2 ~ 12 ~ } + } \group_begin: \char_set_catcode_other:N \^ - \cs_gset:Npn \__um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil - { - \tex_lowercase:D - { - \tl_rescan:nn - { - \ExplSyntaxOn - \char_set_catcode_other:N \{ - \char_set_catcode_other:N \} - \char_set_catcode_other:N \& - \char_set_catcode_other:N \% - \char_set_catcode_other:N \$ - } - { - \cs_gset_eq:NN #1 ^^^^^#2 - } - } - } \cs_new:Npn \__um_active_char_set:wc "#1 \q_nil #2 { \tex_lowercase:D @@ -1235,18 +1221,6 @@ \__um_input_math_symbol_table: \group_end: } -\group_begin: - \lccode`\*=`\\ - \char_set_catcode_escape:N \| - \char_set_catcode_other:N \\ - |lowercase - { - |AtBeginDocument - { - |let|backslash=* - } - } -|group_end: \AtBeginDocument { \__um_load_lm_if_necessary: } \cs_new:Nn \__um_load_lm_if_necessary: { @@ -1968,7 +1942,7 @@ && \int_compare_p:nNn { \leftroot@ } = { \c_zero } } { - \luatexUroot \l__um_radical_sqrt_tl { #1 } { #2 } + \Uroot \l__um_radical_sqrt_tl { #1 } { #2 } } { \hbox_set:Nn \rootbox @@ -2009,7 +1983,7 @@ \mskip \uproot@ mu \c_math_toggle_token } - \luatexUroot \l__um_radical_sqrt_tl + \Uroot \l__um_radical_sqrt_tl { \box_move_up:nn { \box_wd:N \l_tmpa_box } { diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty index ff499293d04..584b03f79e7 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -19,7 +19,7 @@ %% %% This work is "maintained" by Will Robertson. \ProvidesPackage{unicode-math} - [2014/08/06 v0.8a Unicode maths in XeLaTeX and LuaLaTeX] + [2015/09/09 v0.8b Unicode maths in XeLaTeX and LuaLaTeX] \usepackage{ifxetex,ifluatex} \ifxetex \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in% @@ -42,6 +42,7 @@ }\@ehd \fi\fi \RequirePackage{expl3}[2015/03/01] +\RequirePackage{ucharcat} \RequirePackage{xparse} \RequirePackage{l3keys2e} \RequirePackage{fontspec}[2015/03/14] @@ -49,6 +50,7 @@ \RequirePackage{fix-cm} % avoid some warnings \RequirePackage{filehook} \ExplSyntaxOn +\cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } \cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx} \cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx} \bool_new:N \l__um_ot_math_bool -- cgit v1.2.3