diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx | 98 |
1 files changed, 51 insertions, 47 deletions
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 b656390278f..848935c481b 100644 --- a/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx +++ b/Master/texmf-dist/source/latex/unicode-math/unicode-math.dtx @@ -39,20 +39,25 @@ This work is "maintained" by Will Robertson. \askforoverwritefalse \let\MetaPrefix\DoubleperCent \usepreamble\texpreamble +\ifx\UMDEBUG\undefined + \def\UMDEBUG{}% +\else + \def\UMDEBUG{,debug}% +\fi \generate{\file{unicode-math.sty}{ - \from{unicode-math.dtx}{preamble} - \from{unicode-math-msg.dtx}{msg} - \from{unicode-math-usv.dtx}{usv} - \from{unicode-math.dtx}{load} - \from{unicode-math-alphabets.dtx}{alphabets} + \from{unicode-math.dtx}{preamble\UMDEBUG} + \from{unicode-math-msg.dtx}{msg\UMDEBUG} + \from{unicode-math-usv.dtx}{usv\UMDEBUG} + \from{unicode-math.dtx}{load\UMDEBUG} + \from{unicode-math-alphabets.dtx}{alphabets\UMDEBUG} }} \generate{\file{unicode-math-xetex.sty}{ - \from{unicode-math.dtx}{package,XE} - \from{unicode-math-compat.dtx}{compat,XE} + \from{unicode-math.dtx}{package,XE\UMDEBUG} + \from{unicode-math-compat.dtx}{compat,XE\UMDEBUG} }} \generate{\file{unicode-math-luatex.sty}{ - \from{unicode-math.dtx}{package,LU} - \from{unicode-math-compat.dtx}{compat,LU} + \from{unicode-math.dtx}{package,LU\UMDEBUG} + \from{unicode-math-compat.dtx}{compat,LU\UMDEBUG} }} \def\tempa{plain} \ifx\tempa\fmtname\endgroup\expandafter\bye\fi @@ -64,7 +69,7 @@ This work is "maintained" by Will Robertson. %<preamble&XE>\ProvidesPackage{unicode-math-xetex} %<preamble&LU>\ProvidesPackage{unicode-math-luatex} %<*preamble> - [2014/07/30 v0.8 Unicode maths in XeLaTeX and LuaLaTeX] + [2014/08/06 v0.8a Unicode maths in XeLaTeX and LuaLaTeX] %</preamble> %<*internal> \def\DOCUMENTEND{F} @@ -756,10 +761,15 @@ This work is "maintained" by Will Robertson. % The following assignments should all be fairly straightforward. % % The catcode setting is to work around (strange?) behaviour in LuaTeX in which catcode 11 characters don't have italic correction for maths. +% We don't adjust ascii chars, however, because certain punctuation should not have their catcodes changed. % \begin{macrocode} \cs_set:Nn \@@_set_mathsymbol:nNNn { - \int_compare:nT { \char_value_catcode:n {#4} == 11 } + \bool_if:nT + { + \int_compare_p:nNn {#4} > {127} && + \int_compare_p:nNn { \char_value_catcode:n {#4} } = {11} + } { \char_set_catcode_other:n {#4} } \tl_case:Nn #3 @@ -1106,9 +1116,9 @@ This work is "maintained" by Will Robertson. % After loading the font, we detect what sizes it recommends for scriptsize and scriptscriptsize, so after setting those values appropriately, we reload the font to take these into account. % \begin{macrocode} - \csname TIC\endcsname +%<debug> \csname TIC\endcsname \@@_fontspec_select_font: - \csname TOC\endcsname +%<debug> \csname TOC\endcsname \bool_if:nT { \l_@@_ot_math_bool && !\g_@@_mainfont_already_set_bool } { \@@_declare_math_sizes: @@ -1147,9 +1157,9 @@ This work is "maintained" by Will Robertson. % \end{macrocode} % And now we input every single maths char. % \begin{macrocode} - \csname TIC\endcsname +%<debug> \csname TIC\endcsname \@@_input_math_symbol_table: - \csname TOC\endcsname +%<debug> \csname TOC\endcsname % \end{macrocode} % Finally, % \begin{itemize} @@ -1163,9 +1173,9 @@ This work is "maintained" by Will Robertson. \@@_remap_symbols: \@@_setup_mathactives: \@@_setup_delcodes: - \csname TIC\endcsname +%<debug> \csname TIC\endcsname \@@_setup_alphabets: - \csname TOC\endcsname +%<debug> \csname TOC\endcsname \@@_setup_negations: % \end{macrocode} % Prevent spaces, and that's it: @@ -2348,7 +2358,10 @@ This work is "maintained" by Will Robertson. } % \end{macrocode} % \begin{macrocode} -\cs_new:Nn \@@_alphabet_config:nnn { \use:c {@@_config_#1_#2:n} {#3} } +\cs_new:Nn \@@_alphabet_config:nnn + { + \use:c {@@_config_#1_#2:n} {#3} + } % \end{macrocode} % \begin{macrocode} \prg_new_conditional:Nnn \@@_if_alphabet_exists:nn {T,TF} @@ -2366,6 +2379,7 @@ This work is "maintained" by Will Robertson. { \seq_put_right:Nx \g_@@_named_ranges_seq { \tl_to_str:n {#1} } \seq_put_right:Nn \g_@@_default_mathalph_seq {{#1}{#2}{#3}} + \prop_gput:cnn { g_@@_named_range_#1_prop } { default-alpha } {#2} } \@@_default_mathalph:nnn {up } {latin,Latin,greek,Greek,num,misc} {up } \@@_default_mathalph:nnn {it } {latin,Latin,greek,Greek,misc} {it } @@ -2531,42 +2545,38 @@ This work is "maintained" by Will Robertson. \cs_set_eq:NN \@@_set_mathalphabet_char:nnn \@@_mathmap_noparse:nnn \cs_set_eq:NN \@@_map_char_single:nn \@@_map_char_noparse:nn } -% \end{macrocode} -% Now perform the mapping: -% \begin{macrocode} + + % Now perform the mapping: \seq_map_inline:Nn \l_@@_mathalph_seq { - \tl_set:No \l_@@_style_tl { \use_i:nnn ##1 } + \tl_set:No \l_@@_style_tl { \use_i:nnn ##1 } \clist_set:No \l_@@_alphabet_clist { \use_ii:nnn ##1 } - \tl_set:No \l_@@_remap_style_tl { \use_iii:nnn ##1 } + \tl_set:No \l_@@_remap_style_tl { \use_iii:nnn ##1 } + % If no set of alphabets is defined: \clist_if_empty:NT \l_@@_alphabet_clist { \cs_set_eq:NN \@@_maybe_init_alphabet:n \@@_init_alphabet:n - \clist_set:Nn \l_@@_alphabet_clist { latin, Latin, greek, Greek, num, misc } + \prop_get:cnN { g_@@_named_range_ \l_@@_style_tl _prop } + { default-alpha } \l_@@_alphabet_clist } - \@@_setup_math_alphabet:NNN - \l_@@_style_tl \l_@@_alphabet_clist \l_@@_remap_style_tl + \@@_setup_math_alphabet: } \seq_if_empty:NF \l_@@_missing_alph_seq { \@@_log:n { missing-alphabets } } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_setup_math_alphabet:NNN} -% \darg{Math font style (e.g., \cs{bb})} -% \darg{Math alphabets, comma separated of \{latin,Latin,greek,Greek,num\}} -% \darg{Name of the output math style (usually same as the name of the style \texttt{bb})} +% \begin{macro}{\@@_setup_math_alphabet:} % \begin{macrocode} -\cs_new:Nn \@@_setup_math_alphabet:NNN +\cs_new:Nn \@@_setup_math_alphabet: { - \tl_set_eq:NN \l_@@_style_tl #1% actually a no-op but makes the code clearer! % \end{macrocode} % First check that at least one of the alphabets for the font shape is defined % (this process is fast) \dots % \begin{macrocode} - \clist_map_inline:Nn #2 + \clist_map_inline:Nn \l_@@_alphabet_clist { \tl_set:Nn \l_@@_alphabet_tl {##1} \@@_if_alphabet_exists:nnTF \l_@@_style_tl \l_@@_alphabet_tl @@ -2590,22 +2600,22 @@ This work is "maintained" by Will Robertson. % \dots and then loop through them defining the individual ranges: % (currently this process is slow) % \begin{macrocode} - \csname TIC\endcsname - \clist_map_inline:Nn #2 +%<debug> \csname TIC\endcsname + \clist_map_inline:Nn \l_@@_alphabet_clist { \tl_set:Nx \l_@@_alphabet_tl { \tl_trim_spaces:n {##1} } \cs_if_exist:cT {@@_config_ \l_@@_style_tl _ \l_@@_alphabet_tl :n} { \exp_args:No \tl_if_eq:nnTF \l_@@_alphabet_tl {misc} { - \@@_log:nx {setup-alph} {math \l_@@_style_tl~(\l_@@_alphabet_tl)} - \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {#3} + \@@_log:nx {setup-alph} {sym \l_@@_style_tl~(\l_@@_alphabet_tl)} + \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {\l_@@_remap_style_tl} } { - \@@_glyph_if_exist:nTF { \@@_to_usv:nn {\l_@@_style_tl} {\l_@@_alphabet_tl} } + \@@_glyph_if_exist:nTF { \@@_to_usv:nn {\l_@@_remap_style_tl} {\l_@@_alphabet_tl} } { - \@@_log:nx {setup-alph} {math \l_@@_style_tl~(\l_@@_alphabet_tl)} - \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {#3} + \@@_log:nx {setup-alph} {sym \l_@@_style_tl~(\l_@@_alphabet_tl)} + \@@_alphabet_config:nnn {\l_@@_style_tl} {\l_@@_alphabet_tl} {\l_@@_remap_style_tl} } { \bool_if:NTF \l_@@_implicit_alph_bool @@ -2623,7 +2633,7 @@ This work is "maintained" by Will Robertson. } } } - \csname TOC\endcsname +%<debug> \csname TOC\endcsname } % \end{macrocode} % \end{macro} @@ -3851,12 +3861,6 @@ This work is "maintained" by Will Robertson. % \end{macrocode} % \end{macro} % -% \begin{macro}{\mathrm} -% \begin{macrocode} -\let\mathfence\mathord -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\digamma} % \begin{macro}{\Digamma} % I might end up just changing these in the table. |