texlive[59516] Master/texmf-dist: siunitx (7jun21)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 7 22:07:35 CEST 2021


Revision: 59516
          http://tug.org/svn/texlive?view=revision&revision=59516
Author:   karl
Date:     2021-06-07 22:07:35 +0200 (Mon, 07 Jun 2021)
Log Message:
-----------
siunitx (7jun21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
    trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-06-07 20:07:35 UTC (rev 59516)
@@ -1,4 +1,4 @@
-Standard# Changelog
+# Changelog
 All notable changes to this project will be documented in this file.
 
 The format is based on [Keep a
@@ -7,10 +7,20 @@
 
 ## [Unreleased]
 
+## [v3.0.11]
+
+### Changed
+- Improve some fallback unit definitions
+
+### Fixed
+- Printing of symbols with encodings other than UTF-8 (issue #470)
+- Argument order for `\DeclareSIPrefix` (issue #471)
+- Emulation of `number-unit-separator` (issue #473)
+
 ## [v3.0.10]
 
 ### Changed
-- Documenation improvements
+- Documentation improvements
 
 ### Fixed
 - Incompatibility with REVTeX (issue #469)
@@ -1351,7 +1361,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.10...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.11...HEAD
+[v3.0.11]: https://github.com/josephwright/siunitx/compare/v3.0.10...v3.0.11
 [v3.0.10]: https://github.com/josephwright/siunitx/compare/v3.0.9...v3.0.10
 [v3.0.9]: https://github.com/josephwright/siunitx/compare/v3.0.8...v3.0.9
 [v3.0.8]: https://github.com/josephwright/siunitx/compare/v3.0.7...v3.0.8

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx	2021-06-07 20:07:35 UTC (rev 59516)
@@ -776,6 +776,13 @@
           { quantity-product }
           \l_keys_value_tl
       } ,
+    number-unit-separator .code:n =
+      {
+        \@@_option_deprecated:nnV
+          { number-unit-separator }
+          { quantity-product }
+          \l_keys_value_tl
+      } ,
     prefixes-as-symbols .choice: ,
     prefixes-as-symbols / false . code:n =
       {
@@ -1044,18 +1051,24 @@
   \bar              { bar }
   \barn             { b }
   \bohr
-    { \text { \ensuremath { a } } \char_generate:nn { `\_ } { 8 } { 0 } }
+    {
+      \exp_not:N \text
+        { \exp_not:N \ensuremath { a } } \char_generate:nn { `\_ } { 8 } { 0 }
+    }
   \clight
-    { \text { \ensuremath { c } } \char_generate:nn { `\_ } { 8 } { 0 } }
+    {
+      \exp_not:N \text
+        { \exp_not:N \ensuremath { c } } \char_generate:nn { `\_ } { 8 } { 0 }
+    }
   \electronmass
     {
-      \text { \ensuremath { m } }
+      \exp_not:N \text { \exp_not:N \ensuremath { m } }
       \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { e } }
     }
   \elementarycharge { \text { \ensuremath { e } } }
   \hartree
     {
-      \text { \ensuremath { E } }
+      \exp_not:N \text { \exp_not:N \ensuremath { E } }
       \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { h } }
     }
   \knot             { kn }
@@ -1062,7 +1075,7 @@
   \mmHg             { mmHg }
   \nauticalmile     { M }
   \planckbar
-    { \text { \ensuremath { \exp_not:N \hbar } } }
+    { \exp_not:N \text { \exp_not:N \ensuremath { \exp_not:N \hbar } } }
   \q_recursion_tail { }
   \q_recursion_stop
 \@ifpackageloaded { fontspec }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2021-06-07 20:07:35 UTC (rev 59516)
@@ -114,6 +114,7 @@
       }
     \cs_new:Npn \@@_non_latin:nnnn #1#2#3#4
       {
+        \@@_deal_with_utf:
         \exp_after:wN \exp_after:wN \exp_after:wN
           \exp_not:N \char_generate:nn {#1} { 13 }
         \exp_after:wN \exp_after:wN \exp_after:wN
@@ -120,6 +121,7 @@
           \exp_not:N \char_generate:nn {#2} { 13 }
       }
   }
+\cs_new:Npn \@@_deal_with_utf: { }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -128,13 +130,17 @@
 %   A test to see if the unit definition which applies is still one we expect:
 %   here that means it is just using a (Unicode) codepoint. The comparison
 %   is string-based as \pkg{unicode-math} (at least) can alter some of them.
+%   Active characters are set to \cs{scan_stop:} so that the code here gives
+%   exactly the tokens (bytes) we want: needed for encodings other than
+%   \textsc{utf}-8.
 %    \begin{macrocode}
 \prg_new_protected_conditional:Npnn \@@_if_replace:Nn #1#2 { T , TF }
   {
     \group_begin:
-      \tl_set:Nx \l_@@_tmpa_tl { \@@_non_latin:n {#2} }
       \protected at edef \l_@@_tmpa_tl
-        { \exp_not:N \mathrm { \l_@@_tmpa_tl } }
+        { \exp_not:N \mathrm { \@@_non_latin:n {#2} } }
+      \int_step_inline:nnn { "80 } { "FF }
+        { \char_set_active_eq:nN {##1} \scan_stop: }
       \keys_set:nn { siunitx } { parse-units = false }
       \siunitx_unit_format:nN {#1} \l_@@_tmpb_tl
       \str_if_eq:VVTF \l_@@_tmpa_tl \l_@@_tmpb_tl
@@ -143,6 +149,7 @@
           \prg_return_true:
         }
         {
+          \show\l_@@_tmpa_tl \show\l_@@_tmpb_tl
           \group_end:
           \prg_return_false:
         }
@@ -178,8 +185,12 @@
           {
             \siunitx_declare_unit:Nxn \degree
               {
-                \siunitx_print_text:n
-                  { \@@_non_latin:n { "00B0 } }
+                \exp_not:N \text
+                  {
+                    \@ifpackageloaded { inputenc }
+                      { \exp_not:N \textdegree }
+                      { \@@_non_latin:n { "00B0 } }
+                  }
               }
               { quantity-product = { } }
          }
@@ -202,8 +213,13 @@
             {
               \siunitx_declare_unit:Nx \degreeCelsius
                 {
-                  \siunitx_print_text:n
-                    { \@@_non_latin:n { "00B0 } } C
+                  \exp_not:N \text
+                    {
+                      \@ifpackageloaded { inputenc }
+                        { \exp_not:N \textdegree }
+                        { \@@_non_latin:n { "00B0 } }
+                    }
+                      C
                 }
            }
         }
@@ -221,7 +237,7 @@
                 { \exp_not:N \upOmega }
                 { \exp_not:N \Omega }
             \exp_not:N \else
-              \siunitx_print_text:n
+              \exp_not:N \text
                 {
                   \bool_lazy_or:nnTF
                     { \sys_if_engine_luatex_p: }
@@ -240,7 +256,7 @@
       {
         \siunitx_declare_prefix:Nnx \micro { -6 }
           {
-            \siunitx_print_text:n
+            \exp_not:N \text
               {
                 \bool_lazy_or:nnTF
                   { \sys_if_engine_luatex_p: }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-06-07 20:07:35 UTC (rev 59516)
@@ -220,7 +220,7 @@
 %
 % \begin{function}{\siunitx_declare_power:NNn}
 %   \begin{syntax}
-%     \cs{siunitx_declare_power:NnN} \meta{pre-power} \meta{post-power} \Arg{value}
+%     \cs{siunitx_declare_power:NNn} \meta{pre-power} \meta{post-power} \Arg{value}
 %   \end{syntax}
 %   Defines \emph{two} symbolic \meta{powers} (which should be control
 %   sequences such as |\squared|) to be converted by the parser to the

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-06-07 20:07:35 UTC (rev 59516)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-06-04} {3.0.10}
+\ProvidesExplPackage {siunitx} {2021-06-07} {3.0.11}
   {A comprehensive (SI) units package}
 %    \end{macrocode}
 %
@@ -246,7 +246,7 @@
   }
 \NewDocumentCommand \DeclareSIPrefix { +m m m }
   {
-    \siunitx_declare_prefix:Nnn #1 {#2} {#3}
+    \siunitx_declare_prefix:Nnn #1 {#3} {#2}
   }
 \NewDocumentCommand \DeclareSIQualifier { +m m }
   {

Modified: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-06-07 20:07:17 UTC (rev 59515)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-06-07 20:07:35 UTC (rev 59516)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2021-06-04} {3.0.10}
+\ProvidesExplPackage {siunitx} {2021-06-07} {3.0.11}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -6034,6 +6034,7 @@
       }
     \cs_new:Npn \__siunitx_symbol_non_latin:nnnn #1#2#3#4
       {
+        \__siunitx_symbol_deal_with_utf:
         \exp_after:wN \exp_after:wN \exp_after:wN
           \exp_not:N \char_generate:nn {#1} { 13 }
         \exp_after:wN \exp_after:wN \exp_after:wN
@@ -6040,12 +6041,14 @@
           \exp_not:N \char_generate:nn {#2} { 13 }
       }
   }
+\cs_new:Npn \__siunitx_symbol_deal_with_utf: { }
 \prg_new_protected_conditional:Npnn \__siunitx_symbol_if_replace:Nn #1#2 { T , TF }
   {
     \group_begin:
-      \tl_set:Nx \l__siunitx_symbol_tmpa_tl { \__siunitx_symbol_non_latin:n {#2} }
       \protected at edef \l__siunitx_symbol_tmpa_tl
-        { \exp_not:N \mathrm { \l__siunitx_symbol_tmpa_tl } }
+        { \exp_not:N \mathrm { \__siunitx_symbol_non_latin:n {#2} } }
+      \int_step_inline:nnn { "80 } { "FF }
+        { \char_set_active_eq:nN {##1} \scan_stop: }
       \keys_set:nn { siunitx } { parse-units = false }
       \siunitx_unit_format:nN {#1} \l__siunitx_symbol_tmpb_tl
       \str_if_eq:VVTF \l__siunitx_symbol_tmpa_tl \l__siunitx_symbol_tmpb_tl
@@ -6054,6 +6057,7 @@
           \prg_return_true:
         }
         {
+          \show\l__siunitx_symbol_tmpa_tl \show\l__siunitx_symbol_tmpb_tl
           \group_end:
           \prg_return_false:
         }
@@ -6077,8 +6081,12 @@
           {
             \siunitx_declare_unit:Nxn \degree
               {
-                \siunitx_print_text:n
-                  { \__siunitx_symbol_non_latin:n { "00B0 } }
+                \exp_not:N \text
+                  {
+                    \@ifpackageloaded { inputenc }
+                      { \exp_not:N \textdegree }
+                      { \__siunitx_symbol_non_latin:n { "00B0 } }
+                  }
               }
               { quantity-product = { } }
          }
@@ -6097,8 +6105,13 @@
             {
               \siunitx_declare_unit:Nx \degreeCelsius
                 {
-                  \siunitx_print_text:n
-                    { \__siunitx_symbol_non_latin:n { "00B0 } } C
+                  \exp_not:N \text
+                    {
+                      \@ifpackageloaded { inputenc }
+                        { \exp_not:N \textdegree }
+                        { \__siunitx_symbol_non_latin:n { "00B0 } }
+                    }
+                      C
                 }
            }
         }
@@ -6112,7 +6125,7 @@
                 { \exp_not:N \upOmega }
                 { \exp_not:N \Omega }
             \exp_not:N \else
-              \siunitx_print_text:n
+              \exp_not:N \text
                 {
                   \bool_lazy_or:nnTF
                     { \sys_if_engine_luatex_p: }
@@ -6127,7 +6140,7 @@
       {
         \siunitx_declare_prefix:Nnx \micro { -6 }
           {
-            \siunitx_print_text:n
+            \exp_not:N \text
               {
                 \bool_lazy_or:nnTF
                   { \sys_if_engine_luatex_p: }
@@ -6950,6 +6963,13 @@
           { quantity-product }
           \l_keys_value_tl
       } ,
+    number-unit-separator .code:n =
+      {
+        \__siunitx_option_deprecated:nnV
+          { number-unit-separator }
+          { quantity-product }
+          \l_keys_value_tl
+      } ,
     prefixes-as-symbols .choice: ,
     prefixes-as-symbols / false . code:n =
       {
@@ -7146,18 +7166,24 @@
   \bar              { bar }
   \barn             { b }
   \bohr
-    { \text { \ensuremath { a } } \char_generate:nn { `\_ } { 8 } { 0 } }
+    {
+      \exp_not:N \text
+        { \exp_not:N \ensuremath { a } } \char_generate:nn { `\_ } { 8 } { 0 }
+    }
   \clight
-    { \text { \ensuremath { c } } \char_generate:nn { `\_ } { 8 } { 0 } }
+    {
+      \exp_not:N \text
+        { \exp_not:N \ensuremath { c } } \char_generate:nn { `\_ } { 8 } { 0 }
+    }
   \electronmass
     {
-      \text { \ensuremath { m } }
+      \exp_not:N \text { \exp_not:N \ensuremath { m } }
       \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { e } }
     }
   \elementarycharge { \text { \ensuremath { e } } }
   \hartree
     {
-      \text { \ensuremath { E } }
+      \exp_not:N \text { \exp_not:N \ensuremath { E } }
       \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { h } }
     }
   \knot             { kn }
@@ -7164,7 +7190,7 @@
   \mmHg             { mmHg }
   \nauticalmile     { M }
   \planckbar
-    { \text { \ensuremath { \exp_not:N \hbar } } }
+    { \exp_not:N \text { \exp_not:N \ensuremath { \exp_not:N \hbar } } }
   \q_recursion_tail { }
   \q_recursion_stop
 \@ifpackageloaded { fontspec }
@@ -7186,7 +7212,7 @@
   }
 \NewDocumentCommand \DeclareSIPrefix { +m m m }
   {
-    \siunitx_declare_prefix:Nnn #1 {#2} {#3}
+    \siunitx_declare_prefix:Nnn #1 {#3} {#2}
   }
 \NewDocumentCommand \DeclareSIQualifier { +m m }
   {



More information about the tex-live-commits mailing list.