From f6af516a4ef262bed896501a2b8a3a27e31b339a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 3 Apr 2011 23:06:11 +0000 Subject: siunitx 2.1o (3apr11) git-svn-id: svn://tug.org/texlive/trunk@21942 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/siunitx/siunitx.pdf | Bin 522995 -> 523214 bytes Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 41 +++++++++++++++++---- .../tex/latex/siunitx/config/siunitx-binary.cfg | 2 +- .../tex/latex/siunitx/config/siunitx-version-1.cfg | 2 +- Master/texmf-dist/tex/latex/siunitx/siunitx.sty | 33 ++++++++++++++--- 5 files changed, 64 insertions(+), 14 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf index 6eac1120a61..0b7bb0c6906 100644 Binary files a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf and b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf differ diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx index c65febb1ab4..1a53905da43 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx @@ -546,6 +546,10 @@ This work consists of the file siunitx.dtx % is set to \opt{places}} %\changes{v2.1n}{2011/03/31}{Consistent behaviour for % \opt{round-integer-to-decimal} when \opt{round-precision} is 0} +%\changes{v2.1o}{2011/04/03}{Fix incorrect font choice when +% \pkg{arev} package is loaded} +%\changes{v2.1o}{2011/04/03}{Account for negative exponents +% when using \opt{fixed-exponent} system} % %\begin{abstract} % Physical quantities have both numbers and units, and each physical @@ -4458,7 +4462,7 @@ This work consists of the file siunitx.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {siunitx} {2011/03/31} {2.1n} +\ProvidesExplPackage {siunitx} {2011/04/03} {2.1o} {A comprehensive (SI) units package} % \end{macrocode} % @@ -5511,8 +5515,13 @@ This work consists of the file siunitx.dtx \tl_set:Nx \l_siunitx_tmpa_tl { \familydefault } \tl_if_eq:NNT \l_siunitx_tmpa_tl \c_siunitx_textsf_tl { - \@ifpackageloaded { cmbright } { } - { \keys_set:nn { siunitx } { math-rm = \mathsf } } + \@ifpackageloaded { arev } + { } + { + \@ifpackageloaded { cmbright } + { } + { \keys_set:nn { siunitx } { math-rm = \mathsf } } + } \keys_set:nn { siunitx } { text-rm = \sffamily } } \tl_if_eq:NNT \l_siunitx_tmpa_tl \c_siunitx_texttt_tl @@ -7163,6 +7172,15 @@ This work consists of the file siunitx.dtx \l_siunitx_tmpb_tl \quark_if_no_value:NT \l_siunitx_tmpb_tl { \tl_set:Nn \l_siunitx_tmpb_tl { 0 } } + \group_begin: + \prop_get:NnN \l_siunitx_number_in_prop { exponent-sign } + \l_siunitx_tmpa_tl + \quark_if_no_value:NF \l_siunitx_tmpa_tl + { + \tl_put_left:NV \l_siunitx_tmpb_tl \l_siunitx_tmpa_tl + } + \exp_args:NNNV \group_end: + \tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl \tl_set:Nx \l_siunitx_tmpa_tl { \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } } \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn @@ -7177,8 +7195,17 @@ This work consists of the file siunitx.dtx \siunitx_number_process_fixed_aux_i:nnn #1#2#3 { \prop_put:Nnn \l_siunitx_number_in_prop { exponent } { true } - \prop_put:NnV \l_siunitx_number_in_prop - { exponent-integer } \l_siunitx_process_fixed_int + \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} } } @@ -14629,7 +14656,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-version-1.cfg} {2011/03/31} {2.1n} +\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/03} {2.1o} {siunitx: Version 1 settings} % \end{macrocode} % @@ -15913,7 +15940,7 @@ This work consists of the file siunitx.dtx % \end{macrocode} % % \begin{macrocode} -\ProvidesExplFile {siunitx-binary.cfg} {2011/03/31} {2.1n} +\ProvidesExplFile {siunitx-binary.cfg} {2011/04/03} {2.1o} {siunitx: Binary units} % \end{macrocode} % 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 b947883296c..8f263362af4 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} {2011/03/31} {2.1n} +\ProvidesExplFile {siunitx-binary.cfg} {2011/04/03} {2.1o} {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 98a76a63af2..b06b1148cdb 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} {2011/03/31} {2.1n} +\ProvidesExplFile {siunitx-version-1.cfg} {2011/04/03} {2.1o} {siunitx: Version 1 settings} \keys_set:nn { siunitx } { load-configurations = { abbreviations , binary } } diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty index 7f67cd6fc27..b592947cb44 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} {2011/03/31} {2.1n} +\ProvidesExplPackage {siunitx} {2011/04/03} {2.1o} {A comprehensive (SI) units package} \cs_if_exist:NTF \msg_set:nnnn { @@ -693,8 +693,13 @@ \tl_set:Nx \l_siunitx_tmpa_tl { \familydefault } \tl_if_eq:NNT \l_siunitx_tmpa_tl \c_siunitx_textsf_tl { - \@ifpackageloaded { cmbright } { } - { \keys_set:nn { siunitx } { math-rm = \mathsf } } + \@ifpackageloaded { arev } + { } + { + \@ifpackageloaded { cmbright } + { } + { \keys_set:nn { siunitx } { math-rm = \mathsf } } + } \keys_set:nn { siunitx } { text-rm = \sffamily } } \tl_if_eq:NNT \l_siunitx_tmpa_tl \c_siunitx_texttt_tl @@ -1764,6 +1769,15 @@ \l_siunitx_tmpb_tl \quark_if_no_value:NT \l_siunitx_tmpb_tl { \tl_set:Nn \l_siunitx_tmpb_tl { 0 } } + \group_begin: + \prop_get:NnN \l_siunitx_number_in_prop { exponent-sign } + \l_siunitx_tmpa_tl + \quark_if_no_value:NF \l_siunitx_tmpa_tl + { + \tl_put_left:NV \l_siunitx_tmpb_tl \l_siunitx_tmpa_tl + } + \exp_args:NNNV \group_end: + \tl_set:Nn \l_siunitx_tmpb_tl \l_siunitx_tmpb_tl \tl_set:Nx \l_siunitx_tmpa_tl { \l_siunitx_tmpa_tl { \l_siunitx_tmpb_tl } } \exp_last_unbraced:NV \siunitx_number_process_fixed_aux_i:nnn @@ -1774,8 +1788,17 @@ \siunitx_number_process_fixed_aux_i:nnn #1#2#3 { \prop_put:Nnn \l_siunitx_number_in_prop { exponent } { true } - \prop_put:NnV \l_siunitx_number_in_prop - { exponent-integer } \l_siunitx_process_fixed_int + \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} } } -- cgit v1.2.3