diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-04 22:28:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-04 22:28:38 +0000 |
commit | 02788973cf9eb2069962d1c6eab78288ef6f40e8 (patch) | |
tree | ae6b55f8f7c93c537fbe8e8ca148fae7242dfd81 /Master/texmf-dist/source | |
parent | aed6f913084c995b5dfac04796c74db1904ffc66 (diff) |
siunitx (4jan22)
git-svn-id: svn://tug.org/texlive/trunk@61492 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
5 files changed, 33 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx index 9d9a2ac7531..3cd8db4b740 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx @@ -292,7 +292,7 @@ % % \begin{variable}{\l_@@_degrees_tl, \l_@@_minutes_tl, \l_@@_seconds_tl} % Space for formatting parsed numbers. -% \begin{macrocode} +% \begin{macrocode} \tl_new:N \l_@@_degrees_tl \tl_new:N \l_@@_minutes_tl \tl_new:N \l_@@_seconds_tl @@ -452,10 +452,10 @@ } } \cs_generate_variant:Nn \@@_arc_print_auxi:nnn { nV } -% \end{macrocode} +% \end{macrocode} % To align the two parts of the astronomy-style marker, we need to allow % for the |\scriptspace|. -% \begin{macrocode} +% \begin{macrocode} \cs_new_protected:Npn \@@_arc_print_auxii:nw #1#2 \q_nil #3 \q_nil #4 \q_nil #5 \q_nil #6 \q_nil #7 \q_nil #8 \q_stop { diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx index 5f119f13720..a11121a4ac9 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx @@ -447,6 +447,15 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_format:nnn #1#2#3 { + \tl_if_blank:nTF {#1} + { + \tl_if_blank:nF {#2} + { \@@_format:nn {#2} {#3} } + } + { \@@_format_aux:nnn {#1} {#2} {#3} } + } +\cs_new_protected:Npn \@@_format_aux:nnn #1#2#3 + { \siunitx_number_parse:nN {#1} \l_@@_tmp_tl \bool_if:NTF \l_@@_unit_bool { \@@_format_units:nn {#2} {#3} } @@ -522,11 +531,16 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\@@_parsed:n, \@@_unparsed:n} +% \begin{macro}{\@@_parsed:n, \@@_parsed_aux:n, \@@_unparsed:n} % The simple cases for parsing (or not) all entries. % \begin{macrocode} \cs_new_protected:Npn \@@_parsed:n #1 { + \tl_if_blank:nF {#1} + { \@@_parsed_aux:n {#1} } + } +\cs_new_protected:Npn \@@_parsed_aux:n #1 + { \bool_if:NTF \l_@@_unit_bool { \siunitx_number_parse:nN {#1} \l_@@_tmp_tl @@ -541,7 +555,8 @@ } \cs_new_protected:Npn \@@_unparsed:n #1 { - \seq_put_right:Nn \l_@@_tmp_seq { \ensuremath {#1} } + \tl_if_blank:nF {#1} + { \seq_put_right:Nn \l_@@_tmp_seq { \ensuremath {#1} } } } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx index a7b3594d9d6..bb3abd6b7a3 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx @@ -601,7 +601,7 @@ % must be present in a stored number (\foreign{i.e.}~at the end of parsing). % The number must have at least one digit for both the \meta{integer} and % \meta{exponent} parts. -% +% % A non-empty \meta{uncertainty} must contain one leading brace group % containing an identifier, then zero or more brace groups which contain % the uncertainty data. In this release, the known uncertainty types are @@ -1662,7 +1662,7 @@ % % \begin{variable}{\l_@@_round_min_tl} % For storing the minimum for rounding. -% \begin{macrocode} +% \begin{macrocode} \tl_new:N \l_@@_round_min_tl % \end{macrocode} % \end{variable} @@ -1672,7 +1672,7 @@ % For setting the rounding minimum, the aim is to do as much of the work % now as possible. That's mainly a question of checking if there are any % significant digits in the mantissa given. -% \begin{macrocode} +% \begin{macrocode} \cs_new_protected:Npn \@@_set_round_min:n #1 { \siunitx_number_parse:nN {#1} \l_@@_tmp_tl @@ -1952,7 +1952,7 @@ #2 \@@_exponent_uncert:n { { S } { 0 } } } - { + { \use:c { @@_exponent_shift_uncert_ \use_i:nn #3 :fnnn } { \prg_replicate:nn {#1} { 0 } } {#2} @@ -2846,7 +2846,7 @@ \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 } @@ -2856,7 +2856,7 @@ {#3} {#4} {#2} {#5} } { \@@_round_uncertainty_shift:nnnnn {#3} {#4} {#1} {#2} {#5} } - + } % \end{macrocode} % The simple case: round and pad out the uncertainty as required. @@ -3268,7 +3268,7 @@ } % \end{macrocode} % As color for negative values applies to the \emph{whole} output, we have -% to deal with it before anything else. +% to deal with it before anything else. % \begin{macrocode} \cs_new:Npn \@@_output_color:n #1 { diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 46d2b2f9427..228b98047cd 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: siunitx.dtx Copyright (C) 2008-2019,2021 Joseph Wright +% File: siunitx.dtx Copyright (C) 2008-2019,2021,2022 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 @@ -121,7 +121,7 @@ % % Identify the package and give the over all version information. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2021-12-03} {3.0.37} +\ProvidesExplPackage {siunitx} {2022-01-04} {3.0.38} {A comprehensive (SI) units package} % \end{macrocode} % @@ -184,7 +184,7 @@ % \subsection{Load time options} % % \begin{variable}{\l_@@_column_type_tl} -% \begin{macrocode} +% \begin{macrocode} \keys_define:nn { siunitx } { table-column-type .tl_set:N = @@ -199,11 +199,11 @@ % % \subsection{Option handling} % -% \begin{macrocode} +% \begin{macrocode} \RequirePackage { l3keys2e } % \end{macrocode} % -% \begin{macrocode} +% \begin{macrocode} \ProcessKeysOptions { siunitx } % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.ins b/Master/texmf-dist/source/latex/siunitx/siunitx.ins index e6d4dae7f6e..6250eed33ac 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.ins +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.ins @@ -33,7 +33,7 @@ for those people who are interested. \preamble \endpreamble \postamble -Copyright (C) 2008-2021 by +Copyright (C) 2008-2022 by Joseph Wright <joseph.wright@morningstar2.co.uk> It may be distributed and/or modified under the conditions of |