summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siunitx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-22 03:00:40 +0000
committerNorbert Preining <norbert@preining.info>2021-08-22 03:00:40 +0000
commit285f2e662f6dc37d227660aeb7624cac13004686 (patch)
treeb93624aed9f5c57b812296aa714763e9ef87fab6 /macros/latex/contrib/siunitx
parentdd302372d8cdbe867c55bbea51f1f2a4842c3353 (diff)
CTAN sync 202108220300
Diffstat (limited to 'macros/latex/contrib/siunitx')
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md11
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1510786 -> 1511547 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-number.dtx137
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin636202 -> 636196 bytes
6 files changed, 93 insertions, 59 deletions
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index d02f959416..5be9f750f6 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.26]
+
+### Fixed
+- Accidental printing of `T@TS1` with `beamer` (issue
+ [#534](https://github.com/josephwright/siunitx/issues/534))
+
## [v3.0.25]
### Changed
@@ -361,6 +367,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
- 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 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
- 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 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### 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
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 6e575cff02..779c0c26b6 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx
index 924aaa3b0f..25e15ca4bb 100644
--- a/macros/latex/contrib/siunitx/siunitx-number.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-number.dtx
@@ -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,66 +2813,73 @@
{ \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}
+% \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}
-% 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.
+% 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} }
@@ -2876,24 +2888,38 @@
{
#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
- }
- {
- ! \str_if_eq_p:nn { {#1} {#2} {#3} } { { 10 } { } { { S } { 1 } } }
+ ! \bool_lazy_and_p:nn
+ { \str_if_eq_p:Vn \l_@@_exponent_mode_tl { scientific } }
+ { \str_if_eq_p:nn { #1.#2 } { 10. } }
}
{
- \use:c
- { @@_round_ \l_@@_exponent_mode_tl :nn }
- {#1} {#2}
- \@@_round_places_end:nnn {#3} {#5} {#6}
+ \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_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
@@ -2949,6 +2975,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_zero_decimal:NN}
% \begin{macro}[EXP]{\@@_zero_decimal:nnnnnnn}
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 2c76156563..677e05f750 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -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 } }
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index d0d855e92a..0acd9a6c46 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -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}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 5d7777db9c..fe5b448e15 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ