diff options
Diffstat (limited to 'Master/texmf-dist/source/latex')
8 files changed, 139 insertions, 163 deletions
diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx index 7900b3360a6..57927c73bc1 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-amsmath.dtx @@ -186,14 +186,14 @@ \c_math_toggle_token } \mkern -\leftroot@ mu - \@@_mathstyle_scale:Nnn #1 { \kern } { \fontdimen 63 \g_@@_sqrt_font_cmd_tl } + \@@_mathstyle_scale:NnnN #1 { \kern } { \fontdimen 63 \g_@@_sqrt_font_cmd_tl } \g_@@_sqrt_font_cmd_tl \box_move_up:nn { \box_wd:N \l_tmpb_box + (\box_ht:N \l_tmpa_box - \box_dp:N \l_tmpa_box) * \number \fontdimen 65 \g_@@_sqrt_font_cmd_tl / 100 } { \box_use:N \rootbox } - \@@_mathstyle_scale:Nnn #1 { \kern } { \fontdimen 64 \g_@@_sqrt_font_cmd_tl } + \@@_mathstyle_scale:NnnN #1 { \kern } { \fontdimen 64 \g_@@_sqrt_font_cmd_tl } \g_@@_sqrt_font_cmd_tl \mkern \leftroot@ mu \box_use_clear:N \l_tmpa_box } diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx deleted file mode 100644 index 6564d7bf026..00000000000 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-base.dtx +++ /dev/null @@ -1,75 +0,0 @@ -%%^^A%% um-code-base.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> -%%^^A%% Definition of unicode-math.sty, which splits and loads according to engine. - -% \section{The \texttt{unicode-math.sty} loading file} -% -% The \texttt{unicode-math.sty} file is a stub which loads necessary packages -% and then bifurcates into a XeTeX- or LuaTeX-specific version of the package. -% -% \begin{macrocode} -%<*base> -% \end{macrocode} -% Bail early if necessary. -% \begin{macrocode} -\ifdefined\XeTeXversion - \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\ifdefined\luatexversion - \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.% - }\@ehd -\fi\fi -% \end{macrocode} -% -% \paragraph{Packages} -% Assuming people are running up-to-date packages. -% \begin{macrocode} -\RequirePackage{expl3,xparse,l3keys2e} -\RequirePackage{fontspec} -\RequirePackage{filehook} -\RequirePackage{fix-cm} -%<debug>\RequirePackage{l3benchmark} -% \end{macrocode} -% -% \paragraph{Bifurcate} -% \begin{macrocode} -\ExplSyntaxOn -\sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } -\sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } -\ExplSyntaxOff -% \end{macrocode} -% -% \begin{macrocode} -%</base> -% \end{macrocode} - -\endinput - -% /© -% -% ------------------------------------------------ -% The UNICODE-MATH package <wspr.io/unicode-math> -% ------------------------------------------------ -% 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 -% (your choice): <http://www.latex-project.org/lppl/>. -% ------------------------------------------------ -% Copyright 2006-2018 Will Robertson, LPPL "maintainer" -% Copyright 2010-2017 Philipp Stephani -% Copyright 2011-2017 Joseph Wright -% Copyright 2012-2015 Khaled Hosny -% ------------------------------------------------ -% -% ©/ diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx index 19ea4bcebbf..cb8a701bb45 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-epilogue.dtx @@ -383,7 +383,10 @@ \@@_undeclare_symbol:N \bracevert % \end{macrocode} % +% \paragraph{Fin} +% The official end of the package: % \begin{macrocode} +%<package>\endinput %</package> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx index 2ae228df24e..0cd47069e3c 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-main.dtx @@ -91,15 +91,13 @@ { \cs_if_exist:NF \l_@@_fontname_tl { +%<debug>\typeout{SETTING~ DEFAULT~ FONT~(latinmodern-math)} \setmathfont{latinmodern-math.otf} [BoldFont={latinmodern-math.otf}] +%<debug>\typeout{END~ DEFAULT~ FONT)} } } % \end{macrocode} -% Note that here we reset the `font already loaded' boolean so that a new font being set -% will do the right thing in terms of setting up defaults. -% -% TODO: need a better way to do this for the general case. (Maybe a `reset' command option?) % % \begin{macro}{\@@_init:n} % Reset local variables. @@ -167,7 +165,7 @@ \group_begin: \fontfamily { \l_@@_trial_family_tl } \selectfont - \@@_fontface_gset_eq:NV \g_@@_trial_font \font@name + \exp_last_unbraced:NNo \@@_fontface_gset_eq:NN \g_@@_trial_font \font@name \fontspec_if_script:nF {math} { \bool_gset_false:N \l_@@_ot_math_bool @@ -216,11 +214,11 @@ \int_gincr:N \g_@@_fonts_used_int \group_begin: \fontfamily { \l_@@_family_tl } \selectfont - \@@_fontface_gset_eq:cV {g_@@_mathfont_ \int_use:N \g_@@_fonts_used_int _font} \font@name + \exp_last_unbraced:Nno \@@_fontface_gset_eq:cN {g_@@_mathfont_ \int_use:N \g_@@_fonts_used_int _font} \font@name \tl_gset:Nx \g_@@_curr_font_cmd_tl { \exp_not:c {g_@@_mathfont_ \int_use:N \g_@@_fonts_used_int _font} } \bool_if:NT \l_@@_init_bool { - \@@_fontface_gset_eq:NV \l_@@_font \font@name + \exp_last_unbraced:NNo \@@_fontface_gset_eq:NN \l_@@_font \font@name } \fontspec_if_script:nF {math} { diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx index 21e0266543d..b3257369c0d 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-mathmap.dtx @@ -22,63 +22,76 @@ % \begin{macrocode} \cs_new:Npn \@@_setup_alphabets: { - - \bool_if:NTF \l_@@_init_bool + \bool_if:NTF \l_@@_init_bool { \@@_setup_alphabets_implicit: } { - % IMPLICIT - \@@_log:n {setup-implicit} - \seq_gset_eq:NN \g_@@_mathalph_seq \g_@@_default_mathalph_seq - \bool_set_true:N \l_@@_implicit_alph_bool - \@@_maybe_init_alphabet:n {sf} - \@@_maybe_init_alphabet:n {bf} - \@@_maybe_init_alphabet:n {bfsf} - \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn - \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn - \@@_mathalph_map: - \seq_if_empty:NF \l_@@_missing_alph_seq { \@@_log:n { missing-alphabets } } + \seq_if_empty:NF \g_@@_mathalph_seq { \@@_setup_alphabets_explicit: } + \clist_if_empty:NF \l_@@_mathmap_charints_clist { \@@_setup_alphabets_inherit: } } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{ \@@_setup_alphabets_implicit:} +% \begin{macrocode} +\cs_new:Nn \@@_setup_alphabets_implicit: + { + \@@_log:n {setup-implicit} + \seq_gset_eq:NN \g_@@_mathalph_seq \g_@@_default_mathalph_seq + \bool_set_true:N \l_@@_implicit_alph_bool + \@@_maybe_init_alphabet:n {sf} + \@@_maybe_init_alphabet:n {bf} + \@@_maybe_init_alphabet:n {bfsf} + \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn + \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn + \@@_mathalph_map: + \seq_if_empty:NF \l_@@_missing_alph_seq { \@@_log:n { missing-alphabets } } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{ \@@_setup_alphabets_explicit:} +% \begin{macrocode} +\cs_new:Nn \@@_setup_alphabets_explicit: + { + \@@_log:n {setup-explicit} + \bool_set_false:N \l_@@_implicit_alph_bool + \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn + \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn + \@@_mathalph_map: + \seq_if_empty:NF \l_@@_missing_alph_seq { \@@_log:n { missing-alphabets } } + } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{ \@@_setup_alphabets_inherit:} +% \begin{macrocode} +\cs_new:Nn \@@_setup_alphabets_inherit: + { + \seq_gclear:N \g_@@_mathalph_seq + \seq_map_inline:Nn \g_@@_default_mathalph_seq { - \seq_if_empty:NF \g_@@_mathalph_seq - { - % EXPLICIT - \@@_log:n {setup-explicit} - \bool_set_false:N \l_@@_implicit_alph_bool - \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn - \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn - \@@_mathalph_map: - \seq_if_empty:NF \l_@@_missing_alph_seq { \@@_log:n { missing-alphabets } } - } + \tl_set:No \l_@@_style_tl { \use_i:nnn ##1 } + \clist_set:No \l_@@_alphabet_clist { \use_ii:nnn ##1 } - % INHERIT - \clist_if_empty:NF \l_@@_mathmap_charints_clist + \clist_map_inline:Nn \l_@@_alphabet_clist { - \seq_gclear:N \g_@@_mathalph_seq - \seq_map_inline:Nn \g_@@_default_mathalph_seq + \clist_map_inline:cn {g_@@_named_slots_ \l_@@_style_tl _ ####1 _clist} { - \tl_set:No \l_@@_style_tl { \use_i:nnn ##1 } - \clist_set:No \l_@@_alphabet_clist { \use_ii:nnn ##1 } - - \clist_map_inline:Nn \l_@@_alphabet_clist + \clist_map_inline:Nn \l_@@_mathmap_charints_clist { - \clist_map_inline:cn {g_@@_named_slots_ \l_@@_style_tl _ ####1 _clist} + \@@_int_if_slot_in_range:nnT {################1} {########1} { - \clist_map_inline:Nn \l_@@_mathmap_charints_clist - { - \@@_int_if_slot_in_range:nnT {################1} {########1} - { - \seq_gput_right:Nn \g_@@_mathalph_seq {##1} - \clist_map_break:n { \clist_map_break:n { \clist_map_break: } } - } - } + \seq_gput_right:Nn \g_@@_mathalph_seq {##1} + \clist_map_break:n { \clist_map_break:n { \clist_map_break: } } } } } } - - \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_parse:nnn - \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_parse:nn - \@@_mathalph_map: } + + \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_parse:nnn + \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_parse:nn + \@@_mathalph_map: } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx index 95ef8dd2450..4e9493bb65e 100644 --- a/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/um-code-opening.dtx @@ -12,14 +12,15 @@ %<*package> % \end{macrocode} % +% \paragraph{Packages} +% Assuming people are running up-to-date packages. % \begin{macrocode} -%<*LU> -\RequirePackage{lualatex-math} -%</LU> -% \end{macrocode} -% -% \begin{macrocode} -\ExplSyntaxOn +\RequirePackage{xparse,l3keys2e} +\RequirePackage{fontspec} +\RequirePackage{filehook} +\RequirePackage{fix-cm} +%<LU>\RequirePackage{lualatex-math} +%<debug>\RequirePackage{l3benchmark} % \end{macrocode} % % \subsection{\pkg{expl3} variants} @@ -70,7 +71,7 @@ { \tex_global:D \tex_let:D #1 #2 } -\cs_generate_variant:Nn \@@_fontface_gset_eq:NN {NV,cV} +\cs_generate_variant:Nn \@@_fontface_gset_eq:NN {cN} % \end{macrocode} % \end{macro} % 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 04b72f2f77a..83f4012d528 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx @@ -1,15 +1,13 @@ %%^^A%% unicode-math.dtx -- part of UNICODE-MATH <wspr.io/unicode-math> %%^^A%% Metadata for the package code, including files and versioning -% \section{Package declaration} +% \section{Package metadata} % -% List all \texttt{dtx} files for -% (a) the \texttt{ins} file and~(b) typesetting the code. +% List all \texttt{dtx} files for (a) the \texttt{ins} file and~(b) typesetting the code. % \begin{macrocode} %<*dtx> \def\DTXFILES{ \DTX{unicode-math.dtx} - \DTX{um-code-base.dtx} \DTX{um-code-opening.dtx} \DTX{um-code-variables.dtx} \DTX{um-code-api.dtx} @@ -25,38 +23,72 @@ \DTX{um-code-mathmap.dtx} \DTX{um-code-sym-commands.dtx} \DTX{um-code-alphabets.dtx} - \DTX{um-code-epilogue.dtx} \DTX{um-code-primes.dtx} \DTX{um-code-sscript.dtx} \DTX{um-code-compat.dtx} \DTX{um-code-amsmath.dtx} + \DTX{um-code-epilogue.dtx} } %</dtx> % \end{macrocode} % -% Now exit if we're using plain \TeX; this would usually be the case when -% loading this file with \texttt{unicode-math.ins}. +% Now exit if we're using plain \TeX\ when loading this file with \texttt{unicode-math.ins}. % \begin{macrocode} %<*dtx> -\def\tmpa{plain} -\ifx\tmpa\fmtname\expandafter\endinput\fi +\ifx\plainoutput\undefined\else\expandafter\endinput\fi +%</dtx> +% \end{macrocode} +% +% Metadata for documentation; the title and authors of the package. +% \begin{macrocode} +%<*dtx> +\title{ + Experimental Unicode mathematical typesetting: + The \pkg{unicode-math} package +} +\author{ + \scshape Will Robertson\\ + \itshape Philipp Stephani, Joseph Wright, Khaled Hosny, and others\\ + \url{http://github.com/wspr/unicode-math} +} %</dtx> % \end{macrocode} % -% Declare the package version and date. For loading this file directly -% as a \texttt{dtx} file, \cs{fileversion} and \cs{filedate} will be set -% correctly when using \cs{GetFileInfo} without having to load the package -% directly. +% Declare the package version and date. +% \begin{macrocode} +%<base>\RequirePackage{expl3} +%<base>\ProvidesExplPackage{unicode-math} +%<package&XE>\ProvidesExplPackage{unicode-math-xetex} +%<package&LU>\ProvidesExplPackage{unicode-math-luatex} +%<base|package> {2018/01/13} {v0.8k} {Unicode maths in XeLaTeX and LuaLaTeX} +% \end{macrocode} +% +% Here the version and date are setup for typesetting the documentation. % \begin{macrocode} -%<base>\ProvidesPackage{unicode-math} -%<package&XE>\ProvidesPackage{unicode-math-xetex} -%<package&LU>\ProvidesPackage{unicode-math-luatex} %<*dtx> -\ProvidesFile{unicode-math.dtx} +\date{ + \def\filedate{2018/01/13} + \def\fileversion{v0.8k} + \filedate \qquad \fileversion +} %</dtx> -%<*base|package> - [2018/01/07 v0.8j Unicode maths in XeLaTeX and LuaLaTeX] -%</base|package> +% \end{macrocode} +% +% \section{The \texttt{unicode-math.sty} loading file} +% +% The \texttt{unicode-math.sty} file is a stub which loads necessary packages +% and then splits into a XeTeX- or LuaTeX-specific version of the package. +% +% \begin{macrocode} +%<base>\sys_if_engine_luatex:T { \RequirePackageWithOptions{unicode-math-luatex} } +%<base>\sys_if_engine_xetex:T { \RequirePackageWithOptions{unicode-math-xetex} } +%<base>\sys_if_engine_pdftex:T +%<base> { +%<base> \msg_new:nnn {unicode-math} {not-pdftex} +%<base> { Cannot~ be~ run~ with~ pdfLaTeX!\\ Use~ XeLaTeX~ or~ LuaLaTeX~ instead. } +%<base> \msg_error:nn {unicode-math} {not-pdftex} +%<base> } +%<base>\endinput % \end{macrocode} \endinput diff --git a/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins index d1366222d04..b87abd1a53a 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.ins @@ -7,6 +7,7 @@ \keepsilent \declarepreamble\defaultpreamble + ------------------------------------------------ The UNICODE-MATH package <wspr.io/unicode-math> ------------------------------------------------ @@ -14,11 +15,12 @@ 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 (your choice): <http://www.latex-project.org/lppl/>. ------------------------------------------------ -Copyright 2006-2017 Will Robertson, LPPL "maintainer" +Copyright 2006-2018 Will Robertson, LPPL "maintainer" Copyright 2010-2017 Philipp Stephani Copyright 2011-2017 Joseph Wright Copyright 2012-2015 Khaled Hosny ------------------------------------------------ + \endpreamble \nopostamble @@ -27,17 +29,19 @@ Copyright 2012-2015 Khaled Hosny \def\FROM#1#2{\from{#1}{#2}} \def\FROMDEBUG#1#2{\from{#1}{#2,debug}} \ifx\DEBUG\undefined\else\let\FROM\FROMDEBUG\fi +\def\Msg#1{} +\def\Generate#1#2{% + \immediate\write\ttyout{Generating file "#1"}% + \generate{\file{#1}{#2}}% +} -\generate{\file{unicode-math.sty}{ - \FROM{unicode-math.dtx}{base} - \FROM{um-code-base.dtx}{base} - }} +\Generate{unicode-math.sty}{\FROM{unicode-math.dtx}{base}} \def\DTX#1{\FROM{#1}{package,XE}} -\generate{\file{unicode-math-xetex.sty}{\DTXFILES}} +\Generate{unicode-math-xetex.sty}{\DTXFILES} \def\DTX#1{\FROM{#1}{package,LU}} -\generate{\file{unicode-math-luatex.sty}{\DTXFILES}} +\Generate{unicode-math-luatex.sty}{\DTXFILES} \endbatchfile \endinput |