diff options
author | Karl Berry <karl@freefriends.org> | 2012-04-05 23:48:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-04-05 23:48:14 +0000 |
commit | 1c090fd3655ca08b2a9ec7ae6271637b205585de (patch) | |
tree | b3d14bc5af82378589395f6c75626ac0dea65f2c | |
parent | fc0f83d1c7df80092f547288f40fdf310475a457 (diff) |
siunitx (5apr12)
git-svn-id: svn://tug.org/texlive/trunk@25863 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | bin | 573895 -> 573748 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 29 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 21 |
6 files changed, 38 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf Binary files differindex 9626a08cb7d..ab4af1bf140 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.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 420f4bd2a6b..ac41513ec4c 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -570,6 +570,8 @@ This work consists of the file siunitx.dtx % package} %\changes{v2.4m}{2012/04/03}{Correct bug in \cs{SIlist} when only a single % number is given} +%\changes{v2.4n}{2012/04/04}{Allow conversion of numbers with more than +% nine digits to scientific notation} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -5024,7 +5026,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2012/04/04} {2.4m} +\ProvidesExplPackage {siunitx} {2012/04/04} {2.4n} {A comprehensive (SI) units package} % \end{macrocode} % @@ -8636,11 +8638,20 @@ This work consists of the file siunitx.dtx \l_siunitx_tmpa_tl } } -\cs_new_protected:Npn - \siunitx_number_process_scientific_aux_i:nnn #1#2#3 { - \int_compare:nNnF { #1 + 0 #2 } = { 0 } - { \siunitx_number_process_scientific_aux_ii:nnn {#1} {#2} {#3} } -} +\cs_new_protected:Npn \siunitx_number_process_scientific_aux_i:nnn #1#2#3 + { + \bool_set_true:N \l_siunitx_tmp_bool + \tl_map_inline:nn {#1#2} + { + \str_if_eq:nnF {##1} { 0 } + { + \bool_set_false:N \l_siunitx_tmp_bool + \tl_map_break: + } + } + \bool_if:NF \l_siunitx_tmp_bool + { \siunitx_number_process_scientific_aux_ii:nnn {#1} {#2} {#3} } + } % \end{macrocode} % The code here works on a loop, standardising the mantissa into the % range \( 1 \le x < 10 \). @@ -16291,7 +16302,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/04} {2.4n} {siunitx: Version 1 settings} % \end{macrocode} % @@ -17236,7 +17247,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/04} {2.4n} {siunitx: Abbreviated units} % \end{macrocode} % @@ -17418,7 +17429,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-binary.cfg} {2012/04/04} {2.4n} {siunitx: Binary units} % \end{macrocode} % diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg index 356ab09e4c5..987167ed270 100644 --- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/04} {2.4n} {siunitx: Abbreviated units} \DeclareSIUnit \A { \ampere } \DeclareSIUnit \pA { \pico \ampere } diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg index ce7ab61b069..22c2b4d8c40 100644 --- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-binary.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-binary.cfg} {2012/04/04} {2.4n} {siunitx: Binary units} \DeclareBinaryPrefix \kibi { Ki } { 10 } \DeclareBinaryPrefix \mebi { Mi } { 20 } diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg index ae0cc07946d..c175f6d8922 100644 --- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg +++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg @@ -13,7 +13,7 @@ %% See http://www.latex-project.org/lppl.txt %% --------------------------------------------------------------- %% -\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/04} {2.4m} +\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/04} {2.4n} {siunitx: Version 1 settings} \keys_define:nn { siunitx } { addsign .choice: , diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index e126aa4957c..d2df5d671fe 100644 --- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty +++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty @@ -14,7 +14,7 @@ %% --------------------------------------------------------------- %% \RequirePackage{expl3} -\ProvidesExplPackage {siunitx} {2012/04/04} {2.4m} +\ProvidesExplPackage {siunitx} {2012/04/04} {2.4n} {A comprehensive (SI) units package} \@ifpackagelater { expl3 } { 2011/09/05 } { } @@ -2440,11 +2440,20 @@ \l_siunitx_tmpa_tl } } -\cs_new_protected:Npn - \siunitx_number_process_scientific_aux_i:nnn #1#2#3 { - \int_compare:nNnF { #1 + 0 #2 } = { 0 } - { \siunitx_number_process_scientific_aux_ii:nnn {#1} {#2} {#3} } -} +\cs_new_protected:Npn \siunitx_number_process_scientific_aux_i:nnn #1#2#3 + { + \bool_set_true:N \l_siunitx_tmp_bool + \tl_map_inline:nn {#1#2} + { + \str_if_eq:nnF {##1} { 0 } + { + \bool_set_false:N \l_siunitx_tmp_bool + \tl_map_break: + } + } + \bool_if:NF \l_siunitx_tmp_bool + { \siunitx_number_process_scientific_aux_ii:nnn {#1} {#2} {#3} } + } \cs_new_protected:Npn \siunitx_number_process_scientific_aux_ii:nnn #1#2#3 { \int_compare:nNnTF {#1} > { 9 } |