diff options
27 files changed, 697 insertions, 443 deletions
diff --git a/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md b/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md index b309a174625..08f01fbfa24 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md +++ b/Master/texmf-dist/doc/latex/unicode-math/CHANGES.md @@ -1,6 +1,19 @@ CHANGE HISTORY ============== +## v0.8m (2018/07/29) + + * Restore behaviour of legacy syntax `x_\mathrm{x}` (i.e., with no braces). + While strictly ‘incorrectly’, this usage is widely used. + N.B. this syntax is not supported for the `\symXX` commands. + * Add `\cuberoot` and `\fourthroot` as proper radicals. + * Some additional input subscripts/superscripts. + * Some documentation additions (thanks for the contributions). + * Deprecation warning: the *internal* `\__um_switchto_XX:` commands will be dropped in + a future release in favour of `\__um_switch_to:n {XX}` (or similar). These are internal + commands and shouldn't be used by third-parties; please write if you have a use case. + + ## v0.8l (2018/02/02) * Issue an error message if `\setmathfont{...}[range=...]` is used first; a `range` @@ -10,6 +23,7 @@ CHANGE HISTORY * Document incompatibility with the `mathspec` package. (#436) * Fix bugs for using `range=\partial` and `range=\nabla`. (#441) + ## v0.8k (2018/01/13) * Eliminate warnings `Variant form 'NV' invalid for base form`... (#430). diff --git a/Master/texmf-dist/doc/latex/unicode-math/README.md b/Master/texmf-dist/doc/latex/unicode-math/README.md index c9bd15fec0c..92578d2057c 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/README.md +++ b/Master/texmf-dist/doc/latex/unicode-math/README.md @@ -62,8 +62,10 @@ PACKAGE USAGE Please see the PDF documentation for full details. A simple beginning is: - \usepackage{unicode-math} - \setmathfont{texgyrepagella-math.otf} +```tex +\usepackage{unicode-math} +\setmathfont{texgyrepagella-math.otf} +``` Most LaTeX math should still work after this. (Let me know if it doesn't.) Furthermore, it will be in a different font. diff --git a/Master/texmf-dist/doc/latex/unicode-math/RELEASE_CHECKLIST.md b/Master/texmf-dist/doc/latex/unicode-math/RELEASE_CHECKLIST.md index 445351f8136..13c2f4e788e 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/RELEASE_CHECKLIST.md +++ b/Master/texmf-dist/doc/latex/unicode-math/RELEASE_CHECKLIST.md @@ -2,11 +2,11 @@ - [ ] Finish final changes on `working` branch - [ ] Ensure `CHANGES.md` is up-to-date with a new version number -- [ ] `build setversion` +- [ ] `build tag foo` +- [ ] `git push` +- [ ] Check Travis build status (hopefully is working that date) - [ ] Update local distro fully with tlmgr - [ ] Run `build check` locally -- [ ] `git push` -- [ ] Check Travis build status - [ ] Install prerelease versions of `fontspec` and `latex3` and re-check - [ ] `git checkout master; git rebase working` - [ ] `build ctan` diff --git a/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex b/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex index ff82a414a96..3d871ddd8b4 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex +++ b/Master/texmf-dist/doc/latex/unicode-math/um-doc-main.tex @@ -655,11 +655,11 @@ sans serif bold, you must write |\symbfsf{...}| rather than |\symbf{\symsf{...}} This may change in the future. \begin{table} -\caption{Mathematical styles defined in Unicode. Black dots indicate an style exists in the font specified; blue dots indicate shapes that should always be taken from the upright font even in the italic style. See main text for description of \cs{mathbbit}.} +\caption{Mathematical styles defined in Unicode. Closed dots indicate an style exists in the font specified; open dots indicate shapes that should always be taken from the upright font even in the italic style. See main text for description of \cs{mathbbit}.} \tablabel{mathalphabets} \centering \def\Y{\textbullet} -\def\M{\textcolor[rgb]{0.5,0.5,1}{\textbullet}} +\def\M{\textopenbullet} \begin{tabular}{@{} lll l ccc @{}} \toprule \multicolumn{3}{c}{Font} & & \multicolumn{3}{c}{Alphabet} \\ @@ -672,9 +672,9 @@ Serif & Upright & Normal & \cs{symup} & \Y & \Y & \Y \\ & Italic & Normal & \cs{symit} & \Y & \Y & \M \\ & & Bold & \cs{symbfit} & \Y & \Y & \M \\ Sans serif & Upright & Normal & \cs{symsfup} & \Y & & \Y \\ + & & Bold & \cs{symbfsfup} & \Y & \Y & \Y \\ & Italic & Normal & \cs{symsfit} & \Y & & \M \\ - & Upright & Bold & \cs{symbfsfup} & \Y & \Y & \Y \\ - & Italic & Bold & \cs{symbfsfit} & \Y & \Y & \M \\ + & & Bold & \cs{symbfsfit} & \Y & \Y & \M \\ Typewriter & Upright & Normal & \cs{symtt} & \Y & & \Y \\ Double-struck & Upright & Normal & \cs{symbb} & \Y & & \Y \\ & Italic & Normal & \cs{symbbit} & \Y & & \\ @@ -841,6 +841,16 @@ If you ever need to enter the straight quote |'| or the backtick |`| in maths mode, these glyphs can be accessed with \cs{mathstraightquote} and \cs{mathbacktick}. +\subsubsection{Subscripts and superscripts and symbol alphabets} + +In traditional \LaTeX, users have for many years exploited a loophole in the implementation +of |\mathrm| and similar to write expressions such as |x_\mathrm f| to achieve +$x_{\mathrm{f}}$ instead of writing the more correct |x_{\mathrm{f}}|. +Shorthand notation such as |x_\mathrm f| is not officially documented \LaTeX\ syntax, +and due to a particular implementation detail in \pkg{unicode-math} this \emph{incorrect} +syntax is no longer supported. + + \subsubsection{Unicode subscripts and superscripts} You may, if you wish, use Unicode subscripts and superscripts in your @@ -1187,6 +1197,13 @@ This warning could be suppressed by loading the package as follows: \usepackage[warnings-off={mathtools-colon}]{unicode-math} \end{Verbatim} +\subsection{How to overwrite a macro} + +\pkg{unicode-math} defines the macros by \cs{AtBeginDocument}, +namely delays the definition until |\begin{document}| is met. +If you want to overwrite a macro defined by \pkg{unicode-math}, +please redefine it in \cs{AtBeginDocument} after loading this package. + \subsection{Programmer's interface} (Tentative and under construction.) diff --git a/Master/texmf-dist/doc/latex/unicode-math/um-doc-style.tex b/Master/texmf-dist/doc/latex/unicode-math/um-doc-style.tex index 46c2a8e1cf8..e5b581aed19 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/um-doc-style.tex +++ b/Master/texmf-dist/doc/latex/unicode-math/um-doc-style.tex @@ -2,9 +2,6 @@ \makeatletter \input{unicode-math.dtx} -\GetFileInfo{unicode-math.dtx} -\let\umfiledate\filedate -\let\umfileversion\fileversion \CheckSum{0} \EnableCrossrefs diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf Binary files differindex 79b17d3d19d..4cafb85ff78 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-code.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf Binary files differindex 94d3a034995..10a4e76b8c2 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf b/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf Binary files differindex 89d173fbeaf..822d0ef7038 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-example.pdf diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx index 808f26bc693..e6c75522f88 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx +++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.ltx @@ -46,7 +46,7 @@ \defmathfont{lm}{latinmodern-math.otf}{CC6666} \defmathfont{xits}{xits-math.otf}{CCCC66} \defmathfont{stix}{STIXMath-Regular.otf}{AA66CC} -\defmathfont{cambria}{Cambria Math}{66CCCC} +\defmathfont{cambria}{CambriaMath.ttf}{66CCCC} \defmathfont{asana}{Asana-Math.otf}{6666CC} \defmathfont{pagella}{texgyrepagella-math.otf}{AA6666} \defmathfont{dejavu}{texgyredejavu-math.otf}{AACC66} @@ -150,25 +150,11 @@ \def\AMSSYMB{\boxdot\boxplus\boxtimes\square\blacksquare\centerdot\lozenge\blacklozenge\circlearrowright\circlearrowleft\leftrightharpoons\boxminus\Vdash\Vvdash\vDash\twoheadrightarrow\twoheadleftarrow\leftleftarrows\rightrightarrows\upuparrows\downdownarrows\upharpoonright\restriction\downharpoonright\upharpoonleft\downharpoonleft\rightarrowtail\leftarrowtail\leftrightarrows\rightleftarrows\Lsh\Rsh\rightsquigarrow\leftrightsquigarrow\looparrowleft\looparrowright\circeq\succsim\gtrsim\gtrapprox\multimap\therefore\because\doteqdot\Doteq\triangleq\precsim\lesssim\lessapprox\eqslantless\eqslantgtr\curlyeqprec\curlyeqsucc\preccurlyeq\leqq\leqslant\lessgtr\backprime\risingdotseq\fallingdotseq\succcurlyeq\geqq\geqslant\gtrless\vartriangleright\vartriangleleft\trianglerighteq\trianglelefteq\bigstar\between\blacktriangledown\blacktriangleright\blacktriangleleft\vartriangle\blacktriangle\triangledown\eqcirc\lesseqgtr\gtreqless\lesseqqgtr\gtreqqless\Rrightarrow\Lleftarrow\veebar\barwedge\doublebarwedge\measuredangle\sphericalangle\varpropto\smallsmile\smallfrown\Subset\Supset\Cup\doublecup\Cap\doublecap\curlywedge\curlyvee\leftthreetimes\rightthreetimes\subseteqq\supseteqq\bumpeq\Bumpeq\lll\llless\ggg\gggtr\circledS\pitchfork\dotplus\backsim\backsimeq\complement\intercal\circledcirc\circledast\circleddash\lvertneqq\gvertneqq\nleq\ngeq\nless\ngtr\nprec\nsucc\lneqq\gneqq\nleqslant\ngeqslant\lneq\gneq\npreceq\nsucceq\precnsim\succnsim\lnsim\gnsim\nleqq\ngeqq\precneqq\succneqq\precnapprox\succnapprox\lnapprox\gnapprox\nsim\ncong\diagup\diagdown\varsubsetneq\varsupsetneq\nsubseteqq\nsupseteqq\subsetneqq\supsetneqq\varsubsetneqq\varsupsetneqq\subsetneq\supsetneq\nsubseteq\nsupseteq\nparallel\nmid\nshortmid\nshortparallel\nvdash\nVdash\nvDash\nVDash\ntrianglerighteq\ntrianglelefteq\ntriangleleft\ntriangleright\nleftarrow\nrightarrow\nLeftarrow\nRightarrow\nLeftrightarrow\nleftrightarrow\divideontimes\varnothing\nexists\Finv\Game\eth\eqsim\beth\gimel\daleth\lessdot\gtrdot\ltimes\rtimes\shortmid\shortparallel\smallsetminus\thicksim\thickapprox\approxeq\succapprox\precapprox\curvearrowleft\curvearrowright\digamma\varkappa\Bbbk\hslash\backepsilon} \input{unicode-math.dtx} -\makeatletter -\def\GetFileInfo#1{% - \def\filename{#1}% - \def\@tempb##1 ##2 ##3\relax##4\relax{% - \def\filedate{##1}% - \def\fileversion{##2}% - \def\fileinfo{##3}}% - \edef\@tempa{\csname ver@#1\endcsname}% - \expandafter\@tempb\@tempa\relax? ? \relax\relax} -\makeatother -\GetFileInfo{unicode-math.dtx} -\let\umfiledate\filedate -\let\umfileversion\fileversion \begin{document} \MakeShortVerb\| \title{Every symbol (most symbols) defined by \textsf{unicode-math}} \author{Will Robertson} -\date{\umfiledate \qquad \umfileversion} \maketitle This document uses the file \texttt{unicode-math-table.tex} @@ -198,6 +184,8 @@ Symbols defined in \textsf{amssymb} are indicated with {\color[gray]{0.6} \texts \section{Opening symbols, \cmd\mathopen} \begingroup \def\sqrt{\sqrtsign{}} +\def\cuberoot{\cuberootsign{}} +\def\fourthroot{\fourthrootsign{}} \def\longdivision{\longdivisionsign{}} \SHOW\mathopen \endgroup diff --git a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf Binary files differindex 4a5e798a464..c650c1c4709 100644 --- a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf +++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx index 0b67a673f57..e75bc6a0b45 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx @@ -111,7 +111,7 @@ && \int_compare_p:nNn { \leftroot@ } = { \c_zero } } { - \Uroot \l_@@_radical_sqrt_tl { #1 } { #2 } + \Uroot \c_@@_radical_sqrt_tl { #1 } { #2 } } { \hbox_set:Nn \rootbox @@ -154,7 +154,7 @@ #1 \mskip \uproot@ mu \c_math_toggle_token } - \Uroot \l_@@_radical_sqrt_tl + \Uroot \c_@@_radical_sqrt_tl { \box_move_up:nn { \box_wd:N \l_tmpa_box } { diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx index 668acbad2f9..3e97d36c183 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-compat.dtx @@ -61,10 +61,12 @@ % This is the same as writing, e.g., |\def\UrlFont{\ttfamily\@@_switchto_up:}| % but activates automatically so old documents that might change the \cs{url} % font still work correctly. +% +% TODO: check still needed now we have symup vs mathrm % \begin{macrocode} \AtEndOfPackageFile * {url} { - \tl_put_left:Nn \Url@FormatString { \@@_switchto_up: } + \tl_put_left:Nn \Url@FormatString { \@@_switch_to:n {up} } \tl_put_right:Nn \UrlSpecials { \do \` { \mathchar`\` } 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 3cbaefef3ba..75fc6ec9b80 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 @@ -17,7 +17,7 @@ % to upright or italic happens with the mathcode definitions, whereas these macros % just stand for the literal Unicode characters. % \begin{macrocode} -\AtBeginDocument { \@@_resolve_greek: } +\AtBeginDocument { \debug_suspend: \@@_resolve_greek: \debug_resume: } % \end{macrocode} % \begin{macrocode} \cs_new:Npn \@@_resolve_greek: @@ -89,7 +89,7 @@ { \cs_set:Npn \root ##1 \of ##2 { - \Uroot \l_@@_radical_sqrt_tl { ##1 } { ##2 } + \Uroot \c_@@_radical_sqrt_tl { ##1 } { ##2 } } } %</LU> 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 77924ee9894..db6edd40b0a 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 @@ -66,7 +66,7 @@ % \begin{macrocode} \cs_new:Nn \@@_range_init: { - \int_incr:N \g_@@_fam_int + \int_gincr:N \g_@@_fam_int \tl_set:Nx \l_@@_symfont_label_tl {@@_fam\int_use:N\g_@@_fam_int} \cs_set_eq:NN \_@@_sym:nnn \@@_process_symbol_parse:nnn \cs_set_eq:NN \@@_remap_symbol:nnn \@@_remap_symbol_parse:nnn 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 e57fbf45d15..907556283fb 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 @@ -107,7 +107,7 @@ \cs_new:Nn \@@_init:n { \tl_set:Nn \l_@@_fontname_tl {#1} - \bool_set_true:N \l_@@_ot_math_bool + \bool_gset_true:N \g_@@_ot_math_bool \tl_set:Nn \l_@@_mversion_tl {normal} \tl_set:Nn \l_@@_symfont_label_tl {operators} @@ -169,8 +169,8 @@ \exp_last_unbraced:NNo \@@_fontface_gset_eq:NN \g_@@_trial_font \font@name \fontspec_if_script:nF {math} { - \bool_gset_false:N \l_@@_ot_math_bool - \bool_gset_false:N \l_@@_init_bool + \bool_gset_false:N \g_@@_ot_math_bool + \bool_gset_false:N \g_@@_init_bool } \group_end: @@ -223,8 +223,8 @@ } \fontspec_if_script:nF {math} { - \bool_gset_false:N \l_@@_ot_math_bool - \bool_gset_false:N \l_@@_init_bool + \bool_gset_false:N \g_@@_ot_math_bool + \bool_gset_false:N \g_@@_init_bool } \group_end: } @@ -232,12 +232,16 @@ % \end{macro} % % \begin{macrocode} -\tl_set:Nn \g_@@_main_font_cmd_tl { \l_@@_font } -\tl_set:Nn \g_@@_sqrt_font_cmd_tl { \l_@@_font } -\tl_set:Nn \g_@@_prime_font_cmd_tl { \l_@@_font } +\tl_gset:Nn \g_@@_main_font_cmd_tl { \l_@@_font } +\tl_gset:Nn \g_@@_sqrt_font_cmd_tl { \l_@@_font } +\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_protected:Nn \@@_luatex_copy_fontdimens: @@ -586,7 +590,7 @@ % We organise radicals in the same way as nolimits-operators. % (\cs{cuberoot} and \cs{fourthroot}, don't seem to behave as proper radicals.) % \begin{macrocode} -\tl_set:Nn \l_@@_radicals_tl {\sqrt \longdivision} +\tl_set:Nn \l_@@_radicals_tl {\sqrt \longdivision \cuberoot \fourthroot} % \end{macrocode} % \end{macro} % @@ -597,21 +601,26 @@ % \end{macrocode} % % \begin{macro}{\@@_mathparam_restore:} +% \cs{glb@settings} might not be necessary but is included for symmetry. +% If the maths font were to be loaded later it would clobber our mathparam settings, so +% this seems like a sensible move. % \begin{macrocode} \cs_set:Nn \@@_mathparam_restore: { - \check@mathfonts - \tl_use:N \g_@@_mathparam_store_tl + \glb@settings + \tl_use:N \g_@@_mathparam_settings_tl } % \end{macrocode} % \end{macro} % % \begin{macro}{\@@_mathparam_store:} +% \cs{glb@settings} is called to force maths fonts loading \emph{now} so the mathparams +% are up-to-date. % \begin{macrocode} \cs_set:Nn \@@_mathparam_store: { - \check@mathfonts - \tl_gset:Nx \g_@@_mathparam_store_tl + \glb@settings + \tl_gset:Nx \g_@@_mathparam_settings_tl { \@@_mathparam_store_aux:N \displaystyle \@@_mathparam_store_aux:N \textstyle @@ -624,51 +633,51 @@ % \begin{macrocode} \cs_set:Nn \@@_mathparam_store_aux:N { - \Umathquad #1 = \the \Umathquad #1 - \Umathaxis #1 = \the \Umathaxis #1 - \Umathoperatorsize #1 = \the \Umathoperatorsize #1 - \Umathoverbarkern #1 = \the \Umathoverbarkern #1 - \Umathoverbarrule #1 = \the \Umathoverbarrule #1 - \Umathoverbarvgap #1 = \the \Umathoverbarvgap #1 - \Umathunderbarkern #1 = \the \Umathunderbarkern #1 - \Umathunderbarrule #1 = \the \Umathunderbarrule #1 - \Umathunderbarvgap #1 = \the \Umathunderbarvgap #1 - \Umathradicalkern #1 = \the \Umathradicalkern #1 - \Umathradicalrule #1 = \the \Umathradicalrule #1 - \Umathradicalvgap #1 = \the \Umathradicalvgap #1 - \Umathradicaldegreebefore #1 = \the \Umathradicaldegreebefore #1 - \Umathradicaldegreeafter #1 = \the \Umathradicaldegreeafter #1 - \Umathradicaldegreeraise #1 = \the \Umathradicaldegreeraise #1 - \Umathstackvgap #1 = \the \Umathstackvgap #1 - \Umathstacknumup #1 = \the \Umathstacknumup #1 - \Umathstackdenomdown #1 = \the \Umathstackdenomdown #1 - \Umathfractionrule #1 = \the \Umathfractionrule #1 - \Umathfractionnumvgap #1 = \the \Umathfractionnumvgap #1 - \Umathfractionnumup #1 = \the \Umathfractionnumup #1 - \Umathfractiondenomvgap #1 = \the \Umathfractiondenomvgap #1 - \Umathfractiondenomdown #1 = \the \Umathfractiondenomdown #1 - \Umathfractiondelsize #1 = \the \Umathfractiondelsize #1 - \Umathlimitabovevgap #1 = \the \Umathlimitabovevgap #1 - \Umathlimitabovebgap #1 = \the \Umathlimitabovebgap #1 - \Umathlimitabovekern #1 = \the \Umathlimitabovekern #1 - \Umathlimitbelowvgap #1 = \the \Umathlimitbelowvgap #1 - \Umathlimitbelowbgap #1 = \the \Umathlimitbelowbgap #1 - \Umathlimitbelowkern #1 = \the \Umathlimitbelowkern #1 - \Umathoverdelimitervgap #1 = \the \Umathoverdelimitervgap #1 - \Umathoverdelimiterbgap #1 = \the \Umathoverdelimiterbgap #1 - \Umathunderdelimitervgap #1 = \the \Umathunderdelimitervgap #1 - \Umathunderdelimiterbgap #1 = \the \Umathunderdelimiterbgap #1 - \Umathsubshiftdrop #1 = \the \Umathsubshiftdrop #1 - \Umathsubshiftdown #1 = \the \Umathsubshiftdown #1 - \Umathsupshiftdrop #1 = \the \Umathsupshiftdrop #1 - \Umathsupshiftup #1 = \the \Umathsupshiftup #1 - \Umathsubsupshiftdown #1 = \the \Umathsubsupshiftdown #1 - \Umathsubtopmax #1 = \the \Umathsubtopmax #1 - \Umathsupbottommin #1 = \the \Umathsupbottommin #1 - \Umathsupsubbottommax #1 = \the \Umathsupsubbottommax #1 - \Umathsubsupvgap #1 = \the \Umathsubsupvgap #1 - \Umathspaceafterscript #1 = \the \Umathspaceafterscript #1 - \Umathconnectoroverlapmin #1 = \the \Umathconnectoroverlapmin #1 + \Umathquad #1 = \the \Umathquad #1 \scan_stop: + \Umathaxis #1 = \the \Umathaxis #1 \scan_stop: + \Umathoperatorsize #1 = \the \Umathoperatorsize #1 \scan_stop: + \Umathoverbarkern #1 = \the \Umathoverbarkern #1 \scan_stop: + \Umathoverbarrule #1 = \the \Umathoverbarrule #1 \scan_stop: + \Umathoverbarvgap #1 = \the \Umathoverbarvgap #1 \scan_stop: + \Umathunderbarkern #1 = \the \Umathunderbarkern #1 \scan_stop: + \Umathunderbarrule #1 = \the \Umathunderbarrule #1 \scan_stop: + \Umathunderbarvgap #1 = \the \Umathunderbarvgap #1 \scan_stop: + \Umathradicalkern #1 = \the \Umathradicalkern #1 \scan_stop: + \Umathradicalrule #1 = \the \Umathradicalrule #1 \scan_stop: + \Umathradicalvgap #1 = \the \Umathradicalvgap #1 \scan_stop: + \Umathradicaldegreebefore #1 = \the \Umathradicaldegreebefore #1 \scan_stop: + \Umathradicaldegreeafter #1 = \the \Umathradicaldegreeafter #1 \scan_stop: + \Umathradicaldegreeraise #1 = \the \Umathradicaldegreeraise #1 \scan_stop: + \Umathstackvgap #1 = \the \Umathstackvgap #1 \scan_stop: + \Umathstacknumup #1 = \the \Umathstacknumup #1 \scan_stop: + \Umathstackdenomdown #1 = \the \Umathstackdenomdown #1 \scan_stop: + \Umathfractionrule #1 = \the \Umathfractionrule #1 \scan_stop: + \Umathfractionnumvgap #1 = \the \Umathfractionnumvgap #1 \scan_stop: + \Umathfractionnumup #1 = \the \Umathfractionnumup #1 \scan_stop: + \Umathfractiondenomvgap #1 = \the \Umathfractiondenomvgap #1 \scan_stop: + \Umathfractiondenomdown #1 = \the \Umathfractiondenomdown #1 \scan_stop: + \Umathfractiondelsize #1 = \the \Umathfractiondelsize #1 \scan_stop: + \Umathlimitabovevgap #1 = \the \Umathlimitabovevgap #1 \scan_stop: + \Umathlimitabovebgap #1 = \the \Umathlimitabovebgap #1 \scan_stop: + \Umathlimitabovekern #1 = \the \Umathlimitabovekern #1 \scan_stop: + \Umathlimitbelowvgap #1 = \the \Umathlimitbelowvgap #1 \scan_stop: + \Umathlimitbelowbgap #1 = \the \Umathlimitbelowbgap #1 \scan_stop: + \Umathlimitbelowkern #1 = \the \Umathlimitbelowkern #1 \scan_stop: + \Umathoverdelimitervgap #1 = \the \Umathoverdelimitervgap #1 \scan_stop: + \Umathoverdelimiterbgap #1 = \the \Umathoverdelimiterbgap #1 \scan_stop: + \Umathunderdelimitervgap #1 = \the \Umathunderdelimitervgap #1 \scan_stop: + \Umathunderdelimiterbgap #1 = \the \Umathunderdelimiterbgap #1 \scan_stop: + \Umathsubshiftdrop #1 = \the \Umathsubshiftdrop #1 \scan_stop: + \Umathsubshiftdown #1 = \the \Umathsubshiftdown #1 \scan_stop: + \Umathsupshiftdrop #1 = \the \Umathsupshiftdrop #1 \scan_stop: + \Umathsupshiftup #1 = \the \Umathsupshiftup #1 \scan_stop: + \Umathsubsupshiftdown #1 = \the \Umathsubsupshiftdown #1 \scan_stop: + \Umathsubtopmax #1 = \the \Umathsubtopmax #1 \scan_stop: + \Umathsupbottommin #1 = \the \Umathsupbottommin #1 \scan_stop: + \Umathsupsubbottommax #1 = \the \Umathsupsubbottommax #1 \scan_stop: + \Umathsubsupvgap #1 = \the \Umathsubsupvgap #1 \scan_stop: + \Umathspaceafterscript #1 = \the \Umathspaceafterscript #1 \scan_stop: + \Umathconnectoroverlapmin #1 = \the \Umathconnectoroverlapmin #1 \scan_stop: } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx index 056e03bd715..acd876a40df 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx @@ -426,7 +426,7 @@ % \begin{macrocode} \cs_new:Nn \@@_mathmap_noparse:nnn { - \tl_put_right:cx { @@_switchto_#1: } + \tl_gput_right:cx { g_@@_switchto_#1_tl } { \@@_set_mathcode:nnnn {#2} {\mathalpha} {\l_@@_symfont_label_tl} {#3} } 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 903cd0407e1..a12a8b6dabe 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 @@ -39,9 +39,9 @@ % integrate with fontspec's \setmathrm etc: \tl_case:Nn #1 { - \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l_@@_tmpa_tl } - \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l_@@_tmpa_tl } - \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l_@@_tmpa_tl } + \mathrm { \cs_gset_eq:NN \g__fontspec_mathrm_tl \l_@@_tmpa_tl } + \mathsf { \cs_gset_eq:NN \g__fontspec_mathsf_tl \l_@@_tmpa_tl } + \mathtt { \cs_gset_eq:NN \g__fontspec_mathtt_tl \l_@@_tmpa_tl } } } % \end{macrocode} @@ -79,11 +79,11 @@ % \begin{macrocode} \cs_set:Npn \use@mathgroup #1 #2 { - \@@_group_begin: + \math@bgroup \cs_if_eq:cNF {M@\f@encoding} #1 {#1} - \@@_switchto_literal: + \@@_switch_to:n {literal} \@@_mathgroup_set:n {#2} - \@@_group_end:n + \math@egroup } % \end{macrocode} % \end{macro} @@ -96,7 +96,7 @@ % \begin{macrocode} \cs_set:Npn \operator@font { - \@@_switchto_literal: + \@@_switch_to:n {literal} \@@_fontswitch:n { \g_@@_operator_mathfont_tl } } % \end{macrocode} 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 15b9373ce32..d159a1360eb 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 @@ -49,43 +49,43 @@ % \begin{macrocode} \@@_keys_choices:nn {mathup} { - {sym} { \bool_set_false:N \g_@@_mathrm_text_bool } - {text} { \bool_set_true:N \g_@@_mathrm_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathrm_text_bool } + {text} { \bool_gset_true:N \g_@@_mathrm_text_bool } } % \end{macrocode} % \begin{macrocode} \@@_keys_choices:nn {mathrm} { - {sym} { \bool_set_false:N \g_@@_mathrm_text_bool } - {text} { \bool_set_true:N \g_@@_mathrm_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathrm_text_bool } + {text} { \bool_gset_true:N \g_@@_mathrm_text_bool } } % \end{macrocode} % \begin{macrocode} \@@_keys_choices:nn {mathit} { - {sym} { \bool_set_false:N \g_@@_mathit_text_bool } - {text} { \bool_set_true:N \g_@@_mathit_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathit_text_bool } + {text} { \bool_gset_true:N \g_@@_mathit_text_bool } } % \end{macrocode} % \begin{macrocode} \@@_keys_choices:nn {mathbf} { - {sym} { \bool_set_false:N \g_@@_mathbf_text_bool } - {text} { \bool_set_true:N \g_@@_mathbf_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathbf_text_bool } + {text} { \bool_gset_true:N \g_@@_mathbf_text_bool } } % \end{macrocode} % \begin{macrocode} \@@_keys_choices:nn {mathsf} { - {sym} { \bool_set_false:N \g_@@_mathsf_text_bool } - {text} { \bool_set_true:N \g_@@_mathsf_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathsf_text_bool } + {text} { \bool_gset_true:N \g_@@_mathsf_text_bool } } % \end{macrocode} % \begin{macrocode} \@@_keys_choices:nn {mathtt} { - {sym} { \bool_set_false:N \g_@@_mathtt_text_bool } - {text} { \bool_set_true:N \g_@@_mathtt_text_bool } + {sym} { \bool_gset_false:N \g_@@_mathtt_text_bool } + {text} { \bool_gset_true:N \g_@@_mathtt_text_bool } } % \end{macrocode} % @@ -94,35 +94,35 @@ \@@_keys_choices:nn {normal-style} { {ISO} { - \bool_set_false:N \g_@@_literal_bool - \bool_set_false:N \g_@@_upGreek_bool - \bool_set_false:N \g_@@_upgreek_bool - \bool_set_false:N \g_@@_upLatin_bool - \bool_set_false:N \g_@@_uplatin_bool + \bool_gset_false:N \g_@@_literal_bool + \bool_gset_false:N \g_@@_upGreek_bool + \bool_gset_false:N \g_@@_upgreek_bool + \bool_gset_false:N \g_@@_upLatin_bool + \bool_gset_false:N \g_@@_uplatin_bool } {TeX} { - \bool_set_false:N \g_@@_literal_bool - \bool_set_true:N \g_@@_upGreek_bool - \bool_set_false:N \g_@@_upgreek_bool - \bool_set_false:N \g_@@_upLatin_bool - \bool_set_false:N \g_@@_uplatin_bool + \bool_gset_false:N \g_@@_literal_bool + \bool_gset_true:N \g_@@_upGreek_bool + \bool_gset_false:N \g_@@_upgreek_bool + \bool_gset_false:N \g_@@_upLatin_bool + \bool_gset_false:N \g_@@_uplatin_bool } {french} { - \bool_set_false:N \g_@@_literal_bool - \bool_set_true:N \g_@@_upGreek_bool - \bool_set_true:N \g_@@_upgreek_bool - \bool_set_true:N \g_@@_upLatin_bool - \bool_set_false:N \g_@@_uplatin_bool + \bool_gset_false:N \g_@@_literal_bool + \bool_gset_true:N \g_@@_upGreek_bool + \bool_gset_true:N \g_@@_upgreek_bool + \bool_gset_true:N \g_@@_upLatin_bool + \bool_gset_false:N \g_@@_uplatin_bool } {upright} { - \bool_set_false:N \g_@@_literal_bool - \bool_set_true:N \g_@@_upGreek_bool - \bool_set_true:N \g_@@_upgreek_bool - \bool_set_true:N \g_@@_upLatin_bool - \bool_set_true:N \g_@@_uplatin_bool + \bool_gset_false:N \g_@@_literal_bool + \bool_gset_true:N \g_@@_upGreek_bool + \bool_gset_true:N \g_@@_upgreek_bool + \bool_gset_true:N \g_@@_upLatin_bool + \bool_gset_true:N \g_@@_uplatin_bool } {literal} { - \bool_set_true:N \g_@@_literal_bool + \bool_gset_true:N \g_@@_literal_bool } } % \end{macrocode} @@ -158,28 +158,28 @@ \@@_keys_choices:nn {bold-style} { {ISO} { - \bool_set_false:N \g_@@_bfliteral_bool - \bool_set_false:N \g_@@_bfupGreek_bool - \bool_set_false:N \g_@@_bfupgreek_bool - \bool_set_false:N \g_@@_bfupLatin_bool - \bool_set_false:N \g_@@_bfuplatin_bool + \bool_gset_false:N \g_@@_bfliteral_bool + \bool_gset_false:N \g_@@_bfupGreek_bool + \bool_gset_false:N \g_@@_bfupgreek_bool + \bool_gset_false:N \g_@@_bfupLatin_bool + \bool_gset_false:N \g_@@_bfuplatin_bool } {TeX} { - \bool_set_false:N \g_@@_bfliteral_bool - \bool_set_true:N \g_@@_bfupGreek_bool - \bool_set_false:N \g_@@_bfupgreek_bool - \bool_set_true:N \g_@@_bfupLatin_bool - \bool_set_true:N \g_@@_bfuplatin_bool + \bool_gset_false:N \g_@@_bfliteral_bool + \bool_gset_true:N \g_@@_bfupGreek_bool + \bool_gset_false:N \g_@@_bfupgreek_bool + \bool_gset_true:N \g_@@_bfupLatin_bool + \bool_gset_true:N \g_@@_bfuplatin_bool } {upright} { - \bool_set_false:N \g_@@_bfliteral_bool - \bool_set_true:N \g_@@_bfupGreek_bool - \bool_set_true:N \g_@@_bfupgreek_bool - \bool_set_true:N \g_@@_bfupLatin_bool - \bool_set_true:N \g_@@_bfuplatin_bool + \bool_gset_false:N \g_@@_bfliteral_bool + \bool_gset_true:N \g_@@_bfupGreek_bool + \bool_gset_true:N \g_@@_bfupgreek_bool + \bool_gset_true:N \g_@@_bfupLatin_bool + \bool_gset_true:N \g_@@_bfuplatin_bool } {literal} { - \bool_set_true:N \g_@@_bfliteral_bool + \bool_gset_true:N \g_@@_bfliteral_bool } } % \end{macrocode} @@ -188,9 +188,9 @@ % \begin{macrocode} \@@_keys_choices:nn {sans-style} { - {italic} { \bool_set_false:N \g_@@_upsans_bool } - {upright} { \bool_set_true:N \g_@@_upsans_bool } - {literal} { \bool_set_true:N \g_@@_sfliteral_bool } + {italic} { \bool_gset_false:N \g_@@_upsans_bool } + {upright} { \bool_gset_true:N \g_@@_upsans_bool } + {literal} { \bool_gset_true:N \g_@@_sfliteral_bool } } % \end{macrocode} % @@ -200,15 +200,15 @@ \@@_keys_choices:nn {nabla} { {upright} { - \bool_set_false:N \g_@@_literal_Nabla_bool - \bool_set_true:N \g_@@_upNabla_bool + \bool_gset_false:N \g_@@_literal_Nabla_bool + \bool_gset_true:N \g_@@_upNabla_bool } {italic} { - \bool_set_false:N \g_@@_literal_Nabla_bool - \bool_set_false:N \g_@@_upNabla_bool + \bool_gset_false:N \g_@@_literal_Nabla_bool + \bool_gset_false:N \g_@@_upNabla_bool } {literal} { - \bool_set_true:N \g_@@_literal_Nabla_bool + \bool_gset_true:N \g_@@_literal_Nabla_bool } } % \end{macrocode} @@ -217,15 +217,15 @@ \@@_keys_choices:nn {partial} { {upright} { - \bool_set_false:N \g_@@_literal_partial_bool - \bool_set_true:N \g_@@_uppartial_bool + \bool_gset_false:N \g_@@_literal_partial_bool + \bool_gset_true:N \g_@@_uppartial_bool } {italic} { - \bool_set_false:N \g_@@_literal_partial_bool - \bool_set_false:N \g_@@_uppartial_bool + \bool_gset_false:N \g_@@_literal_partial_bool + \bool_gset_false:N \g_@@_uppartial_bool } {literal} { - \bool_set_true:N \g_@@_literal_partial_bool + \bool_gset_true:N \g_@@_literal_partial_bool } } % \end{macrocode} @@ -234,8 +234,8 @@ % \begin{macrocode} \@@_keys_choices:nn {colon} { - {literal} { \bool_set_true:N \g_@@_literal_colon_bool } - {TeX} { \bool_set_false:N \g_@@_literal_colon_bool } + {literal} { \bool_gset_true:N \g_@@_literal_colon_bool } + {TeX} { \bool_gset_false:N \g_@@_literal_colon_bool } } % \end{macrocode} % @@ -243,9 +243,9 @@ % \begin{macrocode} \@@_keys_choices:nn {slash-delimiter} { - {ascii} { \tl_set:Nn \g_@@_slash_delimiter_usv {"002F} } - {frac} { \tl_set:Nn \g_@@_slash_delimiter_usv {"2044} } - {div} { \tl_set:Nn \g_@@_slash_delimiter_usv {"2215} } + {ascii} { \tl_gset:Nn \g_@@_slash_delimiter_usv {"002F} } + {frac} { \tl_gset:Nn \g_@@_slash_delimiter_usv {"2044} } + {div} { \tl_gset:Nn \g_@@_slash_delimiter_usv {"2215} } } % \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 520f4b68ea6..58870922ed9 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 @@ -28,7 +28,7 @@ % \end{macrocode} % % \begin{macrocode} -\tl_set_from_file_x:Nnn \g_@@_mathtable_tl {\@@_symbol_setup:} {unicode-math-table.tex} +\tl_gset_from_file_x:Nnn \g_@@_mathtable_tl {\@@_symbol_setup:} {unicode-math-table.tex} % \end{macrocode} % % @@ -185,9 +185,19 @@ { \tl_if_in:NnTF \l_@@_radicals_tl {#2} { - \cs_gset_protected_nopar:cpx {\cs_to_str:N #2 sign} - { \@@_radical:nn {#1} {#3} } - \tl_set:cn {l_@@_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + \cs_if_exist:NF #2 + { + %% todo: check if the check is necessary + \cs_gset_protected_nopar:Npx #2 { \exp_not:c { \cs_to_str:N #2 sign } } + } + \cs_gset_protected_nopar:cpx { \cs_to_str:N #2 sign } + { + \@@_radical:nn {#1} {#3} + } + \tl_if_exist:cF {c_@@_radical_\cs_to_str:N #2_tl} + { + \tl_const:cn {c_@@_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + } } { \@@_set_delcode:nnn {#1} {#3} {#3} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx index 51a7666ec08..bae6bf0e4cc 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-sscript.dtx @@ -121,13 +121,56 @@ \@@_setup_active_superscript:nn {"207C} {=} \@@_setup_active_superscript:nn {"207D} {(} \@@_setup_active_superscript:nn {"207E} {)} -\@@_setup_active_superscript:nn {"2071} {i} -\@@_setup_active_superscript:nn {"207F} {n} +\@@_setup_active_superscript:nn {"1D2C} {A} +\@@_setup_active_superscript:nn {"1D2E} {B} +\@@_setup_active_superscript:nn {"1D30} {D} +\@@_setup_active_superscript:nn {"1D31} {E} +\@@_setup_active_superscript:nn {"1D33} {G} +\@@_setup_active_superscript:nn {"1D34} {H} +\@@_setup_active_superscript:nn {"1D35} {I} +\@@_setup_active_superscript:nn {"1D36} {J} +\@@_setup_active_superscript:nn {"1D37} {K} +\@@_setup_active_superscript:nn {"1D38} {L} +\@@_setup_active_superscript:nn {"1D39} {M} +\@@_setup_active_superscript:nn {"1D3A} {N} +\@@_setup_active_superscript:nn {"1D3C} {O} +\@@_setup_active_superscript:nn {"1D3E} {P} +\@@_setup_active_superscript:nn {"1D3F} {R} +\@@_setup_active_superscript:nn {"1D40} {T} +\@@_setup_active_superscript:nn {"1D41} {U} +\@@_setup_active_superscript:nn {"2C7D} {V} +\@@_setup_active_superscript:nn {"1D42} {W} +\@@_setup_active_superscript:nn {"1D43} {a} +\@@_setup_active_superscript:nn {"1D47} {b} +\@@_setup_active_superscript:nn {"1D9C} {c} +\@@_setup_active_superscript:nn {"1D48} {d} +\@@_setup_active_superscript:nn {"1D49} {e} +\@@_setup_active_superscript:nn {"1DA0} {f} +\@@_setup_active_superscript:nn {"1D4D} {g} \@@_setup_active_superscript:nn {"02B0} {h} +\@@_setup_active_superscript:nn {"2071} {i} \@@_setup_active_superscript:nn {"02B2} {j} +\@@_setup_active_superscript:nn {"1D4F} {k} +\@@_setup_active_superscript:nn {"02E1} {l} +\@@_setup_active_superscript:nn {"1D50} {m} +\@@_setup_active_superscript:nn {"207F} {n} +\@@_setup_active_superscript:nn {"1D52} {o} +\@@_setup_active_superscript:nn {"1D56} {p} \@@_setup_active_superscript:nn {"02B3} {r} +\@@_setup_active_superscript:nn {"02E2} {s} +\@@_setup_active_superscript:nn {"1D57} {t} +\@@_setup_active_superscript:nn {"1D58} {u} +\@@_setup_active_superscript:nn {"1D5B} {v} \@@_setup_active_superscript:nn {"02B7} {w} +\@@_setup_active_superscript:nn {"02E3} {x} \@@_setup_active_superscript:nn {"02B8} {y} +\@@_setup_active_superscript:nn {"1DBB} {z} +\@@_setup_active_superscript:nn {"1D5D} {\beta} +\@@_setup_active_superscript:nn {"1D5E} {\gamma} +\@@_setup_active_superscript:nn {"1D5F} {\delta} +\@@_setup_active_superscript:nn {"1D60} {\phi} +\@@_setup_active_superscript:nn {"1D61} {\chi} +\@@_setup_active_superscript:nn {"1DBF} {\theta} % \end{macrocode} % A few more subscripts than superscripts: % \begin{macrocode} 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 9b1d67a3061..833b4936bad 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 @@ -65,7 +65,7 @@ \mode_if_math:F { \exp_args:Nc \non@alpherr {sym#1} } \tl_set:Nn \l_@@_mathstyle_tl {#1} } - \exp_not:c {@@_switchto_#1:} + \@@_switch_to:n {#1} \@@_mathgroup_set:n {-1} \@@_group_end:n } @@ -83,7 +83,12 @@ \cs_set:Nn \@@_init_alphabet:n { \@@_log:nx {alph-initialise} {#1} - \cs_set_eq:cN {@@_switchto_#1:} \prg_do_nothing: + \tl_gclear_new:c {g_@@_switchto_#1_tl} + \cs_set_protected:cpn {@@_switchto_#1:} { \tl_use:c {g_@@_switchto_#1_tl} } + } +\cs_new_protected:Nn \@@_switch_to:n + { + \tl_use:c {g_@@_switchto_#1_tl} } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx index 697dab3dc84..58a64a448a0 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-ui.dtx @@ -47,7 +47,7 @@ % \begin{macrocode} \NewDocumentCommand \setoperatorfont {m} { - \tl_set:Nn \g_@@_operator_mathfont_tl {#1} + \tl_gset:Nn \g_@@_operator_mathfont_tl {#1} } \setoperatorfont{\mathrm} % \end{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 bb5a6ebe3af..17b35a7332a 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 @@ -12,7 +12,7 @@ % % True if using a proper OpenType font with unicode maths % \begin{macrocode} -\bool_new:N \l_@@_ot_math_bool +\bool_new:N \g_@@_ot_math_bool % \end{macrocode} % % Set when \cs{setmathfont} is run to trap the problem of no main font defined. @@ -81,9 +81,23 @@ % \end{macrocode} % % \begin{macrocode} +\tl_new:N \l_@@_style_tl +\tl_new:N \l_@@_family_tl +\tl_new:N \l_@@_alphabet_tl +\tl_new:N \l_@@_fontname_tl +\tl_new:N \l_@@_symfont_label_tl +\tl_new:N \l_@@_remap_style_tl +\tl_new:N \l_@@_fam_two_tl +\tl_new:N \l_@@_fam_three_tl +\tl_new:N \l_@@_curr_named_slot +% \end{macrocode} +% +% \begin{macrocode} +\tl_new:N \l_@@_tmpa_tl \tl_new:N \l_@@_mathstyle_tl \tl_new:N \l_@@_radicals_tl \tl_new:N \l_@@_nolimits_tl +\tl_new:N \l_@@_trial_family_tl % \end{macrocode} % % Used to store the font switch for the \cs{operator@font}. @@ -93,11 +107,12 @@ % % \begin{macrocode} \tl_new:N \g_@@_slash_delimiter_usv +\tl_new:N \g_@@_mathparam_settings_tl \tl_new:N \g_@@_mathtable_tl \tl_new:N \g_@@_fontname_tl \tl_new:N \g_@@_mversion_tl \tl_new:N \g_@@_symfont_tl -\tl_new:N \g_@@_font_keyval_tl +\tl_new:N \l_@@_font_keyval_tl \tl_new:N \g_@@_family_tl \tl_new:N \g_@@_style_tl \tl_new:N \g_@@_remap_style_tl @@ -124,13 +139,17 @@ \clist_new:N \g_@@_char_nrange_clist \clist_new:N \g_@@_unknown_keys_clist \clist_new:N \g_@@_alphabet_clist +\clist_new:N \l_@@_mathmap_charints_clist +\clist_new:N \l_@@_unknown_keys_clist +\clist_new:N \l_@@_font_keyval_clist +\clist_new:N \l_@@_alphabet_clist % \end{macrocode} % % \begin{macrocode} \clist_new:N \g_@@_bad_alpha_clist -\clist_put_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {bf} } -\clist_put_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {sf} } -\clist_put_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {bfsf} } +\clist_gput_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {bf} } +\clist_gput_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {sf} } +\clist_gput_right:Nx \g_@@_bad_alpha_clist { \tl_to_str:n {bfsf} } % \end{macrocode} % % \subsection{seq} @@ -146,7 +165,7 @@ % Every math class. % \begin{macrocode} \seq_new:N \g_@@_mathclasses_seq -\seq_set_from_clist:Nn \g_@@_mathclasses_seq +\seq_gset_from_clist:Nn \g_@@_mathclasses_seq { \mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, \mathop, 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 ea0d86dca4d..d112dc09f26 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> {2018/02/02} {v0.8l} {Unicode maths in XeLaTeX and LuaLaTeX} +%<base|package> {2018/07/29} {v0.8m} {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{2018/02/02} - \def\fileversion{v0.8l} + \def\filedate{2018/07/29} + \def\fileversion{v0.8m} \filedate \qquad \fileversion } %</dtx> diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty index 0fe53583f55..46768acc474 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty @@ -43,7 +43,7 @@ %%^^A%% Metadata for the package code, including files and versioning \ProvidesExplPackage{unicode-math-luatex} - {2018/02/02} {v0.8l} {Unicode maths in XeLaTeX and LuaLaTeX} + {2018/07/29} {v0.8m} {Unicode maths in XeLaTeX and LuaLaTeX} %%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Assorted initialisation tasks, including some low-level function definitions. @@ -179,7 +179,7 @@ %%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Declaration of all code-level variables used in the package. -\bool_new:N \l__um_ot_math_bool +\bool_new:N \g__um_ot_math_bool \bool_new:N \g__um_main_font_defined_bool \bool_new:N \l__um_init_bool \bool_new:N \l__um_implicit_alph_bool @@ -215,16 +215,28 @@ \tl_const:Nn \c__um_math_alphabet_name_Greek_tl {Greek,~uppercase} \tl_const:Nn \c__um_math_alphabet_name_num_tl {Numerals} \tl_const:Nn \c__um_math_alphabet_name_misc_tl {Misc.} +\tl_new:N \l__um_style_tl +\tl_new:N \l__um_family_tl +\tl_new:N \l__um_alphabet_tl +\tl_new:N \l__um_fontname_tl +\tl_new:N \l__um_symfont_label_tl +\tl_new:N \l__um_remap_style_tl +\tl_new:N \l__um_fam_two_tl +\tl_new:N \l__um_fam_three_tl +\tl_new:N \l__um_curr_named_slot +\tl_new:N \l__um_tmpa_tl \tl_new:N \l__um_mathstyle_tl \tl_new:N \l__um_radicals_tl \tl_new:N \l__um_nolimits_tl +\tl_new:N \l__um_trial_family_tl \tl_new:N \g__um_operator_mathfont_tl \tl_new:N \g__um_slash_delimiter_usv +\tl_new:N \g__um_mathparam_settings_tl \tl_new:N \g__um_mathtable_tl \tl_new:N \g__um_fontname_tl \tl_new:N \g__um_mversion_tl \tl_new:N \g__um_symfont_tl -\tl_new:N \g__um_font_keyval_tl +\tl_new:N \l__um_font_keyval_tl \tl_new:N \g__um_family_tl \tl_new:N \g__um_style_tl \tl_new:N \g__um_remap_style_tl @@ -236,16 +248,20 @@ \clist_new:N \g__um_char_nrange_clist \clist_new:N \g__um_unknown_keys_clist \clist_new:N \g__um_alphabet_clist +\clist_new:N \l__um_mathmap_charints_clist +\clist_new:N \l__um_unknown_keys_clist +\clist_new:N \l__um_font_keyval_clist +\clist_new:N \l__um_alphabet_clist \clist_new:N \g__um_bad_alpha_clist -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} } -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} } -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} } \seq_new:N \l__um_missing_alph_seq \seq_new:N \g__um_mathalph_seq \seq_new:N \g__um_char_range_seq \seq_new:N \g__um_mclass_range_seq \seq_new:N \g__um_mathclasses_seq -\seq_set_from_clist:Nn \g__um_mathclasses_seq +\seq_gset_from_clist:Nn \g__um_mathclasses_seq { \mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, \mathop, @@ -286,7 +302,7 @@ \@onlypreamble \setmathfontface \NewDocumentCommand \setoperatorfont {m} { - \tl_set:Nn \g__um_operator_mathfont_tl {#1} + \tl_gset:Nn \g__um_operator_mathfont_tl {#1} } \setoperatorfont{\mathrm} \NewDocumentCommand \addnolimits {m} @@ -327,66 +343,66 @@ } \__um_keys_choices:nn {mathup} { - {sym} { \bool_set_false:N \g__um_mathrm_text_bool } - {text} { \bool_set_true:N \g__um_mathrm_text_bool } + {sym} { \bool_gset_false:N \g__um_mathrm_text_bool } + {text} { \bool_gset_true:N \g__um_mathrm_text_bool } } \__um_keys_choices:nn {mathrm} { - {sym} { \bool_set_false:N \g__um_mathrm_text_bool } - {text} { \bool_set_true:N \g__um_mathrm_text_bool } + {sym} { \bool_gset_false:N \g__um_mathrm_text_bool } + {text} { \bool_gset_true:N \g__um_mathrm_text_bool } } \__um_keys_choices:nn {mathit} { - {sym} { \bool_set_false:N \g__um_mathit_text_bool } - {text} { \bool_set_true:N \g__um_mathit_text_bool } + {sym} { \bool_gset_false:N \g__um_mathit_text_bool } + {text} { \bool_gset_true:N \g__um_mathit_text_bool } } \__um_keys_choices:nn {mathbf} { - {sym} { \bool_set_false:N \g__um_mathbf_text_bool } - {text} { \bool_set_true:N \g__um_mathbf_text_bool } + {sym} { \bool_gset_false:N \g__um_mathbf_text_bool } + {text} { \bool_gset_true:N \g__um_mathbf_text_bool } } \__um_keys_choices:nn {mathsf} { - {sym} { \bool_set_false:N \g__um_mathsf_text_bool } - {text} { \bool_set_true:N \g__um_mathsf_text_bool } + {sym} { \bool_gset_false:N \g__um_mathsf_text_bool } + {text} { \bool_gset_true:N \g__um_mathsf_text_bool } } \__um_keys_choices:nn {mathtt} { - {sym} { \bool_set_false:N \g__um_mathtt_text_bool } - {text} { \bool_set_true:N \g__um_mathtt_text_bool } + {sym} { \bool_gset_false:N \g__um_mathtt_text_bool } + {text} { \bool_gset_true:N \g__um_mathtt_text_bool } } \__um_keys_choices:nn {normal-style} { {ISO} { - \bool_set_false:N \g__um_literal_bool - \bool_set_false:N \g__um_upGreek_bool - \bool_set_false:N \g__um_upgreek_bool - \bool_set_false:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_false:N \g__um_upGreek_bool + \bool_gset_false:N \g__um_upgreek_bool + \bool_gset_false:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {TeX} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_false:N \g__um_upgreek_bool - \bool_set_false:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_false:N \g__um_upgreek_bool + \bool_gset_false:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {french} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_true:N \g__um_upgreek_bool - \bool_set_true:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_true:N \g__um_upgreek_bool + \bool_gset_true:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {upright} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_true:N \g__um_upgreek_bool - \bool_set_true:N \g__um_upLatin_bool - \bool_set_true:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_true:N \g__um_upgreek_bool + \bool_gset_true:N \g__um_upLatin_bool + \bool_gset_true:N \g__um_uplatin_bool } {literal} { - \bool_set_true:N \g__um_literal_bool + \bool_gset_true:N \g__um_literal_bool } } \__um_keys_choices:nn {math-style} @@ -415,74 +431,74 @@ \__um_keys_choices:nn {bold-style} { {ISO} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_false:N \g__um_bfupGreek_bool - \bool_set_false:N \g__um_bfupgreek_bool - \bool_set_false:N \g__um_bfupLatin_bool - \bool_set_false:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_false:N \g__um_bfupGreek_bool + \bool_gset_false:N \g__um_bfupgreek_bool + \bool_gset_false:N \g__um_bfupLatin_bool + \bool_gset_false:N \g__um_bfuplatin_bool } {TeX} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_true:N \g__um_bfupGreek_bool - \bool_set_false:N \g__um_bfupgreek_bool - \bool_set_true:N \g__um_bfupLatin_bool - \bool_set_true:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfupGreek_bool + \bool_gset_false:N \g__um_bfupgreek_bool + \bool_gset_true:N \g__um_bfupLatin_bool + \bool_gset_true:N \g__um_bfuplatin_bool } {upright} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_true:N \g__um_bfupGreek_bool - \bool_set_true:N \g__um_bfupgreek_bool - \bool_set_true:N \g__um_bfupLatin_bool - \bool_set_true:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfupGreek_bool + \bool_gset_true:N \g__um_bfupgreek_bool + \bool_gset_true:N \g__um_bfupLatin_bool + \bool_gset_true:N \g__um_bfuplatin_bool } {literal} { - \bool_set_true:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfliteral_bool } } \__um_keys_choices:nn {sans-style} { - {italic} { \bool_set_false:N \g__um_upsans_bool } - {upright} { \bool_set_true:N \g__um_upsans_bool } - {literal} { \bool_set_true:N \g__um_sfliteral_bool } + {italic} { \bool_gset_false:N \g__um_upsans_bool } + {upright} { \bool_gset_true:N \g__um_upsans_bool } + {literal} { \bool_gset_true:N \g__um_sfliteral_bool } } \__um_keys_choices:nn {nabla} { {upright} { - \bool_set_false:N \g__um_literal_Nabla_bool - \bool_set_true:N \g__um_upNabla_bool + \bool_gset_false:N \g__um_literal_Nabla_bool + \bool_gset_true:N \g__um_upNabla_bool } {italic} { - \bool_set_false:N \g__um_literal_Nabla_bool - \bool_set_false:N \g__um_upNabla_bool + \bool_gset_false:N \g__um_literal_Nabla_bool + \bool_gset_false:N \g__um_upNabla_bool } {literal} { - \bool_set_true:N \g__um_literal_Nabla_bool + \bool_gset_true:N \g__um_literal_Nabla_bool } } \__um_keys_choices:nn {partial} { {upright} { - \bool_set_false:N \g__um_literal_partial_bool - \bool_set_true:N \g__um_uppartial_bool + \bool_gset_false:N \g__um_literal_partial_bool + \bool_gset_true:N \g__um_uppartial_bool } {italic} { - \bool_set_false:N \g__um_literal_partial_bool - \bool_set_false:N \g__um_uppartial_bool + \bool_gset_false:N \g__um_literal_partial_bool + \bool_gset_false:N \g__um_uppartial_bool } {literal} { - \bool_set_true:N \g__um_literal_partial_bool + \bool_gset_true:N \g__um_literal_partial_bool } } \__um_keys_choices:nn {colon} { - {literal} { \bool_set_true:N \g__um_literal_colon_bool } - {TeX} { \bool_set_false:N \g__um_literal_colon_bool } + {literal} { \bool_gset_true:N \g__um_literal_colon_bool } + {TeX} { \bool_gset_false:N \g__um_literal_colon_bool } } \__um_keys_choices:nn {slash-delimiter} { - {ascii} { \tl_set:Nn \g__um_slash_delimiter_usv {"002F} } - {frac} { \tl_set:Nn \g__um_slash_delimiter_usv {"2044} } - {div} { \tl_set:Nn \g__um_slash_delimiter_usv {"2215} } + {ascii} { \tl_gset:Nn \g__um_slash_delimiter_usv {"002F} } + {frac} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2044} } + {div} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2215} } } \__um_keys_choices:nn {active-frac} { @@ -894,7 +910,7 @@ \exp_not:n { \__um_sym:nnn {##1} {##2} {##3} } } } -\tl_set_from_file_x:Nnn \g__um_mathtable_tl {\__um_symbol_setup:} {unicode-math-table.tex} +\tl_gset_from_file_x:Nnn \g__um_mathtable_tl {\__um_symbol_setup:} {unicode-math-table.tex} \cs_new:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl} \AtBeginDocument{\__um_define_math_chars:} \cs_new:Nn \__um_define_math_chars: @@ -975,9 +991,19 @@ { \tl_if_in:NnTF \l__um_radicals_tl {#2} { - \cs_gset_protected_nopar:cpx {\cs_to_str:N #2 sign} - { \__um_radical:nn {#1} {#3} } - \tl_set:cn {l__um_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + \cs_if_exist:NF #2 + { + %% todo: check if the check is necessary + \cs_gset_protected_nopar:Npx #2 { \exp_not:c { \cs_to_str:N #2 sign } } + } + \cs_gset_protected_nopar:cpx { \cs_to_str:N #2 sign } + { + \__um_radical:nn {#1} {#3} + } + \tl_if_exist:cF {c__um_radical_\cs_to_str:N #2_tl} + { + \tl_const:cn {c__um_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + } } { \__um_set_delcode:nnn {#1} {#3} {#3} @@ -1045,22 +1071,22 @@ % integrate with fontspec's \setmathrm etc: \tl_case:Nn #1 { - \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } - \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } - \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } + \mathrm { \cs_gset_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } + \mathsf { \cs_gset_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } + \mathtt { \cs_gset_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } } } \cs_set:Npn \use@mathgroup #1 #2 { - \__um_group_begin: + \math@bgroup \cs_if_eq:cNF {M@\f@encoding} #1 {#1} - \__um_switchto_literal: + \__um_switch_to:n {literal} \__um_mathgroup_set:n {#2} - \__um_group_end:n + \math@egroup } \cs_set:Npn \operator@font { - \__um_switchto_literal: + \__um_switch_to:n {literal} \__um_fontswitch:n { \g__um_operator_mathfont_tl } } \cs_set:Nn \__um_fontswitch:n @@ -1192,7 +1218,7 @@ \cs_new:Nn \__um_init:n { \tl_set:Nn \l__um_fontname_tl {#1} - \bool_set_true:N \l__um_ot_math_bool + \bool_gset_true:N \g__um_ot_math_bool \tl_set:Nn \l__um_mversion_tl {normal} \tl_set:Nn \l__um_symfont_label_tl {operators} @@ -1241,8 +1267,8 @@ \exp_last_unbraced:NNo \__um_fontface_gset_eq:NN \g__um_trial_font \font@name \fontspec_if_script:nF {math} { - \bool_gset_false:N \l__um_ot_math_bool - \bool_gset_false:N \l__um_init_bool + \bool_gset_false:N \g__um_ot_math_bool + \bool_gset_false:N \g__um_init_bool } \group_end: @@ -1290,14 +1316,14 @@ } \fontspec_if_script:nF {math} { - \bool_gset_false:N \l__um_ot_math_bool - \bool_gset_false:N \l__um_init_bool + \bool_gset_false:N \g__um_ot_math_bool + \bool_gset_false:N \g__um_init_bool } \group_end: } -\tl_set:Nn \g__um_main_font_cmd_tl { \l__um_font } -\tl_set:Nn \g__um_sqrt_font_cmd_tl { \l__um_font } -\tl_set:Nn \g__um_prime_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_main_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_sqrt_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_prime_font_cmd_tl { \l__um_font } \cs_new_protected:Nn \__um_luatex_copy_fontdimens: { \__um_fontdimen_from_param:nn {10} {ScriptPercentScaleDown} @@ -1506,16 +1532,16 @@ \scpolint\npolint\pointint\sqint\intlarhk\intx \intcap\intcup\upint\lowint } -\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision} +\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision \cuberoot \fourthroot} \cs_set:Nn \__um_mathparam_restore: { - \check@mathfonts - \tl_use:N \g__um_mathparam_store_tl + \glb@settings + \tl_use:N \g__um_mathparam_settings_tl } \cs_set:Nn \__um_mathparam_store: { - \check@mathfonts - \tl_gset:Nx \g__um_mathparam_store_tl + \glb@settings + \tl_gset:Nx \g__um_mathparam_settings_tl { \__um_mathparam_store_aux:N \displaystyle \__um_mathparam_store_aux:N \textstyle @@ -1525,51 +1551,51 @@ } \cs_set:Nn \__um_mathparam_store_aux:N { - \Umathquad #1 = \the \Umathquad #1 - \Umathaxis #1 = \the \Umathaxis #1 - \Umathoperatorsize #1 = \the \Umathoperatorsize #1 - \Umathoverbarkern #1 = \the \Umathoverbarkern #1 - \Umathoverbarrule #1 = \the \Umathoverbarrule #1 - \Umathoverbarvgap #1 = \the \Umathoverbarvgap #1 - \Umathunderbarkern #1 = \the \Umathunderbarkern #1 - \Umathunderbarrule #1 = \the \Umathunderbarrule #1 - \Umathunderbarvgap #1 = \the \Umathunderbarvgap #1 - \Umathradicalkern #1 = \the \Umathradicalkern #1 - \Umathradicalrule #1 = \the \Umathradicalrule #1 - \Umathradicalvgap #1 = \the \Umathradicalvgap #1 - \Umathradicaldegreebefore #1 = \the \Umathradicaldegreebefore #1 - \Umathradicaldegreeafter #1 = \the \Umathradicaldegreeafter #1 - \Umathradicaldegreeraise #1 = \the \Umathradicaldegreeraise #1 - \Umathstackvgap #1 = \the \Umathstackvgap #1 - \Umathstacknumup #1 = \the \Umathstacknumup #1 - \Umathstackdenomdown #1 = \the \Umathstackdenomdown #1 - \Umathfractionrule #1 = \the \Umathfractionrule #1 - \Umathfractionnumvgap #1 = \the \Umathfractionnumvgap #1 - \Umathfractionnumup #1 = \the \Umathfractionnumup #1 - \Umathfractiondenomvgap #1 = \the \Umathfractiondenomvgap #1 - \Umathfractiondenomdown #1 = \the \Umathfractiondenomdown #1 - \Umathfractiondelsize #1 = \the \Umathfractiondelsize #1 - \Umathlimitabovevgap #1 = \the \Umathlimitabovevgap #1 - \Umathlimitabovebgap #1 = \the \Umathlimitabovebgap #1 - \Umathlimitabovekern #1 = \the \Umathlimitabovekern #1 - \Umathlimitbelowvgap #1 = \the \Umathlimitbelowvgap #1 - \Umathlimitbelowbgap #1 = \the \Umathlimitbelowbgap #1 - \Umathlimitbelowkern #1 = \the \Umathlimitbelowkern #1 - \Umathoverdelimitervgap #1 = \the \Umathoverdelimitervgap #1 - \Umathoverdelimiterbgap #1 = \the \Umathoverdelimiterbgap #1 - \Umathunderdelimitervgap #1 = \the \Umathunderdelimitervgap #1 - \Umathunderdelimiterbgap #1 = \the \Umathunderdelimiterbgap #1 - \Umathsubshiftdrop #1 = \the \Umathsubshiftdrop #1 - \Umathsubshiftdown #1 = \the \Umathsubshiftdown #1 - \Umathsupshiftdrop #1 = \the \Umathsupshiftdrop #1 - \Umathsupshiftup #1 = \the \Umathsupshiftup #1 - \Umathsubsupshiftdown #1 = \the \Umathsubsupshiftdown #1 - \Umathsubtopmax #1 = \the \Umathsubtopmax #1 - \Umathsupbottommin #1 = \the \Umathsupbottommin #1 - \Umathsupsubbottommax #1 = \the \Umathsupsubbottommax #1 - \Umathsubsupvgap #1 = \the \Umathsubsupvgap #1 - \Umathspaceafterscript #1 = \the \Umathspaceafterscript #1 - \Umathconnectoroverlapmin #1 = \the \Umathconnectoroverlapmin #1 + \Umathquad #1 = \the \Umathquad #1 \scan_stop: + \Umathaxis #1 = \the \Umathaxis #1 \scan_stop: + \Umathoperatorsize #1 = \the \Umathoperatorsize #1 \scan_stop: + \Umathoverbarkern #1 = \the \Umathoverbarkern #1 \scan_stop: + \Umathoverbarrule #1 = \the \Umathoverbarrule #1 \scan_stop: + \Umathoverbarvgap #1 = \the \Umathoverbarvgap #1 \scan_stop: + \Umathunderbarkern #1 = \the \Umathunderbarkern #1 \scan_stop: + \Umathunderbarrule #1 = \the \Umathunderbarrule #1 \scan_stop: + \Umathunderbarvgap #1 = \the \Umathunderbarvgap #1 \scan_stop: + \Umathradicalkern #1 = \the \Umathradicalkern #1 \scan_stop: + \Umathradicalrule #1 = \the \Umathradicalrule #1 \scan_stop: + \Umathradicalvgap #1 = \the \Umathradicalvgap #1 \scan_stop: + \Umathradicaldegreebefore #1 = \the \Umathradicaldegreebefore #1 \scan_stop: + \Umathradicaldegreeafter #1 = \the \Umathradicaldegreeafter #1 \scan_stop: + \Umathradicaldegreeraise #1 = \the \Umathradicaldegreeraise #1 \scan_stop: + \Umathstackvgap #1 = \the \Umathstackvgap #1 \scan_stop: + \Umathstacknumup #1 = \the \Umathstacknumup #1 \scan_stop: + \Umathstackdenomdown #1 = \the \Umathstackdenomdown #1 \scan_stop: + \Umathfractionrule #1 = \the \Umathfractionrule #1 \scan_stop: + \Umathfractionnumvgap #1 = \the \Umathfractionnumvgap #1 \scan_stop: + \Umathfractionnumup #1 = \the \Umathfractionnumup #1 \scan_stop: + \Umathfractiondenomvgap #1 = \the \Umathfractiondenomvgap #1 \scan_stop: + \Umathfractiondenomdown #1 = \the \Umathfractiondenomdown #1 \scan_stop: + \Umathfractiondelsize #1 = \the \Umathfractiondelsize #1 \scan_stop: + \Umathlimitabovevgap #1 = \the \Umathlimitabovevgap #1 \scan_stop: + \Umathlimitabovebgap #1 = \the \Umathlimitabovebgap #1 \scan_stop: + \Umathlimitabovekern #1 = \the \Umathlimitabovekern #1 \scan_stop: + \Umathlimitbelowvgap #1 = \the \Umathlimitbelowvgap #1 \scan_stop: + \Umathlimitbelowbgap #1 = \the \Umathlimitbelowbgap #1 \scan_stop: + \Umathlimitbelowkern #1 = \the \Umathlimitbelowkern #1 \scan_stop: + \Umathoverdelimitervgap #1 = \the \Umathoverdelimitervgap #1 \scan_stop: + \Umathoverdelimiterbgap #1 = \the \Umathoverdelimiterbgap #1 \scan_stop: + \Umathunderdelimitervgap #1 = \the \Umathunderdelimitervgap #1 \scan_stop: + \Umathunderdelimiterbgap #1 = \the \Umathunderdelimiterbgap #1 \scan_stop: + \Umathsubshiftdrop #1 = \the \Umathsubshiftdrop #1 \scan_stop: + \Umathsubshiftdown #1 = \the \Umathsubshiftdown #1 \scan_stop: + \Umathsupshiftdrop #1 = \the \Umathsupshiftdrop #1 \scan_stop: + \Umathsupshiftup #1 = \the \Umathsupshiftup #1 \scan_stop: + \Umathsubsupshiftdown #1 = \the \Umathsubsupshiftdown #1 \scan_stop: + \Umathsubtopmax #1 = \the \Umathsubtopmax #1 \scan_stop: + \Umathsupbottommin #1 = \the \Umathsupbottommin #1 \scan_stop: + \Umathsupsubbottommax #1 = \the \Umathsupsubbottommax #1 \scan_stop: + \Umathsubsupvgap #1 = \the \Umathsubsupvgap #1 \scan_stop: + \Umathspaceafterscript #1 = \the \Umathspaceafterscript #1 \scan_stop: + \Umathconnectoroverlapmin #1 = \the \Umathconnectoroverlapmin #1 \scan_stop: } %%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> @@ -1613,7 +1639,7 @@ } \cs_new:Nn \__um_range_init: { - \int_incr:N \g__um_fam_int + \int_gincr:N \g__um_fam_int \tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int} \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn @@ -2128,7 +2154,7 @@ } \cs_new:Nn \__um_mathmap_noparse:nnn { - \tl_put_right:cx { __um_switchto_#1: } + \tl_gput_right:cx { g__um_switchto_#1_tl } { \__um_set_mathcode:nnnn {#2} {\mathalpha} {\l__um_symfont_label_tl} {#3} } @@ -2224,7 +2250,7 @@ \mode_if_math:F { \exp_args:Nc \non@alpherr {sym#1} } \tl_set:Nn \l__um_mathstyle_tl {#1} } - \exp_not:c {__um_switchto_#1:} + \__um_switch_to:n {#1} \__um_mathgroup_set:n {-1} \__um_group_end:n } @@ -2232,7 +2258,12 @@ \cs_set:Nn \__um_init_alphabet:n { \__um_log:nx {alph-initialise} {#1} - \cs_set_eq:cN {__um_switchto_#1:} \prg_do_nothing: + \tl_gclear_new:c {g__um_switchto_#1_tl} + \cs_set_protected:cpn {__um_switchto_#1:} { \tl_use:c {g__um_switchto_#1_tl} } + } +\cs_new_protected:Nn \__um_switch_to:n + { + \tl_use:c {g__um_switchto_#1_tl} } \cs_new:Nn \__um_default_mathalph:nnn { @@ -3481,13 +3512,56 @@ \__um_setup_active_superscript:nn {"207C} {=} \__um_setup_active_superscript:nn {"207D} {(} \__um_setup_active_superscript:nn {"207E} {)} -\__um_setup_active_superscript:nn {"2071} {i} -\__um_setup_active_superscript:nn {"207F} {n} +\__um_setup_active_superscript:nn {"1D2C} {A} +\__um_setup_active_superscript:nn {"1D2E} {B} +\__um_setup_active_superscript:nn {"1D30} {D} +\__um_setup_active_superscript:nn {"1D31} {E} +\__um_setup_active_superscript:nn {"1D33} {G} +\__um_setup_active_superscript:nn {"1D34} {H} +\__um_setup_active_superscript:nn {"1D35} {I} +\__um_setup_active_superscript:nn {"1D36} {J} +\__um_setup_active_superscript:nn {"1D37} {K} +\__um_setup_active_superscript:nn {"1D38} {L} +\__um_setup_active_superscript:nn {"1D39} {M} +\__um_setup_active_superscript:nn {"1D3A} {N} +\__um_setup_active_superscript:nn {"1D3C} {O} +\__um_setup_active_superscript:nn {"1D3E} {P} +\__um_setup_active_superscript:nn {"1D3F} {R} +\__um_setup_active_superscript:nn {"1D40} {T} +\__um_setup_active_superscript:nn {"1D41} {U} +\__um_setup_active_superscript:nn {"2C7D} {V} +\__um_setup_active_superscript:nn {"1D42} {W} +\__um_setup_active_superscript:nn {"1D43} {a} +\__um_setup_active_superscript:nn {"1D47} {b} +\__um_setup_active_superscript:nn {"1D9C} {c} +\__um_setup_active_superscript:nn {"1D48} {d} +\__um_setup_active_superscript:nn {"1D49} {e} +\__um_setup_active_superscript:nn {"1DA0} {f} +\__um_setup_active_superscript:nn {"1D4D} {g} \__um_setup_active_superscript:nn {"02B0} {h} +\__um_setup_active_superscript:nn {"2071} {i} \__um_setup_active_superscript:nn {"02B2} {j} +\__um_setup_active_superscript:nn {"1D4F} {k} +\__um_setup_active_superscript:nn {"02E1} {l} +\__um_setup_active_superscript:nn {"1D50} {m} +\__um_setup_active_superscript:nn {"207F} {n} +\__um_setup_active_superscript:nn {"1D52} {o} +\__um_setup_active_superscript:nn {"1D56} {p} \__um_setup_active_superscript:nn {"02B3} {r} +\__um_setup_active_superscript:nn {"02E2} {s} +\__um_setup_active_superscript:nn {"1D57} {t} +\__um_setup_active_superscript:nn {"1D58} {u} +\__um_setup_active_superscript:nn {"1D5B} {v} \__um_setup_active_superscript:nn {"02B7} {w} +\__um_setup_active_superscript:nn {"02E3} {x} \__um_setup_active_superscript:nn {"02B8} {y} +\__um_setup_active_superscript:nn {"1DBB} {z} +\__um_setup_active_superscript:nn {"1D5D} {\beta} +\__um_setup_active_superscript:nn {"1D5E} {\gamma} +\__um_setup_active_superscript:nn {"1D5F} {\delta} +\__um_setup_active_superscript:nn {"1D60} {\phi} +\__um_setup_active_superscript:nn {"1D61} {\chi} +\__um_setup_active_superscript:nn {"1DBF} {\theta} \__um_setup_active_subscript:nn {"2080} {0} \__um_setup_active_subscript:nn {"2081} {1} \__um_setup_active_subscript:nn {"2082} {2} @@ -3558,7 +3632,7 @@ } \AtEndOfPackageFile * {url} { - \tl_put_left:Nn \Url@FormatString { \__um_switchto_up: } + \tl_put_left:Nn \Url@FormatString { \__um_switch_to:n {up} } \tl_put_right:Nn \UrlSpecials { \do \` { \mathchar`\` } @@ -3654,7 +3728,7 @@ && \int_compare_p:nNn { \leftroot@ } = { \c_zero } } { - \Uroot \l__um_radical_sqrt_tl { #1 } { #2 } + \Uroot \c__um_radical_sqrt_tl { #1 } { #2 } } { \hbox_set:Nn \rootbox @@ -3692,7 +3766,7 @@ #1 \mskip \uproot@ mu \c_math_toggle_token } - \Uroot \l__um_radical_sqrt_tl + \Uroot \c__um_radical_sqrt_tl { \box_move_up:nn { \box_wd:N \l_tmpa_box } { @@ -3713,7 +3787,7 @@ %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Assorted definitions to close up. -\AtBeginDocument { \__um_resolve_greek: } +\AtBeginDocument { \debug_suspend: \__um_resolve_greek: \debug_resume: } \cs_new:Npn \__um_resolve_greek: { \clist_map_inline:nn @@ -3735,7 +3809,7 @@ { \cs_set:Npn \root ##1 \of ##2 { - \Uroot \l__um_radical_sqrt_tl { ##1 } { ##2 } + \Uroot \c__um_radical_sqrt_tl { ##1 } { ##2 } } } \cs_new:Nn \__um_which_frac:nn diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty index 31c4df21812..d6abb5d6d70 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty @@ -43,7 +43,7 @@ %%^^A%% Metadata for the package code, including files and versioning \ProvidesExplPackage{unicode-math-xetex} - {2018/02/02} {v0.8l} {Unicode maths in XeLaTeX and LuaLaTeX} + {2018/07/29} {v0.8m} {Unicode maths in XeLaTeX and LuaLaTeX} %%^^A%% um-code-opening.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Assorted initialisation tasks, including some low-level function definitions. @@ -172,7 +172,7 @@ %%^^A%% um-code-variables.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Declaration of all code-level variables used in the package. -\bool_new:N \l__um_ot_math_bool +\bool_new:N \g__um_ot_math_bool \bool_new:N \g__um_main_font_defined_bool \bool_new:N \l__um_init_bool \bool_new:N \l__um_implicit_alph_bool @@ -208,16 +208,28 @@ \tl_const:Nn \c__um_math_alphabet_name_Greek_tl {Greek,~uppercase} \tl_const:Nn \c__um_math_alphabet_name_num_tl {Numerals} \tl_const:Nn \c__um_math_alphabet_name_misc_tl {Misc.} +\tl_new:N \l__um_style_tl +\tl_new:N \l__um_family_tl +\tl_new:N \l__um_alphabet_tl +\tl_new:N \l__um_fontname_tl +\tl_new:N \l__um_symfont_label_tl +\tl_new:N \l__um_remap_style_tl +\tl_new:N \l__um_fam_two_tl +\tl_new:N \l__um_fam_three_tl +\tl_new:N \l__um_curr_named_slot +\tl_new:N \l__um_tmpa_tl \tl_new:N \l__um_mathstyle_tl \tl_new:N \l__um_radicals_tl \tl_new:N \l__um_nolimits_tl +\tl_new:N \l__um_trial_family_tl \tl_new:N \g__um_operator_mathfont_tl \tl_new:N \g__um_slash_delimiter_usv +\tl_new:N \g__um_mathparam_settings_tl \tl_new:N \g__um_mathtable_tl \tl_new:N \g__um_fontname_tl \tl_new:N \g__um_mversion_tl \tl_new:N \g__um_symfont_tl -\tl_new:N \g__um_font_keyval_tl +\tl_new:N \l__um_font_keyval_tl \tl_new:N \g__um_family_tl \tl_new:N \g__um_style_tl \tl_new:N \g__um_remap_style_tl @@ -228,16 +240,20 @@ \clist_new:N \g__um_char_nrange_clist \clist_new:N \g__um_unknown_keys_clist \clist_new:N \g__um_alphabet_clist +\clist_new:N \l__um_mathmap_charints_clist +\clist_new:N \l__um_unknown_keys_clist +\clist_new:N \l__um_font_keyval_clist +\clist_new:N \l__um_alphabet_clist \clist_new:N \g__um_bad_alpha_clist -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} } -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} } -\clist_put_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {sf} } +\clist_gput_right:Nx \g__um_bad_alpha_clist { \tl_to_str:n {bfsf} } \seq_new:N \l__um_missing_alph_seq \seq_new:N \g__um_mathalph_seq \seq_new:N \g__um_char_range_seq \seq_new:N \g__um_mclass_range_seq \seq_new:N \g__um_mathclasses_seq -\seq_set_from_clist:Nn \g__um_mathclasses_seq +\seq_gset_from_clist:Nn \g__um_mathclasses_seq { \mathord,\mathalpha,\mathbin,\mathrel,\mathpunct, \mathop, @@ -278,7 +294,7 @@ \@onlypreamble \setmathfontface \NewDocumentCommand \setoperatorfont {m} { - \tl_set:Nn \g__um_operator_mathfont_tl {#1} + \tl_gset:Nn \g__um_operator_mathfont_tl {#1} } \setoperatorfont{\mathrm} \NewDocumentCommand \addnolimits {m} @@ -319,66 +335,66 @@ } \__um_keys_choices:nn {mathup} { - {sym} { \bool_set_false:N \g__um_mathrm_text_bool } - {text} { \bool_set_true:N \g__um_mathrm_text_bool } + {sym} { \bool_gset_false:N \g__um_mathrm_text_bool } + {text} { \bool_gset_true:N \g__um_mathrm_text_bool } } \__um_keys_choices:nn {mathrm} { - {sym} { \bool_set_false:N \g__um_mathrm_text_bool } - {text} { \bool_set_true:N \g__um_mathrm_text_bool } + {sym} { \bool_gset_false:N \g__um_mathrm_text_bool } + {text} { \bool_gset_true:N \g__um_mathrm_text_bool } } \__um_keys_choices:nn {mathit} { - {sym} { \bool_set_false:N \g__um_mathit_text_bool } - {text} { \bool_set_true:N \g__um_mathit_text_bool } + {sym} { \bool_gset_false:N \g__um_mathit_text_bool } + {text} { \bool_gset_true:N \g__um_mathit_text_bool } } \__um_keys_choices:nn {mathbf} { - {sym} { \bool_set_false:N \g__um_mathbf_text_bool } - {text} { \bool_set_true:N \g__um_mathbf_text_bool } + {sym} { \bool_gset_false:N \g__um_mathbf_text_bool } + {text} { \bool_gset_true:N \g__um_mathbf_text_bool } } \__um_keys_choices:nn {mathsf} { - {sym} { \bool_set_false:N \g__um_mathsf_text_bool } - {text} { \bool_set_true:N \g__um_mathsf_text_bool } + {sym} { \bool_gset_false:N \g__um_mathsf_text_bool } + {text} { \bool_gset_true:N \g__um_mathsf_text_bool } } \__um_keys_choices:nn {mathtt} { - {sym} { \bool_set_false:N \g__um_mathtt_text_bool } - {text} { \bool_set_true:N \g__um_mathtt_text_bool } + {sym} { \bool_gset_false:N \g__um_mathtt_text_bool } + {text} { \bool_gset_true:N \g__um_mathtt_text_bool } } \__um_keys_choices:nn {normal-style} { {ISO} { - \bool_set_false:N \g__um_literal_bool - \bool_set_false:N \g__um_upGreek_bool - \bool_set_false:N \g__um_upgreek_bool - \bool_set_false:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_false:N \g__um_upGreek_bool + \bool_gset_false:N \g__um_upgreek_bool + \bool_gset_false:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {TeX} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_false:N \g__um_upgreek_bool - \bool_set_false:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_false:N \g__um_upgreek_bool + \bool_gset_false:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {french} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_true:N \g__um_upgreek_bool - \bool_set_true:N \g__um_upLatin_bool - \bool_set_false:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_true:N \g__um_upgreek_bool + \bool_gset_true:N \g__um_upLatin_bool + \bool_gset_false:N \g__um_uplatin_bool } {upright} { - \bool_set_false:N \g__um_literal_bool - \bool_set_true:N \g__um_upGreek_bool - \bool_set_true:N \g__um_upgreek_bool - \bool_set_true:N \g__um_upLatin_bool - \bool_set_true:N \g__um_uplatin_bool + \bool_gset_false:N \g__um_literal_bool + \bool_gset_true:N \g__um_upGreek_bool + \bool_gset_true:N \g__um_upgreek_bool + \bool_gset_true:N \g__um_upLatin_bool + \bool_gset_true:N \g__um_uplatin_bool } {literal} { - \bool_set_true:N \g__um_literal_bool + \bool_gset_true:N \g__um_literal_bool } } \__um_keys_choices:nn {math-style} @@ -407,74 +423,74 @@ \__um_keys_choices:nn {bold-style} { {ISO} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_false:N \g__um_bfupGreek_bool - \bool_set_false:N \g__um_bfupgreek_bool - \bool_set_false:N \g__um_bfupLatin_bool - \bool_set_false:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_false:N \g__um_bfupGreek_bool + \bool_gset_false:N \g__um_bfupgreek_bool + \bool_gset_false:N \g__um_bfupLatin_bool + \bool_gset_false:N \g__um_bfuplatin_bool } {TeX} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_true:N \g__um_bfupGreek_bool - \bool_set_false:N \g__um_bfupgreek_bool - \bool_set_true:N \g__um_bfupLatin_bool - \bool_set_true:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfupGreek_bool + \bool_gset_false:N \g__um_bfupgreek_bool + \bool_gset_true:N \g__um_bfupLatin_bool + \bool_gset_true:N \g__um_bfuplatin_bool } {upright} { - \bool_set_false:N \g__um_bfliteral_bool - \bool_set_true:N \g__um_bfupGreek_bool - \bool_set_true:N \g__um_bfupgreek_bool - \bool_set_true:N \g__um_bfupLatin_bool - \bool_set_true:N \g__um_bfuplatin_bool + \bool_gset_false:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfupGreek_bool + \bool_gset_true:N \g__um_bfupgreek_bool + \bool_gset_true:N \g__um_bfupLatin_bool + \bool_gset_true:N \g__um_bfuplatin_bool } {literal} { - \bool_set_true:N \g__um_bfliteral_bool + \bool_gset_true:N \g__um_bfliteral_bool } } \__um_keys_choices:nn {sans-style} { - {italic} { \bool_set_false:N \g__um_upsans_bool } - {upright} { \bool_set_true:N \g__um_upsans_bool } - {literal} { \bool_set_true:N \g__um_sfliteral_bool } + {italic} { \bool_gset_false:N \g__um_upsans_bool } + {upright} { \bool_gset_true:N \g__um_upsans_bool } + {literal} { \bool_gset_true:N \g__um_sfliteral_bool } } \__um_keys_choices:nn {nabla} { {upright} { - \bool_set_false:N \g__um_literal_Nabla_bool - \bool_set_true:N \g__um_upNabla_bool + \bool_gset_false:N \g__um_literal_Nabla_bool + \bool_gset_true:N \g__um_upNabla_bool } {italic} { - \bool_set_false:N \g__um_literal_Nabla_bool - \bool_set_false:N \g__um_upNabla_bool + \bool_gset_false:N \g__um_literal_Nabla_bool + \bool_gset_false:N \g__um_upNabla_bool } {literal} { - \bool_set_true:N \g__um_literal_Nabla_bool + \bool_gset_true:N \g__um_literal_Nabla_bool } } \__um_keys_choices:nn {partial} { {upright} { - \bool_set_false:N \g__um_literal_partial_bool - \bool_set_true:N \g__um_uppartial_bool + \bool_gset_false:N \g__um_literal_partial_bool + \bool_gset_true:N \g__um_uppartial_bool } {italic} { - \bool_set_false:N \g__um_literal_partial_bool - \bool_set_false:N \g__um_uppartial_bool + \bool_gset_false:N \g__um_literal_partial_bool + \bool_gset_false:N \g__um_uppartial_bool } {literal} { - \bool_set_true:N \g__um_literal_partial_bool + \bool_gset_true:N \g__um_literal_partial_bool } } \__um_keys_choices:nn {colon} { - {literal} { \bool_set_true:N \g__um_literal_colon_bool } - {TeX} { \bool_set_false:N \g__um_literal_colon_bool } + {literal} { \bool_gset_true:N \g__um_literal_colon_bool } + {TeX} { \bool_gset_false:N \g__um_literal_colon_bool } } \__um_keys_choices:nn {slash-delimiter} { - {ascii} { \tl_set:Nn \g__um_slash_delimiter_usv {"002F} } - {frac} { \tl_set:Nn \g__um_slash_delimiter_usv {"2044} } - {div} { \tl_set:Nn \g__um_slash_delimiter_usv {"2215} } + {ascii} { \tl_gset:Nn \g__um_slash_delimiter_usv {"002F} } + {frac} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2044} } + {div} { \tl_gset:Nn \g__um_slash_delimiter_usv {"2215} } } \__um_keys_choices:nn {active-frac} { @@ -886,7 +902,7 @@ \exp_not:n { \__um_sym:nnn {##1} {##2} {##3} } } } -\tl_set_from_file_x:Nnn \g__um_mathtable_tl {\__um_symbol_setup:} {unicode-math-table.tex} +\tl_gset_from_file_x:Nnn \g__um_mathtable_tl {\__um_symbol_setup:} {unicode-math-table.tex} \cs_new:Nn \__um_input_math_symbol_table: {\g__um_mathtable_tl} \AtBeginDocument{\__um_define_math_chars:} \cs_new:Nn \__um_define_math_chars: @@ -967,9 +983,19 @@ { \tl_if_in:NnTF \l__um_radicals_tl {#2} { - \cs_gset_protected_nopar:cpx {\cs_to_str:N #2 sign} - { \__um_radical:nn {#1} {#3} } - \tl_set:cn {l__um_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + \cs_if_exist:NF #2 + { + %% todo: check if the check is necessary + \cs_gset_protected_nopar:Npx #2 { \exp_not:c { \cs_to_str:N #2 sign } } + } + \cs_gset_protected_nopar:cpx { \cs_to_str:N #2 sign } + { + \__um_radical:nn {#1} {#3} + } + \tl_if_exist:cF {c__um_radical_\cs_to_str:N #2_tl} + { + \tl_const:cn {c__um_radical_\cs_to_str:N #2_tl} {\use:c{sym #1}~ #3} + } } { \__um_set_delcode:nnn {#1} {#3} {#3} @@ -1037,22 +1063,22 @@ % integrate with fontspec's \setmathrm etc: \tl_case:Nn #1 { - \mathrm { \cs_set_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } - \mathsf { \cs_set_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } - \mathtt { \cs_set_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } + \mathrm { \cs_gset_eq:NN \g__fontspec_mathrm_tl \l__um_tmpa_tl } + \mathsf { \cs_gset_eq:NN \g__fontspec_mathsf_tl \l__um_tmpa_tl } + \mathtt { \cs_gset_eq:NN \g__fontspec_mathtt_tl \l__um_tmpa_tl } } } \cs_set:Npn \use@mathgroup #1 #2 { - \__um_group_begin: + \math@bgroup \cs_if_eq:cNF {M@\f@encoding} #1 {#1} - \__um_switchto_literal: + \__um_switch_to:n {literal} \__um_mathgroup_set:n {#2} - \__um_group_end:n + \math@egroup } \cs_set:Npn \operator@font { - \__um_switchto_literal: + \__um_switch_to:n {literal} \__um_fontswitch:n { \g__um_operator_mathfont_tl } } \cs_set:Nn \__um_fontswitch:n @@ -1182,7 +1208,7 @@ \cs_new:Nn \__um_init:n { \tl_set:Nn \l__um_fontname_tl {#1} - \bool_set_true:N \l__um_ot_math_bool + \bool_gset_true:N \g__um_ot_math_bool \tl_set:Nn \l__um_mversion_tl {normal} \tl_set:Nn \l__um_symfont_label_tl {operators} @@ -1229,8 +1255,8 @@ \exp_last_unbraced:NNo \__um_fontface_gset_eq:NN \g__um_trial_font \font@name \fontspec_if_script:nF {math} { - \bool_gset_false:N \l__um_ot_math_bool - \bool_gset_false:N \l__um_init_bool + \bool_gset_false:N \g__um_ot_math_bool + \bool_gset_false:N \g__um_init_bool } \group_end: @@ -1276,14 +1302,14 @@ } \fontspec_if_script:nF {math} { - \bool_gset_false:N \l__um_ot_math_bool - \bool_gset_false:N \l__um_init_bool + \bool_gset_false:N \g__um_ot_math_bool + \bool_gset_false:N \g__um_init_bool } \group_end: } -\tl_set:Nn \g__um_main_font_cmd_tl { \l__um_font } -\tl_set:Nn \g__um_sqrt_font_cmd_tl { \l__um_font } -\tl_set:Nn \g__um_prime_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_main_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_sqrt_font_cmd_tl { \l__um_font } +\tl_gset:Nn \g__um_prime_font_cmd_tl { \l__um_font } \cs_new:Nn \__um_setup_math_fam: { \cs_if_exist:cF { sym \l__um_symfont_label_tl } @@ -1471,7 +1497,7 @@ \scpolint\npolint\pointint\sqint\intlarhk\intx \intcap\intcup\upint\lowint } -\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision} +\tl_set:Nn \l__um_radicals_tl {\sqrt \longdivision \cuberoot \fourthroot} %%^^A%% um-code-fontopt.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Keyval for `\setmathfont` @@ -1514,7 +1540,7 @@ } \cs_new:Nn \__um_range_init: { - \int_incr:N \g__um_fam_int + \int_gincr:N \g__um_fam_int \tl_set:Nx \l__um_symfont_label_tl {__um_fam\int_use:N\g__um_fam_int} \cs_set_eq:NN \__um_sym:nnn \__um_process_symbol_parse:nnn \cs_set_eq:NN \__um_remap_symbol:nnn \__um_remap_symbol_parse:nnn @@ -2057,7 +2083,7 @@ } \cs_new:Nn \__um_mathmap_noparse:nnn { - \tl_put_right:cx { __um_switchto_#1: } + \tl_gput_right:cx { g__um_switchto_#1_tl } { \__um_set_mathcode:nnnn {#2} {\mathalpha} {\l__um_symfont_label_tl} {#3} } @@ -2153,7 +2179,7 @@ \mode_if_math:F { \exp_args:Nc \non@alpherr {sym#1} } \tl_set:Nn \l__um_mathstyle_tl {#1} } - \exp_not:c {__um_switchto_#1:} + \__um_switch_to:n {#1} \__um_mathgroup_set:n {-1} \__um_group_end:n } @@ -2161,7 +2187,12 @@ \cs_set:Nn \__um_init_alphabet:n { \__um_log:nx {alph-initialise} {#1} - \cs_set_eq:cN {__um_switchto_#1:} \prg_do_nothing: + \tl_gclear_new:c {g__um_switchto_#1_tl} + \cs_set_protected:cpn {__um_switchto_#1:} { \tl_use:c {g__um_switchto_#1_tl} } + } +\cs_new_protected:Nn \__um_switch_to:n + { + \tl_use:c {g__um_switchto_#1_tl} } \cs_new:Nn \__um_default_mathalph:nnn { @@ -3410,13 +3441,56 @@ \__um_setup_active_superscript:nn {"207C} {=} \__um_setup_active_superscript:nn {"207D} {(} \__um_setup_active_superscript:nn {"207E} {)} -\__um_setup_active_superscript:nn {"2071} {i} -\__um_setup_active_superscript:nn {"207F} {n} +\__um_setup_active_superscript:nn {"1D2C} {A} +\__um_setup_active_superscript:nn {"1D2E} {B} +\__um_setup_active_superscript:nn {"1D30} {D} +\__um_setup_active_superscript:nn {"1D31} {E} +\__um_setup_active_superscript:nn {"1D33} {G} +\__um_setup_active_superscript:nn {"1D34} {H} +\__um_setup_active_superscript:nn {"1D35} {I} +\__um_setup_active_superscript:nn {"1D36} {J} +\__um_setup_active_superscript:nn {"1D37} {K} +\__um_setup_active_superscript:nn {"1D38} {L} +\__um_setup_active_superscript:nn {"1D39} {M} +\__um_setup_active_superscript:nn {"1D3A} {N} +\__um_setup_active_superscript:nn {"1D3C} {O} +\__um_setup_active_superscript:nn {"1D3E} {P} +\__um_setup_active_superscript:nn {"1D3F} {R} +\__um_setup_active_superscript:nn {"1D40} {T} +\__um_setup_active_superscript:nn {"1D41} {U} +\__um_setup_active_superscript:nn {"2C7D} {V} +\__um_setup_active_superscript:nn {"1D42} {W} +\__um_setup_active_superscript:nn {"1D43} {a} +\__um_setup_active_superscript:nn {"1D47} {b} +\__um_setup_active_superscript:nn {"1D9C} {c} +\__um_setup_active_superscript:nn {"1D48} {d} +\__um_setup_active_superscript:nn {"1D49} {e} +\__um_setup_active_superscript:nn {"1DA0} {f} +\__um_setup_active_superscript:nn {"1D4D} {g} \__um_setup_active_superscript:nn {"02B0} {h} +\__um_setup_active_superscript:nn {"2071} {i} \__um_setup_active_superscript:nn {"02B2} {j} +\__um_setup_active_superscript:nn {"1D4F} {k} +\__um_setup_active_superscript:nn {"02E1} {l} +\__um_setup_active_superscript:nn {"1D50} {m} +\__um_setup_active_superscript:nn {"207F} {n} +\__um_setup_active_superscript:nn {"1D52} {o} +\__um_setup_active_superscript:nn {"1D56} {p} \__um_setup_active_superscript:nn {"02B3} {r} +\__um_setup_active_superscript:nn {"02E2} {s} +\__um_setup_active_superscript:nn {"1D57} {t} +\__um_setup_active_superscript:nn {"1D58} {u} +\__um_setup_active_superscript:nn {"1D5B} {v} \__um_setup_active_superscript:nn {"02B7} {w} +\__um_setup_active_superscript:nn {"02E3} {x} \__um_setup_active_superscript:nn {"02B8} {y} +\__um_setup_active_superscript:nn {"1DBB} {z} +\__um_setup_active_superscript:nn {"1D5D} {\beta} +\__um_setup_active_superscript:nn {"1D5E} {\gamma} +\__um_setup_active_superscript:nn {"1D5F} {\delta} +\__um_setup_active_superscript:nn {"1D60} {\phi} +\__um_setup_active_superscript:nn {"1D61} {\chi} +\__um_setup_active_superscript:nn {"1DBF} {\theta} \__um_setup_active_subscript:nn {"2080} {0} \__um_setup_active_subscript:nn {"2081} {1} \__um_setup_active_subscript:nn {"2082} {2} @@ -3487,7 +3561,7 @@ } \AtEndOfPackageFile * {url} { - \tl_put_left:Nn \Url@FormatString { \__um_switchto_up: } + \tl_put_left:Nn \Url@FormatString { \__um_switch_to:n {up} } \tl_put_right:Nn \UrlSpecials { \do \` { \mathchar`\` } @@ -3695,7 +3769,7 @@ %%^^A%% um-code-epilogue.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Assorted definitions to close up. -\AtBeginDocument { \__um_resolve_greek: } +\AtBeginDocument { \debug_suspend: \__um_resolve_greek: \debug_resume: } \cs_new:Npn \__um_resolve_greek: { \clist_map_inline:nn diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty index 1d111d77bd6..8f9e1fea54b 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -24,7 +24,7 @@ \RequirePackage{expl3} \ProvidesExplPackage{unicode-math} - {2018/02/02} {v0.8l} {Unicode maths in XeLaTeX and LuaLaTeX} + {2018/07/29} {v0.8m} {Unicode maths in XeLaTeX and LuaLaTeX} \sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } \sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } \sys_if_engine_pdftex:T |