diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math')
3 files changed, 174 insertions, 189 deletions
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 a7ab10aee47..477db3d8108 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 @@ -5,6 +5,7 @@ %% The original source files were: %% %% unicode-math.dtx (with options: `package,LU') +%% unicode-math-epilogue.dtx (with options: `package,XE') %% unicode-math-compat.dtx (with options: `compat,LU') %% Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> %% Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> @@ -18,25 +19,6 @@ \ExplSyntaxOn \RequirePackage{luaotfload} [2014/05/18] \RequirePackage{lualatex-math}[2011/08/07] -\tl_map_inline:nn - { - \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes - \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ - \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion - \version@list\version@elt\alpha@list\alpha@elt - \restore@mathversion\init@restore@version\dorestore@version\process@table - \new@mathversion\DeclareSymbolFont\group@list\group@elt - \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp - \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ - \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar - \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter - \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter - \set__ummathdelimiter\DeclareMathRadical\mathchar@type - \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ - } - { - \tl_remove_once:Nn \@preamblecmds {\do#1} - } \cs_set:Nn \__um_set_mathsymbol:nNNn { \bool_lazy_and:nnT @@ -173,78 +155,69 @@ { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } \setoperatorfont{\mathrm} \cs_generate_variant:Nn \tl_if_eq:nnT {o} -\cs_set:Nn \__fontspec_setmainfont:nn - { - \fontspec_set_family:Nnn \rmdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2} +\cs_set:Nn \__fontspec_setmainfont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2} + \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault + \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault + \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault + } + } + +\cs_set:Nn \__fontspec_setsansfont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2} + \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault + \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault + } + } + +\cs_set:Nn \__fontspec_setmonofont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2} + \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault + \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault + } + } +\cs_set:Nn \__fontspec_setmathrm_hook:nn + { \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } - -\cs_set:Nn \__fontspec_setsansfont:nn - { - \fontspec_set_family:Nnn \sfdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2} + } +\cs_set:Nn \__fontspec_setboldmathrm_hook:nn + { + \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault + \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault + \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault + } +\cs_set:Nn \__fontspec_setmathsf_hook:nn + { \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } - -\cs_set:Nn \__fontspec_setmonofont:nn - { - \fontspec_set_family:Nnn \ttdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2} + } +\cs_set:Nn \__fontspec_setmathtt_hook:nn + { \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } -\cs_set:Nn \__fontspec_setmathrm:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setboldmathrm:nn - { - \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault - \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault - \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault - } -\cs_set:Nn \__fontspec_setmathsf:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setmathtt:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2} - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } + } \DeclareDocumentCommand \setmathfont { O{} m O{} } + { + \__um_setmathfont:nn {#1,#3} {#2} + } +\cs_set:Nn \__um_setmathfont:nn { \tl_set:Nn \l__um_fontname_tl {#2} \__um_init: \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } \csname S@\f@size\endcsname - \keys_set_known:nnN {unicode-math} {#1,#3} \l__um_unknown_keys_clist + \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } \__um_fontspec_select_font: @@ -306,13 +279,17 @@ } \cs_new:Nn \__um_declare_math_sizes: { - \dim_compare:nF { \fontdimen 10 \l__um_font == 0pt } + \fp_compare:nF { \__um_script_style_size:n {ScriptPercentScaleDown} == 0 } { \DeclareMathSizes { \f@size } { \f@size } - { \__um_fontdimen_to_scale:nn {10} {\l__um_font} } - { \__um_fontdimen_to_scale:nn {11} {\l__um_font} } + { \__um_script_style_size:n {ScriptPercentScaleDown} } + { \__um_script_style_size:n {ScriptScriptPercentScaleDown} } } } +\cs_new:Nn \__um_script_style_size:n + { + \fp_eval:n {\directlua{tex.sprint(luaotfload.aux.get_math_dimension("l__um_font","#1"))} * \f@size / 100 } + } \cs_new:Nn \__um_setup_legacy_fam_two: { \fontspec_set_family:Nxn \l__um_family_tl @@ -1170,16 +1147,7 @@ \__um_input_math_symbol_table: \group_end: } -\AtBeginDocument { \__um_load_lm_if_necessary: } -\cs_new:Nn \__um_load_lm_if_necessary: - { - \cs_if_exist:NF \l__um_fontname_tl - { - % TODO: update this when lmmath-bold.otf is released - \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] - \bool_set_false:N \g__um_mainfont_already_set_bool - } - } + \cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup} \cs_new:Nn \__um_superscript:n { @@ -1461,16 +1429,32 @@ \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: { \@ifpackageloaded { amsmath } { } { - \cs_set:Npn \root ##1 \of ##2 + \cs_set_nopar:Npn \r@@t ##1 ##2 { - \Uroot \l__um_radical_sqrt_tl { ##1 } { ##2 } + \hbox_set:Nn \l_tmpa_box + { + \c_math_toggle_token + \m@th + ##1 + \sqrtsign { ##2 } + \c_math_toggle_token + } + \__um_mathstyle_scale:Nnn ##1 { \kern } + { \fontdimen 63 \l__um_font } + \box_move_up:nn + { + (\box_ht:N \l_tmpa_box - \box_dp:N \l_tmpa_box) + * \number \fontdimen 65 \l__um_font / 100 + } + { \box_use:N \rootbox } + \__um_mathstyle_scale:Nnn ##1 { \kern } + { \fontdimen 64 \l__um_font } + \box_use_clear:N \l_tmpa_box } } } @@ -1746,6 +1730,16 @@ \cs_gset:Npn \ngreater { \ngtr } \cs_gset:Npn \nforksnot { \forks } } +\AtBeginDocument { \__um_load_lm_if_necessary: } +\cs_new:Nn \__um_load_lm_if_necessary: + { + \cs_if_exist:NF \l__um_fontname_tl + { + % TODO: update this when lmmath-bold.otf is released + \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] + \bool_set_false:N \g__um_mainfont_already_set_bool + } + } \cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnnn { \cs_if_exist:NT #1 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 b055c883b9f..6895fa6ac37 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 @@ -5,6 +5,7 @@ %% The original source files were: %% %% unicode-math.dtx (with options: `package,XE') +%% unicode-math-epilogue.dtx (with options: `package,XE') %% unicode-math-compat.dtx (with options: `compat,XE') %% Copyright 2006-2017 Will Robertson <will.robertson@latex-project.org> %% Copyright 2010-2013 Philipp Stephani <st_philipp@yahoo.de> @@ -16,25 +17,6 @@ %% %% This work is "maintained" by Will Robertson. \ExplSyntaxOn -\tl_map_inline:nn - { - \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes - \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ - \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion - \version@list\version@elt\alpha@list\alpha@elt - \restore@mathversion\init@restore@version\dorestore@version\process@table - \new@mathversion\DeclareSymbolFont\group@list\group@elt - \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp - \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ - \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar - \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter - \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter - \set__ummathdelimiter\DeclareMathRadical\mathchar@type - \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ - } - { - \tl_remove_once:Nn \@preamblecmds {\do#1} - } \cs_set:Nn \__um_set_mathsymbol:nNNn { \bool_lazy_and:nnT @@ -171,78 +153,69 @@ { \tl_set:Nn \g__um_operator_mathfont_tl {#1} } \setoperatorfont{\mathrm} \cs_generate_variant:Nn \tl_if_eq:nnT {o} -\cs_set:Nn \__fontspec_setmainfont:nn - { - \fontspec_set_family:Nnn \rmdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2} +\cs_set:Nn \__fontspec_setmainfont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2} + \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault + \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault + \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault + } + } + +\cs_set:Nn \__fontspec_setsansfont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2} + \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault + \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault + } + } + +\cs_set:Nn \__fontspec_setmonofont_hook:nn + { + \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} + { + \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2} + \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault + \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault + } + } +\cs_set:Nn \__fontspec_setmathrm_hook:nn + { \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } - -\cs_set:Nn \__fontspec_setsansfont:nn - { - \fontspec_set_family:Nnn \sfdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2} + } +\cs_set:Nn \__fontspec_setboldmathrm_hook:nn + { + \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault + \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault + \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault + } +\cs_set:Nn \__fontspec_setmathsf_hook:nn + { \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } - -\cs_set:Nn \__fontspec_setmonofont:nn - { - \fontspec_set_family:Nnn \ttdefault {#1}{#2} - \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2} + } +\cs_set:Nn \__fontspec_setmathtt_hook:nn + { \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } - \normalfont - \ignorespaces - } -\cs_set:Nn \__fontspec_setmathrm:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathrm_tl {#1} {#2} - \SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\updefault - \SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\mddefault\itdefault - \SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setboldmathrm:nn - { - \fontspec_set_family:Nnn \g__fontspec_bfmathrm_tl {#1} {#2} - \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\updefault - \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\bfdefault\updefault - \SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault - } -\cs_set:Nn \__fontspec_setmathsf:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathsf_tl {#1} {#2} - \SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl\mddefault\updefault - \SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl\bfdefault\updefault - } -\cs_set:Nn \__fontspec_setmathtt:nn - { - \fontspec_set_family:Nnn \g__fontspec_mathtt_tl {#1} {#2} - \SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl\mddefault\updefault - \SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl\bfdefault\updefault - } + } \DeclareDocumentCommand \setmathfont { O{} m O{} } + { + \__um_setmathfont:nn {#1,#3} {#2} + } +\cs_set:Nn \__um_setmathfont:nn { \tl_set:Nn \l__um_fontname_tl {#2} \__um_init: \cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } \csname S@\f@size\endcsname - \keys_set_known:nnN {unicode-math} {#1,#3} \l__um_unknown_keys_clist + \keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist \bool_if:NT \l__um_init_bool { \__um_log:n {default-math-font} } \__um_fontspec_select_font: @@ -1195,16 +1168,7 @@ \__um_input_math_symbol_table: \group_end: } -\AtBeginDocument { \__um_load_lm_if_necessary: } -\cs_new:Nn \__um_load_lm_if_necessary: - { - \cs_if_exist:NF \l__um_fontname_tl - { - % TODO: update this when lmmath-bold.otf is released - \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] - \bool_set_false:N \g__um_mainfont_already_set_bool - } - } + \cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup} \cs_new:Nn \__um_superscript:n { @@ -1787,6 +1751,16 @@ \cs_gset:Npn \ngreater { \ngtr } \cs_gset:Npn \nforksnot { \forks } } +\AtBeginDocument { \__um_load_lm_if_necessary: } +\cs_new:Nn \__um_load_lm_if_necessary: + { + \cs_if_exist:NF \l__um_fontname_tl + { + % TODO: update this when lmmath-bold.otf is released + \setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] + \bool_set_false:N \g__um_mainfont_already_set_bool + } + } \cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnnn { \cs_if_exist:NT #1 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 8b7536094e4..ca388f1d98b 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -4,7 +4,7 @@ %% %% The original source files were: %% -%% unicode-math.dtx (with options: `preamble') +%% unicode-math-preamble.dtx (with options: `preamble') %% unicode-math-msg.dtx (with options: `msg') %% unicode-math-usv.dtx (with options: `usv') %% unicode-math.dtx (with options: `load') @@ -18,17 +18,15 @@ %% (your choice): <http://www.latex-project.org/lppl/>. %% %% This work is "maintained" by Will Robertson. -\ProvidesPackage{unicode-math} - [2017/08/02 v0.8f Unicode maths in XeLaTeX and LuaLaTeX] -\usepackage{ifxetex,ifluatex} -\ifxetex + +\ifdefined\XeTeXversion \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in% \PackageError{unicode-math}{% Cannot run with this version of XeTeX!\MessageBreak You need XeTeX 0.9998 or newer.% }\@ehd \fi -\else\ifluatex +\else\ifdefined\luatexversion \ifnum\luatexversion<64% \PackageError{unicode-math}{% Cannot run with this version of LuaTeX!\MessageBreak @@ -387,6 +385,25 @@ { \tl_use:N \l__um_mathstyle_tl } +\tl_map_inline:nn + { + \new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes + \@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ + \DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion + \version@list\version@elt\alpha@list\alpha@elt + \restore@mathversion\init@restore@version\dorestore@version\process@table + \new@mathversion\DeclareSymbolFont\group@list\group@elt + \new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp + \DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ + \DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar + \set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter + \@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter + \set__ummathdelimiter\DeclareMathRadical\mathchar@type + \DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ + } + { + \tl_remove_once:Nn \@preamblecmds {\do#1} + } \cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} } \cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} } |