diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-21 21:00:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-21 21:00:27 +0000 |
commit | e16a075410c784ba789eab80952fd87de907a4a9 (patch) | |
tree | 530b1669ae125790f25dfb33fc671b6ffd1451ed /Master | |
parent | 675daa21c4f033310c94e1d6ff9f3b06799c8c0c (diff) |
siunitx (22aug21)
git-svn-id: svn://tug.org/texlive/trunk@60295 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf | bin | 1510786 -> 1511547 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | bin | 636202 -> 636196 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx | 137 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 105 |
7 files changed, 152 insertions, 105 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md index d02f9594168..5be9f750f69 100644 --- a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf Binary files differindex 6e575cff026..779c0c26b6e 100644 --- a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf +++ b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf Binary files differindex 5d7777db9cb..fe5b448e15d 100644 --- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf +++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index 924aaa3b0fe..25e15ca4bb0 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx index 2c76156563a..677e05f7508 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx +++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index d0d855e92ac..0acd9a6c467 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} {2021-08-16} {3.0.25} +\ProvidesExplPackage {siunitx} {2021-08-21} {3.0.26} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index 3978b3fe629..eb7bb060a8e 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty @@ -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,51 +2936,50 @@ { \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} } @@ -2989,24 +2988,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__siunitx_number_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__siunitx_number_exponent_mode_tl { scientific } } + { \str_if_eq_p:nn { #1.#2 } { 10. } } } { - \use:c - { __siunitx_number_round_ \l__siunitx_number_exponent_mode_tl :nn } - {#1} {#2} - \__siunitx_number_round_places_end:nnn {#3} {#5} {#6} + \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_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 { @@ -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 } } |