summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-29 22:51:18 +0000
committerKarl Berry <karl@freefriends.org>2012-05-29 22:51:18 +0000
commit9de37ad7dbd5b10933f4fc87f93ddf5a77501004 (patch)
treec2b1a45d59af06b7de383f5013203568d8d566d2 /Master/texmf-dist/tex/latex
parent3a0fe3edcaaeeb918cbcbeaf1eee934328a91bb2 (diff)
unicode-math 0.7 (29may12)
git-svn-id: svn://tug.org/texlive/trunk@26720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.sty227
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex26
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty252
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua13
-rw-r--r--Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty50
5 files changed, 352 insertions, 216 deletions
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 06a26505ba4..1f851aaac03 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
@@ -5,8 +5,9 @@
%% The original source files were:
%%
%% unicode-math.dtx (with options: `package,LU')
-%% Copyright 2006-2011 Will Robertson <will.robertson@latex-project.org>
+%% Copyright 2006-2012 Will Robertson <will.robertson@latex-project.org>
%% Copyright 2010-2011 Philipp Stephani <st_philipp@yahoo.de>
+%% Copyright 2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% This package is free software and may be redistributed and/or modified under
%% the conditions of the LaTeX Project Public License, version 1.3c or higher
@@ -24,12 +25,10 @@
\um_cs_compat:n {radical}
\um_cs_compat:n {mathaccent}
\um_cs_compat:n {delimiter}
-\bool_const:Nn \c_um_have_fixed_accents_bool
- { \int_compare_p:n { \luatexversion > 64 } }
\RequirePackage { lualatex-math } [ 2011/08/07 ]
\RequirePackage { luatexbase }
\RequirePackage { luaotfload } [ 2010/11/26 ]
-\RequireLuaModule { unicode-math } [ 2011/04/23 ]
+\RequireLuaModule { unicode-math } [ 2012/04/23 ]
\cs_new:Nn \usv_set:nnn {
\tl_set:cn { \um_to_usv:nn {#1}{#2} } {#3}
}
@@ -306,8 +305,6 @@
\cs_gset_protected_nopar:Npx #2
{ \um_delimiter:Nnn \mathclose {#1} {#4} }
}
- \mathaccent
- { \cs_gset_protected_nopar:Npx #2 { \um_accent:Nnn #3 {#1} {#4} } }
\mathfence
{
\um_set_mathcode:nnn {#4} {#3} {#1}
@@ -317,15 +314,19 @@
\cs_gset_protected_nopar:cpx {r \cs_to_str:N #2}
{ \um_delimiter:Nnn \mathclose {#1} {#4} }
}
+ \mathaccent
+ { \cs_gset_protected_nopar:Npx #2 { \um_accent:nnn {fixed} {#1} {#4} } }
+ \mathbotaccent
+ { \cs_gset_protected_nopar:Npx #2 { \um_accent:nnn {bottom~ fixed} {#1} {#4} } }
\mathover
{
\cs_set_protected_nopar:Npx #2 ##1
- { \mathop { \um_overbrace:nnn {#1} {#4} {##1} } \limits }
+ { \mathop { \um_accent:nnn {} {#1} {#4} {##1} } \limits }
}
\mathunder
{
\cs_set_protected_nopar:Npx #2 ##1
- { \mathop { \um_underbrace:nnn {#1} {#4} {##1} } \limits }
+ { \mathop { \um_accent:nnn {bottom} {#1} {#4} {##1} } \limits }
}
}{
\um_set_mathcode:nnn {#4} {#3} {#1}
@@ -334,6 +335,7 @@
\edef\mathfence{\string\mathfence}
\edef\mathover{\string\mathover}
\edef\mathunder{\string\mathunder}
+\edef\mathbotaccent{\string\mathbotaccent}
\cs_new:Nn \um_set_big_operator:nnn {
\group_begin:
\char_set_catcode_active:n {#3}
@@ -367,59 +369,19 @@
\cs_new:Nn \um_delimiter:Nnn {
\Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
}
-\cs_new:Nn \um_accent:Nnn
- {
- \Umathaccent \c_um_accent_keyword_tl
- \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
- }
- \cs_new_nopar:Npn \um_wide_top_accent:Nnn #1 #2 #3 {
- \Umathaccent \mathchar@type #1 \use:c { sym #2 } #3 \scan_stop:
- }
- \bool_if:NTF \c_um_have_fixed_accents_bool {
- \cs_new_nopar:Npn \um_wide_bottom_accent:Nnn #1 #2 #3 {
- \Umathaccent bottom~ \mathchar@type #1 \use:c { sym #2 } #3 \scan_stop:
- }
- \tl_const:Nn \c_um_accent_keyword_tl { fixed }
- } {
- \tl_const:Nn \c_um_accent_keyword_tl { }
- }
-\cs_generate_variant:Nn \um_set_mathchar:NNnn {c}
-\cs_set:Npn \um_overbrace:nnn #1#2#3 {
- \luatexUdelimiterover \csname sym#1\endcsname #2 {#3}
-}
-\cs_set:Npn \um_underbrace:nnn #1#2#3 {
- \luatexUdelimiterunder \csname sym#1\endcsname #2 {#3}
+\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:
}
-\cs_new_eq:NN \um_saved_ltxe_glb_settings: \glb@settings
-\CheckCommand * \glb@settings {
- \expandafter\ifx\csname S@\f@size\endcsname\relax
- \calculate@math@sizes
- \fi
- \csname S@\f@size\endcsname
- \ifmath@fonts
- \begingroup
- \escapechar\m@ne
- \csname mv@\math@version \endcsname
- \globaldefs\@ne
- \math@fonts
- \let \glb@currsize \f@size
- \endgroup
- \the\every@math@size
- \fi
-}
-\cs_set_protected_nopar:Npn \glb@settings {
- \msg_error:nn { unicode-math } { no-font-selected }
-}
\cs_new:Nn \um_init: {
\bool_set_true:N \l_um_ot_math_bool
- \let\glb@currsize\relax
- \cs_set_eq:NN \glb@settings \um_saved_ltxe_glb_settings:
+ \cs_set_eq:NN \glb@currsize \scan_stop:
\bool_set_true:N \l_um_init_bool
\seq_clear:N \l_um_char_range_seq
\clist_clear:N \l_um_char_num_range_clist
@@ -454,6 +416,12 @@
}
\SetSymbolFont{\um_symfont_tl}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{\um_symfont_tl}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
\bool_if:nT {\l_um_ot_math_bool && !\g_um_mainfont_already_set_bool} {
\bool_set_true:N \g_um_mainfont_already_set_bool
\um_declare_math_sizes:
@@ -466,6 +434,7 @@
\um_setup_accents:
\um_setup_delcodes:
\um_setup_alphabets:
+ \um_setup_negations:
\ignorespaces
}
\cs_new:Nn \um_declare_math_sizes:
@@ -503,6 +472,13 @@
} {\l_um_fontname_tl}
\SetSymbolFont{symbols}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{symbols}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
}
\cs_new:Nn \um_setup_legacy_fam_three:
{
@@ -521,17 +497,21 @@
} {\l_um_fontname_tl}
\SetSymbolFont{largesymbols}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{largesymbols}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
}
\cs_new:Nn \um_get_fontparam:nn
{ \directlua{fontspec.mathfontdimen("l_um_font","#2")} }
-\DeclareDocumentCommand \resetmathfont { O{} m } {
- \bool_set_false:N \g_um_mainfont_already_set_bool
- \setmathfont[#1]{#2}
-}
+\cs_set_eq:NN \resetmathfont \setmathfont
\cs_new:Nn \um_fontspec_select_font: {
\tl_set:Nx \l_um_font_keyval_tl {
Renderer = Basic,
- BoldFont = {}, ItalicFont = {},
+ BoldItalicFont = {}, ItalicFont = {},
Script = Math,
SizeFeatures = {
{Size = \tf@size-} ,
@@ -659,7 +639,7 @@
\tl_remove_all:Nn \l_um_nolimits_tl {#1}
}
\tl_new:N \l_um_radicals_tl
-\tl_set:Nn \l_um_radicals_tl {\sqrt}
+\tl_set:Nn \l_um_radicals_tl {\sqrt \longdivision}
\cs_new_protected_nopar:Nn \um_new_cramped_style:N
{ \cs_new_eq:Nc #1 { luatex \cs_to_str:N #1 } }
\um_new_cramped_style:N \crampeddisplaystyle
@@ -826,7 +806,7 @@
{
\mathord,\mathalpha,\mathop,\mathbin,\mathrel,
\mathopen,\mathclose,\mathpunct,\mathaccent,
- \mathfence,\mathover,\mathunder
+ \mathfence,\mathover,\mathunder,\mathbotaccent
}
\prg_new_conditional:Nnn \um_if_mathalph_decl:n {TF} {
\tl_set:Nx \l_um_tmpa_tl { \tl_trim_spaces:n {#1} }
@@ -869,7 +849,7 @@
% character slot:
\seq_map_inline:Nn \l_um_char_range_seq
{
- \um_int_if_range_matches_slot:nnT {##1} {#1}
+ \um_int_if_slot_in_range:nnT {#1} {##1}
{ \seq_map_break:n { \use_none_delimit_by_q_nil:w } }
}
@@ -882,7 +862,7 @@
#4
}
}
-\cs_new:Nn \um_int_if_range_matches_slot:nnT
+\cs_new:Nn \um_int_if_slot_in_range:nnT
{ \um_numrange_parse:nwT {#1} #2 - \q_nil - \q_stop {#3} }
\cs_set:Npn \um_numrange_parse:nwT #1 #2 - #3 - #4 \q_stop #5
{
@@ -1787,12 +1767,11 @@
}
}
}
-\cs_new:Npn \um_symbol_setup:
- {
- \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
- \exp_not:n {\_um_sym:nnn{##1}{##2}{##3}}
- }
+\cs_new:Npn \um_symbol_setup: {
+ \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
+ \exp_not:n {\_um_sym:nnn{##1}{##2}{##3}}
}
+}
\CatchFileEdef \g_um_mathtable_tl {unicode-math-table.tex} {\um_symbol_setup:}
\cs_new:Nn \um_input_math_symbol_table: {\g_um_mathtable_tl}
\group_begin:
@@ -1827,7 +1806,8 @@
\cs_if_eq_p:NN ##3 \mathopen ||
\cs_if_eq_p:NN ##3 \mathclose ||
\cs_if_eq_p:NN ##3 \mathover ||
- \cs_if_eq_p:NN ##3 \mathunder } {
+ \cs_if_eq_p:NN ##3 \mathunder ||
+ \cs_if_eq_p:NN ##3 \mathbotaccent } {
\um_cs_set_eq_active_char:Nw ##2 = ##1 \q_nil \ignorespaces
}
}
@@ -1845,6 +1825,15 @@
}
}
|group_end:
+\AtBeginDocument { \um_load_lm_if_necessary: }
+\cs_new:Nn \um_load_lm_if_necessary:
+ {
+ \cs_if_exist:NF \l_um_fontname_tl
+ {
+ % XXX: update this when lmmath-bold.otf is released
+ \setmathfont[BoldFont={lmmath-regular.otf}]{lmmath-regular.otf}
+ }
+ }
\cs_new:Nn \um_arg_i_before_egroup:n {#1\egroup}
\cs_new:Nn \um_superscript:n {
^\bgroup #1
@@ -2267,6 +2256,7 @@
\def\gets{\leftarrow}
\def\mathring{\ocirc}
\def\lnot{\neg}
+\def\longdivision{\longdivisionsign}
\def\backepsilon{\upbackepsilon}
\def\eth{\matheth}
\def\smallint{{\textstyle\int}\limits}
@@ -2441,43 +2431,104 @@
\cs_set:Npn \| {\Vert}
\cs_set:Npn \mathellipsis {\mathinner{\unicodeellipsis}}
\cs_set:Npn \cdots {\mathinner{\unicodecdots}}
-\cs_new_protected_nopar:Nn \um_setup_accents:
- {
+\cs_new_protected_nopar:Nn \um_setup_accents: {
\cs_gset_protected_nopar:Npx \widehat {
- \um_wide_top_accent:Nnn \mathaccent { \um_symfont_tl } { "0302 }
+ \um_accent:nnn {} { \um_symfont_tl } { "0302 }
}
\cs_gset_protected_nopar:Npx \widetilde {
- \um_wide_top_accent:Nnn \mathaccent { \um_symfont_tl } { "0303 }
+ \um_accent:nnn {} { \um_symfont_tl } { "0303 }
}
\cs_gset_protected_nopar:Npx \overleftarrow {
- \um_wide_top_accent:Nnn \mathaccent { \um_symfont_tl } { "20D6 }
+ \um_accent:nnn {} { \um_symfont_tl } { "20D6 }
}
\cs_gset_protected_nopar:Npx \overrightarrow {
- \um_wide_top_accent:Nnn \mathaccent { \um_symfont_tl } { "20D7 }
+ \um_accent:nnn {} { \um_symfont_tl } { "20D7 }
}
\cs_gset_protected_nopar:Npx \overleftrightarrow {
- \um_wide_top_accent:Nnn \mathaccent { \um_symfont_tl } { "20E1 }
+ \um_accent:nnn {} { \um_symfont_tl } { "20E1 }
}
- \bool_if:NT \c_um_have_fixed_accents_bool {
- \cs_gset_protected_nopar:Npx \underrightharpoondown {
- \um_wide_bottom_accent:Nnn \mathaccent { \um_symfont_tl } { "20EC }
- }
- \cs_gset_protected_nopar:Npx \underleftharpoondown {
- \um_wide_bottom_accent:Nnn \mathaccent { \um_symfont_tl } { "20ED }
- }
- \cs_gset_protected_nopar:Npx \underleftarrow {
- \um_wide_bottom_accent:Nnn \mathaccent { \um_symfont_tl } { "20EE }
- }
- \cs_gset_protected_nopar:Npx \underrightarrow {
- \um_wide_bottom_accent:Nnn \mathaccent { \um_symfont_tl } { "20EF }
- }
+ \cs_gset_protected_nopar:Npx \wideutilde {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "0330 }
}
- }
+ \cs_gset_protected_nopar:Npx \underrightharpoondown {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EC }
+ }
+ \cs_gset_protected_nopar:Npx \underleftharpoondown {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20ED }
+ }
+ \cs_gset_protected_nopar:Npx \underleftarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EE }
+ }
+ \cs_gset_protected_nopar:Npx \underrightarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EF }
+ }
+ \cs_gset_protected_nopar:Npx \underleftrightarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "034D }
+ }
+}
\cs_set_eq:NN \um_text_slash: \slash
\cs_set_protected:Npn \slash {
\mode_if_math:TF {\mathslash} {\um_text_slash:}
}
+\tl_new:N \l_not_token_name_tl
+
+\cs_new:Npn \not_newnot:N #1 {
+ \tl_set:Nx \l_not_token_name_tl { \token_to_str:N #1 }
+ \tl_if_empty:xF { \tl_tail:V \l_not_token_name_tl } {
+ \tl_set:Nx \l_not_token_name_tl { \tl_tail:V \l_not_token_name_tl }
+ }
+ \cs_if_exist:cTF { n \l_not_token_name_tl } {
+ \use:c { n \l_not_token_name_tl }
+ } {
+ \cs_if_exist:cTF { not \l_not_token_name_tl } {
+ \use:c { not \l_not_token_name_tl }
+ } {
+ \not_oldnot: #1 %\l_not_token_name_tl
+ }
+ }
+}
+
+\cs_new_protected_nopar:Nn \um_setup_negations: {
+ \cs_set_eq:NN \not_oldnot: \not
+ \cs_set_eq:NN \not \not_newnot:N
+
+ \cs_gset:cpn { not= } { \neq }
+ \cs_gset:cpn { not< } { \nless }
+ \cs_gset:cpn { not> } { \ngtr }
+ \cs_gset:Npn \ngets { \nleftarrow }
+ \cs_gset:Npn \nsimeq { \nsime }
+ \cs_gset:Npn \nequal { \ne }
+ \cs_gset:Npn \nle { \nleq }
+ \cs_gset:Npn \nge { \ngeq }
+ \cs_gset:Npn \ngreater { \ngtr }
+ \cs_gset:Npn \nforksnot { \forks }
+}
+\AtEndOfPackageFile * { mathtools } {
\AtEndOfPackageFile * { mathtools } {
+ \let\MToverbracket =\overbracket
+ \let\MTunderbracket=\underbracket
+
+ \AtBeginDocument {
+ \msg_warning:nn { unicode-math } { mathtools-overbracket }
+
+\def\downbracketfill#1#2{%
+ \edef\l_MT_bracketheight_fdim{.27ex}%
+ \downbracketend{#1}{#2}
+ \leaders \vrule \@height #1 \@depth \z@ \hfill
+ \downbracketend{#1}{#2}%
+ }
+\def\upbracketfill#1#2{%
+ \edef\l_MT_bracketheight_fdim{.27ex}%
+ \upbracketend{#1}{#2}
+ \leaders \vrule \@height \z@ \@depth #1 \hfill
+ \upbracketend{#1}{#2}%
+ }
+\let\Uoverbracket =\overbracket
+\let\Uunderbracket=\underbracket
+ \let\overbracket =\MToverbracket
+ \let\underbracket =\MTunderbracket
+ }
+}
\msg_warning:nn { unicode-math } { mathtools-colon }
\NewDocumentCommand \dblcolon { } { \Colon }
\NewDocumentCommand \coloneqq { } { \coloneq }
diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex
index b4aeff77cee..4f78236f58d 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex
@@ -47,8 +47,8 @@
\UnicodeMathSymbol{"00312}{\oturnedcomma }{\mathaccent}{combining turned comma above}%
\UnicodeMathSymbol{"00315}{\ocommatopright }{\mathaccent}{combining comma above right}%
\UnicodeMathSymbol{"0031A}{\droang }{\mathaccent}{left angle above (non-spacing)}%
-\UnicodeMathSymbol{"00330}{\wideutilde }{\mathaccent}{under tilde accent (multiple characters and non-spacing)}%
-\UnicodeMathSymbol{"00331}{\underbar }{\mathaccent}{combining macron below}%
+\UnicodeMathSymbol{"00330}{\wideutilde }{\mathbotaccent}{under tilde accent (multiple characters and non-spacing)}%
+\UnicodeMathSymbol{"00331}{\underbar }{\mathbotaccent}{combining macron below}%
\UnicodeMathSymbol{"00338}{\not }{\mathaccent}{combining long solidus overlay}%
\UnicodeMathSymbol{"00391}{\upAlpha }{\mathalpha}{capital alpha, greek}%
\UnicodeMathSymbol{"00392}{\upBeta }{\mathalpha}{capital beta, greek}%
@@ -154,12 +154,12 @@
\UnicodeMathSymbol{"020E1}{\overleftrightarrow }{\mathaccent}{combining left right arrow above}%
\UnicodeMathSymbol{"020E4}{\enclosetriangle }{\mathord}{combining enclosing upward pointing triangle}%
\UnicodeMathSymbol{"020E7}{\annuity }{\mathaccent}{combining annuity symbol}%
-\UnicodeMathSymbol{"020E8}{\threeunderdot }{\mathaccent}{combining triple underdot}%
+\UnicodeMathSymbol{"020E8}{\threeunderdot }{\mathbotaccent}{combining triple underdot}%
\UnicodeMathSymbol{"020E9}{\widebridgeabove }{\mathaccent}{combining wide bridge above}%
-\UnicodeMathSymbol{"020EC}{\underrightharpoondown }{\mathaccent}{combining rightwards harpoon with barb downwards}%
-\UnicodeMathSymbol{"020ED}{\underleftharpoondown }{\mathaccent}{combining leftwards harpoon with barb downwards}%
-\UnicodeMathSymbol{"020EE}{\underleftarrow }{\mathaccent}{combining left arrow below}%
-\UnicodeMathSymbol{"020EF}{\underrightarrow }{\mathaccent}{combining right arrow below}%
+\UnicodeMathSymbol{"020EC}{\underrightharpoondown }{\mathbotaccent}{combining rightwards harpoon with barb downwards}%
+\UnicodeMathSymbol{"020ED}{\underleftharpoondown }{\mathbotaccent}{combining leftwards harpoon with barb downwards}%
+\UnicodeMathSymbol{"020EE}{\underleftarrow }{\mathbotaccent}{combining left arrow below}%
+\UnicodeMathSymbol{"020EF}{\underrightarrow }{\mathbotaccent}{combining right arrow below}%
\UnicodeMathSymbol{"020F0}{\asteraccent }{\mathaccent}{combining asterisk above}%
\UnicodeMathSymbol{"02102}{\BbbC }{\mathalpha}{/bbb c, open face c}%
\UnicodeMathSymbol{"02107}{\Eulerconst }{\mathord}{euler constant}%
@@ -550,8 +550,8 @@
\UnicodeMathSymbol{"022E7}{\gnsim }{\mathrel}{greater, not similar}%
\UnicodeMathSymbol{"022E8}{\precnsim }{\mathrel}{precedes, not similar}%
\UnicodeMathSymbol{"022E9}{\succnsim }{\mathrel}{succeeds, not similar}%
-\UnicodeMathSymbol{"022EA}{\ntriangleleft }{\mathrel}{not left triangle}%
-\UnicodeMathSymbol{"022EB}{\ntriangleright }{\mathrel}{not right triangle}%
+\UnicodeMathSymbol{"022EA}{\nvartriangleleft }{\mathrel}{not left triangle}%
+\UnicodeMathSymbol{"022EB}{\nvartriangleright }{\mathrel}{not right triangle}%
\UnicodeMathSymbol{"022EC}{\ntrianglelefteq }{\mathrel}{not left triangle, equals}%
\UnicodeMathSymbol{"022ED}{\ntrianglerighteq }{\mathrel}{not right triangle, equals}%
\UnicodeMathSymbol{"022EE}{\vdots }{\mathrel}{vertical ellipsis}%
@@ -625,8 +625,8 @@
\UnicodeMathSymbol{"023AD}{\rbracelend }{\mathord}{right curly bracket lower hook}%
\UnicodeMathSymbol{"023AE}{\intextender }{\mathord}{integral extension}%
\UnicodeMathSymbol{"023AF}{\harrowextender }{\mathord}{horizontal line extension (used to extend arrows)}%
-\UnicodeMathSymbol{"023B0}{\lmoustache }{\mathord}{upper left or lower right curly bracket section}%
-\UnicodeMathSymbol{"023B1}{\rmoustache }{\mathord}{upper right or lower left curly bracket section}%
+\UnicodeMathSymbol{"023B0}{\lmoustache }{\mathopen}{upper left or lower right curly bracket section}%
+\UnicodeMathSymbol{"023B1}{\rmoustache }{\mathclose}{upper right or lower left curly bracket section}%
\UnicodeMathSymbol{"023B2}{\sumtop }{\mathord}{summation top}%
\UnicodeMathSymbol{"023B3}{\sumbottom }{\mathord}{summation bottom}%
\UnicodeMathSymbol{"023B4}{\overbracket }{\mathover}{top square bracket}%
@@ -649,7 +649,7 @@
\UnicodeMathSymbol{"023E6}{\accurrent }{\mathord}{ac current}%
\UnicodeMathSymbol{"023E7}{\elinters }{\mathord}{electrical intersection}%
\UnicodeMathSymbol{"02422}{\blanksymbol }{\mathord}{blank symbol}%
-\UnicodeMathSymbol{"02423}{\openbox }{\mathord}{open box}%
+\UnicodeMathSymbol{"02423}{\mathvisiblespace }{\mathord}{open box}%
\UnicodeMathSymbol{"02506}{\bdtriplevdash }{\mathord}{doubly broken vert}%
\UnicodeMathSymbol{"02580}{\blockuphalf }{\mathord}{upper half block}%
\UnicodeMathSymbol{"02584}{\blocklowhalf }{\mathord}{lower half block}%
@@ -844,6 +844,8 @@
\UnicodeMathSymbol{"027EB}{\rAngle }{\mathclose}{mathematical right double angle bracket}%
\UnicodeMathSymbol{"027EC}{\Lbrbrak }{\mathopen}{mathematical left white tortoise shell bracket}%
\UnicodeMathSymbol{"027ED}{\Rbrbrak }{\mathclose}{mathematical right white tortoise shell bracket}%
+\UnicodeMathSymbol{"027EE}{\lgroup }{\mathopen}{mathematical left flattened parenthesis}%
+\UnicodeMathSymbol{"027EF}{\rgroup }{\mathclose}{mathematical right flattened parenthesis}%
\UnicodeMathSymbol{"027F0}{\UUparrow }{\mathrel}{upwards quadruple arrow}%
\UnicodeMathSymbol{"027F1}{\DDownarrow }{\mathrel}{downwards quadruple arrow}%
\UnicodeMathSymbol{"027F2}{\acwgapcirclearrow }{\mathrel}{anticlockwise gapped circle arrow}%
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 a50bdaadcea..863e495ce2c 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
@@ -5,8 +5,9 @@
%% The original source files were:
%%
%% unicode-math.dtx (with options: `package,XE')
-%% Copyright 2006-2011 Will Robertson <will.robertson@latex-project.org>
+%% Copyright 2006-2012 Will Robertson <will.robertson@latex-project.org>
%% Copyright 2010-2011 Philipp Stephani <st_philipp@yahoo.de>
+%% Copyright 2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% This package is free software and may be redistributed and/or modified under
%% the conditions of the LaTeX Project Public License, version 1.3c or higher
@@ -24,7 +25,6 @@
\um_cs_compat:n {radical}
\um_cs_compat:n {mathaccent}
\um_cs_compat:n {delimiter}
-\bool_set_false:N \c_um_have_fixed_accents_bool
\cs_new:Nn \usv_set:nnn {
\tl_set:cn { \um_to_usv:nn {#1}{#2} } {#3}
}
@@ -303,8 +303,6 @@
\cs_gset_protected_nopar:Npx #2
{ \um_delimiter:Nnn \mathclose {#1} {#4} }
}
- \mathaccent
- { \cs_gset_protected_nopar:Npx #2 { \um_accent:Nnn #3 {#1} {#4} } }
\mathfence
{
\um_set_mathcode:nnn {#4} {#3} {#1}
@@ -314,6 +312,20 @@
\cs_gset_protected_nopar:cpx {r \cs_to_str:N #2}
{ \um_delimiter:Nnn \mathclose {#1} {#4} }
}
+ \mathaccent
+ { \cs_gset_protected_nopar:Npx #2 { \um_accent:nnn {fixed} {#1} {#4} } }
+ \mathbotaccent
+ { \cs_gset_protected_nopar:Npx #2 { \um_accent:nnn {bottom~ fixed} {#1} {#4} } }
+ \mathover
+ {
+ \cs_set_protected_nopar:Npx #2 ##1
+ { \mathop { \um_accent:nnn {} {#1} {#4} {##1} } \limits }
+ }
+ \mathunder
+ {
+ \cs_set_protected_nopar:Npx #2 ##1
+ { \mathop { \um_accent:nnn {bottom} {#1} {#4} {##1} } \limits }
+ }
}{
\um_set_mathcode:nnn {#4} {#3} {#1}
}
@@ -321,6 +333,7 @@
\edef\mathfence{\string\mathfence}
\edef\mathover{\string\mathover}
\edef\mathunder{\string\mathunder}
+\edef\mathbotaccent{\string\mathbotaccent}
\cs_new:Nn \um_set_big_operator:nnn {
\group_begin:
\char_set_catcode_active:n {#3}
@@ -354,47 +367,19 @@
\cs_new:Nn \um_delimiter:Nnn {
\Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
}
-\cs_new:Nn \um_accent:Nnn
- {
- \Umathaccent \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
- }
-\cs_generate_variant:Nn \um_set_mathchar:NNnn {c}
-\cs_set:Npn \um_overbrace:nnn #1#2#3 {
- \luatexUdelimiterover \csname sym#1\endcsname #2 {#3}
-}
-\cs_set:Npn \um_underbrace:nnn #1#2#3 {
- \luatexUdelimiterunder \csname sym#1\endcsname #2 {#3}
+\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:
}
-\cs_new_eq:NN \um_saved_ltxe_glb_settings: \glb@settings
-\CheckCommand * \glb@settings {
- \expandafter\ifx\csname S@\f@size\endcsname\relax
- \calculate@math@sizes
- \fi
- \csname S@\f@size\endcsname
- \ifmath@fonts
- \begingroup
- \escapechar\m@ne
- \csname mv@\math@version \endcsname
- \globaldefs\@ne
- \math@fonts
- \let \glb@currsize \f@size
- \endgroup
- \the\every@math@size
- \fi
-}
-\cs_set_protected_nopar:Npn \glb@settings {
- \msg_error:nn { unicode-math } { no-font-selected }
-}
\cs_new:Nn \um_init: {
\bool_set_true:N \l_um_ot_math_bool
- \let\glb@currsize\relax
- \cs_set_eq:NN \glb@settings \um_saved_ltxe_glb_settings:
+ \cs_set_eq:NN \glb@currsize \scan_stop:
\bool_set_true:N \l_um_init_bool
\seq_clear:N \l_um_char_range_seq
\clist_clear:N \l_um_char_num_range_clist
@@ -429,6 +414,12 @@
}
\SetSymbolFont{\um_symfont_tl}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{\um_symfont_tl}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
\bool_if:nT {\l_um_ot_math_bool && !\g_um_mainfont_already_set_bool} {
\bool_set_true:N \g_um_mainfont_already_set_bool
\um_declare_math_sizes:
@@ -441,6 +432,7 @@
\um_setup_accents:
\um_setup_delcodes:
\um_setup_alphabets:
+ \um_setup_negations:
\ignorespaces
}
\cs_new:Nn \um_declare_math_sizes:
@@ -478,6 +470,13 @@
} {\l_um_fontname_tl}
\SetSymbolFont{symbols}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{symbols}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
}
\cs_new:Nn \um_setup_legacy_fam_three:
{
@@ -496,16 +495,20 @@
} {\l_um_fontname_tl}
\SetSymbolFont{largesymbols}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
+
+ \tl_set:Nn \l_um_tmpa_tl {normal}
+ \tl_if_eq:NNT \l_um_mversion_tl \l_um_tmpa_tl
+ {
+ \SetSymbolFont{largesymbols}{bold}
+ {\encodingdefault}{\l_um_family_tl}{\bfdefault}{\updefault}
+ }
}
\cs_new:Nn \um_get_fontparam:nn
{ \the\fontdimen#1\l_um_font\relax }
-\DeclareDocumentCommand \resetmathfont { O{} m } {
- \bool_set_false:N \g_um_mainfont_already_set_bool
- \setmathfont[#1]{#2}
-}
+\cs_set_eq:NN \resetmathfont \setmathfont
\cs_new:Nn \um_fontspec_select_font: {
\tl_set:Nx \l_um_font_keyval_tl {
- BoldFont = {}, ItalicFont = {},
+ BoldItalicFont = {}, ItalicFont = {},
Script = Math,
SizeFeatures = {
{Size = \tf@size-} ,
@@ -633,7 +636,7 @@
\tl_remove_all:Nn \l_um_nolimits_tl {#1}
}
\tl_new:N \l_um_radicals_tl
-\tl_set:Nn \l_um_radicals_tl {\sqrt}
+\tl_set:Nn \l_um_radicals_tl {\sqrt \longdivision}
\cs_new_protected_nopar:Nn \um_new_cramped_style:N
{ \quark_new:N #1 }
\um_new_cramped_style:N \crampeddisplaystyle
@@ -831,7 +834,7 @@
{
\mathord,\mathalpha,\mathop,\mathbin,\mathrel,
\mathopen,\mathclose,\mathpunct,\mathaccent,
- \mathfence,\mathover,\mathunder
+ \mathfence,\mathover,\mathunder,\mathbotaccent
}
\prg_new_conditional:Nnn \um_if_mathalph_decl:n {TF} {
\tl_set:Nx \l_um_tmpa_tl { \tl_trim_spaces:n {#1} }
@@ -874,7 +877,7 @@
% character slot:
\seq_map_inline:Nn \l_um_char_range_seq
{
- \um_int_if_range_matches_slot:nnT {##1} {#1}
+ \um_int_if_slot_in_range:nnT {#1} {##1}
{ \seq_map_break:n { \use_none_delimit_by_q_nil:w } }
}
@@ -887,7 +890,7 @@
#4
}
}
-\cs_new:Nn \um_int_if_range_matches_slot:nnT
+\cs_new:Nn \um_int_if_slot_in_range:nnT
{ \um_numrange_parse:nwT {#1} #2 - \q_nil - \q_stop {#3} }
\cs_set:Npn \um_numrange_parse:nwT #1 #2 - #3 - #4 \q_stop #5
{
@@ -1792,15 +1795,11 @@
}
}
}
-\cs_new:Npn \um_symbol_setup:
- {
- \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
- \prg_case_tl:Nnn ##3 { \mathover {} \mathunder {} }
- {
- \exp_not:n {\_um_sym:nnn{##1}{##2}{##3}}
- }
- }
+\cs_new:Npn \um_symbol_setup: {
+ \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
+ \exp_not:n {\_um_sym:nnn{##1}{##2}{##3}}
}
+}
\CatchFileEdef \g_um_mathtable_tl {unicode-math-table.tex} {\um_symbol_setup:}
\cs_new:Nn \um_input_math_symbol_table: {\g_um_mathtable_tl}
\group_begin:
@@ -1835,7 +1834,8 @@
\cs_if_eq_p:NN ##3 \mathopen ||
\cs_if_eq_p:NN ##3 \mathclose ||
\cs_if_eq_p:NN ##3 \mathover ||
- \cs_if_eq_p:NN ##3 \mathunder } {
+ \cs_if_eq_p:NN ##3 \mathunder ||
+ \cs_if_eq_p:NN ##3 \mathbotaccent } {
\um_cs_set_eq_active_char:Nw ##2 = ##1 \q_nil \ignorespaces
}
}
@@ -1853,6 +1853,15 @@
}
}
|group_end:
+\AtBeginDocument { \um_load_lm_if_necessary: }
+\cs_new:Nn \um_load_lm_if_necessary:
+ {
+ \cs_if_exist:NF \l_um_fontname_tl
+ {
+ % XXX: update this when lmmath-bold.otf is released
+ \setmathfont[BoldFont={lmmath-regular.otf}]{lmmath-regular.otf}
+ }
+ }
\cs_new:Nn \um_arg_i_before_egroup:n {#1\egroup}
\cs_new:Nn \um_superscript:n {
^\bgroup #1
@@ -2275,41 +2284,6 @@
\group_end:
}
\um_setup_active_frac:
-\cs_new:Nn \um_over_bracket:nN
- {
- \mathop { \vbox {
- \setbox\z@\hbox{$\displaystyle#1$}
- \dimen@=\dimexpr\wd\z@+3\p@\relax
- \setbox\tw@\hbox{$\left #2 \vcenter to\dimen@{\vss} \right. $}
- \m@th\ialign
- {
- ##\crcr\noalign{\kern-\p@}%
- \rotatebox[origin=Bl]{-90}
- {\box\tw@}\crcr\noalign{\kern0\p@\nointerlineskip}%
- \hfil\box\z@\hfil\crcr
- }
- } } \limits
- }
-\cs_new:Nn \um_under_bracket:nN
- {
- \mathop { \vtop {
- \setbox\z@\hbox{$\displaystyle#1$}
- \dimen@=\dimexpr\wd\z@+3\p@\relax
- \setbox\tw@\hbox{$\left #2 \vcenter to\dimen@{\vss} \right. $}
- \m@th\ialign
- {
- ##\crcr\hfil\box\z@\hfil\crcr
- \noalign{\kern1\p@\nointerlineskip}%
- \rotatebox[origin=Br]{-90}{\box\tw@}\crcr\noalign{\kern0\p@}
- }
- } } \limits
- }
-\RenewDocumentCommand \overbrace {m} { \um_over_bracket:nN {#1} \{ }
-\DeclareDocumentCommand \overbracket {m} { \um_over_bracket:nN {#1} [ }
-\DeclareDocumentCommand \overparen {m} { \um_over_bracket:nN {#1} ( }
-\RenewDocumentCommand \underbrace {m} { \um_under_bracket:nN {#1} \} }
-\DeclareDocumentCommand \underbracket {m} { \um_under_bracket:nN {#1} ] }
-\DeclareDocumentCommand \underparen {m} { \um_under_bracket:nN {#1} ) }
\def\to{\rightarrow}
\def\le{\leq}
\def\ge{\geq}
@@ -2329,6 +2303,7 @@
\def\gets{\leftarrow}
\def\mathring{\ocirc}
\def\lnot{\neg}
+\def\longdivision{\longdivisionsign}
\def\backepsilon{\upbackepsilon}
\def\eth{\matheth}
\def\smallint{{\textstyle\int}\limits}
@@ -2552,16 +2527,78 @@
\cs_set:Npn \| {\Vert}
\cs_set:Npn \mathellipsis {\mathinner{\unicodeellipsis}}
\cs_set:Npn \cdots {\mathinner{\unicodecdots}}
-\cs_new_protected_nopar:Nn \um_setup_accents:
- {
- \def\widehat{\hat}
- \def\widetilde{\tilde}
- \def\overrightarrow{\vec}
- }
+\cs_new_protected_nopar:Nn \um_setup_accents: {
+ \cs_gset_protected_nopar:Npx \widehat {
+ \um_accent:nnn {} { \um_symfont_tl } { "0302 }
+ }
+ \cs_gset_protected_nopar:Npx \widetilde {
+ \um_accent:nnn {} { \um_symfont_tl } { "0303 }
+ }
+ \cs_gset_protected_nopar:Npx \overleftarrow {
+ \um_accent:nnn {} { \um_symfont_tl } { "20D6 }
+ }
+ \cs_gset_protected_nopar:Npx \overrightarrow {
+ \um_accent:nnn {} { \um_symfont_tl } { "20D7 }
+ }
+ \cs_gset_protected_nopar:Npx \overleftrightarrow {
+ \um_accent:nnn {} { \um_symfont_tl } { "20E1 }
+ }
+ \cs_gset_protected_nopar:Npx \wideutilde {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "0330 }
+ }
+ \cs_gset_protected_nopar:Npx \underrightharpoondown {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EC }
+ }
+ \cs_gset_protected_nopar:Npx \underleftharpoondown {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20ED }
+ }
+ \cs_gset_protected_nopar:Npx \underleftarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EE }
+ }
+ \cs_gset_protected_nopar:Npx \underrightarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "20EF }
+ }
+ \cs_gset_protected_nopar:Npx \underleftrightarrow {
+ \um_accent:nnn {bottom} { \um_symfont_tl } { "034D }
+ }
+}
\cs_set_eq:NN \um_text_slash: \slash
\cs_set_protected:Npn \slash {
\mode_if_math:TF {\mathslash} {\um_text_slash:}
}
+\tl_new:N \l_not_token_name_tl
+
+\cs_new:Npn \not_newnot:N #1 {
+ \tl_set:Nx \l_not_token_name_tl { \token_to_str:N #1 }
+ \tl_if_empty:xF { \tl_tail:V \l_not_token_name_tl } {
+ \tl_set:Nx \l_not_token_name_tl { \tl_tail:V \l_not_token_name_tl }
+ }
+ \cs_if_exist:cTF { n \l_not_token_name_tl } {
+ \use:c { n \l_not_token_name_tl }
+ } {
+ \cs_if_exist:cTF { not \l_not_token_name_tl } {
+ \use:c { not \l_not_token_name_tl }
+ } {
+ \not_oldnot: #1 %\l_not_token_name_tl
+ }
+ }
+}
+
+\cs_new_protected_nopar:Nn \um_setup_negations: {
+ \cs_set_eq:NN \not_oldnot: \not
+ \cs_set_eq:NN \not \not_newnot:N
+
+ \cs_gset:cpn { not= } { \neq }
+ \cs_gset:cpn { not< } { \nless }
+ \cs_gset:cpn { not> } { \ngtr }
+ \cs_gset:Npn \ngets { \nleftarrow }
+ \cs_gset:Npn \nsimeq { \nsime }
+ \cs_gset:Npn \nequal { \ne }
+ \cs_gset:Npn \nle { \nleq }
+ \cs_gset:Npn \nge { \ngeq }
+ \cs_gset:Npn \ngreater { \ngtr }
+ \cs_gset:Npn \nforksnot { \forks }
+}
\AtEndOfPackageFile * { mathtools } {
\chk_if_free_cs:N \g_um_empty_fam
\newfam \g_um_empty_fam
@@ -2613,6 +2650,31 @@
}
\box_use_clear:N \l_tmpa_box
}
+\AtEndOfPackageFile * { mathtools } {
+ \let\MToverbracket =\overbracket
+ \let\MTunderbracket=\underbracket
+
+ \AtBeginDocument {
+ \msg_warning:nn { unicode-math } { mathtools-overbracket }
+
+\def\downbracketfill#1#2{%
+ \edef\l_MT_bracketheight_fdim{.27ex}%
+ \downbracketend{#1}{#2}
+ \leaders \vrule \@height #1 \@depth \z@ \hfill
+ \downbracketend{#1}{#2}%
+ }
+\def\upbracketfill#1#2{%
+ \edef\l_MT_bracketheight_fdim{.27ex}%
+ \upbracketend{#1}{#2}
+ \leaders \vrule \@height \z@ \@depth #1 \hfill
+ \upbracketend{#1}{#2}%
+ }
+\let\Uoverbracket =\overbracket
+\let\Uunderbracket=\underbracket
+ \let\overbracket =\MToverbracket
+ \let\underbracket =\MTunderbracket
+ }
+}
\msg_warning:nn { unicode-math } { mathtools-colon }
\NewDocumentCommand \dblcolon { } { \Colon }
\NewDocumentCommand \coloneqq { } { \coloneq }
diff --git a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
index 29c2367cfed..98e3dea75aa 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.lua
@@ -7,6 +7,7 @@
-- unicode-math.dtx (with options: `lua')
-- Copyright 2006-2011 Will Robertson <will.robertson@latex-project.org>
-- Copyright 2010-2011 Philipp Stephani <st_philipp@yahoo.de>
+-- Copyright 2012 Khaled Hosny <khaledhosny@eglug.org>
--
-- This package is free software and may be redistributed and/or modified under
-- the conditions of the LaTeX Project Public License, version 1.3c or higher
@@ -15,7 +16,7 @@
-- This work is "author-maintained" by Will Robertson.
local err, warn, info, log = luatexbase.provides_module({
name = "unicode-math",
- date = "2011/04/23",
+ date = "2012/04/23",
version = 0.1,
description = "Unicode math typesetting for LuaLaTeX",
author = "Khaled Hosny, Will Robertson, Philipp Stephani",
@@ -29,3 +30,13 @@ local function set_sscale_dimens(fontdata)
end
end
luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_math.set_sscale_dimens")
+local function patch_cambria_domh(fontdata)
+ local mc = fontdata.MathConstants
+ local mh = 2800 / fontdata.units * fontdata.size
+ if fontdata.psname == "CambriaMath" and mc then
+ if mc.DisplayOperatorMinHeight < mh then
+ mc.DisplayOperatorMinHeight = mh
+ end
+ end
+end
+luatexbase.add_to_callback("luaotfload.patch_font", patch_cambria_domh, "cambria.domh")
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 33c2786fa08..b272784c348 100644
--- a/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
+++ b/Master/texmf-dist/tex/latex/unicode-math/unicode-math.sty
@@ -7,8 +7,9 @@
%% unicode-math.dtx (with options: `preamble')
%% unicode-math.dtx (with options: `msg')
%% unicode-math.dtx (with options: `load')
-%% Copyright 2006-2011 Will Robertson <will.robertson@latex-project.org>
+%% Copyright 2006-2012 Will Robertson <will.robertson@latex-project.org>
%% Copyright 2010-2011 Philipp Stephani <st_philipp@yahoo.de>
+%% Copyright 2012 Khaled Hosny <khaledhosny@eglug.org>
%%
%% This package is free software and may be redistributed and/or modified under
%% the conditions of the LaTeX Project Public License, version 1.3c or higher
@@ -16,9 +17,23 @@
%%
%% This work is "author-maintained" by Will Robertson.
\ProvidesPackage{unicode-math}
- [2011/09/19 v0.6a Unicode maths in XeLaTeX and LuaLaTeX]
+ [2012/05/30 v0.7 Unicode maths in XeLaTeX and LuaLaTeX]
\usepackage{ifxetex,ifluatex}
-\ifxetex\else\ifluatex\else
+\ifxetex
+ \ifdim\number\XeTeXversion\XeTeXrevision in<0.9998in%
+ \PackageError{unicode-math}{%
+ Cannot run with this version of XeTeX!\MessageBreak
+ You need XeTeX 0.9998 or newer.%
+ }\@ehd
+ \fi
+\else\ifluatex
+ \ifnum\luatexversion<64%
+ \PackageError{unicode-math}{%
+ Cannot run with this version of LuaTeX!\MessageBreak
+ You need LuaTeX 0.64 or newer.%
+ }\@ehd
+ \fi
+\else
\PackageError{unicode-math}{%
Cannot be run with pdfLaTeX!\MessageBreak
Use XeLaTeX or LuaLaTeX instead.%
@@ -37,16 +52,11 @@
\cs_generate_variant:Nn \prop_gput:Nnn {Nxn}
\cs_generate_variant:Nn \prop_get:NnN {cxN}
\cs_generate_variant:Nn \prop_if_in:NnTF {cx}
-\cs_new:Npn \exp_args:NNcc #1#2#3#4 {
+\cs_set:Npn \exp_args:NNcc #1#2#3#4 {
\exp_after:wN #1 \exp_after:wN #2
\cs:w #3 \exp_after:wN \cs_end:
\cs:w #4 \cs_end:
}
-\cs_set_eq:NN \tl_replace_in:Nnn \tl_replace_once:Nnn
-\cs_new_protected_nopar:Npn \bool_const:Nn #1 #2 {
- \bool_new:N #1
- \bool_set:Nn #1 { #2 }
-}
\bool_new:N \l_um_ot_math_bool
\bool_new:N \l_um_init_bool
\bool_new:N \l_um_implicit_alph_bool
@@ -335,15 +345,6 @@
{
Setup~ alphabet:~ #1.
}
-\msg_new:nnnn { unicode-math } { no-font-selected } {
- You've~ loaded~ the~ unicode-math~ package,~ but~ you~ forgot~ to~ select~
- a~ Unicode~ math~ font.~ Please~ select~ one~ with~ the~ \token_to_str:N \setmathfont \\
- command.
-} {
- Loading~ the~ unicode-math~ package~ without~ using~ a~ Unicode~ math~ font~
- is~ not~ supported.~ Either~ select~ a~ Unicode~ math~ font,~ or~ don't~
- load~ the~ unicode-math~ package.
-}
\msg_new:nnn { unicode-math } { missing-alphabets }
{
Missing~math~alphabets~in~font~ "\fontname\l_um_font" \\ \\
@@ -362,6 +363,15 @@
{
I'm~ going~ to~ patch~ macro~ #1.
}
+\msg_new:nnn { unicode-math } { mathtools-overbracket } {
+ Using~ \token_to_str:N \overbracket\ and~
+ \token_to_str:N \underbracke\ from~
+ `mathtools'~ package.\\
+ \\
+ Use~ \token_to_str:N \Uoverbracket\ and~
+ \token_to_str:N \Uunderbracke\ for~
+ original~ `unicode-math'~ definition.
+}
\msg_new:nnn { unicode-math } { mathtools-colon } {
I'm~ going~ to~ overwrite~ the~ following~ commands~ from~
the~ `mathtools'~ package: \\ \\
@@ -387,5 +397,5 @@
or~ \token_to_str:N \doublecolonsep \c_space_tl won't~ have~
any~ effect~ on~ the~ re-defined~ commands.
}
-\luatex_if_engine:T { \usepackage{unicode-math-luatex} \endinput }
-\xetex_if_engine:T { \usepackage{unicode-math-xetex} \endinput }
+\luatex_if_engine:T { \RequirePackage{unicode-math-luatex} \endinput }
+\xetex_if_engine:T { \RequirePackage{unicode-math-xetex} \endinput }