texlive[61879] Master/texmf-dist: siunitx (4feb22)

commits+karl at tug.org commits+karl at tug.org
Fri Feb 4 23:21:00 CET 2022


Revision: 61879
          http://tug.org/svn/texlive?view=revision&revision=61879
Author:   karl
Date:     2022-02-04 23:21:00 +0100 (Fri, 04 Feb 2022)
Log Message:
-----------
siunitx (4feb22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
    trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2022-02-04 22:20:46 UTC (rev 61878)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2022-02-04 22:21:00 UTC (rev 61879)
@@ -7,6 +7,11 @@
 
 ## [Unreleased]
 
+## [v3.0.47] - 2022-02-03
+
+### Changed
+- Better handling of `\mathord` in text mode
+
 ## [v3.0.46] - 2022-02-02
 
 ### Fixed
@@ -1698,7 +1703,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.46...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.47...HEAD
+[v3.0.47]: https://github.com/josephwright/siunitx/compare/v3.0.46...v3.0.47
 [v3.0.46]: https://github.com/josephwright/siunitx/compare/v3.0.45...v3.0.46
 [v3.0.45]: https://github.com/josephwright/siunitx/compare/v3.0.44...v3.0.45
 [v3.0.44]: https://github.com/josephwright/siunitx/compare/v3.0.43...v3.0.44

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx	2022-02-04 22:20:46 UTC (rev 61878)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx	2022-02-04 22:21:00 UTC (rev 61879)
@@ -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,15 +3318,10 @@
 \cs_new:Npn \@@_output_sign:nN #1#2
   {
     \tl_if_blank:nTF {#1}
-      { \@@_output_sign:N #2 }
-      { \exp_not:n { \mathord {#2} } }
+      { \use:n }
+      { \mathord }
+        { \exp_not:n {#2} }
   }
-\cs_new:Npn \@@_output_sign:N #1
-  {
-    \bool_if:NTF \l_@@_tight_bool
-      { \exp_not:n { \mathord {#1} } }
-      { \exp_not:n {#1} }
-  }
 \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}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2022-02-04 22:20:46 UTC (rev 61878)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2022-02-04 22:21:00 UTC (rev 61879)
@@ -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,15 +845,7 @@
           \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 }
@@ -859,7 +852,8 @@
             { \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 at edef \l_@@_tmp_tl { \l_@@_tmp_tl }
+          \protected at 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 }
         }
@@ -866,6 +860,16 @@
     \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}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2022-02-04 22:20:46 UTC (rev 61878)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2022-02-04 22:21:00 UTC (rev 61879)
@@ -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}
 %

Modified: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2022-02-04 22:20:46 UTC (rev 61878)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2022-02-04 22:21:00 UTC (rev 61879)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2022-02-02} {3.0.46}
+\ProvidesExplPackage {siunitx} {2022-02-03} {3.0.47}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -3272,7 +3272,7 @@
           {
             \bool_if:NTF \l__siunitx_number_bracket_negative_bool
               { \__siunitx_number_output_sign_brackets:w }
-              { \__siunitx_number_output_sign:nN {#1} #2 }
+              { \__siunitx_number_output_sign:nN {#1} - }
           }
           { \__siunitx_number_output_sign:nN {#1} #2 }
       }
@@ -3281,15 +3281,10 @@
 \cs_new:Npn \__siunitx_number_output_sign:nN #1#2
   {
     \tl_if_blank:nTF {#1}
-      { \__siunitx_number_output_sign:N #2 }
-      { \exp_not:n { \mathord {#2} } }
+      { \use:n }
+      { \mathord }
+        { \exp_not:n {#2} }
   }
-\cs_new:Npn \__siunitx_number_output_sign:N #1
-  {
-    \bool_if:NTF \l__siunitx_number_tight_bool
-      { \exp_not:n { \mathord {#1} } }
-      { \exp_not:n {#1} }
-  }
 \cs_new:Npn
   \__siunitx_number_output_sign_brackets:w #1 \__siunitx_number_output_end:
   {
@@ -3418,7 +3413,10 @@
     \str_if_eq:VnTF \l__siunitx_number_uncert_mode_tl { separate }
       {
         \exp_not:n {#2}
-        \__siunitx_number_output_sign:N \pm
+        \bool_if:NTF \l__siunitx_number_tight_bool
+          { \mathord }
+          { \use:n }
+            { \exp_not:n { \pm } }
         \exp_not:n {#2}
         \__siunitx_number_output_uncert_S_aux:nnn
           { \int_eval:n { \tl_count:n {#4} - \tl_count:n {#1} } }
@@ -3541,9 +3539,9 @@
         \bool_lazy_and:nnT
           { \l__siunitx_number_implicit_plus_bool }
           { ! \str_if_eq_p:nn {#2} { 0 } }
-          { \__siunitx_number_output_sign:N + }
+          { + }
       }
-      { \__siunitx_number_output_sign:N #1 }
+      { \exp_not:n {#1} }
     \__siunitx_number_output_digits:nn { integer } {#2}
   }
 \cs_new:Npn \__siunitx_number_output_end: { }
@@ -3971,15 +3969,7 @@
           \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}
-            }
+            { \__siunitx_print_text_replace_first:N ##1 }
           \cs_set:Npn \pm { \: \exp_not:N \textpm \: }
           \tl_map_inline:nn
             { \mp \ge \le \gg \ll }
@@ -3986,7 +3976,8 @@
             { \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 at edef \l__siunitx_print_tmp_tl { \l__siunitx_print_tmp_tl }
+          \protected at edef \l__siunitx_print_tmp_tl
+            {  \exp_after:wN \__siunitx_print_text_replace_first:N \l__siunitx_print_tmp_tl }
           \__siunitx_print_text_replace:N \l__siunitx_print_tmp_tl
           \__siunitx_print_text_replace_aux:n { \tl_use:N \l__siunitx_print_tmp_tl }
         }
@@ -3993,6 +3984,16 @@
     \group_end:
   }
 \cs_new_protected:Npn \__siunitx_print_text_replace_aux:n #1 {#1}
+\cs_new:Npn \__siunitx_print_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 \__siunitx_print_text_replace:N #1
   {
     \exp_not:N \__siunitx_print_text_replace:NNn #1



More information about the tex-live-commits mailing list.