diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty | 39 |
1 files changed, 27 insertions, 12 deletions
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 dc8c72ececc..795c8fcc246 100644 --- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty +++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty @@ -15,7 +15,7 @@ %% %% This work is "author-maintained" by Will Robertson. \ProvidesPackage{unicode-math} - [2010/07/14 v0.5a Unicode maths in XeLaTeX] + [2010/09/19 v0.5b Unicode maths in XeLaTeX and LuaLaTeX] \usepackage{ifxetex,ifluatex} \ifxetex\else\ifluatex\else \PackageError{unicode-math}{% @@ -820,7 +820,7 @@ \group_begin: \char_make_active:n {#3} \char_gmake_mathactive:n {#3} - \um@scanactivedef #3 \@nil { \csname\cs_to_str:N #2 _sym\endcsname } + \um_active_char_set:wc #3 \q_nil { \cs_to_str:N #2 _sym } \group_end: \um_set_mathchar:cNnn {\cs_to_str:N #2 op} \mathop {#1} {#3} \cs_gset:cpx { \cs_to_str:N #2 _sym } { @@ -2102,7 +2102,7 @@ \cs_new:Npn \um_input_math_symbol_table: {\g_um_mathtable_tl} \begingroup \char_make_other:N \^ - \cs_gset:Npn \um@scancharlet#1="#2\@nil { + \cs_gset:Npn \um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil { \lowercase{ \tl_rescan:nn { \char_make_other:N \{ @@ -2115,13 +2115,14 @@ } } } - \gdef\um@scanactivedef"#1\@nil#2{ - \lowercase{ - \tl_rescan:nn{ - \ExplSyntaxOn - \char_make_math_superscript:N\^ + \cs_gnew:Npn \um_active_char_set:wc "#1 \q_nil #2 { + \lowercase { + \tl_rescan:nn { + \catcode`\_=11\relax + \catcode`\:=11\relax + \catcode`\^=7\relax }{ - \global\def^^^^^#1{#2} + \protected\gdef^^^^^#1{\csname #2\endcsname}% } } } @@ -2135,7 +2136,7 @@ \cs_if_eq_p:NN #3 \mathclose || \cs_if_eq_p:NN #3 \mathover || \cs_if_eq_p:NN #3 \mathunder } { - \um@scancharlet#2=#1\@nil\ignorespaces + \um_cs_set_eq_active_char:Nw #2 = #1 \q_nil \ignorespaces } } \char_make_other:N \# @@ -2348,7 +2349,7 @@ } \group_end: \luatex_if_engine:T { - \DeclareDocumentCommand \sqrt { O{} m } { + \RenewDocumentCommand \sqrt { O{} m } { \luatexUroot \l_um_radical_sqrt_tl {#1} {#2} } \cs_set:Npn \root #1 \of #2 { @@ -2496,7 +2497,8 @@ \char_make_active:N #1 \char_gmake_mathactive:N #1 \tl_rescan:nn { - \ExplSyntaxOn + \catcode`\_=11\relax + \catcode`\:=11\relax }{ \cs_gset:Npx #1 { \bool_if:NTF \l_um_smallfrac_bool {\exp_not:N\tfrac} {\exp_not:N\frac} @@ -2539,6 +2541,12 @@ \def\bullet{\smblkcircle} \def\mathyen{\yen} \def\mathsterling{\sterling} +\def\diamond{\smwhtdiamond} +\def\emptyset{\varnothing} +\def\hbar{\hslash} +\def\backepsilon{\upbackepsilon} +\def\eth{\matheth} +\def\smallint{{\textstyle\int}\limits} \@ifpackageloaded{amsmath}{ % define their own colon, perhaps I should just steal it. (It does look much better.) }{ @@ -2548,6 +2556,9 @@ } \def\mathrm{\mathup} \let\mathfence\mathord +\luatex_if_engine:T { + \cs_set:Npn \overline {\pdfprimitive\overline} +} \def\digamma{\updigamma} \def\Digamma{\upDigamma} \def\operator@font{\um_switchto_mathup:} @@ -2601,6 +2612,10 @@ \def\widehat{\hat} \def\widetilde{\tilde} } +\cs_set_eq:NN \um_text_slash: \slash +\cs_set:Npn \slash { + \mode_if_math:TF {\mathslash} {\um_text_slash:} +} \AtEndOfPackage{ \@ifclassloaded{beamer}{ \ifbeamer@suppressreplacements\else |