summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
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
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')
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/README7
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdfbin1930933 -> 1930974 bytes
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdfbin417808 -> 340981 bytes
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx59
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty42
5 files changed, 72 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/unicode-math/README b/Master/texmf-dist/doc/latex/unicode-math/README
index 51e3f726bfa..6170fea0c45 100644
--- a/Master/texmf-dist/doc/latex/unicode-math/README
+++ b/Master/texmf-dist/doc/latex/unicode-math/README
@@ -138,6 +138,13 @@ changes have not affected the standard behaviour.
CHANGE HISTORY
--------------
+- v0.5c (2010/09/27)
+
+ * Fix a long-standing bug in XeLaTeX in which the "master" math
+ families 2 and 3 weren't being set; hence fraction rules and many other
+ parameters were not being set correctly
+ * Stay in sync with internal fontspec changes
+
- v0.5b (2010/09/19): Tune-up
* Added missing symbols/synonyms:
diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdf
index 7b064ebea80..9ab71e8b798 100644
--- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdf
+++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf
index 2df87e0e3f4..f6d1936b8b6 100644
--- a/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf
+++ b/Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdf
Binary files differ
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 ceaca6ea596..76fb00e32b6 100644
--- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
+++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
@@ -31,7 +31,7 @@ This work is "author-maintained" by Will Robertson.
%</internal>
%<preamble>\ProvidesPackage{unicode-math}
%<*preamble>
- [2010/09/19 v0.5b Unicode maths in XeLaTeX and LuaLaTeX]
+ [2010/09/27 v0.5b Unicode maths in XeLaTeX and LuaLaTeX]
%</preamble>
%<*internal>
\documentclass{ltxdoc}
@@ -266,6 +266,13 @@ This work is "author-maintained" by Will Robertson.
% the same math type, such as \cs{mathopen}, or complete math alphabets such as \cs{mathbb}.
% (Only numerical slots, however, can be used in ranged declarations.)
%
+% \paragraph{\XeTeX\ users only}
+% \XeTeX\ uses the first maths font selected for choosing various parameters
+% such as the thickness of fraction rules and so on.
+% (In \LuaTeX, they are chosen automatically based on the current font.)
+% To select a new font for these parameters use \cs{resetmathfont},
+% which behaves identically to \cs{setmathfont}.
+%
% \subsubsection{Control over maths alphabets}
%
% Exact control over maths alphabets can be somewhat involved.
@@ -1054,6 +1061,7 @@ This work is "author-maintained" by Will Robertson.
\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
% \end{macrocode}
% For \opt{math-style}:
% \begin{macrocode}
@@ -2255,18 +2263,14 @@ This work is "author-maintained" by Will Robertson.
\keys_set:nn {unicode-math} {#1}
\um_fontspec_select_font:n {#2}
% \end{macrocode}
-% Check for the correct number of \cs{fontdimen}s:
-% \begin{macrocode}
-%% \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
+% Check whether we're using a real maths font:
+% \begin{macrocode}
+ \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:
% \end{macrocode}
% If we're defining the full Unicode math repetoire, then we skip all
% the parsing processing needed if we're only defining a subset.
@@ -2299,6 +2303,13 @@ This work is "author-maintained" by Will Robertson.
% \begin{macrocode}
\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}
+ }
% \end{macrocode}
% And now we input every single maths char.
% \begin{macrocode}
@@ -2325,6 +2336,16 @@ This work is "author-maintained" by Will Robertson.
% \end{macro}
%
%
+% \begin{macro}{\resetmathfont}
+% \begin{macrocode}
+\DeclareDocumentCommand \resetmathfont { O{} m } {
+ \bool_set_false:N \g_um_mainfont_set_bool
+ \setmathfont[#1]{#2}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\um_fontspec_select_font:}
% Select the font with \cs{fontspec} and define \cs{l_um_font} from it.
% \begin{macrocode}
@@ -2630,11 +2651,11 @@ This work is "author-maintained" by Will Robertson.
% \subsection{OpenType maths font features}
% \begin{macrocode}
\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} }
% \end{macrocode}
%
% \subsection{Script and scriptscript font options}
@@ -3130,7 +3151,7 @@ This work is "author-maintained" by Will Robertson.
% \begin{macrocode}
\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:
}{
@@ -3146,7 +3167,7 @@ This work is "author-maintained" by Will Robertson.
% \begin{macrocode}
\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}
}{
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}
}{