summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/unicode-math
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-19 22:30:21 +0000
committerKarl Berry <karl@freefriends.org>2010-09-19 22:30:21 +0000
commitec055a5e4d5d2e54cbce278de7bc9d9640edafcd (patch)
treef671c9984ad41ba35e47edbfcdd196d41c6987f3 /Master/texmf-dist/source/latex/unicode-math
parent1c6fc5a686a3a974147c8530dc8cd52f978077b1 (diff)
unicode-math 0.5b (19sep10)
git-svn-id: svn://tug.org/texlive/trunk@19808 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/unicode-math')
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/Makefile17
-rw-r--r--Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx81
2 files changed, 74 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/Makefile b/Master/texmf-dist/source/latex/unicode-math/Makefile
index f713a001f76..379dd680d70 100644
--- a/Master/texmf-dist/source/latex/unicode-math/Makefile
+++ b/Master/texmf-dist/source/latex/unicode-math/Makefile
@@ -85,7 +85,11 @@ BUILDFILES = $(BUILDSOURCE) $(BUILDSUITE) $(BUILDTESTSRC)
# and this is how the TDS zip file is produced:
-TDSFILES = \
+INSFILES = \
+ $(tds)/tex/latex/$(PKG)/unicode-math.sty \
+ $(tds)/tex/latex/$(PKG)/unicode-math-table.tex
+
+OTHERFILES = \
$(tds)/source/latex/$(PKG)/$(PKG).dtx \
$(tds)/source/latex/$(PKG)/$(SUITE).ltx \
$(tds)/source/latex/$(PKG)/$(SYM).ltx \
@@ -96,9 +100,8 @@ TDSFILES = \
$(tds)/doc/latex/$(PKG)/README \
$(tds)/doc/latex/$(PKG)/$(XMPL) \
$(tds)/doc/latex/$(PKG)/$(SYM).pdf \
- $(tds)/tex/latex/$(PKG)/unicode-math.sty \
- $(tds)/tex/latex/$(PKG)/unicode-math-table.tex
+TDSFILES = $(INSFILES) $(OTHERFILES)
#### BASICS ####
@@ -194,19 +197,19 @@ $(tds)/source/latex/$(PKG)/$(testdir):
TEXMFHOME=$(shell kpsewhich --var-value TEXMFHOME)
TEXMFLOCAL=$(shell kpsewhich --var-value TEXMFLOCAL)
-install: $(TDSFILES)
+install: $(INSFILES)
if test -n "$(TEXMFHOME)" ; then \
echo "Installing in '$(TEXMFHOME)'."; \
- $(COPY) $(tds)/ $(TEXMFHOME); \
+ $(COPY) $(tds)/* $(TEXMFHOME); \
else \
echo "Cannot locate your home texmf tree. Specify manually with\n\n make install TEXMFHOME=/path/to/texmf\n" ; \
false ; \
fi ;
-install-sys: $(TDSFILES)
+install-sys: $(INSFILES)
if test -n "$(TEXMFLOCAL)" ; then \
echo "Installing in '$(TEXMFLOCAL)'."; \
- $(COPY) $(tds)/ $(TEXMFLOCAL); \
+ $(COPY) $(tds)/* $(TEXMFLOCAL); \
else \
echo "Cannot locate your system-wide local texmf tree. Specify manually with\n\n make install TEXMFLOCAL=/path/to/texmf\n" ; \
false ; \
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 fe8cdb34302..ceaca6ea596 100644
--- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
+++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx
@@ -31,7 +31,7 @@ This work is "author-maintained" by Will Robertson.
%</internal>
%<preamble>\ProvidesPackage{unicode-math}
%<*preamble>
- [2010/07/14 v0.5a Unicode maths in XeLaTeX]
+ [2010/09/19 v0.5b Unicode maths in XeLaTeX and LuaLaTeX]
%</preamble>
%<*internal>
\documentclass{ltxdoc}
@@ -131,9 +131,22 @@ This work is "author-maintained" by Will Robertson.
% \begin{verbatim}
% \usepackage{amsmath} % if desired
% \usepackage{unicode-math}
-% \setmathfont{Cambria Math}
+% \setmathfont{Asana-Math.otf}
+% \end{verbatim}
+% \end{quote}
+%
+% Two OpenType maths fonts are included by default in \TeX\ Live 2010:
+% Asana Math and XITS Math. These can be loaded directly with their filename
+% with both \XeLaTeX\ and \LuaLaTeX; resp.,
+% \begin{quote}
+% \begin{verbatim}
+% \setmathfont{Asana-Math.otf}
+% \setmathfont{xits-math.otf}
% \end{verbatim}
% \end{quote}
+% Other OpenType maths fonts may be loaded in the usual way; please see the
+% \pkg{fontspec} documentation for more information.
+%
%
% \subsection{Package options}
% Package options may be set when the package as loaded or at any later
@@ -2090,7 +2103,7 @@ This work is "author-maintained" by Will Robertson.
\group_begin:
\char_make_active:n {#3}
\char_gmake_mathactive:n {#3}
- \um@scanactivedef #3 \@nil { \csname\cs_to_str:N #2 _sym\endcsname }
+ \um_active_char_set:wc #3 \q_nil { \cs_to_str:N #2 _sym }
\group_end:
\um_set_mathchar:cNnn {\cs_to_str:N #2 op} \mathop {#1} {#3}
\cs_gset:cpx { \cs_to_str:N #2 _sym } {
@@ -4167,8 +4180,8 @@ This work is "author-maintained" by Will Robertson.
% Here we define every Unicode math codepoint an equivalent macro name.
% The two are equivalent, in a |\let\xyz=^^^^1234| kind of way.
%
-% \begin{macro}{\um@scancharlet}
-% \begin{macro}{\um@scanactivedef}
+% \begin{macro}{\um_cs_set_eq_active_char:Nw}
+% \begin{macro}{\um_active_char_set:wc}
% We need to do some trickery to transform the |\_um_sym:nnn| argument
% |"ABCDEF| into the \XeTeX\ `caret input' form |^^^^^abcdef|. It is \emph{very important}
% that the argument has five characters. Otherwise we need to change the number of |^| chars.
@@ -4179,7 +4192,7 @@ This work is "author-maintained" by Will Robertson.
% \begin{macrocode}
\begingroup
\char_make_other:N \^
- \cs_gset:Npn \um@scancharlet#1="#2\@nil {
+ \cs_gset:Npn \um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil {
\lowercase{
\tl_rescan:nn {
\char_make_other:N \{
@@ -4193,15 +4206,19 @@ This work is "author-maintained" by Will Robertson.
}
}
% \end{macrocode}
-% Making |^| the right catcode isn't strictly necessary right now but it helps to future proof us with, e.g., breqn.
+% Making |^| the right catcode isn't strictly necessary right now but it helps
+% to future proof us with, e.g., breqn.
+% Because we're inside a |\tl_rescan:nn|, use plain old \TeX\ syntax to avoid
+% any catcode problems.
% \begin{macrocode}
- \gdef\um@scanactivedef"#1\@nil#2{
- \lowercase{
- \tl_rescan:nn{
- \ExplSyntaxOn
- \char_make_math_superscript:N\^
+ \cs_gnew:Npn \um_active_char_set:wc "#1 \q_nil #2 {
+ \lowercase {
+ \tl_rescan:nn {
+ \catcode`\_=11\relax
+ \catcode`\:=11\relax
+ \catcode`\^=7\relax
}{
- \global\def^^^^^#1{#2}
+ \protected\gdef^^^^^#1{\csname #2\endcsname}%
}
}
}
@@ -4210,7 +4227,7 @@ This work is "author-maintained" by Will Robertson.
% \end{macro}
% \end{macro}
%
-% Now give \cmd\_um_sym:nnn\ a definition in terms of \cmd\um@scancharlet\
+% Now give \cmd\_um_sym:nnn\ a definition in terms of \cmd\um_cs_set_eq_active_char:Nw\
% and we're good to go.
%
% Ensure catcodes are appropriate;
@@ -4225,7 +4242,7 @@ This work is "author-maintained" by Will Robertson.
\cs_if_eq_p:NN #3 \mathclose ||
\cs_if_eq_p:NN #3 \mathover ||
\cs_if_eq_p:NN #3 \mathunder } {
- \um@scancharlet#2=#1\@nil\ignorespaces
+ \um_cs_set_eq_active_char:Nw #2 = #1 \q_nil \ignorespaces
}
}
\char_make_other:N \#
@@ -4523,7 +4540,7 @@ This work is "author-maintained" by Will Robertson.
% Redefine this macro for \LuaTeX, which provides us a nice primitive to use.
% \begin{macrocode}
\luatex_if_engine:T {
- \DeclareDocumentCommand \sqrt { O{} m } {
+ \RenewDocumentCommand \sqrt { O{} m } {
\luatexUroot \l_um_radical_sqrt_tl {#1} {#2}
}
\cs_set:Npn \root #1 \of #2 {
@@ -4768,7 +4785,8 @@ This work is "author-maintained" by Will Robertson.
\char_make_active:N #1
\char_gmake_mathactive:N #1
\tl_rescan:nn {
- \ExplSyntaxOn
+ \catcode`\_=11\relax
+ \catcode`\:=11\relax
}{
\cs_gset:Npx #1 {
\bool_if:NTF \l_um_smallfrac_bool {\exp_not:N\tfrac} {\exp_not:N\frac}
@@ -4822,6 +4840,21 @@ This work is "author-maintained" by Will Robertson.
\def\bullet{\smblkcircle}
\def\mathyen{\yen}
\def\mathsterling{\sterling}
+\def\diamond{\smwhtdiamond}
+\def\emptyset{\varnothing}
+\def\hbar{\hslash}
+% \end{macrocode}
+% These are somewhat odd: (and their usual Unicode uprightness does not match their amssymb glyphs)
+% \begin{macrocode}
+\def\backepsilon{\upbackepsilon}
+\def\eth{\matheth}
+% \end{macrocode}
+%
+% Due to the magic of OpenType math, big operators are automatically
+% enlarged when necessary. Since there isn't a separate unicode glyph for
+% `small integral', I'm not sure if there is a better way to do this:
+% \begin{macrocode}
+\def\smallint{{\textstyle\int}\limits}
% \end{macrocode}
%
% \begin{macro}{\colon}
@@ -4846,6 +4879,13 @@ This work is "author-maintained" by Will Robertson.
% \end{macrocode}
% \end{macro}
%
+% \verb|\overline| is a \LuaTeX\ primitive:
+% \begin{macrocode}
+\luatex_if_engine:T {
+ \cs_set:Npn \overline {\pdfprimitive\overline}
+}
+% \end{macrocode}
+%
% \begin{macro}{\digamma}
% \begin{macro}{\Digamma}
% I might end up just changing these in the table.
@@ -4961,6 +5001,13 @@ This work is "author-maintained" by Will Robertson.
}
% \end{macrocode}
%
+% \begin{macrocode}
+\cs_set_eq:NN \um_text_slash: \slash
+\cs_set:Npn \slash {
+ \mode_if_math:TF {\mathslash} {\um_text_slash:}
+}
+% \end{macrocode}
+%
% \paragraph{\pkg{beamer}}
% At end of the package so the warnings are defined.
% \begin{macrocode}