diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-04 23:47:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-04 23:47:51 +0000 |
commit | 1b5aa0794f701aa855c0dd5aafc06a49ec40be37 (patch) | |
tree | 69bf5c797a275518e0693a1b36df4cf656e350b9 /Master/texmf-dist/source | |
parent | 545b1514df34ddc6dbf6998ed523b87ff1a49b81 (diff) |
siunitx (4may12)
git-svn-id: svn://tug.org/texlive/trunk@26194 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 65 |
1 files changed, 41 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index 1d5a5d135d2..97dfb15c5a8 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -582,6 +582,9 @@ This work consists of the file siunitx.dtx % in literal units when \pkg{breqn} package is loaded} %\changes{v2.5b}{2012/04/20}{Detect \pkg{eulervm} package and alter % math mode font setting accordingly} +%\changes{v2.5c}{2012/04/03}{Allow conversion of numbers with more than +% nine digits when using fixed exponents} +%\changes{v2.5c}{2012/05/03}{Detect entirely empty cells in \texttt{s} columns} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -5075,7 +5078,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2012/04/21} {2.5b} +\ProvidesExplPackage {siunitx} {2012/05/03} {2.5c} {A comprehensive (SI) units package} % \end{macrocode} % @@ -8060,6 +8063,7 @@ This work consists of the file siunitx.dtx %\begin{macro}[aux]{ % \siunitx_number_process_fixed_aux_i:nnn , % \siunitx_number_process_fixed_aux_ii:nnn , +% \siunitx_number_process_fixed_aux_iii:nnn , % \siunitx_number_process_fixed_large:nnn , % \siunitx_number_process_fixed_large_aux:w , % \siunitx_number_process_fixed_small:nnn , @@ -8100,26 +8104,38 @@ This work consists of the file siunitx.dtx % The main loop checks to see which way to adjust the exponent then % does the work. % \begin{macrocode} +\cs_new_protected:Npn \siunitx_number_process_fixed_aux_i:nnn #1#2#3 + { + \prop_put:Nnn \l_siunitx_number_in_prop { exponent } { true } + \int_compare:nNnTF { \l_siunitx_process_fixed_int } > { \c_zero } + { + \prop_put:NnV \l_siunitx_number_in_prop { exponent-integer } + \l_siunitx_process_fixed_int + \prop_del:Nn \l_siunitx_number_in_prop { exponent-sign } + } + { + \prop_put:Nnx \l_siunitx_number_in_prop { exponent-integer } + { \int_eval:n { - \l_siunitx_process_fixed_int } } + \prop_put:Nnn \l_siunitx_number_in_prop { exponent-sign } { - } + } + \siunitx_number_process_fixed_aux_ii:nnn {#1} {#2} {#3} + } +\cs_new_protected:Npn \siunitx_number_process_fixed_aux_ii: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_fixed_aux_iii:nnn {#1} {#2} {#3} } + } \cs_new_protected:Npn - \siunitx_number_process_fixed_aux_i:nnn #1#2#3 { - \prop_put:Nnn \l_siunitx_number_in_prop { exponent } - { true } - \int_compare:nNnTF { \l_siunitx_process_fixed_int } > { \c_zero } - { - \prop_put:NnV \l_siunitx_number_in_prop { exponent-integer } - \l_siunitx_process_fixed_int - \prop_del:Nn \l_siunitx_number_in_prop { exponent-sign } - } - { - \prop_put:Nnx \l_siunitx_number_in_prop { exponent-integer } - { \int_eval:n { - \l_siunitx_process_fixed_int } } - \prop_put:Nnn \l_siunitx_number_in_prop { exponent-sign } { - } - } - \int_compare:nNnF { #1 + 0 #2 } = { 0 } - { \siunitx_number_process_fixed_aux_ii:nnn {#1} {#2} {#3} } -} -\cs_new_protected:Npn - \siunitx_number_process_fixed_aux_ii:nnn #1#2#3 { + \siunitx_number_process_fixed_aux_iii:nnn #1#2#3 { \int_compare:nNnTF {#3} > { \l_siunitx_process_fixed_int } { \siunitx_number_process_fixed_large:nnn {#1} {#2} {#3} } { @@ -13689,7 +13705,8 @@ This work consists of the file siunitx.dtx \cs_new_protected:Npn \siunitx_table_print_s: { \siunitx_table_column_begin:n { \l_siunitx_table_unit_align_skip } - \siunitx_unit_output:Vn \l_siunitx_table_collect_tl { } + \tl_if_empty:NF \l_siunitx_table_collect_tl + { \siunitx_unit_output:Vn \l_siunitx_table_collect_tl { } } \siunitx_table_column_end:n { \l_siunitx_table_unit_align_skip } } % \end{macrocode} @@ -16403,7 +16420,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2012/04/21} {2.5b} +\ProvidesExplFile {siunitx-version-1.cfg} {2012/05/03} {2.5c} {siunitx: Version 1 settings} % \end{macrocode} % @@ -17348,7 +17365,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/04/21} {2.5b} +\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/05/03} {2.5c} {siunitx: Abbreviated units} % \end{macrocode} % @@ -17530,7 +17547,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2012/04/21} {2.5b} +\ProvidesExplFile {siunitx-binary.cfg} {2012/05/03} {2.5c} {siunitx: Binary units} % \end{macrocode} % |