| 1 |
%% |
| 2 |
%% This is file `unicode-math-luatex.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% unicode-math.dtx (with options: `package,LU') |
| 8 |
%% um-code-opening.dtx (with options: `package,LU') |
| 9 |
%% um-code-variables.dtx (with options: `package,LU') |
| 10 |
%% um-code-api.dtx (with options: `package,LU') |
| 11 |
%% um-code-ui.dtx (with options: `package,LU') |
| 12 |
%% um-code-pkgopt.dtx (with options: `package,LU') |
| 13 |
%% um-code-msg.dtx (with options: `package,LU') |
| 14 |
%% um-code-usv.dtx (with options: `package,LU') |
| 15 |
%% um-code-setchar.dtx (with options: `package,LU') |
| 16 |
%% um-code-mathtext.dtx (with options: `package,LU') |
| 17 |
%% um-code-main.dtx (with options: `package,LU') |
| 18 |
%% um-code-fontopt.dtx (with options: `package,LU') |
| 19 |
%% um-code-fontparam.dtx (with options: `package,LU') |
| 20 |
%% um-code-mathmap.dtx (with options: `package,LU') |
| 21 |
%% um-code-sym-commands.dtx (with options: `package,LU') |
| 22 |
%% um-code-alphabets.dtx (with options: `package,LU') |
| 23 |
%% um-code-primes.dtx (with options: `package,LU') |
| 24 |
%% um-code-sscript.dtx (with options: `package,LU') |
| 25 |
%% um-code-compat.dtx (with options: `package,LU') |
| 26 |
%% um-code-amsmath.dtx (with options: `package,LU') |
| 27 |
%% um-code-epilogue.dtx (with options: `package,LU') |
| 28 |
%% |
| 29 |
%% ------------------------------------------------ |
| 30 |
%% The UNICODE-MATH package <wspr.io/unicode-math> |
| 31 |
%% ------------------------------------------------ |
| 32 |
%% This package is free software and may be redistributed and/or modified under |
| 33 |
%% the conditions of the LaTeX Project Public License, version 1.3c or higher |
| 34 |
%% (your choice): <http://www.latex-project.org/lppl/>. |
| 35 |
%% ------------------------------------------------ |
| 36 |
%% Copyright 2006-2018 Will Robertson, LPPL "maintainer" |
| 37 |
%% Copyright 2010-2017 Philipp Stephani |
| 38 |
%% Copyright 2011-2017 Joseph Wright |
| 39 |
%% Copyright 2012-2015 Khaled Hosny |
| 40 |
%% ------------------------------------------------ |
| 41 |
%% |
| 42 |
%%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 43 |
%%^^A%% Metadata for the package code, including files and versioning |
| 44 |
|
| 45 |
\ProvidesExplPackage{unicode-math-luatex} |
| 46 |
{2023/08/13} {0.8r} {Unicode maths in XeLaTeX and LuaLaTeX} |
| 47 |
|
| 48 |
%%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 49 |
%%^^A%% Assorted initialisation tasks, including some low-level function definitions. |
| 50 |
|
| 51 |
\RequirePackage{xparse,l3keys2e} |
| 52 |
\RequirePackage{fontspec} |
| 53 |
\RequirePackage{fix-cm} |
| 54 |
\RequirePackage{amsmath} |
| 55 |
\RequirePackage{lualatex-math} |
| 56 |
\cs_set_protected:Npn \__um_after_package:nNn #1 #2 #3 |
| 57 |
{ |
| 58 |
\AtBeginDocument |
| 59 |
{ |
| 60 |
\cs_new_protected:Npn #2 {#3} |
| 61 |
\@ifpackageloaded {#1} {#2} {} |
| 62 |
} |
| 63 |
} |
| 64 |
\cs_set_protected_nopar:Npn \exp_last_unbraced:NNx { \::N \::x_unbraced \::: } |
| 65 |
\cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx,Nxx} |
| 66 |
\cs_generate_variant:Nn \prop_get:NnNTF {cx} |
| 67 |
\cs_generate_variant:Nn \tl_if_eq:nnF {o} |
| 68 |
\cs_set_eq:NN \__um_group_begin: \group_begin: |
| 69 |
\cs_set_protected:Npn \__um_group_end:n #1 { #1 \group_end: } |
| 70 |
\cs_set_eq:NN \__um_group_begin_frozen: \__um_group_begin: |
| 71 |
\cs_set_eq:NN \__um_group_end_frozen:n \__um_group_end:n |
| 72 |
\prg_new_conditional:Nnn \__um_glyph_if_exist:Nn {p,TF,T,F} |
| 73 |
{ |
| 74 |
\tex_iffontchar:D #1 #2 \scan_stop: |
| 75 |
\prg_return_true: |
| 76 |
\else: |
| 77 |
\prg_return_false: |
| 78 |
\fi: |
| 79 |
} |
| 80 |
\cs_set_protected:Nn \__um_fontface_gset_eq:NN |
| 81 |
{ |
| 82 |
\tex_global:D \tex_let:D #1 #2 |
| 83 |
} |
| 84 |
\cs_generate_variant:Nn \__um_fontface_gset_eq:NN {cN} |
| 85 |
\cs_set:Npn \__um_set_mathcode:nnnn #1#2#3#4 |
| 86 |
{ |
| 87 |
\Umathcode \int_eval:n {#1} = |
| 88 |
\mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: |
| 89 |
} |
| 90 |
\cs_set:Npn \__um_set_mathcode:nnn #1#2#3 |
| 91 |
{ |
| 92 |
\Umathcode \int_eval:n {#1} = |
| 93 |
\mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop: |
| 94 |
} |
| 95 |
\cs_set:Npn \__um_set_mathchar:NNnn #1#2#3#4 |
| 96 |
{ |
| 97 |
\Umathchardef #1 = |
| 98 |
\mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop: |
| 99 |
} |
| 100 |
\cs_generate_variant:Nn \__um_set_mathchar:NNnn {c} |
| 101 |
\cs_new:Nn \__um_set_delcode:nnn |
| 102 |
{ |
| 103 |
\Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop: |
| 104 |
} |
| 105 |
\cs_new:Nn \__um_radical:nn |
| 106 |
{ |
| 107 |
\Uradical \csname sym#1\endcsname #2 \scan_stop: |
| 108 |
} |
| 109 |
\cs_new:Nn \__um_delimiter:Nnn |
| 110 |
{ |
| 111 |
\Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop: |
| 112 |
} |
| 113 |
\cs_new:Nn \__um_accent:nnn |
| 114 |
{ |
| 115 |
\Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop: |
| 116 |
} |
| 117 |
\cs_new:Nn \__um_char_gmake_mathactive:N |
| 118 |
{ |
| 119 |
\tex_global:D \tex_mathcode:D `#1 = "8000 \scan_stop: |
| 120 |
} |
| 121 |
\cs_new:Nn \__um_char_gmake_mathactive:n |
| 122 |
{ |
| 123 |
\tex_global:D \tex_mathcode:D \int_eval:n {#1} = "8000 \scan_stop: |
| 124 |
} |
| 125 |
\cs_new:Nn \__um_mathactive_remap:nn |
| 126 |
{ |
| 127 |
\group_begin: |
| 128 |
\cs_set_protected:Npn \__um_tmp: {#2} |
| 129 |
\__um_char_gmake_mathactive:n {#1} |
| 130 |
\char_gset_active_eq:nN {#1} \__um_tmp: |
| 131 |
\group_end: |
| 132 |
} |
| 133 |
\cs_new_protected:Nn \__um_mathgroup_set:n |
| 134 |
{ |
| 135 |
\tex_fam:D #1 \scan_stop: |
| 136 |
} |
| 137 |
\cs_new:Nn \__um_copy_fontdimen:nnN |
| 138 |
{ |
| 139 |
\fontdimen #1 \font = \the \fontdimen #2 #3 \relax |
| 140 |
} |
| 141 |
\cs_new:Nn \__um_zero_fontdimen:n |
| 142 |
{ |
| 143 |
\fontdimen #1 \font = 0pt\relax |
| 144 |
} |
| 145 |
\prg_new_conditional:Nnn \__um_int_if_zero:n {p,TF,T,F} |
| 146 |
{ |
| 147 |
\int_compare:nNnTF {#1} = 0 {\prg_return_true:} {\prg_return_false:} |
| 148 |
} |
| 149 |
\cs_new:Nn \usv_set:nnn { \tl_const:cn { c__um_#1_#2_usv } {#3} } |
| 150 |
\cs_new:Nn \__um_to_usv:nn { \use:c { c__um_#1_#2_usv } } |
| 151 |
\prg_new_conditional:Nnn \__um_usv_if_exist:nn {T,F,TF} |
| 152 |
{ |
| 153 |
\cs_if_exist:cTF { c__um_#1_#2_usv } |
| 154 |
\prg_return_true: \prg_return_false: |
| 155 |
} |
| 156 |
\tl_map_inline:nn |
| 157 |
{ |
| 158 |
\new@mathgroup\cdp@list\cdp@elt\DeclareMathSizes |
| 159 |
\@DeclareMathSizes\newmathalphabet\newmathalphabet__um\newmathalphabet__um@ |
| 160 |
\DeclareMathVersion\define@mathalphabet\define@mathgroup\addtoversion |
| 161 |
\version@list\version@elt\alpha@list\alpha@elt |
| 162 |
\restore@mathversion\init@restore@version\dorestore@version\process@table |
| 163 |
\new@mathversion\DeclareSymbolFont\group@list\group@elt |
| 164 |
\new@symbolfont\SetSymbolFont\SetSymbolFont@\get@cdp |
| 165 |
\DeclareMathAlphabet\new@mathalphabet\SetMathAlphabet\SetMathAlphabet@ |
| 166 |
\DeclareMathAccent\set@mathaccent\DeclareMathSymbol\set@mathchar |
| 167 |
\set@mathsymbol\DeclareMathDelimiter\@xxDeclareMathDelimiter |
| 168 |
\@DeclareMathDelimiter\@xDeclareMathDelimiter\set@mathdelimiter |
| 169 |
\set__ummathdelimiter\DeclareMathRadical\mathchar@type |
| 170 |
\DeclareSymbolFontAlphabet\DeclareSymbolFontAlphabet@ |
| 171 |
} |
| 172 |
{ |
| 173 |
\tl_remove_once:Nn \@preamblecmds {\do#1} |
| 174 |
} |
| 175 |
\cs_new:Npn \__um_error:n { \msg_error:nn {unicode-math} } |
| 176 |
\cs_new:Npn \__um_error:nx { \msg_error:nnx {unicode-math} } |
| 177 |
\cs_new:Npn \__um_warning:n { \msg_warning:nn {unicode-math} } |
| 178 |
\cs_new:Npn \__um_warning:nnn { \msg_warning:nnxx {unicode-math} } |
| 179 |
\cs_new:Npn \__um_log:n { \msg_log:nn {unicode-math} } |
| 180 |
\cs_new:Npn \__um_log:nx { \msg_log:nnx {unicode-math} } |
| 181 |
\cs_generate_variant:Nn \msg_new:nnn {nnx} |
| 182 |
\cs_generate_variant:Nn \msg_new:nnnn {nnxx} |
| 183 |
\cs_new:Nn \__um_msg_new:nn { \msg_new:nnx {unicode-math} {#1} { \tl_trim_spaces:n {#2} } } |
| 184 |
\cs_new:Npn \__um_cs_set:Nn #1 #2 |
| 185 |
{ |
| 186 |
\cs_if_exist:NF #1 { \ERROR{CS~ DOES~ NOT~ EXIST,~ USE~ "NEW"} } |
| 187 |
\cs_set_protected:Nn #1 |
| 188 |
{ |
| 189 |
#2 |
| 190 |
} |
| 191 |
} |
| 192 |
\cs_new:Npn \__um_cs_new:Nn #1 #2 |
| 193 |
{ |
| 194 |
\cs_new_protected:Nn #1 |
| 195 |
{ |
| 196 |
#2 |
| 197 |
} |
| 198 |
} |
| 199 |
|
| 200 |
%%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 201 |
%%^^A%% Declaration of all code-level variables used in the package. |
| 202 |
|
| 203 |
\bool_new:N \g__um_ot_math_bool |
| 204 |
\bool_new:N \g__um_main_font_defined_bool |
| 205 |
\bool_new:N \g__um_init_bool |
| 206 |
\bool_new:N \l__um_implicit_alph_bool |
| 207 |
\bool_new:N \g__um_literal_bool |
| 208 |
\bool_new:N \g__um_upLatin_bool |
| 209 |
\bool_new:N \g__um_uplatin_bool |
| 210 |
\bool_new:N \g__um_upGreek_bool |
| 211 |
\bool_new:N \g__um_upgreek_bool |
| 212 |
\bool_new:N \g__um_bfliteral_bool |
| 213 |
\bool_new:N \g__um_bfupLatin_bool |
| 214 |
\bool_new:N \g__um_bfuplatin_bool |
| 215 |
\bool_new:N \g__um_bfupGreek_bool |
| 216 |
\bool_new:N \g__um_bfupgreek_bool |
| 217 |
\bool_new:N \g__um_upsans_bool |
| 218 |
\bool_new:N \g__um_sfliteral_bool |
| 219 |
\bool_new:N \g__um_upNabla_bool |
| 220 |
\bool_new:N \g__um_uppartial_bool |
| 221 |
\bool_new:N \g__um_literal_Nabla_bool |
| 222 |
\bool_new:N \g__um_literal_partial_bool |
| 223 |
\bool_new:N \l__um_smallfrac_bool |
| 224 |
\bool_new:N \g__um_literal_colon_bool |
| 225 |
\bool_new:N \g__um_mathrm_text_bool |
| 226 |
\bool_new:N \g__um_mathit_text_bool |
| 227 |
\bool_new:N \g__um_mathbf_text_bool |
| 228 |
\bool_new:N \g__um_mathsf_text_bool |
| 229 |
\bool_new:N \g__um_mathtt_text_bool |
| 230 |
\int_new:N \g__um_fam_int |
| 231 |
\int_new:N \g__um_fonts_used_int |
| 232 |
\int_new:N \l__um_primecount_int |
| 233 |
\tl_const:Nn \c__um_math_alphabet_name_latin_tl {Latin,~lowercase} |
| 234 |
\tl_const:Nn \c__um_math_alphabet_name_Latin_tl {Latin,~uppercase} |
| 235 |
\tl_const:Nn \c__um_math_alphabet_name_greek_tl {Greek,~lowercase} |
| 236 |
\tl_const:Nn \c__um_math_alphabet_name_Greek_tl {Greek,~uppercase} |
| 237 |
\tl_const:Nn \c__um_math_alphabet_name_num_tl {Numerals} |
| 238 |
\tl_const:Nn \c__um_math_alphabet_name_misc_tl {Misc.} |
| 239 |
\tl_new:N \l__um_style_tl |
| 240 |
\tl_new:N \l__um_family_tl |
| 241 |
\tl_new:N \l__um_alphabet_tl |
| 242 |
\tl_new:N \l__um_fontname_tl |
| 243 |
\tl_new:N \l__um_symfont_label_tl |
| 244 |
\tl_new:N \l__um_remap_style_tl |
| 245 |
\tl_new:N \l__um_fam_two_tl |
| 246 |
\tl_new:N \l__um_fam_three_tl |
| 247 |
\tl_new:N \l__um_curr_named_slot |
| 248 |
\tl_new:N \l__um_tmpa_tl |
| 249 |
\tl_new:N \l__um_tmpb_tl |
| 250 |
\tl_new:N \l__um_tmpc_tl |
| 251 |
\tl_new:N \l__um_mathstyle_tl |
| 252 |
\tl_new:N \l__um_radicals_tl |
| 253 |
\tl_new:N \l__um_nolimits_tl |
| 254 |
\tl_new:N \l__um_trial_family_tl |
| 255 |
\tl_new:N \l__um_ss_chain_tl |
| 256 |
\tl_new:N \l__um_tmpa_key_tl |
| 257 |
\tl_new:N \g__um_operator_mathfont_tl |
| 258 |
\tl_new:N \g__um_slash_delimiter_usv |
| 259 |
\tl_new:N \g__um_mathparam_settings_tl |
| 260 |
\tl_new:N \l__um_mathtable_tl |
| 261 |
\tl_new:N \g__um_mathtable_tl |
| 262 |
\tl_new:N \g__um_fontname_tl |
| 263 |
\tl_new:N \g__um_mversion_tl |
| 264 |
\tl_new:N \g__um_symfont_tl |
| 265 |
\tl_new:N \l__um_font_keyval_tl |
| 266 |
\tl_new:N \g__um_family_tl |
| 267 |
\tl_new:N \g__um_style_tl |
| 268 |
\tl_new:N \g__um_remap_style_tl |
| 269 |
\tl_new:N \l__um_not_token_name_tl |
| 270 |
\tl_new:N \g__um_curr_font_cmd_tl |
| 271 |
\tl_new:N \g__um_sqrt_font_cmd_tl |
| 272 |
\tl_new:N \g__um_prime_font_cmd_tl |
| 273 |
\tl_new:N \g__um_mathparam_store_tl |
| 274 |
\clist_new:N \g__um_char_nrange_clist |
| 275 |
\clist_new:N \g__um_unknown_keys_clist |
| 276 |
\clist_new:N \g__um_alphabet_clist |
| 277 |
\clist_new:N \l__um_mathmap_charints_clist |
| 278 |
\clist_new:N \l__um_unknown_keys_clist |
| 279 |
\clist_new:N \l__um_keyval_clist |
| 280 |
\clist_new:N \l__um_alphabet_clist |
| 281 |
\clist_new:N \g__um_bad_alpha_clist |
| 282 |
\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} } |
| 283 |
\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} } |
| 284 |
\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} } |
| 285 |
\seq_new:N \l__um_missing_alph_seq |
| 286 |
\seq_new:N \g__um_mathalph_seq |
| 287 |
\seq_new:N \g__um_char_range_seq |
| 288 |
\seq_new:N \g__um_mclass_range_seq |
| 289 |
\seq_new:N \g__um_mathclasses_seq |
| 290 |
\seq_gset_from_clist:Nn \g__um_mathclasses_seq |
| 291 |
{ |
| 292 |
\mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, |
| 293 |
\mathop, |
| 294 |
\mathopen,\mathclose, |
| 295 |
\mathfence,\mathover,\mathunder, |
| 296 |
\mathaccent,\mathaccentoverlay,\mathbotaccent,\mathaccentwide,\mathbotaccentwide |
| 297 |
} |
| 298 |
\seq_new:N \g__um_default_mathalph_seq |
| 299 |
\seq_new:N \g__um_mathstyles_seq |
| 300 |
\prop_new:N \g__um_supers_prop |
| 301 |
\prop_new:N \g__um_subs_prop |
| 302 |
\muskip_new:N \g__um_primekern_muskip |
| 303 |
\muskip_gset:Nn \g__um_primekern_muskip { -\thinmuskip/2 }% arbitrary |
| 304 |
\fp_new:N \g__um_size_tfsf_fp |
| 305 |
\fp_new:N \g__um_size_sfssf_fp |
| 306 |
\quark_new:N \q_unicode_math |
| 307 |
|
| 308 |
%%^^A%% um-code-api.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 309 |
%%^^A%% The (underdeveloped) API to interface with the package internals. |
| 310 |
|
| 311 |
\cs_new:Nn \unimath_get_mathstyle: |
| 312 |
{ |
| 313 |
\tl_use:N \l__um_mathstyle_tl |
| 314 |
} |
| 315 |
|
| 316 |
%%^^A%% um-code-ui.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 317 |
%%^^A%% The xparse user interface top-level definitions. |
| 318 |
|
| 319 |
\NewDocumentCommand \unimathsetup {m} { \keys_set:nn {unicode-math} {#1} } |
| 320 |
\NewDocumentCommand \setmathfont { O{} m O{} } |
| 321 |
{ |
| 322 |
\__um_setmathfont:nn {#1,#3} {#2} |
| 323 |
} |
| 324 |
\NewDocumentCommand \setmathfontface { m O{} m O{} } |
| 325 |
{ |
| 326 |
\__um_setmathfontface:Nnn #1 {#2,#4} {#3} |
| 327 |
} |
| 328 |
\@onlypreamble \setmathfontface |
| 329 |
\NewDocumentCommand \setoperatorfont {m} |
| 330 |
{ |
| 331 |
\tl_gset:Nn \g__um_operator_mathfont_tl {#1} |
| 332 |
} |
| 333 |
\setoperatorfont{\mathrm} |
| 334 |
\NewDocumentCommand \addnolimits {m} |
| 335 |
{ |
| 336 |
\tl_put_right:Nn \l__um_nolimits_tl {#1} |
| 337 |
} |
| 338 |
\NewDocumentCommand \removenolimits {m} |
| 339 |
{ |
| 340 |
\tl_remove_all:Nn \l__um_nolimits_tl {#1} |
| 341 |
} |
| 342 |
|
| 343 |
%%^^A%% um-code-pkgopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 344 |
%%^^A%% Package options. |
| 345 |
|
| 346 |
\cs_new:Nn \__um_keys_choices:nn |
| 347 |
{ |
| 348 |
\cs_set:Npn \__um_keys_choices_fn:nn { \__um_keys_choices_aux:nnn {#1} } |
| 349 |
\use:x |
| 350 |
{ |
| 351 |
\exp_not:N \keys_define:nn {unicode-math} |
| 352 |
{ |
| 353 |
#1 .choice: , |
| 354 |
\__um_tl_map_dbl:nN {#2} \__um_keys_choices_fn:nn |
| 355 |
} |
| 356 |
} |
| 357 |
} |
| 358 |
\cs_new:Nn \__um_keys_choices_aux:nnn { #1 / #2 .code:n = { \exp_not:n {#3} } , } |
| 359 |
\cs_new:Nn \__um_tl_map_dbl:nN |
| 360 |
{ |
| 361 |
\__um_tl_map_dbl:Nnn #2 #1 \q_recursion_tail {}{} \q_recursion_stop |
| 362 |
} |
| 363 |
\cs_new:Nn \__um_tl_map_dbl:Nnn |
| 364 |
{ |
| 365 |
\quark_if_recursion_tail_stop:n {#2} |
| 366 |
\quark_if_recursion_tail_stop:n {#3} |
| 367 |
#1 {#2} {#3} |
| 368 |
\__um_tl_map_dbl:Nnn #1 |
| 369 |
} |
| 370 |
\__um_keys_choices:nn {mathup} |
| 371 |
{ |
| 372 |
{sym} { \bool_gset_false:N \g__um_mathrm_text_bool } |
| 373 |
{text} { \bool_gset_true:N \g__um_mathrm_text_bool } |
| 374 |
} |
| 375 |
\__um_keys_choices:nn {mathrm} |
| 376 |
{ |
| 377 |
{sym} { \bool_gset_false:N \g__um_mathrm_text_bool } |
| 378 |
{text} { \bool_gset_true:N \g__um_mathrm_text_bool } |
| 379 |
} |
| 380 |
\__um_keys_choices:nn {mathit} |
| 381 |
{ |
| 382 |
{sym} { \bool_gset_false:N \g__um_mathit_text_bool } |
| 383 |
{text} { \bool_gset_true:N \g__um_mathit_text_bool } |
| 384 |
} |
| 385 |
\__um_keys_choices:nn {mathbf} |
| 386 |
{ |
| 387 |
{sym} { \bool_gset_false:N \g__um_mathbf_text_bool } |
| 388 |
{text} { \bool_gset_true:N \g__um_mathbf_text_bool } |
| 389 |
} |
| 390 |
\__um_keys_choices:nn {mathsf} |
| 391 |
{ |
| 392 |
{sym} { \bool_gset_false:N \g__um_mathsf_text_bool } |
| 393 |
{text} { \bool_gset_true:N \g__um_mathsf_text_bool } |
| 394 |
} |
| 395 |
\__um_keys_choices:nn {mathtt} |
| 396 |
{ |
| 397 |
{sym} { \bool_gset_false:N \g__um_mathtt_text_bool } |
| 398 |
{text} { \bool_gset_true:N \g__um_mathtt_text_bool } |
| 399 |
} |
| 400 |
\__um_keys_choices:nn {normal-style} |
| 401 |
{ |
| 402 |
{ISO} { |
| 403 |
\bool_gset_false:N \g__um_literal_bool |
| 404 |
\bool_gset_false:N \g__um_upGreek_bool |
| 405 |
\bool_gset_false:N \g__um_upgreek_bool |
| 406 |
\bool_gset_false:N \g__um_upLatin_bool |
| 407 |
\bool_gset_false:N \g__um_uplatin_bool |
| 408 |
} |
| 409 |
{TeX} { |
| 410 |
\bool_gset_false:N \g__um_literal_bool |
| 411 |
\bool_gset_true:N \g__um_upGreek_bool |
| 412 |
\bool_gset_false:N \g__um_upgreek_bool |
| 413 |
\bool_gset_false:N \g__um_upLatin_bool |
| 414 |
\bool_gset_false:N \g__um_uplatin_bool |
| 415 |
} |
| 416 |
{french} { |
| 417 |
\bool_gset_false:N \g__um_literal_bool |
| 418 |
\bool_gset_true:N \g__um_upGreek_bool |
| 419 |
\bool_gset_true:N \g__um_upgreek_bool |
| 420 |
\bool_gset_true:N \g__um_upLatin_bool |
| 421 |
\bool_gset_false:N \g__um_uplatin_bool |
| 422 |
} |
| 423 |
{upright} { |
| 424 |
\bool_gset_false:N \g__um_literal_bool |
| 425 |
\bool_gset_true:N \g__um_upGreek_bool |
| 426 |
\bool_gset_true:N \g__um_upgreek_bool |
| 427 |
\bool_gset_true:N \g__um_upLatin_bool |
| 428 |
\bool_gset_true:N \g__um_uplatin_bool |
| 429 |
} |
| 430 |
{literal} { |
| 431 |
\bool_gset_true:N \g__um_literal_bool |
| 432 |
} |
| 433 |
} |
| 434 |
\__um_keys_choices:nn {math-style} |
| 435 |
{ |
| 436 |
{ISO} { |
| 437 |
\unimathsetup { nabla=upright, partial=italic, |
| 438 |
normal-style=ISO, bold-style=ISO, sans-style=italic } |
| 439 |
} |
| 440 |
{TeX} { |
| 441 |
\unimathsetup { nabla=upright, partial=italic, |
| 442 |
normal-style=TeX, bold-style=TeX, sans-style=upright } |
| 443 |
} |
| 444 |
{french} { |
| 445 |
\unimathsetup { nabla=upright, partial=upright, |
| 446 |
normal-style=french, bold-style=upright, sans-style=upright } |
| 447 |
} |
| 448 |
{upright} { |
| 449 |
\unimathsetup { nabla=upright, partial=upright, |
| 450 |
normal-style=upright, bold-style=upright, sans-style=upright } |
| 451 |
} |
| 452 |
{literal} { |
| 453 |
\unimathsetup { colon=literal, nabla=literal, partial=literal, |
| 454 |
normal-style=literal, bold-style=literal, sans-style=literal } |
| 455 |
} |
| 456 |
} |
| 457 |
\__um_keys_choices:nn {bold-style} |
| 458 |
{ |
| 459 |
{ISO} { |
| 460 |
\bool_gset_false:N \g__um_bfliteral_bool |
| 461 |
\bool_gset_false:N \g__um_bfupGreek_bool |
| 462 |
\bool_gset_false:N \g__um_bfupgreek_bool |
| 463 |
\bool_gset_false:N \g__um_bfupLatin_bool |
| 464 |
\bool_gset_false:N \g__um_bfuplatin_bool |
| 465 |
} |
| 466 |
{TeX} { |
| 467 |
\bool_gset_false:N \g__um_bfliteral_bool |
| 468 |
\bool_gset_true:N \g__um_bfupGreek_bool |
| 469 |
\bool_gset_false:N \g__um_bfupgreek_bool |
| 470 |
\bool_gset_true:N \g__um_bfupLatin_bool |
| 471 |
\bool_gset_true:N \g__um_bfuplatin_bool |
| 472 |
} |
| 473 |
{upright} { |
| 474 |
\bool_gset_false:N \g__um_bfliteral_bool |
| 475 |
\bool_gset_true:N \g__um_bfupGreek_bool |
| 476 |
\bool_gset_true:N \g__um_bfupgreek_bool |
| 477 |
\bool_gset_true:N \g__um_bfupLatin_bool |
| 478 |
\bool_gset_true:N \g__um_bfuplatin_bool |
| 479 |
} |
| 480 |
{literal} { |
| 481 |
\bool_gset_true:N \g__um_bfliteral_bool |
| 482 |
} |
| 483 |
} |
| 484 |
\__um_keys_choices:nn {sans-style} |
| 485 |
{ |
| 486 |
{italic} { \bool_gset_false:N \g__um_upsans_bool } |
| 487 |
{upright} { \bool_gset_true:N \g__um_upsans_bool } |
| 488 |
{literal} { \bool_gset_true:N \g__um_sfliteral_bool } |
| 489 |
} |
| 490 |
\__um_keys_choices:nn {nabla} |
| 491 |
{ |
| 492 |
{upright} { |
| 493 |
\bool_gset_false:N \g__um_literal_Nabla_bool |
| 494 |
\bool_gset_true:N \g__um_upNabla_bool |
| 495 |
} |
| 496 |
{italic} { |
| 497 |
\bool_gset_false:N \g__um_literal_Nabla_bool |
| 498 |
\bool_gset_false:N \g__um_upNabla_bool |
| 499 |
} |
| 500 |
{literal} { |
| 501 |
\bool_gset_true:N \g__um_literal_Nabla_bool |
| 502 |
} |
| 503 |
} |
| 504 |
\__um_keys_choices:nn {partial} |
| 505 |
{ |
| 506 |
{upright} { |
| 507 |
\bool_gset_false:N \g__um_literal_partial_bool |
| 508 |
\bool_gset_true:N \g__um_uppartial_bool |
| 509 |
} |
| 510 |
{italic} { |
| 511 |
\bool_gset_false:N \g__um_literal_partial_bool |
| 512 |
\bool_gset_false:N \g__um_uppartial_bool |
| 513 |
} |
| 514 |
{literal} { |
| 515 |
\bool_gset_true:N \g__um_literal_partial_bool |
| 516 |
} |
| 517 |
} |
| 518 |
\__um_keys_choices:nn {colon} |
| 519 |
{ |
| 520 |
{literal} { \bool_gset_true:N \g__um_literal_colon_bool } |
| 521 |
{TeX} { \bool_gset_false:N \g__um_literal_colon_bool } |
| 522 |
} |
| 523 |
\__um_keys_choices:nn {slash-delimiter} |
| 524 |
{ |
| 525 |
{ascii} { \tl_gset:Nn \g__um_slash_delimiter_usv {"002F} } |
| 526 |
{frac} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2044} } |
| 527 |
{div} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2215} } |
| 528 |
} |
| 529 |
\__um_keys_choices:nn {active-frac} |
| 530 |
{ |
| 531 |
{small} |
| 532 |
{ |
| 533 |
\bool_set_true:N \l__um_smallfrac_bool |
| 534 |
\use:c {__um_setup_active_frac:} |
| 535 |
} |
| 536 |
|
| 537 |
{normalsize} |
| 538 |
{ |
| 539 |
\bool_set_false:N \l__um_smallfrac_bool |
| 540 |
\use:c {__um_setup_active_frac:} |
| 541 |
} |
| 542 |
} |
| 543 |
\keys_define:nn {unicode-math} |
| 544 |
{ |
| 545 |
warnings-off .code:n = |
| 546 |
{ |
| 547 |
\clist_map_inline:nn {#1} |
| 548 |
{ \msg_redirect_name:nnn { unicode-math } { ##1 } { none } } |
| 549 |
} |
| 550 |
} |
| 551 |
\__um_keys_choices:nn {trace} |
| 552 |
{ |
| 553 |
{on} {} % default |
| 554 |
{debug} { \msg_redirect_module:nnn { unicode-math } { log } { warning } } |
| 555 |
{off} { \msg_redirect_module:nnn { unicode-math } { log } { none } } |
| 556 |
} |
| 557 |
\unimathsetup {math-style=TeX} |
| 558 |
\unimathsetup {slash-delimiter=ascii} |
| 559 |
\unimathsetup {trace=off} |
| 560 |
\unimathsetup {mathrm=text,mathit=text,mathbf=text,mathsf=text,mathtt=text} |
| 561 |
\cs_if_exist:NT \tfrac { \unimathsetup {active-frac=small} } |
| 562 |
\ProcessKeysOptions {unicode-math} |
| 563 |
|
| 564 |
%%^^A%% um-code-msg.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 565 |
%%^^A%% Definitions of error, warning, and log messages. |
| 566 |
|
| 567 |
\char_set_catcode_space:n {32} |
| 568 |
\__um_msg_new:nn {default-math-font} |
| 569 |
{ |
| 570 |
Defining the default maths font as '\l__um_fontname_tl'. |
| 571 |
} |
| 572 |
\__um_msg_new:nn {setup-implicit} |
| 573 |
{ |
| 574 |
Setup alphabets: implicit mode. |
| 575 |
} |
| 576 |
\__um_msg_new:nn {setup-explicit} |
| 577 |
{ |
| 578 |
Setup alphabets: explicit mode. |
| 579 |
} |
| 580 |
\__um_msg_new:nn {alph-initialise} |
| 581 |
{ |
| 582 |
Initialising \@backslashchar math#1. |
| 583 |
} |
| 584 |
\__um_msg_new:nn {setup-alph} |
| 585 |
{ |
| 586 |
Setup alphabet: #1. |
| 587 |
} |
| 588 |
\__um_msg_new:nn {no-alphabet} |
| 589 |
{ |
| 590 |
I am trying to set up alphabet"#1" but there are no configuration settings for it. |
| 591 |
(See source file "unicode-math-alphabets.dtx" to debug.) |
| 592 |
} |
| 593 |
\__um_msg_new:nn {no-named-range} |
| 594 |
{ |
| 595 |
I am trying to define new alphabet "#2" in range "#1", but range "#1" hasn't been defined yet. |
| 596 |
} |
| 597 |
\__um_msg_new:nn {missing-alphabets} |
| 598 |
{ |
| 599 |
Missing math alphabets in font "\fontname\g__um_curr_font_cmd_tl" \\ \\ |
| 600 |
\seq_map_function:NN \l__um_missing_alph_seq \__um_print_indent:n |
| 601 |
} |
| 602 |
\cs_new:Nn \__um_print_indent:n { \space\space\space\space #1 \\ } |
| 603 |
\__um_msg_new:nn {macro-expected} |
| 604 |
{ |
| 605 |
I've expected that #1 is a macro, but it isn't. |
| 606 |
} |
| 607 |
\__um_msg_new:nn {wrong-meaning} |
| 608 |
{ |
| 609 |
I've expected #1 to have the meaning #3, but it has the meaning #2. |
| 610 |
} |
| 611 |
\__um_msg_new:nn {patch-macro} |
| 612 |
{ |
| 613 |
I'm going to patch macro #1. |
| 614 |
} |
| 615 |
\__um_msg_new:nn {mathtools-overbracket} { |
| 616 |
Using \token_to_str:N \overbracket\ and |
| 617 |
\token_to_str:N \underbracket\ from |
| 618 |
`mathtools' package.\\ |
| 619 |
\\ |
| 620 |
Use \token_to_str:N \Uoverbracket\ and |
| 621 |
\token_to_str:N \Uunderbracket\ for |
| 622 |
original `unicode-math' definition. |
| 623 |
} |
| 624 |
\__um_msg_new:nn {mathtools-colon} { |
| 625 |
I'm going to overwrite the following commands from |
| 626 |
the `mathtools' package: \\ \\ |
| 627 |
\ \ \ \ \token_to_str:N \dblcolon, |
| 628 |
\token_to_str:N \coloneqq, |
| 629 |
\token_to_str:N \Coloneqq, |
| 630 |
\token_to_str:N \eqqcolon. \\ \\ |
| 631 |
Note that since I won't overwrite the other colon-like |
| 632 |
commands, using them will lead to inconsistencies. |
| 633 |
} |
| 634 |
\__um_msg_new:nn {colonequals} { |
| 635 |
I'm going to overwrite the following commands from |
| 636 |
the `colonequals' package: \\ \\ |
| 637 |
\ \ \ \ \token_to_str:N \ratio, |
| 638 |
\token_to_str:N \coloncolon, |
| 639 |
\token_to_str:N \minuscolon, \\ |
| 640 |
\ \ \ \ \token_to_str:N \colonequals, |
| 641 |
\token_to_str:N \equalscolon, |
| 642 |
\token_to_str:N \coloncolonequals. \\ \\ |
| 643 |
Note that since I won't overwrite the other colon-like |
| 644 |
commands, using them will lead to inconsistencies. |
| 645 |
Furthermore, changing \token_to_str:N \colonsep \c_space_tl |
| 646 |
or \token_to_str:N \doublecolonsep \c_space_tl won't have |
| 647 |
any effect on the re-defined commands. |
| 648 |
} |
| 649 |
\__um_msg_new:nn {bad-cs-in-range} |
| 650 |
{ |
| 651 |
Command `#1` in math range is not recognised as a maths symbol. |
| 652 |
Check file "unicode-math-table.tex" for allowable commands. |
| 653 |
} |
| 654 |
\__um_msg_new:nn {legacy-char-not-supported} |
| 655 |
{ |
| 656 |
Command `#1` is a legacy maths symbol that is not supported by unicode-math. |
| 657 |
} |
| 658 |
\__um_msg_new:nn {range-not-bf-sf} |
| 659 |
{ |
| 660 |
Range alphabets cannot include alphabets referring to `bf`, `sf`, or `bfsf` |
| 661 |
since they relate to input commands not output glyphs. |
| 662 |
Use `bfit` or `bfup` (etc.) to specify which. |
| 663 |
} |
| 664 |
\__um_msg_new:nn {no-main-font} |
| 665 |
{ |
| 666 |
No main maths font has been set up yet.\\If you simply want ‘the default’, use: \\ |
| 667 |
\iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} |
| 668 |
} |
| 669 |
\__um_msg_new:nn {not-ot-math} |
| 670 |
{ |
| 671 |
The first font loaded by unicode-math must be an OpenType Math font (with script=math). |
| 672 |
If you simply want ‘the default’ before loading supplementary fonts over the top for certain |
| 673 |
ranges, use: \\ |
| 674 |
\iow_indent:n {\token_to_str:N\setmathfont{latinmodern-math.otf}} |
| 675 |
} |
| 676 |
\char_set_catcode_ignore:n {32} |
| 677 |
|
| 678 |
%%^^A%% um-code-usv.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 679 |
%%^^A%% Mapping of mathematical unicode slots for alphabets. |
| 680 |
|
| 681 |
\usv_set:nnn {normal} {num} {48} |
| 682 |
\usv_set:nnn {normal} {Latin} {"1D434} |
| 683 |
\usv_set:nnn {normal} {latin} {"1D44E} |
| 684 |
\usv_set:nnn {normal} {Greek} {"1D6E2} |
| 685 |
\usv_set:nnn {normal} {greek} {"1D6FC} |
| 686 |
\usv_set:nnn {normal} {varTheta} {"1D6F3} |
| 687 |
\usv_set:nnn {normal} {epsilon} {"1D716} |
| 688 |
\usv_set:nnn {normal} {vartheta} {"1D717} |
| 689 |
\usv_set:nnn {normal} {varkappa} {"1D718} |
| 690 |
\usv_set:nnn {normal} {phi} {"1D719} |
| 691 |
\usv_set:nnn {normal} {varrho} {"1D71A} |
| 692 |
\usv_set:nnn {normal} {varpi} {"1D71B} |
| 693 |
\usv_set:nnn {normal} {Nabla} {"1D6FB} |
| 694 |
\usv_set:nnn {normal} {partial} {"1D715} |
| 695 |
\usv_set:nnn {up} {num} {48} |
| 696 |
\usv_set:nnn {up} {Latin} {65} |
| 697 |
\usv_set:nnn {up} {latin} {97} |
| 698 |
\usv_set:nnn {up} {Greek} {"391} |
| 699 |
\usv_set:nnn {up} {greek} {"3B1} |
| 700 |
\usv_set:nnn {it} {Latin} {"1D434} |
| 701 |
\usv_set:nnn {it} {latin} {"1D44E} |
| 702 |
\usv_set:nnn {it} {Greek} {"1D6E2} |
| 703 |
\usv_set:nnn {it} {greek} {"1D6FC} |
| 704 |
\usv_set:nnn {bb} {num} {"1D7D8} |
| 705 |
\usv_set:nnn {bb} {Latin} {"1D538} |
| 706 |
\usv_set:nnn {bb} {latin} {"1D552} |
| 707 |
\usv_set:nnn {scr} {Latin} {"1D49C} |
| 708 |
\usv_set:nnn {cal} {Latin} {"1D49C} |
| 709 |
\usv_set:nnn {scr} {latin} {"1D4B6} |
| 710 |
\usv_set:nnn {cal} {latin} {"1D4B6} |
| 711 |
\usv_set:nnn {frak} {Latin} {"1D504} |
| 712 |
\usv_set:nnn {frak} {latin} {"1D51E} |
| 713 |
\usv_set:nnn {sf} {num} {"1D7E2} |
| 714 |
\usv_set:nnn {sfup} {num} {"1D7E2} |
| 715 |
\usv_set:nnn {sfit} {num} {"1D7E2} |
| 716 |
\usv_set:nnn {sfup} {Latin} {"1D5A0} |
| 717 |
\usv_set:nnn {sf} {Latin} {"1D5A0} |
| 718 |
\usv_set:nnn {sfup} {latin} {"1D5BA} |
| 719 |
\usv_set:nnn {sf} {latin} {"1D5BA} |
| 720 |
\usv_set:nnn {sfit} {Latin} {"1D608} |
| 721 |
\usv_set:nnn {sfit} {latin} {"1D622} |
| 722 |
\usv_set:nnn {tt} {num} {"1D7F6} |
| 723 |
\usv_set:nnn {tt} {Latin} {"1D670} |
| 724 |
\usv_set:nnn {tt} {latin} {"1D68A} |
| 725 |
\usv_set:nnn {bf} {num} {"1D7CE} |
| 726 |
\usv_set:nnn {bfup} {num} {"1D7CE} |
| 727 |
\usv_set:nnn {bfit} {num} {"1D7CE} |
| 728 |
\usv_set:nnn {bfup} {Latin} {"1D400} |
| 729 |
\usv_set:nnn {bfup} {latin} {"1D41A} |
| 730 |
\usv_set:nnn {bfup} {Greek} {"1D6A8} |
| 731 |
\usv_set:nnn {bfup} {greek} {"1D6C2} |
| 732 |
\usv_set:nnn {bfit} {Latin} {"1D468} |
| 733 |
\usv_set:nnn {bfit} {latin} {"1D482} |
| 734 |
\usv_set:nnn {bfit} {Greek} {"1D71C} |
| 735 |
\usv_set:nnn {bfit} {greek} {"1D736} |
| 736 |
\usv_set:nnn {bffrak} {Latin} {"1D56C} |
| 737 |
\usv_set:nnn {bffrak} {latin} {"1D586} |
| 738 |
\usv_set:nnn {bfscr} {Latin} {"1D4D0} |
| 739 |
\usv_set:nnn {bfcal} {Latin} {"1D4D0} |
| 740 |
\usv_set:nnn {bfscr} {latin} {"1D4EA} |
| 741 |
\usv_set:nnn {bfcal} {latin} {"1D4EA} |
| 742 |
\usv_set:nnn {bfsf} {num} {"1D7EC} |
| 743 |
\usv_set:nnn {bfsfup} {num} {"1D7EC} |
| 744 |
\usv_set:nnn {bfsfit} {num} {"1D7EC} |
| 745 |
\usv_set:nnn {bfsfup} {Latin} {"1D5D4} |
| 746 |
\usv_set:nnn {bfsfup} {latin} {"1D5EE} |
| 747 |
\usv_set:nnn {bfsfup} {Greek} {"1D756} |
| 748 |
\usv_set:nnn {bfsfup} {greek} {"1D770} |
| 749 |
\usv_set:nnn {bfsfit} {Latin} {"1D63C} |
| 750 |
\usv_set:nnn {bfsfit} {latin} {"1D656} |
| 751 |
\usv_set:nnn {bfsfit} {Greek} {"1D790} |
| 752 |
\usv_set:nnn {bfsfit} {greek} {"1D7AA} |
| 753 |
\usv_set:nnn {bfsf} {Latin} { \bool_if:NTF \g__um_upLatin_bool \g__um_bfsfup_Latin_usv \g__um_bfsfit_Latin_usv } |
| 754 |
\usv_set:nnn {bfsf} {latin} { \bool_if:NTF \g__um_uplatin_bool \g__um_bfsfup_latin_usv \g__um_bfsfit_latin_usv } |
| 755 |
\usv_set:nnn {bfsf} {Greek} { \bool_if:NTF \g__um_upGreek_bool \g__um_bfsfup_Greek_usv \g__um_bfsfit_Greek_usv } |
| 756 |
\usv_set:nnn {bfsf} {greek} { \bool_if:NTF \g__um_upgreek_bool \g__um_bfsfup_greek_usv \g__um_bfsfit_greek_usv } |
| 757 |
\usv_set:nnn {bf} {Latin} { \bool_if:NTF \g__um_bfupLatin_bool \g__um_bfup_Latin_usv \g__um_bfit_Latin_usv } |
| 758 |
\usv_set:nnn {bf} {latin} { \bool_if:NTF \g__um_bfuplatin_bool \g__um_bfup_latin_usv \g__um_bfit_latin_usv } |
| 759 |
\usv_set:nnn {bf} {Greek} { \bool_if:NTF \g__um_bfupGreek_bool \g__um_bfup_Greek_usv \g__um_bfit_Greek_usv } |
| 760 |
\usv_set:nnn {bf} {greek} { \bool_if:NTF \g__um_bfupgreek_bool \g__um_bfup_greek_usv \g__um_bfit_greek_usv } |
| 761 |
\usv_set:nnn {up} {varTheta} {"3F4} |
| 762 |
\usv_set:nnn {up} {Digamma} {"3DC} |
| 763 |
\usv_set:nnn {up} {epsilon} {"3F5} |
| 764 |
\usv_set:nnn {up} {vartheta} {"3D1} |
| 765 |
\usv_set:nnn {up} {varkappa} {"3F0} |
| 766 |
\usv_set:nnn {up} {phi} {"3D5} |
| 767 |
\usv_set:nnn {up} {varrho} {"3F1} |
| 768 |
\usv_set:nnn {up} {varpi} {"3D6} |
| 769 |
\usv_set:nnn {up} {digamma} {"3DD} |
| 770 |
\usv_set:nnn {bfup} {varTheta} {"1D6B9} |
| 771 |
\usv_set:nnn {bfup} {Digamma} {"1D7CA} |
| 772 |
\usv_set:nnn {bfup} {epsilon} {"1D6DC} |
| 773 |
\usv_set:nnn {bfup} {vartheta} {"1D6DD} |
| 774 |
\usv_set:nnn {bfup} {varkappa} {"1D6DE} |
| 775 |
\usv_set:nnn {bfup} {phi} {"1D6DF} |
| 776 |
\usv_set:nnn {bfup} {varrho} {"1D6E0} |
| 777 |
\usv_set:nnn {bfup} {varpi} {"1D6E1} |
| 778 |
\usv_set:nnn {bfup} {digamma} {"1D7CB} |
| 779 |
\usv_set:nnn {it} {varTheta} {"1D6F3} |
| 780 |
\usv_set:nnn {it} {epsilon} {"1D716} |
| 781 |
\usv_set:nnn {it} {vartheta} {"1D717} |
| 782 |
\usv_set:nnn {it} {varkappa} {"1D718} |
| 783 |
\usv_set:nnn {it} {phi} {"1D719} |
| 784 |
\usv_set:nnn {it} {varrho} {"1D71A} |
| 785 |
\usv_set:nnn {it} {varpi} {"1D71B} |
| 786 |
\usv_set:nnn {bfit} {varTheta} {"1D72D} |
| 787 |
\usv_set:nnn {bfit} {epsilon} {"1D750} |
| 788 |
\usv_set:nnn {bfit} {vartheta} {"1D751} |
| 789 |
\usv_set:nnn {bfit} {varkappa} {"1D752} |
| 790 |
\usv_set:nnn {bfit} {phi} {"1D753} |
| 791 |
\usv_set:nnn {bfit} {varrho} {"1D754} |
| 792 |
\usv_set:nnn {bfit} {varpi} {"1D755} |
| 793 |
\usv_set:nnn {bfsfup} {varTheta} {"1D767} |
| 794 |
\usv_set:nnn {bfsfup} {epsilon} {"1D78A} |
| 795 |
\usv_set:nnn {bfsfup} {vartheta} {"1D78B} |
| 796 |
\usv_set:nnn {bfsfup} {varkappa} {"1D78C} |
| 797 |
\usv_set:nnn {bfsfup} {phi} {"1D78D} |
| 798 |
\usv_set:nnn {bfsfup} {varrho} {"1D78E} |
| 799 |
\usv_set:nnn {bfsfup} {varpi} {"1D78F} |
| 800 |
\usv_set:nnn {bfsfit} {varTheta} {"1D7A1} |
| 801 |
\usv_set:nnn {bfsfit} {epsilon} {"1D7C4} |
| 802 |
\usv_set:nnn {bfsfit} {vartheta} {"1D7C5} |
| 803 |
\usv_set:nnn {bfsfit} {varkappa} {"1D7C6} |
| 804 |
\usv_set:nnn {bfsfit} {phi} {"1D7C7} |
| 805 |
\usv_set:nnn {bfsfit} {varrho} {"1D7C8} |
| 806 |
\usv_set:nnn {bfsfit} {varpi} {"1D7C9} |
| 807 |
\usv_set:nnn {up} {Nabla} {"02207} |
| 808 |
\usv_set:nnn {it} {Nabla} {"1D6FB} |
| 809 |
\usv_set:nnn {bfup} {Nabla} {"1D6C1} |
| 810 |
\usv_set:nnn {bfit} {Nabla} {"1D735} |
| 811 |
\usv_set:nnn {bfsfup} {Nabla} {"1D76F} |
| 812 |
\usv_set:nnn {bfsfit} {Nabla} {"1D7A9} |
| 813 |
\usv_set:nnn {up} {partial} {"02202} |
| 814 |
\usv_set:nnn {it} {partial} {"1D715} |
| 815 |
\usv_set:nnn {bfup} {partial} {"1D6DB} |
| 816 |
\usv_set:nnn {bfit} {partial} {"1D74F} |
| 817 |
\usv_set:nnn {bfsfup} {partial} {"1D789} |
| 818 |
\usv_set:nnn {bfsfit} {partial} {"1D7C3} |
| 819 |
\usv_set:nnn {up} {B} {`\B} |
| 820 |
\usv_set:nnn {up} {C} {`\C} |
| 821 |
\usv_set:nnn {up} {D} {`\D} |
| 822 |
\usv_set:nnn {up} {E} {`\E} |
| 823 |
\usv_set:nnn {up} {F} {`\F} |
| 824 |
\usv_set:nnn {up} {H} {`\H} |
| 825 |
\usv_set:nnn {up} {I} {`\I} |
| 826 |
\usv_set:nnn {up} {L} {`\L} |
| 827 |
\usv_set:nnn {up} {M} {`\M} |
| 828 |
\usv_set:nnn {up} {N} {`\N} |
| 829 |
\usv_set:nnn {up} {P} {`\P} |
| 830 |
\usv_set:nnn {up} {Q} {`\Q} |
| 831 |
\usv_set:nnn {up} {R} {`\R} |
| 832 |
\usv_set:nnn {up} {Z} {`\Z} |
| 833 |
\usv_set:nnn {it} {B} {"1D435} |
| 834 |
\usv_set:nnn {it} {C} {"1D436} |
| 835 |
\usv_set:nnn {it} {D} {"1D437} |
| 836 |
\usv_set:nnn {it} {E} {"1D438} |
| 837 |
\usv_set:nnn {it} {F} {"1D439} |
| 838 |
\usv_set:nnn {it} {H} {"1D43B} |
| 839 |
\usv_set:nnn {it} {I} {"1D43C} |
| 840 |
\usv_set:nnn {it} {L} {"1D43F} |
| 841 |
\usv_set:nnn {it} {M} {"1D440} |
| 842 |
\usv_set:nnn {it} {N} {"1D441} |
| 843 |
\usv_set:nnn {it} {P} {"1D443} |
| 844 |
\usv_set:nnn {it} {Q} {"1D444} |
| 845 |
\usv_set:nnn {it} {R} {"1D445} |
| 846 |
\usv_set:nnn {it} {Z} {"1D44D} |
| 847 |
\usv_set:nnn {up} {d} {`\d} |
| 848 |
\usv_set:nnn {up} {e} {`\e} |
| 849 |
\usv_set:nnn {up} {g} {`\g} |
| 850 |
\usv_set:nnn {up} {h} {`\h} |
| 851 |
\usv_set:nnn {up} {i} {`\i} |
| 852 |
\usv_set:nnn {up} {j} {`\j} |
| 853 |
\usv_set:nnn {up} {o} {`\o} |
| 854 |
\usv_set:nnn {it} {d} {"1D451} |
| 855 |
\usv_set:nnn {it} {e} {"1D452} |
| 856 |
\usv_set:nnn {it} {g} {"1D454} |
| 857 |
\usv_set:nnn {it} {h} {"0210E} |
| 858 |
\usv_set:nnn {it} {i} {"1D456} |
| 859 |
\usv_set:nnn {it} {j} {"1D457} |
| 860 |
\usv_set:nnn {it} {o} {"1D45C} |
| 861 |
\usv_set:nnn {bb} {h} {"1D559} |
| 862 |
\usv_set:nnn {tt} {h} {"1D691} |
| 863 |
\usv_set:nnn {scr} {h} {"1D4BD} |
| 864 |
\usv_set:nnn {cal} {h} {"1D4BD} |
| 865 |
\usv_set:nnn {frak} {h} {"1D525} |
| 866 |
\usv_set:nnn {bfup} {h} {"1D421} |
| 867 |
\usv_set:nnn {bfit} {h} {"1D489} |
| 868 |
\usv_set:nnn {sfup} {h} {"1D5C1} |
| 869 |
\usv_set:nnn {sfit} {h} {"1D629} |
| 870 |
\usv_set:nnn {bffrak} {h} {"1D58D} |
| 871 |
\usv_set:nnn {bfscr} {h} {"1D4F1} |
| 872 |
\usv_set:nnn {bfcal} {h} {"1D4F1} |
| 873 |
\usv_set:nnn {bfsfup} {h} {"1D5F5} |
| 874 |
\usv_set:nnn {bfsfit} {h} {"1D65D} |
| 875 |
\usv_set:nnn {up} {dotlessi} {"00131} |
| 876 |
\usv_set:nnn {up} {dotlessj} {"00237} |
| 877 |
\usv_set:nnn {it} {dotlessi} {"1D6A4} |
| 878 |
\usv_set:nnn {it} {dotlessj} {"1D6A5} |
| 879 |
\usv_set:nnn {bb} {C} {"2102} |
| 880 |
\usv_set:nnn {bb} {H} {"210D} |
| 881 |
\usv_set:nnn {bb} {N} {"2115} |
| 882 |
\usv_set:nnn {bb} {P} {"2119} |
| 883 |
\usv_set:nnn {bb} {Q} {"211A} |
| 884 |
\usv_set:nnn {bb} {R} {"211D} |
| 885 |
\usv_set:nnn {bb} {Z} {"2124} |
| 886 |
\usv_set:nnn {up} {Pi} {"003A0} |
| 887 |
\usv_set:nnn {up} {pi} {"003C0} |
| 888 |
\usv_set:nnn {up} {Gamma} {"00393} |
| 889 |
\usv_set:nnn {up} {gamma} {"003B3} |
| 890 |
\usv_set:nnn {up} {summation} {"02211} |
| 891 |
\usv_set:nnn {it} {Pi} {"1D6F1} |
| 892 |
\usv_set:nnn {it} {pi} {"1D70B} |
| 893 |
\usv_set:nnn {it} {Gamma} {"1D6E4} |
| 894 |
\usv_set:nnn {it} {gamma} {"1D6FE} |
| 895 |
\usv_set:nnn {bb} {Pi} {"0213F} |
| 896 |
\usv_set:nnn {bb} {pi} {"0213C} |
| 897 |
\usv_set:nnn {bb} {Gamma} {"0213E} |
| 898 |
\usv_set:nnn {bb} {gamma} {"0213D} |
| 899 |
\usv_set:nnn {bb} {summation} {"02140} |
| 900 |
\usv_set:nnn {bbit} {D} {"2145} |
| 901 |
\usv_set:nnn {bbit} {d} {"2146} |
| 902 |
\usv_set:nnn {bbit} {e} {"2147} |
| 903 |
\usv_set:nnn {bbit} {i} {"2148} |
| 904 |
\usv_set:nnn {bbit} {j} {"2149} |
| 905 |
\usv_set:nnn {scr} {B} {"212C} |
| 906 |
\usv_set:nnn {scr} {E} {"2130} |
| 907 |
\usv_set:nnn {scr} {F} {"2131} |
| 908 |
\usv_set:nnn {scr} {H} {"210B} |
| 909 |
\usv_set:nnn {scr} {I} {"2110} |
| 910 |
\usv_set:nnn {scr} {L} {"2112} |
| 911 |
\usv_set:nnn {scr} {M} {"2133} |
| 912 |
\usv_set:nnn {scr} {R} {"211B} |
| 913 |
\usv_set:nnn {scr} {e} {"212F} |
| 914 |
\usv_set:nnn {scr} {g} {"210A} |
| 915 |
\usv_set:nnn {scr} {o} {"2134} |
| 916 |
\usv_set:nnn {cal} {B} {"212C} |
| 917 |
\usv_set:nnn {cal} {E} {"2130} |
| 918 |
\usv_set:nnn {cal} {F} {"2131} |
| 919 |
\usv_set:nnn {cal} {H} {"210B} |
| 920 |
\usv_set:nnn {cal} {I} {"2110} |
| 921 |
\usv_set:nnn {cal} {L} {"2112} |
| 922 |
\usv_set:nnn {cal} {M} {"2133} |
| 923 |
\usv_set:nnn {cal} {R} {"211B} |
| 924 |
\usv_set:nnn {cal} {e} {"212F} |
| 925 |
\usv_set:nnn {cal} {g} {"210A} |
| 926 |
\usv_set:nnn {cal} {o} {"2134} |
| 927 |
\usv_set:nnn {frak} {C} {"212D} |
| 928 |
\usv_set:nnn {frak} {H} {"210C} |
| 929 |
\usv_set:nnn {frak} {I} {"2111} |
| 930 |
\usv_set:nnn {frak} {R} {"211C} |
| 931 |
\usv_set:nnn {frak} {Z} {"2128} |
| 932 |
|
| 933 |
%%^^A%% um-code-setchar.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 934 |
%%^^A%% General assignment of maths symbols. |
| 935 |
|
| 936 |
\group_begin: |
| 937 |
\file_get:nnN {unicode-math-table.tex} {} \l__um_mathtable_tl |
| 938 |
\cs_set:Npn \UnicodeMathSymbol #1#2#3#4 |
| 939 |
{ |
| 940 |
\exp_not:n { \__um_sym:nnn {#1} {#2} {#3} } |
| 941 |
} |
| 942 |
\tl_gset:Nx \g__um_mathtable_tl {\l__um_mathtable_tl} |
| 943 |
\group_end: |
| 944 |
\__um_cs_new:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl} |
| 945 |
\AtBeginDocument{\__um_define_math_chars:} |
| 946 |
\__um_cs_new:Nn \__um_define_math_chars: |
| 947 |
{ |
| 948 |
\group_begin: |
| 949 |
\cs_set:Npn \__um_sym:nnn ##1##2##3 |
| 950 |
{ |
| 951 |
\tl_if_in:nnT |
| 952 |
{ \mathord \mathalpha \mathbin \mathrel \mathpunct \mathop \mathfence } |
| 953 |
{##3} |
| 954 |
{ |
| 955 |
\exp_last_unbraced:NNx \cs_gset_eq:NN ##2 { \char_generate:nn {##1} {12} } |
| 956 |
} |
| 957 |
} |
| 958 |
\__um_input_math_symbol_table: |
| 959 |
\group_end: |
| 960 |
} |
| 961 |
\cs_set:Nn \__um_set_mathsymbol:nNNn |
| 962 |
{ |
| 963 |
\bool_lazy_and:nnT |
| 964 |
{ |
| 965 |
\int_compare_p:nNn {#4} > {127} |
| 966 |
} |
| 967 |
{ |
| 968 |
\int_compare_p:nNn { \char_value_catcode:n {#4} } = {11} |
| 969 |
} |
| 970 |
{ \char_set_catcode_other:n {#4} } |
| 971 |
|
| 972 |
\token_case_meaning:Nn #3 |
| 973 |
{ |
| 974 |
\mathord { \__um_set_mathcode:nnn {#4} {#3} {#1} } |
| 975 |
\mathalpha { \__um_set_mathcode:nnn {#4} {#3} {#1} } |
| 976 |
\mathbin { \__um_set_mathcode:nnn {#4} {#3} {#1} } |
| 977 |
\mathrel { \__um_set_mathcode:nnn {#4} {#3} {#1} } |
| 978 |
\mathpunct { \__um_set_mathcode:nnn {#4} {#3} {#1} } |
| 979 |
\mathop { \__um_set_big_operator:nnn {#1} {#2} {#4} } |
| 980 |
\mathopen { \__um_set_math_open:nnn {#1} {#2} {#4} } |
| 981 |
\mathclose { \__um_set_math_close:nnn {#1} {#2} {#4} } |
| 982 |
\mathfence { \__um_set_math_fence:nnnn {#1} {#2} {#3} {#4} } |
| 983 |
\mathaccent |
| 984 |
{ \__um_set_math_accent:Nnnn #2 {fixed} {#1} {#4} } |
| 985 |
\mathbotaccent |
| 986 |
{ \__um_set_math_accent:Nnnn #2 {bottom~ fixed} {#1} {#4} } |
| 987 |
\mathaccentwide |
| 988 |
{ \__um_set_math_accent:Nnnn #2 {} {#1} {#4} } |
| 989 |
\mathbotaccentwide |
| 990 |
{ \__um_set_math_accent:Nnnn #2 {bottom} {#1} {#4} } |
| 991 |
\mathover |
| 992 |
{ \__um_set_math_overunder:Nnnn #2 {} {#1} {#4} } |
| 993 |
\mathunder |
| 994 |
{ \__um_set_math_overunder:Nnnn #2 {bottom} {#1} {#4} } |
| 995 |
\mathaccentoverlay |
| 996 |
{ \__um_set_math_accent:Nnnn #2 {overlay~ fixed} {#1} {#4} } |
| 997 |
} |
| 998 |
} |
| 999 |
\edef\mathfence{\string\mathfence} |
| 1000 |
\edef\mathover{\string\mathover} |
| 1001 |
\edef\mathunder{\string\mathunder} |
| 1002 |
\edef\mathbotaccent{\string\mathbotaccent} |
| 1003 |
\edef\mathaccentwide{\string\mathaccentwide} |
| 1004 |
\edef\mathaccentoverlay{\string\mathaccentoverlay} |
| 1005 |
\edef\mathbotaccentwide{\string\mathbotaccentwide} |
| 1006 |
\cs_new:Nn \__um_set_big_operator:nnn |
| 1007 |
{ |
| 1008 |
\__um_char_gmake_mathactive:n {#3} |
| 1009 |
\cs_set_protected_nopar:Npx \__um_tmpa: { \exp_not:c { \cs_to_str:N #2 _sym } } |
| 1010 |
\char_gset_active_eq:nN {#3} \__um_tmpa: |
| 1011 |
|
| 1012 |
\__um_set_mathchar:cNnn {\cs_to_str:N #2 op} \mathop {#1} {#3} |
| 1013 |
|
| 1014 |
\cs_gset:cpx { \cs_to_str:N #2 _sym } |
| 1015 |
{ |
| 1016 |
\exp_not:c { \cs_to_str:N #2 op } |
| 1017 |
\exp_not:n { \tl_if_in:NnT \l__um_nolimits_tl {#2} \nolimits } |
| 1018 |
} |
| 1019 |
} |
| 1020 |
\cs_new:Nn \__um_set_math_open:nnn |
| 1021 |
{ |
| 1022 |
\tl_if_in:NnTF \l__um_radicals_tl {#2} |
| 1023 |
{ |
| 1024 |
\cs_if_exist:NF #2 |
| 1025 |
{ |
| 1026 |
%% todo: check if the check is necessary |
| 1027 |
\cs_gset_protected_nopar:Npx #2 { \exp_not:c { \cs_to_str:N #2 sign } } |
| 1028 |
} |
| 1029 |
\cs_gset_protected_nopar:cpx { \cs_to_str:N #2 sign } |
| 1030 |
{ |
| 1031 |
\__um_radical:nn {#1} {#3} |
| 1032 |
} |
| 1033 |
\tl_if_exist:cF {c__um_radical_\cs_to_str:N #2_tl} |
| 1034 |
{ |
| 1035 |
\tl_const:cn {c__um_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} |
| 1036 |
} |
| 1037 |
} |
| 1038 |
{ |
| 1039 |
\__um_set_delcode:nnn {#1} {#3} {#3} |
| 1040 |
\__um_set_mathcode:nnn {#3} \mathopen {#1} |
| 1041 |
\cs_gset_protected_nopar:Npx #2 |
| 1042 |
{ \__um_delimiter:Nnn \mathopen {#1} {#3} } |
| 1043 |
} |
| 1044 |
} |
| 1045 |
\cs_new:Nn \__um_set_math_close:nnn |
| 1046 |
{ |
| 1047 |
\__um_set_delcode:nnn {#1} {#3} {#3} |
| 1048 |
\__um_set_mathcode:nnn {#3} \mathclose {#1} |
| 1049 |
\cs_gset_protected_nopar:Npx #2 |
| 1050 |
{ \__um_delimiter:Nnn \mathclose {#1} {#3} } |
| 1051 |
} |
| 1052 |
\cs_new:Nn \__um_set_math_fence:nnnn |
| 1053 |
{ |
| 1054 |
\__um_set_mathcode:nnn {#4} {#3} {#1} |
| 1055 |
\__um_set_delcode:nnn {#1} {#4} {#4} |
| 1056 |
\cs_gset_protected_nopar:cpx {l \cs_to_str:N #2} |
| 1057 |
{ \__um_delimiter:Nnn \mathopen {#1} {#4} } |
| 1058 |
\cs_gset_protected_nopar:cpx {r \cs_to_str:N #2} |
| 1059 |
{ \__um_delimiter:Nnn \mathclose {#1} {#4} } |
| 1060 |
} |
| 1061 |
\cs_new:Nn \__um_set_math_accent:Nnnn |
| 1062 |
{ |
| 1063 |
\cs_gset_protected_nopar:Npx #1 |
| 1064 |
{ \__um_accent:nnn {#2} {#3} {#4} } |
| 1065 |
} |
| 1066 |
\cs_new:Nn \__um_set_math_overunder:Nnnn |
| 1067 |
{ |
| 1068 |
\cs_gset_protected_nopar:Npx #1 ##1 |
| 1069 |
{ |
| 1070 |
\mathop |
| 1071 |
{ \__um_accent:nnn {#2} {#3} {#4} {{}##1} } |
| 1072 |
% TODO: remove braces above ^^ which work around a LuaTeX bug |
| 1073 |
\limits |
| 1074 |
} |
| 1075 |
} |
| 1076 |
|
| 1077 |
%%^^A%% um-code-mathtext.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 1078 |
%%^^A%% The "math text" commands such as `\mathbf` and co. |
| 1079 |
|
| 1080 |
\keys_define:nn {__um_mathface} |
| 1081 |
{ |
| 1082 |
version .tl_set:N = \l__um_mversion_tl |
| 1083 |
} |
| 1084 |
\__um_cs_new:Nn \__um_setmathfontface:Nnn |
| 1085 |
{ |
| 1086 |
\tl_clear:N \l__um_mversion_tl |
| 1087 |
|
| 1088 |
\keys_set_known:nnN {__um_mathface} {#2} \l__um_keyval_clist |
| 1089 |
|
| 1090 |
\fontspec_set_family:Nxx \l__um_tmpa_tl |
| 1091 |
{ ItalicFont={}, BoldFont={}, SmallCapsFont={}, \exp_not:V \l__um_keyval_clist } |
| 1092 |
{ #3 } |
| 1093 |
|
| 1094 |
\tl_if_empty:NT \l__um_mversion_tl |
| 1095 |
{ |
| 1096 |
\tl_set:Nn \l__um_mversion_tl {normal} |
| 1097 |
\DeclareMathAlphabet #1 {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\shapedefault} |
| 1098 |
} |
| 1099 |
|
| 1100 |
\SetMathAlphabet #1 {\l__um_mversion_tl} {\g_fontspec_encoding_tl} {\l__um_tmpa_tl} {\mddefault} {\shapedefault} |
| 1101 |
|
| 1102 |
% integrate with fontspec's \setmathrm etc: |
| 1103 |
\token_case_meaning:Nn #1 |
| 1104 |
{ |
| 1105 |
\mathrm { \cs_gset_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } |
| 1106 |
\mathsf { \cs_gset_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } |
| 1107 |
\mathtt { \cs_gset_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } |
| 1108 |
} |
| 1109 |
} |
| 1110 |
\cs_set:Npn \use@mathgroup #1 #2 |
| 1111 |
{ |
| 1112 |
\math@bgroup |
| 1113 |
\cs_if_eq:cNF {M@\f@encoding} #1 {#1} |
| 1114 |
\__um_switch_to:n {literal} |
| 1115 |
\__um_mathgroup_set:n {#2} |
| 1116 |
\math@egroup |
| 1117 |
} |
| 1118 |
\cs_set_protected:Npn \operator@font |
| 1119 |
{ |
| 1120 |
\__um_switch_to:n {literal} |
| 1121 |
\__um_fontswitch:n { \g__um_operator_mathfont_tl } |
| 1122 |
} |
| 1123 |
\cs_set:Nn \__um_fontswitch:n |
| 1124 |
{ |
| 1125 |
\cs_set_eq:NN \math@bgroup \scan_stop: |
| 1126 |
\cs_set_eq:NN \__um_group_begin: \scan_stop: |
| 1127 |
\cs_set:Npn \__um_group_end:n % takes no argument in this case |
| 1128 |
{ |
| 1129 |
\cs_set_eq:NN \__um_group_begin: \__um_group_begin_frozen: |
| 1130 |
\cs_set_eq:NN \__um_group_end:n \__um_group_end_frozen:n |
| 1131 |
\cs_set_eq:NN \math@bgroup \@@math@bgroup |
| 1132 |
\cs_set_eq:NN \math@egroup \@@math@egroup |
| 1133 |
} |
| 1134 |
\cs_set_eq:NN \math@egroup \__um_group_end:n |
| 1135 |
#1 \scan_stop: |
| 1136 |
} |
| 1137 |
\cs_generate_variant:Nn \tl_if_eq:nnT {o} |
| 1138 |
\__um_cs_set:Nn \__fontspec_setmainfont_hook:nn |
| 1139 |
{ |
| 1140 |
\tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} |
| 1141 |
{ |
| 1142 |
\fontspec_gset_family:Nnn \g__fontspec_mathrm_tl {Renderer=Basic,#1} {#2} |
| 1143 |
\__fontspec_setmathrm_hook:nn {#1} {#2} |
| 1144 |
} |
| 1145 |
} |
| 1146 |
\__um_cs_set:Nn \__fontspec_setsansfont_hook:nn |
| 1147 |
{ |
| 1148 |
\tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} |
| 1149 |
{ |
| 1150 |
\fontspec_gset_family:Nnn \g__fontspec_mathsf_tl {Renderer=Basic,#1} {#2} |
| 1151 |
\__fontspec_setmathsf_hook:nn {#1} {#2} |
| 1152 |
} |
| 1153 |
} |
| 1154 |
\__um_cs_set:Nn \__fontspec_setmonofont_hook:nn |
| 1155 |
{ |
| 1156 |
\tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} |
| 1157 |
{ |
| 1158 |
\fontspec_gset_family:Nnn \g__fontspec_mathtt_tl {Renderer=Basic,#1} {#2} |
| 1159 |
\__fontspec_setmathtt_hook:nn {#1} {#2} |
| 1160 |
} |
| 1161 |
} |
| 1162 |
\cs_new:Nn \__um_rm_series_default:n |
| 1163 |
{ |
| 1164 |
\ifcsname #1series@rm\endcsname |
| 1165 |
\csname #1series@rm\endcsname |
| 1166 |
\else |
| 1167 |
\csname #1default\endcsname |
| 1168 |
\fi |
| 1169 |
} |
| 1170 |
\__um_cs_set:Nn \__fontspec_setmathrm_hook:nn |
| 1171 |
{ |
| 1172 |
\SetMathAlphabet\mathrm{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl{\__um_rm_series_default:n {md}}\shapedefault |
| 1173 |
\SetMathAlphabet\mathit{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl{\__um_rm_series_default:n {md}}\itdefault |
| 1174 |
\SetMathAlphabet\mathbf{normal}\g_fontspec_encoding_tl\g__fontspec_mathrm_tl{\__um_rm_series_default:n {bf}}\shapedefault |
| 1175 |
} |
| 1176 |
\__um_cs_set:Nn \__fontspec_setboldmathrm_hook:nn |
| 1177 |
{ |
| 1178 |
\SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl{\__um_rm_series_default:n {md}}\shapedefault |
| 1179 |
\SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl{\__um_rm_series_default:n {bf}}\shapedefault |
| 1180 |
\SetMathAlphabet\mathit{bold}\g_fontspec_encoding_tl\g__fontspec_bfmathrm_tl\mddefault\itdefault |
| 1181 |
} |
| 1182 |
\__um_cs_set:Nn \__fontspec_setmathsf_hook:nn |
| 1183 |
{ |
| 1184 |
\SetMathAlphabet\mathsf{normal}\g_fontspec_encoding_tl\g__fontspec_mathsf_tl{\__um_rm_series_default:n {md}}\shapedefault |
| 1185 |
\SetMathAlphabet\mathsf{bold} \g_fontspec_encoding_tl\g__fontspec_mathsf_tl{\__um_rm_series_default:n {bf}}\shapedefault |
| 1186 |
} |
| 1187 |
\__um_cs_set:Nn \__fontspec_setmathtt_hook:nn |
| 1188 |
{ |
| 1189 |
\SetMathAlphabet\mathtt{normal}\g_fontspec_encoding_tl\g__fontspec_mathtt_tl{\__um_rm_series_default:n {md}}\shapedefault |
| 1190 |
\SetMathAlphabet\mathtt{bold} \g_fontspec_encoding_tl\g__fontspec_mathtt_tl{\__um_rm_series_default:n {bf}}\shapedefault |
| 1191 |
} |
| 1192 |
\tl_if_eq:onF {\g__fontspec_mathrm_tl} {\rmdefault} { \__fontspec_setmathrm_hook:nn {} {} } |
| 1193 |
\tl_if_eq:onF {\g__fontspec_mathsf_tl} {\sfdefault} { \__fontspec_setmathsf_hook:nn {} {} } |
| 1194 |
\tl_if_eq:onF {\g__fontspec_mathtt_tl} {\ttdefault} { \__fontspec_setmathtt_hook:nn {} {} } |
| 1195 |
\AtBeginDocument |
| 1196 |
{ |
| 1197 |
\tl_if_eq:onT {\g__fontspec_mathrm_tl} {\rmdefault} { \__fontspec_setmathrm_hook:nn {} {} } |
| 1198 |
\tl_if_eq:onT {\g__fontspec_mathsf_tl} {\sfdefault} { \__fontspec_setmathsf_hook:nn {} {} } |
| 1199 |
\tl_if_eq:onT {\g__fontspec_mathtt_tl} {\ttdefault} { \__fontspec_setmathtt_hook:nn {} {} } |
| 1200 |
} |
| 1201 |
|
| 1202 |
%%^^A%% um-code-main.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 1203 |
%%^^A%% Definition of `\setmainfont`. |
| 1204 |
|
| 1205 |
\__um_cs_new:Nn \__um_setmathfont:nn |
| 1206 |
{ |
| 1207 |
|
| 1208 |
\__um_init:n {#2} |
| 1209 |
\cs_set_eq:NN \glb@currsize \scan_stop: |
| 1210 |
\cs_if_exist:cF { S@ \f@size } { \calculate@math@sizes } |
| 1211 |
\use:c { S@ \f@size } |
| 1212 |
|
| 1213 |
\keys_set_known:nnN {unicode-math} {#1} \l__um_unknown_keys_clist |
| 1214 |
|
| 1215 |
\bool_if:NT \g__um_init_bool \__um_fontspec_trial_font: |
| 1216 |
\bool_if:NT \g__um_init_bool \__um_declare_math_sizes: |
| 1217 |
|
| 1218 |
\__um_fontspec_select_font: |
| 1219 |
\__um_setup_math_fam: |
| 1220 |
\bool_if:NT \g__um_init_bool |
| 1221 |
{ |
| 1222 |
\__um_setup_legacy_fam_two: |
| 1223 |
\__um_setup_legacy_fam_three: |
| 1224 |
} |
| 1225 |
|
| 1226 |
\__um_input_math_symbol_table: |
| 1227 |
|
| 1228 |
\bool_if:NT \g__um_init_bool \__um_onceoff_setup: |
| 1229 |
\__um_remap_symbols: |
| 1230 |
\__um_setup_mathactives: |
| 1231 |
\__um_setup_delcodes: |
| 1232 |
\__um_setup_alphabets: |
| 1233 |
|
| 1234 |
%% TODO: what of the above should only be run for the "default"/"main" font? |
| 1235 |
|
| 1236 |
\bool_if:NTF \g__um_init_bool |
| 1237 |
{ |
| 1238 |
\bool_gset_true:N \g__um_main_font_defined_bool |
| 1239 |
\__um_mathparam_store: |
| 1240 |
\__um_log:n {default-math-font} |
| 1241 |
} |
| 1242 |
{ |
| 1243 |
\__um_mathparam_restore: |
| 1244 |
} |
| 1245 |
} |
| 1246 |
\AtBeginDocument { \bool_if:NF \g__um_main_font_defined_bool \__um_load_lm: } |
| 1247 |
\__um_cs_new:Nn \__um_load_lm: |
| 1248 |
{ |
| 1249 |
\setmathfont{latinmodern-math.otf}[BoldFont={latinmodern-math.otf}] |
| 1250 |
} |
| 1251 |
\__um_cs_new:Nn \__um_init:n |
| 1252 |
{ |
| 1253 |
\tl_set:Nn \l__um_fontname_tl {#1} |
| 1254 |
\bool_gset_true:N \g__um_ot_math_bool |
| 1255 |
\tl_set:Nn \l__um_mversion_tl {normal} |
| 1256 |
\tl_set:Nn \l__um_symfont_label_tl {operators} |
| 1257 |
|
| 1258 |
\tl_set:Nn \l__um_script_features_tl {Style=MathScript} |
| 1259 |
\tl_set:Nn \l__um_sscript_features_tl {Style=MathScriptScript} |
| 1260 |
\tl_set_eq:NN \l__um_script_font_tl \l__um_fontname_tl |
| 1261 |
\tl_set_eq:NN \l__um_sscript_font_tl \l__um_fontname_tl |
| 1262 |
|
| 1263 |
\bool_gset_true:N \g__um_init_bool |
| 1264 |
\seq_gclear:N \g__um_char_range_seq |
| 1265 |
\clist_clear:N \l__um_mathmap_charints_clist |
| 1266 |
\seq_gclear:N \g__um_mathalph_seq |
| 1267 |
\seq_clear:N \l__um_missing_alph_seq |
| 1268 |
|
| 1269 |
\cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_noparse:nnn |
| 1270 |
\cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_noparse:nnn |
| 1271 |
\cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n |
| 1272 |
\cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_noparse:nn |
| 1273 |
\cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_noparse:nNN |
| 1274 |
} |
| 1275 |
\tl_new:N \g__um_main_font_cmd_tl |
| 1276 |
\cs_new:Nn \__um_sf_size: { \__um_fontdimen_pc_to_pt:nN {10} \g__um_trial_font } |
| 1277 |
\cs_new:Nn \__um_ssf_size: { \__um_fontdimen_pc_to_pt:nN {11} \g__um_trial_font } |
| 1278 |
\__um_cs_new:Nn \__um_declare_math_sizes: |
| 1279 |
{ |
| 1280 |
\fp_gset:Nn \g__um_size_tfsf_fp { (\f@size + \__um_sf_size: )/2 } |
| 1281 |
\fp_gset:Nn \g__um_size_sfssf_fp { (\__um_sf_size: + \__um_ssf_size:)/2 } |
| 1282 |
|
| 1283 |
\dim_compare:nF { \fontdimen 10 \g__um_trial_font == 0pt } |
| 1284 |
{ |
| 1285 |
\DeclareMathSizes { \f@size } { \f@size } { \__um_sf_size: } { \__um_ssf_size: } |
| 1286 |
} |
| 1287 |
} |
| 1288 |
\__um_cs_new:Nn \__um_fontspec_trial_font: |
| 1289 |
{ |
| 1290 |
\tl_set:Nx \l__um_font_keyval_tl |
| 1291 |
{ |
| 1292 |
Renderer = Basic, |
| 1293 |
BoldItalicFont = {}, ItalicFont = {}, SmallCapsFont = {}, |
| 1294 |
Script = Math, |
| 1295 |
RawFeature = {mathfontdimen=xetex}, |
| 1296 |
\l__um_unknown_keys_clist |
| 1297 |
} |
| 1298 |
|
| 1299 |
\fontspec_set_family:Nxn \l__um_trial_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl} |
| 1300 |
|
| 1301 |
\group_begin: |
| 1302 |
\fontfamily { \l__um_trial_family_tl } \selectfont |
| 1303 |
\exp_last_unbraced:NNo \__um_fontface_gset_eq:NN \g__um_trial_font \font@name |
| 1304 |
\fontspec_if_script:nF {math} |
| 1305 |
{ |
| 1306 |
\__um_warning:n {not-ot-math} |
| 1307 |
\bool_gset_false:N \g__um_ot_math_bool |
| 1308 |
\bool_gset_false:N \g__um_init_bool |
| 1309 |
} |
| 1310 |
\group_end: |
| 1311 |
|
| 1312 |
} |
| 1313 |
\__um_cs_new:Nn \__um_fontspec_select_font: |
| 1314 |
{ |
| 1315 |
\tl_set:Nx \l__um_font_keyval_tl |
| 1316 |
{ |
| 1317 |
Renderer = Basic, |
| 1318 |
BoldItalicFont = {}, ItalicFont = {}, SmallCapsFont = {}, |
| 1319 |
Script = Math, |
| 1320 |
SizeFeatures = |
| 1321 |
{ |
| 1322 |
{ |
| 1323 |
Size = \fp_use:N \g__um_size_tfsf_fp - |
| 1324 |
} , |
| 1325 |
{ |
| 1326 |
Size = \fp_use:N \g__um_size_sfssf_fp - \fp_use:N \g__um_size_tfsf_fp , |
| 1327 |
Font = \l__um_script_font_tl , |
| 1328 |
\l__um_script_features_tl |
| 1329 |
} , |
| 1330 |
{ |
| 1331 |
Size = - \fp_use:N \g__um_size_sfssf_fp , |
| 1332 |
Font = \l__um_sscript_font_tl , |
| 1333 |
\l__um_sscript_features_tl |
| 1334 |
} |
| 1335 |
} , |
| 1336 |
RawFeature = {mathfontdimen=xetex}, |
| 1337 |
\l__um_unknown_keys_clist |
| 1338 |
} |
| 1339 |
|
| 1340 |
\fontspec_set_family:Nxn \l__um_family_tl {\l__um_font_keyval_tl} {\l__um_fontname_tl} |
| 1341 |
|
| 1342 |
\int_gincr:N \g__um_fonts_used_int |
| 1343 |
\group_begin: |
| 1344 |
\fontfamily { \l__um_family_tl } \selectfont |
| 1345 |
\exp_last_unbraced:Nno \__um_fontface_gset_eq:cN {g__um_mathfont_ \int_use:N \g__um_fonts_used_int _font} \font@name |
| 1346 |
\tl_gset:Nx \g__um_curr_font_cmd_tl { \exp_not:c {g__um_mathfont_ \int_use:N \g__um_fonts_used_int _font} } |
| 1347 |
\bool_if:NT \g__um_init_bool |
| 1348 |
{ |
| 1349 |
\exp_last_unbraced:NNo \__um_fontface_gset_eq:NN \l__um_font \font@name |
| 1350 |
} |
| 1351 |
\group_end: |
| 1352 |
} |
| 1353 |
\tl_gset:Nn \g__um_main_font_cmd_tl { \l__um_font } |
| 1354 |
\tl_gset:Nn \g__um_sqrt_font_cmd_tl { \l__um_font } |
| 1355 |
\tl_gset:Nn \g__um_prime_font_cmd_tl { \l__um_font } |
| 1356 |
\__um_cs_new:Nn \__um_setup_math_fam: |
| 1357 |
{ |
| 1358 |
\cs_if_exist:cF { sym \l__um_symfont_label_tl } |
| 1359 |
{ |
| 1360 |
\DeclareSymbolFont{\l__um_symfont_label_tl} |
| 1361 |
{\encodingdefault}{\l__um_family_tl}{\mddefault}{\shapedefault} |
| 1362 |
} |
| 1363 |
\SetSymbolFont{\l__um_symfont_label_tl}{\l__um_mversion_tl} |
| 1364 |
{\encodingdefault}{\l__um_family_tl}{\mddefault}{\shapedefault} |
| 1365 |
\str_if_eq:eeT {\l__um_mversion_tl} {normal} |
| 1366 |
{ |
| 1367 |
\SetSymbolFont{\l__um_symfont_label_tl}{bold} |
| 1368 |
{\encodingdefault}{\l__um_family_tl}{\bfdefault}{\shapedefault} |
| 1369 |
} |
| 1370 |
} |
| 1371 |
\__um_cs_new:Nn \__um_setup_legacy_fam_two: |
| 1372 |
{ |
| 1373 |
\fontspec_set_family:Nxn \l__um_fam_two_tl |
| 1374 |
{ |
| 1375 |
\l__um_font_keyval_tl, |
| 1376 |
RawFeature = {mathfontdimen=tex2}, |
| 1377 |
} {\l__um_fontname_tl} |
| 1378 |
|
| 1379 |
\SetSymbolFont{symbols}{\l__um_mversion_tl} |
| 1380 |
{\encodingdefault}{\l__um_fam_two_tl}{\mddefault}{\shapedefault} |
| 1381 |
|
| 1382 |
\str_if_eq:eeT {\l__um_mversion_tl} {normal} |
| 1383 |
{ |
| 1384 |
\SetSymbolFont{symbols}{bold} |
| 1385 |
{\encodingdefault}{\l__um_fam_two_tl}{\bfdefault}{\shapedefault} |
| 1386 |
} |
| 1387 |
} |
| 1388 |
\__um_cs_new:Nn \__um_setup_legacy_fam_three: |
| 1389 |
{ |
| 1390 |
\fontspec_set_family:Nxn \l__um_fam_three_tl |
| 1391 |
{ |
| 1392 |
\l__um_font_keyval_tl, |
| 1393 |
RawFeature = {mathfontdimen=tex3}, |
| 1394 |
} {\l__um_fontname_tl} |
| 1395 |
|
| 1396 |
\SetSymbolFont{largesymbols}{\l__um_mversion_tl} |
| 1397 |
{\encodingdefault}{\l__um_fam_three_tl}{\mddefault}{\shapedefault} |
| 1398 |
|
| 1399 |
\str_if_eq:eeT {\l__um_mversion_tl} {normal} |
| 1400 |
{ |
| 1401 |
\SetSymbolFont{largesymbols}{bold} |
| 1402 |
{\encodingdefault}{\l__um_fam_three_tl}{\bfdefault}{\shapedefault} |
| 1403 |
} |
| 1404 |
} |
| 1405 |
\__um_cs_new:Nn \__um_onceoff_setup: |
| 1406 |
{ |
| 1407 |
\__um_set_delcode:nnn {operators} {`\.} {0} |
| 1408 |
} |
| 1409 |
\cs_set:Nn \__um_process_symbol_noparse:nnn |
| 1410 |
{ |
| 1411 |
\__um_set_mathsymbol:nNNn {\l__um_symfont_label_tl} #2 #3 {#1} |
| 1412 |
} |
| 1413 |
\cs_set:Nn \__um_process_symbol_parse:nnn |
| 1414 |
{ |
| 1415 |
\__um_if_char_spec:nNT {#1} {#3} |
| 1416 |
{ |
| 1417 |
\__um_process_symbol_noparse:nnn {#1} {#2} {#3} |
| 1418 |
} |
| 1419 |
} |
| 1420 |
\__um_cs_new:Nn \__um_remap_symbols: |
| 1421 |
{ |
| 1422 |
\__um_remap_symbol:nnn {`\-} {\mathbin} {"2212} |
| 1423 |
\__um_remap_symbol:nnn {`\*} {\mathbin} {"02217}% text asterisk to "centred asterisk" |
| 1424 |
\bool_if:NF \g__um_literal_colon_bool |
| 1425 |
{ |
| 1426 |
\__um_remap_symbol:nnn {`\:} {\mathrel} {"02236}% colon to ratio (i.e., punct to rel) |
| 1427 |
} |
| 1428 |
} |
| 1429 |
\cs_new:Nn \__um_remap_symbol_parse:nnn |
| 1430 |
{ |
| 1431 |
\__um_if_char_spec:nNT {#3} {#2} |
| 1432 |
{ \__um_remap_symbol_noparse:nnn {#1} {#2} {#3} } |
| 1433 |
} |
| 1434 |
\cs_new:Nn \__um_remap_symbol_noparse:nnn |
| 1435 |
{ |
| 1436 |
\clist_map_inline:nn {#1} |
| 1437 |
{ \__um_set_mathcode:nnnn {##1} {#2} {\l__um_symfont_label_tl} {#3} } |
| 1438 |
} |
| 1439 |
\__um_cs_new:Nn \__um_setup_mathactives: |
| 1440 |
{ |
| 1441 |
\__um_make_mathactive:nNN {"2032} \__um_prime_single_mchar \mathord |
| 1442 |
\__um_make_mathactive:nNN {"2033} \__um_prime_double_mchar \mathord |
| 1443 |
\__um_make_mathactive:nNN {"2034} \__um_prime_triple_mchar \mathord |
| 1444 |
\__um_make_mathactive:nNN {"2057} \__um_prime_quad_mchar \mathord |
| 1445 |
\__um_make_mathactive:nNN {"2035} \__um_backprime_single_mchar \mathord |
| 1446 |
\__um_make_mathactive:nNN {"2036} \__um_backprime_double_mchar \mathord |
| 1447 |
\__um_make_mathactive:nNN {"2037} \__um_backprime_triple_mchar \mathord |
| 1448 |
\__um_make_mathactive:nNN {`\'} \mathstraightquote \mathord |
| 1449 |
\__um_make_mathactive:nNN {`\`} \mathbacktick \mathord |
| 1450 |
} |
| 1451 |
\cs_new:Nn \__um_make_mathactive_parse:nNN |
| 1452 |
{ |
| 1453 |
\__um_if_char_spec:nNT {#1} #3 |
| 1454 |
{ \__um_make_mathactive_noparse:nNN {#1} #2 #3 } |
| 1455 |
} |
| 1456 |
\cs_new:Nn \__um_make_mathactive_noparse:nNN |
| 1457 |
{ |
| 1458 |
\__um_set_mathchar:NNnn #2 #3 {\l__um_symfont_label_tl} {#1} |
| 1459 |
\__um_char_gmake_mathactive:n {#1} |
| 1460 |
} |
| 1461 |
\cs_new:Nn \__um_assign_delcode_noparse:nn |
| 1462 |
{ |
| 1463 |
\__um_set_delcode:nnn \l__um_symfont_label_tl {#1} {#2} |
| 1464 |
} |
| 1465 |
\cs_new:Nn \__um_assign_delcode_parse:nn |
| 1466 |
{ |
| 1467 |
\__um_if_char_spec:nNT {#2} \@nil |
| 1468 |
{ |
| 1469 |
\__um_assign_delcode_noparse:nn {#1} {#2} |
| 1470 |
} |
| 1471 |
} |
| 1472 |
\cs_new:Nn \__um_assign_delcode:n { \__um_assign_delcode:nn {#1} {#1} } |
| 1473 |
\__um_cs_new:Nn \__um_setup_delcodes: |
| 1474 |
{ |
| 1475 |
\__um_assign_delcode:nn {`\/} {\g__um_slash_delimiter_usv} |
| 1476 |
\__um_assign_delcode:nn {"2044} {\g__um_slash_delimiter_usv} % fracslash |
| 1477 |
\__um_assign_delcode:nn {"2215} {\g__um_slash_delimiter_usv} % divslash |
| 1478 |
\__um_assign_delcode:n {"005C} % backslash |
| 1479 |
\__um_assign_delcode:nn {`\<} {"27E8} % angle brackets with ascii notation |
| 1480 |
\__um_assign_delcode:nn {`\>} {"27E9} % angle brackets with ascii notation |
| 1481 |
\__um_assign_delcode:n {"2191} % up arrow |
| 1482 |
\__um_assign_delcode:n {"2193} % down arrow |
| 1483 |
\__um_assign_delcode:n {"2195} % updown arrow |
| 1484 |
\__um_assign_delcode:n {"219F} % up arrow twohead |
| 1485 |
\__um_assign_delcode:n {"21A1} % down arrow twohead |
| 1486 |
\__um_assign_delcode:n {"21A5} % up arrow from bar |
| 1487 |
\__um_assign_delcode:n {"21A7} % down arrow from bar |
| 1488 |
\__um_assign_delcode:n {"21A8} % updown arrow from bar |
| 1489 |
\__um_assign_delcode:n {"21BE} % up harpoon right |
| 1490 |
\__um_assign_delcode:n {"21BF} % up harpoon left |
| 1491 |
\__um_assign_delcode:n {"21C2} % down harpoon right |
| 1492 |
\__um_assign_delcode:n {"21C3} % down harpoon left |
| 1493 |
\__um_assign_delcode:n {"21C5} % arrows up down |
| 1494 |
\__um_assign_delcode:n {"21F5} % arrows down up |
| 1495 |
\__um_assign_delcode:n {"21C8} % arrows up up |
| 1496 |
\__um_assign_delcode:n {"21CA} % arrows down down |
| 1497 |
\__um_assign_delcode:n {"21D1} % double up arrow |
| 1498 |
\__um_assign_delcode:n {"21D3} % double down arrow |
| 1499 |
\__um_assign_delcode:n {"21D5} % double updown arrow |
| 1500 |
\__um_assign_delcode:n {"21DE} % up arrow double stroke |
| 1501 |
\__um_assign_delcode:n {"21DF} % down arrow double stroke |
| 1502 |
\__um_assign_delcode:n {"21E1} % up arrow dashed |
| 1503 |
\__um_assign_delcode:n {"21E3} % down arrow dashed |
| 1504 |
\__um_assign_delcode:n {"21E7} % up white arrow |
| 1505 |
\__um_assign_delcode:n {"21E9} % down white arrow |
| 1506 |
\__um_assign_delcode:n {"21EA} % up white arrow from bar |
| 1507 |
\__um_assign_delcode:n {"21F3} % updown white arrow |
| 1508 |
} |
| 1509 |
\tl_set:Nn \l__um_nolimits_tl |
| 1510 |
{ |
| 1511 |
\int\iint\iiint\iiiint\oint\oiint\oiiint |
| 1512 |
\intclockwise\varointclockwise\ointctrclockwise\sumint |
| 1513 |
\intbar\intBar\fint\cirfnint\awint\rppolint |
| 1514 |
\scpolint\npolint\pointint\sqint\intlarhk\intx |
| 1515 |
\intcap\intcup\upint\lowint |
| 1516 |
} |
| 1517 |
\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision \cuberoot \fourthroot} |
| 1518 |
\__um_cs_new:Nn \__um_mathparam_restore: |
| 1519 |
{ |
| 1520 |
\glb@settings |
| 1521 |
\tl_use:N \g__um_mathparam_settings_tl |
| 1522 |
} |
| 1523 |
\__um_cs_new:Nn \__um_mathparam_store: |
| 1524 |
{ |
| 1525 |
\glb@settings |
| 1526 |
\tl_gset:Nx \g__um_mathparam_settings_tl |
| 1527 |
{ |
| 1528 |
\__um_mathparam_store_aux:N \displaystyle |
| 1529 |
\__um_mathparam_store_aux:N \textstyle |
| 1530 |
\__um_mathparam_store_aux:N \scriptstyle |
| 1531 |
\__um_mathparam_store_aux:N \scriptscriptstyle |
| 1532 |
} |
| 1533 |
} |
| 1534 |
\cs_set:Nn \__um_mathparam_store_aux:N |
| 1535 |
{ |
| 1536 |
\Umathquad #1 = \the \Umathquad #1 \scan_stop: |
| 1537 |
\Umathaxis #1 = \the \Umathaxis #1 \scan_stop: |
| 1538 |
\Umathoperatorsize #1 = \the \Umathoperatorsize #1 \scan_stop: |
| 1539 |
\Umathoverbarkern #1 = \the \Umathoverbarkern #1 \scan_stop: |
| 1540 |
\Umathoverbarrule #1 = \the \Umathoverbarrule #1 \scan_stop: |
| 1541 |
\Umathoverbarvgap #1 = \the \Umathoverbarvgap #1 \scan_stop: |
| 1542 |
\Umathunderbarkern #1 = \the \Umathunderbarkern #1 \scan_stop: |
| 1543 |
\Umathunderbarrule #1 = \the \Umathunderbarrule #1 \scan_stop: |
| 1544 |
\Umathunderbarvgap #1 = \the \Umathunderbarvgap #1 \scan_stop: |
| 1545 |
\Umathradicalkern #1 = \the \Umathradicalkern #1 \scan_stop: |
| 1546 |
\Umathradicalrule #1 = \the \Umathradicalrule #1 \scan_stop: |
| 1547 |
\Umathradicalvgap #1 = \the \Umathradicalvgap #1 \scan_stop: |
| 1548 |
\Umathradicaldegreebefore #1 = \the \Umathradicaldegreebefore #1 \scan_stop: |
| 1549 |
\Umathradicaldegreeafter #1 = \the \Umathradicaldegreeafter #1 \scan_stop: |
| 1550 |
\Umathradicaldegreeraise #1 = \the \Umathradicaldegreeraise #1 \scan_stop: |
| 1551 |
\Umathstackvgap #1 = \the \Umathstackvgap #1 \scan_stop: |
| 1552 |
\Umathstacknumup #1 = \the \Umathstacknumup #1 \scan_stop: |
| 1553 |
\Umathstackdenomdown #1 = \the \Umathstackdenomdown #1 \scan_stop: |
| 1554 |
\Umathfractionrule #1 = \the \Umathfractionrule #1 \scan_stop: |
| 1555 |
\Umathfractionnumvgap #1 = \the \Umathfractionnumvgap #1 \scan_stop: |
| 1556 |
\Umathfractionnumup #1 = \the \Umathfractionnumup #1 \scan_stop: |
| 1557 |
\Umathfractiondenomvgap #1 = \the \Umathfractiondenomvgap #1 \scan_stop: |
| 1558 |
\Umathfractiondenomdown #1 = \the \Umathfractiondenomdown #1 \scan_stop: |
| 1559 |
\Umathfractiondelsize #1 = \the \Umathfractiondelsize #1 \scan_stop: |
| 1560 |
\Umathlimitabovevgap #1 = \the \Umathlimitabovevgap #1 \scan_stop: |
| 1561 |
\Umathlimitabovebgap #1 = \the \Umathlimitabovebgap #1 \scan_stop: |
| 1562 |
\Umathlimitabovekern #1 = \the \Umathlimitabovekern #1 \scan_stop: |
| 1563 |
\Umathlimitbelowvgap #1 = \the \Umathlimitbelowvgap #1 \scan_stop: |
| 1564 |
\Umathlimitbelowbgap #1 = \the \Umathlimitbelowbgap #1 \scan_stop: |
| 1565 |
\Umathlimitbelowkern #1 = \the \Umathlimitbelowkern #1 \scan_stop: |
| 1566 |
\Umathoverdelimitervgap #1 = \the \Umathoverdelimitervgap #1 \scan_stop: |
| 1567 |
\Umathoverdelimiterbgap #1 = \the \Umathoverdelimiterbgap #1 \scan_stop: |
| 1568 |
\Umathunderdelimitervgap #1 = \the \Umathunderdelimitervgap #1 \scan_stop: |
| 1569 |
\Umathunderdelimiterbgap #1 = \the \Umathunderdelimiterbgap #1 \scan_stop: |
| 1570 |
\Umathsubshiftdrop #1 = \the \Umathsubshiftdrop #1 \scan_stop: |
| 1571 |
\Umathsubshiftdown #1 = \the \Umathsubshiftdown #1 \scan_stop: |
| 1572 |
\Umathsupshiftdrop #1 = \the \Umathsupshiftdrop #1 \scan_stop: |
| 1573 |
\Umathsupshiftup #1 = \the \Umathsupshiftup #1 \scan_stop: |
| 1574 |
\Umathsubsupshiftdown #1 = \the \Umathsubsupshiftdown #1 \scan_stop: |
| 1575 |
\Umathsubtopmax #1 = \the \Umathsubtopmax #1 \scan_stop: |
| 1576 |
\Umathsupbottommin #1 = \the \Umathsupbottommin #1 \scan_stop: |
| 1577 |
\Umathsupsubbottommax #1 = \the \Umathsupsubbottommax #1 \scan_stop: |
| 1578 |
\Umathsubsupvgap #1 = \the \Umathsubsupvgap #1 \scan_stop: |
| 1579 |
\Umathspaceafterscript #1 = \the \Umathspaceafterscript #1 \scan_stop: |
| 1580 |
\Umathconnectoroverlapmin #1 = \the \Umathconnectoroverlapmin #1 \scan_stop: |
| 1581 |
} |
| 1582 |
|
| 1583 |
%%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 1584 |
%%^^A%% Keyval for `\setmathfont` |
| 1585 |
|
| 1586 |
\keys_define:nn {unicode-math} |
| 1587 |
{ |
| 1588 |
version .code:n = |
| 1589 |
{ |
| 1590 |
\tl_set:Nn \l__um_mversion_tl {#1} |
| 1591 |
\DeclareMathVersion {\l__um_mversion_tl} |
| 1592 |
} |
| 1593 |
} |
| 1594 |
\keys_define:nn {unicode-math} |
| 1595 |
{ |
| 1596 |
script-features .tl_set:N = \l__um_script_features_tl , |
| 1597 |
sscript-features .tl_set:N = \l__um_sscript_features_tl , |
| 1598 |
script-font .tl_set:N = \l__um_script_font_tl , |
| 1599 |
sscript-font .tl_set:N = \l__um_sscript_font_tl , |
| 1600 |
} |
| 1601 |
\keys_define:nn {unicode-math} |
| 1602 |
{ |
| 1603 |
range .code:n = |
| 1604 |
{ |
| 1605 |
\bool_if:NF \g__um_main_font_defined_bool { \__um_error:n {no-main-font} } |
| 1606 |
\bool_gset_false:N \g__um_init_bool |
| 1607 |
\__um_range_init: |
| 1608 |
\group_begin: |
| 1609 |
\seq_map_inline:Nn \g__um_mathclasses_seq |
| 1610 |
{ |
| 1611 |
\cs_set:Npn ##1 { \use_none:n \q_unicode_math \exp_not:N ##1 } |
| 1612 |
} |
| 1613 |
\cs_set:Npn \__um_sym:nnn ##1 ##2 ##3 |
| 1614 |
{ |
| 1615 |
\cs_set:Npn ##2 { \use_none:n \q_unicode_math ##1 } |
| 1616 |
} |
| 1617 |
\__um_input_math_symbol_table: |
| 1618 |
\__um_range_process:n {#1} |
| 1619 |
\group_end: |
| 1620 |
} |
| 1621 |
} |
| 1622 |
\__um_cs_new:Nn \__um_range_init: |
| 1623 |
{ |
| 1624 |
\int_gincr:N \g__um_fam_int |
| 1625 |
\tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int} |
| 1626 |
\cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn |
| 1627 |
\cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn |
| 1628 |
\cs_set_eq:NN \__um_maybe_init_alphabet:n \use_none:n |
| 1629 |
\cs_set_eq:NN \__um_assign_delcode:nn \__um_assign_delcode_parse:nn |
| 1630 |
\cs_set_eq:NN \__um_make_mathactive:nNN \__um_make_mathactive_parse:nNN |
| 1631 |
\seq_gclear:N \g__um_char_range_seq |
| 1632 |
\seq_gclear:N \g__um_mclass_range_seq |
| 1633 |
\seq_gclear:N \g__um_mathalph_seq |
| 1634 |
} |
| 1635 |
\cs_new:Nn \__um_range_process:n |
| 1636 |
{ |
| 1637 |
\clist_map_inline:nn {#1} |
| 1638 |
{ |
| 1639 |
\__um_mathalph_decl:nF {##1} { \__um_range_decl:n {##1} } |
| 1640 |
} |
| 1641 |
} |
| 1642 |
\cs_new:Nn \__um_mathalph_decl:nF |
| 1643 |
{ |
| 1644 |
\tl_set:Nn \l__um_tmpa_tl {#1} |
| 1645 |
\tl_clear:N \l__um_tmpb_tl |
| 1646 |
\tl_clear:N \l__um_tmpc_tl |
| 1647 |
|
| 1648 |
\tl_if_in:NnT \l__um_tmpa_tl {->} |
| 1649 |
{ \exp_after:wN \__um_split_arrow:w \l__um_tmpa_tl \q_nil } |
| 1650 |
|
| 1651 |
\tl_if_in:NnT \l__um_tmpa_tl {/} |
| 1652 |
{ \exp_after:wN \__um_split_slash:w \l__um_tmpa_tl \q_nil } |
| 1653 |
|
| 1654 |
\tl_set:Nx \l__um_tmpa_tl { \tl_to_str:N \l__um_tmpa_tl } |
| 1655 |
\exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \math } |
| 1656 |
\exp_args:NNx \tl_remove_all:Nn \l__um_tmpa_tl { \token_to_str:N \sym } |
| 1657 |
\tl_trim_spaces:N \l__um_tmpa_tl |
| 1658 |
|
| 1659 |
\tl_if_empty:NT \l__um_tmpc_tl |
| 1660 |
{ \tl_set_eq:NN \l__um_tmpc_tl \l__um_tmpa_tl } |
| 1661 |
|
| 1662 |
\clist_if_in:NVT \g__um_bad_alpha_clist \l__um_tmpa_tl { \__um_error:n {range-not-bf-sf} } |
| 1663 |
|
| 1664 |
\prop_if_exist:cTF {g__um_named_range_ \l__um_tmpa_tl _prop} |
| 1665 |
{ |
| 1666 |
\seq_gput_right:Nx \g__um_mathalph_seq |
| 1667 |
{ |
| 1668 |
{ \exp_not:V \l__um_tmpa_tl } |
| 1669 |
{ \exp_not:V \l__um_tmpb_tl } |
| 1670 |
{ \exp_not:V \l__um_tmpc_tl } |
| 1671 |
} |
| 1672 |
} |
| 1673 |
{#2} |
| 1674 |
} |
| 1675 |
\cs_set:Npn \__um_split_arrow:w #1->#2 \q_nil |
| 1676 |
{ |
| 1677 |
\tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} } |
| 1678 |
\tl_set:Nx \l__um_tmpc_tl { \tl_trim_spaces:n {#2} } |
| 1679 |
} |
| 1680 |
\cs_set:Npn \__um_split_slash:w #1/#2 \q_nil |
| 1681 |
{ |
| 1682 |
\tl_set:Nx \l__um_tmpa_tl { \tl_trim_spaces:n {#1} } |
| 1683 |
\tl_set:Nx \l__um_tmpb_tl { \tl_trim_spaces:n {#2} } |
| 1684 |
} |
| 1685 |
\cs_new_protected:Nn \__um_range_decl:n |
| 1686 |
{ |
| 1687 |
\bool_lazy_and:nnTF { \tl_if_single_p:n {#1} } { \token_if_cs_p:N #1 } |
| 1688 |
% IF A CSNAME: |
| 1689 |
{ |
| 1690 |
\tl_if_in:VnTF #1 { \q_unicode_math } |
| 1691 |
{ |
| 1692 |
\seq_if_in:NnTF \g__um_mathclasses_seq {#1} |
| 1693 |
{ \seq_gput_right:Nn \g__um_mclass_range_seq {#1} } |
| 1694 |
{ \seq_gput_right:Nx \g__um_char_range_seq { #1 } } |
| 1695 |
} |
| 1696 |
{ \__um_error:nx {bad-cs-in-range} { \tl_to_str:n {#1} } } |
| 1697 |
} |
| 1698 |
% ELSE ASSUME NUMERIC INPUT: |
| 1699 |
{ |
| 1700 |
\seq_gput_right:Nx \g__um_char_range_seq { #1 } |
| 1701 |
} |
| 1702 |
} |
| 1703 |
\cs_new:Nn \__um_if_char_spec:nNT |
| 1704 |
{ |
| 1705 |
% math class: |
| 1706 |
\seq_if_in:NnT \g__um_mclass_range_seq {#2} |
| 1707 |
{ \use_none_delimit_by_q_nil:w } |
| 1708 |
|
| 1709 |
% character slot: |
| 1710 |
\seq_map_inline:Nn \g__um_char_range_seq |
| 1711 |
{ |
| 1712 |
\__um_int_if_slot_is_last_in_range:nnT {#1} {##1} |
| 1713 |
{ \seq_gremove_all:Nn \g__um_char_range_seq {##1} } |
| 1714 |
|
| 1715 |
\__um_int_if_slot_in_range:nnT {#1} {##1} |
| 1716 |
{ \seq_map_break:n { \use_none_delimit_by_q_nil:w } } |
| 1717 |
} |
| 1718 |
|
| 1719 |
% the following expands to nil if no match was found: |
| 1720 |
\use_none:nnn |
| 1721 |
\q_nil |
| 1722 |
\use:n |
| 1723 |
{ |
| 1724 |
\cs_if_eq:NNT #2 \mathalpha |
| 1725 |
{ |
| 1726 |
\clist_put_right:Nx \l__um_mathmap_charints_clist { \int_eval:n {#1} } |
| 1727 |
} |
| 1728 |
#3 |
| 1729 |
} |
| 1730 |
} |
| 1731 |
\cs_new:Nn \__um_int_if_slot_in_range:nnT |
| 1732 |
{ |
| 1733 |
\__um_numrange_parse:nwT {#1} #2 - \q_nil - \q_stop {#3} |
| 1734 |
} |
| 1735 |
\cs_set:Npn \__um_numrange_parse:nwT #1 #2 - #3 - #4 \q_stop #5 |
| 1736 |
{ |
| 1737 |
\tl_if_empty:nTF {#4} { \int_compare:nT {#1=#2} {#5} } |
| 1738 |
{ |
| 1739 |
\tl_if_empty:nTF {#3} { \int_compare:nT {#1>=#2} {#5} } |
| 1740 |
{ |
| 1741 |
\tl_if_empty:nTF {#2} { \int_compare:nT {#1<=#3} {#5} } |
| 1742 |
{ |
| 1743 |
\int_compare:nT {#1>=#2} { \int_compare:nT {#1<=#3} {#5} } |
| 1744 |
} } } |
| 1745 |
} |
| 1746 |
\cs_new:Nn \__um_int_if_slot_is_last_in_range:nnT |
| 1747 |
{ |
| 1748 |
\__um_numrange_last_parse:nwT {#1} #2 - \q_nil - \q_stop {#3} |
| 1749 |
} |
| 1750 |
\cs_set:Npn \__um_numrange_last_parse:nwT #1 #2 - #3 - #4 \q_stop #5 |
| 1751 |
{ |
| 1752 |
\tl_if_empty:nTF {#4} { \int_compare:nT {#1==#2} {#5} } |
| 1753 |
{ |
| 1754 |
\tl_if_empty:nTF {#2} { \int_compare:nT {#1==#3} {#5} } |
| 1755 |
{ |
| 1756 |
\int_compare:nT {#1==#3} {#5} |
| 1757 |
} } |
| 1758 |
} |
| 1759 |
|
| 1760 |
%%^^A%% um-code-fontparam.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 1761 |
%%^^A%% Cross-platform interface for font parameters |
| 1762 |
|
| 1763 |
\cs_new_protected_nopar:Nn \__um_new_cramped_style:N |
| 1764 |
{ |
| 1765 |
\cs_if_exist:NF #1 |
| 1766 |
{ \cs_new_eq:Nc #1 { luatex \cs_to_str:N #1 } } |
| 1767 |
} |
| 1768 |
\__um_new_cramped_style:N \crampeddisplaystyle |
| 1769 |
\__um_new_cramped_style:N \crampedtextstyle |
| 1770 |
\__um_new_cramped_style:N \crampedscriptstyle |
| 1771 |
\__um_new_cramped_style:N \crampedscriptscriptstyle |
| 1772 |
\cs_new_protected_nopar:Nn \__um_font_param:nnnnn |
| 1773 |
{ |
| 1774 |
\tl_set:Nn \l__um_tmpa_tl { #1 } |
| 1775 |
\tl_remove_all:Nn \l__um_tmpa_tl { _ } |
| 1776 |
\__um_font_param_aux:ccc { __um_ #1 :N } { __um_set_ #1 :Nn } |
| 1777 |
{ Umath \l__um_tmpa_tl } |
| 1778 |
} |
| 1779 |
\cs_new_protected_nopar:Nn \__um_font_param:nnn |
| 1780 |
{ |
| 1781 |
\__um_font_param:nnnnn { #1 } { #2 } { #2 } { #3 } { #3 } |
| 1782 |
} |
| 1783 |
\cs_new_protected_nopar:Nn \__um_font_param:nn |
| 1784 |
{ |
| 1785 |
\__um_font_param:nnnnn { #1 } { #2 } { #2 } { #2 } { #2 } |
| 1786 |
} |
| 1787 |
\cs_new_protected_nopar:Nn \__um_font_param:n |
| 1788 |
{ \__um_font_param:nnnnn { #1 } { 0 } { 0 } { 0 } { 0 } } |
| 1789 |
\cs_new_protected_nopar:Nn \__um_font_param_aux:NNN |
| 1790 |
{ |
| 1791 |
\cs_new_nopar:Npn #1 ##1 |
| 1792 |
{ |
| 1793 |
#3 ##1 |
| 1794 |
} |
| 1795 |
\cs_new_protected_nopar:Npn #2 ##1 ##2 |
| 1796 |
{ |
| 1797 |
#3 ##1 \dim_eval:n { ##2 } |
| 1798 |
} |
| 1799 |
} |
| 1800 |
\cs_generate_variant:Nn \__um_font_param_aux:NNN { ccc } |
| 1801 |
\__um_font_param:nn { axis } { 15 } |
| 1802 |
\__um_font_param:nn { operator_size } { 13 } |
| 1803 |
\__um_font_param:n { fraction_del_size } |
| 1804 |
\__um_font_param:nnn { fraction_denom_down } { 45 } { 44 } |
| 1805 |
\__um_font_param:nnn { fraction_denom_vgap } { 50 } { 49 } |
| 1806 |
\__um_font_param:nnn { fraction_num_up } { 43 } { 42 } |
| 1807 |
\__um_font_param:nnn { fraction_num_vgap } { 47 } { 46 } |
| 1808 |
\__um_font_param:nn { fraction_rule } { 48 } |
| 1809 |
\__um_font_param:nn { limit_above_bgap } { 29 } |
| 1810 |
\__um_font_param:n { limit_above_kern } |
| 1811 |
\__um_font_param:nn { limit_above_vgap } { 28 } |
| 1812 |
\__um_font_param:nn { limit_below_bgap } { 31 } |
| 1813 |
\__um_font_param:n { limit_below_kern } |
| 1814 |
\__um_font_param:nn { limit_below_vgap } { 30 } |
| 1815 |
\__um_font_param:nn { over_delimiter_vgap } { 41 } |
| 1816 |
\__um_font_param:nn { over_delimiter_bgap } { 38 } |
| 1817 |
\__um_font_param:nn { under_delimiter_vgap } { 40 } |
| 1818 |
\__um_font_param:nn { under_delimiter_bgap } { 39 } |
| 1819 |
\__um_font_param:nn { overbar_kern } { 55 } |
| 1820 |
\__um_font_param:nn { overbar_rule } { 54 } |
| 1821 |
\__um_font_param:nn { overbar_vgap } { 53 } |
| 1822 |
\__um_font_param:n { quad } |
| 1823 |
\__um_font_param:nn { radical_kern } { 62 } |
| 1824 |
\__um_font_param:nn { radical_rule } { 61 } |
| 1825 |
\__um_font_param:nnn { radical_vgap } { 60 } { 59 } |
| 1826 |
\__um_font_param:nn { radical_degree_before } { 63 } |
| 1827 |
\__um_font_param:nn { radical_degree_after } { 64 } |
| 1828 |
\__um_font_param:nn { radical_degree_raise } { 65 } |
| 1829 |
\__um_font_param:nn { space_after_script } { 27 } |
| 1830 |
\__um_font_param:nnn { stack_denom_down } { 35 } { 34 } |
| 1831 |
\__um_font_param:nnn { stack_num_up } { 33 } { 32 } |
| 1832 |
\__um_font_param:nnn { stack_vgap } { 37 } { 36 } |
| 1833 |
\__um_font_param:nn { sub_shift_down } { 18 } |
| 1834 |
\__um_font_param:nn { sub_shift_drop } { 20 } |
| 1835 |
\__um_font_param:n { subsup_shift_down } |
| 1836 |
\__um_font_param:nn { sub_top_max } { 19 } |
| 1837 |
\__um_font_param:nn { subsup_vgap } { 25 } |
| 1838 |
\__um_font_param:nn { sup_bottom_min } { 23 } |
| 1839 |
\__um_font_param:nn { sup_shift_drop } { 24 } |
| 1840 |
\__um_font_param:nnnnn { sup_shift_up } { 21 } { 22 } { 21 } { 22 } |
| 1841 |
\__um_font_param:nn { supsub_bottom_max } { 26 } |
| 1842 |
\__um_font_param:nn { underbar_kern } { 58 } |
| 1843 |
\__um_font_param:nn { underbar_rule } { 57 } |
| 1844 |
\__um_font_param:nn { underbar_vgap } { 56 } |
| 1845 |
\__um_font_param:n { connector_overlap_min } |
| 1846 |
\cs_set:Nn \__um_fontdimen_to_percent:nN |
| 1847 |
{ |
| 1848 |
\fp_eval:n { \dim_to_decimal_in_sp:n { \fontdimen #1 #2 } / 100 } |
| 1849 |
} |
| 1850 |
\cs_new:Nn \__um_fontdimen_pc_to_pt:nN |
| 1851 |
{ |
| 1852 |
\fp_eval:n { \dim_to_decimal_in_sp:n { \fontdimen #1 #2 } / 100 * \f@size } |
| 1853 |
} |
| 1854 |
\cs_new:Nn \__um_mathstyle_scale:NnnN |
| 1855 |
{ |
| 1856 |
\ifx#1\scriptstyle |
| 1857 |
#2 \__um_fontdimen_to_percent:nN {10} #4 #3 |
| 1858 |
\else |
| 1859 |
\ifx#1\scriptscriptstyle |
| 1860 |
#2 \__um_fontdimen_to_percent:nN {11} #4 #3 |
| 1861 |
\else |
| 1862 |
#2 #3 |
| 1863 |
\fi |
| 1864 |
\fi |
| 1865 |
} |
| 1866 |
|
| 1867 |
%%^^A%% um-code-mathmap.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 1868 |
%%^^A%% Setup of symbol alphabets. |
| 1869 |
|
| 1870 |
\__um_cs_new:Nn \__um_setup_alphabets: |
| 1871 |
{ |
| 1872 |
\bool_if:NTF \g__um_init_bool { \__um_setup_alphabets_implicit: } |
| 1873 |
{ |
| 1874 |
\seq_if_empty:NF \g__um_mathalph_seq { \__um_setup_alphabets_explicit: } |
| 1875 |
\clist_if_empty:NF \l__um_mathmap_charints_clist { \__um_setup_alphabets_inherit: } |
| 1876 |
} |
| 1877 |
} |
| 1878 |
\__um_cs_new:Nn \__um_setup_alphabets_implicit: |
| 1879 |
{ |
| 1880 |
\__um_log:n {setup-implicit} |
| 1881 |
\seq_gset_eq:NN \g__um_mathalph_seq \g__um_default_mathalph_seq |
| 1882 |
\bool_set_true:N \l__um_implicit_alph_bool |
| 1883 |
\__um_maybe_init_alphabet:n {sf} |
| 1884 |
\__um_maybe_init_alphabet:n {bf} |
| 1885 |
\__um_maybe_init_alphabet:n {bfsf} |
| 1886 |
\cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn |
| 1887 |
\cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn |
| 1888 |
\__um_mathalph_map: |
| 1889 |
\seq_if_empty:NF \l__um_missing_alph_seq { \__um_log:n { missing-alphabets } } |
| 1890 |
} |
| 1891 |
\__um_cs_new:Nn \__um_setup_alphabets_explicit: |
| 1892 |
{ |
| 1893 |
\__um_log:n {setup-explicit} |
| 1894 |
\bool_set_false:N \l__um_implicit_alph_bool |
| 1895 |
\cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_noparse:nnn |
| 1896 |
\cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_noparse:nn |
| 1897 |
\__um_mathalph_map: |
| 1898 |
\seq_if_empty:NF \l__um_missing_alph_seq { \__um_log:n { missing-alphabets } } |
| 1899 |
} |
| 1900 |
\__um_cs_new:Nn \__um_setup_alphabets_inherit: |
| 1901 |
{ |
| 1902 |
\seq_gclear:N \g__um_mathalph_seq |
| 1903 |
\seq_map_inline:Nn \g__um_default_mathalph_seq |
| 1904 |
{ |
| 1905 |
\tl_set:No \l__um_style_tl { \use_i:nnn ##1 } |
| 1906 |
\clist_set:No \l__um_alphabet_clist { \use_ii:nnn ##1 } |
| 1907 |
|
| 1908 |
\clist_map_inline:Nn \l__um_alphabet_clist |
| 1909 |
{ |
| 1910 |
\clist_if_exist:cT {g__um_named_slots_ \l__um_style_tl _ ####1 _clist} |
| 1911 |
{ |
| 1912 |
\clist_map_inline:cn {g__um_named_slots_ \l__um_style_tl _ ####1 _clist} |
| 1913 |
{ |
| 1914 |
\clist_map_inline:Nn \l__um_mathmap_charints_clist |
| 1915 |
{ |
| 1916 |
\__um_int_if_slot_in_range:nnT {################1} {########1} |
| 1917 |
{ |
| 1918 |
\seq_gput_right:Nn \g__um_mathalph_seq {##1} |
| 1919 |
\clist_map_break:n { \clist_map_break:n { \clist_map_break: } } |
| 1920 |
} |
| 1921 |
} |
| 1922 |
} |
| 1923 |
} |
| 1924 |
} |
| 1925 |
} |
| 1926 |
|
| 1927 |
\cs_set_eq:NN \__um_set_mathalphabet_char:nnn \__um_mathmap_parse:nnn |
| 1928 |
\cs_set_eq:NN \__um_map_char_single:nn \__um_map_char_parse:nn |
| 1929 |
\__um_mathalph_map: |
| 1930 |
} |
| 1931 |
\cs_set:Nn \__um_mathalph_map: |
| 1932 |
{ |
| 1933 |
\seq_map_inline:Nn \g__um_mathalph_seq |
| 1934 |
{ |
| 1935 |
\tl_set:No \l__um_style_tl { \use_i:nnn ##1 } |
| 1936 |
\clist_set:No \l__um_alphabet_clist { \use_ii:nnn ##1 } |
| 1937 |
\tl_set:No \l__um_remap_style_tl { \use_iii:nnn ##1 } |
| 1938 |
|
| 1939 |
% If no set of alphabets is defined: |
| 1940 |
\clist_if_empty:NT \l__um_alphabet_clist |
| 1941 |
{ |
| 1942 |
\cs_set_eq:NN \__um_maybe_init_alphabet:n \__um_init_alphabet:n |
| 1943 |
\prop_get:cnN { g__um_named_range_ \l__um_style_tl _prop } |
| 1944 |
{ default-alpha } \l__um_alphabet_clist |
| 1945 |
} |
| 1946 |
|
| 1947 |
\__um_check_math_alphabet: |
| 1948 |
\__um_setup_math_alphabet: |
| 1949 |
} |
| 1950 |
} |
| 1951 |
\cs_new:Nn \__um_check_math_alphabet: |
| 1952 |
{ |
| 1953 |
\clist_map_inline:Nn \l__um_alphabet_clist |
| 1954 |
{ |
| 1955 |
\tl_set:Nn \l__um_alphabet_tl {##1} |
| 1956 |
\__um_if_alphabet_exists:nnTF \l__um_style_tl \l__um_alphabet_tl |
| 1957 |
{ |
| 1958 |
\str_if_eq:eeTF {\l__um_alphabet_tl} {misc} |
| 1959 |
{ |
| 1960 |
\__um_maybe_init_alphabet:n \l__um_style_tl |
| 1961 |
\clist_map_break: |
| 1962 |
} |
| 1963 |
{ |
| 1964 |
\__um_glyph_if_exist:NnT \g__um_curr_font_cmd_tl |
| 1965 |
{ \__um_to_usv:nn {\l__um_style_tl} {\l__um_alphabet_tl} } |
| 1966 |
{ |
| 1967 |
\__um_maybe_init_alphabet:n \l__um_style_tl |
| 1968 |
\clist_map_break: |
| 1969 |
} |
| 1970 |
} |
| 1971 |
} |
| 1972 |
{ |
| 1973 |
\msg_warning:nnx {unicode-math} {no-alphabet} |
| 1974 |
{ \l__um_style_tl / \l__um_alphabet_tl } |
| 1975 |
} |
| 1976 |
} |
| 1977 |
} |
| 1978 |
\__um_cs_new:Nn \__um_setup_math_alphabet: |
| 1979 |
{ |
| 1980 |
\clist_map_inline:Nn \l__um_alphabet_clist |
| 1981 |
{ |
| 1982 |
\tl_set:Nx \l__um_alphabet_tl { \tl_trim_spaces:n {##1} } |
| 1983 |
|
| 1984 |
|
| 1985 |
\__um_if_alphabet_exists:nnT {\l__um_style_tl} {\l__um_alphabet_tl} |
| 1986 |
{ |
| 1987 |
\exp_args:No \tl_if_eq:nnTF \l__um_alphabet_tl {misc} |
| 1988 |
{ |
| 1989 |
\__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)} |
| 1990 |
\__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} |
| 1991 |
} |
| 1992 |
{ |
| 1993 |
\__um_glyph_if_exist:NnTF \g__um_curr_font_cmd_tl { \__um_to_usv:nn {\l__um_remap_style_tl} {\l__um_alphabet_tl} } |
| 1994 |
{ |
| 1995 |
\__um_log:nx {setup-alph} {sym \l__um_style_tl~(\l__um_alphabet_tl)} |
| 1996 |
\__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {\l__um_remap_style_tl} |
| 1997 |
} |
| 1998 |
{ |
| 1999 |
\bool_if:NTF \l__um_implicit_alph_bool |
| 2000 |
{ |
| 2001 |
\seq_put_right:Nx \l__um_missing_alph_seq |
| 2002 |
{ |
| 2003 |
\@backslashchar sym \l__um_style_tl \space |
| 2004 |
(\tl_use:c{c__um_math_alphabet_name_ \l__um_alphabet_tl _tl}) |
| 2005 |
} |
| 2006 |
} |
| 2007 |
{ |
| 2008 |
\__um_alphabet_config:nnn {\l__um_style_tl} {\l__um_alphabet_tl} {up} |
| 2009 |
} |
| 2010 |
} |
| 2011 |
} |
| 2012 |
} |
| 2013 |
} |
| 2014 |
} |
| 2015 |
\cs_new:Nn \__um_new_alphabet_config:nnn |
| 2016 |
{ |
| 2017 |
\prop_if_exist:cF {g__um_named_range_#1_prop} |
| 2018 |
{ \__um_warning:nnn {no-named-range} {#1} {#2} } |
| 2019 |
|
| 2020 |
\prop_gput:cnn {g__um_named_range_#1_prop} { alpha_tl } |
| 2021 |
{ |
| 2022 |
\prop_item:cn {g__um_named_range_#1_prop} { alpha_tl } {#2} |
| 2023 |
} |
| 2024 |
% Q: do I need to bother removing duplicates? |
| 2025 |
|
| 2026 |
\cs_new:cn { __um_config_#1_#2:n } |
| 2027 |
{ |
| 2028 |
\clist_gclear_new:c {g__um_named_slots_#1_#2_clist} |
| 2029 |
\tl_set:Nn \l__um_curr_named_slot { g__um_named_slots_#1_#2_clist } |
| 2030 |
#3 |
| 2031 |
\clist_gremove_duplicates:c {g__um_named_slots_#1_#2_clist} |
| 2032 |
} |
| 2033 |
|
| 2034 |
} |
| 2035 |
\cs_new:Nn \__um_alphabet_config:nnn |
| 2036 |
{ |
| 2037 |
\use:c {__um_config_#1_#2:n} {#3} |
| 2038 |
} |
| 2039 |
\prg_new_conditional:Nnn \__um_if_alphabet_exists:nn {T,TF} |
| 2040 |
{ |
| 2041 |
\cs_if_exist:cTF {__um_config_#1_#2:n} |
| 2042 |
\prg_return_true: \prg_return_false: |
| 2043 |
} |
| 2044 |
\cs_new:Nn \__um_map_char_noparse:nn |
| 2045 |
{ |
| 2046 |
\__um_set_mathcode:nnnn {#1} {\mathalpha} {\l__um_symfont_label_tl} {#2} |
| 2047 |
} |
| 2048 |
\cs_new:Nn \__um_map_char_parse:nn |
| 2049 |
{ |
| 2050 |
\__um_if_char_spec:nNT {#1} {\mathalpha} |
| 2051 |
{ \__um_map_char_noparse:nn {#1}{#2} } |
| 2052 |
} |
| 2053 |
\cs_new:Nn \__um_map_char_single:nnn |
| 2054 |
{ |
| 2055 |
\__um_map_char_single:nn { \__um_to_usv:nn {#1} {#3} } |
| 2056 |
{ \__um_to_usv:nn {#2} {#3} } |
| 2057 |
} |
| 2058 |
\cs_set:Nn \__um_map_chars_range:nnn |
| 2059 |
{ |
| 2060 |
\int_step_inline:nnnn {0} {1} {#1-1} |
| 2061 |
{ \__um_map_char_single:nn {#2+##1} {#3+##1} } |
| 2062 |
|
| 2063 |
\clist_gput_right:cx { \l__um_curr_named_slot } |
| 2064 |
{ \int_eval:n { #3 } - \int_eval:n { #3 + #1-1 } } |
| 2065 |
} |
| 2066 |
\cs_new:Nn \__um_map_chars_range:nnnn |
| 2067 |
{ |
| 2068 |
\__um_map_chars_range:nnn {#1} { \__um_to_usv:nn {#2} {#4} } |
| 2069 |
{ \__um_to_usv:nn {#3} {#4} } |
| 2070 |
} |
| 2071 |
\cs_set:Nn \__um_set_normal_char:nnn |
| 2072 |
{ |
| 2073 |
\__um_usv_if_exist:nnT {#3} {#1} |
| 2074 |
{ |
| 2075 |
\clist_map_inline:nn {#2} |
| 2076 |
{ |
| 2077 |
\__um_set_mathalphabet_pos:nnnn {normal} {#1} {##1} {#3} |
| 2078 |
\__um_map_char_single:nnn {##1} {#3} {#1} |
| 2079 |
|
| 2080 |
\clist_gput_right:cx {\l__um_curr_named_slot} |
| 2081 |
{ \int_eval:n { \__um_to_usv:nn {#3} {#1} } } |
| 2082 |
} |
| 2083 |
} |
| 2084 |
} |
| 2085 |
\cs_new:Nn \__um_set_normal_Latin:nn |
| 2086 |
{ |
| 2087 |
\clist_map_inline:nn {#1} |
| 2088 |
{ |
| 2089 |
\__um_set_mathalphabet_Latin:nnn {normal} {##1} {#2} |
| 2090 |
\__um_map_chars_range:nnnn {26} {##1} {#2} {Latin} |
| 2091 |
} |
| 2092 |
} |
| 2093 |
\cs_new:Nn \__um_set_normal_latin:nn |
| 2094 |
{ |
| 2095 |
\clist_map_inline:nn {#1} |
| 2096 |
{ |
| 2097 |
\__um_set_mathalphabet_latin:nnn {normal} {##1} {#2} |
| 2098 |
\__um_map_chars_range:nnnn {26} {##1} {#2} {latin} |
| 2099 |
} |
| 2100 |
} |
| 2101 |
\cs_new:Nn \__um_set_normal_greek:nn |
| 2102 |
{ |
| 2103 |
\clist_map_inline:nn {#1} |
| 2104 |
{ |
| 2105 |
\__um_set_mathalphabet_greek:nnn {normal} {##1} {#2} |
| 2106 |
\__um_map_chars_range:nnnn {25} {##1} {#2} {greek} |
| 2107 |
\__um_map_char_single:nnn {##1} {#2} {epsilon} |
| 2108 |
\__um_map_char_single:nnn {##1} {#2} {vartheta} |
| 2109 |
\__um_map_char_single:nnn {##1} {#2} {varkappa} |
| 2110 |
\__um_map_char_single:nnn {##1} {#2} {phi} |
| 2111 |
\__um_map_char_single:nnn {##1} {#2} {varrho} |
| 2112 |
\__um_map_char_single:nnn {##1} {#2} {varpi} |
| 2113 |
\__um_set_mathalphabet_pos:nnnn {normal} {epsilon} {##1} {#2} |
| 2114 |
\__um_set_mathalphabet_pos:nnnn {normal} {vartheta} {##1} {#2} |
| 2115 |
\__um_set_mathalphabet_pos:nnnn {normal} {varkappa} {##1} {#2} |
| 2116 |
\__um_set_mathalphabet_pos:nnnn {normal} {phi} {##1} {#2} |
| 2117 |
\__um_set_mathalphabet_pos:nnnn {normal} {varrho} {##1} {#2} |
| 2118 |
\__um_set_mathalphabet_pos:nnnn {normal} {varpi} {##1} {#2} |
| 2119 |
} |
| 2120 |
} |
| 2121 |
\cs_new:Nn \__um_set_normal_Greek:nn |
| 2122 |
{ |
| 2123 |
\clist_map_inline:nn {#1} |
| 2124 |
{ |
| 2125 |
\__um_set_mathalphabet_Greek:nnn {normal} {##1} {#2} |
| 2126 |
\__um_map_chars_range:nnnn {25} {##1} {#2} {Greek} |
| 2127 |
\__um_map_char_single:nnn {##1} {#2} {varTheta} |
| 2128 |
\__um_set_mathalphabet_pos:nnnn {normal} {varTheta} {##1} {#2} |
| 2129 |
} |
| 2130 |
} |
| 2131 |
\cs_new:Nn \__um_set_normal_numbers:nn |
| 2132 |
{ |
| 2133 |
\__um_set_mathalphabet_numbers:nnn {normal} {#1} {#2} |
| 2134 |
\__um_map_chars_range:nnnn {10} {#1} {#2} {num} |
| 2135 |
} |
| 2136 |
\cs_new:Nn \__um_mathmap_noparse:nnn |
| 2137 |
{ |
| 2138 |
\tl_gput_right:cx { g__um_switchto_#1_tl } |
| 2139 |
{ |
| 2140 |
\__um_set_mathcode:nnnn {#2} {\mathalpha} {\l__um_symfont_label_tl} {#3} |
| 2141 |
} |
| 2142 |
} |
| 2143 |
\cs_new:Nn \__um_mathmap_parse:nnn |
| 2144 |
{ |
| 2145 |
\exp_args:NNx \clist_if_in:NnT \l__um_mathmap_charints_clist { \int_eval:n {#3} } |
| 2146 |
{ |
| 2147 |
\__um_mathmap_noparse:nnn {#1} {#2} {#3} |
| 2148 |
} |
| 2149 |
} |
| 2150 |
\cs_new:Nn \__um_set_mathalphabet_char:nnnn |
| 2151 |
{ |
| 2152 |
\__um_set_mathalphabet_char:nnn {#1} { \__um_to_usv:nn {#2} {#4} } |
| 2153 |
{ \__um_to_usv:nn {#3} {#4} } |
| 2154 |
} |
| 2155 |
\cs_new:Nn \__um_set_mathalph_range:nnnn |
| 2156 |
{ |
| 2157 |
\int_step_inline:nnnn {0} {1} {#1-1} |
| 2158 |
{ \__um_set_mathalphabet_char:nnn {#2} { ##1 + #3 } { ##1 + #4 } } |
| 2159 |
} |
| 2160 |
\cs_new:Nn \__um_set_mathalph_range:nnnnn |
| 2161 |
{ |
| 2162 |
\clist_gput_right:cx { \l__um_curr_named_slot } |
| 2163 |
{ \int_eval:n { \__um_to_usv:nn {#4} {#5} } - \int_eval:n { (#1-1)+\__um_to_usv:nn {#4} {#5} } } |
| 2164 |
|
| 2165 |
\__um_set_mathalph_range:nnnn {#1} {#2} { \__um_to_usv:nn {#3} {#5} } |
| 2166 |
{ \__um_to_usv:nn {#4} {#5} } |
| 2167 |
} |
| 2168 |
\cs_new:Nn \__um_set_mathalphabet_pos:nnnn |
| 2169 |
{ |
| 2170 |
\__um_usv_if_exist:nnT {#4} {#2} |
| 2171 |
{ |
| 2172 |
\clist_map_inline:nn {#3} |
| 2173 |
{ \__um_set_mathalphabet_char:nnnn {#1} {##1} {#4} {#2} } |
| 2174 |
|
| 2175 |
\clist_gput_right:cx {\l__um_curr_named_slot} |
| 2176 |
{ \int_eval:n { \__um_to_usv:nn {#4} {#2} } } |
| 2177 |
} |
| 2178 |
} |
| 2179 |
\cs_new:Nn \__um_set_mathalphabet_numbers:nnn |
| 2180 |
{ |
| 2181 |
\clist_map_inline:nn {#2} |
| 2182 |
{ \__um_set_mathalph_range:nnnnn {10} {#1} {##1} {#3} {num} } |
| 2183 |
} |
| 2184 |
\cs_new:Nn \__um_set_mathalphabet_Latin:nnn |
| 2185 |
{ |
| 2186 |
\clist_map_inline:nn {#2} |
| 2187 |
{ \__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {Latin} } |
| 2188 |
} |
| 2189 |
\cs_new:Nn \__um_set_mathalphabet_latin:nnn |
| 2190 |
{ |
| 2191 |
\clist_map_inline:nn {#2} |
| 2192 |
{ |
| 2193 |
\__um_set_mathalph_range:nnnnn {26} {#1} {##1} {#3} {latin} |
| 2194 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {h} |
| 2195 |
} |
| 2196 |
} |
| 2197 |
\cs_new:Nn \__um_set_mathalphabet_Greek:nnn |
| 2198 |
{ |
| 2199 |
\clist_map_inline:nn {#2} |
| 2200 |
{ |
| 2201 |
\__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {Greek} |
| 2202 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varTheta} |
| 2203 |
} |
| 2204 |
} |
| 2205 |
\cs_new:Nn \__um_set_mathalphabet_greek:nnn |
| 2206 |
{ |
| 2207 |
\clist_map_inline:nn {#2} |
| 2208 |
{ |
| 2209 |
\__um_set_mathalph_range:nnnnn {25} {#1} {##1} {#3} {greek} |
| 2210 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {epsilon} |
| 2211 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {vartheta} |
| 2212 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varkappa} |
| 2213 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {phi} |
| 2214 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varrho} |
| 2215 |
\__um_set_mathalphabet_char:nnnn {#1} {##1} {#3} {varpi} |
| 2216 |
} |
| 2217 |
} |
| 2218 |
|
| 2219 |
%%^^A%% um-code-sym-commands.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 2220 |
%%^^A%% Definition of "math symbol alphabet" commands such as `\symbf` and co. |
| 2221 |
|
| 2222 |
\__um_cs_new:Nn \__um_prepare_mathstyle:n |
| 2223 |
{ |
| 2224 |
\seq_gput_right:Nn \g__um_mathstyles_seq {#1} |
| 2225 |
\__um_init_alphabet:n {#1} |
| 2226 |
\cs_set_protected:cpx {sym#1} |
| 2227 |
{ |
| 2228 |
\__um_group_begin: |
| 2229 |
\exp_not:n |
| 2230 |
{ |
| 2231 |
\mode_if_math:F { \exp_args:Nc \non@alpherr {sym#1} } |
| 2232 |
\tl_set:Nn \l__um_mathstyle_tl {#1} |
| 2233 |
} |
| 2234 |
\__um_switch_to:n {#1} |
| 2235 |
\__um_mathgroup_set:n {-1} |
| 2236 |
\__um_group_end:n |
| 2237 |
} |
| 2238 |
} |
| 2239 |
\__um_cs_new:Nn \__um_init_alphabet:n |
| 2240 |
{ |
| 2241 |
\__um_log:nx {alph-initialise} {#1} |
| 2242 |
\tl_gclear_new:c {g__um_switchto_#1_tl} |
| 2243 |
\cs_set_protected:cpn {__um_switchto_#1:} { \tl_use:c {g__um_switchto_#1_tl} } |
| 2244 |
} |
| 2245 |
\cs_new_protected:Nn \__um_switch_to:n |
| 2246 |
{ |
| 2247 |
\tl_use:c {g__um_switchto_#1_tl} |
| 2248 |
} |
| 2249 |
\__um_cs_new:Nn \__um_default_mathalph:nnn |
| 2250 |
{ |
| 2251 |
\prop_new:c {g__um_named_range_#1_prop} |
| 2252 |
\seq_gput_right:Nn \g__um_default_mathalph_seq {{#1}{#2}{#3}} |
| 2253 |
\prop_gput:cnn { g__um_named_range_#1_prop } { default-alpha } {#2} |
| 2254 |
} |
| 2255 |
\__um_default_mathalph:nnn {up } {latin,Latin,greek,Greek,num,misc} {up } |
| 2256 |
\__um_default_mathalph:nnn {it } {latin,Latin,greek,Greek,misc} {it } |
| 2257 |
\__um_default_mathalph:nnn {bb } {latin,Latin,num,misc} {bb } |
| 2258 |
\__um_default_mathalph:nnn {bbit } {misc} {bbit } |
| 2259 |
\__um_default_mathalph:nnn {scr } {latin,Latin} {scr } |
| 2260 |
\__um_default_mathalph:nnn {cal } {latin,Latin} {scr } |
| 2261 |
\__um_default_mathalph:nnn {bfcal } {latin,Latin} {bfscr } |
| 2262 |
\__um_default_mathalph:nnn {frak } {latin,Latin} {frak } |
| 2263 |
\__um_default_mathalph:nnn {tt } {latin,Latin,num} {tt } |
| 2264 |
\__um_default_mathalph:nnn {sfup } {latin,Latin,num} {sfup } |
| 2265 |
\__um_default_mathalph:nnn {sfit } {latin,Latin} {sfit } |
| 2266 |
\__um_default_mathalph:nnn {bfup } {latin,Latin,greek,Greek,num,misc} {bfup } |
| 2267 |
\__um_default_mathalph:nnn {bfit } {latin,Latin,greek,Greek,misc} {bfit } |
| 2268 |
\__um_default_mathalph:nnn {bfscr } {latin,Latin} {bfscr } |
| 2269 |
\__um_default_mathalph:nnn {bffrak} {latin,Latin} {bffrak} |
| 2270 |
\__um_default_mathalph:nnn {bfsfup} {latin,Latin,greek,Greek,num,misc} {bfsfup} |
| 2271 |
\__um_default_mathalph:nnn {bfsfit} {latin,Latin,greek,Greek,misc} {bfsfit} |
| 2272 |
\clist_map_inline:nn |
| 2273 |
{ |
| 2274 |
up, it, bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf, |
| 2275 |
tt, bb, bbit, scr, bfscr, cal, bfcal, frak, bffrak, |
| 2276 |
normal, literal, sf, bf, |
| 2277 |
} |
| 2278 |
{ |
| 2279 |
\__um_prepare_mathstyle:n {#1} |
| 2280 |
} |
| 2281 |
\clist_map_inline:nn |
| 2282 |
{ rm, it, bf, sf, tt } |
| 2283 |
{ \cs_set_eq:cc { mathtext #1 } { math #1 } } |
| 2284 |
\clist_map_inline:nn |
| 2285 |
{ |
| 2286 |
normal, bb , bbit, scr, bfscr, cal, bfcal, frak, bffrak, tt, |
| 2287 |
bfup, bfit, sfup, sfit, bfsfup, bfsfit, bfsf |
| 2288 |
} |
| 2289 |
{ |
| 2290 |
\cs_set:cpx { math #1 } { \exp_not:c { sym #1 } } |
| 2291 |
} |
| 2292 |
\AtBeginDocument { \__um_setup_mathtext: } |
| 2293 |
\__um_cs_new:Nn \__um_setup_mathtext: |
| 2294 |
{ |
| 2295 |
\clist_map_inline:nn |
| 2296 |
{ rm, it, bf, sf, tt } |
| 2297 |
{ |
| 2298 |
\cs_set_protected:cpx { math ##1 } |
| 2299 |
{ |
| 2300 |
\exp_not:n { \bool_if:NTF } \exp_not:c { g__um_ math ##1 _text_bool} |
| 2301 |
{ \exp_not:c { mathtext ##1 } } |
| 2302 |
{ \exp_not:c { sym ##1 } } |
| 2303 |
} |
| 2304 |
} |
| 2305 |
} |
| 2306 |
\cs_set_protected:Npn \mathup { \mathrm } |
| 2307 |
\cs_set_protected:Npn \symrm { \symup } |
| 2308 |
|
| 2309 |
%%^^A%% um-code-alphabets.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 2310 |
%%^^A%% Definitions for setting up the "math symbol alphabets". |
| 2311 |
|
| 2312 |
\__um_new_alphabet_config:nnn {up} {num} |
| 2313 |
{ |
| 2314 |
\__um_set_normal_numbers:nn {up} {#1} |
| 2315 |
\__um_set_mathalphabet_numbers:nnn {up} {up} {#1} |
| 2316 |
} |
| 2317 |
|
| 2318 |
\__um_new_alphabet_config:nnn {up} {Latin} |
| 2319 |
{ |
| 2320 |
\bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {up} {#1} } |
| 2321 |
{ |
| 2322 |
\bool_if:NT \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} } |
| 2323 |
} |
| 2324 |
\__um_set_mathalphabet_Latin:nnn {up} {up,it} {#1} |
| 2325 |
\__um_set_mathalphabet_Latin:nnn {literal} {up} {up} |
| 2326 |
\__um_set_mathalphabet_Latin:nnn {literal} {it} {it} |
| 2327 |
} |
| 2328 |
|
| 2329 |
\__um_new_alphabet_config:nnn {up} {latin} |
| 2330 |
{ |
| 2331 |
\bool_if:NTF \g__um_literal_bool { \__um_set_normal_latin:nn {up} {#1} } |
| 2332 |
{ |
| 2333 |
\bool_if:NT \g__um_uplatin_bool |
| 2334 |
{ |
| 2335 |
\__um_set_normal_latin:nn {up,it} {#1} |
| 2336 |
\__um_set_normal_char:nnn {h} {up,it} {#1} |
| 2337 |
\__um_set_normal_char:nnn {dotlessi} {up,it} {#1} |
| 2338 |
\__um_set_normal_char:nnn {dotlessj} {up,it} {#1} |
| 2339 |
} |
| 2340 |
} |
| 2341 |
\__um_set_mathalphabet_latin:nnn {up} {up,it}{#1} |
| 2342 |
\__um_set_mathalphabet_latin:nnn {literal} {up} {up} |
| 2343 |
\__um_set_mathalphabet_latin:nnn {literal} {it} {it} |
| 2344 |
} |
| 2345 |
|
| 2346 |
\__um_new_alphabet_config:nnn {up} {Greek} |
| 2347 |
{ |
| 2348 |
\bool_if:NTF \g__um_literal_bool { \__um_set_normal_Greek:nn {up}{#1} } |
| 2349 |
{ |
| 2350 |
\bool_if:NT \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it}{#1} } |
| 2351 |
} |
| 2352 |
\__um_set_mathalphabet_Greek:nnn {up} {up,it}{#1} |
| 2353 |
\__um_set_mathalphabet_Greek:nnn {literal} {up} {up} |
| 2354 |
\__um_set_mathalphabet_Greek:nnn {literal} {it} {it} |
| 2355 |
} |
| 2356 |
|
| 2357 |
\__um_new_alphabet_config:nnn {up} {greek} |
| 2358 |
{ |
| 2359 |
\bool_if:NTF \g__um_literal_bool { \__um_set_normal_greek:nn {up} {#1} } |
| 2360 |
{ |
| 2361 |
\bool_if:NT \g__um_upgreek_bool |
| 2362 |
{ |
| 2363 |
\__um_set_normal_greek:nn {up,it} {#1} |
| 2364 |
} |
| 2365 |
} |
| 2366 |
\__um_set_mathalphabet_greek:nnn {up} {up,it} {#1} |
| 2367 |
\__um_set_mathalphabet_greek:nnn {literal} {up} {up} |
| 2368 |
\__um_set_mathalphabet_greek:nnn {literal} {it} {it} |
| 2369 |
} |
| 2370 |
|
| 2371 |
\__um_new_alphabet_config:nnn {up} {misc} |
| 2372 |
{ |
| 2373 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2374 |
{ |
| 2375 |
\__um_set_normal_char:nnn {Nabla}{up}{up} |
| 2376 |
} |
| 2377 |
{ |
| 2378 |
\bool_if:NT \g__um_upNabla_bool |
| 2379 |
{ |
| 2380 |
\__um_set_normal_char:nnn {Nabla}{up,it}{up} |
| 2381 |
} |
| 2382 |
} |
| 2383 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2384 |
{ |
| 2385 |
\__um_set_normal_char:nnn {partial}{up}{up} |
| 2386 |
} |
| 2387 |
{ |
| 2388 |
\bool_if:NT \g__um_uppartial_bool |
| 2389 |
{ |
| 2390 |
\__um_set_normal_char:nnn {partial}{up,it}{up} |
| 2391 |
} |
| 2392 |
} |
| 2393 |
\__um_set_mathalphabet_pos:nnnn {up} {partial} {up,it} {#1} |
| 2394 |
\__um_set_mathalphabet_pos:nnnn {up} {Nabla} {up,it} {#1} |
| 2395 |
\__um_set_mathalphabet_pos:nnnn {up} {dotlessi} {up,it} {#1} |
| 2396 |
\__um_set_mathalphabet_pos:nnnn {up} {dotlessj} {up,it} {#1} |
| 2397 |
} |
| 2398 |
\__um_new_alphabet_config:nnn {it} {Latin} |
| 2399 |
{ |
| 2400 |
\bool_if:NTF \g__um_literal_bool { \__um_set_normal_Latin:nn {it} {#1} } |
| 2401 |
{ |
| 2402 |
\bool_if:NF \g__um_upLatin_bool { \__um_set_normal_Latin:nn {up,it} {#1} } |
| 2403 |
} |
| 2404 |
\__um_set_mathalphabet_Latin:nnn {it} {up,it} {#1} |
| 2405 |
} |
| 2406 |
|
| 2407 |
\__um_new_alphabet_config:nnn {it} {latin} |
| 2408 |
{ |
| 2409 |
\bool_if:NTF \g__um_literal_bool |
| 2410 |
{ |
| 2411 |
\__um_set_normal_latin:nn {it}{#1} |
| 2412 |
\__um_set_normal_char:nnn {h}{it}{#1} |
| 2413 |
} |
| 2414 |
{ |
| 2415 |
\bool_if:NF \g__um_uplatin_bool |
| 2416 |
{ |
| 2417 |
\__um_set_normal_latin:nn {up,it} {#1} |
| 2418 |
\__um_set_normal_char:nnn {h} {up,it} {#1} |
| 2419 |
\__um_set_normal_char:nnn {dotlessi} {up,it} {#1} |
| 2420 |
\__um_set_normal_char:nnn {dotlessj} {up,it} {#1} |
| 2421 |
} |
| 2422 |
} |
| 2423 |
\__um_set_mathalphabet_latin:nnn {it} {up,it} {#1} |
| 2424 |
\__um_set_mathalphabet_pos:nnnn {it} {dotlessi} {up,it} {#1} |
| 2425 |
\__um_set_mathalphabet_pos:nnnn {it} {dotlessj} {up,it} {#1} |
| 2426 |
} |
| 2427 |
|
| 2428 |
\__um_new_alphabet_config:nnn {it} {Greek} |
| 2429 |
{ |
| 2430 |
\bool_if:NTF \g__um_literal_bool |
| 2431 |
{ |
| 2432 |
\__um_set_normal_Greek:nn {it} {#1} |
| 2433 |
} |
| 2434 |
{ |
| 2435 |
\bool_if:NF \g__um_upGreek_bool { \__um_set_normal_Greek:nn {up,it} {#1} } |
| 2436 |
} |
| 2437 |
\__um_set_mathalphabet_Greek:nnn {it} {up,it} {#1} |
| 2438 |
} |
| 2439 |
|
| 2440 |
\__um_new_alphabet_config:nnn {it} {greek} |
| 2441 |
{ |
| 2442 |
\bool_if:NTF \g__um_literal_bool |
| 2443 |
{ |
| 2444 |
\__um_set_normal_greek:nn {it} {#1} |
| 2445 |
} |
| 2446 |
{ |
| 2447 |
\bool_if:NF \g__um_upgreek_bool { \__um_set_normal_greek:nn {it,up} {#1} } |
| 2448 |
} |
| 2449 |
\__um_set_mathalphabet_greek:nnn {it} {up,it} {#1} |
| 2450 |
} |
| 2451 |
|
| 2452 |
\__um_new_alphabet_config:nnn {it} {misc} |
| 2453 |
{ |
| 2454 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2455 |
{ |
| 2456 |
\__um_set_normal_char:nnn {Nabla} {it} {it} |
| 2457 |
} |
| 2458 |
{ |
| 2459 |
\bool_if:NF \g__um_upNabla_bool |
| 2460 |
{ |
| 2461 |
\__um_set_normal_char:nnn {Nabla} {up,it} {it} |
| 2462 |
} |
| 2463 |
} |
| 2464 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2465 |
{ |
| 2466 |
\__um_set_normal_char:nnn {partial} {it} {it} |
| 2467 |
} |
| 2468 |
{ |
| 2469 |
\bool_if:NF \g__um_uppartial_bool |
| 2470 |
{ |
| 2471 |
\__um_set_normal_char:nnn {partial} {up,it} {it} |
| 2472 |
} |
| 2473 |
} |
| 2474 |
\__um_set_mathalphabet_pos:nnnn {it} {partial} {up,it}{#1} |
| 2475 |
\__um_set_mathalphabet_pos:nnnn {it} {Nabla} {up,it}{#1} |
| 2476 |
} |
| 2477 |
\__um_new_alphabet_config:nnn {bb} {latin} |
| 2478 |
{ |
| 2479 |
\__um_set_mathalphabet_latin:nnn {bb} {up,it} {#1} |
| 2480 |
} |
| 2481 |
|
| 2482 |
\__um_new_alphabet_config:nnn {bb} {Latin} |
| 2483 |
{ |
| 2484 |
\__um_set_mathalphabet_Latin:nnn {bb} {up,it} {#1} |
| 2485 |
\__um_set_mathalphabet_pos:nnnn {bb} {C} {up,it} {#1} |
| 2486 |
\__um_set_mathalphabet_pos:nnnn {bb} {H} {up,it} {#1} |
| 2487 |
\__um_set_mathalphabet_pos:nnnn {bb} {N} {up,it} {#1} |
| 2488 |
\__um_set_mathalphabet_pos:nnnn {bb} {P} {up,it} {#1} |
| 2489 |
\__um_set_mathalphabet_pos:nnnn {bb} {Q} {up,it} {#1} |
| 2490 |
\__um_set_mathalphabet_pos:nnnn {bb} {R} {up,it} {#1} |
| 2491 |
\__um_set_mathalphabet_pos:nnnn {bb} {Z} {up,it} {#1} |
| 2492 |
} |
| 2493 |
|
| 2494 |
\__um_new_alphabet_config:nnn {bb} {num} |
| 2495 |
{ |
| 2496 |
\__um_set_mathalphabet_numbers:nnn {bb} {up} {#1} |
| 2497 |
} |
| 2498 |
|
| 2499 |
\__um_new_alphabet_config:nnn {bb} {misc} |
| 2500 |
{ |
| 2501 |
\__um_set_mathalphabet_pos:nnnn {bb} {Pi} {up,it} {#1} |
| 2502 |
\__um_set_mathalphabet_pos:nnnn {bb} {pi} {up,it} {#1} |
| 2503 |
\__um_set_mathalphabet_pos:nnnn {bb} {Gamma} {up,it} {#1} |
| 2504 |
\__um_set_mathalphabet_pos:nnnn {bb} {gamma} {up,it} {#1} |
| 2505 |
\__um_set_mathalphabet_pos:nnnn {bb} {summation} {up} {#1} |
| 2506 |
} |
| 2507 |
|
| 2508 |
\__um_new_alphabet_config:nnn {bbit} {misc} |
| 2509 |
{ |
| 2510 |
\__um_set_mathalphabet_pos:nnnn {bbit} {D} {up,it} {#1} |
| 2511 |
\__um_set_mathalphabet_pos:nnnn {bbit} {d} {up,it} {#1} |
| 2512 |
\__um_set_mathalphabet_pos:nnnn {bbit} {e} {up,it} {#1} |
| 2513 |
\__um_set_mathalphabet_pos:nnnn {bbit} {i} {up,it} {#1} |
| 2514 |
\__um_set_mathalphabet_pos:nnnn {bbit} {j} {up,it} {#1} |
| 2515 |
} |
| 2516 |
\__um_new_alphabet_config:nnn {scr} {Latin} |
| 2517 |
{ |
| 2518 |
\__um_set_mathalphabet_Latin:nnn {scr} {up,it} {#1} |
| 2519 |
\__um_set_mathalphabet_pos:nnnn {scr} {B} {up,it} {#1} |
| 2520 |
\__um_set_mathalphabet_pos:nnnn {scr} {E} {up,it} {#1} |
| 2521 |
\__um_set_mathalphabet_pos:nnnn {scr} {F} {up,it} {#1} |
| 2522 |
\__um_set_mathalphabet_pos:nnnn {scr} {H} {up,it} {#1} |
| 2523 |
\__um_set_mathalphabet_pos:nnnn {scr} {I} {up,it} {#1} |
| 2524 |
\__um_set_mathalphabet_pos:nnnn {scr} {L} {up,it} {#1} |
| 2525 |
\__um_set_mathalphabet_pos:nnnn {scr} {M} {up,it} {#1} |
| 2526 |
\__um_set_mathalphabet_pos:nnnn {scr} {R} {up,it} {#1} |
| 2527 |
} |
| 2528 |
|
| 2529 |
\__um_new_alphabet_config:nnn {scr} {latin} |
| 2530 |
{ |
| 2531 |
\__um_set_mathalphabet_latin:nnn {scr} {up,it} {#1} |
| 2532 |
\__um_set_mathalphabet_pos:nnnn {scr} {e} {up,it} {#1} |
| 2533 |
\__um_set_mathalphabet_pos:nnnn {scr} {g} {up,it} {#1} |
| 2534 |
\__um_set_mathalphabet_pos:nnnn {scr} {o} {up,it} {#1} |
| 2535 |
} |
| 2536 |
\__um_new_alphabet_config:nnn {cal} {Latin} |
| 2537 |
{ |
| 2538 |
\__um_set_mathalphabet_Latin:nnn {cal} {up,it} {#1} |
| 2539 |
\__um_set_mathalphabet_pos:nnnn {cal} {B} {up,it} {#1} |
| 2540 |
\__um_set_mathalphabet_pos:nnnn {cal} {E} {up,it} {#1} |
| 2541 |
\__um_set_mathalphabet_pos:nnnn {cal} {F} {up,it} {#1} |
| 2542 |
\__um_set_mathalphabet_pos:nnnn {cal} {H} {up,it} {#1} |
| 2543 |
\__um_set_mathalphabet_pos:nnnn {cal} {I} {up,it} {#1} |
| 2544 |
\__um_set_mathalphabet_pos:nnnn {cal} {L} {up,it} {#1} |
| 2545 |
\__um_set_mathalphabet_pos:nnnn {cal} {M} {up,it} {#1} |
| 2546 |
\__um_set_mathalphabet_pos:nnnn {cal} {R} {up,it} {#1} |
| 2547 |
} |
| 2548 |
\__um_new_alphabet_config:nnn {cal} {latin} |
| 2549 |
{ |
| 2550 |
\__um_set_mathalphabet_latin:nnn {cal} {up,it} {#1} |
| 2551 |
\__um_set_mathalphabet_pos:nnnn {cal} {e} {up,it} {#1} |
| 2552 |
\__um_set_mathalphabet_pos:nnnn {cal} {g} {up,it} {#1} |
| 2553 |
\__um_set_mathalphabet_pos:nnnn {cal} {o} {up,it} {#1} |
| 2554 |
} |
| 2555 |
\__um_new_alphabet_config:nnn {frak} {Latin} |
| 2556 |
{ |
| 2557 |
\__um_set_mathalphabet_Latin:nnn {frak} {up,it} {#1} |
| 2558 |
\__um_set_mathalphabet_pos:nnnn {frak} {C} {up,it} {#1} |
| 2559 |
\__um_set_mathalphabet_pos:nnnn {frak} {H} {up,it} {#1} |
| 2560 |
\__um_set_mathalphabet_pos:nnnn {frak} {I} {up,it} {#1} |
| 2561 |
\__um_set_mathalphabet_pos:nnnn {frak} {R} {up,it} {#1} |
| 2562 |
\__um_set_mathalphabet_pos:nnnn {frak} {Z} {up,it} {#1} |
| 2563 |
} |
| 2564 |
\__um_new_alphabet_config:nnn {frak} {latin} |
| 2565 |
{ |
| 2566 |
\__um_set_mathalphabet_latin:nnn {frak} {up,it} {#1} |
| 2567 |
} |
| 2568 |
\__um_new_alphabet_config:nnn {sfup} {num} |
| 2569 |
{ |
| 2570 |
\__um_set_mathalphabet_numbers:nnn {sf} {up} {#1} |
| 2571 |
\__um_set_mathalphabet_numbers:nnn {sfup} {up} {#1} |
| 2572 |
} |
| 2573 |
\__um_new_alphabet_config:nnn {sfup} {Latin} |
| 2574 |
{ |
| 2575 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2576 |
{ |
| 2577 |
\__um_set_normal_Latin:nn {sfup} {#1} |
| 2578 |
\__um_set_mathalphabet_Latin:nnn {sf} {up} {#1} |
| 2579 |
} |
| 2580 |
{ |
| 2581 |
\bool_if:NT \g__um_upsans_bool |
| 2582 |
{ |
| 2583 |
\__um_set_normal_Latin:nn {sfup,sfit} {#1} |
| 2584 |
\__um_set_mathalphabet_Latin:nnn {sf} {up,it} {#1} |
| 2585 |
} |
| 2586 |
} |
| 2587 |
\__um_set_mathalphabet_Latin:nnn {sfup} {up,it} {#1} |
| 2588 |
} |
| 2589 |
|
| 2590 |
\__um_new_alphabet_config:nnn {sfup} {latin} |
| 2591 |
{ |
| 2592 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2593 |
{ |
| 2594 |
\__um_set_normal_latin:nn {sfup} {#1} |
| 2595 |
\__um_set_mathalphabet_latin:nnn {sf} {up} {#1} |
| 2596 |
} |
| 2597 |
{ |
| 2598 |
\bool_if:NT \g__um_upsans_bool |
| 2599 |
{ |
| 2600 |
\__um_set_normal_latin:nn {sfup,sfit} {#1} |
| 2601 |
\__um_set_mathalphabet_latin:nnn {sf} {up,it} {#1} |
| 2602 |
} |
| 2603 |
} |
| 2604 |
\__um_set_mathalphabet_latin:nnn {sfup} {up,it} {#1} |
| 2605 |
} |
| 2606 |
\__um_new_alphabet_config:nnn {sfit} {Latin} |
| 2607 |
{ |
| 2608 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2609 |
{ |
| 2610 |
\__um_set_normal_Latin:nn {sfit} {#1} |
| 2611 |
\__um_set_mathalphabet_Latin:nnn {sf} {it} {#1} |
| 2612 |
} |
| 2613 |
{ |
| 2614 |
\bool_if:NF \g__um_upsans_bool |
| 2615 |
{ |
| 2616 |
\__um_set_normal_Latin:nn {sfup,sfit} {#1} |
| 2617 |
\__um_set_mathalphabet_Latin:nnn {sf} {up,it} {#1} |
| 2618 |
} |
| 2619 |
} |
| 2620 |
\__um_set_mathalphabet_Latin:nnn {sfit} {up,it} {#1} |
| 2621 |
} |
| 2622 |
|
| 2623 |
\__um_new_alphabet_config:nnn {sfit} {latin} |
| 2624 |
{ |
| 2625 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2626 |
{ |
| 2627 |
\__um_set_normal_latin:nn {sfit} {#1} |
| 2628 |
\__um_set_mathalphabet_latin:nnn {sf} {it}{#1} |
| 2629 |
} |
| 2630 |
{ |
| 2631 |
\bool_if:NF \g__um_upsans_bool |
| 2632 |
{ |
| 2633 |
\__um_set_normal_latin:nn {sfup,sfit} {#1} |
| 2634 |
\__um_set_mathalphabet_latin:nnn {sf} {up,it}{#1} |
| 2635 |
} |
| 2636 |
} |
| 2637 |
\__um_set_mathalphabet_latin:nnn {sfit} {up,it}{#1} |
| 2638 |
} |
| 2639 |
\__um_new_alphabet_config:nnn {tt} {num} |
| 2640 |
{ |
| 2641 |
\__um_set_mathalphabet_numbers:nnn {tt} {up}{#1} |
| 2642 |
} |
| 2643 |
\__um_new_alphabet_config:nnn {tt} {Latin} |
| 2644 |
{ |
| 2645 |
\__um_set_mathalphabet_Latin:nnn {tt} {up,it}{#1} |
| 2646 |
} |
| 2647 |
\__um_new_alphabet_config:nnn {tt} {latin} |
| 2648 |
{ |
| 2649 |
\__um_set_mathalphabet_latin:nnn {tt} {up,it}{#1} |
| 2650 |
} |
| 2651 |
\__um_new_alphabet_config:nnn {bfit} {Latin} |
| 2652 |
{ |
| 2653 |
\bool_if:NF \g__um_bfupLatin_bool |
| 2654 |
{ |
| 2655 |
\__um_set_normal_Latin:nn {bfup,bfit} {#1} |
| 2656 |
} |
| 2657 |
\__um_set_mathalphabet_Latin:nnn {bfit} {up,it}{#1} |
| 2658 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2659 |
{ |
| 2660 |
\__um_set_normal_Latin:nn {bfit} {#1} |
| 2661 |
\__um_set_mathalphabet_Latin:nnn {bf} {it}{#1} |
| 2662 |
} |
| 2663 |
{ |
| 2664 |
\bool_if:NF \g__um_bfupLatin_bool |
| 2665 |
{ |
| 2666 |
\__um_set_normal_Latin:nn {bfup,bfit} {#1} |
| 2667 |
\__um_set_mathalphabet_Latin:nnn {bf} {up,it}{#1} |
| 2668 |
} |
| 2669 |
} |
| 2670 |
} |
| 2671 |
|
| 2672 |
\__um_new_alphabet_config:nnn {bfit} {latin} |
| 2673 |
{ |
| 2674 |
\bool_if:NF \g__um_bfuplatin_bool |
| 2675 |
{ |
| 2676 |
\__um_set_normal_latin:nn {bfup,bfit} {#1} |
| 2677 |
} |
| 2678 |
\__um_set_mathalphabet_latin:nnn {bfit} {up,it}{#1} |
| 2679 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2680 |
{ |
| 2681 |
\__um_set_normal_latin:nn {bfit} {#1} |
| 2682 |
\__um_set_mathalphabet_latin:nnn {bf} {it}{#1} |
| 2683 |
} |
| 2684 |
{ |
| 2685 |
\bool_if:NF \g__um_bfuplatin_bool |
| 2686 |
{ |
| 2687 |
\__um_set_normal_latin:nn {bfup,bfit} {#1} |
| 2688 |
\__um_set_mathalphabet_latin:nnn {bf} {up,it}{#1} |
| 2689 |
} |
| 2690 |
} |
| 2691 |
} |
| 2692 |
|
| 2693 |
\__um_new_alphabet_config:nnn {bfit} {Greek} |
| 2694 |
{ |
| 2695 |
\__um_set_mathalphabet_Greek:nnn {bfit} {up,it}{#1} |
| 2696 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2697 |
{ |
| 2698 |
\__um_set_normal_Greek:nn {bfit}{#1} |
| 2699 |
\__um_set_mathalphabet_Greek:nnn {bf} {it}{#1} |
| 2700 |
} |
| 2701 |
{ |
| 2702 |
\bool_if:NF \g__um_bfupGreek_bool |
| 2703 |
{ |
| 2704 |
\__um_set_normal_Greek:nn {bfup,bfit}{#1} |
| 2705 |
\__um_set_mathalphabet_Greek:nnn {bf} {up,it}{#1} |
| 2706 |
} |
| 2707 |
} |
| 2708 |
} |
| 2709 |
|
| 2710 |
\__um_new_alphabet_config:nnn {bfit} {greek} |
| 2711 |
{ |
| 2712 |
\__um_set_mathalphabet_greek:nnn {bfit} {up,it} {#1} |
| 2713 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2714 |
{ |
| 2715 |
\__um_set_normal_greek:nn {bfit} {#1} |
| 2716 |
\__um_set_mathalphabet_greek:nnn {bf} {it} {#1} |
| 2717 |
} |
| 2718 |
{ |
| 2719 |
\bool_if:NF \g__um_bfupgreek_bool |
| 2720 |
{ |
| 2721 |
\__um_set_normal_greek:nn {bfit,bfup} {#1} |
| 2722 |
\__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1} |
| 2723 |
} |
| 2724 |
} |
| 2725 |
} |
| 2726 |
|
| 2727 |
\__um_new_alphabet_config:nnn {bfit} {misc} |
| 2728 |
{ |
| 2729 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2730 |
{ \__um_set_normal_char:nnn {Nabla} {bfit} {#1} } |
| 2731 |
{ |
| 2732 |
\bool_if:NF \g__um_upNabla_bool |
| 2733 |
{ \__um_set_normal_char:nnn {Nabla} {bfup,bfit} {#1} } |
| 2734 |
} |
| 2735 |
|
| 2736 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2737 |
{ \__um_set_normal_char:nnn {partial} {bfit} {#1} } |
| 2738 |
{ |
| 2739 |
\bool_if:NF \g__um_uppartial_bool |
| 2740 |
{ \__um_set_normal_char:nnn {partial} {bfup,bfit} {#1} } |
| 2741 |
} |
| 2742 |
|
| 2743 |
\__um_set_mathalphabet_pos:nnnn {bfit} {partial} {up,it} {#1} |
| 2744 |
\__um_set_mathalphabet_pos:nnnn {bfit} {Nabla} {up,it} {#1} |
| 2745 |
|
| 2746 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2747 |
{ |
| 2748 |
\__um_set_mathalphabet_pos:nnnn {bf} {partial} {it}{#1} |
| 2749 |
} |
| 2750 |
{ |
| 2751 |
\bool_if:NF \g__um_uppartial_bool |
| 2752 |
{ |
| 2753 |
\__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it}{#1} |
| 2754 |
} |
| 2755 |
} |
| 2756 |
|
| 2757 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2758 |
{ |
| 2759 |
\__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {it}{#1} |
| 2760 |
} |
| 2761 |
{ |
| 2762 |
\bool_if:NF \g__um_upNabla_bool |
| 2763 |
{ |
| 2764 |
\__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it}{#1} |
| 2765 |
} |
| 2766 |
} |
| 2767 |
} |
| 2768 |
\__um_new_alphabet_config:nnn {bfup} {num} |
| 2769 |
{ |
| 2770 |
\__um_set_mathalphabet_numbers:nnn {bf} {up} {#1} |
| 2771 |
\__um_set_mathalphabet_numbers:nnn {bfup} {up} {#1} |
| 2772 |
} |
| 2773 |
|
| 2774 |
\__um_new_alphabet_config:nnn {bfup} {Latin} |
| 2775 |
{ |
| 2776 |
\bool_if:NT \g__um_bfupLatin_bool |
| 2777 |
{ |
| 2778 |
\__um_set_normal_Latin:nn {bfup,bfit} {#1} |
| 2779 |
} |
| 2780 |
\__um_set_mathalphabet_Latin:nnn {bfup} {up,it} {#1} |
| 2781 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2782 |
{ |
| 2783 |
\__um_set_normal_Latin:nn {bfup} {#1} |
| 2784 |
\__um_set_mathalphabet_Latin:nnn {bf} {up} {#1} |
| 2785 |
} |
| 2786 |
{ |
| 2787 |
\bool_if:NT \g__um_bfupLatin_bool |
| 2788 |
{ |
| 2789 |
\__um_set_normal_Latin:nn {bfup,bfit} {#1} |
| 2790 |
\__um_set_mathalphabet_Latin:nnn {bf} {up,it} {#1} |
| 2791 |
} |
| 2792 |
} |
| 2793 |
} |
| 2794 |
|
| 2795 |
\__um_new_alphabet_config:nnn {bfup} {latin} |
| 2796 |
{ |
| 2797 |
\bool_if:NT \g__um_bfuplatin_bool |
| 2798 |
{ |
| 2799 |
\__um_set_normal_latin:nn {bfup,bfit} {#1} |
| 2800 |
} |
| 2801 |
\__um_set_mathalphabet_latin:nnn {bfup} {up,it} {#1} |
| 2802 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2803 |
{ |
| 2804 |
\__um_set_normal_latin:nn {bfup} {#1} |
| 2805 |
\__um_set_mathalphabet_latin:nnn {bf} {up} {#1} |
| 2806 |
} |
| 2807 |
{ |
| 2808 |
\bool_if:NT \g__um_bfuplatin_bool |
| 2809 |
{ |
| 2810 |
\__um_set_normal_latin:nn {bfup,bfit} {#1} |
| 2811 |
\__um_set_mathalphabet_latin:nnn {bf} {up,it} {#1} |
| 2812 |
} |
| 2813 |
} |
| 2814 |
} |
| 2815 |
|
| 2816 |
\__um_new_alphabet_config:nnn {bfup} {Greek} |
| 2817 |
{ |
| 2818 |
\__um_set_mathalphabet_Greek:nnn {bfup} {up,it} {#1} |
| 2819 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2820 |
{ |
| 2821 |
\__um_set_normal_Greek:nn {bfup} {#1} |
| 2822 |
\__um_set_mathalphabet_Greek:nnn {bf} {up} {#1} |
| 2823 |
} |
| 2824 |
{ |
| 2825 |
\bool_if:NT \g__um_bfupGreek_bool |
| 2826 |
{ |
| 2827 |
\__um_set_normal_Greek:nn {bfup,bfit} {#1} |
| 2828 |
\__um_set_mathalphabet_Greek:nnn {bf} {up,it} {#1} |
| 2829 |
} |
| 2830 |
} |
| 2831 |
} |
| 2832 |
|
| 2833 |
\__um_new_alphabet_config:nnn {bfup} {greek} |
| 2834 |
{ |
| 2835 |
\__um_set_mathalphabet_greek:nnn {bfup} {up,it} {#1} |
| 2836 |
\bool_if:NTF \g__um_bfliteral_bool |
| 2837 |
{ |
| 2838 |
\__um_set_normal_greek:nn {bfup} {#1} |
| 2839 |
\__um_set_mathalphabet_greek:nnn {bf} {up} {#1} |
| 2840 |
} |
| 2841 |
{ |
| 2842 |
\bool_if:NT \g__um_bfupgreek_bool |
| 2843 |
{ |
| 2844 |
\__um_set_normal_greek:nn {bfup,bfit} {#1} |
| 2845 |
\__um_set_mathalphabet_greek:nnn {bf} {up,it} {#1} |
| 2846 |
} |
| 2847 |
} |
| 2848 |
} |
| 2849 |
|
| 2850 |
\__um_new_alphabet_config:nnn {bfup} {misc} |
| 2851 |
{ |
| 2852 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2853 |
{ |
| 2854 |
\__um_set_normal_char:nnn {Nabla} {bfup} {#1} |
| 2855 |
} |
| 2856 |
{ |
| 2857 |
\bool_if:NT \g__um_upNabla_bool |
| 2858 |
{ |
| 2859 |
\__um_set_normal_char:nnn {Nabla} {bfup,bfit} {#1} |
| 2860 |
} |
| 2861 |
} |
| 2862 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2863 |
{ |
| 2864 |
\__um_set_normal_char:nnn {partial} {bfup} {#1} |
| 2865 |
} |
| 2866 |
{ |
| 2867 |
\bool_if:NT \g__um_uppartial_bool |
| 2868 |
{ |
| 2869 |
\__um_set_normal_char:nnn {partial} {bfup,bfit} {#1} |
| 2870 |
} |
| 2871 |
} |
| 2872 |
\__um_set_mathalphabet_pos:nnnn {bfup} {partial} {up,it} {#1} |
| 2873 |
\__um_set_mathalphabet_pos:nnnn {bfup} {Nabla} {up,it} {#1} |
| 2874 |
\__um_set_mathalphabet_pos:nnnn {bfup} {digamma} {up} {#1} |
| 2875 |
\__um_set_mathalphabet_pos:nnnn {bfup} {Digamma} {up} {#1} |
| 2876 |
\__um_set_mathalphabet_pos:nnnn {bf} {digamma} {up} {#1} |
| 2877 |
\__um_set_mathalphabet_pos:nnnn {bf} {Digamma} {up} {#1} |
| 2878 |
\bool_if:NTF \g__um_literal_partial_bool |
| 2879 |
{ |
| 2880 |
\__um_set_mathalphabet_pos:nnnn {bf} {partial} {up} {#1} |
| 2881 |
} |
| 2882 |
{ |
| 2883 |
\bool_if:NT \g__um_uppartial_bool |
| 2884 |
{ |
| 2885 |
\__um_set_mathalphabet_pos:nnnn {bf} {partial} {up,it} {#1} |
| 2886 |
} |
| 2887 |
} |
| 2888 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 2889 |
{ |
| 2890 |
\__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up}{#1} |
| 2891 |
} |
| 2892 |
{ |
| 2893 |
\bool_if:NT \g__um_upNabla_bool |
| 2894 |
{ |
| 2895 |
\__um_set_mathalphabet_pos:nnnn {bf} {Nabla} {up,it} {#1} |
| 2896 |
} |
| 2897 |
} |
| 2898 |
} |
| 2899 |
\__um_new_alphabet_config:nnn {bffrak} {Latin} |
| 2900 |
{ |
| 2901 |
\__um_set_mathalphabet_Latin:nnn {bffrak} {up,it}{#1} |
| 2902 |
} |
| 2903 |
|
| 2904 |
\__um_new_alphabet_config:nnn {bffrak} {latin} |
| 2905 |
{ |
| 2906 |
\__um_set_mathalphabet_latin:nnn {bffrak} {up,it}{#1} |
| 2907 |
} |
| 2908 |
\__um_new_alphabet_config:nnn {bfscr} {Latin} |
| 2909 |
{ |
| 2910 |
\__um_set_mathalphabet_Latin:nnn {bfscr} {up,it}{#1} |
| 2911 |
} |
| 2912 |
\__um_new_alphabet_config:nnn {bfscr} {latin} |
| 2913 |
{ |
| 2914 |
\__um_set_mathalphabet_latin:nnn {bfscr} {up,it}{#1} |
| 2915 |
} |
| 2916 |
\__um_new_alphabet_config:nnn {bfcal} {Latin} |
| 2917 |
{ |
| 2918 |
\__um_set_mathalphabet_Latin:nnn {bfcal} {up,it}{#1} |
| 2919 |
} |
| 2920 |
\__um_new_alphabet_config:nnn {bfcal} {latin} |
| 2921 |
{ |
| 2922 |
\__um_set_mathalphabet_latin:nnn {bfcal} {up,it}{#1} |
| 2923 |
} |
| 2924 |
\__um_new_alphabet_config:nnn {bfsfup} {num} |
| 2925 |
{ |
| 2926 |
\__um_set_mathalphabet_numbers:nnn {bfsf} {up}{#1} |
| 2927 |
\__um_set_mathalphabet_numbers:nnn {bfsfup} {up}{#1} |
| 2928 |
} |
| 2929 |
\__um_new_alphabet_config:nnn {bfsfup} {Latin} |
| 2930 |
{ |
| 2931 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2932 |
{ |
| 2933 |
\__um_set_normal_Latin:nn {bfsfup} {#1} |
| 2934 |
\__um_set_mathalphabet_Latin:nnn {bfsf} {up}{#1} |
| 2935 |
} |
| 2936 |
{ |
| 2937 |
\bool_if:NT \g__um_upsans_bool |
| 2938 |
{ |
| 2939 |
\__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1} |
| 2940 |
\__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1} |
| 2941 |
} |
| 2942 |
} |
| 2943 |
\__um_set_mathalphabet_Latin:nnn {bfsfup} {up,it}{#1} |
| 2944 |
} |
| 2945 |
|
| 2946 |
\__um_new_alphabet_config:nnn {bfsfup} {latin} |
| 2947 |
{ |
| 2948 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2949 |
{ |
| 2950 |
\__um_set_normal_latin:nn {bfsfup} {#1} |
| 2951 |
\__um_set_mathalphabet_latin:nnn {bfsf} {up}{#1} |
| 2952 |
} |
| 2953 |
{ |
| 2954 |
\bool_if:NT \g__um_upsans_bool |
| 2955 |
{ |
| 2956 |
\__um_set_normal_latin:nn {bfsfup,bfsfit} {#1} |
| 2957 |
\__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1} |
| 2958 |
} |
| 2959 |
} |
| 2960 |
\__um_set_mathalphabet_latin:nnn {bfsfup} {up,it}{#1} |
| 2961 |
} |
| 2962 |
|
| 2963 |
\__um_new_alphabet_config:nnn {bfsfup} {Greek} |
| 2964 |
{ |
| 2965 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2966 |
{ |
| 2967 |
\__um_set_normal_Greek:nn {bfsfup}{#1} |
| 2968 |
\__um_set_mathalphabet_Greek:nnn {bfsf} {up}{#1} |
| 2969 |
} |
| 2970 |
{ |
| 2971 |
\bool_if:NT \g__um_upsans_bool |
| 2972 |
{ |
| 2973 |
\__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1} |
| 2974 |
\__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1} |
| 2975 |
} |
| 2976 |
} |
| 2977 |
\__um_set_mathalphabet_Greek:nnn {bfsfup} {up,it}{#1} |
| 2978 |
} |
| 2979 |
|
| 2980 |
\__um_new_alphabet_config:nnn {bfsfup} {greek} |
| 2981 |
{ |
| 2982 |
\bool_if:NTF \g__um_sfliteral_bool |
| 2983 |
{ |
| 2984 |
\__um_set_normal_greek:nn {bfsfup} {#1} |
| 2985 |
\__um_set_mathalphabet_greek:nnn {bfsf} {up} {#1} |
| 2986 |
} |
| 2987 |
{ |
| 2988 |
\bool_if:NT \g__um_upsans_bool |
| 2989 |
{ |
| 2990 |
\__um_set_normal_greek:nn {bfsfup,bfsfit} {#1} |
| 2991 |
\__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1} |
| 2992 |
} |
| 2993 |
} |
| 2994 |
\__um_set_mathalphabet_greek:nnn {bfsfup} {up,it} {#1} |
| 2995 |
} |
| 2996 |
|
| 2997 |
\__um_new_alphabet_config:nnn {bfsfup} {misc} |
| 2998 |
{ |
| 2999 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 3000 |
{ |
| 3001 |
\__um_set_normal_char:nnn {Nabla}{bfsfup}{#1} |
| 3002 |
} |
| 3003 |
{ |
| 3004 |
\bool_if:NT \g__um_upNabla_bool |
| 3005 |
{ |
| 3006 |
\__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1} |
| 3007 |
} |
| 3008 |
} |
| 3009 |
\bool_if:NTF \g__um_literal_partial_bool |
| 3010 |
{ |
| 3011 |
\__um_set_normal_char:nnn {partial}{bfsfup}{#1} |
| 3012 |
} |
| 3013 |
{ |
| 3014 |
\bool_if:NT \g__um_uppartial_bool |
| 3015 |
{ |
| 3016 |
\__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1} |
| 3017 |
} |
| 3018 |
} |
| 3019 |
\__um_set_mathalphabet_pos:nnnn {bfsfup} {partial} {up,it}{#1} |
| 3020 |
\__um_set_mathalphabet_pos:nnnn {bfsfup} {Nabla} {up,it}{#1} |
| 3021 |
\bool_if:NTF \g__um_literal_partial_bool |
| 3022 |
{ |
| 3023 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up}{#1} |
| 3024 |
} |
| 3025 |
{ |
| 3026 |
\bool_if:NT \g__um_uppartial_bool |
| 3027 |
{ |
| 3028 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1} |
| 3029 |
} |
| 3030 |
} |
| 3031 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 3032 |
{ |
| 3033 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up}{#1} |
| 3034 |
} |
| 3035 |
{ |
| 3036 |
\bool_if:NT \g__um_upNabla_bool |
| 3037 |
{ |
| 3038 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1} |
| 3039 |
} |
| 3040 |
} |
| 3041 |
} |
| 3042 |
\__um_new_alphabet_config:nnn {bfsfit} {Latin} |
| 3043 |
{ |
| 3044 |
\bool_if:NTF \g__um_sfliteral_bool |
| 3045 |
{ |
| 3046 |
\__um_set_normal_Latin:nn {bfsfit} {#1} |
| 3047 |
\__um_set_mathalphabet_Latin:nnn {bfsf} {it}{#1} |
| 3048 |
} |
| 3049 |
{ |
| 3050 |
\bool_if:NF \g__um_upsans_bool |
| 3051 |
{ |
| 3052 |
\__um_set_normal_Latin:nn {bfsfup,bfsfit} {#1} |
| 3053 |
\__um_set_mathalphabet_Latin:nnn {bfsf} {up,it}{#1} |
| 3054 |
} |
| 3055 |
} |
| 3056 |
\__um_set_mathalphabet_Latin:nnn {bfsfit} {up,it}{#1} |
| 3057 |
} |
| 3058 |
|
| 3059 |
\__um_new_alphabet_config:nnn {bfsfit} {latin} |
| 3060 |
{ |
| 3061 |
\bool_if:NTF \g__um_sfliteral_bool |
| 3062 |
{ |
| 3063 |
\__um_set_normal_latin:nn {bfsfit} {#1} |
| 3064 |
\__um_set_mathalphabet_latin:nnn {bfsf} {it}{#1} |
| 3065 |
} |
| 3066 |
{ |
| 3067 |
\bool_if:NF \g__um_upsans_bool |
| 3068 |
{ |
| 3069 |
\__um_set_normal_latin:nn {bfsfup,bfsfit} {#1} |
| 3070 |
\__um_set_mathalphabet_latin:nnn {bfsf} {up,it}{#1} |
| 3071 |
} |
| 3072 |
} |
| 3073 |
\__um_set_mathalphabet_latin:nnn {bfsfit} {up,it}{#1} |
| 3074 |
} |
| 3075 |
|
| 3076 |
\__um_new_alphabet_config:nnn {bfsfit} {Greek} |
| 3077 |
{ |
| 3078 |
\bool_if:NTF \g__um_sfliteral_bool |
| 3079 |
{ |
| 3080 |
\__um_set_normal_Greek:nn {bfsfit}{#1} |
| 3081 |
\__um_set_mathalphabet_Greek:nnn {bfsf} {it}{#1} |
| 3082 |
} |
| 3083 |
{ |
| 3084 |
\bool_if:NF \g__um_upsans_bool |
| 3085 |
{ |
| 3086 |
\__um_set_normal_Greek:nn {bfsfup,bfsfit}{#1} |
| 3087 |
\__um_set_mathalphabet_Greek:nnn {bfsf} {up,it}{#1} |
| 3088 |
} |
| 3089 |
} |
| 3090 |
\__um_set_mathalphabet_Greek:nnn {bfsfit} {up,it}{#1} |
| 3091 |
} |
| 3092 |
|
| 3093 |
\__um_new_alphabet_config:nnn {bfsfit} {greek} |
| 3094 |
{ |
| 3095 |
\bool_if:NTF \g__um_sfliteral_bool |
| 3096 |
{ |
| 3097 |
\__um_set_normal_greek:nn {bfsfit} {#1} |
| 3098 |
\__um_set_mathalphabet_greek:nnn {bfsf} {it} {#1} |
| 3099 |
} |
| 3100 |
{ |
| 3101 |
\bool_if:NF \g__um_upsans_bool |
| 3102 |
{ |
| 3103 |
\__um_set_normal_greek:nn {bfsfup,bfsfit} {#1} |
| 3104 |
\__um_set_mathalphabet_greek:nnn {bfsf} {up,it} {#1} |
| 3105 |
} |
| 3106 |
} |
| 3107 |
\__um_set_mathalphabet_greek:nnn {bfsfit} {up,it} {#1} |
| 3108 |
} |
| 3109 |
|
| 3110 |
\__um_new_alphabet_config:nnn {bfsfit} {misc} |
| 3111 |
{ |
| 3112 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 3113 |
{ |
| 3114 |
\__um_set_normal_char:nnn {Nabla}{bfsfit}{#1} |
| 3115 |
} |
| 3116 |
{ |
| 3117 |
\bool_if:NF \g__um_upNabla_bool |
| 3118 |
{ |
| 3119 |
\__um_set_normal_char:nnn {Nabla}{bfsfup,bfsfit}{#1} |
| 3120 |
} |
| 3121 |
} |
| 3122 |
\bool_if:NTF \g__um_literal_partial_bool |
| 3123 |
{ |
| 3124 |
\__um_set_normal_char:nnn {partial}{bfsfit}{#1} |
| 3125 |
} |
| 3126 |
{ |
| 3127 |
\bool_if:NF \g__um_uppartial_bool |
| 3128 |
{ |
| 3129 |
\__um_set_normal_char:nnn {partial}{bfsfup,bfsfit}{#1} |
| 3130 |
} |
| 3131 |
} |
| 3132 |
\__um_set_mathalphabet_pos:nnnn {bfsfit} {partial} {up,it}{#1} |
| 3133 |
\__um_set_mathalphabet_pos:nnnn {bfsfit} {Nabla} {up,it}{#1} |
| 3134 |
\bool_if:NTF \g__um_literal_partial_bool |
| 3135 |
{ |
| 3136 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {it}{#1} |
| 3137 |
} |
| 3138 |
{ |
| 3139 |
\bool_if:NF \g__um_uppartial_bool |
| 3140 |
{ |
| 3141 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {partial} {up,it}{#1} |
| 3142 |
} |
| 3143 |
} |
| 3144 |
\bool_if:NTF \g__um_literal_Nabla_bool |
| 3145 |
{ |
| 3146 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {it}{#1} |
| 3147 |
} |
| 3148 |
{ |
| 3149 |
\bool_if:NF \g__um_upNabla_bool |
| 3150 |
{ |
| 3151 |
\__um_set_mathalphabet_pos:nnnn {bfsf} {Nabla} {up,it}{#1} |
| 3152 |
} |
| 3153 |
} |
| 3154 |
} |
| 3155 |
|
| 3156 |
%%^^A%% um-code-primes.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 3157 |
%%^^A%% The definitions needed for the input of primes. |
| 3158 |
|
| 3159 |
\cs_new:Nn \__um_arg_i_before_egroup:n {#1\egroup} |
| 3160 |
\cs_new:Nn \__um_superscript:n |
| 3161 |
{ |
| 3162 |
^\bgroup #1 |
| 3163 |
\peek_meaning_remove:NTF ^ \__um_arg_i_before_egroup:n \egroup |
| 3164 |
} |
| 3165 |
\cs_new:Nn \__um_nprimes:Nn |
| 3166 |
{ |
| 3167 |
\__um_superscript:n |
| 3168 |
{ |
| 3169 |
#1 |
| 3170 |
\prg_replicate:nn {#2-1} { \mskip \g__um_primekern_muskip #1 } |
| 3171 |
} |
| 3172 |
} |
| 3173 |
\cs_new:Nn \__um_nprimes_select:nn |
| 3174 |
{ |
| 3175 |
\int_case:nnF {#2} |
| 3176 |
{ |
| 3177 |
{1} { \__um_superscript:n {#1} } |
| 3178 |
{2} { |
| 3179 |
\__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2033} |
| 3180 |
{ \__um_superscript:n {\__um_prime_double_mchar} } |
| 3181 |
{ \__um_nprimes:Nn #1 {#2} } |
| 3182 |
} |
| 3183 |
{3} { |
| 3184 |
\__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2034} |
| 3185 |
{ \__um_superscript:n {\__um_prime_triple_mchar} } |
| 3186 |
{ \__um_nprimes:Nn #1 {#2} } |
| 3187 |
} |
| 3188 |
{4} { |
| 3189 |
\__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2057} |
| 3190 |
{ \__um_superscript:n {\__um_prime_quad_mchar} } |
| 3191 |
{ \__um_nprimes:Nn #1 {#2} } |
| 3192 |
} |
| 3193 |
} |
| 3194 |
{ |
| 3195 |
\__um_nprimes:Nn #1 {#2} |
| 3196 |
} |
| 3197 |
} |
| 3198 |
\cs_new:Nn \__um_nbackprimes_select:nn |
| 3199 |
{ |
| 3200 |
\int_case:nnF {#2} |
| 3201 |
{ |
| 3202 |
{1} { \__um_superscript:n {#1} } |
| 3203 |
{2} { |
| 3204 |
\__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2036} |
| 3205 |
{ \__um_superscript:n {\__um_backprime_double_mchar} } |
| 3206 |
{ \__um_nprimes:Nn #1 {#2} } |
| 3207 |
} |
| 3208 |
{3} { |
| 3209 |
\__um_glyph_if_exist:NnTF \g__um_prime_font_cmd_tl {"2037} |
| 3210 |
{ \__um_superscript:n {\__um_backprime_triple_mchar} } |
| 3211 |
{ \__um_nprimes:Nn #1 {#2} } |
| 3212 |
} |
| 3213 |
} |
| 3214 |
{ |
| 3215 |
\__um_nprimes:Nn #1 {#2} |
| 3216 |
} |
| 3217 |
} |
| 3218 |
\cs_new:Npn \__um_scan_prime: |
| 3219 |
{ |
| 3220 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3221 |
\int_zero:N \l__um_primecount_int |
| 3222 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3223 |
} |
| 3224 |
\cs_new:Npn \__um_scan_dprime: |
| 3225 |
{ |
| 3226 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3227 |
\int_set:Nn \l__um_primecount_int {1} |
| 3228 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3229 |
} |
| 3230 |
\cs_new:Npn \__um_scan_trprime: |
| 3231 |
{ |
| 3232 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3233 |
\int_set:Nn \l__um_primecount_int {2} |
| 3234 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3235 |
} |
| 3236 |
\cs_new:Npn \__um_scan_qprime: |
| 3237 |
{ |
| 3238 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3239 |
\int_set:Nn \l__um_primecount_int {3} |
| 3240 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3241 |
} |
| 3242 |
\cs_new:Npn \__um_scan_sup_prime: |
| 3243 |
{ |
| 3244 |
\int_zero:N \l__um_primecount_int |
| 3245 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3246 |
} |
| 3247 |
\cs_new:Npn \__um_scan_sup_dprime: |
| 3248 |
{ |
| 3249 |
\int_set:Nn \l__um_primecount_int {1} |
| 3250 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3251 |
} |
| 3252 |
\cs_new:Npn \__um_scan_sup_trprime: |
| 3253 |
{ |
| 3254 |
\int_set:Nn \l__um_primecount_int {2} |
| 3255 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3256 |
} |
| 3257 |
\cs_new:Npn \__um_scan_sup_qprime: |
| 3258 |
{ |
| 3259 |
\int_set:Nn \l__um_primecount_int {3} |
| 3260 |
\__um_scanprime_collect:N \__um_prime_single_mchar |
| 3261 |
} |
| 3262 |
\cs_new:Nn \__um_scanprime_collect:N |
| 3263 |
{ |
| 3264 |
\int_incr:N \l__um_primecount_int |
| 3265 |
\peek_meaning_remove:NTF ' |
| 3266 |
{ \__um_scanprime_collect:N #1 } |
| 3267 |
{ |
| 3268 |
\peek_meaning_remove:NTF \__um_scan_prime: |
| 3269 |
{ \__um_scanprime_collect:N #1 } |
| 3270 |
{ |
| 3271 |
\peek_meaning_remove:NTF ^^^^2032 |
| 3272 |
{ \__um_scanprime_collect:N #1 } |
| 3273 |
{ |
| 3274 |
\peek_meaning_remove:NTF \__um_scan_dprime: |
| 3275 |
{ |
| 3276 |
\int_incr:N \l__um_primecount_int |
| 3277 |
\__um_scanprime_collect:N #1 |
| 3278 |
} |
| 3279 |
{ |
| 3280 |
\peek_meaning_remove:NTF ^^^^2033 |
| 3281 |
{ |
| 3282 |
\int_incr:N \l__um_primecount_int |
| 3283 |
\__um_scanprime_collect:N #1 |
| 3284 |
} |
| 3285 |
{ |
| 3286 |
\peek_meaning_remove:NTF \__um_scan_trprime: |
| 3287 |
{ |
| 3288 |
\int_add:Nn \l__um_primecount_int {2} |
| 3289 |
\__um_scanprime_collect:N #1 |
| 3290 |
} |
| 3291 |
{ |
| 3292 |
\peek_meaning_remove:NTF ^^^^2034 |
| 3293 |
{ |
| 3294 |
\int_add:Nn \l__um_primecount_int {2} |
| 3295 |
\__um_scanprime_collect:N #1 |
| 3296 |
} |
| 3297 |
{ |
| 3298 |
\peek_meaning_remove:NTF \__um_scan_qprime: |
| 3299 |
{ |
| 3300 |
\int_add:Nn \l__um_primecount_int {3} |
| 3301 |
\__um_scanprime_collect:N #1 |
| 3302 |
} |
| 3303 |
{ |
| 3304 |
\peek_meaning_remove:NTF ^^^^2057 |
| 3305 |
{ |
| 3306 |
\int_add:Nn \l__um_primecount_int {3} |
| 3307 |
\__um_scanprime_collect:N #1 |
| 3308 |
} |
| 3309 |
{ |
| 3310 |
\__um_nprimes_select:nn {#1} {\l__um_primecount_int} |
| 3311 |
} |
| 3312 |
} |
| 3313 |
} |
| 3314 |
} |
| 3315 |
} |
| 3316 |
} |
| 3317 |
} |
| 3318 |
} |
| 3319 |
} |
| 3320 |
} |
| 3321 |
\cs_new:Npn \__um_scan_backprime: |
| 3322 |
{ |
| 3323 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3324 |
\int_zero:N \l__um_primecount_int |
| 3325 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3326 |
} |
| 3327 |
\cs_new:Npn \__um_scan_backdprime: |
| 3328 |
{ |
| 3329 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3330 |
\int_set:Nn \l__um_primecount_int {1} |
| 3331 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3332 |
} |
| 3333 |
\cs_new:Npn \__um_scan_backtrprime: |
| 3334 |
{ |
| 3335 |
\cs_set_eq:NN \__um_superscript:n \use:n |
| 3336 |
\int_set:Nn \l__um_primecount_int {2} |
| 3337 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3338 |
} |
| 3339 |
\cs_new:Npn \__um_scan_sup_backprime: |
| 3340 |
{ |
| 3341 |
\int_zero:N \l__um_primecount_int |
| 3342 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3343 |
} |
| 3344 |
\cs_new:Npn \__um_scan_sup_backdprime: |
| 3345 |
{ |
| 3346 |
\int_set:Nn \l__um_primecount_int {1} |
| 3347 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3348 |
} |
| 3349 |
\cs_new:Npn \__um_scan_sup_backtrprime: |
| 3350 |
{ |
| 3351 |
\int_set:Nn \l__um_primecount_int {2} |
| 3352 |
\__um_scanbackprime_collect:N \__um_backprime_single_mchar |
| 3353 |
} |
| 3354 |
\cs_new:Nn \__um_scanbackprime_collect:N |
| 3355 |
{ |
| 3356 |
\int_incr:N \l__um_primecount_int |
| 3357 |
\peek_meaning_remove:NTF ` |
| 3358 |
{ |
| 3359 |
\__um_scanbackprime_collect:N #1 |
| 3360 |
} |
| 3361 |
{ |
| 3362 |
\peek_meaning_remove:NTF \__um_scan_backprime: |
| 3363 |
{ |
| 3364 |
\__um_scanbackprime_collect:N #1 |
| 3365 |
} |
| 3366 |
{ |
| 3367 |
\peek_meaning_remove:NTF ^^^^2035 |
| 3368 |
{ |
| 3369 |
\__um_scanbackprime_collect:N #1 |
| 3370 |
} |
| 3371 |
{ |
| 3372 |
\peek_meaning_remove:NTF \__um_scan_backdprime: |
| 3373 |
{ |
| 3374 |
\int_incr:N \l__um_primecount_int |
| 3375 |
\__um_scanbackprime_collect:N #1 |
| 3376 |
} |
| 3377 |
{ |
| 3378 |
\peek_meaning_remove:NTF ^^^^2036 |
| 3379 |
{ |
| 3380 |
\int_incr:N \l__um_primecount_int |
| 3381 |
\__um_scanbackprime_collect:N #1 |
| 3382 |
} |
| 3383 |
{ |
| 3384 |
\peek_meaning_remove:NTF \__um_scan_backtrprime: |
| 3385 |
{ |
| 3386 |
\int_add:Nn \l__um_primecount_int {2} |
| 3387 |
\__um_scanbackprime_collect:N #1 |
| 3388 |
} |
| 3389 |
{ |
| 3390 |
\peek_meaning_remove:NTF ^^^^2037 |
| 3391 |
{ |
| 3392 |
\int_add:Nn \l__um_primecount_int {2} |
| 3393 |
\__um_scanbackprime_collect:N #1 |
| 3394 |
} |
| 3395 |
{ |
| 3396 |
\__um_nbackprimes_select:nn {#1} {\l__um_primecount_int} |
| 3397 |
} |
| 3398 |
} |
| 3399 |
} |
| 3400 |
} |
| 3401 |
} |
| 3402 |
} |
| 3403 |
} |
| 3404 |
} |
| 3405 |
\AtBeginDocument { \__um_define_prime_commands: \__um_define_prime_chars: } |
| 3406 |
\cs_new:Nn \__um_define_prime_commands: |
| 3407 |
{ |
| 3408 |
\cs_set_eq:NN \prime \__um_prime_single_mchar |
| 3409 |
\cs_set_eq:NN \dprime \__um_prime_double_mchar |
| 3410 |
\cs_set_eq:NN \trprime \__um_prime_triple_mchar |
| 3411 |
\cs_set_eq:NN \qprime \__um_prime_quad_mchar |
| 3412 |
\cs_set_eq:NN \backprime \__um_backprime_single_mchar |
| 3413 |
\cs_set_eq:NN \backdprime \__um_backprime_double_mchar |
| 3414 |
\cs_set_eq:NN \backtrprime \__um_backprime_triple_mchar |
| 3415 |
} |
| 3416 |
\group_begin: |
| 3417 |
\char_set_catcode_active:N \' |
| 3418 |
\char_set_catcode_active:N \` |
| 3419 |
\char_set_catcode_active:n {"2032} |
| 3420 |
\char_set_catcode_active:n {"2033} |
| 3421 |
\char_set_catcode_active:n {"2034} |
| 3422 |
\char_set_catcode_active:n {"2057} |
| 3423 |
\char_set_catcode_active:n {"2035} |
| 3424 |
\char_set_catcode_active:n {"2036} |
| 3425 |
\char_set_catcode_active:n {"2037} |
| 3426 |
\cs_gset:Nn \__um_define_prime_chars: |
| 3427 |
{ |
| 3428 |
\cs_set_eq:NN ' \__um_scan_sup_prime: |
| 3429 |
\cs_set_eq:NN ^^^^2032 \__um_scan_sup_prime: |
| 3430 |
\cs_set_eq:NN ^^^^2033 \__um_scan_sup_dprime: |
| 3431 |
\cs_set_eq:NN ^^^^2034 \__um_scan_sup_trprime: |
| 3432 |
\cs_set_eq:NN ^^^^2057 \__um_scan_sup_qprime: |
| 3433 |
\cs_set_eq:NN ` \__um_scan_sup_backprime: |
| 3434 |
\cs_set_eq:NN ^^^^2035 \__um_scan_sup_backprime: |
| 3435 |
\cs_set_eq:NN ^^^^2036 \__um_scan_sup_backdprime: |
| 3436 |
\cs_set_eq:NN ^^^^2037 \__um_scan_sup_backtrprime: |
| 3437 |
} |
| 3438 |
\group_end: |
| 3439 |
|
| 3440 |
\cs_set_eq:NN \active@math@prime \__um_scan_sup_prime: |
| 3441 |
|
| 3442 |
%%^^A%% um-code-sscript.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 3443 |
%%^^A%% Setup for active chars needed to process subscript/superscript input chars. |
| 3444 |
|
| 3445 |
\cs_new:Nn \__um_setup_active_superscript:nn |
| 3446 |
{ |
| 3447 |
\prop_gput:Nxn \g__um_supers_prop { \int_eval:n {#1} } {#2} |
| 3448 |
\__um_mathactive_remap:nn {#1} |
| 3449 |
{ |
| 3450 |
\tl_set:Nn \l__um_ss_chain_tl {#2} |
| 3451 |
\cs_set_eq:NN \__um_sub_or_super:n \sp |
| 3452 |
\tl_set:Nn \l__um_tmpa_tl {supers} |
| 3453 |
\__um_scan_sscript: |
| 3454 |
} |
| 3455 |
} |
| 3456 |
\cs_new:Nn \__um_setup_active_subscript:nn |
| 3457 |
{ |
| 3458 |
\prop_gput:Nxn \g__um_subs_prop { \int_eval:n {#1} } {#2} |
| 3459 |
\__um_mathactive_remap:nn {#1} |
| 3460 |
{ |
| 3461 |
\tl_set:Nn \l__um_ss_chain_tl {#2} |
| 3462 |
\cs_set_eq:NN \__um_sub_or_super:n \sb |
| 3463 |
\tl_set:Nn \l__um_tmpa_tl {subs} |
| 3464 |
\__um_scan_sscript: |
| 3465 |
} |
| 3466 |
} |
| 3467 |
\__um_cs_new:Nn \__um_scan_sscript: |
| 3468 |
{ |
| 3469 |
\__um_scan_sscript:TF |
| 3470 |
{ \__um_scan_sscript: } |
| 3471 |
{ \__um_sub_or_super:n {\l__um_ss_chain_tl} } |
| 3472 |
} |
| 3473 |
\__um_cs_new:Nn \__um_scan_sscript:TF |
| 3474 |
{ |
| 3475 |
\peek_N_type:TF |
| 3476 |
{ |
| 3477 |
\group_align_safe_begin: |
| 3478 |
\__um_scan_sscript_aux:nnN {#1} {#2} |
| 3479 |
} |
| 3480 |
{#2} |
| 3481 |
} |
| 3482 |
\__um_cs_new:Nn \__um_scan_sscript_aux:nnN |
| 3483 |
{ |
| 3484 |
\tl_set:Nx \l__um_tmpa_key_tl { \tl_to_str:n {#3} } |
| 3485 |
\prop_get:cxNTF {g__um_\l__um_tmpa_tl _prop} |
| 3486 |
{ \int_eval:n { \exp_after:wN ` \l__um_tmpa_key_tl } } |
| 3487 |
\l__um_tmpb_tl |
| 3488 |
{ |
| 3489 |
\tl_put_right:NV \l__um_ss_chain_tl \l__um_tmpb_tl |
| 3490 |
\group_align_safe_end: |
| 3491 |
#1 |
| 3492 |
} |
| 3493 |
{ \group_align_safe_end: #2 #3 } |
| 3494 |
} |
| 3495 |
\__um_setup_active_superscript:nn {"2070} {0} |
| 3496 |
\__um_setup_active_superscript:nn {"00B9} {1} |
| 3497 |
\__um_setup_active_superscript:nn {"00B2} {2} |
| 3498 |
\__um_setup_active_superscript:nn {"00B3} {3} |
| 3499 |
\__um_setup_active_superscript:nn {"2074} {4} |
| 3500 |
\__um_setup_active_superscript:nn {"2075} {5} |
| 3501 |
\__um_setup_active_superscript:nn {"2076} {6} |
| 3502 |
\__um_setup_active_superscript:nn {"2077} {7} |
| 3503 |
\__um_setup_active_superscript:nn {"2078} {8} |
| 3504 |
\__um_setup_active_superscript:nn {"2079} {9} |
| 3505 |
\__um_setup_active_superscript:nn {"207A} {+} |
| 3506 |
\__um_setup_active_superscript:nn {"207B} {-} |
| 3507 |
\__um_setup_active_superscript:nn {"207C} {=} |
| 3508 |
\__um_setup_active_superscript:nn {"207D} {(} |
| 3509 |
\__um_setup_active_superscript:nn {"207E} {)} |
| 3510 |
\__um_setup_active_superscript:nn {"1D2C} {A} |
| 3511 |
\__um_setup_active_superscript:nn {"1D2E} {B} |
| 3512 |
\__um_setup_active_superscript:nn {"1D30} {D} |
| 3513 |
\__um_setup_active_superscript:nn {"1D31} {E} |
| 3514 |
\__um_setup_active_superscript:nn {"1D33} {G} |
| 3515 |
\__um_setup_active_superscript:nn {"1D34} {H} |
| 3516 |
\__um_setup_active_superscript:nn {"1D35} {I} |
| 3517 |
\__um_setup_active_superscript:nn {"1D36} {J} |
| 3518 |
\__um_setup_active_superscript:nn {"1D37} {K} |
| 3519 |
\__um_setup_active_superscript:nn {"1D38} {L} |
| 3520 |
\__um_setup_active_superscript:nn {"1D39} {M} |
| 3521 |
\__um_setup_active_superscript:nn {"1D3A} {N} |
| 3522 |
\__um_setup_active_superscript:nn {"1D3C} {O} |
| 3523 |
\__um_setup_active_superscript:nn {"1D3E} {P} |
| 3524 |
\__um_setup_active_superscript:nn {"1D3F} {R} |
| 3525 |
\__um_setup_active_superscript:nn {"1D40} {T} |
| 3526 |
\__um_setup_active_superscript:nn {"1D41} {U} |
| 3527 |
\__um_setup_active_superscript:nn {"2C7D} {V} |
| 3528 |
\__um_setup_active_superscript:nn {"1D42} {W} |
| 3529 |
\__um_setup_active_superscript:nn {"1D43} {a} |
| 3530 |
\__um_setup_active_superscript:nn {"1D47} {b} |
| 3531 |
\__um_setup_active_superscript:nn {"1D9C} {c} |
| 3532 |
\__um_setup_active_superscript:nn {"1D48} {d} |
| 3533 |
\__um_setup_active_superscript:nn {"1D49} {e} |
| 3534 |
\__um_setup_active_superscript:nn {"1DA0} {f} |
| 3535 |
\__um_setup_active_superscript:nn {"1D4D} {g} |
| 3536 |
\__um_setup_active_superscript:nn {"02B0} {h} |
| 3537 |
\__um_setup_active_superscript:nn {"2071} {i} |
| 3538 |
\__um_setup_active_superscript:nn {"02B2} {j} |
| 3539 |
\__um_setup_active_superscript:nn {"1D4F} {k} |
| 3540 |
\__um_setup_active_superscript:nn {"02E1} {l} |
| 3541 |
\__um_setup_active_superscript:nn {"1D50} {m} |
| 3542 |
\__um_setup_active_superscript:nn {"207F} {n} |
| 3543 |
\__um_setup_active_superscript:nn {"1D52} {o} |
| 3544 |
\__um_setup_active_superscript:nn {"1D56} {p} |
| 3545 |
\__um_setup_active_superscript:nn {"02B3} {r} |
| 3546 |
\__um_setup_active_superscript:nn {"02E2} {s} |
| 3547 |
\__um_setup_active_superscript:nn {"1D57} {t} |
| 3548 |
\__um_setup_active_superscript:nn {"1D58} {u} |
| 3549 |
\__um_setup_active_superscript:nn {"1D5B} {v} |
| 3550 |
\__um_setup_active_superscript:nn {"02B7} {w} |
| 3551 |
\__um_setup_active_superscript:nn {"02E3} {x} |
| 3552 |
\__um_setup_active_superscript:nn {"02B8} {y} |
| 3553 |
\__um_setup_active_superscript:nn {"1DBB} {z} |
| 3554 |
\__um_setup_active_superscript:nn {"1D5D} {\beta} |
| 3555 |
\__um_setup_active_superscript:nn {"1D5E} {\gamma} |
| 3556 |
\__um_setup_active_superscript:nn {"1D5F} {\delta} |
| 3557 |
\__um_setup_active_superscript:nn {"1D60} {\phi} |
| 3558 |
\__um_setup_active_superscript:nn {"1D61} {\chi} |
| 3559 |
\__um_setup_active_superscript:nn {"1DBF} {\theta} |
| 3560 |
\__um_setup_active_subscript:nn {"2080} {0} |
| 3561 |
\__um_setup_active_subscript:nn {"2081} {1} |
| 3562 |
\__um_setup_active_subscript:nn {"2082} {2} |
| 3563 |
\__um_setup_active_subscript:nn {"2083} {3} |
| 3564 |
\__um_setup_active_subscript:nn {"2084} {4} |
| 3565 |
\__um_setup_active_subscript:nn {"2085} {5} |
| 3566 |
\__um_setup_active_subscript:nn {"2086} {6} |
| 3567 |
\__um_setup_active_subscript:nn {"2087} {7} |
| 3568 |
\__um_setup_active_subscript:nn {"2088} {8} |
| 3569 |
\__um_setup_active_subscript:nn {"2089} {9} |
| 3570 |
\__um_setup_active_subscript:nn {"208A} {+} |
| 3571 |
\__um_setup_active_subscript:nn {"208B} {-} |
| 3572 |
\__um_setup_active_subscript:nn {"208C} {=} |
| 3573 |
\__um_setup_active_subscript:nn {"208D} {(} |
| 3574 |
\__um_setup_active_subscript:nn {"208E} {)} |
| 3575 |
\__um_setup_active_subscript:nn {"2090} {a} |
| 3576 |
\__um_setup_active_subscript:nn {"2091} {e} |
| 3577 |
\__um_setup_active_subscript:nn {"2095} {h} |
| 3578 |
\__um_setup_active_subscript:nn {"1D62} {i} |
| 3579 |
\__um_setup_active_subscript:nn {"2C7C} {j} |
| 3580 |
\__um_setup_active_subscript:nn {"2096} {k} |
| 3581 |
\__um_setup_active_subscript:nn {"2097} {l} |
| 3582 |
\__um_setup_active_subscript:nn {"2098} {m} |
| 3583 |
\__um_setup_active_subscript:nn {"2099} {n} |
| 3584 |
\__um_setup_active_subscript:nn {"2092} {o} |
| 3585 |
\__um_setup_active_subscript:nn {"209A} {p} |
| 3586 |
\__um_setup_active_subscript:nn {"1D63} {r} |
| 3587 |
\__um_setup_active_subscript:nn {"209B} {s} |
| 3588 |
\__um_setup_active_subscript:nn {"209C} {t} |
| 3589 |
\__um_setup_active_subscript:nn {"1D64} {u} |
| 3590 |
\__um_setup_active_subscript:nn {"1D65} {v} |
| 3591 |
\__um_setup_active_subscript:nn {"2093} {x} |
| 3592 |
\__um_setup_active_subscript:nn {"1D66} {\beta} |
| 3593 |
\__um_setup_active_subscript:nn {"1D67} {\gamma} |
| 3594 |
\__um_setup_active_subscript:nn {"1D68} {\rho} |
| 3595 |
\__um_setup_active_subscript:nn {"1D69} {\phi} |
| 3596 |
\__um_setup_active_subscript:nn {"1D6A} {\chi} |
| 3597 |
|
| 3598 |
%%^^A%% um-code-compat.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 3599 |
%%^^A%% Compatibility with 3rd party packages. |
| 3600 |
|
| 3601 |
\__um_after_package:nNn {url} \__um_patch_url: |
| 3602 |
{ |
| 3603 |
\tl_put_left:Nn \Url@FormatString { \__um_switch_to:n {literal} } |
| 3604 |
\tl_put_right:Nn \UrlSpecials |
| 3605 |
{ |
| 3606 |
\do \` { \mathchar`\` } |
| 3607 |
\do \' { \mathchar`\' } |
| 3608 |
\do \$ { \mathchar`\$ } |
| 3609 |
\do \& { \mathchar`\& } |
| 3610 |
} |
| 3611 |
} |
| 3612 |
\__um_after_package:nNn { mathtools } \__um_patch_mathtools_B: |
| 3613 |
{ |
| 3614 |
\cs_set_eq:NN \MToverbracket \overbracket |
| 3615 |
\cs_set_eq:NN \MTunderbracket \underbracket |
| 3616 |
|
| 3617 |
\AtBeginDocument |
| 3618 |
{ |
| 3619 |
\msg_warning:nn { unicode-math } { mathtools-overbracket } |
| 3620 |
|
| 3621 |
\cs_set:Npn \downbracketfill ##1 ##2 |
| 3622 |
{ |
| 3623 |
\tl_set:Nn \l_MT_bracketheight_fdim {.27ex} |
| 3624 |
\downbracketend {##1} {##2} |
| 3625 |
\leaders \vrule \@height ##1 \@depth \z@ \hfill |
| 3626 |
\downbracketend {##1} {##2} |
| 3627 |
} |
| 3628 |
|
| 3629 |
\cs_set:Npn \upbracketfill ##1 ##2 |
| 3630 |
{ |
| 3631 |
\tl_set:Nn \l_MT_bracketheight_fdim {.27ex} |
| 3632 |
\upbracketend {##1} {##2} |
| 3633 |
\leaders \vrule \@height \z@ \@depth ##1 \hfill |
| 3634 |
\upbracketend {##1} {##2} |
| 3635 |
} |
| 3636 |
|
| 3637 |
\cs_set_eq:NN \Uoverbracket \overbracket |
| 3638 |
\cs_set_eq:NN \Uunderbracket \underbracket |
| 3639 |
\cs_set_eq:NN \overbracket \MToverbracket |
| 3640 |
\cs_set_eq:NN \underbracket \MTunderbracket |
| 3641 |
} |
| 3642 |
} |
| 3643 |
\__um_after_package:nNn { mathtools } \__um_patch_mathtools_C: |
| 3644 |
{ |
| 3645 |
\msg_warning:nn { unicode-math } { mathtools-colon } |
| 3646 |
\DeclareDocumentCommand \dblcolon { } { \Colon } |
| 3647 |
\DeclareDocumentCommand \coloneqq { } { \coloneq } |
| 3648 |
\DeclareDocumentCommand \Coloneqq { } { \Coloneq } |
| 3649 |
\DeclareDocumentCommand \eqqcolon { } { \eqcolon } |
| 3650 |
} |
| 3651 |
|
| 3652 |
%%^^A%% um-code-amsmath.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 3653 |
%%^^A%% Compatibility with amsmath. |
| 3654 |
|
| 3655 |
\tl_remove_once:Nn \@begindocumenthook |
| 3656 |
{ |
| 3657 |
\mathchardef\std@minus\mathcode`\-\relax |
| 3658 |
\mathchardef\std@equal\mathcode`\=\relax |
| 3659 |
} |
| 3660 |
\AtBeginDocument |
| 3661 |
{ |
| 3662 |
\Umathcharnumdef\std@minus\Umathcodenum`- |
| 3663 |
\Umathcharnumdef\std@equal\Umathcodenum`= |
| 3664 |
} |
| 3665 |
\cs_set:Npn \@cdots {\mathinner{\unicodecdots}} |
| 3666 |
\cs_set_eq:NN \dotsb@ \cdots |
| 3667 |
\cs_set_nopar:Npn \plainroot@ #1 \of #2 |
| 3668 |
{ |
| 3669 |
\bool_if:nTF |
| 3670 |
{ |
| 3671 |
\__um_int_if_zero_p:n \uproot@ && \__um_int_if_zero_p:n \leftroot@ |
| 3672 |
} |
| 3673 |
{ |
| 3674 |
\Uroot \c__um_radical_sqrt_tl { #1 } { #2 } |
| 3675 |
} |
| 3676 |
{ |
| 3677 |
\hbox_set:Nn \rootbox |
| 3678 |
{ |
| 3679 |
\c_math_toggle_token \m@th |
| 3680 |
\scriptscriptstyle { #1 } |
| 3681 |
\c_math_toggle_token |
| 3682 |
} |
| 3683 |
\mathchoice |
| 3684 |
{ \r@@t \displaystyle { #2 } } |
| 3685 |
{ \r@@t \textstyle { #2 } } |
| 3686 |
{ \r@@t \scriptstyle { #2 } } |
| 3687 |
{ \r@@t \scriptscriptstyle { #2 } } |
| 3688 |
} |
| 3689 |
\c_group_end_token |
| 3690 |
} |
| 3691 |
\cs_set_nopar:Npn \r@@t #1 #2 |
| 3692 |
{ |
| 3693 |
\hbox_set:Nn \l_tmpa_box |
| 3694 |
{ |
| 3695 |
\c_math_toggle_token \m@th |
| 3696 |
#1 \mskip \uproot@ mu |
| 3697 |
\c_math_toggle_token |
| 3698 |
} |
| 3699 |
\Uroot \c__um_radical_sqrt_tl |
| 3700 |
{ |
| 3701 |
\box_move_up:nn { \box_wd:N \l_tmpa_box } |
| 3702 |
{ |
| 3703 |
\hbox:n |
| 3704 |
{ |
| 3705 |
\c_math_toggle_token \m@th |
| 3706 |
\mkern -\leftroot@ mu |
| 3707 |
\box_use:N \rootbox |
| 3708 |
\mkern \leftroot@ mu |
| 3709 |
\c_math_toggle_token |
| 3710 |
} |
| 3711 |
} |
| 3712 |
} |
| 3713 |
{ #2 } |
| 3714 |
} |
| 3715 |
|
| 3716 |
%%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> |
| 3717 |
%%^^A%% Assorted definitions to close up. |
| 3718 |
|
| 3719 |
\AtBeginDocument { \debug_suspend: \__um_resolve_greek: \debug_resume: } |
| 3720 |
\cs_new:Npn \__um_resolve_greek: |
| 3721 |
{ |
| 3722 |
\clist_map_inline:nn |
| 3723 |
{ |
| 3724 |
Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda, |
| 3725 |
alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda, |
| 3726 |
Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega, |
| 3727 |
mu,nu,xi,omicron,pi,rho,sigma,tau,upsilon,phi,chi,psi,omega, |
| 3728 |
varTheta,varsigma,vartheta,varkappa,varrho,varpi,varepsilon,varphi |
| 3729 |
} |
| 3730 |
{ |
| 3731 |
\tl_set:cx {##1} { \exp_not:c { mit ##1 } } |
| 3732 |
\tl_set:cx {up ##1} { \exp_not:N \symup \exp_not:c { ##1 } } |
| 3733 |
\tl_set:cx {it ##1} { \exp_not:N \symit \exp_not:c { ##1 } } |
| 3734 |
} |
| 3735 |
} |
| 3736 |
\cs_new:Nn \__um_which_frac:nn |
| 3737 |
{ |
| 3738 |
\bool_if:NTF \l__um_smallfrac_bool {\tfrac} {\frac} {#1} {#2} |
| 3739 |
} |
| 3740 |
\cs_new:Npn \__um_setup_active_frac: |
| 3741 |
{ |
| 3742 |
\__um_mathactive_remap:nn {"2189} { \__um_which_frac:nn {0} {3} } |
| 3743 |
\__um_mathactive_remap:nn {"2152} { \__um_which_frac:nn {1} {10} } |
| 3744 |
\__um_mathactive_remap:nn {"2151} { \__um_which_frac:nn {1} {9} } |
| 3745 |
\__um_mathactive_remap:nn {"215B} { \__um_which_frac:nn {1} {8} } |
| 3746 |
\__um_mathactive_remap:nn {"2150} { \__um_which_frac:nn {1} {7} } |
| 3747 |
\__um_mathactive_remap:nn {"2159} { \__um_which_frac:nn {1} {6} } |
| 3748 |
\__um_mathactive_remap:nn {"2155} { \__um_which_frac:nn {1} {5} } |
| 3749 |
\__um_mathactive_remap:nn {"00BC} { \__um_which_frac:nn {1} {4} } |
| 3750 |
\__um_mathactive_remap:nn {"2153} { \__um_which_frac:nn {1} {3} } |
| 3751 |
\__um_mathactive_remap:nn {"215C} { \__um_which_frac:nn {3} {8} } |
| 3752 |
\__um_mathactive_remap:nn {"2156} { \__um_which_frac:nn {2} {5} } |
| 3753 |
\__um_mathactive_remap:nn {"00BD} { \__um_which_frac:nn {1} {2} } |
| 3754 |
\__um_mathactive_remap:nn {"2157} { \__um_which_frac:nn {3} {5} } |
| 3755 |
\__um_mathactive_remap:nn {"215D} { \__um_which_frac:nn {5} {8} } |
| 3756 |
\__um_mathactive_remap:nn {"2154} { \__um_which_frac:nn {2} {3} } |
| 3757 |
\__um_mathactive_remap:nn {"00BE} { \__um_which_frac:nn {3} {4} } |
| 3758 |
\__um_mathactive_remap:nn {"2158} { \__um_which_frac:nn {4} {5} } |
| 3759 |
\__um_mathactive_remap:nn {"215A} { \__um_which_frac:nn {5} {6} } |
| 3760 |
\__um_mathactive_remap:nn {"215E} { \__um_which_frac:nn {7} {8} } |
| 3761 |
} |
| 3762 |
\AtBeginDocument { \__um_setup_active_frac: } |
| 3763 |
\protected\def\to{\rightarrow} |
| 3764 |
\protected\def\le{\leq} |
| 3765 |
\protected\def\ge{\geq} |
| 3766 |
\protected\def\neq{\ne} |
| 3767 |
\protected\def\triangle{\mathord{\bigtriangleup}} |
| 3768 |
\protected\def\bigcirc{\mdlgwhtcircle} |
| 3769 |
\protected\def\circ{\vysmwhtcircle} |
| 3770 |
\protected\def\bullet{\smblkcircle} |
| 3771 |
\protected\def\mathyen{\yen} |
| 3772 |
\protected\def\mathsterling{\sterling} |
| 3773 |
\protected\def\diamond{\smwhtdiamond} |
| 3774 |
\protected\def\emptyset{\varnothing} |
| 3775 |
\protected\def\hbar{\hslash} |
| 3776 |
\protected\def\land{\wedge} |
| 3777 |
\protected\def\lor{\vee} |
| 3778 |
\protected\def\owns{\ni} |
| 3779 |
\protected\def\gets{\leftarrow} |
| 3780 |
\protected\def\mathring{\ocirc} |
| 3781 |
\protected\def\lnot{\neg} |
| 3782 |
\protected\def\longdivision{\longdivisionsign} |
| 3783 |
\protected\def\backepsilon{\upbackepsilon} |
| 3784 |
\protected\def\eth{\matheth} |
| 3785 |
\protected\def\dbkarow {\dbkarrow} |
| 3786 |
\protected\def\drbkarow{\drbkarrow} |
| 3787 |
\protected\def\hksearow{\hksearrow} |
| 3788 |
\protected\def\hkswarow{\hkswarrow} |
| 3789 |
\protected\def\smallint{\mathop{\textstyle\int}\limits} |
| 3790 |
\cs_set_eq:NN \latexe_underbar:n \underbar |
| 3791 |
\renewcommand\underbar |
| 3792 |
{ |
| 3793 |
\mode_if_math:TF \mathunderbar \latexe_underbar:n |
| 3794 |
} |
| 3795 |
\cs_set_protected:Npn \smallsetminus { \mathbin{ \mathpalette \__um_smallsetminus: \relax} } |
| 3796 |
\cs_set:Npn \__um_smallsetminus: #1 { \rotatebox{135}{ \smash{ \raisebox{-\height}{$#1\minus$} } }} |
| 3797 |
\cs_set_protected:Npn \digamma {\updigamma} |
| 3798 |
\cs_set_protected:Npn \Digamma {\upDigamma} |
| 3799 |
\cs_set_protected:Npn \| {\Vert} |
| 3800 |
\cs_set_protected:Npn \mathellipsis {\mathinner{\unicodeellipsis}} |
| 3801 |
\cs_set_protected:Npn \cdots {\mathinner{\unicodecdots}} |
| 3802 |
\cs_set_eq:NN \__um_text_slash: \slash |
| 3803 |
\cs_set_protected:Npn \slash |
| 3804 |
{ |
| 3805 |
\mode_if_math:TF {\mathslash} {\__um_text_slash:} |
| 3806 |
} |
| 3807 |
\DeclareDocumentCommand \not {m} |
| 3808 |
{ |
| 3809 |
\tl_set:Nx \l__um_not_token_name_tl { \cs_to_str:N #1 } |
| 3810 |
\tl_if_empty:NT \l__um_not_token_name_tl |
| 3811 |
{ |
| 3812 |
\tl_set:Nx \l__um_not_token_name_tl { \token_to_str:N #1 } |
| 3813 |
} |
| 3814 |
\cs_if_exist:cTF { not \l__um_not_token_name_tl } |
| 3815 |
{ |
| 3816 |
\use:c { not \l__um_not_token_name_tl } |
| 3817 |
} |
| 3818 |
{ |
| 3819 |
\cs_if_exist:cTF { n \l__um_not_token_name_tl } |
| 3820 |
{ |
| 3821 |
\use:c { n \l__um_not_token_name_tl } |
| 3822 |
} |
| 3823 |
{ |
| 3824 |
\tl_if_eq:nnTF {#1} {$} { \notaccent{} } { \notaccent } #1 |
| 3825 |
} |
| 3826 |
} |
| 3827 |
} |
| 3828 |
\DeclareDocumentCommand \NewNegationCommand {mm} |
| 3829 |
{ |
| 3830 |
\__um_set_negation_command:Nnn \cs_new_protected:cpn {#1} {#2} |
| 3831 |
} |
| 3832 |
\DeclareDocumentCommand \RenewNegationCommand {mm} |
| 3833 |
{ |
| 3834 |
\__um_set_negation_command:Nnn \cs_set_protected:cpn {#1} {#2} |
| 3835 |
} |
| 3836 |
\cs_set:Nn \__um_set_negation_command:Nnn |
| 3837 |
{ |
| 3838 |
\tl_set:Nx \l__um_not_token_name_tl { \cs_to_str:N #2 } |
| 3839 |
\tl_if_empty:NT \l__um_not_token_name_tl |
| 3840 |
{ |
| 3841 |
\tl_set:Nx \l__um_not_token_name_tl { \token_to_str:N #2 } |
| 3842 |
} |
| 3843 |
#1 { not \l__um_not_token_name_tl } { #3 } |
| 3844 |
} |
| 3845 |
\NewNegationCommand { = } { \neq } |
| 3846 |
\NewNegationCommand { < } { \nless } |
| 3847 |
\NewNegationCommand { > } { \ngtr } |
| 3848 |
\NewNegationCommand { \gets } { \nleftarrow } |
| 3849 |
\NewNegationCommand { \simeq } { \nsime } |
| 3850 |
\NewNegationCommand { \equal } { \ne } |
| 3851 |
\NewNegationCommand { \le } { \nleq } |
| 3852 |
\NewNegationCommand { \ge } { \ngeq } |
| 3853 |
\NewNegationCommand { \greater } { \ngtr } |
| 3854 |
\NewNegationCommand { \forksnot } { \forks } |
| 3855 |
\int_step_inline:nnnn {0} {1} {9} |
| 3856 |
{ |
| 3857 |
\__um_mathactive_remap:nn {"FF10+#1} {\char\int_eval:n{`\0+#1}} |
| 3858 |
} |
| 3859 |
\int_step_inline:nnnn {0} {1} {26} |
| 3860 |
{ |
| 3861 |
\__um_mathactive_remap:nn {"FF21+#1} {\char\int_eval:n{`\A+#1}} |
| 3862 |
\__um_mathactive_remap:nn {"FF41+#1} {\char\int_eval:n{`\a+#1}} |
| 3863 |
} |
| 3864 |
\cs_new:Nn \__um_undeclare_symbol:N |
| 3865 |
{ |
| 3866 |
\cs_set_protected:Npn #1 |
| 3867 |
{ \__um_error:nx {legacy-char-not-supported} { \token_to_str:N #1 } } |
| 3868 |
} |
| 3869 |
\__um_undeclare_symbol:N \arrowvert |
| 3870 |
\__um_undeclare_symbol:N \Arrowvert |
| 3871 |
\__um_undeclare_symbol:N \bracevert |
| 3872 |
\endinput |
| 3873 |
|