From 6b5cac75927920639405a1c1ba5cac760861b184 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 31 Mar 2011 23:14:57 +0000
Subject: siunitx 2.1n (31mar11)

git-svn-id: svn://tug.org/texlive/trunk@21904 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/source/latex/siunitx/siunitx.dtx | 33 +++++++++++++++++-----
 1 file changed, 26 insertions(+), 7 deletions(-)

(limited to 'Master/texmf-dist/source/latex/siunitx/siunitx.dtx')

diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index ef4d8b5653d..c65febb1ab4 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -544,6 +544,8 @@ This work consists of the file  siunitx.dtx
 %\changes{v2.1m}{2011/03/20}{Ensure some output occurs in all cases
 %  when \opt{round-precision} is set to \opt{0} and \opt{round-mode}
 %  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}
 %  
 %\begin{abstract}
 % Physical quantities have both numbers and units, and each physical
@@ -1666,6 +1668,8 @@ This work consists of the file  siunitx.dtx
 %
 %\DescribeOption{round-mode}
 %\DescribeOption{round-precision}
+%\changes{v2.1n}{2011/03/31}{Set output to 0 when \opt{round-mode}
+%  is \opt{figures} and \opt{round-precision} is 0}
 % The \pkg{siunitx} package can round numerical input to a fixed
 % number of significant figures or decimal places. This is controlled by
 % the \opt{round-mode} option, which takes the choices \opt{off},
@@ -4454,7 +4458,7 @@ This work consists of the file  siunitx.dtx
 %
 % The usual preliminaries.  
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2011/03/20} {2.1m}
+\ProvidesExplPackage {siunitx} {2011/03/31} {2.1n}
   {A comprehensive (SI) units package}
 %    \end{macrocode}
 % 
@@ -6953,8 +6957,20 @@ This work consists of the file  siunitx.dtx
 % reconstruction of the number.
 %    \begin{macrocode}
 \cs_new_protected_nopar:Npn \siunitx_number_process_figures:n #1 {
-  \prop_if_in:NnT \l_siunitx_number_in_prop {#1} 
-    { \siunitx_number_process_figures_aux:n {#1} }
+  \int_compare:nNnTF { \l_siunitx_process_precision_int } > { 0 }
+    {
+      \prop_if_in:NnT \l_siunitx_number_in_prop {#1} 
+        { \siunitx_number_process_figures_aux:n {#1} }
+    }
+    {
+      \prop_del:Nn \l_siunitx_number_in_prop { #1 -sign }
+      \prop_put:Nnn \l_siunitx_number_in_prop { #1 -integer } { 0 }
+      \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal }
+      \bool_if:NF \l_siunitx_process_int_to_dec_bool
+        {
+          \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal-marker }
+        }
+    }
 }
 \cs_new_protected_nopar:Npn \siunitx_number_process_figures_aux:n #1 {
   \siunitx_number_process_figures_init:n {#1}
@@ -7376,8 +7392,11 @@ This work consists of the file  siunitx.dtx
                 }
             }
         } 
-      \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal } 
-      \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal-marker } 
+      \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal }
+      \bool_if:NF \l_siunitx_process_int_to_dec_bool 
+        {
+          \prop_del:Nn \l_siunitx_number_in_prop { #1 -decimal-marker }
+        }
     }
     {
       \prop_get:NnN \l_siunitx_number_in_prop { #1 -decimal }
@@ -14610,7 +14629,7 @@ This work consists of the file  siunitx.dtx
 %    \end{macrocode}
 %    
 %    \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2011/03/20} {2.1m} 
+\ProvidesExplFile {siunitx-version-1.cfg} {2011/03/31} {2.1n} 
   {siunitx: Version 1 settings}
 %    \end{macrocode}
 %    
@@ -15894,7 +15913,7 @@ This work consists of the file  siunitx.dtx
 %    \end{macrocode}  
 %    
 %    \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2011/03/20} {2.1m}
+\ProvidesExplFile {siunitx-binary.cfg} {2011/03/31} {2.1n}
   {siunitx: Binary units}
 %    \end{macrocode}
 %    
-- 
cgit v1.2.3

