summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
diff options
context:
space:
mode:
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.sty58
1 files changed, 53 insertions, 5 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 5071282d3dd..87163c8219e 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
@@ -17,7 +17,7 @@
%%
%% This work is "maintained" by Will Robertson.
\ProvidesPackage{unicode-math}
- [2013/05/04 v0.7e Unicode maths in XeLaTeX and LuaLaTeX]
+ [2014/06/30 v0.7f Unicode maths in XeLaTeX and LuaLaTeX]
\usepackage{ifxetex,ifluatex}
\ifxetex
\ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in%
@@ -46,6 +46,23 @@
\RequirePackage{catchfile}
\RequirePackage{fix-cm} % avoid some warnings
\RequirePackage{filehook}[2011/01/03]
+\def\@DeclareMathSizes #1#2#3#4#5{%
+ \@defaultunits\dimen@ #2pt\relax\@nnil
+ \if $#3$%
+ \expandafter\let\csname S@\strip@pt\dimen@\endcsname\math@fontsfalse
+ \else
+ \@defaultunits\dimen@ii #3pt\relax\@nnil
+ \@defaultunits\@tempdima #4pt\relax\@nnil
+ \@defaultunits\@tempdimb #5pt\relax\@nnil
+ \toks@{#1}%
+ \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
+ \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
+ \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
+ \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
+ \the\toks@
+ }%
+ \fi
+}
\ExplSyntaxOn
\cs_generate_variant:Nn \tl_put_right:Nn {cx}
\cs_generate_variant:Nn \seq_if_in:NnTF {NV}
@@ -57,6 +74,8 @@
\cs:w #3 \exp_after:wN \cs_end:
\cs:w #4 \cs_end:
}
+\cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx}
+\cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx}
\bool_new:N \l_um_ot_math_bool
\bool_new:N \l_um_init_bool
\bool_new:N \l_um_implicit_alph_bool
@@ -100,8 +119,37 @@
\cs_generate_variant:Nn \um_glyph_if_exist:nTF {c}
\cs_generate_variant:Nn \um_glyph_if_exist:nT {c}
\cs_generate_variant:Nn \um_glyph_if_exist:nF {c}
-\cs_generate_variant:Nn \fontspec_set_family:Nnn {Nx}
-\cs_generate_variant:Nn \fontspec_set_fontface:NNnn {NNx}
+\cs_set:Npn \um_set_mathcode:nnnn #1#2#3#4 {
+ \Umathcode \int_eval:n {#1} =
+ \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop:
+}
+\cs_set:Npn \um_set_mathcode:nnn #1#2#3 {
+ \Umathcode \int_eval:n {#1} =
+ \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#1} \scan_stop:
+}
+\cs_set:Npn \um_set_mathchar:NNnn #1#2#3#4 {
+ \Umathchardef #1 =
+ \mathchar@type#2 \csname sym#3\endcsname \int_eval:n {#4} \scan_stop:
+}
+\cs_new:Nn \um_set_delcode:nnn {
+ \Udelcode#2 = \csname sym#1\endcsname #3 \scan_stop:
+}
+\cs_new:Nn \um_radical:nn {
+ \Uradical \csname sym#1\endcsname #2 \scan_stop:
+}
+\cs_new:Nn \um_delimiter:Nnn {
+ \Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
+}
+\cs_new:Nn \um_accent:nnn {
+ \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop:
+}
+\cs_generate_variant:Nn \um_set_mathchar:NNnn {c}
+\cs_new:Nn \char_gmake_mathactive:N {
+ \global\mathcode `#1 = "8000 \scan_stop:
+}
+\cs_new:Nn \char_gmake_mathactive:n {
+ \global\mathcode #1 = "8000 \scan_stop:
+}
\DeclareDocumentCommand \unimathsetup {m}
{
\keys_set:nn {unicode-math} {#1}
@@ -325,11 +373,11 @@
}
\msg_new:nnn { unicode-math } { mathtools-overbracket } {
Using~ \token_to_str:N \overbracket\ and~
- \token_to_str:N \underbracke\ from~
+ \token_to_str:N \underbracket\ from~
`mathtools'~ package.\\
\\
Use~ \token_to_str:N \Uoverbracket\ and~
- \token_to_str:N \Uunderbracke\ for~
+ \token_to_str:N \Uunderbracket\ for~
original~ `unicode-math'~ definition.
}
\msg_new:nnn { unicode-math } { mathtools-colon } {