diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-13 19:58:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-13 19:58:06 +0000 |
commit | 1fd23bc2f032f51fdcdef3f534d7f3a32e0edd17 (patch) | |
tree | ac9caa64ec4b878417bdc369611c5b356d0cb8a2 /Master/texmf-dist/source/latex/unicode-math | |
parent | ea2e240fa7961191ace5bec8b6b45162c8a48b84 (diff) |
unicode-math (13aug23)
git-svn-id: svn://tug.org/texlive/trunk@67919 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/unicode-math')
14 files changed, 45 insertions, 159 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx index fd6dd322c8e..7f5e54fb31c 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-alphabets.dtx @@ -228,7 +228,7 @@ } % \end{macrocode} % -% \subsection{Script and caligraphic: scr and cal} +% \subsection{Script and calligraphic: scr and cal} % % \begin{macrocode} \@@_new_alphabet_config:nnn {scr} {Latin} @@ -267,6 +267,13 @@ \@@_set_mathalphabet_pos:nnnn {cal} {M} {up,it} {#1} \@@_set_mathalphabet_pos:nnnn {cal} {R} {up,it} {#1} } +\@@_new_alphabet_config:nnn {cal} {latin} + { + \@@_set_mathalphabet_latin:nnn {cal} {up,it} {#1} + \@@_set_mathalphabet_pos:nnnn {cal} {e} {up,it} {#1} + \@@_set_mathalphabet_pos:nnnn {cal} {g} {up,it} {#1} + \@@_set_mathalphabet_pos:nnnn {cal} {o} {up,it} {#1} + } % \end{macrocode} % % \subsection{Fractur or fraktur or blackletter: frak} @@ -668,6 +675,10 @@ { \@@_set_mathalphabet_Latin:nnn {bfcal} {up,it}{#1} } +\@@_new_alphabet_config:nnn {bfcal} {latin} + { + \@@_set_mathalphabet_latin:nnn {bfcal} {up,it}{#1} + } % \end{macrocode} % % \subsection{Bold upright sans serif: bfsfup} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx index 9c10ee0ddfc..ee339b4a14c 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx @@ -41,61 +41,6 @@ % % % -% \subsection{Unicode radicals} -% -% Make sure \cs{Uroot} is defined in the case where the \LaTeX{} -% kernel doesn't make it available with its native name. -% -% \begin{macro}{\@@_redefine_radical:} -% \begin{macrocode} -\AtBeginDocument{ \@ifpackageloaded { amsmath } { } { \@@_redefine_radical: } } -% \end{macrocode} -% -% \begin{macro}{\r@@t} -% \darg{A mathstyle (for \cmd\mathpalette)} -% \darg{Leading superscript for the sqrt sign} -% A re-implementation of \LaTeX's hard-coded n-root sign using the appropriate \cmd\fontdimen s. -% \begin{macrocode} -%<*XE> -\cs_new:Nn \@@_redefine_radical: - { - \cs_set_nopar:Npn \r@@@@t ##1 ##2 - { - \hbox_set:Nn \l_tmpa_box - { - \c_math_toggle_token \m@th - ##1 \sqrtsign { ##2 } - \c_math_toggle_token - } - \@@_mathstyle_scale:NnnN ##1 { \kern } { \fontdimen 63 \g_@@_sqrt_font_cmd_tl } \g_@@_sqrt_font_cmd_tl - \box_move_up:nn - { - (\box_ht:N \l_tmpa_box - \box_dp:N \l_tmpa_box) * \number \fontdimen 65 \g_@@_sqrt_font_cmd_tl / 100 - } - { \box_use:N \rootbox } - \@@_mathstyle_scale:NnnN ##1 { \kern } { \fontdimen 64 \g_@@_sqrt_font_cmd_tl } \g_@@_sqrt_font_cmd_tl - \box_use_drop:N \l_tmpa_box - } - } -%</XE> -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\root} -% Redefine this macro for \LuaTeX, which provides us a nice primitive to use. -% \begin{macrocode} -%<*LU> -\cs_new:Nn \@@_redefine_radical: - { - \cs_set:Npn \root ##1 \of ##2 - { - \Uroot \c_@@_radical_sqrt_tl { ##1 } { ##2 } - } - } -%</LU> -% \end{macrocode} -% \end{macro} -% \end{macro} % % % \subsubsection{Active fractions} @@ -197,21 +142,10 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\colon} -% Define \cs{colon} as a mathpunct `|:|'. -% This is wrong: it should be \unichar{003A} {colon} instead! -% We hope no-one will notice. +% \begin{macro}{\smallsetminus} % \begin{macrocode} -\@ifpackageloaded{amsmath} - { - % define their own colon, perhaps I should just steal it. (It does look much better.) - } - { - \cs_set_protected:Npn \colon - { - \bool_if:NTF \g_@@_literal_colon_bool {:} { \mathpunct{:} } - } - } +\cs_set_protected:Npn \smallsetminus { \mathbin{ \mathpalette \@@_smallsetminus: \relax} } +\cs_set:Npn \__um_smallsetminus: #1 { \rotatebox{135}{ \smash{ \raisebox{-\height}{$#1\minus$} } }} % \end{macrocode} % \end{macro} % @@ -219,8 +153,8 @@ % \begin{macro}{\Digamma} % I might end up just changing these in the table. % \begin{macrocode} -\protected\def\digamma{\updigamma} -\protected\def\Digamma{\upDigamma} +\cs_set_protected:Npn \digamma {\updigamma} +\cs_set_protected:Npn \Digamma {\upDigamma} % \end{macrocode} % \end{macro} % \end{macro} @@ -383,12 +317,6 @@ \@@_undeclare_symbol:N \bracevert % \end{macrocode} % -% \section{A secret hook} -% This will be executed after most if not all of the standard unicode-math setup. -% \begin{macrocode} -\AtBeginDocument{\g_@@_secret_hook_tl} -% \end{macrocode} -% % \begin{macrocode} %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx index acd1117e34f..366e4e180a7 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-fontopt.dtx @@ -34,7 +34,7 @@ % \seclabel{rangeproc} % % Locally redefined all math symbol commands to their slot number prefixed by a quark. -% Similary for the math classes. +% Similarly for the math classes. % \begin{macrocode} \keys_define:nn {unicode-math} { diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx index ff132044e05..3687b9d5f22 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx @@ -153,7 +153,7 @@ %<LU> Renderer = Basic, BoldItalicFont = {}, ItalicFont = {}, SmallCapsFont = {}, Script = Math, -%<LU> FontAdjustment = { \@@_luatex_copy_fontdimens: }, +%<LU> RawFeature = {mathfontdimen=xetex}, \l_@@_unknown_keys_clist } @@ -199,7 +199,7 @@ \l_@@_sscript_features_tl } } , -%<LU> FontAdjustment = { \@@_luatex_copy_fontdimens: }, +%<LU> RawFeature = {mathfontdimen=xetex}, \l_@@_unknown_keys_clist } @@ -225,38 +225,6 @@ \tl_gset:Nn \g_@@_prime_font_cmd_tl { \l_@@_font } % \end{macrocode} % -% \begin{macro}{\@@_luatex_copy_fontdimens:} -% This performs a once-off copy of the LuaTeX math params into XeTeX-like fontdimens. -% While the list is somewhat comprehensive, these are really only for backwards compatibility -% and to allow a little shared code. They shouldn't be relied upon, since LuaTeX users -% might change the math params, which wouldn't be reflected in the fontdimens. -% \begin{macrocode} -%<*LU> -\@@_cs_new:Nn \@@_luatex_copy_fontdimens: - { - \@@_fontdimen_from_param:nn {10} {ScriptPercentScaleDown} - \@@_fontdimen_from_param:nn {11} {ScriptScriptPercentScaleDown} - \@@_fontdimen_from_param:nn {15} {AxisHeight} - \@@_fontdimen_from_param:nn {18} {SubscriptShiftDown} - \@@_fontdimen_from_param:nn {20} {SubscriptBaselineDropMin} - \@@_fontdimen_from_param:nn {21} {SuperscriptShiftUp} - \@@_fontdimen_from_param:nn {22} {SuperscriptShiftUpCramped} - \@@_fontdimen_from_param:nn {24} {SuperscriptBaselineDropMax} - \@@_fontdimen_from_param:nn {28} {UpperLimitGapMin} - \@@_fontdimen_from_param:nn {29} {UpperLimitBaselineRiseMin} - \@@_fontdimen_from_param:nn {30} {LowerLimitGapMin} - \@@_fontdimen_from_param:nn {31} {LowerLimitBaselineDropMin} - \@@_fontdimen_from_param:nn {32} {StackTopShiftUp} - \@@_fontdimen_from_param:nn {42} {FractionNumeratorShiftUp} - \@@_fontdimen_from_param:nn {43} {FractionNumeratorDisplayStyleShiftUp} - \@@_fontdimen_from_param:nn {44} {FractionDenominatorShiftDown} - \@@_fontdimen_from_param:nn {45} {FractionDenominatorDisplayStyleShiftDown} - \@@_fontdimen_from_param:nn {48} {FractionRuleThickness} - } -%</LU> -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\@@_setup_math_fam:} % \begin{macrocode} \@@_cs_new:Nn \@@_setup_math_fam: @@ -290,6 +258,8 @@ \fontspec_set_family:Nxn \l_@@_fam_two_tl { \l_@@_font_keyval_tl, +%<LU> RawFeature = {mathfontdimen=tex2}, +%<*XE> ScaleAgain = 1.0001, FontAdjustment = { @@ -309,6 +279,7 @@ \@@_zero_fontdimen:n {20} % delim1 = FractionDelimiterDisplaySize \@@_zero_fontdimen:n {21} % delim2 = FractionDelimiterSize } +%</XE> } {\l_@@_fontname_tl} \SetSymbolFont{symbols}{\l_@@_mversion_tl} @@ -331,6 +302,8 @@ \fontspec_set_family:Nxn \l_@@_fam_three_tl { \l_@@_font_keyval_tl, +%<LU> RawFeature = {mathfontdimen=tex3}, +%<*XE> ScaleAgain = 0.9999, FontAdjustment = { \@@_copy_fontdimen:nnN { 8} {48} \g_@@_main_font_cmd_tl @@ -340,6 +313,7 @@ \@@_copy_fontdimen:nnN {12} {31} \g_@@_main_font_cmd_tl \@@_zero_fontdimen:n {13} } +%</XE> } {\l_@@_fontname_tl} \SetSymbolFont{largesymbols}{\l_@@_mversion_tl} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx index d0024833780..45f34920680 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-mathtext.dtx @@ -38,7 +38,7 @@ \SetMathAlphabet #1 {\l_@@_mversion_tl} {\g_fontspec_encoding_tl} {\l_@@_tmpa_tl} {\mddefault} {\shapedefault} % integrate with fontspec's \setmathrm etc: - \tl_case:Nn #1 + \token_case_meaning:Nn #1 { \mathrm { \cs_gset_eq:NN \g__fontspec_mathrm_tl \l_@@_tmpa_tl } \mathsf { \cs_gset_eq:NN \g__fontspec_mathsf_tl \l_@@_tmpa_tl } @@ -95,7 +95,7 @@ % Reimplement that here to avoid \cs{bgroup}/\cs{egroup}. % \begin{macro}{\operator@font} % \begin{macrocode} -\cs_set:Npn \operator@font +\cs_set_protected:Npn \operator@font { \@@_switch_to:n {literal} \@@_fontswitch:n { \g_@@_operator_mathfont_tl } diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx index c93809cf4f4..a915ddbf2b9 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-msg.dtx @@ -13,11 +13,6 @@ % \end{macrocode} % % \begin{macrocode} -\@@_msg_new:nn {no-tfrac} -{ - Small fraction command \protect\tfrac\ not defined.\\ - Load amsmath or define it manually before loading unicode-math. -} \@@_msg_new:nn {default-math-font} { Defining the default maths font as '\l_@@_fontname_tl'. diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx index 16e3213998d..6d391f2f84e 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx @@ -31,10 +31,6 @@ \@ifpackageloaded {#1} {#2} {} } } -\RequirePackage{xparse,l3keys2e} -\RequirePackage{fontspec} -\RequirePackage{fix-cm} -%<LU>\RequirePackage{lualatex-math} % \end{macrocode} % % \subsection{\pkg{expl3} variants} @@ -228,23 +224,6 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_fontdimen_from_param:Nnn} -% This function extracts the math font dimen \verb|#3| from the font \verb|#1| -% and sets fontdimen \verb|#2| of the same font to that value. -% -% Use \XeTeX's fontdimen approach because it's tidy. We don't need bells and whistles here. -% \begin{macrocode} -%<*LU> -\cs_new_protected:Nn \@@_fontdimen_from_param:nn - { - \fontdimen #1 \font = - \lua_now:n { fontspec.mathfontdimen(font.current(),"#2") } - \scan_stop: - } -%</LU> -% \end{macrocode} -% \end{macro} -% %^^A \begin{function}[EXP, added = 2019-01-19]{\@@_int_if_zero_p:n, \@@_int_if_zero:nTF} %^^A \begin{syntax} %^^A \cs{int_if_zero_p:n} \Arg{intexpr} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx index 68d265674a2..acfddc02e77 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-pkgopt.dtx @@ -249,19 +249,13 @@ } % \end{macrocode} % -% % \paragraph{Active fraction style} % \begin{macrocode} \@@_keys_choices:nn {active-frac} { {small} { - \cs_if_exist:NTF \tfrac - { \bool_set_true:N \l_@@_smallfrac_bool } - { - \@@_warning:n {no-tfrac} - \bool_set_false:N \l_@@_smallfrac_bool - } + \bool_set_true:N \l_@@_smallfrac_bool \use:c {@@_setup_active_frac:} } diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx index ad3f3be6425..17f7f50bc15 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-primes.dtx @@ -358,6 +358,8 @@ \cs_set_eq:NN ^^^^2037 \@@_scan_sup_backtrprime: } \group_end: + +\cs_set_eq:NN \active@math@prime \@@_scan_sup_prime: % \end{macrocode} % % diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx index 8d2ba46e2a5..04829f3d370 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-setchar.dtx @@ -87,7 +87,7 @@ } { \char_set_catcode_other:n {#4} } - \tl_case:Nn #3 + \token_case_meaning:Nn #3 { \mathord { \@@_set_mathcode:nnn {#4} {#3} {#1} } \mathalpha { \@@_set_mathcode:nnn {#4} {#3} {#1} } diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-sym-commands.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-sym-commands.dtx index b2450878fe8..69203b1054d 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-sym-commands.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-sym-commands.dtx @@ -113,8 +113,8 @@ \@@_default_mathalph:nnn {bb } {latin,Latin,num,misc} {bb } \@@_default_mathalph:nnn {bbit } {misc} {bbit } \@@_default_mathalph:nnn {scr } {latin,Latin} {scr } -\@@_default_mathalph:nnn {cal } {Latin} {scr } -\@@_default_mathalph:nnn {bfcal } {Latin} {bfscr } +\@@_default_mathalph:nnn {cal } {latin,Latin} {scr } +\@@_default_mathalph:nnn {bfcal } {latin,Latin} {bfscr } \@@_default_mathalph:nnn {frak } {latin,Latin} {frak } \@@_default_mathalph:nnn {tt } {latin,Latin,num} {tt } \@@_default_mathalph:nnn {sfup } {latin,Latin,num} {sfup } diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx index ce24cc4267a..cae4865e881 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-usv.dtx @@ -46,6 +46,7 @@ \usv_set:nnn {scr} {Latin} {"1D49C} \usv_set:nnn {cal} {Latin} {"1D49C} \usv_set:nnn {scr} {latin} {"1D4B6} +\usv_set:nnn {cal} {latin} {"1D4B6} \usv_set:nnn {frak} {Latin} {"1D504} \usv_set:nnn {frak} {latin} {"1D51E} \usv_set:nnn {sf} {num} {"1D7E2} @@ -79,6 +80,7 @@ \usv_set:nnn {bfscr} {Latin} {"1D4D0} \usv_set:nnn {bfcal} {Latin} {"1D4D0} \usv_set:nnn {bfscr} {latin} {"1D4EA} +\usv_set:nnn {bfcal} {latin} {"1D4EA} \usv_set:nnn {bfsf} {num} {"1D7EC} \usv_set:nnn {bfsfup} {num} {"1D7EC} \usv_set:nnn {bfsfit} {num} {"1D7EC} @@ -246,6 +248,7 @@ \usv_set:nnn {bb} {h} {"1D559} \usv_set:nnn {tt} {h} {"1D691} \usv_set:nnn {scr} {h} {"1D4BD} +\usv_set:nnn {cal} {h} {"1D4BD} \usv_set:nnn {frak} {h} {"1D525} \usv_set:nnn {bfup} {h} {"1D421} \usv_set:nnn {bfit} {h} {"1D489} @@ -253,6 +256,7 @@ \usv_set:nnn {sfit} {h} {"1D629} \usv_set:nnn {bffrak} {h} {"1D58D} \usv_set:nnn {bfscr} {h} {"1D4F1} +\usv_set:nnn {bfcal} {h} {"1D4F1} \usv_set:nnn {bfsfup} {h} {"1D5F5} \usv_set:nnn {bfsfit} {h} {"1D65D} % \end{macrocode} @@ -309,7 +313,7 @@ \usv_set:nnn {scr} {g} {"210A} \usv_set:nnn {scr} {o} {"2134} % \end{macrocode} -% Caligraphic: +% Calligraphic: % \begin{macrocode} \usv_set:nnn {cal} {B} {"212C} \usv_set:nnn {cal} {E} {"2130} @@ -319,6 +323,9 @@ \usv_set:nnn {cal} {L} {"2112} \usv_set:nnn {cal} {M} {"2133} \usv_set:nnn {cal} {R} {"211B} +\usv_set:nnn {cal} {e} {"212F} +\usv_set:nnn {cal} {g} {"210A} +\usv_set:nnn {cal} {o} {"2134} % \end{macrocode} % Fractur: % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx index 840b1ebec52..275ed9a1247 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-variables.dtx @@ -70,10 +70,6 @@ % % \subsection{tl} % -% \begin{macrocode} -\tl_if_exist:NF \g_@@_secret_hook_tl { \tl_new:N \g_@@_secret_hook_tl } -% \end{macrocode} -% % For displaying in warning messages, etc.: % \begin{macrocode} \tl_const:Nn \c_@@_math_alphabet_name_latin_tl {Latin,~lowercase} diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx index 1253cab5d49..d5c7857b283 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx @@ -60,15 +60,15 @@ %<base>\ProvidesExplPackage{unicode-math} %<package&XE>\ProvidesExplPackage{unicode-math-xetex} %<package&LU>\ProvidesExplPackage{unicode-math-luatex} -%<base|package> {2020/01/31} {0.8q} {Unicode maths in XeLaTeX and LuaLaTeX} +%<base|package> {2023/08/13} {0.8r} {Unicode maths in XeLaTeX and LuaLaTeX} % \end{macrocode} % % Here the version and date are setup for typesetting the documentation. % \begin{macrocode} %<*dtx> \date{ - \def\filedate{2020/01/31} - \def\fileversion{0.8q} + \def\filedate{2023/08/13} + \def\fileversion{0.8r} \filedate \qquad \fileversion } %</dtx> |