diff options
author | Karl Berry <karl@freefriends.org> | 2012-01-20 23:04:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-01-20 23:04:33 +0000 |
commit | 529294ab32f8cf8144b8125395c0c0d14c4fe78b (patch) | |
tree | 25f793a3217e31bda6c2bf5f892c0a8de6c1a063 /Master/texmf-dist/source/latex/siunitx | |
parent | 7b65dfa5cfd0d667cf9e9c4ff0b035e1c112c4a8 (diff) |
siunitx (20jan12)
git-svn-id: svn://tug.org/texlive/trunk@25166 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 1522c11b718..3c63dd6e44f 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -560,6 +560,8 @@ This work consists of the file siunitx.dtx % which caused issues with some tokens in numerical arguments} %\changes{v2.4h}{2012/01/15}{Bug fix for implementation of % \opt{reciprocal-positive-first}} +%\changes{v2.4i}{2012/01/19}{Bug fix for rounding with large numbers of +% decimal places} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -5013,7 +5015,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2012/01/15} {2.4h} +\ProvidesExplPackage {siunitx} {2012/01/19} {2.4i} {A comprehensive (SI) units package} % \end{macrocode} % @@ -8241,6 +8243,7 @@ This work consists of the file siunitx.dtx % { % \siunitx_number_process_places_init:n , % \siunitx_number_process_places_aux_i:n , +% \siunitx_number_process_places_aux_i:TF , % \siunitx_number_process_places_none: , % \siunitx_number_process_places_aux_ii:n , % \siunitx_number_process_places_loop:n , @@ -8269,7 +8272,7 @@ This work consists of the file siunitx.dtx { \tl_if_empty:NT \l_siunitx_tmpa_tl { \tl_set:Nn \l_siunitx_tmpa_tl { 0 } } - \int_compare:nNnTF \l_siunitx_tmpa_tl = \c_zero + \siunitx_number_process_places_aux_i:TF { \prop_put:Nnn \l_siunitx_number_in_prop { #1 -decimal } { } \int_set:Nn \l_siunitx_round_int @@ -8285,6 +8288,23 @@ This work consists of the file siunitx.dtx } } % \end{macrocode} +% The number of digits in the decimal part could be more that \TeX{} can +% handle, so a slow loop is used to see if we need to round. +% \begin{macrocode} +\cs_new_protected:Npn \siunitx_number_process_places_aux_i:TF + { + \bool_set_true:N \l_siunitx_tmp_bool + \tl_map_inline:Nn \l_siunitx_tmpa_tl + { + \int_compare:nNnF {##1} = \c_zero + { + \bool_set_false:N \l_siunitx_tmp_bool + \tl_map_break: + } + } + \bool_if:NTF \l_siunitx_tmp_bool + } +% \end{macrocode} % Rounding to no places at all requires a few checks to see if there is any % work to do. That includes a check for rounding half to even, where if % the decimal part is exactly half then special action is required. @@ -16234,7 +16254,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2012/01/15} {2.4h} +\ProvidesExplFile {siunitx-version-1.cfg} {2012/01/19} {2.4i} {siunitx: Version 1 settings} % \end{macrocode} % @@ -17179,7 +17199,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/01/15} {2.4h} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/01/19} {2.4i} {siunitx: Abbreviated units} % \end{macrocode} % @@ -17361,7 +17381,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2012/01/15} {2.4h} +\ProvidesExplFile {siunitx-binary.cfg} {2012/01/19} {2.4i} {siunitx: Binary units} % \end{macrocode} % |