summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
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
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')
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/README59
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/unicode-math-testsuite.pdfbin2365307 -> 2280136 bytes
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/unicode-math.pdfbin396188 -> 408085 bytes
-rw-r--r--Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdfbin1543548 -> 1821239 bytes
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/Makefile2
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx586
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx352
-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
12 files changed, 953 insertions, 614 deletions
diff --git a/Master/texmf-dist/doc/latex/unicode-math/README b/Master/texmf-dist/doc/latex/unicode-math/README
index e2083c21d84..b438c21793b 100644
--- a/Master/texmf-dist/doc/latex/unicode-math/README
+++ b/Master/texmf-dist/doc/latex/unicode-math/README
@@ -18,20 +18,22 @@ Unicode maths is currently supported to one degree or another by the fonts
- [Cambria Math][CM] (Microsoft),
- [Latin Modern Math][LM] (Bogusław Jackowski, Janusz M. Nowacki)
+ - [TeX Gyre Pagella Math][PM] (Bogusław Jackowski, Janusz M. Nowacki)
- [Asana Math][AM] (Apostolos Syropolous),
- [Neo Euler][NE] (Khaled Hosny),
- [STIX][SM] (STI Pub), and
- [XITS Math][XM] (Khaled Hosny).
-With the exception of Cambria Math, which is proprietry, and Latin Modern Math,
-which is released under the free [GUST Font License][GFL], the fonts above
-are all freely available and released under the [Open Font Licence][OFL].
+With the exception of Cambria Math, which is proprietry, the fonts above
+are all freely available and released under open source licences
+(the [GUST Font License][GFL] and [Open Font Licence][OFL]).
I'm always looking for new fonts to test with, so please let me know of any
new releases.
[CM]: http://www.ascenderfonts.com/font/cambria-regular.aspx
[LM]: http://www.gust.org.pl/projects/e-foundry/lm-math
+[PM]: http://www.ctan.org/pkg/tex-gyre-math-pagella
[AM]: http://www.ctan.org/tex-archive/fonts/Asana-Math/
[NE]: http://github.com/khaledhosny/euler-otf
[SM]: http://www.aip.org/stixfonts/
@@ -55,18 +57,13 @@ Furthermore, it will be in a different font.
REQUIREMENTS
------------
-If you're using an up-to-date TeX Live 2011 or MiKTeX 2.9 then there'll be no problems.
-Otherwise, read on.
+If you're using an up-to-date TeX Live 2011/2012 or MiKTeX 2.9 then there'll
+be no problems. Otherwise, read on.
As well as running XeTeX or LuaTeX, this package requires recent versions of
the `fontspec`, `expl3`, `xpackages`, `catchfile`, `trimspaces`,
`filehook`, and `lualatex-math` packages.
-For some additional features you need LuaTeX 0.65 or later, which can be
-updated using [TLContrib][TLC] if you're still using TeX Live 2010.
-
-[TLC]: http://tlcontrib.metatex.org)
-
MAINTENANCE
-----------
@@ -85,8 +82,9 @@ Please file bug reports with minimal examples:
INSTALLATION
------------
-If you are using TeX Live 2010 or later, you may install the latest release
-version of the package with
+If you are using the currently supported version of TeX Live (about to be 2012
+at time of writing), you may install the latest release version of the package
+with
sudo tlmgr update unicode-math
@@ -144,16 +142,40 @@ Subsequently, the test suite may be executed with
make check
-Both of these operations will take quite some time and require ImageMagick's
-`convert` tool to be installed. They are only necessary if you wish to make
-changes to unicode-math yourself (be sure to initialise the test suite
-*before* any changes are made to the package) and you wish to ensure that your
-changes have not affected the standard behaviour.
+Both of these operations will take quite some time and require ImageMagick's
+`convert` tool to be installed.
+They are only necessary if you wish to make changes to unicode-math yourself
+(be sure to initialise the test suite *before* any changes are made to the
+package) and you wish to ensure that your changes have not affected the
+standard behaviour.
CHANGE HISTORY
--------------
+- v0.7 (2012/05/30): The TeX Live 2012 release.
+
+ * Most changes (and all significant ones) in this release thanks to Khaled
+ Hosny, who is now credited as an author of the package.
+ * Many improvements for XeTeX support to take advantage of the new engine
+ (v0.9998) in TL2012.
+ * As a result, `\resetmathfont` is no longer required.
+ * Improve `\not` to use pre-combined glyphs where possible.
+ * LM Math is loaded by default.
+ * Support bottom accents.
+ * And add `\wideutilde`.
+ * The ‘symbols’ document is somewhat better organised and contains
+ information on whether a symbol is defined in plain TeX or amssymb.
+ * Various other minor fixes and additions:
+ * `\underleftrightarrow` added for fonts that support it.
+ * Don’t overwrite mathtool’s `\overbracket` and `\underbracket`.
+ * Bug in `[range=...]` parsing fixed.
+ * Add `\longdivision`.
+ * Add `\lgroup` and `\rgroup`.
+ * Fix ‘moustache’ delimiters.
+ * `\openbox` renamed to `\mathvisiblespace`, since it is already defined
+ in amsthm as an empty box.
+
- v0.6a (2011/09/19)
* Always a bug that slips through the cracks! Fixes `\left.` and `\right.`
@@ -280,5 +302,6 @@ and the test suite for this package
- testfiles/*.ltx.
____________________________________
-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> \ No newline at end of file
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 392b519c1c7..20cf3d72051 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 a56d49b31b3..a7ace83a454 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/doc/latex/unicode-math/unimath-symbols.pdf b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf
index f27de4fe8e9..1133fda8ec4 100644
--- a/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf
+++ b/Master/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/unicode-math/Makefile b/Master/texmf-dist/source/latex/unicode-math/Makefile
index 807cda3fe6e..74bec7e2f19 100644
--- a/Master/texmf-dist/source/latex/unicode-math/Makefile
+++ b/Master/texmf-dist/source/latex/unicode-math/Makefile
@@ -70,7 +70,7 @@ hometree = `kpsewhich -var-value=TEXMFHOME`
PKGSOURCE = $(PKG).dtx $(TBL) Makefile
DOC = $(PKG).pdf $(SUITE).pdf README $(XMPL) $(SYM).pdf
-CTANFILES = $(PKGSOURCE) $(DOC) $(testdir)
+CTANFILES = $(PKGSOURCE) $(XMPL) $(SYM).ltx $(DOC) $(testdir)
BUILDCTAN = $(addprefix $(builddir)/,$(CTANFILES))
BUILDDOC = $(addprefix $(builddir)/,$(DOC))
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 000f6953597..c045a13e3c7 100644
--- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
+++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
@@ -8,8 +8,9 @@
\keepsilent
\let\MetaPrefix\DoubleperCent
\declarepreamble\texpreamble
-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
@@ -21,6 +22,7 @@ This work is "author-maintained" by Will Robertson.
\declarepreamble\luapreamble
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
@@ -58,7 +60,7 @@ This work is "author-maintained" by Will Robertson.
%<preamble&XE>\ProvidesPackage{unicode-math-xetex}
%<preamble&LU>\ProvidesPackage{unicode-math-luatex}
%<*preamble>
- [2011/09/19 v0.6a Unicode maths in XeLaTeX and LuaLaTeX]
+ [2012/05/30 v0.7 Unicode maths in XeLaTeX and LuaLaTeX]
%</preamble>
%<*internal>
\documentclass[a4paper]{ltxdoc}
@@ -74,7 +76,7 @@ This work is "author-maintained" by Will Robertson.
% ^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \title{Experimental Unicode mathematical typesetting: The \pkg{unicode-math} package}
-% \author{Will Robertson and Philipp Stephani\\
+% \author{Will Robertson, Philipp Stephani and Khaled Hosny\\
% \texttt{will.robertson@latex-project.org}}
% \date{\umfiledate \qquad \umfileversion}
%
@@ -110,11 +112,11 @@ This work is "author-maintained" by Will Robertson.
%
% \end{abstract}
%
-% \newpage
-% \tableofcontents
+% \doparttoc\faketableofcontents
%
% \newpage
% \part{User documentation}
+% \parttoc
% \section{Introduction}
%
% This document describes the \pkg{unicode-math} package, which is an
@@ -172,6 +174,7 @@ This work is "author-maintained" by Will Robertson.
%
% Once the package is loaded, traditional TFM-based fonts are not supported any more;
% you can only switch to a different OpenType math font using the \cs{setmathfont} command.
+% If you do not load an OpenType maths font before |\begin{document}|, Latin Modern Math (see above) will be loaded automatically.
%
%
% \subsection{Package options}
@@ -228,10 +231,9 @@ This work is "author-maintained" by Will Robertson.
%
% In some cases, \XeTeX's math support is either missing or I have not
% discovered how to access features for various types of maths construct.
-% An example of this are horizontal extensible symbols, such as underbraces,
-% overbraces, and arrows that can grow longer if necessary. Behaviour with
-% such symbols is not necessarily going to be consistent; please report
-% problem areas to me.
+% An example of this are horizontal extensible symbols, such as arrows that can
+% grow longer if necessary. Behaviour with such symbols is not necessarily
+% going to be consistent; please report problem areas to me.
%
% Symbols for maths characters have been inherited from the STIX project and
% may change slightly in the long term. We have tried to preserve backwards
@@ -288,13 +290,6 @@ This work is "author-maintained" by Will Robertson.
% the same math type, such as \cs{mathopen}, or complete math styles 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.
@@ -613,11 +608,11 @@ This work is "author-maintained" by Will Robertson.
% \\ \cmidrule(r){1-2}\cmidrule(l){3-3}
% Upright & Serif & $\mathup\nabla$ \\
% & Bold serif & $\mathbfup\nabla$ \\
-% & Bold sans & \umfont\char"1D76F \\
+% & Bold sans & $\mathbfsfup\nabla$ \\
% \cmidrule(lr){1-2}\cmidrule(lr){3-3}
% Italic & Serif & $\mathit\nabla$ \\
% & Bold serif & $\mathbfit\nabla$ \\
-% & Bold sans & \umfont\char"1D7A9 \\
+% & Bold sans & $\mathbfsfit\nabla$ \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -658,8 +653,8 @@ This work is "author-maintained" by Will Robertson.
% & Italic & $\mathit\partial$ \\
% Bold & Upright & $\mathbfup\partial$ \\
% & Italic & $\mathbfit\partial$ \\
-% Sans bold & Upright & \umfont\char"1D789 \\
-% & Italic & \umfont\char"1D7C3 \\
+% Sans bold & Upright & $\mathbfsfup\partial$ \\
+% & Italic & $\mathbfsfit\partial$ \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -894,10 +889,11 @@ This work is "author-maintained" by Will Robertson.
% versions. Among these are \cs{hat} and \cs{tilde}; the corresponding growing
% versions are called \cs{widehat} and \cs{widetilde}, respectively.
%
-% \XeTeX\ and older versions of \LuaTeX\ do not support this distinction, however,
-% and \emph{all} accents there will grow automatically. (I.e., \cs{hat} and \cs{widehat}
-% are equivalent.) Unfortunately this is not always appropriate. As of \LuaTeX\ v0.65,
-% these wide/non-wide commands will again behave in their expected manner.
+% Older versions of \XeTeX\ and \LuaTeX\ did not support this distinction,
+% however, and \emph{all} accents there were growing automatically. (I.e.,
+% \cs{hat} and \cs{widehat} are equivalent.) As of \LuaTeX\ v0.65 and \XeTeX\
+% v0.9998, these wide/non-wide commands will again behave in their expected
+% manner.
%
%
% \subsubsection{Pre-drawn fraction characters}
@@ -905,13 +901,12 @@ This work is "author-maintained" by Will Robertson.
% Pre-drawn fractions \unichar{00BC}--\unichar{00BE}, \unichar{2150}--\unichar{215E}
% are not suitable for use in mathematics output. However, they can be useful
% as input characters to abbreviate common fractions.
-%
-% \centerline{\fontspec{Calibri}
-% ¼ ½ ¾ ↉ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞}
-%
-% For example, instead of writing `|\tfrac12 x|', it's more readable to have
-% `|½x|' in the source instead. (There are four missing glyphs above for
-% $0/3$, $1/7$, $1/9$, and $1/10$; I don't have a font that contains them.)
+% \begin{center}
+% \fontspec{DejaVuSerif.ttf} ^^A available in TeX Live 2012 if not earlier
+% ¼ ½ ¾ ↉ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞
+% \end{center}
+% For example, instead of writing `|\tfrac12 x|', you may consider it more readable to have
+% `|½x|' in the source instead.
%
% If the \cs{tfrac} command exists (i.e., if \pkg{amsmath} is loaded or
% you have specially defined \cs{tfrac} for this purpose), it will be used
@@ -997,21 +992,6 @@ This work is "author-maintained" by Will Robertson.
% \tablabel{uptriangles}
% \end{table}
%
-% \subsubsection{Warning messages}
-%
-% This package can produce a number of informational messages to try and inform the user when something might be going wrong due to package conflicts or something else.
-% As an experimental feature, these can be turn off on an individual basis with the package option |warnings-off| which takes a comma-separated list of warnings to suppress.
-% A warning will give you its name when printed on the console output; e.g.,
-% \begin{Verbatim}
-% * unicode-math warning: "mathtools-colon"
-% *
-% * ... <warning message> ...
-% \end{Verbatim}
-% This warning could be suppressed by loading the package as follows:
-% \begin{Verbatim}
-% \usepackage[warnings-off={mathtools-colon}]{unicode-math}
-% \end{Verbatim}
-%
% \iffalse
% \subsubsection{Normalising some input characters}
%
@@ -1035,7 +1015,24 @@ This work is "author-maintained" by Will Robertson.
% (Not yet implemented.)
% \fi
%
-% \subsubsection{Programmer's interface}
+% \section{Advanced}
+%
+% \subsection{Warning messages}
+%
+% This package can produce a number of informational messages to try and inform the user when something might be going wrong due to package conflicts or something else.
+% As an experimental feature, these can be turn off on an individual basis with the package option |warnings-off| which takes a comma-separated list of warnings to suppress.
+% A warning will give you its name when printed on the console output; e.g.,
+% \begin{Verbatim}[gobble=2]
+% * unicode-math warning: "mathtools-colon"
+% *
+% * ... <warning message> ...
+% \end{Verbatim}
+% This warning could be suppressed by loading the package as follows:
+% \begin{Verbatim}[gobble=2]
+% \usepackage[warnings-off={mathtools-colon}]{unicode-math}
+% \end{Verbatim}
+%
+% \subsection{Programmer's interface}
%
% (Tentative and under construction.)
% If you are writing some code that needs to know the current
@@ -1047,27 +1044,41 @@ This work is "author-maintained" by Will Robertson.
%
% \StopEventually{}
%
+% \clearpage
% \part{Package implementation}
+% \parttoc
+%
+% \section{Header code}
%
% We (later on) bifurcate the package based on the engine being used.
% \begin{macrocode}
%<*load>
-\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 }
%</load>
% \end{macrocode}
-%
-% \section{Header code}
-%
-% The shared part of the code starts here before the split mentioned above.
-%
+% The shared part of the code starts here before the split above.
% \begin{macrocode}
%<*preamble&!XE&!LU>
% \end{macrocode}
%
% \begin{macrocode}
\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.%
@@ -1085,7 +1096,6 @@ This work is "author-maintained" by Will Robertson.
\RequirePackage{fix-cm} % avoid some warnings
\RequirePackage{filehook}[2011/01/03]
% \end{macrocode}
-%
% Start using \LaTeX3 --- finally!
% \begin{macrocode}
\ExplSyntaxOn
@@ -1099,31 +1109,19 @@ This work is "author-maintained" by Will Robertson.
\cs_generate_variant:Nn \prop_get:NnN {cxN}
\cs_generate_variant:Nn \prop_if_in:NnTF {cx}
% \end{macrocode}
-%
+% Extra expansion command:
% \begin{macrocode}
-\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:
}
% \end{macrocode}
%
-% For for old command in lualatex-math: (Sept 2011)
-% \begin{macrocode}
-\cs_set_eq:NN \tl_replace_in:Nnn \tl_replace_once:Nnn
-% \end{macrocode}
-%
%
% \paragraph{Conditionals}
%
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \bool_const:Nn #1 #2 {
- \bool_new:N #1
- \bool_set:Nn #1 { #2 }
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
\bool_new:N \l_um_ot_math_bool
\bool_new:N \l_um_init_bool
\bool_new:N \l_um_implicit_alph_bool
@@ -1489,7 +1487,7 @@ This work is "author-maintained" by Will Robertson.
%<*lua>
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",
@@ -1509,6 +1507,22 @@ local function set_sscale_dimens(fontdata)
end
end
luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_math.set_sscale_dimens")
+% \end{macrocode}
+%
+% Cambria Math has too small \texttt{DisplayOperatorMinHeight} constant, so we
+% patch it to amore accebtable value.
+%
+% \begin{macrocode}
+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")
%</lua>
% \end{macrocode}
%
@@ -1541,19 +1555,11 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \end{macrocode}
%
% \begin{macrocode}
-%<XE>\bool_set_false:N \c_um_have_fixed_accents_bool
-%<*LU>
-\bool_const:Nn \c_um_have_fixed_accents_bool
- { \int_compare_p:n { \luatexversion > 64 } }
-%</LU>
-% \end{macrocode}
-%
-% \begin{macrocode}
%<*LU>
\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 ]
%</LU>
% \end{macrocode}
%
@@ -2110,7 +2116,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
%<*package&(XE|LU)>
% \end{macrocode}
%
-% \subsection{Overcoming \cmd\@onlypreamble}
+% \subsection{Overcoming \texorpdfstring{\cmd\@onlypreamble}{\textbackslash @onlypreamble}}
%
% The requirement of only setting up the maths fonts in the preamble is now removed. The following list might be overly ambitious.
% \begin{macrocode}
@@ -2183,8 +2189,6 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\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}
@@ -2194,18 +2198,20 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\cs_gset_protected_nopar:cpx {r \cs_to_str:N #2}
{ \um_delimiter:Nnn \mathclose {#1} {#4} }
}
-%<*LU>
+ \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 }
}
-%</LU>
}{
\um_set_mathcode:nnn {#4} {#3} {#1}
}
@@ -2217,6 +2223,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\edef\mathfence{\string\mathfence}
\edef\mathover{\string\mathover}
\edef\mathunder{\string\mathunder}
+\edef\mathbotaccent{\string\mathbotaccent}
% \end{macrocode}
%
%
@@ -2224,7 +2231,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \darg{Symbol font name}
% \darg{Macro to assign}
% \darg{Glyph slot}
-% In the examples following, say we're defining for the symbol \cmd\sum ($\sum$).
+% In the examples following, say we're defining for the symbol \cmd\sum\ ($\sum$).
% In order for literal Unicode characters to be used in the source and still
% have the correct limits behaviour, big operators are made math-active.
% This involves three steps:
@@ -2271,9 +2278,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \begin{macro}{\um_set_delcode:nnn}
% \begin{macro}{\um_radical:nn}
% \begin{macro}{\um_delimiter:Nnn}
-% \begin{macro}{\um_accent:Nnn}
-% \begin{macro}{\um_wide_top_accent:Nnn}
-% \begin{macro}{\um_wide_bottom_accent:Nnn}
+% \begin{macro}{\um_accent:nnn}
% \begin{macro}{\um_accent_keyword:}
% These are all wrappers for the primitive commands that take numerical
% input only.
@@ -2299,31 +2304,9 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\cs_new:Nn \um_delimiter:Nnn {
\Udelimiter \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
}
-\cs_new:Nn \um_accent:Nnn
-%<*XE>
- {
- \Umathaccent \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
- }
-%</XE>
-%<*LU>
- {
- \Umathaccent \c_um_accent_keyword_tl
- \mathchar@type#1 \csname sym#2\endcsname #3 \scan_stop:
- }
-%</LU>
-%<*LU>
- \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 { }
- }
-%</LU>
+\cs_new:Nn \um_accent:nnn {
+ \Umathaccent #1~ \mathchar@type\mathaccent \use:c { sym #2 } #3 \scan_stop:
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -2338,24 +2321,6 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\um_overbrace:nnn}
-% \begin{macro}{\um_underbrace:nnn}
-% \LuaTeX\ functions for defining over/under-braces
-% \begin{macrocode}
-\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}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
%
%
% \begin{macro}{\char_gmake_mathactive:N}
@@ -2374,38 +2339,6 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
%
% \subsection{The main \cs{setmathfont} macro}
%
-% \begin{macro}{\um_saved_ltxe_glb_settings:}
-% Save the original definition of \cmd{\glb@settings} in a macro.
-% \begin{macrocode}
-\cs_new_eq:NN \um_saved_ltxe_glb_settings: \glb@settings
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\glb@settings}
-% We issue an error if the user tried to typeset math before setting a font.
-% \begin{macrocode}
-\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 }
-}
-% \end{macrocode}
-% \end{macro}
-%
% Using a |range| including large character sets such as \cmd\mathrel,
% \cmd\mathalpha, \etc, is \emph{very slow}!
% I hope to improve the performance somehow.
@@ -2421,11 +2354,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \item Erase any conception \LaTeX\ has of previously defined math symbol fonts;
% this allows \cmd\DeclareSymbolFont\ at any point in the document.
% \begin{macrocode}
- \let\glb@currsize\relax
-% \end{macrocode}
-% \item Restore \LaTeXe\ kernel macro to apply settings instead of giving an error.
-% \begin{macrocode}
- \cs_set_eq:NN \glb@settings \um_saved_ltxe_glb_settings:
+ \cs_set_eq:NN \glb@currsize \scan_stop:
% \end{macrocode}
% \item To start with, assume we're defining the font for every math symbol character.
% \begin{macrocode}
@@ -2492,6 +2421,15 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\SetSymbolFont{\um_symfont_tl}{\l_um_mversion_tl}
{\encodingdefault}{\l_um_family_tl}{\mddefault}{\updefault}
% \end{macrocode}
+% Set the bold math version.
+% \begin{macrocode}
+ \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}
+ }
+% \end{macrocode}
% Declare the math sizes (i.e., scaling of superscripts) for the specific
% values for this font,
% and set defaults for math fams two and three for legacy compatibility:
@@ -2521,6 +2459,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\um_setup_accents:
\um_setup_delcodes:
\um_setup_alphabets:
+ \um_setup_negations:
% \end{macrocode}
% Prevent spaces, and that's it:
% \begin{macrocode}
@@ -2575,6 +2514,13 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
} {\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}
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2598,6 +2544,13 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
} {\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}
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2609,14 +2562,10 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
%<LU> { \directlua{fontspec.mathfontdimen("l_um_font","#2")} }
% \end{macrocode}
%
-% \begin{macro}{\resetmathfont}
+% Backward compatibility alias.
% \begin{macrocode}
-\DeclareDocumentCommand \resetmathfont { O{} m } {
- \bool_set_false:N \g_um_mainfont_already_set_bool
- \setmathfont[#1]{#2}
-}
+\cs_set_eq:NN \resetmathfont \setmathfont
% \end{macrocode}
-% \end{macro}
%
%
% \begin{macro}{\um_fontspec_select_font:}
@@ -2625,7 +2574,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\cs_new:Nn \um_fontspec_select_font: {
\tl_set:Nx \l_um_font_keyval_tl {
%<LU> Renderer = Basic,
- BoldFont = {}, ItalicFont = {},
+ BoldItalicFont = {}, ItalicFont = {},
Script = Math,
SizeFeatures = {
{Size = \tf@size-} ,
@@ -2888,7 +2837,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% We organise radicals in the same way as nolimits-operators.
% \begin{macrocode}
\tl_new:N \l_um_radicals_tl
-\tl_set:Nn \l_um_radicals_tl {\sqrt}
+\tl_set:Nn \l_um_radicals_tl {\sqrt \longdivision}
% \end{macrocode}
% \end{macro}
%
@@ -3283,7 +3232,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
{
\mathord,\mathalpha,\mathop,\mathbin,\mathrel,
\mathopen,\mathclose,\mathpunct,\mathaccent,
- \mathfence,\mathover,\mathunder
+ \mathfence,\mathover,\mathunder,\mathbotaccent
}
% \end{macrocode}
%
@@ -3379,7 +3328,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% 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 } }
}
@@ -3395,20 +3344,20 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\um_int_if_range_matches_slot:nnT}
+% \begin{macro}{\um_int_if_slot_in_range:nnT}
% A `numrange' is like |-2,5-8,12,17-| (can be unsorted).
%
% Four cases, four argument types:
% \begin{Verbatim}
-% #2 #3 #4
-% [ 1] - [qn] - [ ] qs
-% [ 1] - [ ] - [qn-] qs
-% [ ] - [ 3] - [qn-] qs
-% [ 1] - [ 3] - [qn-] qs
+% input #2 #3 #4
+% "1 " [ 1] - [qn] - [ ] qs
+% "1- " [ 1] - [ ] - [qn-] qs
+% " -3" [ ] - [ 3] - [qn-] qs
+% "1-3" [ 1] - [ 3] - [qn-] qs
% \end{Verbatim}
%
% \begin{macrocode}
-\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} }
% \end{macrocode}
%
@@ -4685,24 +4634,11 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% In time, the case statement inside |set_mathsymbol| will be moved in here
% to avoid re-running it every time.
% \begin{macrocode}
-\cs_new:Npn \um_symbol_setup:
-%<*XE>
- {
- \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
- \prg_case_tl:Nnn ##3 { \mathover {} \mathunder {} }
- {
- \exp_not:n {\_um_sym:nnn{##1}{##2}{##3}}
- }
- }
- }
-%</XE>
-%<*LU>
- {
- \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}}
}
-%</LU>
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -4781,7 +4717,8 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\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
}
}
@@ -4808,6 +4745,21 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \begin{macrocode}
% \end{macrocode}
%
+% \section{Fall-back font}
+%
+% Want to load Latin Modern Math if nothing else.
+% \begin{macrocode}
+\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}
+ }
+ }
+% \end{macrocode}
+%
% \section{Epilogue}
%
% Lots of little things to tidy up.
@@ -5429,51 +5381,6 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\um_setup_active_frac:
% \end{macrocode}
%
-% \subsection{\XeTeX\ over- and under- brace, paren, bracket}
-% Thanks to Claudio Beccari for this code.
-% \begin{macrocode}
-%<*XE>
-\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
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
-\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} ) }
-%</XE>
-% \end{macrocode}
-%
% \subsection{Synonyms and all the rest}
%
% These are symbols with multiple names. Eventually to be taken care of
@@ -5498,6 +5405,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\def\gets{\leftarrow}
\def\mathring{\ocirc}
\def\lnot{\neg}
+\def\longdivision{\longdivisionsign}
% \end{macrocode}
% These are somewhat odd: (and their usual Unicode uprightness does not match their amssymb glyphs)
% \begin{macrocode}
@@ -5867,47 +5775,41 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \end{macrocode}
% \paragraph{Accents}
% \begin{macrocode}
-\cs_new_protected_nopar:Nn \um_setup_accents:
-%<*XE>
- {
- \def\widehat{\hat}
- \def\widetilde{\tilde}
- \def\overrightarrow{\vec}
- }
-%</XE>
-%<*LU>
- {
+\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 }
}
- }
-%</LU>
+ \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 }
+ }
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -5917,6 +5819,57 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
}
% \end{macrocode}
%
+% \paragraph{\cs{not}}
+% The situation of \cs{not} symbol is currently messy, in Unicode it is defined
+% as a combining mark so naturally it should be treated as a math accent,
+% however neither Lua\TeX\ nor \XeTeX\ correctly place it as it needs special
+% treatment compared to other accents, furthermore a math accent changes the
+% spacing of its nucleus, so \cs{not=} will be spaced as an ordinary not
+% relational symbol, which is undesired.
+%
+% Here modify \cs{not} to a macro that tries to use predefined negated symbols,
+% which would give better results in most cases, until there is more robust
+% solution in the engines.
+%
+% This code is based on an answer to a TeX -- Stack Exchange question by Enrico
+% Gregorio\footnote{\url{http://tex.stackexchange.com/a/47260/729}}.
+%
+% \begin{macrocode}
+\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 }
+}
+% \end{macrocode}
+%
% \paragraph{\pkg{mathtools}}
% \pkg{mathtools}’s |\cramped| command and others that make use of its internal version use an incorrect font dimension.
%
@@ -5982,6 +5935,45 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
}
%</XE>
% \end{macrocode}
+% \begin{macro}{\overbracket}
+% \begin{macro}{\underbracket}
+% \pkg{mathtools}’s |\overbracket| and |\underbracket| take optional
+% arguments and are defined in terms of rules, so we keep them, and rename
+% ours to |\Uoverbracket| and |\Uunderbracket|.
+% \begin{macrocode}
+\AtEndOfPackageFile * { mathtools } {
+ \let\MToverbracket =\overbracket
+ \let\MTunderbracket=\underbracket
+
+ \AtBeginDocument {
+ \msg_warning:nn { unicode-math } { mathtools-overbracket }
+
+ \def\downbracketfill#1#2{%
+% \end{macrocode}
+% Original definition used the height of |\braceld| which is not available
+% with Unicode fonts, so we are hard coding the $5/18$ex suggested by
+% \pkg{mathtools}’s documentation.
+% \begin{macrocode}
+ \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
+ }
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\dblcolon}
% \begin{macro}{\coloneqq}
@@ -6082,15 +6074,6 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
{
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" \\ \\
@@ -6109,6 +6092,15 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
{
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: \\ \\
@@ -6214,7 +6206,7 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
% \cmd\DeclareMathDelimiter\marg{symbol}\marg{type}\marg{sym.\ font}\marg{slot}\marg{sym.\ font}\marg{slot}
%
% \item[Radicals] Similar to delimiters (\cmd\DeclareMathRadical\ takes the same syntax) but
-% behave `weirdly'. \cmd\sqrt\ might very well be the only one.
+% behave `weirdly'.
% \end{description}
% In those cases, glyph slots in \emph{two} symbol fonts are required; one for the small (`regular') case,
% the other for situations when the glyph is larger. This is not the case in \XeTeX.
@@ -6467,21 +6459,19 @@ luatexbase.add_to_callback("luaotfload.patch_font", set_sscale_dimens, "unicode_
\usepackage[slash-delimiter=frac,nabla=literal]{unicode-math}
\usepackage{metalogo,hologo}
-\@ifundefined{HOLOGO@ReflectBox@\hologodriver}{%
- \@namedef{HOLOGO@ReflectBox@\hologodriver}{}%
-}{}
-
%\usepackage[rm,small]{titlesec}
-\setmainfont[Mapping=tex-text]{TeX Gyre Pagella}
-\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Candara}
+\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
+\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Candara}
\setmonofont[Scale=MatchLowercase]{Consolas}
\setmathfont{Cambria Math}
-\newfontface\umfont{STIXGeneral}
+\newfontface\umfont{XITS Math}
\usepackage{hypdoc}
\hypersetup{linktocpage}
+\usepackage{minitoc}
+
\linespread{1.069} % A bit more space between lines
\frenchspacing % Remove ugly extra space after punctuation
diff --git a/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx b/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx
index 451fd687ca5..7488731ccd3 100644
--- a/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx
+++ b/Master/texmf-dist/source/latex/unicode-math/unimath-symbols.ltx
@@ -1,3 +1,4 @@
+%!TEX TS-program = LuaLaTeX
%%%%%%%%%%%%%%%%%%%%%%%
% SYMBOLS DEFINED BY UNICODE-MATH
@@ -6,7 +7,7 @@
\documentclass{article}
\makeatletter
-\usepackage{booktabs,shortvrb,geometry,varwidth,textcomp,longtable,hyperref}
+\usepackage{booktabs,catchfile,shortvrb,geometry,metalogo,varwidth,textcomp,longtable,hyperref}
\geometry{margin=3cm}
\hypersetup{colorlinks,linkcolor=black}
@@ -15,69 +16,38 @@
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers={Lowercase,Monospaced}]{TeX Gyre Pagella}
-\usepackage{unicode-math}
-\setmathfont{XITS Math}
-
-\newcounter{lm}
-\setcounter{lm}{-1}
-\setmathfont[version=lm,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=CC6666}}]{lmmath-regular.otf}
-
-\newcounter{xits}
-\setcounter{xits}{-1}
-\setmathfont[version=xits,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=CCCC66}}]{xits-math.otf}
-
-\newcounter{lucida}
-\setcounter{lucida}{-1}
-\setmathfont[version=lucida,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=66CC66}}]{Lucida Math}
-
-\newcounter{lucibold}
-\setcounter{lucibold}{-1}
-\setmathfont[version=lucibold,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=66CC66}}]{Lucida Math Demibold}
-
-\newcounter{cambria}
-\setcounter{cambria}{-1}
-\setmathfont[version=cambria,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=66CCCC}}]{Cambria Math}
-
-\newcounter{asana}
-\setcounter{asana}{-1}
-\setmathfont[version=asana,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=6666CC}}]{Asana-Math.otf}
-
-\newcounter{euler}
-\setcounter{euler}{-1}
-\setmathfont[version=euler,SizeFeatures={
- {Size=-10, Colour=999999},
- {Size=10-, Colour=CC66CC}}]{Neo Euler}
-
+\usepackage[math-style=literal,bold-style=literal]{unicode-math}
+
\ExplSyntaxOn
-\fontspec_set_fontface:NNnn \lm \x {} {lmmath-regular.otf}
-\fontspec_set_fontface:NNnn \xits \x {} {xits-math.otf}
-\fontspec_set_fontface:NNnn \lucida \x {} {Lucida~ Math}
-\fontspec_set_fontface:NNnn \lucibold \x {} {Lucida~ Math~ Demibold}
-\fontspec_set_fontface:NNnn \cambria \x {} {Cambria~ Math}
-\fontspec_set_fontface:NNnn \asana \x {} {Asana-Math.otf}
-\fontspec_set_fontface:NNnn \euler \x {} {Neo~ Euler}
+\cs_generate_variant:Nn \fontspec_set_fontface:NNnn {c}
+
+\def\defmathfont#1#2#3{
+ \newcounter{#1}
+ \setcounter{#1}{-1}
+ \setmathfont[version=#1,SizeFeatures={
+ {Size=-10, Colour=999999},
+ {Size=10-, Colour=#3}}]{#2}
+ \fontspec_set_fontface:cNnn {#1} \x {ItalicFont={},BoldFont={}} {#2}
+}
\ExplSyntaxOff
+\defmathfont{lm}{lmmath-regular.otf}{CC6666}
+\defmathfont{xits}{xits-math.otf}{CCCC66}
+\defmathfont{lucida}{Lucida Bright Math OT}{66CC66}
+\defmathfont{lucibold}{Lucida Bright Math OT Demibold}{66CC66}
+\defmathfont{cambria}{Cambria Math}{66CCCC}
+\defmathfont{asana}{Asana-Math.otf}{6666CC}
+\defmathfont{pagella}{texgyrepagella-math.otf}{AA6666}
+\defmathfont{euler}{Neo Euler}{CC66CC}
+
+\def\INPUT{\input{unicode-math-table.tex}}
\def\TABLE{%
-\setlength\LTleft{-2cm}
\par\noindent
-\begin{longtable}[l]{@{}lcccccccll@{}}
+\begin{longtable}[l]{@{}lccccccccll@{}}
\toprule
- \textsc{usv} & M & X & C & L & D & A & E & Macro & Description \\
+ \textsc{usv} & M & X & C & L & D & A & P & E & Macro & Description \\
\midrule \endhead
- \input unicode-math-table.tex\relax\\
+ \INPUT\\
\bottomrule
\end{longtable}
}
@@ -90,26 +60,41 @@
}
\newcommand\SHOW[1]{%
-\def\UnicodeMathSymbol##1##2##3##4{%
- \def\1{#1}\def\2{##3}%
- \ifx\1\2%
- \def\tempa{%
- \USV{##1} &
- \SYMB{##2}{lm}{##1} &
- \SYMB{##2}{xits}{##1} &
- \SYMB{##2}{cambria}{##1} &
- \SYMB{##2}{lucida}{##1} &
- \SYMB{##2}{lucibold}{##1} &
- \SYMB{##2}{asana}{##1} &
- \SYMB{##2}{euler}{##1} &
- \CMD{##2} &
- \DESC{##4} \\%
+ \def\UnicodeMathSymbol##1##2##3##4{%
+ \def\1{#1}\def\2{##3}%
+ \ifx\1\2\PRINTLINE{##1}{##2}{##4}\fi
+ }%
+ \TABLE
+}
+\ExplSyntaxOn
+\def\PRINTLINE#1#2#3{
+ \def\tempa{
+ \USV{#1} &
+ \SYMB{#2}{lm}{#1} &
+ \SYMB{#2}{xits}{#1} &
+ \SYMB{#2}{cambria}{#1} &
+ \SYMB{#2}{lucida}{#1} &
+ \SYMB{#2}{lucibold}{#1} &
+ \SYMB{#2}{asana}{#1} &
+ \SYMB{#2}{pagella}{#1} &
+ \SYMB{#2}{euler}{#1} &
+ \CMD{#2}
+ \tl_if_in:NnT \PLAIN {#2}
+ {
+ \makebox[0pt][l]
+ { \color[gray]{0.7} \textsuperscript{\sffamily (p)} }
+ }
+ \tl_if_in:NnT \AMSSYMB {#2}
+ {
+ \makebox[0pt][l]
+ { \color[gray]{0.7} \textsuperscript{\sffamily (a)} }
+ }
+ &
+ \DESC{#3} \\
}%
\expandafter\tempa
- \fi
-}%
-\TABLE
}
+\ExplSyntaxOff
\def\SYMB#1#2#3{%
\expandafter\iffontchar\csname#2\endcsname #3\relax
\refstepcounter{#2}%
@@ -118,9 +103,13 @@
\fi
}
+\def\PLAIN{\alpha\beta\gamma\delta\epsilon\zeta\eta\theta\iota\kappa\lambda\mu\nu\xi\pi\rho\sigma\tau\upsilon\phi\chi\psi\omega\varepsilon\vartheta\varpi\varrho\varsigma\varphi\Gamma\Delta\Theta\Lambda\Xi\Pi\Sigma\Upsilon\Phi\Psi\Omega\aleph\hbar\imath\jmath\ell\wp\Re\Im\partial\infty\prime\emptyset\nabla\surd\top\bot\angle\triangle\forall\exists\neg\flat\natural\sharp\clubsuit\diamondsuit\heartsuit\spadesuit\coprod\bigvee\bigwedge\biguplus\bigcap\bigcup\int\prod\sum\bigotimes\bigoplus\bigodot\oint\bigsqcup\smallint\triangleleft\triangleright\bigtriangleup\bigtriangledown\wedge\land\vee\lor\cap\cup\ddagger\dagger\sqcap\sqcup\uplus\amalg\diamond\bullet\wr\div\odot\oslash\otimes\ominus\oplus\mp\pm\circ\bigcirc\setminus\cdot\ast\times\star\propto\sqsubseteq\sqsupseteq\parallel\mid\dashv\vdash\nearrow\searrow\nwarrow\swarrow\Leftrightarrow\Leftarrow\Rightarrow\neq\ne\lnot\leq\le\geq\ge\succ\prec\approx\succeq\preceq\supset\subset\supseteq\subseteq\in\ni\owns\gg\ll\not\leftrightarrow\leftarrow\gets\rightarrow\to\mapstochar\mapsto\sim\simeq\perp\equiv\asymp\smile\frown\leftharpoonup\leftharpoondown\rightharpoonup\rightharpoondown\joinrel\relbar\Relbar\lhook\hookrightarrow\rhook\hookleftarrow\bowtie\models\Longrightarrow\longrightarrow\longleftarrow\Longleftarrow\longmapsto\longleftrightarrow\Longleftrightarrow\iff\ldotp\cdotp\colon\ldots\cdots\vdots\ddots\acute\grave\ddot\tilde\bar\breve\check\hat\vec\dot\widetilde\widehat\overrightarrow\overleftarrow\overbrace\underbrace\lmoustache\rmoustache\lgroup\rgroup\arrowvert\Arrowvert\bracevert\Vert\vert\uparrow\downarrow\updownarrow\Uparrow\Downarrow\Updownarrow\backslash\rangle\langle\rbrace\lbrace\rceil\lceil\rfloor\lfloor\sqrt}
+
+\def\AMSSYMB{\boxdot\boxplus\boxtimes\square\blacksquare\centerdot\lozenge\blacklozenge\circlearrowright\circlearrowleft\leftrightharpoons\boxminus\Vdash\Vvdash\vDash\twoheadrightarrow\twoheadleftarrow\leftleftarrows\rightrightarrows\upuparrows\downdownarrows\upharpoonright\restriction\downharpoonright\upharpoonleft\downharpoonleft\rightarrowtail\leftarrowtail\leftrightarrows\rightleftarrows\Lsh\Rsh\rightsquigarrow\leftrightsquigarrow\looparrowleft\looparrowright\circeq\succsim\gtrsim\gtrapprox\multimap\therefore\because\doteqdot\Doteq\triangleq\precsim\lesssim\lessapprox\eqslantless\eqslantgtr\curlyeqprec\curlyeqsucc\preccurlyeq\leqq\leqslant\lessgtr\backprime\risingdotseq\fallingdotseq\succcurlyeq\geqq\geqslant\gtrless\vartriangleright\vartriangleleft\trianglerighteq\trianglelefteq\bigstar\between\blacktriangledown\blacktriangleright\blacktriangleleft\vartriangle\blacktriangle\triangledown\eqcirc\lesseqgtr\gtreqless\lesseqqgtr\gtreqqless\Rrightarrow\Lleftarrow\veebar\barwedge\doublebarwedge\measuredangle\sphericalangle\varpropto\smallsmile\smallfrown\Subset\Supset\Cup\doublecup\Cap\doublecap\curlywedge\curlyvee\leftthreetimes\rightthreetimes\subseteqq\supseteqq\bumpeq\Bumpeq\lll\llless\ggg\gggtr\circledS\pitchfork\dotplus\backsim\backsimeq\complement\intercal\circledcirc\circledast\circleddash\lvertneqq\gvertneqq\nleq\ngeq\nless\ngtr\nprec\nsucc\lneqq\gneqq\nleqslant\ngeqslant\lneq\gneq\npreceq\nsucceq\precnsim\succnsim\lnsim\gnsim\nleqq\ngeqq\precneqq\succneqq\precnapprox\succnapprox\lnapprox\gnapprox\nsim\ncong\diagup\diagdown\varsubsetneq\varsupsetneq\nsubseteqq\nsupseteqq\subsetneqq\supsetneqq\varsubsetneqq\varsupsetneqq\subsetneq\supsetneq\nsubseteq\nsupseteq\nparallel\nmid\nshortmid\nshortparallel\nvdash\nVdash\nvDash\nVDash\ntrianglerighteq\ntrianglelefteq\ntriangleleft\ntriangleright\nleftarrow\nrightarrow\nLeftarrow\nRightarrow\nLeftrightarrow\nleftrightarrow\divideontimes\varnothing\nexists\Finv\Game\eth\eqsim\beth\gimel\daleth\lessdot\gtrdot\ltimes\rtimes\shortmid\shortparallel\smallsetminus\thicksim\thickapprox\approxeq\succapprox\precapprox\curvearrowleft\curvearrowright\digamma\varkappa\Bbbk\hslash\backepsilon}
+
\begin{document}
\MakeShortVerb\|
-\title{Every symbol defined by \textsf{unicode-math}}
+\title{Every symbol (most symbols) defined by \textsf{unicode-math}}
\author{Will Robertson\\\texttt{wspr81@gmail.com}}
\maketitle
@@ -128,7 +117,7 @@ This document uses the file \texttt{unicode-math-table.tex}
to print every symbol defined by the \textsf{unicode-math}
package.
Use this document to find the command name or the Unicode glyph slot for a symbol that you wish to use.
-Seven fonts are shown: (with approximate symbol counts)
+Eight fonts are shown: (with approximate symbol counts)
\begin{itemize}
\item[M] \mathversion{lm} $\mathup{Latin\ Modern\ Math}$ (\ref{count:lm})
\item[X] \mathversion{xits} $\mathup{XITS\ Math}$ (\ref{count:xits})
@@ -136,16 +125,19 @@ Seven fonts are shown: (with approximate symbol counts)
\item[L] \mathversion{lucida} $\mathup{Lucida\ Math}$ (\ref{count:lucida})
\item[D] \mathversion{lucibold} $\mathup{Lucida\ Math\ Demibold}$ (\ref{count:lucibold})
\item[A] \mathversion{asana} $\mathup{Asana\ Math}$ (\ref{count:asana})
+\item[P] \mathversion{pagella} $\mathup{TeX\ Gyre\ Pagella\ Math}$ (\ref{count:pagella})
\item[E] \mathversion{euler} $\mathup{Neo\ Euler}$ (\ref{count:euler})
\end{itemize}
+Symbols defined in Plain \TeX\ are indicated with {\color[gray]{0.6} \textsuperscript{\sffamily (p)}} after their macro name.
+Symbols defined in \textsf{amssymb} are indicated with {\color[gray]{0.6} \textsuperscript{\sffamily (a)}}.
\tableofcontents
\clearpage
\section{Opening symbols, \cmd\mathopen}
\begingroup
-\let\sqrtold\sqrt
-\def\sqrt{\sqrtold{}}
+\def\sqrt{\sqrtsign{}}
+\def\longdivision{\longdivisionsign{}}
\SHOW\mathopen
\endgroup
@@ -160,6 +152,31 @@ Seven fonts are shown: (with approximate symbol counts)
\section{Punctuation symbols, \cmd\mathpunct}
\SHOW\mathpunct
+\section{`Over' symbols, \cmd\mathover}
+\begingroup
+\def\SYMB#1#2#3{%
+ \expandafter\iffontchar\csname#2\endcsname #3\relax
+ \refstepcounter{#2}%
+ \mathversion{#2}%
+ $\displaystyle #1{\mitx+\mity}$%
+ \fi
+}
+\SHOW\mathover
+\endgroup
+
+
+\section{`Under' symbols, \cmd\mathunder}
+\begingroup
+\def\SYMB#1#2#3{%
+ \expandafter\iffontchar\csname#2\endcsname #3\relax
+ \refstepcounter{#2}%
+ \mathversion{#2}%
+ $\displaystyle #1{\mitx+\mity}$%
+ \fi
+}
+\SHOW\mathunder
+\endgroup
+
\clearpage
\section{Accents, \cmd\mathaccent}
@@ -170,12 +187,24 @@ Note that accents will only be properly placed if used with an OpenType font wit
\expandafter\iffontchar\csname#2\endcsname #3\relax
\refstepcounter{#2}%
\mathversion{#2}%
- $\displaystyle#1 x$%
+ $\displaystyle#1 \mitx$%
\fi
}
\SHOW\mathaccent
\endgroup
+\section{Bottom accents, \cmd\mathbotaccent}
+\begingroup
+\def\SYMB#1#2#3{%
+ \expandafter\iffontchar\csname#2\endcsname #3\relax
+ \refstepcounter{#2}%
+ \mathversion{#2}%
+ $\displaystyle#1 \mitx$%
+ \fi
+}
+\SHOW\mathbotaccent
+\endgroup
+
\clearpage
\section{Big operators, \cmd\mathop}
@@ -192,7 +221,6 @@ The limits behaviour as specified by \textsf{unicode-math} are shown with grey s
\SHOW\mathop
\endgroup
-\clearpage
\section{Binary relations, \cmd\mathbin}
\SHOW\mathbin
@@ -206,7 +234,168 @@ The limits behaviour as specified by \textsf{unicode-math} are shown with grey s
\clearpage
\section{Alphabetical symbols, \cmd\mathalpha}
-\SHOW\mathalpha
+
+% first read in all \mathalpha symbols into a variable:
+\ExplSyntaxOn
+\cs_set:Npn \UnicodeMathSymbol #1#2#3#4 {
+ \str_if_eq:nnT {\mathalpha} {#3} {
+ \exp_not:n { \UnicodeMathSymbol {#1}{#2}{#3}{#4} }
+ }
+}
+\CatchFileEdef
+ \ALPHA{unicode-math-table.tex}
+ {\char_set_catcode_space:N \ }
+
+% now each time we print an alphabet we remove the slot;
+% this ensures we won't miss anything
+
+\def\INPUT{\ALPHA}
+\cs_new:Npn \SLOTS #1#2 {
+ \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
+ \bool_if:nT
+ {
+ \int_compare_p:n {##1 >= #1} && \int_compare_p:n {##1 <= #2}
+ }
+ {
+ \PRINTLINE{##1}{##2}{##4}
+ }
+ }
+ \TABLE
+ \cs_set:Npn \UnicodeMathSymbol ##1##2##3##4 {
+ \bool_if:nT
+ {
+ \int_compare_p:n {##1 > #2} || \int_compare_p:n {##1 < #1}
+ }
+ {
+ \exp_not:n { \UnicodeMathSymbol {##1}{##2}{##3}{##4} }
+ }
+ }
+ \edef\ALPHA{\ALPHA}
+}
+
+\ExplSyntaxOff
+
+\subsection{Normal weight}
+
+\subsubsection{Upright Greek, uppercase}
+\SLOTS{"00391}{"003A9}
+
+\subsubsection{Upright Greek, lowercase}
+\SLOTS{"003B1}{"003F5}
+
+\subsubsection{Italic, Latin, uppercase}
+\SLOTS{"1D434}{"1D44D}
+
+\subsubsection{Italic, Latin, lowercase}
+\SLOTS{"1D44E}{"1D467}
+
+\subsubsection{Italic Greek, uppercase}
+\SLOTS{"1D6E2}{"1D6FA}
+
+\subsubsection{Italic Greek, lowercase}
+\SLOTS{"1D6FC}{"1D71B}
+
+\subsubsection{Script, Latin, uppercase}
+\SLOTS{"1D49C}{"1D4B5}
+
+\subsubsection{Script, Latin, lowercase}
+\SLOTS{"1D4B6}{"1D4CF}
+
+\subsubsection{Fraktur, Latin, uppercase}
+\SLOTS{"1D504}{"1D51C}
+
+\subsubsection{Fraktur, Latin, lowercase}
+\SLOTS{"1D51E}{"1D537}
+
+\subsubsection{Blackboard, Latin, uppercase}
+\SLOTS{"1D538}{"1D550}
+
+\subsubsection{Blackboard, Latin, lowercase}
+\SLOTS{"1D552}{"1D56B}
+
+\subsubsection{Sans serif, Latin, uppercase}
+\SLOTS{"1D5A0}{"1D5B9}
+
+\subsubsection{Sans serif, Latin, lowercase}
+\SLOTS{"1D5BA}{"1D5D3}
+
+\subsubsection{Italic sans serif, Latin, uppercase}
+\SLOTS{"1D608}{"1D621}
+
+\subsubsection{Italic sans serif, Latin, lowercase}
+\SLOTS{"1D622}{"1D63B}
+
+\subsubsection{Typewriter, Latin, uppercase}
+\SLOTS{"1D670}{"1D689}
+
+\subsubsection{Typewriter, Latin, lowercase}
+\SLOTS{"1D68A}{"1D6A3}
+
+\subsection{Bold}
+
+\subsubsection{Bold, Latin, uppercase}
+\SLOTS{"1D400}{"1D419}
+
+\subsubsection{Bold, Latin, lowercase}
+\SLOTS{"1D41A}{"1D433}
+
+\subsubsection{Bold Greek, uppercase}
+\SLOTS{"1D6A8}{"1D6C0}
+
+\subsubsection{Bold Greek, lowercase}
+\SLOTS{"1D6C2}{"1D6E1}
+
+\subsubsection{Bold italic, Latin, uppercase}
+\SLOTS{"1D468}{"1D481}
+
+\subsubsection{Bold italic, Latin, lowercase}
+\SLOTS{"1D482}{"1D49B}
+
+\subsubsection{Bold italic Greek, uppercase}
+\SLOTS{"1D71C}{"1D734}
+
+\subsubsection{Bold italic Greek, lowercase}
+\SLOTS{"1D736}{"1D755}
+
+\subsubsection{Bold script, Latin, uppercase}
+\SLOTS{"1D4D0}{"1D4E9}
+
+\subsubsection{Bold script, Latin, lowercase}
+\SLOTS{"1D4EA}{"1D503}
+
+\subsubsection{Bold fraktur, Latin, uppercase}
+\SLOTS{"1D56C}{"1D585}
+
+\subsubsection{Bold fraktur, Latin, lowercase}
+\SLOTS{"1D586}{"1D59F}
+
+\subsubsection{Bold sans serif, Latin, uppercase}
+\SLOTS{"1D5D4}{"1D5ED}
+
+\subsubsection{Bold sans serif, Latin, lowercase}
+\SLOTS{"1D5EE}{"1D607}
+
+\subsubsection{Bold italic sans serif, Latin, uppercase}
+\SLOTS{"1D63C}{"1D655}
+
+\subsubsection{Bold italic sans serif, Latin, lowercase}
+\SLOTS{"1D656}{"1D66F}
+
+\subsubsection{Bold sans serif Greek, uppercase}
+\SLOTS{"1D756}{"1D76E}
+
+\subsubsection{Bold sans serif Greek, lowercase}
+\SLOTS{"1D770}{"1D78F}
+
+\subsubsection{Bold italic sans serif Greek, uppercase}
+\SLOTS{"1D790}{"1D7A8}
+
+\subsubsection{Bold italic sans serif Greek, lowercase}
+\SLOTS{"1D7AA}{"1D7C9}
+
+\subsection{Miscellaneous}
+\def\UnicodeMathSymbol#1#2#3#4{\PRINTLINE{#1}{#2}{#4}}
+\TABLE
\refstepcounter{lm}\label{count:lm}
\refstepcounter{xits}\label{count:xits}
@@ -214,6 +403,7 @@ The limits behaviour as specified by \textsf{unicode-math} are shown with grey s
\refstepcounter{lucida}\label{count:lucida}
\refstepcounter{lucibold}\label{count:lucibold}
\refstepcounter{asana}\label{count:asana}
+\refstepcounter{pagella}\label{count:pagella}
\refstepcounter{euler}\label{count:euler}
\end{document}
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 }