texlive[60295] Master/texmf-dist: siunitx (22aug21)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 21 23:00:28 CEST 2021


Revision: 60295
          http://tug.org/svn/texlive?view=revision&revision=60295
Author:   karl
Date:     2021-08-21 23:00:27 +0200 (Sat, 21 Aug 2021)
Log Message:
-----------
siunitx (22aug21)

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-unit.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	2021-08-21 21:00:09 UTC (rev 60294)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-08-21 21:00:27 UTC (rev 60295)
@@ -7,6 +7,12 @@
 
 ## [Unreleased]
 
+## [v3.0.26]
+
+### Fixed
+- Accidental printing of `T at TS1` with `beamer` (issue
+  [#534](https://github.com/josephwright/siunitx/issues/534))
+
 ## [v3.0.25]
 
 ### Changed
@@ -361,6 +367,7 @@
 - Option `table-alignment-mode`
 - Option `table-column-type`
 - Option `text-family-to-math`
+- Option `text-font-command`
 - Option `text-series-to-math`
 - Option `uncertainty-mode`
 - Option `unit-font-command`
@@ -423,7 +430,6 @@
 - Option `table-sign-mantissa`
 - Option `table-space-text-post`
 - Option `table-space-text-pre`
-- Option `text-font-command`
 - Option `zero-decimal-to-integer`
 - Option setting `list-units = brackets`
 - Option setting `per-mode = reciprocal`
@@ -1539,7 +1545,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.25...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.26...HEAD
+[v3.0.26]: https://github.com/josephwright/siunitx/compare/v3.0.25...v3.0.26
 [v3.0.25]: https://github.com/josephwright/siunitx/compare/v3.0.24...v3.0.25
 [v3.0.24]: https://github.com/josephwright/siunitx/compare/v3.0.23...v3.0.24
 [v3.0.23]: https://github.com/josephwright/siunitx/compare/v3.0.22...v3.0.23

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	2021-08-21 21:00:09 UTC (rev 60294)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx	2021-08-21 21:00:27 UTC (rev 60295)
@@ -2765,11 +2765,16 @@
 % \begin{macro}[EXP]{\@@_round_uncertainty:nnnnnnn}
 % \begin{macro}[EXP]{\@@_round_uncertainty_end:nn}
 % \begin{macro}[EXP]{\@@_round_uncertainty:nnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty:nnnnn,  \@@_round_uncertainty_aux:nnnnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty_aux:nnnnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty:nnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty:nnnnn}
+% \begin{macro}[EXP]
+%   {
+%     \@@_round_uncertainty_simple:nnnnnn ,
+%     \@@_round_uncertainty_shift:nnnnnn
+%   }
 % \begin{macro}[EXP]{\@@_round_uncertainty_shift:nn}
 % \begin{macro}[EXP]{\@@_round_uncertainty_shift:nnnw}
-% \begin{macro}[EXP]{\@@_round_uncertainty_shift:nnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty_shift_aux:nnnnn}
 % \begin{macro}[EXP]
 %   {
 %     \@@_round_uncertainty_engineering:nnn ,
@@ -2808,67 +2813,74 @@
   { \exp_not:n { {#1} {#2} } }
 %    \end{macrocode}
 %   Round the uncertainty first: this is needed to get the number of places
-%   correct (for the case where the uncertainty rounds up to |1...|). Once that
-%   is done, it's just a question of working out the digits in the main part.
+%   correct. Once that is done, it's just a question of working out the digits
+%   in the main part.
 %    \begin{macrocode}
 \cs_new:Npn \@@_round_uncertainty:nnn #1#2#3
   {
-    \exp_last_unbraced:Nf \@@_round_uncertainty:nnnnn
+    \exp_args:Nf \@@_round_uncertainty:nnnn
       {
-        \@@_round:fnn
-          {
-            \int_eval:n
-              { \tl_count:n {#3} - \l_@@_round_precision_int }
-          }
-          { } {#3}
+        \int_eval:n
+          { \tl_count:n {#3} - \l_@@_round_precision_int }
       }
       {#1} {#2} {#3}
   }
-\cs_new:Npn \@@_round_uncertainty:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_round_uncertainty:nnnn #1#2#3#4
   {
-    \exp_args:Nff \@@_round_uncertainty_aux:nnnnn 
-      { \int_eval:n { \tl_count:n {#5} - \tl_count:n {#2} } }
-      {#1} {#2} {#3} {#4}
+    \exp_last_unbraced:Nf \@@_round_uncertainty:nnnnn
+      { \@@_round:nnn {#1} { } {#4} }
+      {#2} {#3} {#1}
   }
 %    \end{macrocode}
-%   The first argument here deals with the case where we've lost digits
-%   in the uncertainty and it's purely located in the integer part.
+%   Here, we need to work out how many digits to zero-fill the uncertainty, for
+%   the case where it crosses into the integer part. This depends on whether
+%   the uncertainty rounded up, which also links to additional treatment. We
+%   therefore split paths here.
 %    \begin{macrocode}
-\cs_new:Npn \@@_round_uncertainty_aux:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_round_uncertainty:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nf \@@_round_uncertainty_aux:nnnnnn
+    \tl_if_blank:nTF {#1}
       {
-        \prg_replicate:nn
-          { \int_max:nn { #1 - \tl_count:n {#5} } { 0 } }
-          { 0 }
+        \exp_args:Nf \@@_round_uncertainty_simple:nnnnn
+          {
+            \prg_replicate:nn
+              { 
+                \int_max:nn
+                  { 0 - ( \tl_count:n {#4} - \tl_count:n {#2} - #5 +  1 ) }
+                  { 0 }
+              }
+              { 0 }
+          }
+          {#3} {#4} {#2} {#5}
       }
-      {#1} {#2} {#3} {#4} {#5}
+      { \@@_round_uncertainty_shift:nnnnn {#3} {#4} {#1} {#2} {#5} }
+        
   }
-\cs_new:Npn \@@_round_uncertainty_aux:nnnnnn #1#2#3#4#5#6
+%    \end{macrocode}
+%   The simple case: round and pad out the uncertainty as required.
+%    \begin{macrocode}
+\cs_new:Npn \@@_round_uncertainty_simple:nnnnn #1#2#3#4#5
   {
-    \tl_if_blank:nTF {#3}
-      {
-        \@@_round:nnn
-          {#2}
-          {#5} {#6}
-        { { S } { #4 #1 } }
-      }
-      {
-       \exp_args:Ne \@@_round_uncertainty_shift:nn
-         {
-            \@@_round:fnn
-              { \int_eval:n { #2 + 1 } }
-              {#5} {#6}
-          }
-          { { S } { #3 #1 } }
-      }
+    \@@_round:nnn
+      {#5}
+      {#2} {#3}
+    { { S } { #4 #1 } }
   }
 %    \end{macrocode}
-%   We now have to clear up the exponent, plus deal with the case where
-%   rounding has resulted in the entire value being uncertain (|1(1)| with
-%   some exponent). The latter shows up if the uncertainty is too long or if
-%   we match a specific pattern.
 %    \begin{macrocode}
+\cs_new:Npn \@@_round_uncertainty_shift:nnnnn #1#2#3#4#5
+  {
+    \exp_args:Ne \@@_round_uncertainty_shift:nn
+      { \@@_round:fnn { \int_eval:n { #5 + 1 } } {#1} {#2} }
+      {#5}
+  }
+%    \end{macrocode}
+%   If the padding length is the same as the number of integer digits, then
+%   we have a pathological case and need to filter out. They show up as they
+%   have the either the precision greater than the length of the integer
+%   part, or have a value of exactly $10$ when the exponent mode is
+%   scientific.
+%    \begin{macrocode}
 \cs_new:Npn \@@_round_uncertainty_shift:nn #1#2
   { \@@_round_uncertainty_shift:nnnw #1 {#2} }
 \cs_new:Npn \@@_round_uncertainty_shift:nnnw
@@ -2876,25 +2888,39 @@
   {
     #4
     \bool_lazy_and:nnTF
+      { \int_compare_p:nNn {#3} > { \tl_count:n {#1} } }
       {
-        \int_compare_p:nNn
-          { \tl_count:o { \use_ii:nn #3 } } = \l_@@_round_precision_int
+        ! \bool_lazy_and_p:nn
+          { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { scientific } }
+          { \str_if_eq_p:nn { #1.#2 } { 10. } }
       }
       {
-        ! \str_if_eq_p:nn { {#1} {#2} {#3} } { { 10 } { } { { S } { 1 } } }
+        \exp_args:Nf \@@_round_uncertainty_shift_aux:nnnnn
+          {
+            \prg_replicate:nn
+              {
+                \tl_if_blank:nTF {#2}
+                  { \int_min:nn {#3} { \tl_count:n {#1} - 1 } }
+                  { 0 }
+              }
+              { 0 }
+          }
+          {#1} {#2}
       }
       {
         \use:c
-          { @@_round_ \l_@@_exponent_mode_tl :nn }
-            {#1} {#2}
-        \@@_round_places_end:nnn {#3} {#5} {#6}
-      }
-      {
-        \use:c
           { @@_round_uncertainty_ \l_@@_exponent_mode_tl :nnn }
-            {#1} {#5} {#6}
+            {#1}
       }
+         {#5} {#6}
   }
+\cs_new:Npn \@@_round_uncertainty_shift_aux:nnnnn #1#2#3#4#5
+  {
+    \use:c
+      { @@_round_ \l_@@_exponent_mode_tl :nn }
+        {#2} {#3}
+    \@@_round_places_end:nnn { { S } { 1 #1 } } {#4} {#5}
+  }
 %    \end{macrocode}
 %   With the data available, adjust the output such that the uncertainty
 %   is of the right length.
@@ -2949,6 +2975,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \begin{macro}{\@@_zero_decimal:NN}
 % \begin{macro}[EXP]{\@@_zero_decimal:nnnnnnn}

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-08-21 21:00:09 UTC (rev 60294)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-08-21 21:00:27 UTC (rev 60295)
@@ -2830,7 +2830,7 @@
 %    \begin{macrocode}
 \AtBeginDocument
   {
-    \str_if_eq:eeTF
+    \str_if_eq:eeT
       { \exp_not:o { \familydefault } }
       { \exp_not:n { \sfdefault } }
       { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-08-21 21:00:09 UTC (rev 60294)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-08-21 21:00:27 UTC (rev 60295)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-08-16} {3.0.25}
+\ProvidesExplPackage {siunitx} {2021-08-21} {3.0.26}
   {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	2021-08-21 21:00:09 UTC (rev 60294)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-08-21 21:00:27 UTC (rev 60295)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2021-08-16} {3.0.25}
+\ProvidesExplPackage {siunitx} {2021-08-21} {3.0.26}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -2936,52 +2936,51 @@
   { \exp_not:n { {#1} {#2} } }
 \cs_new:Npn \__siunitx_number_round_uncertainty:nnn #1#2#3
   {
-    \exp_last_unbraced:Nf \__siunitx_number_round_uncertainty:nnnnn
+    \exp_args:Nf \__siunitx_number_round_uncertainty:nnnn
       {
-        \__siunitx_number_round:fnn
-          {
-            \int_eval:n
-              { \tl_count:n {#3} - \l__siunitx_number_round_precision_int }
-          }
-          { } {#3}
+        \int_eval:n
+          { \tl_count:n {#3} - \l__siunitx_number_round_precision_int }
       }
       {#1} {#2} {#3}
   }
-\cs_new:Npn \__siunitx_number_round_uncertainty:nnnnn #1#2#3#4#5
+\cs_new:Npn \__siunitx_number_round_uncertainty:nnnn #1#2#3#4
   {
-    \exp_args:Nff \__siunitx_number_round_uncertainty_aux:nnnnn
-      { \int_eval:n { \tl_count:n {#5} - \tl_count:n {#2} } }
-      {#1} {#2} {#3} {#4}
+    \exp_last_unbraced:Nf \__siunitx_number_round_uncertainty:nnnnn
+      { \__siunitx_number_round:nnn {#1} { } {#4} }
+      {#2} {#3} {#1}
   }
-\cs_new:Npn \__siunitx_number_round_uncertainty_aux:nnnnn #1#2#3#4#5
+\cs_new:Npn \__siunitx_number_round_uncertainty:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nf \__siunitx_number_round_uncertainty_aux:nnnnnn
+    \tl_if_blank:nTF {#1}
       {
-        \prg_replicate:nn
-          { \int_max:nn { #1 - \tl_count:n {#5} } { 0 } }
-          { 0 }
+        \exp_args:Nf \__siunitx_number_round_uncertainty_simple:nnnnn
+          {
+            \prg_replicate:nn
+              {
+                \int_max:nn
+                  { 0 - ( \tl_count:n {#4} - \tl_count:n {#2} - #5 +  1 ) }
+                  { 0 }
+              }
+              { 0 }
+          }
+          {#3} {#4} {#2} {#5}
       }
-      {#1} {#2} {#3} {#4} {#5}
+      { \__siunitx_number_round_uncertainty_shift:nnnnn {#3} {#4} {#1} {#2} {#5} }
+
   }
-\cs_new:Npn \__siunitx_number_round_uncertainty_aux:nnnnnn #1#2#3#4#5#6
+\cs_new:Npn \__siunitx_number_round_uncertainty_simple:nnnnn #1#2#3#4#5
   {
-    \tl_if_blank:nTF {#3}
-      {
-        \__siunitx_number_round:nnn
-          {#2}
-          {#5} {#6}
-        { { S } { #4 #1 } }
-      }
-      {
-       \exp_args:Ne \__siunitx_number_round_uncertainty_shift:nn
-         {
-            \__siunitx_number_round:fnn
-              { \int_eval:n { #2 + 1 } }
-              {#5} {#6}
-          }
-          { { S } { #3 #1 } }
-      }
+    \__siunitx_number_round:nnn
+      {#5}
+      {#2} {#3}
+    { { S } { #4 #1 } }
   }
+\cs_new:Npn \__siunitx_number_round_uncertainty_shift:nnnnn #1#2#3#4#5
+  {
+    \exp_args:Ne \__siunitx_number_round_uncertainty_shift:nn
+      { \__siunitx_number_round:fnn { \int_eval:n { #5 + 1 } } {#1} {#2} }
+      {#5}
+  }
 \cs_new:Npn \__siunitx_number_round_uncertainty_shift:nn #1#2
   { \__siunitx_number_round_uncertainty_shift:nnnw #1 {#2} }
 \cs_new:Npn \__siunitx_number_round_uncertainty_shift:nnnw
@@ -2989,25 +2988,39 @@
   {
     #4
     \bool_lazy_and:nnTF
+      { \int_compare_p:nNn {#3} > { \tl_count:n {#1} } }
       {
-        \int_compare_p:nNn
-          { \tl_count:o { \use_ii:nn #3 } } = \l__siunitx_number_round_precision_int
+        ! \bool_lazy_and_p:nn
+          { \str_if_eq_p:Vn \l__siunitx_number_exponent_mode_tl { scientific } }
+          { \str_if_eq_p:nn { #1.#2 } { 10. } }
       }
       {
-        ! \str_if_eq_p:nn { {#1} {#2} {#3} } { { 10 } { } { { S } { 1 } } }
+        \exp_args:Nf \__siunitx_number_round_uncertainty_shift_aux:nnnnn
+          {
+            \prg_replicate:nn
+              {
+                \tl_if_blank:nTF {#2}
+                  { \int_min:nn {#3} { \tl_count:n {#1} - 1 } }
+                  { 0 }
+              }
+              { 0 }
+          }
+          {#1} {#2}
       }
       {
         \use:c
-          { __siunitx_number_round_ \l__siunitx_number_exponent_mode_tl :nn }
-            {#1} {#2}
-        \__siunitx_number_round_places_end:nnn {#3} {#5} {#6}
-      }
-      {
-        \use:c
           { __siunitx_number_round_uncertainty_ \l__siunitx_number_exponent_mode_tl :nnn }
-            {#1} {#5} {#6}
+            {#1}
       }
+         {#5} {#6}
   }
+\cs_new:Npn \__siunitx_number_round_uncertainty_shift_aux:nnnnn #1#2#3#4#5
+  {
+    \use:c
+      { __siunitx_number_round_ \l__siunitx_number_exponent_mode_tl :nn }
+        {#2} {#3}
+    \__siunitx_number_round_places_end:nnn { { S } { 1 #1 } } {#4} {#5}
+  }
 \cs_new:Npn \__siunitx_number_round_uncertainty_engineering:nnn #1#2#3
   {
     \use:c
@@ -6046,7 +6059,7 @@
   }
 \AtBeginDocument
   {
-    \str_if_eq:eeTF
+    \str_if_eq:eeT
       { \exp_not:o { \familydefault } }
       { \exp_not:n { \sfdefault } }
       { \keys_set:nn { siunitx } { unit-font-command = \mathsf } }



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