diff options
author | Karl Berry <karl@freefriends.org> | 2024-01-25 21:22:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-01-25 21:22:29 +0000 |
commit | eb05b6438f547df7326c8911102b05429c523be9 (patch) | |
tree | 80f5c9ed6e066905e5db4cc53a27d52df8376401 /Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx | |
parent | 487c93c1527571a5df64b2f12eda05457da672d9 (diff) |
siunitx (25jan24)
git-svn-id: svn://tug.org/texlive/trunk@69590 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index 6397e3239f9..19e2c32e9b1 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: siunitx-number.dtx Copyright (C) 2014-2019,2021-2023 Joseph Wright +% File: siunitx-number.dtx Copyright (C) 2014-2019,2021-2024 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 @@ -2273,9 +2273,9 @@ % \begin{macro}[EXP]{\@@_exponent_engineering:nnNw} % \begin{macro}[EXP]{\@@_exponent_engineering_uncert:nn} % \begin{macro}[EXP]{\@@_exponent_engineering_uncert_S:nnn} -% \begin{macro}[EXP]{\@@_exponent_threshold:nnnnnnn} -% \begin{macro}[EXP]{\@@_exponent_threshold:nn, \@@_exponent_threshold:en} -% \begin{macro}[EXP]{\@@_exponent_threshold:nnnnnnnn} +% \begin{macro}[EXP] +% {\@@_exponent_threshold:nnnnnnn, \@@_exponent_threshold_aux:nnnnnnn} +% \begin{macro}[EXP]{\@@_exponent_threshold:n, \@@_exponent_threshold:e} % Manipulating an exponent is done using a single expansion function % \emph{unless} dealing with engineering-style output. The latter is easier % to handle by first converting to scientific output, then post-processing. @@ -2582,22 +2582,27 @@ % \begin{macrocode} \cs_new:Npn \@@_exponent_threshold:nnnnnnn #1#2#3#4#5#6#7 { - \@@_exponent_threshold:en + \@@_exponent_threshold:e { \@@_exponent_scientific:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} } - { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } } -\cs_new:Npn \@@_exponent_threshold:nn #1#2 - { \@@_exponent_threshold:nnnnnnnn #1 {#2} } -\cs_generate_variant:Nn \@@_exponent_threshold:nn { e } -\cs_new:Npn \@@_exponent_threshold:nnnnnnnn #1#2#3#4#5#6#7#8 +\cs_new:Npn \@@_exponent_threshold:n #1 + { \@@_exponent_threshold_aux:nnnnnnn #1 } +\cs_generate_variant:Nn \@@_exponent_threshold:n { e } +\cs_new:Npn \@@_exponent_threshold_aux:nnnnnnn #1#2#3#4#5#6#7 { \bool_lazy_and:nnTF { \int_compare_p:nNn {#6#7} > \l_@@_lower_threshold_int } { \int_compare_p:nNn {#6#7} < \l_@@_upper_threshold_int } - { \exp_not:n {#8} } + { + \exp_not:n { {#1} {#2} } + \@@_exponent_shift:nnn { -#6#7 } {#3} {#4} + \@@_exponent_uncert:n {#5} + { } + { 0 } + } { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } } } % \end{macrocode} @@ -2623,7 +2628,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\@@_digits:NN} % \begin{macro}[EXP]{\@@_digits:nnnnnnn} @@ -4117,7 +4121,7 @@ { \tl_if_blank:nTF {#1} { \use:n } - { \mathord } + { \exp_not:N \mathord } { \exp_not:n {#2} } } \cs_new:Npn @@ -4520,7 +4524,7 @@ { \exp_not:n {#2} \bool_if:NTF \l_@@_tight_bool - { \mathord } + { \exp_not:N \mathord } { \use:n } { \exp_not:n { \pm } } \exp_not:n {#2} |