summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/unicode-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-28 16:02:56 +0000
committerKarl Berry <karl@freefriends.org>2010-09-28 16:02:56 +0000
commitda57eb4aaebcac1afd9b194915a995517b9972ef (patch)
tree3452cc5788be9d6a3a093f099665679a89e6c069 /Master/texmf-dist/tex/latex/unicode-math
parente5b88c7396aeb5edda9803a0b7d8d489aab5e65f (diff)
unicode-math (28sep10)
git-svn-id: svn://tug.org/texlive/trunk@19934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/unicode-math')
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty42
1 files changed, 25 insertions, 17 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 795c8fcc246..00941ab020c 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/09/19 v0.5b Unicode maths in XeLaTeX and LuaLaTeX]
+ [2010/09/27 v0.5b Unicode maths in XeLaTeX and LuaLaTeX]
\usepackage{ifxetex,ifluatex}
\ifxetex\else\ifluatex\else
\PackageError{unicode-math}{%
@@ -49,6 +49,7 @@
\bool_new:N \l_um_ot_math_bool
\bool_new:N \l_um_init_bool
\bool_new:N \l_um_implicit_alph_bool
+\bool_new:N \g_um_mainfont_set_bool
\bool_new:N \g_um_literal_bool
\bool_new:N \g_um_upLatin_bool
\bool_new:N \g_um_uplatin_bool
@@ -885,16 +886,12 @@
\tl_set:Nn \l_um_sscript_font_tl {#2}
\keys_set:nn {unicode-math} {#1}
\um_fontspec_select_font:n {#2}
-%% \ifdim \dimexpr\fontdimen9\l_um_font*65536\relax =65pt\relax
-%% \bool_set_true:N \l_um_ot_math_bool
-%% \else
-%% \bool_set_false:N \l_um_ot_math_bool
-%% \PackageWarningNoLine{unicode-math}{
-%% The~ font~ '#2' ~is~ not~ a~ valid~ OpenType~ maths~ font.~
-%% Some~ maths~ features~ will~ not~ be~ available~ or~ behave~
-%% in~ a~ substandard~ manner
-%% }
-%% \fi
+ \group_begin:
+ \fontfamily{\zf@family}\selectfont
+ \fontspec_if_script:nTF {math}
+ {\bool_gset_true:N \l_um_ot_math_bool}
+ {\bool_gset_false:N \l_um_ot_math_bool}
+ \group_end:
\bool_if:NTF \l_um_init_bool {
\tl_set:Nn \um_symfont_tl {um_allsym}
\msg_trace:nnx {unicode-math} {default-math-font} {#2}
@@ -916,6 +913,13 @@
}
\DeclareSymbolFont{\um_symfont_tl}
{\encodingdefault}{\zf@family}{\mddefault}{\updefault}
+ \bool_if:nT {\l_um_ot_math_bool && !\g_um_mainfont_set_bool} {
+ \bool_set_true:N \g_um_mainfont_set_bool
+ \DeclareSymbolFont{symbols}
+ {\encodingdefault}{\zf@family}{\mddefault}{\updefault}
+ \DeclareSymbolFont{largesymbols}
+ {\encodingdefault}{\zf@family}{\mddefault}{\updefault}
+ }
\um_input_math_symbol_table:
\um_remap_symbols:
\um_setup_mathactives:
@@ -923,6 +927,10 @@
\um_setup_alphabets:
\ignorespaces
}
+\DeclareDocumentCommand \resetmathfont { O{} m } {
+ \bool_set_false:N \g_um_mainfont_set_bool
+ \setmathfont[#1]{#2}
+}
\cs_new:Npn \um_fontspec_select_font:n #1 {
\bool_set_true:N \l_um_fontspec_feature_bool
\fontspec_select:xn
@@ -1059,11 +1067,11 @@
}
}
\xetex_or_luatex:nnn { \um@zf@feature {ScriptStyle} }
- { \zf@update@ff{+ssty=0} }
- { \zf@update@ff{+ssty=1} }
+ { \fontspec_update_featstr:n {+ssty=0} }
+ { \fontspec_update_featstr:n {+ssty=1} }
\xetex_or_luatex:nnn { \um@zf@feature {ScriptScriptStyle} }
- { \zf@update@ff{+ssty=1} }
- { \zf@update@ff{+ssty=2} }
+ { \fontspec_update_featstr:n {+ssty=1} }
+ { \fontspec_update_featstr:n {+ssty=2} }
\keys_define:nn {unicode-math}
{
script-features .tl_set:N = \l_um_script_features_tl ,
@@ -1296,7 +1304,7 @@
}
\clist_map_inline:nn {#2} {
\cs_if_exist:cT {um_config_ \l_um_style_tl _##1:n} {
- \tl_if_eq:nnTF {##1}{misc} {
+ \str_if_eq:nnTF {##1}{misc} {
\um_maybe_init_alphabet:V \l_um_style_tl
\clist_map_break:
}{
@@ -1309,7 +1317,7 @@
}
\clist_map_inline:nn {#2} {
\cs_if_exist:cT {um_config_ \l_um_style_tl _##1:n} {
- \tl_if_eq:nnTF {##1}{misc} {
+ \str_if_eq:nnTF {##1}{misc} {
\um_trace:nx {setup-alph} {math \l_um_style_tl~(##1)}
\use:c {um_config_ \l_um_style_tl _##1:n} {#3}
}{