diff options
Diffstat (limited to 'macros/latex/contrib/siunitx')
-rw-r--r-- | macros/latex/contrib/siunitx/CHANGELOG.md | 10 | ||||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx-code.pdf | bin | 1485621 -> 1486326 bytes | |||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx-emulation.dtx | 4 | ||||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx-number.dtx | 22 | ||||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx-symbol.dtx | 1 | ||||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx.dtx | 2 | ||||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx.pdf | bin | 634770 -> 634773 bytes | |||
-rw-r--r-- | macros/latex/contrib/siunitx/siunitx.tex | 2 |
8 files changed, 31 insertions, 10 deletions
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md index a465aea145..364058db97 100644 --- a/macros/latex/contrib/siunitx/CHANGELOG.md +++ b/macros/latex/contrib/siunitx/CHANGELOG.md @@ -7,6 +7,13 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to ## [Unreleased] +## [v3.0.12] + +### Fixed +- Modify warning message (fixes #476) +- Rounding zero values to a fixed number of places (issue #477) +- Remove stray debug code in symbol allocation (issue #478) + ## [v3.0.11] ### Changed @@ -1361,7 +1368,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.11...HEAD +[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.12...HEAD +[v3.0.12]: https://github.com/josephwright/siunitx/compare/v3.0.11...v3.0.12 [v3.0.11]: https://github.com/josephwright/siunitx/compare/v3.0.10...v3.0.11 [v3.0.10]: https://github.com/josephwright/siunitx/compare/v3.0.9...v3.0.10 [v3.0.9]: https://github.com/josephwright/siunitx/compare/v3.0.8...v3.0.9 diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf Binary files differindex d4f36b226f..b62b22632d 100644 --- a/macros/latex/contrib/siunitx/siunitx-code.pdf +++ b/macros/latex/contrib/siunitx/siunitx-code.pdf diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx index 9d0133affb..8e11abda62 100644 --- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx +++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx @@ -1025,8 +1025,8 @@ Unit~macro~#1~has~been~deprecated~in~this~release. \\ \\ The~BIPM~have~removed~this~unit~from~the~SI~Brochure.~ You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit\ % - in~your~source. The~current~definition~is\\ \\ - \token_to_str:N \DeclareSIUnit \{ #2 \} + in~your~source.~The~current~definition~is\\ \\ + \token_to_str:N \DeclareSIUnit #1 \{ #2 \} } \cs_gset_protected:Npn \@@_tmp:w #1#2 { diff --git a/macros/latex/contrib/siunitx/siunitx-number.dtx b/macros/latex/contrib/siunitx/siunitx-number.dtx index b304a573c9..2dfa66374c 100644 --- a/macros/latex/contrib/siunitx/siunitx-number.dtx +++ b/macros/latex/contrib/siunitx/siunitx-number.dtx @@ -1691,7 +1691,8 @@ % % \begin{macro}{\siunitx_number_process:NN} % \begin{macro}{\@@_process:nnnnnnnNN} -% A top-level interface for the processing tools. +% A top-level interface for the processing tools. Rounding happens in all +% cases, but exponents are only processed if the value is not $0$. % \begin{macrocode} \cs_new_protected:Npn \siunitx_number_process:NN #1#2 { @@ -1707,12 +1708,13 @@ } \cs_new_protected:Npn \@@_process:nnnnnnnNN #1#2#3#4#5#6#7#8#9 { - \bool_lazy_and:nnF + \bool_lazy_and:nnTF { \str_if_eq_p:nn {#3} { 0 } } { \str_if_eq_p:ee { \exp_not:n {#4} } { \prg_replicate:nn { \tl_count:n {#4} } { 0 } } } + { \@@_round:NN #8 #9 } { \@@_exponent:NN #8 #9 \@@_round:NN #9 #9 @@ -2547,15 +2549,27 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP]{\@@_round_figures:nnnnnnn} +% \begin{macro}[EXP]{\@@_round_figures:nnnnnnn, \@@_round_figures_aux:nnnnnnn} % \begin{macro}[EXP]{\@@_round_figures_count:nnN} % \begin{macro}[EXP]{\@@_round_figures_count:nnnN} -% Rounding to a fixed number of significant figures starts by checking that +% Rounding to figures only makes sense if the number is not $0$, so we start +% by filtering out that case. We then check that % there is no uncertainty, and that the number of figures requested is % positive: if not, the result is always fixed at zero. % \begin{macrocode} \cs_new:Npn \@@_round_figures:nnnnnnn #1#2#3#4#5#6#7 { + \bool_lazy_and:nnTF + { \str_if_eq_p:nn {#3} { 0 } } + { + \str_if_eq_p:ee + { \exp_not:n {#4} } { \prg_replicate:nn { \tl_count:n {#4} } { 0 } } + } + { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } } + { \@@_round_figures_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} } + } +\cs_new:Npn \@@_round_figures_aux:nnnnnnn #1#2#3#4#5#6#7 + { \tl_if_blank:nTF {#5} { \int_compare:nNnTF \l_@@_round_precision_int > 0 diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx index 251d257c4b..6c7154d751 100644 --- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx +++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx @@ -149,7 +149,6 @@ \prg_return_true: } { - \show\l_@@_tmpa_tl \show\l_@@_tmpb_tl \group_end: \prg_return_false: } diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx index 03d06b4cb3..53cfbd8426 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-06-07} {3.0.11} +\ProvidesExplPackage {siunitx} {2021-06-09} {3.0.12} {A comprehensive (SI) units package} % \end{macrocode} % diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf Binary files differindex 62115e1004..36c97918d0 100644 --- a/macros/latex/contrib/siunitx/siunitx.pdf +++ b/macros/latex/contrib/siunitx/siunitx.pdf diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex index 360a395e6f..28eaa37b2c 100644 --- a/macros/latex/contrib/siunitx/siunitx.tex +++ b/macros/latex/contrib/siunitx/siunitx.tex @@ -3044,7 +3044,7 @@ adjust the appearance of litres: both \enquote{\unit{l}} and \enquote{\unit{L}} are commonly used. The recommended approach to adjustment is to re-declare the \cs{litre} macro, as \cs{liter} will follow automatically. \begin{LaTeXdemo}[code only] - \DeclareSIUnit\liter{l} + \DeclareSIUnit\litre{l} \end{LaTeXdemo} \subsection{Ensuring text or math output% |