summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-07 23:46:58 +0000
committerKarl Berry <karl@freefriends.org>2018-01-07 23:46:58 +0000
commitf15ab98da224024bdcb9d2b70a263c7f6143a91b (patch)
tree8368ce018ac0869d5d556cc47b29de4770ad3e62 /Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
parent6c0d576e1d48613f952b56e99e4dd9d59e41a265 (diff)
unicode-math (7jan18)
git-svn-id: svn://tug.org/texlive/trunk@46240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty4940
1 files changed, 2544 insertions, 2396 deletions
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 97ac7035626..d490e0014ae 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
@@ -19,11 +19,13 @@
%% um-code-fontopt.dtx (with options: `package,XE')
%% um-code-fontparam.dtx (with options: `package,XE')
%% um-code-mathmap.dtx (with options: `package,XE')
+%% um-code-sym-commands.dtx (with options: `package,XE')
+%% um-code-alphabets.dtx (with options: `package,XE')
%% um-code-epilogue.dtx (with options: `package,XE')
%% um-code-primes.dtx (with options: `package,XE')
%% um-code-sscript.dtx (with options: `package,XE')
%% um-code-compat.dtx (with options: `package,XE')
-%% um-code-alphabets.dtx (with options: `package,XE')
+%% um-code-amsmath.dtx (with options: `package,XE')
%% ------------------------------------------------
%% The UNICODE-MATH package <wspr.io/unicode-math>
%% ------------------------------------------------
@@ -37,19 +39,27 @@
%% Copyright 2012-2015 Khaled Hosny
%% ------------------------------------------------
%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Metadata for the package code, including files and versioning
\ProvidesPackage{unicode-math-xetex}
- [2017/11/18 v0.8i Unicode maths in XeLaTeX and LuaLaTeX]
+ [2018/01/07 v0.8j Unicode maths in XeLaTeX and LuaLaTeX]
%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Definition of unicode-math.sty, which splits and loads according to engine.
%%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Assorted initialisation tasks, including some low-level function definitions.
\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}
+\cs_generate_variant:Nn \prop_get:NnNTF {cx}
+\cs_generate_variant:Nn \tl_if_eq:nnF {o}
+\cs_set_eq:NN \__um_group_begin: \group_begin:
+\cs_set_eq:NN \__um_group_end: \group_end:
+\cs_set_eq:NN \__um_group_begin_frozen: \__um_group_begin:
+\cs_set_eq:NN \__um_group_end_frozen: \__um_group_end:
\prg_new_conditional:Nnn \__um_glyph_if_exist:Nn {p,TF,T,F}
{
\etex_iffontchar:D #1 #2 \scan_stop:
@@ -58,6 +68,11 @@
\prg_return_false:
\fi:
}
+\cs_set_protected:Nn \__um_fontface_gset_eq:NN
+ {
+ \tex_global:D \tex_let:D #1 #2
+ }
+\cs_generate_variant:Nn \__um_fontface_gset_eq:NN {NV,cV}
\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4
{
\Umathcode \int_eval:n {#1} =
@@ -92,23 +107,27 @@
}
\cs_new:Nn \__um_char_gmake_mathactive:N
{
- \global\mathcode `#1 = "8000 \scan_stop:
+ \tex_global:D \tex_mathcode:D `#1 = "8000 \scan_stop:
}
\cs_new:Nn \__um_char_gmake_mathactive:n
{
- \global\mathcode #1 = "8000 \scan_stop:
+ \tex_global:D \tex_mathcode:D \int_eval:n {#1} = "8000 \scan_stop:
}
-\cs_new:Nn \__um_copy_fontparam:nnn
+\cs_new:Nn \__um_mathactive_remap:nn
{
- \fontdimen #1 \font = \__um_get_fontparam:nn {#2} {#3}
+ \group_begin:
+ \cs_set_protected:Npn \__um_tmp: {#2}
+ \__um_char_gmake_mathactive:n {#1}
+ \char_gset_active_eq:nN {#1} \__um_tmp:
+ \group_end:
}
-\cs_new:Nn \__um_zero_fontparam:n
+\cs_new:Nn \__um_copy_fontdimen:nnN
{
- \fontdimen #1 \font = 0pt\relax
+ \fontdimen #1 \font = \the \fontdimen #2 #3 \relax
}
-\cs_new:Nn \__um_get_fontparam:nn
+\cs_new:Nn \__um_zero_fontdimen:n
{
- \the\fontdimen#1\l__um_font\relax
+ \fontdimen #1 \font = 0pt\relax
}
\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} }
\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } }
@@ -136,13 +155,22 @@
{
\tl_remove_once:Nn \@preamblecmds {\do#1}
}
+\cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} }
+\cs_new:Npn \__um_error:nx { \msg_error:nnx {unicode-math} }
+\cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} }
+\cs_new:Npn \__um_warning:nnn { \msg_warning:nnxx {unicode-math} }
+\cs_new:Npn \__um_log:n { \msg_log:nn {unicode-math} }
+\cs_new:Npn \__um_log:nx { \msg_log:nnx {unicode-math} }
+\cs_generate_variant:Nn \msg_new:nnn {nnx}
+\cs_generate_variant:Nn \msg_new:nnnn {nnxx}
+\cs_new:Nn \__um_msg_new:nn { \msg_new:nnx {unicode-math} {#1} { \tl_trim_spaces:n {#2} } }
%%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Declaration of all code-level variables used in the package.
\bool_new:N \l__um_ot_math_bool
\bool_new:N \l__um_init_bool
\bool_new:N \l__um_implicit_alph_bool
-\bool_new:N \g__um_mainfont_already_set_bool
\bool_new:N \g__um_literal_bool
\bool_new:N \g__um_upLatin_bool
\bool_new:N \g__um_uplatin_bool
@@ -167,6 +195,8 @@
\bool_new:N \g__um_mathsf_text_bool
\bool_new:N \g__um_mathtt_text_bool
\int_new:N \g__um_fam_int
+\int_new:N \g__um_fonts_used_int
+\int_new:N \l__um_primecount_int
\tl_const:Nn \c__um_math_alphabet_name_latin_tl {Latin,~lowercase}
\tl_const:Nn \c__um_math_alphabet_name_Latin_tl {Latin,~uppercase}
\tl_const:Nn \c__um_math_alphabet_name_greek_tl {Greek,~lowercase}
@@ -177,17 +207,30 @@
\tl_new:N \l__um_radicals_tl
\tl_new:N \l__um_nolimits_tl
\tl_new:N \g__um_operator_mathfont_tl
-\seq_new:N \l__um_missing_alph_seq
-\seq_new:N \l__um_mathalph_seq
-\seq_new:N \l__um_char_range_seq
-\seq_new:N \l__um_mclass_range_seq
-\seq_new:N \l__um_cmd_range_seq
-\clist_new:N \g__um_alphabets_seq
-\clist_set:Nn \g__um_alphabets_seq { latin, Latin, greek, Greek, num }
-\clist_new:N \g__um_named_ranges_clist
+\tl_new:N \g__um_slash_delimiter_usv
+\tl_new:N \g__um_mathtable_tl
+\tl_new:N \g__um_fontname_tl
+\tl_new:N \g__um_mversion_tl
+\tl_new:N \g__um_symfont_tl
+\tl_new:N \g__um_font_keyval_tl
+\tl_new:N \g__um_family_tl
+\tl_new:N \g__um_style_tl
+\tl_new:N \g__um_remap_style_tl
+\tl_new:N \l__um_not_token_name_tl
+\tl_new:N \g__um_curr_font_cmd_tl
+\tl_new:N \g__um_sqrt_font_cmd_tl
+\tl_new:N \g__um_prime_font_cmd_tl
\clist_new:N \g__um_char_nrange_clist
\clist_new:N \g__um_unknown_keys_clist
\clist_new:N \g__um_alphabet_clist
+\clist_new:N \g__um_bad_alpha_clist
+\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} }
+\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} }
+\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} }
+\seq_new:N \l__um_missing_alph_seq
+\seq_new:N \g__um_mathalph_seq
+\seq_new:N \g__um_char_range_seq
+\seq_new:N \g__um_mclass_range_seq
\seq_new:N \g__um_mathclasses_seq
\seq_set_from_clist:Nn \g__um_mathclasses_seq
{
@@ -195,29 +238,20 @@
\mathop,
\mathopen,\mathclose,
\mathfence,\mathover,\mathunder,
- \mathaccent,\mathbotaccent,\mathaccentwide,\mathbotaccentwide
+ \mathaccent,\mathaccentoverlay,\mathbotaccent,\mathaccentwide,\mathbotaccentwide
}
-
\seq_new:N \g__um_default_mathalph_seq
-\seq_new:N \g__um_named_ranges_seq
\seq_new:N \g__um_mathstyles_seq
-\muskip_new:N \g__um_primekern_muskip
-\muskip_gset:Nn \g__um_primekern_muskip { -\thinmuskip/2 }% arbitrary
-\int_new:N \l__um_primecount_int
\prop_new:N \g__um_supers_prop
\prop_new:N \g__um_subs_prop
-\tl_new:N \l_not_token_name_tl
-\tl_new:N \g__um_slash_delimiter_usv
-\tl_new:N \g__um_mathtable_tl
-\tl_new:N \g__um_fontname_tl
-\tl_new:N \g__um_mversion_tl
-\tl_new:N \g__um_symfont_tl
-\tl_new:N \g__um_font_keyval_tl
-\tl_new:N \g__um_family_tl
-\tl_new:N \g__um_style_tl
-\tl_new:N \g__um_remap_style_tl
+\muskip_new:N \g__um_primekern_muskip
+\muskip_gset:Nn \g__um_primekern_muskip { -\thinmuskip/2 }% arbitrary
+\fp_new:N \g__um_size_tfsf_fp
+\fp_new:N \g__um_size_sfssf_fp
+\quark_new:N \q_unicode_math
%%^^A%% um-code-api.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% The (underdeveloped) API to interface with the package internals.
\cs_new:Nn \unimath_get_mathstyle:
{
@@ -225,6 +259,7 @@
}
%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% The xparse user interface top-level definitions.
\NewDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} }
\NewDocumentCommand \setmathfont { O{} m O{} }
@@ -251,19 +286,20 @@
}
%%^^A%% um-code-pkgopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Package options.
\cs_new:Nn \__um_keys_choices:nn
- {
- \cs_set:Npn \__um_keys_choices_fn:nn { \__um_keys_choices_aux:nnn {#1} }
- \use:x
- {
- \exp_not:N \keys_define:nn {unicode-math}
- {
- #1 .choice: ,
- \__um_tl_map_dbl:nN {#2} \__um_keys_choices_fn:nn
- }
- }
- }
+ {
+ \cs_set:Npn \__um_keys_choices_fn:nn { \__um_keys_choices_aux:nnn {#1} }
+ \use:x
+ {
+ \exp_not:N \keys_define:nn {unicode-math}
+ {
+ #1 .choice: ,
+ \__um_tl_map_dbl:nN {#2} \__um_keys_choices_fn:nn
+ }
+ }
+ }
\cs_new:Nn \__um_keys_choices_aux:nnn { #1 / #2 .code:n = { \exp_not:n {#3} } , }
\cs_new:Nn \__um_tl_map_dbl:nN
{
@@ -277,37 +313,37 @@
\__um_tl_map_dbl:Nnn #1
}
\__um_keys_choices:nn {mathup}
- {
- {sym} { \bool_set_false:N \g__um_mathrm_text_bool }
- {text} { \bool_set_true:N \g__um_mathrm_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathrm_text_bool }
+ {text} { \bool_set_true:N \g__um_mathrm_text_bool }
+ }
\__um_keys_choices:nn {mathrm}
- {
- {sym} { \bool_set_false:N \g__um_mathrm_text_bool }
- {text} { \bool_set_true:N \g__um_mathrm_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathrm_text_bool }
+ {text} { \bool_set_true:N \g__um_mathrm_text_bool }
+ }
\__um_keys_choices:nn {mathit}
- {
- {sym} { \bool_set_false:N \g__um_mathit_text_bool }
- {text} { \bool_set_true:N \g__um_mathit_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathit_text_bool }
+ {text} { \bool_set_true:N \g__um_mathit_text_bool }
+ }
\__um_keys_choices:nn {mathbf}
- {
- {sym} { \bool_set_false:N \g__um_mathbf_text_bool }
- {text} { \bool_set_true:N \g__um_mathbf_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathbf_text_bool }
+ {text} { \bool_set_true:N \g__um_mathbf_text_bool }
+ }
\__um_keys_choices:nn {mathsf}
- {
- {sym} { \bool_set_false:N \g__um_mathsf_text_bool }
- {text} { \bool_set_true:N \g__um_mathsf_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathsf_text_bool }
+ {text} { \bool_set_true:N \g__um_mathsf_text_bool }
+ }
\__um_keys_choices:nn {mathtt}
- {
- {sym} { \bool_set_false:N \g__um_mathtt_text_bool }
- {text} { \bool_set_true:N \g__um_mathtt_text_bool }
- }
+ {
+ {sym} { \bool_set_false:N \g__um_mathtt_text_bool }
+ {text} { \bool_set_true:N \g__um_mathtt_text_bool }
+ }
\__um_keys_choices:nn {normal-style}
- {
+ {
{ISO} {
\bool_set_false:N \g__um_literal_bool
\bool_set_false:N \g__um_upGreek_bool
@@ -339,9 +375,9 @@
{literal} {
\bool_set_true:N \g__um_literal_bool
}
- }
+ }
\__um_keys_choices:nn {math-style}
- {
+ {
{ISO} {
\unimathsetup { nabla=upright, partial=italic,
normal-style=ISO, bold-style=ISO, sans-style=italic }
@@ -362,9 +398,9 @@
\unimathsetup { colon=literal, nabla=literal, partial=literal,
normal-style=literal, bold-style=literal, sans-style=literal }
}
- }
+ }
\__um_keys_choices:nn {bold-style}
- {
+ {
{ISO} {
\bool_set_false:N \g__um_bfliteral_bool
\bool_set_false:N \g__um_bfupGreek_bool
@@ -389,67 +425,71 @@
{literal} {
\bool_set_true:N \g__um_bfliteral_bool
}
- }
+ }
\__um_keys_choices:nn {sans-style}
- {
- {italic} { \bool_set_false:N \g__um_upsans_bool }
- {upright} { \bool_set_true:N \g__um_upsans_bool }
- {literal} { \bool_set_true:N \g__um_sfliteral_bool }
- }
+ {
+ {italic} { \bool_set_false:N \g__um_upsans_bool }
+ {upright} { \bool_set_true:N \g__um_upsans_bool }
+ {literal} { \bool_set_true:N \g__um_sfliteral_bool }
+ }
\__um_keys_choices:nn {nabla}
- {
- {upright} {
- \bool_set_false:N \g__um_literal_Nabla_bool
- \bool_set_true:N \g__um_upNabla_bool
- }
- {italic} {
- \bool_set_false:N \g__um_literal_Nabla_bool
- \bool_set_false:N \g__um_upNabla_bool
- }
- {literal} { \bool_set_true:N \g__um_literal_Nabla_bool }
- }
+ {
+ {upright} {
+ \bool_set_false:N \g__um_literal_Nabla_bool
+ \bool_set_true:N \g__um_upNabla_bool
+ }
+ {italic} {
+ \bool_set_false:N \g__um_literal_Nabla_bool
+ \bool_set_false:N \g__um_upNabla_bool
+ }
+ {literal} {
+ \bool_set_true:N \g__um_literal_Nabla_bool
+ }
+ }
\__um_keys_choices:nn {partial}
- {
- {upright} {
- \bool_set_false:N \g__um_literal_partial_bool
- \bool_set_true:N \g__um_uppartial_bool
- }
- {italic} {
- \bool_set_false:N \g__um_literal_partial_bool
- \bool_set_false:N \g__um_uppartial_bool
- }
- {literal} { \bool_set_true:N \g__um_literal_partial_bool }
- }
+ {
+ {upright} {
+ \bool_set_false:N \g__um_literal_partial_bool
+ \bool_set_true:N \g__um_uppartial_bool
+ }
+ {italic} {
+ \bool_set_false:N \g__um_literal_partial_bool
+ \bool_set_false:N \g__um_uppartial_bool
+ }
+ {literal} {
+ \bool_set_true:N \g__um_literal_partial_bool
+ }
+ }
\__um_keys_choices:nn {colon}
- {
- {literal} { \bool_set_true:N \g__um_literal_colon_bool }
- {TeX} { \bool_set_false:N \g__um_literal_colon_bool }
- }
+ {
+ {literal} { \bool_set_true:N \g__um_literal_colon_bool }
+ {TeX} { \bool_set_false:N \g__um_literal_colon_bool }
+ }
\__um_keys_choices:nn {slash-delimiter}
- {
- {ascii} { \tl_set:Nn \g__um_slash_delimiter_usv {"002F} }
- {frac} { \tl_set:Nn \g__um_slash_delimiter_usv {"2044} }
- {div} { \tl_set:Nn \g__um_slash_delimiter_usv {"2215} }
- }
+ {
+ {ascii} { \tl_set:Nn \g__um_slash_delimiter_usv {"002F} }
+ {frac} { \tl_set:Nn \g__um_slash_delimiter_usv {"2044} }
+ {div} { \tl_set:Nn \g__um_slash_delimiter_usv {"2215} }
+ }
\__um_keys_choices:nn {active-frac}
- {
- {small}
- {
- \cs_if_exist:NTF \tfrac
- { \bool_set_true:N \l__um_smallfrac_bool }
- {
- \__um_warning:n {no-tfrac}
- \bool_set_false:N \l__um_smallfrac_bool
- }
- \use:c {__um_setup_active_frac:}
- }
+ {
+ {small}
+ {
+ \cs_if_exist:NTF \tfrac
+ { \bool_set_true:N \l__um_smallfrac_bool }
+ {
+ \__um_warning:n {no-tfrac}
+ \bool_set_false:N \l__um_smallfrac_bool
+ }
+ \use:c {__um_setup_active_frac:}
+ }
- {normalsize}
- {
- \bool_set_false:N \l__um_smallfrac_bool
- \use:c {__um_setup_active_frac:}
- }
- }
+ {normalsize}
+ {
+ \bool_set_false:N \l__um_smallfrac_bool
+ \use:c {__um_setup_active_frac:}
+ }
+ }
\keys_define:nn {unicode-math}
{
warnings-off .code:n =
@@ -459,11 +499,11 @@
}
}
\__um_keys_choices:nn {trace}
- {
- {on} {} % default
- {debug} { \msg_redirect_module:nnn { unicode-math } { log } { warning } }
- {off} { \msg_redirect_module:nnn { unicode-math } { log } { none } }
- }
+ {
+ {on} {} % default
+ {debug} { \msg_redirect_module:nnn { unicode-math } { log } { warning } }
+ {off} { \msg_redirect_module:nnn { unicode-math } { log } { none } }
+ }
\unimathsetup {math-style=TeX}
\unimathsetup {slash-delimiter=ascii}
\unimathsetup {trace=off}
@@ -472,348 +512,362 @@
\ProcessKeysOptions {unicode-math}
%%^^A%% um-code-msg.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Definitions of error, warning, and log messages.
-\cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} }
-\cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} }
-\cs_new:Npn \__um_warning:nnn { \msg_warning:nnxx {unicode-math} }
-\cs_new:Npn \__um_log:n { \msg_log:nn {unicode-math} }
-\cs_new:Npn \__um_log:nx { \msg_log:nnx {unicode-math} }
-\msg_new:nnn {unicode-math} {no-tfrac}
+\char_set_catcode_space:n {32}
+\__um_msg_new:nn {no-tfrac}
{
- Small~ fraction~ command~ \protect\tfrac\ not~ defined.\\
- Load~ amsmath~ or~ define~ it~ manually~ before~ loading~ unicode-math.
+ Small fraction command \protect\tfrac\ not defined.\\
+ Load amsmath or define it manually before loading unicode-math.
}
-\msg_new:nnn {unicode-math} {default-math-font}
+\__um_msg_new:nn {default-math-font}
{
- Defining~ the~ default~ maths~ font~ as~ '\l__um_fontname_tl'.
+ Defining the default maths font as '\l__um_fontname_tl'.
}
-\msg_new:nnn {unicode-math} {setup-implicit}
+\__um_msg_new:nn {setup-implicit}
{
- Setup~ alphabets:~ implicit~ mode.
+ Setup alphabets: implicit mode.
}
-\msg_new:nnn {unicode-math} {setup-explicit}
+\__um_msg_new:nn {setup-explicit}
{
- Setup~ alphabets:~ explicit~ mode.
+ Setup alphabets: explicit mode.
}
-\msg_new:nnn {unicode-math} {alph-initialise}
+\__um_msg_new:nn {alph-initialise}
{
- Initialising~ \@backslashchar math#1.
+ Initialising \@backslashchar math#1.
}
-\msg_new:nnn {unicode-math} {setup-alph}
+\__um_msg_new:nn {setup-alph}
{
- Setup~ alphabet:~ #1.
+ Setup alphabet: #1.
}
-\msg_new:nnn {unicode-math} {no-alphabet}
+\__um_msg_new:nn {no-alphabet}
{
- I~ am~ trying~ to~ set~ up~ alphabet~"#1"~ but~ there~ are~ no~ configuration~ settings~ for~ it.~
- (See~ source~ file~ "unicode-math-alphabets.dtx"~ to~ debug.)
+ I am trying to set up alphabet"#1" but there are no configuration settings for it.
+ (See source file "unicode-math-alphabets.dtx" to debug.)
}
-\msg_new:nnn { unicode-math } { no-named-range }
+\__um_msg_new:nn {no-named-range}
{
- I~ am~ trying~ to~ define~ new~ alphabet~ "#2"~ in~ range~ "#1",~ but~ range~ "#1"~ hasn't~ been~ defined~ yet.
+ I am trying to define new alphabet "#2" in range "#1", but range "#1" hasn't been defined yet.
}
-\msg_new:nnn { unicode-math } { missing-alphabets }
+\__um_msg_new:nn {missing-alphabets}
{
- Missing~math~alphabets~in~font~ "\fontname\l__um_font" \\ \\
+ Missingmathalphabetsinfont "\fontname\g__um_curr_font_cmd_tl" \\ \\
\seq_map_function:NN \l__um_missing_alph_seq \__um_print_indent:n
}
\cs_new:Nn \__um_print_indent:n { \space\space\space\space #1 \\ }
-\msg_new:nnn {unicode-math} {macro-expected}
+\__um_msg_new:nn {macro-expected}
{
- I've~ expected~ that~ #1~ is~ a~ macro,~ but~ it~ isn't.
+ I've expected that #1 is a macro, but it isn't.
}
-\msg_new:nnn {unicode-math} {wrong-meaning}
+\__um_msg_new:nn {wrong-meaning}
{
- I've~ expected~ #1~ to~ have~ the~ meaning~ #3,~ but~ it~ has~ the~ meaning~ #2.
+ I've expected #1 to have the meaning #3, but it has the meaning #2.
}
-\msg_new:nnn {unicode-math} {patch-macro}
+\__um_msg_new:nn {patch-macro}
{
- I'm~ going~ to~ patch~ macro~ #1.
+ I'm going to patch macro #1.
}
-\msg_new:nnn { unicode-math } { mathtools-overbracket } {
- Using~ \token_to_str:N \overbracket\ and~
- \token_to_str:N \underbracket\ from~
- `mathtools'~ package.\\
+\__um_msg_new:nn {mathtools-overbracket} {
+ Using \token_to_str:N \overbracket\ and
+ \token_to_str:N \underbracket\ from
+ `mathtools' package.\\
\\
- Use~ \token_to_str:N \Uoverbracket\ and~
- \token_to_str:N \Uunderbracket\ for~
- original~ `unicode-math'~ definition.
+ Use \token_to_str:N \Uoverbracket\ and
+ \token_to_str:N \Uunderbracket\ for
+ original `unicode-math' definition.
}
-\msg_new:nnn { unicode-math } { mathtools-colon } {
- I'm~ going~ to~ overwrite~ the~ following~ commands~ from~
- the~ `mathtools'~ package: \\ \\
- \ \ \ \ \token_to_str:N \dblcolon,~
- \token_to_str:N \coloneqq,~
- \token_to_str:N \Coloneqq,~
+\__um_msg_new:nn {mathtools-colon} {
+ I'm going to overwrite the following commands from
+ the `mathtools' package: \\ \\
+ \ \ \ \ \token_to_str:N \dblcolon,
+ \token_to_str:N \coloneqq,
+ \token_to_str:N \Coloneqq,
\token_to_str:N \eqqcolon. \\ \\
- Note~ that~ since~ I~ won't~ overwrite~ the~ other~ colon-like~
- commands,~ using~ them~ will~ lead~ to~ inconsistencies.
+ Note that since I won't overwrite the other colon-like
+ commands, using them will lead to inconsistencies.
}
-\msg_new:nnn { unicode-math } { colonequals } {
- I'm~ going~ to~ overwrite~ the~ following~ commands~ from~
- the~ `colonequals'~ package: \\ \\
- \ \ \ \ \token_to_str:N \ratio,~
- \token_to_str:N \coloncolon,~
+\__um_msg_new:nn {colonequals} {
+ I'm going to overwrite the following commands from
+ the `colonequals' package: \\ \\
+ \ \ \ \ \token_to_str:N \ratio,
+ \token_to_str:N \coloncolon,
\token_to_str:N \minuscolon, \\
- \ \ \ \ \token_to_str:N \colonequals,~
- \token_to_str:N \equalscolon,~
+ \ \ \ \ \token_to_str:N \colonequals,
+ \token_to_str:N \equalscolon,
\token_to_str:N \coloncolonequals. \\ \\
- Note~ that~ since~ I~ won't~ overwrite~ the~ other~ colon-like~
- commands,~ using~ them~ will~ lead~ to~ inconsistencies.~
- Furthermore,~ changing~ \token_to_str:N \colonsep \c_space_tl
- or~ \token_to_str:N \doublecolonsep \c_space_tl won't~ have~
- any~ effect~ on~ the~ re-defined~ commands.
+ Note that since I won't overwrite the other colon-like
+ commands, using them will lead to inconsistencies.
+ Furthermore, changing \token_to_str:N \colonsep \c_space_tl
+ or \token_to_str:N \doublecolonsep \c_space_tl won't have
+ any effect on the re-defined commands.
}
+\__um_msg_new:nn {bad-cs-in-range}
+ {
+ Command `#1` in math range is not recognised as a maths symbol.
+ Check file "unicode-math-table.tex" for allowable commands.
+ }
+\__um_msg_new:nn {legacy-char-not-supported}
+ {
+ Command `#1` is a legacy maths symbol that is not supported by unicode-math.
+ }
+\__um_msg_new:nn {range-not-bf-sf}
+ {
+ Range alphabets cannot include alphabets referring to `bf`, `sf`, or `bfsf`
+ since they relate to input commands not output glyphs.
+ Use `bfit` or `bfup` (etc.) to specify which.
+ }
+\char_set_catcode_ignore:n {32}
%%^^A%% um-code-usv.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
-
-\usv_set:nnn {normal} {num} {48}
-\usv_set:nnn {normal} {Latin}{"1D434}
-\usv_set:nnn {normal} {latin}{"1D44E}
-\usv_set:nnn {normal} {Greek}{"1D6E2}
-\usv_set:nnn {normal} {greek}{"1D6FC}
-\usv_set:nnn {normal}{varTheta} {"1D6F3}
-\usv_set:nnn {normal}{epsilon}{"1D716}
-\usv_set:nnn {normal}{vartheta} {"1D717}
-\usv_set:nnn {normal}{varkappa} {"1D718}
-\usv_set:nnn {normal}{phi} {"1D719}
-\usv_set:nnn {normal}{varrho} {"1D71A}
-\usv_set:nnn {normal}{varpi} {"1D71B}
-\usv_set:nnn {normal} {Nabla}{"1D6FB}
-\usv_set:nnn {normal} {partial}{"1D715}
-
-\usv_set:nnn {up} {num} {48}
-\usv_set:nnn {up} {Latin}{65}
-\usv_set:nnn {up} {latin}{97}
-\usv_set:nnn {up} {Greek}{"391}
-\usv_set:nnn {up} {greek}{"3B1}
-\usv_set:nnn {it} {Latin}{"1D434}
-\usv_set:nnn {it} {latin}{"1D44E}
-\usv_set:nnn {it} {Greek}{"1D6E2}
-\usv_set:nnn {it} {greek}{"1D6FC}
-\usv_set:nnn {bb} {num} {"1D7D8}
-\usv_set:nnn {bb} {Latin}{"1D538}
-\usv_set:nnn {bb} {latin}{"1D552}
-\usv_set:nnn {scr} {Latin}{"1D49C}
-\usv_set:nnn {cal} {Latin}{"1D49C}
-\usv_set:nnn {scr} {latin}{"1D4B6}
-\usv_set:nnn {frak}{Latin}{"1D504}
-\usv_set:nnn {frak}{latin}{"1D51E}
-\usv_set:nnn {sf} {num} {"1D7E2}
-\usv_set:nnn {sfup}{num} {"1D7E2}
-\usv_set:nnn {sfit}{num} {"1D7E2}
-\usv_set:nnn {sfup}{Latin}{"1D5A0}
-\usv_set:nnn {sf} {Latin}{"1D5A0}
-\usv_set:nnn {sfup}{latin}{"1D5BA}
-\usv_set:nnn {sf} {latin}{"1D5BA}
-\usv_set:nnn {sfit}{Latin}{"1D608}
-\usv_set:nnn {sfit}{latin}{"1D622}
-\usv_set:nnn {tt} {num} {"1D7F6}
-\usv_set:nnn {tt} {Latin}{"1D670}
-\usv_set:nnn {tt} {latin}{"1D68A}
-\usv_set:nnn {bf} {num} {"1D7CE}
-\usv_set:nnn {bfup} {num} {"1D7CE}
-\usv_set:nnn {bfit} {num} {"1D7CE}
-\usv_set:nnn {bfup} {Latin}{"1D400}
-\usv_set:nnn {bfup} {latin}{"1D41A}
-\usv_set:nnn {bfup} {Greek}{"1D6A8}
-\usv_set:nnn {bfup} {greek}{"1D6C2}
-\usv_set:nnn {bfit} {Latin}{"1D468}
-\usv_set:nnn {bfit} {latin}{"1D482}
-\usv_set:nnn {bfit} {Greek}{"1D71C}
-\usv_set:nnn {bfit} {greek}{"1D736}
-\usv_set:nnn {bffrak}{Latin}{"1D56C}
-\usv_set:nnn {bffrak}{latin}{"1D586}
-\usv_set:nnn {bfscr} {Latin}{"1D4D0}
-\usv_set:nnn {bfcal} {Latin}{"1D4D0}
-\usv_set:nnn {bfscr} {latin}{"1D4EA}
-\usv_set:nnn {bfsf} {num} {"1D7EC}
-\usv_set:nnn {bfsfup}{num} {"1D7EC}
-\usv_set:nnn {bfsfit}{num} {"1D7EC}
-\usv_set:nnn {bfsfup}{Latin}{"1D5D4}
-\usv_set:nnn {bfsfup}{latin}{"1D5EE}
-\usv_set:nnn {bfsfup}{Greek}{"1D756}
-\usv_set:nnn {bfsfup}{greek}{"1D770}
-\usv_set:nnn {bfsfit}{Latin}{"1D63C}
-\usv_set:nnn {bfsfit}{latin}{"1D656}
-\usv_set:nnn {bfsfit}{Greek}{"1D790}
-\usv_set:nnn {bfsfit}{greek}{"1D7AA}
-\usv_set:nnn {bfsf}{Latin}{ \bool_if:NTF \g__um_upLatin_bool \g__um_bfsfup_Latin_usv \g__um_bfsfit_Latin_usv }
-\usv_set:nnn {bfsf}{latin}{ \bool_if:NTF \g__um_uplatin_bool \g__um_bfsfup_latin_usv \g__um_bfsfit_latin_usv }
-\usv_set:nnn {bfsf}{Greek}{ \bool_if:NTF \g__um_upGreek_bool \g__um_bfsfup_Greek_usv \g__um_bfsfit_Greek_usv }
-\usv_set:nnn {bfsf}{greek}{ \bool_if:NTF \g__um_upgreek_bool \g__um_bfsfup_greek_usv \g__um_bfsfit_greek_usv }
-\usv_set:nnn {bf} {Latin}{ \bool_if:NTF \g__um_bfupLatin_bool \g__um_bfup_Latin_usv \g__um_bfit_Latin_usv }
-\usv_set:nnn {bf} {latin}{ \bool_if:NTF \g__um_bfuplatin_bool \g__um_bfup_latin_usv \g__um_bfit_latin_usv }
-\usv_set:nnn {bf} {Greek}{ \bool_if:NTF \g__um_bfupGreek_bool \g__um_bfup_Greek_usv \g__um_bfit_Greek_usv }
-\usv_set:nnn {bf} {greek}{ \bool_if:NTF \g__um_bfupgreek_bool \g__um_bfup_greek_usv \g__um_bfit_greek_usv }
-\usv_set:nnn {up}{varTheta} {"3F4}
-\usv_set:nnn {up}{Digamma} {"3DC}
-\usv_set:nnn {up}{epsilon}{"3F5}
-\usv_set:nnn {up}{vartheta} {"3D1}
-\usv_set:nnn {up}{varkappa} {"3F0}
-\usv_set:nnn {up}{phi} {"3D5}
-\usv_set:nnn {up}{varrho} {"3F1}
-\usv_set:nnn {up}{varpi} {"3D6}
-\usv_set:nnn {up}{digamma} {"3DD}
-\usv_set:nnn {bfup}{varTheta} {"1D6B9}
-\usv_set:nnn {bfup}{Digamma} {"1D7CA}
-\usv_set:nnn {bfup}{epsilon}{"1D6DC}
-\usv_set:nnn {bfup}{vartheta} {"1D6DD}
-\usv_set:nnn {bfup}{varkappa} {"1D6DE}
-\usv_set:nnn {bfup}{phi} {"1D6DF}
-\usv_set:nnn {bfup}{varrho} {"1D6E0}
-\usv_set:nnn {bfup}{varpi} {"1D6E1}
-\usv_set:nnn {bfup}{digamma} {"1D7CB}
-\usv_set:nnn {it}{varTheta} {"1D6F3}
-\usv_set:nnn {it}{epsilon}{"1D716}
-\usv_set:nnn {it}{vartheta} {"1D717}
-\usv_set:nnn {it}{varkappa} {"1D718}
-\usv_set:nnn {it}{phi} {"1D719}
-\usv_set:nnn {it}{varrho} {"1D71A}
-\usv_set:nnn {it}{varpi} {"1D71B}
-\usv_set:nnn {bfit}{varTheta} {"1D72D}
-\usv_set:nnn {bfit}{epsilon}{"1D750}
-\usv_set:nnn {bfit}{vartheta} {"1D751}
-\usv_set:nnn {bfit}{varkappa} {"1D752}
-\usv_set:nnn {bfit}{phi} {"1D753}
-\usv_set:nnn {bfit}{varrho} {"1D754}
-\usv_set:nnn {bfit}{varpi} {"1D755}
-\usv_set:nnn {bfsfup}{varTheta} {"1D767}
-\usv_set:nnn {bfsfup}{epsilon}{"1D78A}
-\usv_set:nnn {bfsfup}{vartheta} {"1D78B}
-\usv_set:nnn {bfsfup}{varkappa} {"1D78C}
-\usv_set:nnn {bfsfup}{phi} {"1D78D}
-\usv_set:nnn {bfsfup}{varrho} {"1D78E}
-\usv_set:nnn {bfsfup}{varpi} {"1D78F}
-\usv_set:nnn {bfsfit}{varTheta} {"1D7A1}
-\usv_set:nnn {bfsfit}{epsilon}{"1D7C4}
-\usv_set:nnn {bfsfit}{vartheta} {"1D7C5}
-\usv_set:nnn {bfsfit}{varkappa} {"1D7C6}
-\usv_set:nnn {bfsfit}{phi} {"1D7C7}
-\usv_set:nnn {bfsfit}{varrho} {"1D7C8}
-\usv_set:nnn {bfsfit}{varpi} {"1D7C9}
-\usv_set:nnn {up} {Nabla}{"02207}
-\usv_set:nnn {it} {Nabla}{"1D6FB}
-\usv_set:nnn {bfup} {Nabla}{"1D6C1}
-\usv_set:nnn {bfit} {Nabla}{"1D735}
-\usv_set:nnn {bfsfup}{Nabla}{"1D76F}
-\usv_set:nnn {bfsfit}{Nabla}{"1D7A9}
-\usv_set:nnn {up} {partial}{"02202}
-\usv_set:nnn {it} {partial}{"1D715}
-\usv_set:nnn {bfup} {partial}{"1D6DB}
-\usv_set:nnn {bfit} {partial}{"1D74F}
-\usv_set:nnn {bfsfup}{partial}{"1D789}
-\usv_set:nnn {bfsfit}{partial}{"1D7C3}
-\usv_set:nnn {up}{B}{`\B}
-\usv_set:nnn {up}{C}{`\C}
-\usv_set:nnn {up}{D}{`\D}
-\usv_set:nnn {up}{E}{`\E}
-\usv_set:nnn {up}{F}{`\F}
-\usv_set:nnn {up}{H}{`\H}
-\usv_set:nnn {up}{I}{`\I}
-\usv_set:nnn {up}{L}{`\L}
-\usv_set:nnn {up}{M}{`\M}
-\usv_set:nnn {up}{N}{`\N}
-\usv_set:nnn {up}{P}{`\P}
-\usv_set:nnn {up}{Q}{`\Q}
-\usv_set:nnn {up}{R}{`\R}
-\usv_set:nnn {up}{Z}{`\Z}
-\usv_set:nnn {it}{B}{"1D435}
-\usv_set:nnn {it}{C}{"1D436}
-\usv_set:nnn {it}{D}{"1D437}
-\usv_set:nnn {it}{E}{"1D438}
-\usv_set:nnn {it}{F}{"1D439}
-\usv_set:nnn {it}{H}{"1D43B}
-\usv_set:nnn {it}{I}{"1D43C}
-\usv_set:nnn {it}{L}{"1D43F}
-\usv_set:nnn {it}{M}{"1D440}
-\usv_set:nnn {it}{N}{"1D441}
-\usv_set:nnn {it}{P}{"1D443}
-\usv_set:nnn {it}{Q}{"1D444}
-\usv_set:nnn {it}{R}{"1D445}
-\usv_set:nnn {it}{Z}{"1D44D}
-\usv_set:nnn {up}{d}{`\d}
-\usv_set:nnn {up}{e}{`\e}
-\usv_set:nnn {up}{g}{`\g}
-\usv_set:nnn {up}{h}{`\h}
-\usv_set:nnn {up}{i}{`\i}
-\usv_set:nnn {up}{j}{`\j}
-\usv_set:nnn {up}{o}{`\o}
-\usv_set:nnn {it}{d}{"1D451}
-\usv_set:nnn {it}{e}{"1D452}
-\usv_set:nnn {it}{g}{"1D454}
-\usv_set:nnn {it}{h}{"0210E}
-\usv_set:nnn {it}{i}{"1D456}
-\usv_set:nnn {it}{j}{"1D457}
-\usv_set:nnn {it}{o}{"1D45C}
-\usv_set:nnn {bb} {h}{"1D559}
-\usv_set:nnn {tt} {h}{"1D691}
-\usv_set:nnn {scr} {h}{"1D4BD}
-\usv_set:nnn {frak} {h}{"1D525}
-\usv_set:nnn {bfup} {h}{"1D421}
-\usv_set:nnn {bfit} {h}{"1D489}
-\usv_set:nnn {sfup} {h}{"1D5C1}
-\usv_set:nnn {sfit} {h}{"1D629}
-\usv_set:nnn {bffrak}{h}{"1D58D}
-\usv_set:nnn {bfscr} {h}{"1D4F1}
-\usv_set:nnn {bfsfup}{h}{"1D5F5}
-\usv_set:nnn {bfsfit}{h}{"1D65D}
-\usv_set:nnn {up}{dotlessi}{"00131}
-\usv_set:nnn {up}{dotlessj}{"00237}
-\usv_set:nnn {it}{dotlessi}{"1D6A4}
-\usv_set:nnn {it}{dotlessj}{"1D6A5}
-\usv_set:nnn {bb}{C}{"2102}
-\usv_set:nnn {bb}{H}{"210D}
-\usv_set:nnn {bb}{N}{"2115}
-\usv_set:nnn {bb}{P}{"2119}
-\usv_set:nnn {bb}{Q}{"211A}
-\usv_set:nnn {bb}{R}{"211D}
-\usv_set:nnn {bb}{Z}{"2124}
-\usv_set:nnn {up}{Pi} {"003A0}
-\usv_set:nnn {up}{pi} {"003C0}
-\usv_set:nnn {up}{Gamma} {"00393}
-\usv_set:nnn {up}{gamma} {"003B3}
-\usv_set:nnn {up}{summation}{"02211}
-\usv_set:nnn {it}{Pi} {"1D6F1}
-\usv_set:nnn {it}{pi} {"1D70B}
-\usv_set:nnn {it}{Gamma} {"1D6E4}
-\usv_set:nnn {it}{gamma} {"1D6FE}
-\usv_set:nnn {bb}{Pi} {"0213F}
-\usv_set:nnn {bb}{pi} {"0213C}
-\usv_set:nnn {bb}{Gamma} {"0213E}
-\usv_set:nnn {bb}{gamma} {"0213D}
-\usv_set:nnn {bb}{summation}{"02140}
-\usv_set:nnn {bbit}{D}{"2145}
-\usv_set:nnn {bbit}{d}{"2146}
-\usv_set:nnn {bbit}{e}{"2147}
-\usv_set:nnn {bbit}{i}{"2148}
-\usv_set:nnn {bbit}{j}{"2149}
-\usv_set:nnn {scr}{B}{"212C}
-\usv_set:nnn {scr}{E}{"2130}
-\usv_set:nnn {scr}{F}{"2131}
-\usv_set:nnn {scr}{H}{"210B}
-\usv_set:nnn {scr}{I}{"2110}
-\usv_set:nnn {scr}{L}{"2112}
-\usv_set:nnn {scr}{M}{"2133}
-\usv_set:nnn {scr}{R}{"211B}
-\usv_set:nnn {scr}{e}{"212F}
-\usv_set:nnn {scr}{g}{"210A}
-\usv_set:nnn {scr}{o}{"2134}
-\usv_set:nnn {cal}{B}{"212C}
-\usv_set:nnn {cal}{E}{"2130}
-\usv_set:nnn {cal}{F}{"2131}
-\usv_set:nnn {cal}{H}{"210B}
-\usv_set:nnn {cal}{I}{"2110}
-\usv_set:nnn {cal}{L}{"2112}
-\usv_set:nnn {cal}{M}{"2133}
-\usv_set:nnn {cal}{R}{"211B}
-\usv_set:nnn {frak}{C}{"212D}
-\usv_set:nnn {frak}{H}{"210C}
-\usv_set:nnn {frak}{I}{"2111}
-\usv_set:nnn {frak}{R}{"211C}
-\usv_set:nnn {frak}{Z}{"2128}
+%%^^A%% Mapping of mathematical unicode slots for alphabets.
+
+\usv_set:nnn {normal} {num} {48}
+\usv_set:nnn {normal} {Latin} {"1D434}
+\usv_set:nnn {normal} {latin} {"1D44E}
+\usv_set:nnn {normal} {Greek} {"1D6E2}
+\usv_set:nnn {normal} {greek} {"1D6FC}
+\usv_set:nnn {normal} {varTheta} {"1D6F3}
+\usv_set:nnn {normal} {epsilon} {"1D716}
+\usv_set:nnn {normal} {vartheta} {"1D717}
+\usv_set:nnn {normal} {varkappa} {"1D718}
+\usv_set:nnn {normal} {phi} {"1D719}
+\usv_set:nnn {normal} {varrho} {"1D71A}
+\usv_set:nnn {normal} {varpi} {"1D71B}
+\usv_set:nnn {normal} {Nabla} {"1D6FB}
+\usv_set:nnn {normal} {partial} {"1D715}
+\usv_set:nnn {up} {num} {48}
+\usv_set:nnn {up} {Latin} {65}
+\usv_set:nnn {up} {latin} {97}
+\usv_set:nnn {up} {Greek} {"391}
+\usv_set:nnn {up} {greek} {"3B1}
+\usv_set:nnn {it} {Latin} {"1D434}
+\usv_set:nnn {it} {latin} {"1D44E}
+\usv_set:nnn {it} {Greek} {"1D6E2}
+\usv_set:nnn {it} {greek} {"1D6FC}
+\usv_set:nnn {bb} {num} {"1D7D8}
+\usv_set:nnn {bb} {Latin} {"1D538}
+\usv_set:nnn {bb} {latin} {"1D552}
+\usv_set:nnn {scr} {Latin} {"1D49C}
+\usv_set:nnn {cal} {Latin} {"1D49C}
+\usv_set:nnn {scr} {latin} {"1D4B6}
+\usv_set:nnn {frak} {Latin} {"1D504}
+\usv_set:nnn {frak} {latin} {"1D51E}
+\usv_set:nnn {sf} {num} {"1D7E2}
+\usv_set:nnn {sfup} {num} {"1D7E2}
+\usv_set:nnn {sfit} {num} {"1D7E2}
+\usv_set:nnn {sfup} {Latin} {"1D5A0}
+\usv_set:nnn {sf} {Latin} {"1D5A0}
+\usv_set:nnn {sfup} {latin} {"1D5BA}
+\usv_set:nnn {sf} {latin} {"1D5BA}
+\usv_set:nnn {sfit} {Latin} {"1D608}
+\usv_set:nnn {sfit} {latin} {"1D622}
+\usv_set:nnn {tt} {num} {"1D7F6}
+\usv_set:nnn {tt} {Latin} {"1D670}
+\usv_set:nnn {tt} {latin} {"1D68A}
+\usv_set:nnn {bf} {num} {"1D7CE}
+\usv_set:nnn {bfup} {num} {"1D7CE}
+\usv_set:nnn {bfit} {num} {"1D7CE}
+\usv_set:nnn {bfup} {Latin} {"1D400}
+\usv_set:nnn {bfup} {latin} {"1D41A}
+\usv_set:nnn {bfup} {Greek} {"1D6A8}
+\usv_set:nnn {bfup} {greek} {"1D6C2}
+\usv_set:nnn {bfit} {Latin} {"1D468}
+\usv_set:nnn {bfit} {latin} {"1D482}
+\usv_set:nnn {bfit} {Greek} {"1D71C}
+\usv_set:nnn {bfit} {greek} {"1D736}
+\usv_set:nnn {bffrak} {Latin} {"1D56C}
+\usv_set:nnn {bffrak} {latin} {"1D586}
+\usv_set:nnn {bfscr} {Latin} {"1D4D0}
+\usv_set:nnn {bfcal} {Latin} {"1D4D0}
+\usv_set:nnn {bfscr} {latin} {"1D4EA}
+\usv_set:nnn {bfsf} {num} {"1D7EC}
+\usv_set:nnn {bfsfup} {num} {"1D7EC}
+\usv_set:nnn {bfsfit} {num} {"1D7EC}
+\usv_set:nnn {bfsfup} {Latin} {"1D5D4}
+\usv_set:nnn {bfsfup} {latin} {"1D5EE}
+\usv_set:nnn {bfsfup} {Greek} {"1D756}
+\usv_set:nnn {bfsfup} {greek} {"1D770}
+\usv_set:nnn {bfsfit} {Latin} {"1D63C}
+\usv_set:nnn {bfsfit} {latin} {"1D656}
+\usv_set:nnn {bfsfit} {Greek} {"1D790}
+\usv_set:nnn {bfsfit} {greek} {"1D7AA}
+\usv_set:nnn {bfsf} {Latin} { \bool_if:NTF \g__um_upLatin_bool \g__um_bfsfup_Latin_usv \g__um_bfsfit_Latin_usv }
+\usv_set:nnn {bfsf} {latin} { \bool_if:NTF \g__um_uplatin_bool \g__um_bfsfup_latin_usv \g__um_bfsfit_latin_usv }
+\usv_set:nnn {bfsf} {Greek} { \bool_if:NTF \g__um_upGreek_bool \g__um_bfsfup_Greek_usv \g__um_bfsfit_Greek_usv }
+\usv_set:nnn {bfsf} {greek} { \bool_if:NTF \g__um_upgreek_bool \g__um_bfsfup_greek_usv \g__um_bfsfit_greek_usv }
+\usv_set:nnn {bf} {Latin} { \bool_if:NTF \g__um_bfupLatin_bool \g__um_bfup_Latin_usv \g__um_bfit_Latin_usv }
+\usv_set:nnn {bf} {latin} { \bool_if:NTF \g__um_bfuplatin_bool \g__um_bfup_latin_usv \g__um_bfit_latin_usv }
+\usv_set:nnn {bf} {Greek} { \bool_if:NTF \g__um_bfupGreek_bool \g__um_bfup_Greek_usv \g__um_bfit_Greek_usv }
+\usv_set:nnn {bf} {greek} { \bool_if:NTF \g__um_bfupgreek_bool \g__um_bfup_greek_usv \g__um_bfit_greek_usv }
+\usv_set:nnn {up} {varTheta} {"3F4}
+\usv_set:nnn {up} {Digamma} {"3DC}
+\usv_set:nnn {up} {epsilon} {"3F5}
+\usv_set:nnn {up} {vartheta} {"3D1}
+\usv_set:nnn {up} {varkappa} {"3F0}
+\usv_set:nnn {up} {phi} {"3D5}
+\usv_set:nnn {up} {varrho} {"3F1}
+\usv_set:nnn {up} {varpi} {"3D6}
+\usv_set:nnn {up} {digamma} {"3DD}
+\usv_set:nnn {bfup} {varTheta} {"1D6B9}
+\usv_set:nnn {bfup} {Digamma} {"1D7CA}
+\usv_set:nnn {bfup} {epsilon} {"1D6DC}
+\usv_set:nnn {bfup} {vartheta} {"1D6DD}
+\usv_set:nnn {bfup} {varkappa} {"1D6DE}
+\usv_set:nnn {bfup} {phi} {"1D6DF}
+\usv_set:nnn {bfup} {varrho} {"1D6E0}
+\usv_set:nnn {bfup} {varpi} {"1D6E1}
+\usv_set:nnn {bfup} {digamma} {"1D7CB}
+\usv_set:nnn {it} {varTheta} {"1D6F3}
+\usv_set:nnn {it} {epsilon} {"1D716}
+\usv_set:nnn {it} {vartheta} {"1D717}
+\usv_set:nnn {it} {varkappa} {"1D718}
+\usv_set:nnn {it} {phi} {"1D719}
+\usv_set:nnn {it} {varrho} {"1D71A}
+\usv_set:nnn {it} {varpi} {"1D71B}
+\usv_set:nnn {bfit} {varTheta} {"1D72D}
+\usv_set:nnn {bfit} {epsilon} {"1D750}
+\usv_set:nnn {bfit} {vartheta} {"1D751}
+\usv_set:nnn {bfit} {varkappa} {"1D752}
+\usv_set:nnn {bfit} {phi} {"1D753}
+\usv_set:nnn {bfit} {varrho} {"1D754}
+\usv_set:nnn {bfit} {varpi} {"1D755}
+\usv_set:nnn {bfsfup} {varTheta} {"1D767}
+\usv_set:nnn {bfsfup} {epsilon} {"1D78A}
+\usv_set:nnn {bfsfup} {vartheta} {"1D78B}
+\usv_set:nnn {bfsfup} {varkappa} {"1D78C}
+\usv_set:nnn {bfsfup} {phi} {"1D78D}
+\usv_set:nnn {bfsfup} {varrho} {"1D78E}
+\usv_set:nnn {bfsfup} {varpi} {"1D78F}
+\usv_set:nnn {bfsfit} {varTheta} {"1D7A1}
+\usv_set:nnn {bfsfit} {epsilon} {"1D7C4}
+\usv_set:nnn {bfsfit} {vartheta} {"1D7C5}
+\usv_set:nnn {bfsfit} {varkappa} {"1D7C6}
+\usv_set:nnn {bfsfit} {phi} {"1D7C7}
+\usv_set:nnn {bfsfit} {varrho} {"1D7C8}
+\usv_set:nnn {bfsfit} {varpi} {"1D7C9}
+\usv_set:nnn {up} {Nabla} {"02207}
+\usv_set:nnn {it} {Nabla} {"1D6FB}
+\usv_set:nnn {bfup} {Nabla} {"1D6C1}
+\usv_set:nnn {bfit} {Nabla} {"1D735}
+\usv_set:nnn {bfsfup} {Nabla} {"1D76F}
+\usv_set:nnn {bfsfit} {Nabla} {"1D7A9}
+\usv_set:nnn {up} {partial} {"02202}
+\usv_set:nnn {it} {partial} {"1D715}
+\usv_set:nnn {bfup} {partial} {"1D6DB}
+\usv_set:nnn {bfit} {partial} {"1D74F}
+\usv_set:nnn {bfsfup} {partial} {"1D789}
+\usv_set:nnn {bfsfit} {partial} {"1D7C3}
+\usv_set:nnn {up} {B} {`\B}
+\usv_set:nnn {up} {C} {`\C}
+\usv_set:nnn {up} {D} {`\D}
+\usv_set:nnn {up} {E} {`\E}
+\usv_set:nnn {up} {F} {`\F}
+\usv_set:nnn {up} {H} {`\H}
+\usv_set:nnn {up} {I} {`\I}
+\usv_set:nnn {up} {L} {`\L}
+\usv_set:nnn {up} {M} {`\M}
+\usv_set:nnn {up} {N} {`\N}
+\usv_set:nnn {up} {P} {`\P}
+\usv_set:nnn {up} {Q} {`\Q}
+\usv_set:nnn {up} {R} {`\R}
+\usv_set:nnn {up} {Z} {`\Z}
+\usv_set:nnn {it} {B} {"1D435}
+\usv_set:nnn {it} {C} {"1D436}
+\usv_set:nnn {it} {D} {"1D437}
+\usv_set:nnn {it} {E} {"1D438}
+\usv_set:nnn {it} {F} {"1D439}
+\usv_set:nnn {it} {H} {"1D43B}
+\usv_set:nnn {it} {I} {"1D43C}
+\usv_set:nnn {it} {L} {"1D43F}
+\usv_set:nnn {it} {M} {"1D440}
+\usv_set:nnn {it} {N} {"1D441}
+\usv_set:nnn {it} {P} {"1D443}
+\usv_set:nnn {it} {Q} {"1D444}
+\usv_set:nnn {it} {R} {"1D445}
+\usv_set:nnn {it} {Z} {"1D44D}
+\usv_set:nnn {up} {d} {`\d}
+\usv_set:nnn {up} {e} {`\e}
+\usv_set:nnn {up} {g} {`\g}
+\usv_set:nnn {up} {h} {`\h}
+\usv_set:nnn {up} {i} {`\i}
+\usv_set:nnn {up} {j} {`\j}
+\usv_set:nnn {up} {o} {`\o}
+\usv_set:nnn {it} {d} {"1D451}
+\usv_set:nnn {it} {e} {"1D452}
+\usv_set:nnn {it} {g} {"1D454}
+\usv_set:nnn {it} {h} {"0210E}
+\usv_set:nnn {it} {i} {"1D456}
+\usv_set:nnn {it} {j} {"1D457}
+\usv_set:nnn {it} {o} {"1D45C}
+\usv_set:nnn {bb} {h} {"1D559}
+\usv_set:nnn {tt} {h} {"1D691}
+\usv_set:nnn {scr} {h} {"1D4BD}
+\usv_set:nnn {frak} {h} {"1D525}
+\usv_set:nnn {bfup} {h} {"1D421}
+\usv_set:nnn {bfit} {h} {"1D489}
+\usv_set:nnn {sfup} {h} {"1D5C1}
+\usv_set:nnn {sfit} {h} {"1D629}
+\usv_set:nnn {bffrak} {h} {"1D58D}
+\usv_set:nnn {bfscr} {h} {"1D4F1}
+\usv_set:nnn {bfsfup} {h} {"1D5F5}
+\usv_set:nnn {bfsfit} {h} {"1D65D}
+\usv_set:nnn {up} {dotlessi} {"00131}
+\usv_set:nnn {up} {dotlessj} {"00237}
+\usv_set:nnn {it} {dotlessi} {"1D6A4}
+\usv_set:nnn {it} {dotlessj} {"1D6A5}
+\usv_set:nnn {bb} {C} {"2102}
+\usv_set:nnn {bb} {H} {"210D}
+\usv_set:nnn {bb} {N} {"2115}
+\usv_set:nnn {bb} {P} {"2119}
+\usv_set:nnn {bb} {Q} {"211A}
+\usv_set:nnn {bb} {R} {"211D}
+\usv_set:nnn {bb} {Z} {"2124}
+\usv_set:nnn {up} {Pi} {"003A0}
+\usv_set:nnn {up} {pi} {"003C0}
+\usv_set:nnn {up} {Gamma} {"00393}
+\usv_set:nnn {up} {gamma} {"003B3}
+\usv_set:nnn {up} {summation} {"02211}
+\usv_set:nnn {it} {Pi} {"1D6F1}
+\usv_set:nnn {it} {pi} {"1D70B}
+\usv_set:nnn {it} {Gamma} {"1D6E4}
+\usv_set:nnn {it} {gamma} {"1D6FE}
+\usv_set:nnn {bb} {Pi} {"0213F}
+\usv_set:nnn {bb} {pi} {"0213C}
+\usv_set:nnn {bb} {Gamma} {"0213E}
+\usv_set:nnn {bb} {gamma} {"0213D}
+\usv_set:nnn {bb} {summation} {"02140}
+\usv_set:nnn {bbit} {D} {"2145}
+\usv_set:nnn {bbit} {d} {"2146}
+\usv_set:nnn {bbit} {e} {"2147}
+\usv_set:nnn {bbit} {i} {"2148}
+\usv_set:nnn {bbit} {j} {"2149}
+\usv_set:nnn {scr} {B} {"212C}
+\usv_set:nnn {scr} {E} {"2130}
+\usv_set:nnn {scr} {F} {"2131}
+\usv_set:nnn {scr} {H} {"210B}
+\usv_set:nnn {scr} {I} {"2110}
+\usv_set:nnn {scr} {L} {"2112}
+\usv_set:nnn {scr} {M} {"2133}
+\usv_set:nnn {scr} {R} {"211B}
+\usv_set:nnn {scr} {e} {"212F}
+\usv_set:nnn {scr} {g} {"210A}
+\usv_set:nnn {scr} {o} {"2134}
+\usv_set:nnn {cal} {B} {"212C}
+\usv_set:nnn {cal} {E} {"2130}
+\usv_set:nnn {cal} {F} {"2131}
+\usv_set:nnn {cal} {H} {"210B}
+\usv_set:nnn {cal} {I} {"2110}
+\usv_set:nnn {cal} {L} {"2112}
+\usv_set:nnn {cal} {M} {"2133}
+\usv_set:nnn {cal} {R} {"211B}
+\usv_set:nnn {frak} {C} {"212D}
+\usv_set:nnn {frak} {H} {"210C}
+\usv_set:nnn {frak} {I} {"2111}
+\usv_set:nnn {frak} {R} {"211C}
+\usv_set:nnn {frak} {Z} {"2128}
%%^^A%% um-code-setchar.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% General assignment of maths symbols.
\cs_new:Npn \__um_symbol_setup:
{
@@ -834,7 +888,7 @@
{ \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence }
{##3}
{
- \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \Ucharcat ##1 ~ 12 ~ }
+ \exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} }
}
}
\__um_input_math_symbol_table:
@@ -874,6 +928,8 @@
{ \__um_set_math_overunder:Nnnn #2 {} {#1} {#4} }
\mathunder
{ \__um_set_math_overunder:Nnnn #2 {bottom} {#1} {#4} }
+ \mathaccentoverlay
+ { \__um_set_math_accent:Nnnn #2 {} {#1} {#4} }
}
}
\edef\mathfence{\string\mathfence}
@@ -881,6 +937,7 @@
\edef\mathunder{\string\mathunder}
\edef\mathbotaccent{\string\mathbotaccent}
\edef\mathaccentwide{\string\mathaccentwide}
+\edef\mathaccentoverlay{\string\mathaccentoverlay}
\edef\mathbotaccentwide{\string\mathbotaccentwide}
\cs_new:Nn \__um_set_big_operator:nnn
{
@@ -937,72 +994,67 @@
\cs_gset_protected_nopar:Npx #1 ##1
{
\mathop
- { \__um_accent:nnn {#2} {#3} {#4} {##1} }
+ { \__um_accent:nnn {#2} {#3} {#4} {{}##1} }
+ % TODO: remove braces above ^^ which work around a LuaTeX bug
\limits
}
}
%%^^A%% um-code-mathtext.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% The "math text" commands such as `\mathbf` and co.
\keys_define:nn {__um_mathface}
- {
- version .code:n =
- { \tl_set:Nn \l__um_mversion_tl {#1} }
- }
+ {
+ version .tl_set:N = \l__um_mversion_tl
+ }
\cs_set:Nn \__um_setmathfontface:Nnn
- {
- \tl_clear:N \l__um_mversion_tl
+ {
+ \tl_clear:N \l__um_mversion_tl
- \keys_set_known:nnN {__um_mathface} {#2} \l__um_keyval_clist
+ \keys_set_known:nnN {__um_mathface} {#2} \l__um_keyval_clist
- \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl
- { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3}
+ \exp_args:Nnx \fontspec_set_family:Nxn \l__um_tmpa_tl
+ { ItalicFont={}, BoldFont={}, \exp_not:V \l__um_keyval_clist } {#3}
- \tl_if_empty:NT \l__um_mversion_tl
- {
- \tl_set:Nn \l__um_mversion_tl {normal}
- \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault}
- }
+ \tl_if_empty:NT \l__um_mversion_tl
+ {
+ \tl_set:Nn \l__um_mversion_tl {normal}
+ \DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault}
+ }
- \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault}
+ \SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\updefault}
- % integrate with fontspec's \setmathrm etc:
- \tl_case:Nn #1
- {
- \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl }
- \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl }
- \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl }
- }
- }
+ % integrate with fontspec's \setmathrm etc:
+ \tl_case:Nn #1
+ {
+ \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl }
+ \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl }
+ \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl }
+ }
+ }
\cs_generate_variant:Nn \tl_if_eq:nnT {o}
\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
+ \__fontspec_setmathrm_hook:nn {#1} {#2}
}
}
-
\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
+ \__fontspec_setmathsf_hook:nn {#1} {#2}
}
}
-
\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
+ \__fontspec_setmathtt_hook:nn {#1} {#2}
}
}
\cs_set:Nn \__fontspec_setmathrm_hook:nn
@@ -1027,180 +1079,251 @@
\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
}
+\tl_if_eq:onF {\g__fontspec_mathrm_tl} {\rmdefault} { \__fontspec_setmathrm_hook:nn {} {} }
+\tl_if_eq:onF {\g__fontspec_mathsf_tl} {\sfdefault} { \__fontspec_setmathsf_hook:nn {} {} }
+\tl_if_eq:onF {\g__fontspec_mathtt_tl} {\ttdefault} { \__fontspec_setmathtt_hook:nn {} {} }
+\AtBeginDocument
+ {
+ \tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} { \__fontspec_setmathrm_hook:nn {} {} }
+ \tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} { \__fontspec_setmathsf_hook:nn {} {} }
+ \tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} { \__fontspec_setmathtt_hook:nn {} {} }
+ }
%%^^A%% um-code-main.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Definition of `\setmainfont`.
\cs_set:Nn \__um_setmathfont:nn
{
- \tl_set:Nn \l__um_fontname_tl {#2}
+
+ \__um_init:n {#2}
\cs_set_eq:NN \glb@currsize \scan_stop:
- \__um_init:
\cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes }
- \csname S@\f@size\endcsname
+ \use:c { S@ \f@size }
+
\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:
- \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool }
+
+ \bool_if:NT \l__um_init_bool
{
+ \__um_fontspec_trial_font:
\__um_declare_math_sizes:
- \__um_fontspec_select_font:
- }
- \cs_if_exist:cF { sym \l__um_symfont_label_tl }
- {
- \DeclareSymbolFont{\l__um_symfont_label_tl}
- {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
- }
- \SetSymbolFont{\l__um_symfont_label_tl}{\l__um_mversion_tl}
- {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
- \str_if_eq_x:nnT {\l__um_mversion_tl} {normal}
- {
- \SetSymbolFont{\l__um_symfont_label_tl}{bold}
- {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault}
}
- \bool_if:nT { \l__um_ot_math_bool && !\g__um_mainfont_already_set_bool }
+ \__um_fontspec_select_font:
+ \__um_setup_math_fam:
+ \bool_if:NT \l__um_init_bool
{
- \bool_set_true:N \g__um_mainfont_already_set_bool
\__um_setup_legacy_fam_two:
\__um_setup_legacy_fam_three:
}
+
\__um_input_math_symbol_table:
+
+ \bool_if:NT \l__um_init_bool \__um_onceoff_setup:
\__um_remap_symbols:
\__um_setup_mathactives:
\__um_setup_delcodes:
\__um_setup_alphabets:
- \__um_setup_negations:
+
+ %% TODO: what of the above should only be run for the "default"/"main" font?
+
+ \bool_if:NTF \l__um_init_bool
+ {
+ \__um_log:n {default-math-font}
+ }
+ {
+ }
}
\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
+ \setmathfont{latinmodern-math.otf}
+ [BoldFont={latinmodern-math.otf}]
}
}
-\cs_new:Nn \__um_init:
+\cs_new:Nn \__um_init:n
{
+ \tl_set:Nn \l__um_fontname_tl {#1}
\bool_set_true:N \l__um_ot_math_bool
- \tl_set:Nn \l__um_mversion_tl {normal}
+ \tl_set:Nn \l__um_mversion_tl {normal}
\tl_set:Nn \l__um_symfont_label_tl {operators}
+
\tl_set:Nn \l__um_script_features_tl {Style=MathScript}
\tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript}
\tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl
\tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl
+
\bool_set_true:N \l__um_init_bool
- \seq_clear:N \l__um_char_range_seq
- \clist_clear:N \l__um_char_nrange_clist
- \seq_clear:N \l__um_mathalph_seq
+ \seq_gclear:N \g__um_char_range_seq
+ \clist_clear:N \l__um_mathmap_charints_clist
+ \seq_gclear:N \g__um_mathalph_seq
\seq_clear:N \l__um_missing_alph_seq
- \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn
- \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn
- \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn
- \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n
- \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn
- \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn
- \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN
+
+ \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn
+ \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn
+ \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n
+ \cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn
+ \cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN
}
+\tl_new:N \g__um_main_font_cmd_tl
\cs_new:Nn \__um_declare_math_sizes:
{
- \dim_compare:nF { \fontdimen 10 \l__um_font == 0pt }
+ \dim_compare:nF { \fontdimen 10 \g__um_trial_font == 0pt }
{
\DeclareMathSizes { \f@size } { \f@size }
- { \__um_fontdimen_to_scale:nn {10} {\l__um_font} }
- { \__um_fontdimen_to_scale:nn {11} {\l__um_font} }
+ { \__um_fontdimen_to_scale:nN {10} \g__um_trial_font }
+ { \__um_fontdimen_to_scale:nN {11} \g__um_trial_font }
+ }
+ }
+\cs_new:Nn \__um_fontspec_trial_font:
+ {
+ \tl_set:Nx \l__um_font_keyval_tl
+ {
+ BoldItalicFont = {}, ItalicFont = {},
+ Script = Math,
+ \l__um_unknown_keys_clist
+ }
+
+ \fontspec_set_family:Nxn \l__um_trial_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl}
+
+ \group_begin:
+ \fontfamily { \l__um_trial_family_tl } \selectfont
+ \__um_fontface_gset_eq:NV \g__um_trial_font \font@name
+ \fontspec_if_script:nF {math}
+ {
+ \bool_gset_false:N \l__um_ot_math_bool
+ \bool_gset_false:N \l__um_init_bool
+ }
+ \group_end:
+
+ }
+\cs_new:Nn \__um_fontspec_select_font:
+ {
+ \fp_gset:Nn \g__um_size_tfsf_fp { (\f@size +\sf@size )/2 }
+ \fp_gset:Nn \g__um_size_sfssf_fp { (\sf@size+\ssf@size)/2 }
+
+ \tl_set:Nx \l__um_font_keyval_tl
+ {
+ BoldItalicFont = {}, ItalicFont = {},
+ Script = Math,
+ SizeFeatures =
+ {
+ {
+ Size = \fp_use:N \g__um_size_tfsf_fp -
+ } ,
+ {
+ Size = \fp_use:N \g__um_size_sfssf_fp - \fp_use:N \g__um_size_tfsf_fp ,
+ Font = \l__um_script_font_tl ,
+ \l__um_script_features_tl
+ } ,
+ {
+ Size = - \fp_use:N \g__um_size_sfssf_fp ,
+ Font = \l__um_sscript_font_tl ,
+ \l__um_sscript_features_tl
+ }
+ } ,
+ \l__um_unknown_keys_clist
+ }
+
+ \fontspec_set_family:Nxn \l__um_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl}
+
+ \int_gincr:N \g__um_fonts_used_int
+ \group_begin:
+ \fontfamily { \l__um_family_tl } \selectfont
+ \__um_fontface_gset_eq:cV {g__um_mathfont_ \int_use:N \g__um_fonts_used_int _font} \font@name
+ \tl_gset:Nx \g__um_curr_font_cmd_tl { \exp_not:c {g__um_mathfont_ \int_use:N \g__um_fonts_used_int _font} }
+ \bool_if:NT \l__um_init_bool
+{
+\__um_fontface_gset_eq:NV \l__um_font \font@name
+}
+ \fontspec_if_script:nF {math}
+ {
+ \bool_gset_false:N \l__um_ot_math_bool
+ \bool_gset_false:N \l__um_init_bool
+ }
+ \group_end:
+ }
+\tl_set:Nn \g__um_main_font_cmd_tl { \l__um_font }
+\tl_set:Nn \g__um_sqrt_font_cmd_tl { \l__um_font }
+\tl_set:Nn \g__um_prime_font_cmd_tl { \l__um_font }
+\cs_new:Nn \__um_setup_math_fam:
+ {
+ \cs_if_exist:cF { sym \l__um_symfont_label_tl }
+ {
+ \DeclareSymbolFont{\l__um_symfont_label_tl}
+ {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
+ }
+ \SetSymbolFont{\l__um_symfont_label_tl}{\l__um_mversion_tl}
+ {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
+ \str_if_eq_x:nnT {\l__um_mversion_tl} {normal}
+ {
+ \SetSymbolFont{\l__um_symfont_label_tl}{bold}
+ {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault}
}
}
\cs_new:Nn \__um_setup_legacy_fam_two:
{
- \fontspec_set_family:Nxn \l__um_family_tl
+ \fontspec_set_family:Nxn \l__um_fam_two_tl
{
\l__um_font_keyval_tl,
Scale=1.00001,
FontAdjustment =
{
- \__um_copy_fontparam:nnn { 8} {43} {FractionNumeratorDisplayStyleShiftUp}\relax
- \__um_copy_fontparam:nnn { 9} {42} {FractionNumeratorShiftUp}\relax
- \__um_copy_fontparam:nnn {10} {32} {StackTopShiftUp}\relax
- \__um_copy_fontparam:nnn {11} {45} {FractionDenominatorDisplayStyleShiftDown}\relax
- \__um_copy_fontparam:nnn {12} {44} {FractionDenominatorShiftDown}\relax
- \__um_copy_fontparam:nnn {13} {21} {SuperscriptShiftUp}\relax
- \__um_copy_fontparam:nnn {14} {21} {SuperscriptShiftUp}\relax
- \__um_copy_fontparam:nnn {15} {22} {SuperscriptShiftUpCramped}\relax
- \__um_copy_fontparam:nnn {16} {18} {SubscriptShiftDown}\relax
- \__um_copy_fontparam:nnn {17} {18} {SubscriptShiftDownWithSuperscript}\relax
- \__um_copy_fontparam:nnn {18} {24} {SuperscriptBaselineDropMax}\relax
- \__um_copy_fontparam:nnn {19} {20} {SubscriptBaselineDropMin}\relax
- \__um_zero_fontparam:n {20} % delim1 = FractionDelimiterDisplaySize
- \__um_zero_fontparam:n {21} % delim2 = FractionDelimiterSize
- \__um_copy_fontparam:nnn {22} {15} {AxisHeight}\relax
+ \__um_copy_fontdimen:nnN { 8} {43} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN { 9} {42} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {10} {32} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {11} {45} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {12} {44} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {13} {21} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {14} {21} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {15} {22} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {16} {18} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {17} {18} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {18} {24} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {19} {20} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {22} {15} \g__um_main_font_cmd_tl
+ \__um_zero_fontdimen:n {20} % delim1 = FractionDelimiterDisplaySize
+ \__um_zero_fontdimen:n {21} % delim2 = FractionDelimiterSize
}
} {\l__um_fontname_tl}
\SetSymbolFont{symbols}{\l__um_mversion_tl}
- {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
+ {\encodingdefault}{\l__um_fam_two_tl}{\mddefault}{\updefault}
\str_if_eq_x:nnT {\l__um_mversion_tl} {normal}
{
\SetSymbolFont{symbols}{bold}
- {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault}
+ {\encodingdefault}{\l__um_fam_two_tl}{\bfdefault}{\updefault}
}
}
\cs_new:Nn \__um_setup_legacy_fam_three:
{
- \fontspec_set_family:Nxn \l__um_family_tl
+ \fontspec_set_family:Nxn \l__um_fam_three_tl
{
\l__um_font_keyval_tl,
Scale=0.99999,
FontAdjustment = {
- \__um_copy_fontparam:nnn { 8} {48} {FractionRuleThickness}\relax
- \__um_copy_fontparam:nnn { 9} {28} {UpperLimitGapMin}\relax
- \__um_copy_fontparam:nnn {10} {30} {LowerLimitGapMin}\relax
- \__um_copy_fontparam:nnn {11} {29} {UpperLimitBaselineRiseMin}\relax
- \__um_copy_fontparam:nnn {12} {31} {LowerLimitBaselineDropMin}\relax
- \__um_zero_fontparam:n {13}
+ \__um_copy_fontdimen:nnN { 8} {48} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN { 9} {28} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {10} {30} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {11} {29} \g__um_main_font_cmd_tl
+ \__um_copy_fontdimen:nnN {12} {31} \g__um_main_font_cmd_tl
+ \__um_zero_fontdimen:n {13}
}
} {\l__um_fontname_tl}
\SetSymbolFont{largesymbols}{\l__um_mversion_tl}
- {\encodingdefault}{\l__um_family_tl}{\mddefault}{\updefault}
+ {\encodingdefault}{\l__um_fam_three_tl}{\mddefault}{\updefault}
\str_if_eq_x:nnT {\l__um_mversion_tl} {normal}
{
\SetSymbolFont{largesymbols}{bold}
- {\encodingdefault}{\l__um_family_tl}{\bfdefault}{\updefault}
+ {\encodingdefault}{\l__um_fam_three_tl}{\bfdefault}{\updefault}
}
}
-\cs_new:Nn \__um_fontspec_select_font:
+\cs_new:Nn \__um_onceoff_setup:
{
- \tl_set:Nx \l__um_font_keyval_tl {
- BoldItalicFont = {}, ItalicFont = {},
- Script = Math,
- SizeFeatures =
- {
- {
- Size = \tf@size-
- } ,
- {
- Size = \sf@size-\tf@size ,
- Font = \l__um_script_font_tl ,
- \l__um_script_features_tl
- } ,
- {
- Size = -\sf@size ,
- Font = \l__um_sscript_font_tl ,
- \l__um_sscript_features_tl
- }
- } ,
- \l__um_unknown_keys_clist
- }
-
- \fontspec_set_fontface:NNxn \l__um_font \l__um_family_tl
- {\l__um_font_keyval_tl} {\l__um_fontname_tl}
- \group_begin:
- \fontfamily{\l__um_family_tl}\selectfont
- \fontspec_if_script:nF {math} {\bool_gset_false:N \l__um_ot_math_bool}
- \group_end:
+ \__um_set_delcode:nnn {operators} {`\.} {\c_zero}
}
\cs_set:Nn \__um_process_symbol_noparse:nnn
{
@@ -1208,23 +1331,23 @@
}
\cs_set:Nn \__um_process_symbol_parse:nnn
{
- \__um_if_char_spec:nNNT {#1} {#2} {#3}
+ \__um_if_char_spec:nNT {#1} {#3}
{
\__um_process_symbol_noparse:nnn {#1} {#2} {#3}
}
}
-\cs_new:Npn \__um_remap_symbols:
+\cs_new:Nn \__um_remap_symbols:
{
- \__um_remap_symbol:nnn{`\-}{\mathbin}{"02212}% hyphen to minus
- \__um_remap_symbol:nnn{`\*}{\mathbin}{"02217}% text asterisk to "centred asterisk"
+ \__um_remap_symbol:nnn {`\-} {\mathbin} {"2212}
+ \__um_remap_symbol:nnn {`\*} {\mathbin} {"02217}% text asterisk to "centred asterisk"
\bool_if:NF \g__um_literal_colon_bool
{
- \__um_remap_symbol:nnn{`\:}{\mathrel}{"02236}% colon to ratio (i.e., punct to rel)
+ \__um_remap_symbol:nnn {`\:} {\mathrel} {"02236}% colon to ratio (i.e., punct to rel)
}
}
\cs_new:Nn \__um_remap_symbol_parse:nnn
{
- \__um_if_char_spec:nNNT {#3} {\@nil} {#2}
+ \__um_if_char_spec:nNT {#3} {#2}
{ \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} }
}
\cs_new:Nn \__um_remap_symbol_noparse:nnn
@@ -1234,19 +1357,19 @@
}
\cs_new:Npn \__um_setup_mathactives:
{
- \__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord
- \__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord
- \__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord
- \__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord
- \__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord
- \__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord
- \__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord
+\__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord
+\__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord
+\__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord
+\__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord
+\__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord
+\__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord
+\__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord
\__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord
\__um_make_mathactive:nNN {`\`} \mathbacktick \mathord
}
\cs_new:Nn \__um_make_mathactive_parse:nNN
{
- \__um_if_char_spec:nNNT {#1} #2 #3
+ \__um_if_char_spec:nNT {#1} #3
{ \__um_make_mathactive_noparse:nNN {#1} #2 #3 }
}
\cs_new:Nn \__um_make_mathactive_noparse:nNN
@@ -1260,7 +1383,7 @@
}
\cs_new:Nn \__um_assign_delcode_parse:nn
{
- \__um_if_char_spec:nNNT {#2} {\@nil} {\@nil}
+ \__um_if_char_spec:nNT {#2} \@nil
{
\__um_assign_delcode_noparse:nn {#1} {#2}
}
@@ -1268,10 +1391,6 @@
\cs_new:Nn \__um_assign_delcode:n { \__um_assign_delcode:nn {#1} {#1} }
\cs_new:Npn \__um_setup_delcodes:
{
- % ensure \left. and \right. work:
- \__um_set_delcode:nnn \l__um_symfont_label_tl {`\.} {\c_zero}
- % this is forcefully done to fix a bug -- indicates a larger problem!
-
\__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv}
\__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash
\__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash
@@ -1317,6 +1436,7 @@
\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision}
%%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Keyval for `\setmathfont`
\keys_define:nn {unicode-math}
{
@@ -1327,100 +1447,124 @@
}
}
\keys_define:nn {unicode-math}
- {
- script-features .tl_set:N = \l__um_script_features_tl ,
- sscript-features .tl_set:N = \l__um_sscript_features_tl ,
- script-font .tl_set:N = \l__um_script_font_tl ,
- sscript-font .tl_set:N = \l__um_sscript_font_tl ,
- }
+ {
+ script-features .tl_set:N = \l__um_script_features_tl ,
+ sscript-features .tl_set:N = \l__um_sscript_features_tl ,
+ script-font .tl_set:N = \l__um_script_font_tl ,
+ sscript-font .tl_set:N = \l__um_sscript_font_tl ,
+ }
\keys_define:nn {unicode-math}
- {
- range .code:n =
- {
- \bool_set_false:N \l__um_init_bool
+ {
+ range .code:n =
+ {
+ \bool_set_false:N \l__um_init_bool
+ \__um_range_init:
+ \group_begin:
+ \seq_map_inline:Nn \g__um_mathclasses_seq
+ {
+ \cs_set:Npn ##1 { \use_none:n \q_unicode_math \exp_not:N ##1 }
+ }
+ \cs_set:Npn \__um_sym:nnn ##1 ##2 ##3
+ {
+ \cs_set:Npn ##2 { \use_none:n \q_unicode_math ##1 }
+ }
+ \__um_input_math_symbol_table:
+ \__um_range_process:n {#1}
+ \group_end:
+ }
+ }
+\cs_new:Nn \__um_range_init:
+ {
\int_incr:N \g__um_fam_int
\tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int}
\cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn
- \cs_set_eq:NN \__um_set_mathalphabet_char:Nnn \__um_mathmap_parse:Nnn
\cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn
\cs_set_eq:NN \__um_maybe_init_alphabet:n \use_none:n
- \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_parse:nn
\cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_parse:nn
\cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_parse:nNN
- \seq_clear:N \l__um_char_range_seq
- \seq_clear:N \l__um_mclass_range_seq
- \seq_clear:N \l__um_cmd_range_seq
- \seq_clear:N \l__um_mathalph_seq
-
+ \seq_gclear:N \g__um_char_range_seq
+ \seq_gclear:N \g__um_mclass_range_seq
+ \seq_gclear:N \g__um_mathalph_seq
+ }
+\cs_new:Nn \__um_range_process:n
+ {
\clist_map_inline:nn {#1}
- {
- \__um_if_mathalph_decl:nTF {##1}
- {
- \seq_put_right:Nx \l__um_mathalph_seq
- {
- { \exp_not:V \l__um_tmpa_tl }
- { \exp_not:V \l__um_tmpb_tl }
- { \exp_not:V \l__um_tmpc_tl }
- }
- }
- {
- \seq_if_in:NnTF \g__um_mathclasses_seq {##1}
- { \seq_put_right:Nn \l__um_mclass_range_seq {##1} }
- {
- \bool_lazy_and:nnTF { \tl_if_single_p:n {##1} } { \token_if_cs_p:N ##1 }
- { \seq_put_right:Nn \l__um_cmd_range_seq {##1} }
- { \seq_put_right:Nn \l__um_char_range_seq {##1} }
- }
- }
- }
- }
- }
-\prg_new_conditional:Nnn \__um_if_mathalph_decl:n {TF}
- {
- \tl_set:Nn \l__um_tmpa_tl {#1}
- \tl_clear:N \l__um_tmpb_tl
- \tl_clear:N \l__um_tmpc_tl
+ {
+ \__um_mathalph_decl:nF {##1} { \__um_range_decl:n {##1} }
+ }
+}
+\cs_new:Nn \__um_mathalph_decl:nF
+ {
- \tl_if_in:NnT \l__um_tmpa_tl {->}
- { \exp_after:wN \__um_split_arrow:w \l__um_tmpa_tl \q_nil }
+ \tl_set:Nn \l__um_tmpa_tl {#1}
+ \tl_clear:N \l__um_tmpb_tl
+ \tl_clear:N \l__um_tmpc_tl
- \tl_if_in:NnT \l__um_tmpa_tl {/}
- { \exp_after:wN \__um_split_slash:w \l__um_tmpa_tl \q_nil }
+ \tl_if_in:NnT \l__um_tmpa_tl {->}
+ { \exp_after:wN \__um_split_arrow:w \l__um_tmpa_tl \q_nil }
- \tl_set:Nx \l__um_tmpa_tl { \tl_to_str:N \l__um_tmpa_tl }
- \exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \math }
- \exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \sym }
- \tl_trim_spaces:N \l__um_tmpa_tl
+ \tl_if_in:NnT \l__um_tmpa_tl {/}
+ { \exp_after:wN \__um_split_slash:w \l__um_tmpa_tl \q_nil }
- \tl_if_empty:NT \l__um_tmpc_tl
- { \tl_set_eq:NN \l__um_tmpc_tl \l__um_tmpa_tl }
+ \tl_set:Nx \l__um_tmpa_tl { \tl_to_str:N \l__um_tmpa_tl }
+ \exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \math }
+ \exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \sym }
+ \tl_trim_spaces:N \l__um_tmpa_tl
- \seq_if_in:NVTF \g__um_named_ranges_seq \l__um_tmpa_tl
- { \prg_return_true: } { \prg_return_false: }
- }
+ \tl_if_empty:NT \l__um_tmpc_tl
+ { \tl_set_eq:NN \l__um_tmpc_tl \l__um_tmpa_tl }
+
+ \clist_if_in:NVT \g__um_bad_alpha_clist \l__um_tmpa_tl { \__um_error:n {range-not-bf-sf} }
+
+ \prop_if_exist:cTF {g__um_named_range_ \l__um_tmpa_tl _prop}
+ {
+ \seq_gput_right:Nx \g__um_mathalph_seq
+ {
+ { \exp_not:V \l__um_tmpa_tl }
+ { \exp_not:V \l__um_tmpb_tl }
+ { \exp_not:V \l__um_tmpc_tl }
+ }
+ }
+ {#2}
+ }
\cs_set:Npn \__um_split_arrow:w #1->#2 \q_nil
- {
- \tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} }
- \tl_set:Nx \l__um_tmpc_tl { \tl_trim_spaces:n {#2} }
- }
+ {
+ \tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} }
+ \tl_set:Nx \l__um_tmpc_tl { \tl_trim_spaces:n {#2} }
+ }
\cs_set:Npn \__um_split_slash:w #1/#2 \q_nil
- {
- \tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} }
- \tl_set:Nx \l__um_tmpb_tl { \tl_trim_spaces:n {#2} }
- }
-\cs_new:Nn \__um_if_char_spec:nNNT
+ {
+ \tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} }
+ \tl_set:Nx \l__um_tmpb_tl { \tl_trim_spaces:n {#2} }
+ }
+\cs_new_protected:Nn \__um_range_decl:n
+ {
+ \bool_lazy_and:nnTF { \tl_if_single_p:n {#1} } { \token_if_cs_p:N #1 }
+ {
+ \tl_if_in:VnTF #1 { \q_unicode_math }
+ {
+ \seq_if_in:NnTF \g__um_mathclasses_seq {#1}
+ { \seq_gput_right:Nn \g__um_mclass_range_seq {#1} }
+ { \seq_gput_right:Nx \g__um_char_range_seq {#1} }
+ }
+ { \__um_error:nx {bad-cs-in-range} { \tl_to_str:n {#1} } }
+ }
+ {
+ \seq_gput_right:Nx \g__um_char_range_seq {#1}
+ }
+ }
+\cs_new:Nn \__um_if_char_spec:nNT
{
% math class:
- \seq_if_in:NnT \l__um_mclass_range_seq {#3}
- { \use_none_delimit_by_q_nil:w }
-
- % command name:
- \seq_if_in:NnT \l__um_cmd_range_seq {#2}
+ \seq_if_in:NnT \g__um_mclass_range_seq {#2}
{ \use_none_delimit_by_q_nil:w }
% character slot:
- \seq_map_inline:Nn \l__um_char_range_seq
+ \seq_map_inline:Nn \g__um_char_range_seq
{
+ \__um_int_if_slot_is_last_in_range:nnT {#1} {##1}
+ { \seq_gremove_all:Nn \g__um_char_range_seq {##1} }
+
\__um_int_if_slot_in_range:nnT {#1} {##1}
{ \seq_map_break:n { \use_none_delimit_by_q_nil:w } }
}
@@ -1430,12 +1574,17 @@
\q_nil
\use:n
{
- \clist_put_right:Nx \l__um_char_nrange_clist { \int_eval:n {#1} }
- #4
+ \cs_if_eq:NNT #2 \mathalpha
+ {
+ \clist_put_right:Nx \l__um_mathmap_charints_clist { \int_eval:n {#1} }
+ }
+ #3
}
}
\cs_new:Nn \__um_int_if_slot_in_range:nnT
- { \__um_numrange_parse:nwT {#1} #2 - \q_nil - \q_stop {#3} }
+ {
+ \__um_numrange_parse:nwT {#1} #2 - \q_nil - \q_stop {#3}
+ }
\cs_set:Npn \__um_numrange_parse:nwT #1 #2 - #3 - #4 \q_stop #5
{
\tl_if_empty:nTF {#4} { \int_compare:nT {#1=#2} {#5} }
@@ -1447,8 +1596,22 @@
\int_compare:nT {#1>=#2} { \int_compare:nT {#1<=#3} {#5} }
} } }
}
+\cs_new:Nn \__um_int_if_slot_is_last_in_range:nnT
+ {
+ \__um_numrange_last_parse:nwT {#1} #2 - \q_nil - \q_stop {#3}
+ }
+\cs_set:Npn \__um_numrange_last_parse:nwT #1 #2 - #3 - #4 \q_stop #5
+ {
+ \tl_if_empty:nTF {#4} { \int_compare:nT {#1==#2} {#5} }
+ {
+ \tl_if_empty:nTF {#2} { \int_compare:nT {#1==#3} {#5} }
+ {
+ \int_compare:nT {#1==#3} {#5}
+ } }
+ }
%%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Cross-platform interface for font parameters
\cs_new_protected_nopar:Nn \__um_new_cramped_style:N
{ \quark_new:N #1 }
@@ -1490,30 +1653,30 @@
\c_two
}
\cs_new_protected_nopar:Nn \__um_font_param:nnnnn
-{
- \__um_font_param_aux:ccnnnn { __um_ #1 :N } { __um_set_ #1 :Nn }
- { #2 } { #3 } { #4 } { #5 }
-}
+ {
+ \__um_font_param_aux:ccnnnn { __um_ #1 :N } { __um_set_ #1 :Nn }
+ { #2 } { #3 } { #4 } { #5 }
+ }
\cs_new_protected_nopar:Nn \__um_font_param:nnn
- {
- \__um_font_param:nnnnn { #1 } { #2 } { #2 } { #3 } { #3 }
- }
+ {
+ \__um_font_param:nnnnn { #1 } { #2 } { #2 } { #3 } { #3 }
+ }
\cs_new_protected_nopar:Nn \__um_font_param:nn
- {
- \__um_font_param:nnnnn { #1 } { #2 } { #2 } { #2 } { #2 }
- }
+ {
+ \__um_font_param:nnnnn { #1 } { #2 } { #2 } { #2 } { #2 }
+ }
\cs_new_protected_nopar:Nn \__um_font_param:n
{ }
\cs_new_protected_nopar:Nn \__um_font_param_aux:NNnnnn
{
\cs_new_nopar:Npn #1 ##1
- {
- \__um_font_dimen:Nnnnn ##1 { #3 } { #4 } { #5 } { #6 }
- }
+ {
+ \__um_font_dimen:Nnnnn ##1 { #3 } { #4 } { #5 } { #6 }
+ }
\cs_new_protected_nopar:Npn #2 ##1 ##2
- {
- #1 ##1 \dim_eval:n { ##2 }
- }
+ {
+ #1 ##1 \dim_eval:n { ##2 }
+ }
}
\cs_generate_variant:Nn \__um_font_param_aux:NNnnnn { cc }
\__um_font_param:nn { axis } { 15 }
@@ -1561,111 +1724,444 @@
\__um_font_param:nn { underbar_rule } { 57 }
\__um_font_param:nn { underbar_vgap } { 56 }
\__um_font_param:n { connector_overlap_min }
-\cs_new:Nn \__um_fontdimen_to_percent:nn
- {
- \fp_eval:n { \dim_to_decimal:n { \fontdimen #1 #2 } * 65536 / 100 }
- }
-\cs_new:Nn \__um_fontdimen_to_scale:nn
- {
- \fp_eval:n {\__um_fontdimen_to_percent:nn {#1} {#2} * \f@size } pt
- }
-\cs_new:Nn \__um_mathstyle_scale:Nnn
- {
- \ifx#1\scriptstyle
- #2 \__um_fontdimen_to_percent:nn {10} \l__um_font #3
- \else
- \ifx#1\scriptscriptstyle
- #2 \__um_fontdimen_to_percent:nn {11} \l__um_font #3
+\cs_new:Nn \__um_fontdimen_to_percent:nN
+ {
+ \fp_eval:n { \dim_to_decimal:n { \fontdimen #1 #2 } * 65536 / 100 }
+ }
+\cs_new:Nn \__um_fontdimen_to_scale:nN
+ {
+ \fp_eval:n { \__um_fontdimen_to_percent:nN {#1} #2 * \f@size } pt
+ }
+\cs_new:Nn \__um_mathstyle_scale:NnnN
+ {
+ \ifx#1\scriptstyle
+ #2 \__um_fontdimen_to_percent:nN {10} #4 #3
\else
- #2 #3
+ \ifx#1\scriptscriptstyle
+ #2 \__um_fontdimen_to_percent:nN {11} #4 #3
+ \else
+ #2 #3
+ \fi
\fi
- \fi
- }
+ }
%%^^A%% um-code-mathmap.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Setup of symbol alphabets.
-\cs_set:Npn \use@mathgroup #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!
- {
- \math@bgroup
- \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
- \__um_switchto_literal:
- \mathgroup #2 \relax
- \math@egroup
- }
- }
-\cs_set:Npn \operator@font
- {
- \__um_switchto_literal:
- \@fontswitch {} { \g__um_operator_mathfont_tl }
- }
-\cs_new:Nn \__um_prepare_mathstyle:n
- {
- \seq_put_right:Nn \g__um_mathstyles_seq {#1}
- \__um_init_alphabet:n {#1}
- \cs_set:cpn {__um_sym_#1_aux:n}
- { \use:c {__um_switchto_#1:} \math@egroup }
- \cs_set_protected:cpx {sym#1}
- {
- \exp_not:n
- {
- \math@bgroup
- \mode_if_math:F
- {
- \egroup\expandafter
- \non@alpherr\expandafter{\csname sym#1\endcsname\space}
- }
- \tl_set:Nn \l__um_mathstyle_tl {#1}
- }
- \exp_not:c {__um_sym_#1_aux:n}
- }
- }
-\cs_set:Nn \__um_init_alphabet:n
- {
- \__um_log:nx {alph-initialise} {#1}
- \cs_set_eq:cN {__um_switchto_#1:} \prg_do_nothing:
- }
-\cs_new:Nn \__um_new_named_range:n
- {
- \prop_new:c {g__um_named_range_#1_prop}
- }
-\clist_set:Nn \g__um_named_ranges_clist
- {
- up, it, tt, bfup, bfit, bb , bbit, scr, bfscr, cal, bfcal,
- frak, bffrak, sfup, sfit, bfsfup, bfsfit, bfsf
- }
-\clist_map_inline:Nn \g__um_named_ranges_clist
- { \__um_new_named_range:n {#1} }
+\cs_new:Npn \__um_setup_alphabets:
+ {
+
+ \bool_if:NTF \l__um_init_bool
+ {
+ % IMPLICIT
+ \__um_log:n {setup-implicit}
+ \seq_gset_eq:NN \g__um_mathalph_seq \g__um_default_mathalph_seq
+ \bool_set_true:N \l__um_implicit_alph_bool
+ \__um_maybe_init_alphabet:n {sf}
+ \__um_maybe_init_alphabet:n {bf}
+ \__um_maybe_init_alphabet:n {bfsf}
+ \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn
+ \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn
+ \__um_mathalph_map:
+ \seq_if_empty:NF \l__um_missing_alph_seq { \__um_log:n { missing-alphabets } }
+ }
+ {
+ \seq_if_empty:NF \g__um_mathalph_seq
+ {
+ % EXPLICIT
+ \__um_log:n {setup-explicit}
+ \bool_set_false:N \l__um_implicit_alph_bool
+ \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn
+ \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn
+ \__um_mathalph_map:
+ \seq_if_empty:NF \l__um_missing_alph_seq { \__um_log:n { missing-alphabets } }
+ }
+
+ % INHERIT
+ \clist_if_empty:NF \l__um_mathmap_charints_clist
+ {
+ \seq_gclear:N \g__um_mathalph_seq
+ \seq_map_inline:Nn \g__um_default_mathalph_seq
+ {
+ \tl_set:No \l__um_style_tl { \use_i:nnn ##1 }
+ \clist_set:No \l__um_alphabet_clist { \use_ii:nnn ##1 }
+
+ \clist_map_inline:Nn \l__um_alphabet_clist
+ {
+ \clist_map_inline:cn {g__um_named_slots_ \l__um_style_tl _ ####1 _clist}
+ {
+ \clist_map_inline:Nn \l__um_mathmap_charints_clist
+ {
+ \__um_int_if_slot_in_range:nnT {################1} {########1}
+ {
+ \seq_gput_right:Nn \g__um_mathalph_seq {##1}
+ \clist_map_break:n { \clist_map_break:n { \clist_map_break: } }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_parse:nnn
+ \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_parse:nn
+ \__um_mathalph_map:
+ }
+ }
+\cs_set:Nn \__um_mathalph_map:
+ {
+ \seq_map_inline:Nn \g__um_mathalph_seq
+ {
+ \tl_set:No \l__um_style_tl { \use_i:nnn ##1 }
+ \clist_set:No \l__um_alphabet_clist { \use_ii:nnn ##1 }
+ \tl_set:No \l__um_remap_style_tl { \use_iii:nnn ##1 }
+
+ % If no set of alphabets is defined:
+ \clist_if_empty:NT \l__um_alphabet_clist
+ {
+ \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n
+ \prop_get:cnN { g__um_named_range_ \l__um_style_tl _prop }
+ { default-alpha } \l__um_alphabet_clist
+ }
+
+ \__um_check_math_alphabet:
+ \__um_setup_math_alphabet:
+ }
+ }
+\cs_new:Nn \__um_check_math_alphabet:
+ {
+ \clist_map_inline:Nn \l__um_alphabet_clist
+ {
+ \tl_set:Nn \l__um_alphabet_tl {##1}
+ \__um_if_alphabet_exists:nnTF \l__um_style_tl \l__um_alphabet_tl
+ {
+ \str_if_eq_x:nnTF {\l__um_alphabet_tl} {misc}
+ {
+ \__um_maybe_init_alphabet:n \l__um_style_tl
+ \clist_map_break:
+ }
+ {
+ \__um_glyph_if_exist:NnT \g__um_curr_font_cmd_tl
+ { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} }
+ {
+ \__um_maybe_init_alphabet:n \l__um_style_tl
+ \clist_map_break:
+ }
+ }
+ }
+ {
+ \msg_warning:nnx {unicode-math} {no-alphabet}
+ { \l__um_style_tl / \l__um_alphabet_tl }
+ }
+ }
+ }
+\cs_new:Nn \__um_setup_math_alphabet:
+ {
+ \clist_map_inline:Nn \l__um_alphabet_clist
+ {
+ \tl_set:Nx \l__um_alphabet_tl { \tl_trim_spaces:n {##1} }
+
+
+ \__um_if_alphabet_exists:nnT {\l__um_style_tl} {\l__um_alphabet_tl}
+ {
+ \exp_args:No \tl_if_eq:nnTF \l__um_alphabet_tl {misc}
+ {
+ \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)}
+ \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl}
+ }
+ {
+ \__um_glyph_if_exist:NnTF \g__um_curr_font_cmd_tl { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} }
+ {
+ \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)}
+ \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl}
+ }
+ {
+ \bool_if:NTF \l__um_implicit_alph_bool
+ {
+ \seq_put_right:Nx \l__um_missing_alph_seq
+ {
+ \@backslashchar sym \l__um_style_tl \space
+ (\tl_use:c{c__um_math_alphabet_name_ \l__um_alphabet_tl _tl})
+ }
+ }
+ {
+ \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {up}
+ }
+ }
+ }
+ }
+ }
+ }
\cs_new:Nn \__um_new_alphabet_config:nnn
- {
- \prop_if_exist:cF {g__um_named_range_#1_prop}
- { \__um_warning:nnn {no-named-range} {#1} {#2} }
+ {
+ \prop_if_exist:cF {g__um_named_range_#1_prop}
+ { \__um_warning:nnn {no-named-range} {#1} {#2} }
- \prop_gput:cnn {g__um_named_range_#1_prop} { alpha_tl }
- {
- \prop_item:cn {g__um_named_range_#1_prop} { alpha_tl }
- {#2}
- }
- % Q: do I need to bother removing duplicates?
+ \prop_gput:cnn {g__um_named_range_#1_prop} { alpha_tl }
+ {
+ \prop_item:cn {g__um_named_range_#1_prop} { alpha_tl } {#2}
+ }
+ % Q: do I need to bother removing duplicates?
- \cs_new:cn { __um_config_#1_#2:n } {#3}
- }
+ \cs_new:cn { __um_config_#1_#2:n }
+ {
+ \clist_gclear_new:c {g__um_named_slots_#1_#2_clist}
+ \tl_set:Nn \l__um_curr_named_slot { g__um_named_slots_#1_#2_clist }
+ #3
+ \clist_gremove_duplicates:c {g__um_named_slots_#1_#2_clist}
+ }
+
+ }
\cs_new:Nn \__um_alphabet_config:nnn
- {
- \use:c {__um_config_#1_#2:n} {#3}
- }
+ {
+ \use:c {__um_config_#1_#2:n} {#3}
+ }
\prg_new_conditional:Nnn \__um_if_alphabet_exists:nn {T,TF}
- {
- \cs_if_exist:cTF {__um_config_#1_#2:n}
- \prg_return_true: \prg_return_false:
- }
+ {
+ \cs_if_exist:cTF {__um_config_#1_#2:n}
+ \prg_return_true: \prg_return_false:
+ }
+\cs_new:Nn \__um_map_char_noparse:nn
+ {
+ \__um_set_mathcode:nnnn {#1} {\mathalpha} {\l__um_symfont_label_tl} {#2}
+ }
+\cs_new:Nn \__um_map_char_parse:nn
+ {
+ \__um_if_char_spec:nNT {#1} {\mathalpha}
+ { \__um_map_char_noparse:nn {#1}{#2} }
+ }
+\cs_new:Nn \__um_map_char_single:nnn
+ {
+ \__um_map_char_single:nn { \__um_to_usv:nn {#1} {#3} }
+ { \__um_to_usv:nn {#2} {#3} }
+ }
+\cs_set:Nn \__um_map_chars_range:nnn
+ {
+ \int_step_inline:nnnn {0} {1} {#1-1}
+ { \__um_map_char_single:nn {#2+##1} {#3+##1} }
+
+ \clist_gput_right:cx { \l__um_curr_named_slot }
+ { \int_eval:n { #3 } - \int_eval:n { #3 + #1-1 } }
+ }
+\cs_new:Nn \__um_map_chars_range:nnnn
+ {
+ \__um_map_chars_range:nnn {#1} { \__um_to_usv:nn {#2} {#4} }
+ { \__um_to_usv:nn {#3} {#4} }
+ }
+\cs_set:Nn \__um_set_normal_char:nnn
+ {
+ \__um_usv_if_exist:nnT {#3} {#1}
+ {
+ \clist_map_inline:nn {#2}
+ {
+ \__um_set_mathalphabet_pos:nnnn {normal} {#1} {##1} {#3}
+ \__um_map_char_single:nnn {##1} {#3} {#1}
+
+ \clist_gput_right:cx {\l__um_curr_named_slot}
+ { \int_eval:n { \__um_to_usv:nn {#3} {#1} } }
+ }
+ }
+ }
+\cs_new:Nn \__um_set_normal_Latin:nn
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \__um_set_mathalphabet_Latin:nnn {normal} {##1} {#2}
+ \__um_map_chars_range:nnnn {26} {##1} {#2} {Latin}
+ }
+ }
+\cs_new:Nn \__um_set_normal_latin:nn
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \__um_set_mathalphabet_latin:nnn {normal} {##1} {#2}
+ \__um_map_chars_range:nnnn {26} {##1} {#2} {latin}
+ }
+ }
+\cs_new:Nn \__um_set_normal_greek:nn
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \__um_set_mathalphabet_greek:nnn {normal} {##1} {#2}
+ \__um_map_chars_range:nnnn {25} {##1} {#2} {greek}
+ \__um_map_char_single:nnn {##1} {#2} {epsilon}
+ \__um_map_char_single:nnn {##1} {#2} {vartheta}
+ \__um_map_char_single:nnn {##1} {#2} {varkappa}
+ \__um_map_char_single:nnn {##1} {#2} {phi}
+ \__um_map_char_single:nnn {##1} {#2} {varrho}
+ \__um_map_char_single:nnn {##1} {#2} {varpi}
+ \__um_set_mathalphabet_pos:nnnn {normal} {epsilon} {##1} {#2}
+ \__um_set_mathalphabet_pos:nnnn {normal} {vartheta} {##1} {#2}
+ \__um_set_mathalphabet_pos:nnnn {normal} {varkappa} {##1} {#2}
+ \__um_set_mathalphabet_pos:nnnn {normal} {phi} {##1} {#2}
+ \__um_set_mathalphabet_pos:nnnn {normal} {varrho} {##1} {#2}
+ \__um_set_mathalphabet_pos:nnnn {normal} {varpi} {##1} {#2}
+ }
+ }
+\cs_new:Nn \__um_set_normal_Greek:nn
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \__um_set_mathalphabet_Greek:nnn {normal} {##1} {#2}
+ \__um_map_chars_range:nnnn {25} {##1} {#2} {Greek}
+ \__um_map_char_single:nnn {##1} {#2} {varTheta}
+ \__um_set_mathalphabet_pos:nnnn {normal} {varTheta} {##1} {#2}
+ }
+ }
+\cs_new:Nn \__um_set_normal_numbers:nn
+ {
+ \__um_set_mathalphabet_numbers:nnn {normal} {#1} {#2}
+ \__um_map_chars_range:nnnn {10} {#1} {#2} {num}
+ }
+\cs_new:Nn \__um_mathmap_noparse:nnn
+ {
+ \tl_put_right:cx { __um_switchto_#1: }
+ {
+ \__um_set_mathcode:nnnn {#2} {\mathalpha} {\l__um_symfont_label_tl} {#3}
+ }
+ }
+\cs_new:Nn \__um_mathmap_parse:nnn
+ {
+ \exp_args:NNx \clist_if_in:NnT \l__um_mathmap_charints_clist { \int_eval:n {#3} }
+ {
+ \__um_mathmap_noparse:nnn {#1} {#2} {#3}
+ }
+ }
+\cs_new:Nn \__um_set_mathalphabet_char:nnnn
+ {
+ \__um_set_mathalphabet_char:nnn {#1} { \__um_to_usv:nn {#2} {#4} }
+ { \__um_to_usv:nn {#3} {#4} }
+ }
+\cs_new:Nn \__um_set_mathalph_range:nnnn
+ {
+ \int_step_inline:nnnn {0} {1} {#1-1}
+ { \__um_set_mathalphabet_char:nnn {#2} { ##1 + #3 } { ##1 + #4 } }
+ }
+\cs_new:Nn \__um_set_mathalph_range:nnnnn
+ {
+ \clist_gput_right:cx { \l__um_curr_named_slot }
+ { \int_eval:n { \__um_to_usv:nn {#4} {#5} } - \int_eval:n { (#1-1)+\__um_to_usv:nn {#4} {#5} } }
+
+ \__um_set_mathalph_range:nnnn {#1} {#2} { \__um_to_usv:nn {#3} {#5} }
+ { \__um_to_usv:nn {#4} {#5} }
+ }
+\cs_new:Nn \__um_set_mathalphabet_pos:nnnn
+ {
+ \__um_usv_if_exist:nnT {#4} {#2}
+ {
+ \clist_map_inline:nn {#3}
+ { \__um_set_mathalphabet_char:nnnn {#1} {##1} {#4} {#2} }
+
+ \clist_gput_right:cx {\l__um_curr_named_slot}
+ { \int_eval:n { \__um_to_usv:nn {#4} {#2} } }
+ }
+ }
+\cs_new:Nn \__um_set_mathalphabet_numbers:nnn
+ {
+ \clist_map_inline:nn {#2}
+ { \__um_set_mathalph_range:nnnnn {10} {#1} {##1} {#3} {num} }
+ }
+\cs_new:Nn \__um_set_mathalphabet_Latin:nnn
+ {
+ \clist_map_inline:nn {#2}
+ { \__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {Latin} }
+ }
+\cs_new:Nn \__um_set_mathalphabet_latin:nnn
+ {
+ \clist_map_inline:nn {#2}
+ {
+ \__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {latin}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {h}
+ }
+ }
+\cs_new:Nn \__um_set_mathalphabet_Greek:nnn
+ {
+ \clist_map_inline:nn {#2}
+ {
+ \__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {Greek}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varTheta}
+ }
+ }
+\cs_new:Nn \__um_set_mathalphabet_greek:nnn
+ {
+ \clist_map_inline:nn {#2}
+ {
+ \__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {greek}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {epsilon}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {vartheta}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varkappa}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {phi}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varrho}
+ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varpi}
+ }
+ }
+
+%%^^A%% um-code-sym-commands.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Definition of "math symbol alphabet" commands such as `\symbf` and co.
+
+\cs_set:Npn \use@mathgroup #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!
+ {
+ \math@bgroup
+ \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
+ \__um_switchto_literal:
+ \mathgroup #2 \relax
+ \math@egroup
+ }
+ }
+\cs_set:Npn \operator@font
+ {
+ \__um_switchto_literal:
+ \__um_fontswitch:n { \g__um_operator_mathfont_tl }
+ }
+\cs_set:Nn \__um_fontswitch:n
+ {
+ \mode_if_math:T
+ {
+ \cs_set_eq:NN \math@bgroup \scan_stop:
+ \cs_set_eq:NN \__um_group_begin: \scan_stop:
+ \cs_set:Npn \__um_group_end:
+ {
+ \cs_set_eq:NN \__um_group_begin: \__um_group_begin_frozen:
+ \cs_set_eq:NN \__um_group_end: \__um_group_end_frozen:
+ \cs_set_eq:NN \math@bgroup \__ummath@bgroup
+ \cs_set_eq:NN \math@egroup \__ummath@egroup
+ }
+ \cs_set_eq:NN \math@egroup \__um_group_end:
+ #1 \scan_stop:
+ }
+ }
+\cs_new:Nn \__um_prepare_mathstyle:n
+ {
+ \seq_gput_right:Nn \g__um_mathstyles_seq {#1}
+ \__um_init_alphabet:n {#1}
+ \cs_set_protected:cpx {sym#1} ##1
+ {
+ \__um_group_begin:
+ \exp_not:n
+ {
+ \mode_if_math:F
+ {
+ \exp_args:Nc \non@alpherr {sym#1}
+ }
+ \tl_set:Nn \l__um_mathstyle_tl {#1}
+ }
+ \exp_not:c {__um_switchto_#1:} ##1
+ \__um_group_end:
+ }
+ }
+\cs_set:Nn \__um_init_alphabet:n
+ {
+ \__um_log:nx {alph-initialise} {#1}
+ \cs_set_eq:cN {__um_switchto_#1:} \prg_do_nothing:
+ }
\cs_new:Nn \__um_default_mathalph:nnn
- {
- \seq_put_right:Nx \g__um_named_ranges_seq { \tl_to_str:n {#1} }
- \seq_put_right:Nn \g__um_default_mathalph_seq {{#1}{#2}{#3}}
- \prop_gput:cnn { g__um_named_range_#1_prop } { default-alpha } {#2}
- }
+ {
+ \prop_new:c {g__um_named_range_#1_prop}
+ \seq_gput_right:Nn \g__um_default_mathalph_seq {{#1}{#2}{#3}}
+ \prop_gput:cnn { g__um_named_range_#1_prop } { default-alpha } {#2}
+ }
\__um_default_mathalph:nnn {up } {latin,Latin,greek,Greek,num,misc} {up }
\__um_default_mathalph:nnn {it } {latin,Latin,greek,Greek,misc} {it }
\__um_default_mathalph:nnn {bb } {latin,Latin,num,misc} {bb }
@@ -1684,382 +2180,945 @@
\__um_default_mathalph:nnn {bfsfup} {latin,Latin,greek,Greek,num,misc} {bfsfup}
\__um_default_mathalph:nnn {bfsfit} {latin,Latin,greek,Greek,misc} {bfsfit}
\clist_map_inline:nn
- {
- up, it, bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf,
- tt, bb, bbit, scr, bfscr, cal, bfcal, frak, bffrak,
- normal, literal, sf, bf,
- }
- { \__um_prepare_mathstyle:n {#1} }
+ {
+ up, it, bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf,
+ tt, bb, bbit, scr, bfscr, cal, bfcal, frak, bffrak,
+ normal, literal, sf, bf,
+ }
+ {
+ \__um_prepare_mathstyle:n {#1}
+ }
\clist_map_inline:nn
- { rm, it, bf, sf, tt }
- { \cs_set_eq:cc { mathtext #1 } { math #1 } }
+ { rm, it, bf, sf, tt }
+ { \cs_set_eq:cc { mathtext #1 } { math #1 } }
\clist_map_inline:nn
- {
- normal, bb , bbit, scr, bfscr, cal, bfcal, frak, bffrak, tt,
- bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf
- }
- {
- \cs_set:cpx { math #1 } { \exp_not:c { sym #1 } }
+ {
+ normal, bb , bbit, scr, bfscr, cal, bfcal, frak, bffrak, tt,
+ bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf
+ }
+ {
+ \cs_set:cpx { math #1 } { \exp_not:c { sym #1 } }
+ }
+\AtBeginDocument
+ {
+ \clist_map_inline:nn
+ { rm, it, bf, sf, tt }
+ {
+ \cs_set_protected:cpx { math #1 }
+ {
+ \exp_not:n { \bool_if:NTF } \exp_not:c { g__um_ math #1 _text_bool}
+ { \exp_not:c { mathtext #1 } }
+ { \exp_not:c { sym #1 } }
+ }
+ }
+ }
+\cs_set_protected:Npn \mathup { \mathrm }
+\cs_set_protected:Npn \symrm { \symup }
+
+%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Definitions for setting up the "math symbol alphabets".
+
+\__um_new_alphabet_config:nnn {up} {num}
+ {
+ \__um_set_normal_numbers:nn {up} {#1}
+ \__um_set_mathalphabet_numbers:nnn {up} {up} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {up} {Latin}
+ {
+ \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {up} {#1} }
+ {
+ \bool_if:NT \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} }
+ }
+ \__um_set_mathalphabet_Latin:nnn {up} {up,it} {#1}
+ \__um_set_mathalphabet_Latin:nnn {literal} {up} {up}
+ \__um_set_mathalphabet_Latin:nnn {literal} {it} {it}
+ }
+
+\__um_new_alphabet_config:nnn {up} {latin}
+ {
+ \bool_if:NTF \g__um_literal_bool { \__um_set_normal_latin:nn {up} {#1} }
+ {
+ \bool_if:NT \g__um_uplatin_bool
+ {
+ \__um_set_normal_latin:nn {up,it} {#1}
+ \__um_set_normal_char:nnn {h} {up,it} {#1}
+ \__um_set_normal_char:nnn {dotlessi} {up,it} {#1}
+ \__um_set_normal_char:nnn {dotlessj} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_latin:nnn {up} {up,it}{#1}
+ \__um_set_mathalphabet_latin:nnn {literal} {up} {up}
+ \__um_set_mathalphabet_latin:nnn {literal} {it} {it}
+ }
+
+\__um_new_alphabet_config:nnn {up} {Greek}
+ {
+ \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Greek:nn {up}{#1} }
+ {
+ \bool_if:NT \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it}{#1} }
+ }
+ \__um_set_mathalphabet_Greek:nnn {up} {up,it}{#1}
+ \__um_set_mathalphabet_Greek:nnn {literal} {up} {up}
+ \__um_set_mathalphabet_Greek:nnn {literal} {it} {it}
+ }
+
+\__um_new_alphabet_config:nnn {up} {greek}
+ {
+ \bool_if:NTF \g__um_literal_bool { \__um_set_normal_greek:nn {up} {#1} }
+ {
+ \bool_if:NT \g__um_upgreek_bool
+ {
+ \__um_set_normal_greek:nn {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_greek:nnn {up} {up,it} {#1}
+ \__um_set_mathalphabet_greek:nnn {literal} {up} {up}
+ \__um_set_mathalphabet_greek:nnn {literal} {it} {it}
+ }
+
+\__um_new_alphabet_config:nnn {up} {misc}
+ {
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla}{up}{up}
+ }
+ {
+ \bool_if:NT \g__um_upNabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla}{up,it}{up}
+ }
+ }
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_normal_char:nnn {partial}{up}{up}
+ }
+ {
+ \bool_if:NT \g__um_uppartial_bool
+ {
+ \__um_set_normal_char:nnn {partial}{up,it}{up}
+ }
+ }
+ \__um_set_mathalphabet_pos:nnnn {up} {partial} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {up} {Nabla} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {up} {dotlessi} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {up} {dotlessj} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {it} {Latin}
+ {
+ \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {it} {#1} }
+ {
+ \bool_if:NF \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} }
+ }
+ \__um_set_mathalphabet_Latin:nnn {it} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {it} {latin}
+ {
+ \bool_if:NTF \g__um_literal_bool
+ {
+ \__um_set_normal_latin:nn {it}{#1}
+ \__um_set_normal_char:nnn {h}{it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_uplatin_bool
+ {
+ \__um_set_normal_latin:nn {up,it} {#1}
+ \__um_set_normal_char:nnn {h} {up,it} {#1}
+ \__um_set_normal_char:nnn {dotlessi} {up,it} {#1}
+ \__um_set_normal_char:nnn {dotlessj} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_latin:nnn {it} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {it} {dotlessi} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {it} {dotlessj} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {it} {Greek}
+ {
+ \bool_if:NTF \g__um_literal_bool
+ {
+ \__um_set_normal_Greek:nn {it} {#1}
+ }
+ {
+ \bool_if:NF \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it} {#1} }
+ }
+ \__um_set_mathalphabet_Greek:nnn {it} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {it} {greek}
+ {
+ \bool_if:NTF \g__um_literal_bool
+ {
+ \__um_set_normal_greek:nn {it} {#1}
+ }
+ {
+ \bool_if:NF \g__um_upgreek_bool { \__um_set_normal_greek:nn {it,up} {#1} }
+ }
+ \__um_set_mathalphabet_greek:nnn {it} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {it} {misc}
+ {
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla} {it} {it}
+ }
+ {
+ \bool_if:NF \g__um_upNabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla} {up,it} {it}
+ }
+ }
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_normal_char:nnn {partial} {it} {it}
+ }
+ {
+ \bool_if:NF \g__um_uppartial_bool
+ {
+ \__um_set_normal_char:nnn {partial} {up,it} {it}
+ }
+ }
+ \__um_set_mathalphabet_pos:nnnn {it} {partial} {up,it}{#1}
+ \__um_set_mathalphabet_pos:nnnn {it} {Nabla} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bb} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {bb} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bb} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {bb} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {C} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {H} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {N} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {P} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {Q} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {R} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {Z} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bb} {num}
+ {
+ \__um_set_mathalphabet_numbers:nnn {bb} {up} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bb} {misc}
+ {
+ \__um_set_mathalphabet_pos:nnnn {bb} {Pi} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {pi} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {Gamma} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {gamma} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bb} {summation} {up} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bbit} {misc}
+ {
+ \__um_set_mathalphabet_pos:nnnn {bbit} {D} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bbit} {d} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bbit} {e} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bbit} {i} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bbit} {j} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {scr} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {scr} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {B} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {E} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {F} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {H} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {I} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {L} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {M} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {R} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {scr} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {scr} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {e} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {g} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {scr} {o} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {cal} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {cal} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {B} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {E} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {F} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {H} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {I} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {L} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {M} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {cal} {R} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {frak} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {frak} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {frak} {C} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {frak} {H} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {frak} {I} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {frak} {R} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {frak} {Z} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {frak} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {frak} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {sfup} {num}
+ {
+ \__um_set_mathalphabet_numbers:nnn {sf} {up} {#1}
+ \__um_set_mathalphabet_numbers:nnn {sfup} {up} {#1}
+ }
+\__um_new_alphabet_config:nnn {sfup} {Latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {sfup} {#1}
+ \__um_set_mathalphabet_Latin:nnn {sf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_Latin:nn {sfup,sfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {sf} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_Latin:nnn {sfup} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {sfup} {latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_latin:nn {sfup} {#1}
+ \__um_set_mathalphabet_latin:nnn {sf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_latin:nn {sfup,sfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {sf} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_latin:nnn {sfup} {up,it} {#1}
+ }
+\__um_new_alphabet_config:nnn {sfit} {Latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {sfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {sf} {it} {#1}
+ }
+ {
+ \bool_if:NF \g__um_upsans_bool
+ {
+ \__um_set_normal_Latin:nn {sfup,sfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {sf} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_Latin:nnn {sfit} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {sfit} {latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_latin:nn {sfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {sf} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_upsans_bool
+ {
+ \__um_set_normal_latin:nn {sfup,sfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {sf} {up,it}{#1}
+ }
+ }
+ \__um_set_mathalphabet_latin:nnn {sfit} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {tt} {num}
+ {
+ \__um_set_mathalphabet_numbers:nnn {tt} {up}{#1}
+ }
+\__um_new_alphabet_config:nnn {tt} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {tt} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {tt} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {tt} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfit} {Latin}
+ {
+ \bool_if:NF \g__um_bfupLatin_bool
+ {
+ \__um_set_normal_Latin:nn {bfup,bfit} {#1}
+ }
+ \__um_set_mathalphabet_Latin:nnn {bfit} {up,it}{#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {bfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bf} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_bfupLatin_bool
+ {
+ \__um_set_normal_Latin:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bf} {up,it}{#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfit} {latin}
+ {
+ \bool_if:NF \g__um_bfuplatin_bool
+ {
+ \__um_set_normal_latin:nn {bfup,bfit} {#1}
+ }
+ \__um_set_mathalphabet_latin:nnn {bfit} {up,it}{#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_latin:nn {bfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bf} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_bfuplatin_bool
+ {
+ \__um_set_normal_latin:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bf} {up,it}{#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfit} {Greek}
+ {
+ \__um_set_mathalphabet_Greek:nnn {bfit} {up,it}{#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_Greek:nn {bfit}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bf} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_bfupGreek_bool
+ {
+ \__um_set_normal_Greek:nn {bfup,bfit}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bf} {up,it}{#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfit} {greek}
+ {
+ \__um_set_mathalphabet_greek:nnn {bfit} {up,it} {#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_greek:nn {bfit} {#1}
+ \__um_set_mathalphabet_greek:nnn {bf} {it} {#1}
+ }
+ {
+ \bool_if:NF \g__um_bfupgreek_bool
+ {
+ \__um_set_normal_greek:nn {bfit,bfup} {#1}
+ \__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfit} {misc}
+ {
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ { \__um_set_normal_char:nnn {Nabla} {bfit} {#1} }
+ {
+ \bool_if:NF \g__um_upNabla_bool
+ { \__um_set_normal_char:nnn {Nabla} {bfup,bfit} {#1} }
+ }
+
+ \bool_if:NTF \g__um_literal_partial_bool
+ { \__um_set_normal_char:nnn {partial} {bfit} {#1} }
+ {
+ \bool_if:NF \g__um_uppartial_bool
+ { \__um_set_normal_char:nnn {partial} {bfup,bfit} {#1} }
+ }
+
+ \__um_set_mathalphabet_pos:nnnn {bfit} {partial} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bfit} {Nabla} {up,it} {#1}
+
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {partial} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_uppartial_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it}{#1}
+ }
+ }
+
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_upNabla_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it}{#1}
+ }
+ }
+ }
+\__um_new_alphabet_config:nnn {bfup} {num}
+ {
+ \__um_set_mathalphabet_numbers:nnn {bf} {up} {#1}
+ \__um_set_mathalphabet_numbers:nnn {bfup} {up} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bfup} {Latin}
+ {
+ \bool_if:NT \g__um_bfupLatin_bool
+ {
+ \__um_set_normal_Latin:nn {bfup,bfit} {#1}
+ }
+ \__um_set_mathalphabet_Latin:nnn {bfup} {up,it} {#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {bfup} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_bfupLatin_bool
+ {
+ \__um_set_normal_Latin:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bf} {up,it} {#1}
+ }
+ }
}
-\AtBeginDocument{
-\clist_map_inline:nn
- { rm, it, bf, sf, tt }
+
+\__um_new_alphabet_config:nnn {bfup} {latin}
+ {
+ \bool_if:NT \g__um_bfuplatin_bool
+ {
+ \__um_set_normal_latin:nn {bfup,bfit} {#1}
+ }
+ \__um_set_mathalphabet_latin:nnn {bfup} {up,it} {#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_latin:nn {bfup} {#1}
+ \__um_set_mathalphabet_latin:nnn {bf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_bfuplatin_bool
+ {
+ \__um_set_normal_latin:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bf} {up,it} {#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfup} {Greek}
+ {
+ \__um_set_mathalphabet_Greek:nnn {bfup} {up,it} {#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_Greek:nn {bfup} {#1}
+ \__um_set_mathalphabet_Greek:nnn {bf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_bfupGreek_bool
+ {
+ \__um_set_normal_Greek:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_Greek:nnn {bf} {up,it} {#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfup} {greek}
+ {
+ \__um_set_mathalphabet_greek:nnn {bfup} {up,it} {#1}
+ \bool_if:NTF \g__um_bfliteral_bool
+ {
+ \__um_set_normal_greek:nn {bfup} {#1}
+ \__um_set_mathalphabet_greek:nnn {bf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_bfupgreek_bool
+ {
+ \__um_set_normal_greek:nn {bfup,bfit} {#1}
+ \__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1}
+ }
+ }
+ }
+
+\__um_new_alphabet_config:nnn {bfup} {misc}
+ {
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla} {bfup} {#1}
+ }
+ {
+ \bool_if:NT \g__um_upNabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla} {bfup,bfit} {#1}
+ }
+ }
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_normal_char:nnn {partial} {bfup} {#1}
+ }
+ {
+ \bool_if:NT \g__um_uppartial_bool
+ {
+ \__um_set_normal_char:nnn {partial} {bfup,bfit} {#1}
+ }
+ }
+ \__um_set_mathalphabet_pos:nnnn {bfup} {partial} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bfup} {Nabla} {up,it} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bfup} {digamma} {up} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bfup} {Digamma} {up} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bf} {digamma} {up} {#1}
+ \__um_set_mathalphabet_pos:nnnn {bf} {Digamma} {up} {#1}
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_uppartial_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it} {#1}
+ }
+ }
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up}{#1}
+ }
+ {
+ \bool_if:NT \g__um_upNabla_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it} {#1}
+ }
+ }
+ }
+\__um_new_alphabet_config:nnn {bffrak} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {bffrak} {up,it}{#1}
+ }
+
+\__um_new_alphabet_config:nnn {bffrak} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {bffrak} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfscr} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {bfscr} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfscr} {latin}
+ {
+ \__um_set_mathalphabet_latin:nnn {bfscr} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfcal} {Latin}
+ {
+ \__um_set_mathalphabet_Latin:nnn {bfcal} {up,it}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfsfup} {num}
+ {
+ \__um_set_mathalphabet_numbers:nnn {bfsf} {up}{#1}
+ \__um_set_mathalphabet_numbers:nnn {bfsfup} {up}{#1}
+ }
+\__um_new_alphabet_config:nnn {bfsfup} {Latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {bfsfup} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bfsf} {up}{#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1}
+ }
+ }
+ \__um_set_mathalphabet_Latin:nnn {bfsfup} {up,it}{#1}
+ }
+
+\__um_new_alphabet_config:nnn {bfsfup} {latin}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_latin:nn {bfsfup} {#1}
+ \__um_set_mathalphabet_latin:nnn {bfsf} {up}{#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_latin:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1}
+ }
+ }
+ \__um_set_mathalphabet_latin:nnn {bfsfup} {up,it}{#1}
+ }
+
+\__um_new_alphabet_config:nnn {bfsfup} {Greek}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_Greek:nn {bfsfup}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bfsf} {up}{#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1}
+ }
+ }
+ \__um_set_mathalphabet_Greek:nnn {bfsfup} {up,it}{#1}
+ }
+
+\__um_new_alphabet_config:nnn {bfsfup} {greek}
+ {
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_greek:nn {bfsfup} {#1}
+ \__um_set_mathalphabet_greek:nnn {bfsf} {up} {#1}
+ }
+ {
+ \bool_if:NT \g__um_upsans_bool
+ {
+ \__um_set_normal_greek:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1}
+ }
+ }
+ \__um_set_mathalphabet_greek:nnn {bfsfup} {up,it} {#1}
+ }
+
+\__um_new_alphabet_config:nnn {bfsfup} {misc}
{
- \cs_set_protected:cpx { math #1 }
+ \bool_if:NTF \g__um_literal_Nabla_bool
{
- \exp_not:n { \bool_if:NTF } \exp_not:c { g__um_ math #1 _text_bool}
- { \exp_not:c { mathtext #1 } }
- { \exp_not:c { sym #1 } }
+ \__um_set_normal_char:nnn {Nabla}{bfsfup}{#1}
}
- }}
-\cs_set_protected:Npn \mathup { \mathrm }
-\cs_set_protected:Npn \symrm { \symup }
-\cs_new:Npn \__um_setup_alphabets:
- {
- \seq_if_empty:NTF \l__um_mathalph_seq
{
- \__um_log:n {setup-implicit}
- \seq_set_eq:NN \l__um_mathalph_seq \g__um_default_mathalph_seq
- \bool_set_true:N \l__um_implicit_alph_bool
- \__um_maybe_init_alphabet:n {sf}
- \__um_maybe_init_alphabet:n {bf}
- \__um_maybe_init_alphabet:n {bfsf}
+ \bool_if:NT \g__um_upNabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1}
+ }
}
+ \bool_if:NTF \g__um_literal_partial_bool
{
- \__um_log:n {setup-explicit}
- \bool_set_false:N \l__um_implicit_alph_bool
- \cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn
- \cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn
+ \__um_set_normal_char:nnn {partial}{bfsfup}{#1}
}
-
- % Now perform the mapping:
- \seq_map_inline:Nn \l__um_mathalph_seq
{
- \tl_set:No \l__um_style_tl { \use_i:nnn ##1 }
- \clist_set:No \l__um_alphabet_clist { \use_ii:nnn ##1 }
- \tl_set:No \l__um_remap_style_tl { \use_iii:nnn ##1 }
-
- % If no set of alphabets is defined:
- \clist_if_empty:NT \l__um_alphabet_clist
+ \bool_if:NT \g__um_uppartial_bool
{
- \cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n
- \prop_get:cnN { g__um_named_range_ \l__um_style_tl _prop }
- { default-alpha } \l__um_alphabet_clist
+ \__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1}
}
-
- \__um_setup_math_alphabet:
}
- \seq_if_empty:NF \l__um_missing_alph_seq { \__um_log:n { missing-alphabets } }
- }
-\cs_new:Nn \__um_setup_math_alphabet:
- {
- \clist_map_inline:Nn \l__um_alphabet_clist
+ \__um_set_mathalphabet_pos:nnnn {bfsfup} {partial} {up,it}{#1}
+ \__um_set_mathalphabet_pos:nnnn {bfsfup} {Nabla} {up,it}{#1}
+ \bool_if:NTF \g__um_literal_partial_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up}{#1}
+ }
{
- \tl_set:Nn \l__um_alphabet_tl {##1}
- \__um_if_alphabet_exists:nnTF \l__um_style_tl \l__um_alphabet_tl
+ \bool_if:NT \g__um_uppartial_bool
{
- \str_if_eq_x:nnTF {\l__um_alphabet_tl} {misc}
- {
- \__um_maybe_init_alphabet:n \l__um_style_tl
- \clist_map_break:
- }
- {
- \__um_glyph_if_exist:NnT \l__um_font { \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} }
- {
- \__um_maybe_init_alphabet:n \l__um_style_tl
- \clist_map_break:
- }
- }
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1}
}
- { \msg_warning:nnx {unicode-math} {no-alphabet} { \l__um_style_tl / \l__um_alphabet_tl } }
}
- \clist_map_inline:Nn \l__um_alphabet_clist
+ \bool_if:NTF \g__um_literal_Nabla_bool
+ {
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up}{#1}
+ }
{
- \tl_set:Nx \l__um_alphabet_tl { \tl_trim_spaces:n {##1} }
- \cs_if_exist:cT {__um_config_ \l__um_style_tl _ \l__um_alphabet_tl :n}
+ \bool_if:NT \g__um_upNabla_bool
{
- \exp_args:No \tl_if_eq:nnTF \l__um_alphabet_tl {misc}
- {
- \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)}
- \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl}
- }
- {
- \__um_glyph_if_exist:NnTF \l__um_font { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} }
- {
- \__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)}
- \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl}
- }
- {
- \bool_if:NTF \l__um_implicit_alph_bool
- {
- \seq_put_right:Nx \l__um_missing_alph_seq
- {
- \@backslashchar sym \l__um_style_tl \space
- (\tl_use:c{c__um_math_alphabet_name_ \l__um_alphabet_tl _tl})
- }
- }
- {
- \__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {up}
- }
- }
- }
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1}
}
}
}
-\cs_new:Nn \__um_map_char_noparse:nn
- { \__um_set_mathcode:nnnn {#1}{\mathalpha}{\l__um_symfont_label_tl}{#2} }
-\cs_new:Nn \__um_map_char_parse:nn
- {
- \__um_if_char_spec:nNNT {#1} {\@nil} {\mathalpha}
- { \__um_map_char_noparse:nn {#1}{#2} }
- }
-\cs_new:Nn \__um_map_char_single:nnn
- {
- \__um_map_char_single:nn { \__um_to_usv:nn {#1}{#3} }
- { \__um_to_usv:nn {#2}{#3} }
- }
-\cs_set:Nn \__um_map_chars_range:nnn
- {
- \int_step_inline:nnnn {0}{1}{#1-1}
- { \__um_map_char_single:nn {#2+##1}{#3+##1} }
- }
-\cs_new:Nn \__um_map_chars_range:nnnn
- {
- \__um_map_chars_range:nnn {#1} { \__um_to_usv:nn {#2}{#4} }
- { \__um_to_usv:nn {#3}{#4} }
- }
-\cs_set:Nn \__um_set_normal_char:nnn
+\__um_new_alphabet_config:nnn {bfsfit} {Latin}
{
- \__um_usv_if_exist:nnT {#3} {#1}
- {
- \clist_map_inline:nn {#2}
+ \bool_if:NTF \g__um_sfliteral_bool
+ {
+ \__um_set_normal_Latin:nn {bfsfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bfsf} {it}{#1}
+ }
+ {
+ \bool_if:NF \g__um_upsans_bool
{
- \__um_set_mathalphabet_pos:nnnn {normal} {#1} {##1} {#3}
- \__um_map_char_single:nnn {##1} {#3} {#1}
+ \__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1}
}
- }
- }
-\cs_new:Nn \__um_set_normal_Latin:nn
- {
- \clist_map_inline:nn {#1}
- {
- \__um_set_mathalphabet_Latin:nnn {normal} {##1} {#2}
- \__um_map_chars_range:nnnn {26} {##1} {#2} {Latin}
}
+ \__um_set_mathalphabet_Latin:nnn {bfsfit} {up,it}{#1}
}
-\cs_new:Nn \__um_set_normal_latin:nn
+
+\__um_new_alphabet_config:nnn {bfsfit} {latin}
{
- \clist_map_inline:nn {#1}
+ \bool_if:NTF \g__um_sfliteral_bool
{
- \__um_set_mathalphabet_latin:nnn {normal} {##1} {#2}
- \__um_map_chars_range:nnnn {26} {##1} {#2} {latin}
+ \__um_set_normal_latin:nn {bfsfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bfsf} {it}{#1}
}
- }
-\cs_new:Nn \__um_set_normal_greek:nn
- {
- \clist_map_inline:nn {#1}
{
- \__um_set_mathalphabet_greek:nnn {normal} {##1} {#2}
- \__um_map_chars_range:nnnn {25} {##1} {#2} {greek}
- \__um_map_char_single:nnn {##1} {#2} {epsilon}
- \__um_map_char_single:nnn {##1} {#2} {vartheta}
- \__um_map_char_single:nnn {##1} {#2} {varkappa}
- \__um_map_char_single:nnn {##1} {#2} {phi}
- \__um_map_char_single:nnn {##1} {#2} {varrho}
- \__um_map_char_single:nnn {##1} {#2} {varpi}
- \__um_set_mathalphabet_pos:nnnn {normal} {epsilon} {##1} {#2}
- \__um_set_mathalphabet_pos:nnnn {normal} {vartheta} {##1} {#2}
- \__um_set_mathalphabet_pos:nnnn {normal} {varkappa} {##1} {#2}
- \__um_set_mathalphabet_pos:nnnn {normal} {phi} {##1} {#2}
- \__um_set_mathalphabet_pos:nnnn {normal} {varrho} {##1} {#2}
- \__um_set_mathalphabet_pos:nnnn {normal} {varpi} {##1} {#2}
+ \bool_if:NF \g__um_upsans_bool
+ {
+ \__um_set_normal_latin:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1}
+ }
}
+ \__um_set_mathalphabet_latin:nnn {bfsfit} {up,it}{#1}
}
-\cs_new:Nn \__um_set_normal_Greek:nn
+
+\__um_new_alphabet_config:nnn {bfsfit} {Greek}
{
- \clist_map_inline:nn {#1}
+ \bool_if:NTF \g__um_sfliteral_bool
{
- \__um_set_mathalphabet_Greek:nnn {normal} {##1} {#2}
- \__um_map_chars_range:nnnn {25} {##1} {#2} {Greek}
- \__um_map_char_single:nnn {##1} {#2} {varTheta}
- \__um_set_mathalphabet_pos:nnnn {normal} {varTheta} {##1} {#2}
+ \__um_set_normal_Greek:nn {bfsfit}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bfsf} {it}{#1}
}
- }
-\cs_new:Nn \__um_set_normal_numbers:nn
- {
- \__um_set_mathalphabet_numbers:nnn {normal} {#1} {#2}
- \__um_map_chars_range:nnnn {10} {#1} {#2} {num}
- }
-\cs_new:Nn \__um_mathmap_noparse:nnn
- {
- \clist_map_inline:nn {#2}
{
- \tl_put_right:cx {__um_switchto_#1:}
+ \bool_if:NF \g__um_upsans_bool
{
- \__um_set_mathcode:nnnn {##1} {\mathalpha} {\l__um_symfont_label_tl} {#3}
+ \__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1}
+ \__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1}
}
}
+ \__um_set_mathalphabet_Greek:nnn {bfsfit} {up,it}{#1}
}
-\cs_new:Nn \__um_mathmap_parse:nnn
+
+\__um_new_alphabet_config:nnn {bfsfit} {greek}
{
- \clist_if_in:NnT \l__um_char_nrange_clist {#3}
+ \bool_if:NTF \g__um_sfliteral_bool
{
- \__um_mathmap_noparse:nnn {#1}{#2}{#3}
+ \__um_set_normal_greek:nn {bfsfit} {#1}
+ \__um_set_mathalphabet_greek:nnn {bfsf} {it} {#1}
}
- }
-\cs_new:Nn \__um_set_mathalphabet_char:nnnn
- {
- \__um_set_mathalphabet_char:nnn {#1} { \__um_to_usv:nn {#2} {#4} }
- { \__um_to_usv:nn {#3} {#4} }
- }
-\cs_new:Nn \__um_set_mathalph_range:nnnn
- {
- \int_step_inline:nnnn {0} {1} {#1-1}
- { \__um_set_mathalphabet_char:nnn {#2} { ##1 + #3 } { ##1 + #4 } }
- }
-\cs_new:Nn \__um_set_mathalph_range:nnnnn
- {
- \__um_set_mathalph_range:nnnn {#1} {#2} { \__um_to_usv:nn {#3} {#5} }
- { \__um_to_usv:nn {#4} {#5} }
- }
-\cs_new:Nn \__um_set_mathalphabet_pos:nnnn
- {
- \__um_usv_if_exist:nnT {#4} {#2}
{
- \clist_map_inline:nn {#3}
- { \__um_set_mathalphabet_char:nnnn {#1} {##1} {#4} {#2} }
+ \bool_if:NF \g__um_upsans_bool
+ {
+ \__um_set_normal_greek:nn {bfsfup,bfsfit} {#1}
+ \__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1}
+ }
}
+ \__um_set_mathalphabet_greek:nnn {bfsfit} {up,it} {#1}
}
-\cs_new:Nn \__um_set_mathalphabet_numbers:nnn
- {
- \clist_map_inline:nn {#2}
- { \__um_set_mathalph_range:nnnnn {10} {#1} {##1} {#3} {num} }
- }
-\cs_new:Nn \__um_set_mathalphabet_Latin:nnn
- {
- \clist_map_inline:nn {#2}
- { \__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {Latin} }
- }
-\cs_new:Nn \__um_set_mathalphabet_latin:nnn
+
+\__um_new_alphabet_config:nnn {bfsfit} {misc}
{
- \clist_map_inline:nn {#2}
+ \bool_if:NTF \g__um_literal_Nabla_bool
{
- \__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {latin}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {h}
+ \__um_set_normal_char:nnn {Nabla}{bfsfit}{#1}
}
- }
-\cs_new:Nn \__um_set_mathalphabet_Greek:nnn
- {
- \clist_map_inline:nn {#2}
{
- \__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {Greek}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varTheta}
+ \bool_if:NF \g__um_upNabla_bool
+ {
+ \__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1}
+ }
}
- }
-\cs_new:Nn \__um_set_mathalphabet_greek:nnn
- {
- \clist_map_inline:nn {#2}
+ \bool_if:NTF \g__um_literal_partial_bool
{
- \__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {greek}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {epsilon}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {vartheta}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varkappa}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {phi}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varrho}
- \__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varpi}
+ \__um_set_normal_char:nnn {partial}{bfsfit}{#1}
}
- }
-
-%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
-
-\AtBeginDocument{\__um_resolve_greek:}
-\cs_new:Npn \__um_resolve_greek:
- {
- \clist_map_inline:nn
{
- Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,
- alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,
- Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,
- mu,nu,xi,omicron,pi,rho,sigma,tau,upsilon,phi,chi,psi,omega,
- varTheta,varsigma,vartheta,varkappa,varrho,varpi,varepsilon,varphi
+ \bool_if:NF \g__um_uppartial_bool
+ {
+ \__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1}
+ }
}
+ \__um_set_mathalphabet_pos:nnnn {bfsfit} {partial} {up,it}{#1}
+ \__um_set_mathalphabet_pos:nnnn {bfsfit} {Nabla} {up,it}{#1}
+ \bool_if:NTF \g__um_literal_partial_bool
{
- \tl_set:cx {##1} { \exp_not:c { mit ##1 } }
- \tl_set:cx {up ##1} { \exp_not:N \symup \exp_not:c { ##1 } }
- \tl_set:cx {it ##1} { \exp_not:N \symit \exp_not:c { ##1 } }
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {it}{#1}
}
- }
-\AtBeginDocument{\__um_redefine_radical:}
-\cs_new:Nn \__um_redefine_radical:
- {
- \@ifpackageloaded { amsmath } { }
{
- \cs_set_nopar:Npn \r@@t ##1 ##2
+ \bool_if:NF \g__um_uppartial_bool
{
- \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
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1}
}
}
- }
-\cs_new:Npn \__um_define_active_frac:Nw #1 #2/#3
- {
- \char_set_catcode_active:N #1
- \__um_char_gmake_mathactive:N #1
- \tl_rescan:nn
+ \bool_if:NTF \g__um_literal_Nabla_bool
{
- \catcode`\_=11\relax
- \catcode`\:=11\relax
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {it}{#1}
}
{
- \cs_gset:Npx #1
+ \bool_if:NF \g__um_upNabla_bool
{
- \bool_if:NTF \l__um_smallfrac_bool {\exp_not:N\tfrac} {\exp_not:N\frac}
- {#2} {#3}
+ \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1}
}
}
}
+
+%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Assorted definitions to close up.
+
+\AtBeginDocument { \__um_resolve_greek: }
+\cs_new:Npn \__um_resolve_greek:
+ {
+ \clist_map_inline:nn
+ {
+ Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,
+ alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,
+ Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,
+ mu,nu,xi,omicron,pi,rho,sigma,tau,upsilon,phi,chi,psi,omega,
+ varTheta,varsigma,vartheta,varkappa,varrho,varpi,varepsilon,varphi
+ }
+ {
+ \tl_set:cx {##1} { \exp_not:c { mit ##1 } }
+ \tl_set:cx {up ##1} { \exp_not:N \symup \exp_not:c { ##1 } }
+ \tl_set:cx {it ##1} { \exp_not:N \symit \exp_not:c { ##1 } }
+ }
+ }
+\AtBeginDocument{ \@ifpackageloaded { amsmath } { } { \__um_redefine_radical: } }
+\cs_new:Nn \__um_redefine_radical:
+ {
+ \cs_set_nopar:Npn \r@@t ##1 ##2
+ {
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \c_math_toggle_token \m@th
+ ##1 \sqrtsign { ##2 }
+ \c_math_toggle_token
+ }
+ \__um_mathstyle_scale:NnnN ##1 { \kern } { \fontdimen 63 \g__um_sqrt_font_cmd_tl } \g__um_sqrt_font_cmd_tl
+ \box_move_up:nn
+ {
+ (\box_ht:N \l_tmpa_box - \box_dp:N \l_tmpa_box) * \number \fontdimen 65 \g__um_sqrt_font_cmd_tl / 100
+ }
+ { \box_use:N \rootbox }
+ \__um_mathstyle_scale:NnnN ##1 { \kern } { \fontdimen 64 \g__um_sqrt_font_cmd_tl } \g__um_sqrt_font_cmd_tl
+ \box_use_clear:N \l_tmpa_box
+ }
+ }
+\cs_new:Nn \__um_which_frac:nn
+ {
+ \bool_if:NTF \l__um_smallfrac_bool {\tfrac} {\frac} {#1} {#2}
+ }
\cs_new:Npn \__um_setup_active_frac:
- {
- \group_begin:
- \__um_define_active_frac:Nw ^^^^2189 0/3
- \__um_define_active_frac:Nw ^^^^2152 1/{10}
- \__um_define_active_frac:Nw ^^^^2151 1/9
- \__um_define_active_frac:Nw ^^^^215b 1/8
- \__um_define_active_frac:Nw ^^^^2150 1/7
- \__um_define_active_frac:Nw ^^^^2159 1/6
- \__um_define_active_frac:Nw ^^^^2155 1/5
- \__um_define_active_frac:Nw ^^^^00bc 1/4
- \__um_define_active_frac:Nw ^^^^2153 1/3
- \__um_define_active_frac:Nw ^^^^215c 3/8
- \__um_define_active_frac:Nw ^^^^2156 2/5
- \__um_define_active_frac:Nw ^^^^00bd 1/2
- \__um_define_active_frac:Nw ^^^^2157 3/5
- \__um_define_active_frac:Nw ^^^^215d 5/8
- \__um_define_active_frac:Nw ^^^^2154 2/3
- \__um_define_active_frac:Nw ^^^^00be 3/4
- \__um_define_active_frac:Nw ^^^^2158 4/5
- \__um_define_active_frac:Nw ^^^^215a 5/6
- \__um_define_active_frac:Nw ^^^^215e 7/8
- \group_end:
- }
-\__um_setup_active_frac:
+ {
+ \__um_mathactive_remap:nn {"2189} { \__um_which_frac:nn {0} {3} }
+ \__um_mathactive_remap:nn {"2152} { \__um_which_frac:nn {1} {10} }
+ \__um_mathactive_remap:nn {"2151} { \__um_which_frac:nn {1} {9} }
+ \__um_mathactive_remap:nn {"215B} { \__um_which_frac:nn {1} {8} }
+ \__um_mathactive_remap:nn {"2150} { \__um_which_frac:nn {1} {7} }
+ \__um_mathactive_remap:nn {"2159} { \__um_which_frac:nn {1} {6} }
+ \__um_mathactive_remap:nn {"2155} { \__um_which_frac:nn {1} {5} }
+ \__um_mathactive_remap:nn {"00BC} { \__um_which_frac:nn {1} {4} }
+ \__um_mathactive_remap:nn {"2153} { \__um_which_frac:nn {1} {3} }
+ \__um_mathactive_remap:nn {"215C} { \__um_which_frac:nn {3} {8} }
+ \__um_mathactive_remap:nn {"2156} { \__um_which_frac:nn {2} {5} }
+ \__um_mathactive_remap:nn {"00BD} { \__um_which_frac:nn {1} {2} }
+ \__um_mathactive_remap:nn {"2157} { \__um_which_frac:nn {3} {5} }
+ \__um_mathactive_remap:nn {"215D} { \__um_which_frac:nn {5} {8} }
+ \__um_mathactive_remap:nn {"2154} { \__um_which_frac:nn {2} {3} }
+ \__um_mathactive_remap:nn {"00BE} { \__um_which_frac:nn {3} {4} }
+ \__um_mathactive_remap:nn {"2158} { \__um_which_frac:nn {4} {5} }
+ \__um_mathactive_remap:nn {"215A} { \__um_which_frac:nn {5} {6} }
+ \__um_mathactive_remap:nn {"215E} { \__um_which_frac:nn {7} {8} }
+ }
+\AtBeginDocument { \__um_setup_active_frac: }
\protected\def\to{\rightarrow}
\protected\def\le{\leq}
\protected\def\ge{\geq}
@@ -2089,19 +3148,19 @@
\protected\def\smallint{\mathop{\textstyle\int}\limits}
\cs_set_eq:NN \latexe_underbar:n \underbar
\renewcommand\underbar
- {
- \mode_if_math:TF \mathunderbar \latexe_underbar:n
- }
+ {
+ \mode_if_math:TF \mathunderbar \latexe_underbar:n
+ }
\@ifpackageloaded{amsmath}
- {
- % define their own colon, perhaps I should just steal it. (It does look much better.)
- }
- {
- \cs_set_protected:Npn \colon
- {
- \bool_if:NTF \g__um_literal_colon_bool {:} { \mathpunct{:} }
- }
- }
+ {
+ % define their own colon, perhaps I should just steal it. (It does look much better.)
+ }
+ {
+ \cs_set_protected:Npn \colon
+ {
+ \bool_if:NTF \g__um_literal_colon_bool {:} { \mathpunct{:} }
+ }
+ }
\protected\def\digamma{\updigamma}
\protected\def\Digamma{\upDigamma}
\cs_set_protected:Npn \| {\Vert}
@@ -2109,47 +3168,77 @@
\cs_set_protected:Npn \cdots {\mathinner{\unicodecdots}}
\cs_set_eq:NN \__um_text_slash: \slash
\cs_set_protected:Npn \slash
- {
- \mode_if_math:TF {\mathslash} {\__um_text_slash:}
- }
-\cs_new:Npn \__um_newnot:N #1
- {
- \tl_set:Nx \l_not_token_name_tl { \token_to_str:N #1 }
- \exp_args:Nx \tl_if_empty:nF { \tl_tail:V \l_not_token_name_tl }
- {
- \tl_set:Nx \l_not_token_name_tl { \tl_tail:V \l_not_token_name_tl }
- }
- \cs_if_exist:cTF { n \l_not_token_name_tl }
- {
- \use:c { n \l_not_token_name_tl }
- }
- {
- \cs_if_exist:cTF { not \l_not_token_name_tl }
+ {
+ \mode_if_math:TF {\mathslash} {\__um_text_slash:}
+ }
+\DeclareDocumentCommand \not {m}
+ {
+ \tl_set:Nx \l__um_not_token_name_tl { \cs_to_str:N #1 }
+ \tl_if_empty:NT \l__um_not_token_name_tl
{
- \use:c { not \l_not_token_name_tl }
+ \tl_set:Nx \l__um_not_token_name_tl { \token_to_str:N #1 }
}
+ \cs_if_exist:cTF { not \l__um_not_token_name_tl }
{
- \__um_oldnot: #1
+ \use:c { not \l__um_not_token_name_tl }
}
- }
- }
-\cs_set_eq:NN \__um_oldnot: \not
-\AtBeginDocument{\cs_set_eq:NN \not \__um_newnot:N}
-\cs_new_protected_nopar:Nn \__um_setup_negations:
- {
- \cs_gset:cpn { not= } { \neq }
- \cs_gset:cpn { not< } { \nless }
- \cs_gset:cpn { not> } { \ngtr }
- \cs_gset:Npn \ngets { \nleftarrow }
- \cs_gset:Npn \nsimeq { \nsime }
- \cs_gset:Npn \nequal { \ne }
- \cs_gset:Npn \nle { \nleq }
- \cs_gset:Npn \nge { \ngeq }
- \cs_gset:Npn \ngreater { \ngtr }
- \cs_gset:Npn \nforksnot { \forks }
- }
+ {
+ \cs_if_exist:cTF { n \l__um_not_token_name_tl }
+ {
+ \use:c { n \l__um_not_token_name_tl }
+ }
+ {
+ \tl_if_eq:nnTF {#1} {$} { \notaccent{} } { \notaccent } #1
+ }
+ }
+ }
+\DeclareDocumentCommand \NewNegationCommand {mm}
+ {
+ \__um_set_negation_command:Nnn \cs_new_protected:cpn {#1} {#2}
+ }
+\DeclareDocumentCommand \RenewNegationCommand {mm}
+ {
+ \__um_set_negation_command:Nnn \cs_set_protected:cpn {#1} {#2}
+ }
+\cs_set:Nn \__um_set_negation_command:Nnn
+ {
+ \tl_set:Nx \l__um_not_token_name_tl { \cs_to_str:N #2 }
+ \tl_if_empty:NT \l__um_not_token_name_tl
+ {
+ \tl_set:Nx \l__um_not_token_name_tl { \token_to_str:N #2 }
+ }
+ #1 { not \l__um_not_token_name_tl } { #3 }
+ }
+\NewNegationCommand { = } { \neq }
+\NewNegationCommand { < } { \nless }
+\NewNegationCommand { > } { \ngtr }
+\NewNegationCommand { \gets } { \nleftarrow }
+\NewNegationCommand { \simeq } { \nsime }
+\NewNegationCommand { \equal } { \ne }
+\NewNegationCommand { \le } { \nleq }
+\NewNegationCommand { \ge } { \ngeq }
+\NewNegationCommand { \greater } { \ngtr }
+\NewNegationCommand { \forksnot } { \forks }
+\int_step_inline:nnnn {0} {1} {9}
+ {
+ \__um_mathactive_remap:nn {"FF10+#1} {\char\int_eval:n{`\0+#1}}
+ }
+\int_step_inline:nnnn {0} {1} {26}
+ {
+ \__um_mathactive_remap:nn {"FF21+#1} {\char\int_eval:n{`\A+#1}}
+ \__um_mathactive_remap:nn {"FF41+#1} {\char\int_eval:n{`\a+#1}}
+ }
+\cs_new:Nn \__um_undeclare_symbol:N
+ {
+ \cs_set_protected:Npn #1
+ { \__um_error:nx {legacy-char-not-supported} { \token_to_str:N #1 } }
+ }
+\__um_undeclare_symbol:N \arrowvert
+\__um_undeclare_symbol:N \Arrowvert
+\__um_undeclare_symbol:N \bracevert
%%^^A%% um-code-primes.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% The definitions needed for the input of primes.
\cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup}
\cs_new:Nn \__um_superscript:n
@@ -2171,17 +3260,17 @@
{
{1} { \__um_superscript:n {#1} }
{2} {
- \__um_glyph_if_exist:NnTF \l__um_font {"2033}
+ \__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2033}
{ \__um_superscript:n {\__um_prime_double_mchar} }
{ \__um_nprimes:Nn #1 {#2} }
}
{3} {
- \__um_glyph_if_exist:NnTF \l__um_font {"2034}
+ \__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2034}
{ \__um_superscript:n {\__um_prime_triple_mchar} }
{ \__um_nprimes:Nn #1 {#2} }
}
{4} {
- \__um_glyph_if_exist:NnTF \l__um_font {"2057}
+ \__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2057}
{ \__um_superscript:n {\__um_prime_quad_mchar} }
{ \__um_nprimes:Nn #1 {#2} }
}
@@ -2196,12 +3285,12 @@
{
{1} { \__um_superscript:n {#1} }
{2} {
- \__um_glyph_if_exist:NnTF \l__um_font {"2036}
+ \__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2036}
{ \__um_superscript:n {\__um_backprime_double_mchar} }
{ \__um_nprimes:Nn #1 {#2} }
}
{3} {
- \__um_glyph_if_exist:NnTF \l__um_font {"2037}
+ \__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2037}
{ \__um_superscript:n {\__um_backprime_triple_mchar} }
{ \__um_nprimes:Nn #1 {#2} }
}
@@ -2433,1293 +3522,352 @@
\group_end:
%%^^A%% um-code-sscript.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Setup for active chars needed to process subscript/superscript input chars.
-\group_begin:
\cs_new:Nn \__um_setup_active_superscript:nn
- {
- \prop_gput:Nnn \g__um_supers_prop {#1} {#2}
- \char_set_catcode_active:N #1
- \__um_char_gmake_mathactive:N #1
- \scantokens
- {
- \cs_gset:Npn #1
- {
- \tl_set:Nn \l__um_ss_chain_tl {#2}
- \cs_set_eq:NN \__um_sub_or_super:n \sp
- \tl_set:Nn \l__um_tmpa_tl {supers}
- \__um_scan_sscript:
- }
- }
- }
-\__um_setup_active_superscript:nn {^^^^2070} {0}
-\__um_setup_active_superscript:nn {^^^^00b9} {1}
-\__um_setup_active_superscript:nn {^^^^00b2} {2}
-\__um_setup_active_superscript:nn {^^^^00b3} {3}
-\__um_setup_active_superscript:nn {^^^^2074} {4}
-\__um_setup_active_superscript:nn {^^^^2075} {5}
-\__um_setup_active_superscript:nn {^^^^2076} {6}
-\__um_setup_active_superscript:nn {^^^^2077} {7}
-\__um_setup_active_superscript:nn {^^^^2078} {8}
-\__um_setup_active_superscript:nn {^^^^2079} {9}
-\__um_setup_active_superscript:nn {^^^^207a} {+}
-\__um_setup_active_superscript:nn {^^^^207b} {-}
-\__um_setup_active_superscript:nn {^^^^207c} {=}
-\__um_setup_active_superscript:nn {^^^^207d} {(}
-\__um_setup_active_superscript:nn {^^^^207e} {)}
-\__um_setup_active_superscript:nn {^^^^2071} {i}
-\__um_setup_active_superscript:nn {^^^^207f} {n}
-\__um_setup_active_superscript:nn {^^^^02b0} {h}
-\__um_setup_active_superscript:nn {^^^^02b2} {j}
-\__um_setup_active_superscript:nn {^^^^02b3} {r}
-\__um_setup_active_superscript:nn {^^^^02b7} {w}
-\__um_setup_active_superscript:nn {^^^^02b8} {y}
+ {
+ \prop_gput:Nxn \g__um_supers_prop { \int_eval:n {#1} } {#2}
+ \__um_mathactive_remap:nn {#1}
+ {
+ \tl_set:Nn \l__um_ss_chain_tl {#2}
+ \cs_set_eq:NN \__um_sub_or_super:n \sp
+ \tl_set:Nn \l__um_tmpa_tl {supers}
+ \__um_scan_sscript:
+ }
+ }
\cs_new:Nn \__um_setup_active_subscript:nn
- {
- \prop_gput:Nnn \g__um_subs_prop {#1} {#2}
- \char_set_catcode_active:N #1
- \__um_char_gmake_mathactive:N #1
- \scantokens
- {
- \cs_gset:Npn #1
- {
- \tl_set:Nn \l__um_ss_chain_tl {#2}
- \cs_set_eq:NN \__um_sub_or_super:n \sb
- \tl_set:Nn \l__um_tmpa_tl {subs}
- \__um_scan_sscript:
- }
- }
- }
-\__um_setup_active_subscript:nn {^^^^2080} {0}
-\__um_setup_active_subscript:nn {^^^^2081} {1}
-\__um_setup_active_subscript:nn {^^^^2082} {2}
-\__um_setup_active_subscript:nn {^^^^2083} {3}
-\__um_setup_active_subscript:nn {^^^^2084} {4}
-\__um_setup_active_subscript:nn {^^^^2085} {5}
-\__um_setup_active_subscript:nn {^^^^2086} {6}
-\__um_setup_active_subscript:nn {^^^^2087} {7}
-\__um_setup_active_subscript:nn {^^^^2088} {8}
-\__um_setup_active_subscript:nn {^^^^2089} {9}
-\__um_setup_active_subscript:nn {^^^^208a} {+}
-\__um_setup_active_subscript:nn {^^^^208b} {-}
-\__um_setup_active_subscript:nn {^^^^208c} {=}
-\__um_setup_active_subscript:nn {^^^^208d} {(}
-\__um_setup_active_subscript:nn {^^^^208e} {)}
-\__um_setup_active_subscript:nn {^^^^2090} {a}
-\__um_setup_active_subscript:nn {^^^^2091} {e}
-\__um_setup_active_subscript:nn {^^^^2095} {h}
-\__um_setup_active_subscript:nn {^^^^1d62} {i}
-\__um_setup_active_subscript:nn {^^^^2c7c} {j}
-\__um_setup_active_subscript:nn {^^^^2096} {k}
-\__um_setup_active_subscript:nn {^^^^2097} {l}
-\__um_setup_active_subscript:nn {^^^^2098} {m}
-\__um_setup_active_subscript:nn {^^^^2099} {n}
-\__um_setup_active_subscript:nn {^^^^2092} {o}
-\__um_setup_active_subscript:nn {^^^^209a} {p}
-\__um_setup_active_subscript:nn {^^^^1d63} {r}
-\__um_setup_active_subscript:nn {^^^^209b} {s}
-\__um_setup_active_subscript:nn {^^^^209c} {t}
-\__um_setup_active_subscript:nn {^^^^1d64} {u}
-\__um_setup_active_subscript:nn {^^^^1d65} {v}
-\__um_setup_active_subscript:nn {^^^^2093} {x}
-\__um_setup_active_subscript:nn {^^^^1d66} {\beta}
-\__um_setup_active_subscript:nn {^^^^1d67} {\gamma}
-\__um_setup_active_subscript:nn {^^^^1d68} {\rho}
-\__um_setup_active_subscript:nn {^^^^1d69} {\phi}
-\__um_setup_active_subscript:nn {^^^^1d6a} {\chi}
-\group_end:
-\cs_new:Npn \__um_scan_sscript:
- {
- \__um_scan_sscript:TF
- {
- \__um_scan_sscript:
- }
- {
- \__um_sub_or_super:n {\l__um_ss_chain_tl}
- }
- }
-\cs_new:Npn \__um_scan_sscript:TF #1#2
- {
- \peek_N_type:TF
- {
- \group_align_safe_begin:
- \__um_scan_sscript_aux:nnN {#1} {#2}
- }
- {#2}
- }
-\cs_new:Npn \__um_scan_sscript_aux:nnN #1#2#3
- {
- \prop_get:cnNTF {g__um_\l__um_tmpa_tl _prop} {#3} \l__um_tmpb_tl
- {
- \tl_put_right:NV \l__um_ss_chain_tl \l__um_tmpb_tl
- \group_align_safe_end:
- #1
- }
- { \group_align_safe_end: #2 #3 }
- }
+ {
+ \prop_gput:Nxn \g__um_subs_prop { \int_eval:n {#1} } {#2}
+ \__um_mathactive_remap:nn {#1}
+ {
+ \tl_set:Nn \l__um_ss_chain_tl {#2}
+ \cs_set_eq:NN \__um_sub_or_super:n \sb
+ \tl_set:Nn \l__um_tmpa_tl {subs}
+ \__um_scan_sscript:
+ }
+ }
+\cs_new:Nn \__um_scan_sscript:
+ {
+ \__um_scan_sscript:TF
+ { \__um_scan_sscript: }
+ { \__um_sub_or_super:n {\l__um_ss_chain_tl} }
+ }
+\cs_new:Nn \__um_scan_sscript:TF
+ {
+ \peek_N_type:TF
+ {
+ \group_align_safe_begin:
+ \__um_scan_sscript_aux:nnN {#1} {#2}
+ }
+ {#2}
+ }
+\cs_new:Nn \__um_scan_sscript_aux:nnN
+ {
+ \tl_set:Nx \l__um_tmpa_key_tl { \tl_to_str:n {#3} }
+ \prop_get:cxNTF {g__um_\l__um_tmpa_tl _prop}
+ { \int_eval:n { \exp_after:wN ` \l__um_tmpa_key_tl } }
+ \l__um_tmpb_tl
+ {
+ \tl_put_right:NV \l__um_ss_chain_tl \l__um_tmpb_tl
+ \group_align_safe_end:
+ #1
+ }
+ { \group_align_safe_end: #2 #3 }
+ }
+\__um_setup_active_superscript:nn {"2070} {0}
+\__um_setup_active_superscript:nn {"00B9} {1}
+\__um_setup_active_superscript:nn {"00B2} {2}
+\__um_setup_active_superscript:nn {"00B3} {3}
+\__um_setup_active_superscript:nn {"2074} {4}
+\__um_setup_active_superscript:nn {"2075} {5}
+\__um_setup_active_superscript:nn {"2076} {6}
+\__um_setup_active_superscript:nn {"2077} {7}
+\__um_setup_active_superscript:nn {"2078} {8}
+\__um_setup_active_superscript:nn {"2079} {9}
+\__um_setup_active_superscript:nn {"207A} {+}
+\__um_setup_active_superscript:nn {"207B} {-}
+\__um_setup_active_superscript:nn {"207C} {=}
+\__um_setup_active_superscript:nn {"207D} {(}
+\__um_setup_active_superscript:nn {"207E} {)}
+\__um_setup_active_superscript:nn {"2071} {i}
+\__um_setup_active_superscript:nn {"207F} {n}
+\__um_setup_active_superscript:nn {"02B0} {h}
+\__um_setup_active_superscript:nn {"02B2} {j}
+\__um_setup_active_superscript:nn {"02B3} {r}
+\__um_setup_active_superscript:nn {"02B7} {w}
+\__um_setup_active_superscript:nn {"02B8} {y}
+\__um_setup_active_subscript:nn {"2080} {0}
+\__um_setup_active_subscript:nn {"2081} {1}
+\__um_setup_active_subscript:nn {"2082} {2}
+\__um_setup_active_subscript:nn {"2083} {3}
+\__um_setup_active_subscript:nn {"2084} {4}
+\__um_setup_active_subscript:nn {"2085} {5}
+\__um_setup_active_subscript:nn {"2086} {6}
+\__um_setup_active_subscript:nn {"2087} {7}
+\__um_setup_active_subscript:nn {"2088} {8}
+\__um_setup_active_subscript:nn {"2089} {9}
+\__um_setup_active_subscript:nn {"208A} {+}
+\__um_setup_active_subscript:nn {"208B} {-}
+\__um_setup_active_subscript:nn {"208C} {=}
+\__um_setup_active_subscript:nn {"208D} {(}
+\__um_setup_active_subscript:nn {"208E} {)}
+\__um_setup_active_subscript:nn {"2090} {a}
+\__um_setup_active_subscript:nn {"2091} {e}
+\__um_setup_active_subscript:nn {"2095} {h}
+\__um_setup_active_subscript:nn {"1D62} {i}
+\__um_setup_active_subscript:nn {"2C7C} {j}
+\__um_setup_active_subscript:nn {"2096} {k}
+\__um_setup_active_subscript:nn {"2097} {l}
+\__um_setup_active_subscript:nn {"2098} {m}
+\__um_setup_active_subscript:nn {"2099} {n}
+\__um_setup_active_subscript:nn {"2092} {o}
+\__um_setup_active_subscript:nn {"209A} {p}
+\__um_setup_active_subscript:nn {"1D63} {r}
+\__um_setup_active_subscript:nn {"209B} {s}
+\__um_setup_active_subscript:nn {"209C} {t}
+\__um_setup_active_subscript:nn {"1D64} {u}
+\__um_setup_active_subscript:nn {"1D65} {v}
+\__um_setup_active_subscript:nn {"2093} {x}
+\__um_setup_active_subscript:nn {"1D66} {\beta}
+\__um_setup_active_subscript:nn {"1D67} {\gamma}
+\__um_setup_active_subscript:nn {"1D68} {\rho}
+\__um_setup_active_subscript:nn {"1D69} {\phi}
+\__um_setup_active_subscript:nn {"1D6A} {\chi}
%%^^A%% um-code-compat.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Compatibility with 3rd party packages.
-\cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnnn
- {
- \cs_if_exist:NT #1
- {
- \token_if_macro:NTF #1
- {
- \group_begin:
- #2 \__um_tmpa:w #3 { #4 }
- \cs_if_eq:NNTF #1 \__um_tmpa:w
- {
- \msg_info:nnx { unicode-math } { patch-macro }
- { \token_to_str:N #1 }
- \group_end:
- #2 #1 #3
- { #6 }
- }
- {
- \msg_warning:nnxxx { unicode-math } { wrong-meaning }
- { \token_to_str:N #1 } { \token_to_meaning:N #1 }
- { \token_to_meaning:N \__um_tmpa:w }
- \group_end:
- }
- }
- {
- \msg_warning:nnx { unicode-math } { macro-expected }
- { \token_to_str:N #1 }
- }
- }
- }
\cs_new_protected_nopar:Nn \__um_check_and_fix:NNnnn
- {
- \__um_check_and_fix:NNnnnn #1 #2 { #3 } { #4 } { #5 } { #5 }
- }
-\cs_new_protected_nopar:Nn \__um_check_and_fix_luatex:NNnnn
- {
- }
-\cs_generate_variant:Nn \__um_check_and_fix_luatex:NNnnn { c }
-\AtEndOfPackageFile * {url}
- {
- \tl_put_left:Nn \Url@FormatString { \__um_switchto_up: }
- \tl_put_right:Nn \UrlSpecials
- {
- \do\`{\mathchar`\`}
- \do\'{\mathchar`\'}
- \do\${\mathchar`\$}
- \do\&{\mathchar`\&}
- }
- }
-\AtEndOfPackageFile * {amsmath}
- {
- \tl_remove_once:Nn \@begindocumenthook
- {
- \mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax
- }
- \def\std@minus{\Umathcharnum\Umathcodenum`\-\relax}
- \def\std@equal{\Umathcharnum\Umathcodenum`\=\relax}
- \cs_set:Npn \@cdots {\mathinner{\cdots}}
- \cs_set_eq:NN \dotsb@ \cdots
- \def \resetMathstrut@
- {%
- \setbox\z@\hbox{$($}%)
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
- }
- \__um_check_and_fix:NNnnn \subarray \cs_set:Npn { #1 }
- {
- \vcenter
- \bgroup
- \Let@
- \restore@math@cr
- \default@tag
- \baselineskip \fontdimen 10~ \scriptfont \tw@
- \advance \baselineskip \fontdimen 12~ \scriptfont \tw@
- \lineskip \thr@@ \fontdimen 8~ \scriptfont \thr@@
- \lineskiplimit \lineskip
- \ialign
- \bgroup
- \ifx c #1 \hfil \fi
- $ \m@th \scriptstyle ## $
- \hfil
- \crcr
- }
- {
- \vcenter
- \c_group_begin_token
- \Let@
- \restore@math@cr
- \default@tag
- \skip_set:Nn \baselineskip
- {
- \__um_stack_num_up:N \scriptstyle
- + \__um_stack_denom_down:N \scriptstyle
- }
- \lineskip \__um_stack_vgap:N \scriptstyle
- \lineskiplimit \lineskip
- \ialign
- \c_group_begin_token
- \token_if_eq_meaning:NNT c #1 { \hfil }
- \c_math_toggle_token
- \m@th
- \scriptstyle
- \c_parameter_token \c_parameter_token
- \c_math_toggle_token
- \hfil
- \crcr
- }
- \__um_check_and_fix_luatex:NNnnn \plainroot@ \cs_set_nopar:Npn { #1 \of #2 }
- {
- \setbox \rootbox \hbox
- {
- $ \m@th \scriptscriptstyle { #1 } $
- }
- \mathchoice
- { \r@@t \displaystyle { #2 } }
- { \r@@t \textstyle { #2 } }~
- { \r@@t \scriptstyle { #2 } }
- { \r@@t \scriptscriptstyle { #2 } }
- \egroup
- }
- {
- \bool_if:nTF
- {
- \int_compare_p:nNn { \uproot@ } = { \c_zero }
- && \int_compare_p:nNn { \leftroot@ } = { \c_zero }
- }
- {
- \Uroot \l__um_radical_sqrt_tl { #1 } { #2 }
- }
- {
- \hbox_set:Nn \rootbox
- {
- \c_math_toggle_token
- \m@th
- \scriptscriptstyle { #1 }
- \c_math_toggle_token
+ {
+ \cs_if_exist:NT #1
+ {
+ \token_if_macro:NTF #1
+ {
+ \group_begin:
+ #2 \__um_tmpa:w #3 { #4 }
+ \cs_if_eq:NNTF #1 \__um_tmpa:w
+ {
+ \msg_info:nnx { unicode-math } { patch-macro } { \token_to_str:N #1 }
+ \group_end:
+ #2 #1 #3 { #5 }
+ }
+ {
+ \msg_warning:nnxxx { unicode-math } { wrong-meaning }
+ { \token_to_str:N #1 } { \token_to_meaning:N #1 }
+ { \token_to_meaning:N \__um_tmpa:w }
+ \group_end:
+ }
+ }
+ {
+ \msg_warning:nnx { unicode-math } { macro-expected }
+ { \token_to_str:N #1 }
+ }
}
- \mathchoice
- { \r@@t \displaystyle { #2 } }
- { \r@@t \textstyle { #2 } }
- { \r@@t \scriptstyle { #2 } }
- { \r@@t \scriptscriptstyle { #2 } }
- }
- \c_group_end_token
- }
- \__um_check_and_fix:NNnnnn \r@@t \cs_set_nopar:Npn { #1 #2 }
- {
- \setboxz@h { $ \m@th #1 \sqrtsign { #2 } $ }
- \dimen@ \ht\z@
- \advance \dimen@ -\dp\z@
- \setbox\@ne \hbox { $ \m@th #1 \mskip \uproot@ mu $ }
- \advance \dimen@ by 1.667 \wd\@ne
- \mkern -\leftroot@ mu
- \mkern 5mu
- \raise .6\dimen@ \copy\rootbox
- \mkern -10mu
- \mkern \leftroot@ mu
- \boxz@
- }
- {
- \hbox_set:Nn \l_tmpa_box
- {
- \c_math_toggle_token
- \m@th
- #1
- \mskip \uproot@ mu
- \c_math_toggle_token
- }
- \Uroot \l__um_radical_sqrt_tl
- {
- \box_move_up:nn { \box_wd:N \l_tmpa_box }
- {
- \hbox:n
+ }
+\AtEndOfPackageFile * {url}
+ {
+ \tl_put_left:Nn \Url@FormatString { \__um_switchto_up: }
+ \tl_put_right:Nn \UrlSpecials
+ {
+ \do \` { \mathchar`\` }
+ \do \' { \mathchar`\' }
+ \do \$ { \mathchar`\$ }
+ \do \& { \mathchar`\& }
+ }
+ }
+\AtEndOfPackageFile * { mathtools }
+ {
+ \__um_check_and_fix:NNnnn \MT_cramped_internal:Nn \cs_set_nopar:Npn { #1 #2 }
+ {
+ \sbox \z@ { $ \m@th #1 \nulldelimiterspace = \z@ \radical \z@ { #2 } $ }
+ \ifx #1 \displaystyle
+ \dimen@ = \fontdimen 8 \textfont 3
+ \advance \dimen@ .25 \fontdimen 5 \textfont 2
+ \else
+ \dimen@ = 1.25 \fontdimen 8
+ \ifx #1 \textstyle
+ \textfont
+ \else
+ \ifx #1 \scriptstyle
+ \scriptfont
+ \else
+ \scriptscriptfont
+ \fi
+ \fi
+ 3
+ \fi
+ \advance \dimen@ -\ht\z@
+ \ht\z@ = -\dimen@
+ \box\z@
+ }
+ {
+ \hbox_set:Nn \l_tmpa_box
{
- \c_math_toggle_token
- \m@th
- \mkern -\leftroot@ mu
- \box_use:N \rootbox
- \mkern \leftroot@ mu
- \c_math_toggle_token
+ \color@setgroup \c_math_toggle_token \m@th
+ #1
+ \dim_zero:N \nulldelimiterspace
+ \XeTeXradical \c_two_hundred_fifty_five \c_zero { #2 }
+ \c_math_toggle_token \color@endgroup
}
- }
- }
- { #2 }
- }
- {
- \hbox_set:Nn \l_tmpa_box
- {
- \c_math_toggle_token
- \m@th
- #1
- \sqrtsign { #2 }
- \c_math_toggle_token
- }
- \hbox_set:Nn \l_tmpb_box
- {
- \c_math_toggle_token
- \m@th
- #1
- \mskip \uproot@ mu
- \c_math_toggle_token
- }
- \mkern -\leftroot@ mu
- \__um_mathstyle_scale:Nnn #1 { \kern }
- {
- \fontdimen 63 \l__um_font
- }
- \box_move_up:nn
- {
- \box_wd:N \l_tmpb_box
- + (\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
- }
- \mkern \leftroot@ mu
- \box_use_clear:N \l_tmpa_box
- }
- }
-\AtEndOfPackageFile * {amsopn}
- {
- \cs_set:Npn \newmcodes@
- {
- \mathcode`\'39\scan_stop:
- \mathcode`\*42\scan_stop:
- \mathcode`\."613A\scan_stop:
-%% \ifnum\mathcode`\-=45 \else
-%% \mathchardef\std@minus\mathcode`\-\relax
-%% \fi
- \mathcode`\-45\scan_stop:
- \mathcode`\/47\scan_stop:
- \mathcode`\:"603A\scan_stop:
- }
- }
-\AtEndOfPackageFile * { mathtools }
- {
- \__um_check_and_fix:NNnnn
- \MT_cramped_internal:Nn \cs_set_nopar:Npn { #1 #2 }
- {
- \sbox \z@
- {
- $
- \m@th
- #1
- \nulldelimiterspace = \z@
- \radical \z@ { #2 }
- $
- }
- \ifx #1 \displaystyle
- \dimen@ = \fontdimen 8 \textfont 3
- \advance \dimen@ .25 \fontdimen 5 \textfont 2
- \else
- \dimen@ = 1.25 \fontdimen 8
- \ifx #1 \textstyle
- \textfont
- \else
- \ifx #1 \scriptstyle
- \scriptfont
- \else
- \scriptscriptfont
- \fi
- \fi
- 3
- \fi
- \advance \dimen@ -\ht\z@
- \ht\z@ = -\dimen@
- \box\z@
- }
- {
- \hbox_set:Nn \l_tmpa_box
- {
- \color@setgroup
- \c_math_toggle_token
- \m@th
- #1
- \dim_zero:N \nulldelimiterspace
- \XeTeXradical \c_two_hundred_fifty_five \c_zero { #2 }
- \c_math_toggle_token
- \color@endgroup
- }
- \box_set_ht:Nn \l_tmpa_box
- {
- \box_ht:N \l_tmpa_box
- - \__um_radical_vgap:N #1
- }
- \box_use_clear:N \l_tmpa_box
+ \box_set_ht:Nn \l_tmpa_box
+ {
+ \box_ht:N \l_tmpa_box - \__um_radical_vgap:N #1
+ }
+ \box_use_clear:N \l_tmpa_box
}
- }
+ }
\AtEndOfPackageFile * { mathtools }
- {
+ {
\cs_set_eq:NN \MToverbracket \overbracket
\cs_set_eq:NN \MTunderbracket \underbracket
\AtBeginDocument
- {
- \msg_warning:nn { unicode-math } { mathtools-overbracket }
+ {
+ \msg_warning:nn { unicode-math } { mathtools-overbracket }
-\def\downbracketfill#1#2
- {%
- \edef\l_MT_bracketheight_fdim{.27ex}%
- \downbracketend{#1}{#2}
+ \cs_set:Npn \downbracketfill #1 #2
+ {
+ \tl_set:Nn \l_MT_bracketheight_fdim {.27ex}
+ \downbracketend {#1} {#2}
\leaders \vrule \@height #1 \@depth \z@ \hfill
- \downbracketend{#1}{#2}%
- }
-\def\upbracketfill#1#2
- {%
- \edef\l_MT_bracketheight_fdim{.27ex}%
- \upbracketend{#1}{#2}
- \leaders \vrule \@height \z@ \@depth #1 \hfill
- \upbracketend{#1}{#2}%
- }
-\let\Uoverbracket =\overbracket
-\let\Uunderbracket=\underbracket
- \let\overbracket =\MToverbracket
- \let\underbracket =\MTunderbracket
- }% end of AtBeginDocument
- \msg_warning:nn { unicode-math } { mathtools-colon }
- \NewDocumentCommand \dblcolon { } { \Colon }
- \NewDocumentCommand \coloneqq { } { \coloneq }
- \NewDocumentCommand \Coloneqq { } { \Coloneq }
- \NewDocumentCommand \eqqcolon { } { \eqcolon }
- }
-\AtEndOfPackageFile * { colonequals }
- {
- \msg_warning:nn { unicode-math } { colonequals }
- \RenewDocumentCommand \ratio { } { \mathratio }
- \RenewDocumentCommand \coloncolon { } { \Colon }
- \RenewDocumentCommand \minuscolon { } { \dashcolon }
- \RenewDocumentCommand \colonequals { } { \coloneq }
- \RenewDocumentCommand \equalscolon { } { \eqcolon }
- \RenewDocumentCommand \coloncolonequals { } { \Coloneq }
- }
-
-%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
-
-\__um_new_alphabet_config:nnn {up} {num}
- {
- \__um_set_normal_numbers:nn {up} {#1}
- \__um_set_mathalphabet_numbers:nnn {up} {up} {#1}
- }
-
-\__um_new_alphabet_config:nnn {up} {Latin}
- {
- \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {up} {#1} }
- {
- \bool_if:NT \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} }
- }
- \__um_set_mathalphabet_Latin:nnn {up} {up,it} {#1}
- \__um_set_mathalphabet_Latin:nnn {literal} {up} {up}
- \__um_set_mathalphabet_Latin:nnn {literal} {it} {it}
- }
-
-\__um_new_alphabet_config:nnn {up} {latin}
- {
- \bool_if:NTF \g__um_literal_bool { \__um_set_normal_latin:nn {up} {#1} }
- {
- \bool_if:NT \g__um_uplatin_bool
- {
- \__um_set_normal_latin:nn {up,it} {#1}
- \__um_set_normal_char:nnn {h} {up,it} {#1}
- \__um_set_normal_char:nnn {dotlessi} {up,it} {#1}
- \__um_set_normal_char:nnn {dotlessj} {up,it} {#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {up} {up,it}{#1}
- \__um_set_mathalphabet_latin:nnn {literal} {up} {up}
- \__um_set_mathalphabet_latin:nnn {literal} {it} {it}
- }
-
-\__um_new_alphabet_config:nnn {up} {Greek}
- {
- \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Greek:nn {up}{#1} }
- {
- \bool_if:NT \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it}{#1} }
- }
- \__um_set_mathalphabet_Greek:nnn {up} {up,it}{#1}
- \__um_set_mathalphabet_Greek:nnn {literal} {up} {up}
- \__um_set_mathalphabet_Greek:nnn {literal} {it} {it}
- }
-
-\__um_new_alphabet_config:nnn {up} {greek}
- {
- \bool_if:NTF \g__um_literal_bool { \__um_set_normal_greek:nn {up} {#1} }
- {
- \bool_if:NT \g__um_upgreek_bool
- {
- \__um_set_normal_greek:nn {up,it} {#1}
- }
- }
- \__um_set_mathalphabet_greek:nnn {up} {up,it} {#1}
- \__um_set_mathalphabet_greek:nnn {literal} {up} {up}
- \__um_set_mathalphabet_greek:nnn {literal} {it} {it}
- }
-
-\__um_new_alphabet_config:nnn {up} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{up}{up}
- }
- {
- \bool_if:NT \g__um_upNabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{up,it}{up}
- }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_normal_char:nnn {partial}{up}{up}
- }
- {
- \bool_if:NT \g__um_uppartial_bool
- {
- \__um_set_normal_char:nnn {partial}{up,it}{up}
- }
- }
- \__um_set_mathalphabet_pos:nnnn {up} {partial} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {up} {Nabla} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {up} {dotlessi} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {up} {dotlessj} {up,it} {#1}
- }
-\__um_new_alphabet_config:nnn {it} {Latin}
- {
- \bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {it} {#1} }
- {
- \bool_if:NF \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} }
- }
- \__um_set_mathalphabet_Latin:nnn {it}{up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {it} {latin}
- {
- \bool_if:NTF \g__um_literal_bool
- {
- \__um_set_normal_latin:nn {it} {#1}
- \__um_set_normal_char:nnn {h}{it}{#1}
- }
- {
- \bool_if:NF \g__um_uplatin_bool
- {
- \__um_set_normal_latin:nn {up,it} {#1}
- \__um_set_normal_char:nnn {h}{up,it}{#1}
- \__um_set_normal_char:nnn {dotlessi}{up,it}{#1}
- \__um_set_normal_char:nnn {dotlessj}{up,it}{#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {it} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {it} {dotlessi} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {it} {dotlessj} {up,it} {#1}
- }
-
-\__um_new_alphabet_config:nnn {it} {Greek}
- {
- \bool_if:NTF \g__um_literal_bool
- {
- \__um_set_normal_Greek:nn {it}{#1}
- }
- {
- \bool_if:NF \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it}{#1} }
- }
- \__um_set_mathalphabet_Greek:nnn {it} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {it} {greek}
- {
- \bool_if:NTF \g__um_literal_bool
- {
- \__um_set_normal_greek:nn {it} {#1}
- }
- {
- \bool_if:NF \g__um_upgreek_bool { \__um_set_normal_greek:nn {it,up} {#1} }
- }
- \__um_set_mathalphabet_greek:nnn {it} {up,it} {#1}
- }
-
-\__um_new_alphabet_config:nnn {it} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{it}{it}
- }
- {
- \bool_if:NF \g__um_upNabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{up,it}{it}
- }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_normal_char:nnn {partial}{it}{it}
- }
- {
- \bool_if:NF \g__um_uppartial_bool
- {
- \__um_set_normal_char:nnn {partial}{up,it}{it}
- }
- }
- \__um_set_mathalphabet_pos:nnnn {it} {partial} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {it} {Nabla} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bb} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {bb} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bb} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {bb} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {C} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {H} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {N} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {P} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {Q} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {R} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {Z} {up,it} {#1}
- }
-
-\__um_new_alphabet_config:nnn {bb} {num}
- {
- \__um_set_mathalphabet_numbers:nnn {bb} {up}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bb} {misc}
- {
- \__um_set_mathalphabet_pos:nnnn {bb} {Pi} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {pi} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {Gamma} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {gamma} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bb} {summation} {up} {#1}
- }
-
-\__um_new_alphabet_config:nnn {bbit} {misc}
- {
- \__um_set_mathalphabet_pos:nnnn {bbit} {D} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bbit} {d} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bbit} {e} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bbit} {i} {up,it} {#1}
- \__um_set_mathalphabet_pos:nnnn {bbit} {j} {up,it} {#1}
- }
-\__um_new_alphabet_config:nnn {scr} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {scr} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {B}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {E}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {F}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {H}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {I}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {L}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {M}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {R}{up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {scr} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {scr} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {e}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {g}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {scr} {o}{up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {cal} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {cal} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {B}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {E}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {F}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {H}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {I}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {L}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {M}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {cal} {R}{up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {frak} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {frak} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {frak} {C}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {frak} {H}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {frak} {I}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {frak} {R}{up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {frak} {Z}{up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {frak} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {frak} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {sfup} {num}
- {
- \__um_set_mathalphabet_numbers:nnn {sf} {up}{#1}
- \__um_set_mathalphabet_numbers:nnn {sfup} {up}{#1}
- }
-\__um_new_alphabet_config:nnn {sfup} {Latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Latin:nn {sfup} {#1}
- \__um_set_mathalphabet_Latin:nnn {sf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_Latin:nn {sfup,sfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {sf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_Latin:nnn {sfup} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {sfup} {latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_latin:nn {sfup} {#1}
- \__um_set_mathalphabet_latin:nnn {sf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_latin:nn {sfup,sfit} {#1}
- \__um_set_mathalphabet_latin:nnn {sf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {sfup} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {sfit} {Latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Latin:nn {sfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {sf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_Latin:nn {sfup,sfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {sf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_Latin:nnn {sfit} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {sfit} {latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_latin:nn {sfit} {#1}
- \__um_set_mathalphabet_latin:nnn {sf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_latin:nn {sfup,sfit} {#1}
- \__um_set_mathalphabet_latin:nnn {sf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {sfit} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {tt} {num}
- {
- \__um_set_mathalphabet_numbers:nnn {tt} {up}{#1}
- }
-\__um_new_alphabet_config:nnn {tt} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {tt} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {tt} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {tt} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bfit} {Latin}
- {
- \bool_if:NF \g__um_bfupLatin_bool
- {
- \__um_set_normal_Latin:nn {bfup,bfit} {#1}
- }
- \__um_set_mathalphabet_Latin:nnn {bfit} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_Latin:nn {bfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_bfupLatin_bool
- {
- \__um_set_normal_Latin:nn {bfup,bfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bf} {up,it}{#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfit} {latin}
- {
- \bool_if:NF \g__um_bfuplatin_bool
- {
- \__um_set_normal_latin:nn {bfup,bfit} {#1}
- }
- \__um_set_mathalphabet_latin:nnn {bfit} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_latin:nn {bfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_bfuplatin_bool
- {
- \__um_set_normal_latin:nn {bfup,bfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bf} {up,it}{#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfit} {Greek}
- {
- \__um_set_mathalphabet_Greek:nnn {bfit} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_Greek:nn {bfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_bfupGreek_bool
- {
- \__um_set_normal_Greek:nn {bfup,bfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bf} {up,it}{#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfit} {greek}
- {
- \__um_set_mathalphabet_greek:nnn {bfit} {up,it} {#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_greek:nn {bfit} {#1}
- \__um_set_mathalphabet_greek:nnn {bf} {it} {#1}
- }
- {
- \bool_if:NF \g__um_bfupgreek_bool
- {
- \__um_set_normal_greek:nn {bfit,bfup} {#1}
- \__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfit} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- { \__um_set_normal_char:nnn {Nabla}{bfit}{#1} }
- {
- \bool_if:NF \g__um_upNabla_bool
- { \__um_set_normal_char:nnn {Nabla}{bfup,bfit}{#1} }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- { \__um_set_normal_char:nnn {partial}{bfit}{#1} }
- {
- \bool_if:NF \g__um_uppartial_bool
- { \__um_set_normal_char:nnn {partial}{bfup,bfit}{#1} }
- }
- \__um_set_mathalphabet_pos:nnnn {bfit} {partial} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfit} {Nabla} {up,it}{#1}
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {partial} {it}{#1}
- }
- {
- \bool_if:NF \g__um_uppartial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upNabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it}{#1}
- }
- }
- }
-\__um_new_alphabet_config:nnn {bfup} {num}
- {
- \__um_set_mathalphabet_numbers:nnn {bf} {up}{#1}
- \__um_set_mathalphabet_numbers:nnn {bfup} {up}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bfup} {Latin}
- {
- \bool_if:NT \g__um_bfupLatin_bool
- {
- \__um_set_normal_Latin:nn {bfup,bfit} {#1}
- }
- \__um_set_mathalphabet_Latin:nnn {bfup} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_Latin:nn {bfup} {#1}
- \__um_set_mathalphabet_Latin:nnn {bf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_bfupLatin_bool
- {
- \__um_set_normal_Latin:nn {bfup,bfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bf} {up,it}{#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfup} {latin}
- {
- \bool_if:NT \g__um_bfuplatin_bool
- {
- \__um_set_normal_latin:nn {bfup,bfit} {#1}
- }
- \__um_set_mathalphabet_latin:nnn {bfup} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_latin:nn {bfup} {#1}
- \__um_set_mathalphabet_latin:nnn {bf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_bfuplatin_bool
- {
- \__um_set_normal_latin:nn {bfup,bfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bf} {up,it}{#1}
- }
- }
- }
-\__um_new_alphabet_config:nnn {bfup} {Greek}
- {
- \__um_set_mathalphabet_Greek:nnn {bfup} {up,it}{#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_Greek:nn {bfup}{#1}
- \__um_set_mathalphabet_Greek:nnn {bf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_bfupGreek_bool
- {
- \__um_set_normal_Greek:nn {bfup,bfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bf} {up,it}{#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfup} {greek}
- {
- \__um_set_mathalphabet_greek:nnn {bfup} {up,it} {#1}
- \bool_if:NTF \g__um_bfliteral_bool
- {
- \__um_set_normal_greek:nn {bfup} {#1}
- \__um_set_mathalphabet_greek:nnn {bf} {up} {#1}
- }
- {
- \bool_if:NT \g__um_bfupgreek_bool
- {
- \__um_set_normal_greek:nn {bfup,bfit} {#1}
- \__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1}
- }
- }
- }
-
-\__um_new_alphabet_config:nnn {bfup} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfup}{#1}
- }
- {
- \bool_if:NT \g__um_upNabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfup,bfit}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfup}{#1}
- }
- {
- \bool_if:NT \g__um_uppartial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfup,bfit}{#1}
- }
- }
- \__um_set_mathalphabet_pos:nnnn {bfup} {partial} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfup} {Nabla} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfup} {digamma} {up}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfup} {Digamma} {up}{#1}
- \__um_set_mathalphabet_pos:nnnn {bf} {digamma} {up}{#1}
- \__um_set_mathalphabet_pos:nnnn {bf} {Digamma} {up}{#1}
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up}{#1}
- }
- {
- \bool_if:NT \g__um_uppartial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upNabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it}{#1}
- }
- }
- }
-\__um_new_alphabet_config:nnn {bffrak} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {bffrak} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bffrak} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {bffrak} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bfscr} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {bfscr} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bfscr} {latin}
- {
- \__um_set_mathalphabet_latin:nnn {bfscr} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bfcal} {Latin}
- {
- \__um_set_mathalphabet_Latin:nnn {bfcal} {up,it}{#1}
- }
-\__um_new_alphabet_config:nnn {bfsfup} {num}
- {
- \__um_set_mathalphabet_numbers:nnn {bfsf} {up}{#1}
- \__um_set_mathalphabet_numbers:nnn {bfsfup} {up}{#1}
- }
-\__um_new_alphabet_config:nnn {bfsfup} {Latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Latin:nn {bfsfup} {#1}
- \__um_set_mathalphabet_Latin:nnn {bfsf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_Latin:nnn {bfsfup} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bfsfup} {latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_latin:nn {bfsfup} {#1}
- \__um_set_mathalphabet_latin:nnn {bfsf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_latin:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {bfsfup} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bfsfup} {Greek}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Greek:nn {bfsfup}{#1}
- \__um_set_mathalphabet_Greek:nnn {bfsf} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_Greek:nnn {bfsfup} {up,it}{#1}
- }
-
-\__um_new_alphabet_config:nnn {bfsfup} {greek}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_greek:nn {bfsfup} {#1}
- \__um_set_mathalphabet_greek:nnn {bfsf} {up} {#1}
- }
- {
- \bool_if:NT \g__um_upsans_bool
- {
- \__um_set_normal_greek:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1}
- }
- }
- \__um_set_mathalphabet_greek:nnn {bfsfup} {up,it} {#1}
- }
-\__um_new_alphabet_config:nnn {bfsfup} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfsfup}{#1}
- }
- {
- \bool_if:NT \g__um_upNabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfsfup}{#1}
- }
- {
- \bool_if:NT \g__um_uppartial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1}
- }
- }
- \__um_set_mathalphabet_pos:nnnn {bfsfup} {partial} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfsfup} {Nabla} {up,it}{#1}
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up}{#1}
- }
- {
- \bool_if:NT \g__um_uppartial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up}{#1}
- }
- {
- \bool_if:NT \g__um_upNabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1}
- }
- }
- }
-\__um_new_alphabet_config:nnn {bfsfit} {Latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Latin:nn {bfsfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bfsf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_Latin:nnn {bfsfit} {up,it}{#1}
- }
+ \downbracketend {#1} {#2}
+ }
-\__um_new_alphabet_config:nnn {bfsfit} {latin}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_latin:nn {bfsfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bfsf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_latin:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1}
- }
- }
- \__um_set_mathalphabet_latin:nnn {bfsfit} {up,it}{#1}
- }
+ \cs_set:Npn \upbracketfill #1 #2
+ {
+ \tl_set:Nn \l_MT_bracketheight_fdim {.27ex}
+ \upbracketend {#1} {#2}
+ \leaders \vrule \@height \z@ \@depth #1 \hfill
+ \upbracketend {#1} {#2}
+ }
-\__um_new_alphabet_config:nnn {bfsfit} {Greek}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_Greek:nn {bfsfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bfsf} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1}
- \__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1}
+ \cs_set_eq:NN \Uoverbracket \overbracket
+ \cs_set_eq:NN \Uunderbracket \underbracket
+ \cs_set_eq:NN \overbracket \MToverbracket
+ \cs_set_eq:NN \underbracket \MTunderbracket
}
- }
- \__um_set_mathalphabet_Greek:nnn {bfsfit} {up,it}{#1}
- }
+ }
+\AtEndOfPackageFile * { mathtools }
+ {
+ \msg_warning:nn { unicode-math } { mathtools-colon }
+ \NewDocumentCommand \dblcolon { } { \Colon }
+ \NewDocumentCommand \coloneqq { } { \coloneq }
+ \NewDocumentCommand \Coloneqq { } { \Coloneq }
+ \NewDocumentCommand \eqqcolon { } { \eqcolon }
+ }
+\AtEndOfPackageFile * { colonequals }
+ {
+ \msg_warning:nn { unicode-math } { colonequals }
+ \RenewDocumentCommand \ratio { } { \mathratio }
+ \RenewDocumentCommand \coloncolon { } { \Colon }
+ \RenewDocumentCommand \minuscolon { } { \dashcolon }
+ \RenewDocumentCommand \colonequals { } { \coloneq }
+ \RenewDocumentCommand \equalscolon { } { \eqcolon }
+ \RenewDocumentCommand \coloncolonequals { } { \Coloneq }
+ }
-\__um_new_alphabet_config:nnn {bfsfit} {greek}
- {
- \bool_if:NTF \g__um_sfliteral_bool
- {
- \__um_set_normal_greek:nn {bfsfit} {#1}
- \__um_set_mathalphabet_greek:nnn {bfsf} {it} {#1}
- }
- {
- \bool_if:NF \g__um_upsans_bool
- {
- \__um_set_normal_greek:nn {bfsfup,bfsfit} {#1}
- \__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1}
- }
- }
- \__um_set_mathalphabet_greek:nnn {bfsfit} {up,it} {#1}
- }
+%%^^A%% um-code-amsmath.dtx -- part of UNICODE-MATH <wspr.io/unicode-math>
+%%^^A%% Compatibility with amsmath.
-\__um_new_alphabet_config:nnn {bfsfit} {misc}
- {
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfsfit}{#1}
- }
- {
- \bool_if:NF \g__um_upNabla_bool
- {
- \__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfsfit}{#1}
- }
- {
- \bool_if:NF \g__um_uppartial_bool
- {
- \__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1}
- }
- }
- \__um_set_mathalphabet_pos:nnnn {bfsfit} {partial} {up,it}{#1}
- \__um_set_mathalphabet_pos:nnnn {bfsfit} {Nabla} {up,it}{#1}
- \bool_if:NTF \g__um_literal_partial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {it}{#1}
- }
- {
- \bool_if:NF \g__um_uppartial_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1}
- }
- }
- \bool_if:NTF \g__um_literal_Nabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {it}{#1}
- }
- {
- \bool_if:NF \g__um_upNabla_bool
- {
- \__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1}
- }
- }
- }
+\AtEndOfPackageFile * {amsmath}
+ {
+ \tl_remove_once:Nn \@begindocumenthook
+ {
+ \mathchardef\std@minus\mathcode`\-\relax
+ \mathchardef\std@equal\mathcode`\=\relax
+ }
+ \AtBeginDocument
+ {
+ \Umathcharnumdef\std@minus\Umathcodenum`-
+ \Umathcharnumdef\std@equal\Umathcodenum`=
+ }
+ \cs_set:Npn \@cdots {\mathinner{\unicodecdots}}
+ \cs_set_eq:NN \dotsb@ \cdots
+ \def \resetMathstrut@
+ {%
+ \setbox\z@\hbox{$($}%)
+ \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
+ }
+ \__um_check_and_fix:NNnnn \subarray \cs_set:Npn { #1 }
+ {
+ \vcenter
+ \bgroup
+ \Let@
+ \restore@math@cr
+ \default@tag
+ \baselineskip \fontdimen 10~ \scriptfont \tw@
+ \advance \baselineskip \fontdimen 12~ \scriptfont \tw@
+ \lineskip \thr@@ \fontdimen 8~ \scriptfont \thr@@
+ \lineskiplimit \lineskip
+ \ialign
+ \bgroup
+ \ifx c #1 \hfil \fi
+ $ \m@th \scriptstyle ## $
+ \hfil
+ \crcr
+ }
+ {
+ \vcenter
+ \c_group_begin_token
+ \Let@
+ \restore@math@cr
+ \default@tag
+ \skip_set:Nn \baselineskip
+ {
+ \__um_stack_num_up:N \scriptstyle
+ + \__um_stack_denom_down:N \scriptstyle
+ }
+ \lineskip \__um_stack_vgap:N \scriptstyle
+ \lineskiplimit \lineskip
+ \ialign
+ \c_group_begin_token
+ \token_if_eq_meaning:NNT c #1 { \hfil }
+ \c_math_toggle_token
+ \m@th
+ \scriptstyle
+ \c_parameter_token \c_parameter_token
+ \c_math_toggle_token
+ \hfil
+ \crcr
+ }
+ \__um_check_and_fix:NNnnn \r@@t \cs_set_nopar:Npn { #1 #2 }
+ {
+ \setboxz@h { $ \m@th #1 \sqrtsign { #2 } $ }
+ \dimen@ \ht\z@
+ \advance \dimen@ -\dp\z@
+ \setbox\@ne \hbox { $ \m@th #1 \mskip \uproot@ mu $ }
+ \advance \dimen@ by 1.667 \wd\@ne
+ \mkern -\leftroot@ mu
+ \mkern 5mu
+ \raise .6\dimen@ \copy\rootbox
+ \mkern -10mu
+ \mkern \leftroot@ mu
+ \boxz@
+ }
+ {
+ \hbox_set:Nn \l_tmpa_box
+ {
+ \c_math_toggle_token \m@th
+ #1 \sqrtsign { #2 }
+ \c_math_toggle_token
+ }
+ \hbox_set:Nn \l_tmpb_box
+ {
+ \c_math_toggle_token \m@th
+ #1 \mskip \uproot@ mu
+ \c_math_toggle_token
+ }
+ \mkern -\leftroot@ mu
+ \__um_mathstyle_scale:Nnn #1 { \kern } { \fontdimen 63 \g__um_sqrt_font_cmd_tl }
+ \box_move_up:nn
+ {
+ \box_wd:N \l_tmpb_box + (\box_ht:N \l_tmpa_box - \box_dp:N \l_tmpa_box)
+ * \number \fontdimen 65 \g__um_sqrt_font_cmd_tl / 100
+ }
+ { \box_use:N \rootbox }
+ \__um_mathstyle_scale:Nnn #1 { \kern } { \fontdimen 64 \g__um_sqrt_font_cmd_tl }
+ \mkern \leftroot@ mu
+ \box_use_clear:N \l_tmpa_box
+ }
+ }