From 1bde92bd528b3ba41950517fa33b93fa3005f691 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Feb 2022 22:21:00 +0000 Subject: siunitx (4feb22) git-svn-id: svn://tug.org/texlive/trunk@61879 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/siunitx/siunitx-number.dtx | 24 ++++++++----------- .../source/latex/siunitx/siunitx-print.dtx | 27 +++++++++++++--------- Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 2 +- 3 files changed, 27 insertions(+), 26 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index a7bd0b7e160..98f52307c24 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx @@ -3169,7 +3169,6 @@ % \begin{macro}[rEXP]{\@@_output_comparator:nn} % \begin{macro}[rEXP]{\@@_output_sign:nnn} % \begin{macro}[rEXP]{\@@_output_sign:nN} -% \begin{macro}[rEXP]{\@@_output_sign:N} % \begin{macro}[rEXP] % {\@@_output_sign_color:w, \@@_output_sign_brackets:w} % \begin{macro}[rEXP]{\@@_output_integer:nnn} @@ -3310,7 +3309,7 @@ { \bool_if:NTF \l_@@_bracket_negative_bool { \@@_output_sign_brackets:w } - { \@@_output_sign:nN {#1} #2 } + { \@@_output_sign:nN {#1} - } } { \@@_output_sign:nN {#1} #2 } } @@ -3319,14 +3318,9 @@ \cs_new:Npn \@@_output_sign:nN #1#2 { \tl_if_blank:nTF {#1} - { \@@_output_sign:N #2 } - { \exp_not:n { \mathord {#2} } } - } -\cs_new:Npn \@@_output_sign:N #1 - { - \bool_if:NTF \l_@@_tight_bool - { \exp_not:n { \mathord {#1} } } - { \exp_not:n {#1} } + { \use:n } + { \mathord } + { \exp_not:n {#2} } } \cs_new:Npn \@@_output_sign_brackets:w #1 \@@_output_end: @@ -3481,7 +3475,10 @@ \str_if_eq:VnTF \l_@@_uncert_mode_tl { separate } { \exp_not:n {#2} - \@@_output_sign:N \pm + \bool_if:NTF \l_@@_tight_bool + { \mathord } + { \use:n } + { \exp_not:n { \pm } } \exp_not:n {#2} \@@_output_uncert_S_aux:nnn { \int_eval:n { \tl_count:n {#4} - \tl_count:n {#1} } } @@ -3617,9 +3614,9 @@ \bool_lazy_and:nnT { \l_@@_implicit_plus_bool } { ! \str_if_eq_p:nn {#2} { 0 } } - { \@@_output_sign:N + } + { + } } - { \@@_output_sign:N #1 } + { \exp_not:n {#1} } \@@_output_digits:nn { integer } {#2} } % \end{macrocode} @@ -3660,7 +3657,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \subsection{Miscellaneous tools} % diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx index 8f1e4bb4677..10a316da897 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: siunitx-print.dtx Copyright (C) 2016-2019,2021 Joseph Wright +% File: siunitx-print.dtx Copyright (C) 2016-2019,2021,2022 Joseph Wright % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -791,6 +791,7 @@ % % \begin{macro}{\siunitx_print_text:n} % \begin{macro}{\@@_text_replace:n, \@@_text_replace_aux:n} +% \begin{macro}[EXP]{\@@_text_replace_first:N} % \begin{macro}{\@@_text_replace:N} % \begin{macro}{\@@_text_replace:NNn} % \begin{macro}{\@@_text_replace:Nnnn} @@ -844,28 +845,31 @@ \tl_if_empty:NF \l_siunitx_unit_font_tl { \exp_after:wN \cs_set_eq:NN \l_siunitx_unit_font_tl \use:n } \cs_set:Npn \mathord ##1 - { - \str_case:nnF {##1} - { - { \cdot } { \exp_not:N \textperiodcentered } - { \pm } { \exp_not:N \textpm } - { \times } { \exp_not:N \texttimes } - } - {##1} - } + { \@@_text_replace_first:N ##1 } \cs_set:Npn \pm { \: \exp_not:N \textpm \: } \tl_map_inline:nn { \mp \ge \le \gg \ll } { \cs_set:Npn ##1 { \exp_not:N \ensuremath { \exp_not:N ##1 } } } \cs_set:Npn \cdot { \: \exp_not:N \textperiodcentered \: } \cs_set:Npn \times { \: \exp_not:N \texttimes \: } - \protected@edef \l_@@_tmp_tl { \l_@@_tmp_tl } + \protected@edef \l_@@_tmp_tl + { \exp_after:wN \@@_text_replace_first:N \l_@@_tmp_tl } \@@_text_replace:N \l_@@_tmp_tl \@@_text_replace_aux:n { \tl_use:N \l_@@_tmp_tl } } \group_end: } \cs_new_protected:Npn \@@_text_replace_aux:n #1 {#1} +\cs_new:Npn \@@_text_replace_first:N #1 + { + \str_case:nnF {#1} + { + { \cdot } { \exp_not:N \textperiodcentered } + { \pm } { \exp_not:N \textpm } + { \times } { \exp_not:N \texttimes } + } + {#1} + } \cs_new_protected:Npx \@@_text_replace:N #1 { \exp_not:N \@@_text_replace:NNn #1 @@ -1022,6 +1026,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \subsection{Standard settings for module options} % diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index e860a803b32..d1d4e125ab9 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -121,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2022-02-02} {3.0.46} +\ProvidesExplPackage {siunitx} {2022-02-03} {3.0.47} {A comprehensive (SI) units package} % \end{macrocode} % -- cgit v1.2.3