texlive[60771] Master/texmf-dist: siunitx (16oct21)

commits+karl at tug.org commits+karl at tug.org
Sat Oct 16 00:16:19 CEST 2021


Revision: 60771
          http://tug.org/svn/texlive?view=revision&revision=60771
Author:   karl
Date:     2021-10-16 00:16:18 +0200 (Sat, 16 Oct 2021)
Log Message:
-----------
siunitx (16oct21)

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-print.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.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-10-15 22:15:23 UTC (rev 60770)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-10-15 22:16:18 UTC (rev 60771)
@@ -7,11 +7,22 @@
 
 ## [Unreleased]
 
+## [v3.0.33]
+
+### Changed
+- Further improvements to degree symbol in math mode
+
+### Fixed
+- Handling of comparators when `mode = text` (see issue
+  [#551](https://github.com/josephwright/siunitx/issues/551)
+- Handling of combination of `mode = text` with `tight-spacing` (see issue
+  [#553](https://github.com/josephwright/siunitx/issues/553)
+
 ## [v3.0.32]
 
 ### Added
 - Hint concerning non-standard font encodings (see issues
-  [#547](https://github.com/josephwright/siunitx/issues/550) and
+  [#547](https://github.com/josephwright/siunitx/issues/547) and
   [#550](https://github.com/josephwright/siunitx/issues/550))
 
 ### Changed
@@ -1596,7 +1607,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.32...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.33...HEAD
+[v3.0.33]: https://github.com/josephwright/siunitx/compare/v3.0.32...v3.0.33
 [v3.0.32]: https://github.com/josephwright/siunitx/compare/v3.0.31...v3.0.32
 [v3.0.31]: https://github.com/josephwright/siunitx/compare/v3.0.30...v3.0.31
 [v3.0.30]: https://github.com/josephwright/siunitx/compare/v3.0.29...v3.0.30

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-print.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2021-10-15 22:15:23 UTC (rev 60770)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2021-10-15 22:16:18 UTC (rev 60771)
@@ -765,7 +765,7 @@
 % \end{macro}
 %
 % \begin{macro}{\siunitx_print_text:n}
-% \begin{macro}{\@@_text_replace:n}
+% \begin{macro}{\@@_text_replace:n, \@@_text_replace_aux:n}
 % \begin{macro}{\@@_text_replace:N}
 % \begin{macro}{\@@_text_replace:NNn}
 % \begin{macro}{\@@_text_replace:Nnnn}
@@ -806,35 +806,36 @@
   }
 %    \end{macrocode}
 %   To get math mode material to print in text mode, various search-and-replace
-%   steps are needed.
+%   steps are needed. We use \tn{protected at edef} to deal with commands, partly
+%   for speed and partly as it deals with anything nested inside \cs{mathord}.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_text_replace:n #1
   {
     \group_begin:
-    \tl_if_head_eq_meaning:nNTF {#1} \mathchoice
-      { \@@_text_replace:Nnnnn #1 }
-      {
-        \tl_set:Nn \l_@@_tmp_tl {#1}
-        \@@_text_replace:N \l_@@_tmp_tl
-        \tl_use:N \l_@@_tmp_tl
-      }
+      \tl_if_head_eq_meaning:nNTF {#1} \mathchoice
+        { \@@_text_replace:Nnnnn #1 }
+        {
+          \tl_set:Nn \l_@@_tmp_tl {#1}
+          \@@_replace_font:N \l_@@_tmp_tl
+          \cs_set:Npn \mathord ##1 {##1}
+          \cs_set:Npn \pm { \exp_not:N \textpm }
+          \tl_map_inline:nn
+            { \mp \ge \le \gg \ll }
+            { \cs_set:Npn ##1 { \exp_not:N \ensuremath { \exp_not:N ##1 } } }
+          \cs_set:Npn \cdot { \exp_not:N \textperiodcentered }
+          \cs_set:Npn \times { \exp_not:N \texttimes }
+          \protected at edef \l_@@_tmp_tl { \l_@@_tmp_tl }
+          \@@_text_replace:N \l_@@_tmp_tl
+          \@@_text_replace_aux:n { \tl_use:N \l_@@_tmp_tl }
+        }
     \group_end:
   }
+\cs_new_protected:Npn \@@_text_replace_aux:n #1 {#1}
 \cs_new_protected:Npx \@@_text_replace:N #1
   {
-    \@@_replace_font:N #1
     \exp_not:N \@@_text_replace:NNn #1
-      \exp_not:N \mathord { }
-      \exp_not:N \pm
-        { \exp_not:N \textpm }
-      \exp_not:N \mp
-        { \exp_not:n { \ensuremath { \mp } } }
       -
         { \exp_not:N \textminus }
-      \exp_not:N \times
-        { \exp_not:N \texttimes }
-      \exp_not:N \cdot
-        { \exp_not:N \textperiodcentered }
       \char_generate:nn { `\_ } { 8 }
         { \exp_not:N \@@_text_sub:n }
       ^
@@ -880,14 +881,7 @@
       {
          \@ifpackageloaded { bidi }
            {
-             \cs_set_protected:Npn \@@_text_replace:n #1
-               {
-                 \group_begin:
-                   \tl_set:Nn \l_@@_tmp_tl {#1}
-                   \@@_text_replace:N \l_@@_tmp_tl
-                   \LRE { \tl_use:N \l_@@_tmp_tl }
-                 \group_end:
-               }
+             \cs_set_protected:Npn \@@_text_replace_aux:n #1 { \LRE {#1} }
            }
        { }
       }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2021-10-15 22:15:23 UTC (rev 60770)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2021-10-15 22:16:18 UTC (rev 60771)
@@ -180,7 +180,9 @@
         \siunitx_declare_unit:Nxn \degree
           {
             \exp_not:N \ifmmode
-              { } ^ { \exp_not:N \circ }
+              \@ifpackageloaded { unicode-math }
+                { \@@_non_latin:n { "00B0 } }
+                { { } ^ { \exp_not:N \circ } }
             \exp_not:N \else
               \exp_not:N \text
                 {
@@ -208,7 +210,9 @@
           \siunitx_declare_unit:Nx \degreeCelsius
             {
               \exp_not:N \ifmmode
-                { } ^ { \exp_not:N \circ }
+                \@ifpackageloaded { unicode-math }
+                  { \@@_non_latin:n { "00B0 } }
+                  { { } ^ { \exp_not:N \circ } }
               \exp_not:N \else
                 \exp_not:N \text
                   {

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-10-15 22:15:23 UTC (rev 60770)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-10-15 22:16:18 UTC (rev 60771)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-09-29} {3.0.32}
+\ProvidesExplPackage {siunitx} {2021-10-15} {3.0.33}
   {A comprehensive (SI) units package}
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-10-15 22:15:23 UTC (rev 60770)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-10-15 22:16:18 UTC (rev 60771)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2021-09-29} {3.0.32}
+\ProvidesExplPackage {siunitx} {2021-10-15} {3.0.33}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -3904,30 +3904,30 @@
 \cs_new_protected:Npn \__siunitx_print_text_replace:n #1
   {
     \group_begin:
-    \tl_if_head_eq_meaning:nNTF {#1} \mathchoice
-      { \__siunitx_print_text_replace:Nnnnn #1 }
-      {
-        \tl_set:Nn \l__siunitx_print_tmp_tl {#1}
-        \__siunitx_print_text_replace:N \l__siunitx_print_tmp_tl
-        \tl_use:N \l__siunitx_print_tmp_tl
-      }
+      \tl_if_head_eq_meaning:nNTF {#1} \mathchoice
+        { \__siunitx_print_text_replace:Nnnnn #1 }
+        {
+          \tl_set:Nn \l__siunitx_print_tmp_tl {#1}
+          \__siunitx_print_replace_font:N \l__siunitx_print_tmp_tl
+          \cs_set:Npn \mathord ##1 {##1}
+          \cs_set:Npn \pm { \exp_not:N \textpm }
+          \tl_map_inline:nn
+            { \mp \ge \le \gg \ll }
+            { \cs_set:Npn ##1 { \exp_not:N \ensuremath { \exp_not:N ##1 } } }
+          \cs_set:Npn \cdot { \exp_not:N \textperiodcentered }
+          \cs_set:Npn \times { \exp_not:N \texttimes }
+          \protected at edef \l__siunitx_print_tmp_tl { \l__siunitx_print_tmp_tl }
+          \__siunitx_print_text_replace:N \l__siunitx_print_tmp_tl
+          \__siunitx_print_text_replace_aux:n { \tl_use:N \l__siunitx_print_tmp_tl }
+        }
     \group_end:
   }
+\cs_new_protected:Npn \__siunitx_print_text_replace_aux:n #1 {#1}
 \cs_new_protected:Npx \__siunitx_print_text_replace:N #1
   {
-    \__siunitx_print_replace_font:N #1
     \exp_not:N \__siunitx_print_text_replace:NNn #1
-      \exp_not:N \mathord { }
-      \exp_not:N \pm
-        { \exp_not:N \textpm }
-      \exp_not:N \mp
-        { \exp_not:n { \ensuremath { \mp } } }
       -
         { \exp_not:N \textminus }
-      \exp_not:N \times
-        { \exp_not:N \texttimes }
-      \exp_not:N \cdot
-        { \exp_not:N \textperiodcentered }
       \char_generate:nn { `\_ } { 8 }
         { \exp_not:N \__siunitx_print_text_sub:n }
       ^
@@ -3965,14 +3965,7 @@
       {
          \@ifpackageloaded { bidi }
            {
-             \cs_set_protected:Npn \__siunitx_print_text_replace:n #1
-               {
-                 \group_begin:
-                   \tl_set:Nn \l__siunitx_print_tmp_tl {#1}
-                   \__siunitx_print_text_replace:N \l__siunitx_print_tmp_tl
-                   \LRE { \tl_use:N \l__siunitx_print_tmp_tl }
-                 \group_end:
-               }
+             \cs_set_protected:Npn \__siunitx_print_text_replace_aux:n #1 { \LRE {#1} }
            }
        { }
       }
@@ -6350,7 +6343,9 @@
         \siunitx_declare_unit:Nxn \degree
           {
             \exp_not:N \ifmmode
-              { } ^ { \exp_not:N \circ }
+              \@ifpackageloaded { unicode-math }
+                { \__siunitx_symbol_non_latin:n { "00B0 } }
+                { { } ^ { \exp_not:N \circ } }
             \exp_not:N \else
               \exp_not:N \text
                 {
@@ -6374,7 +6369,9 @@
           \siunitx_declare_unit:Nx \degreeCelsius
             {
               \exp_not:N \ifmmode
-                { } ^ { \exp_not:N \circ }
+                \@ifpackageloaded { unicode-math }
+                  { \__siunitx_symbol_non_latin:n { "00B0 } }
+                  { { } ^ { \exp_not:N \circ } }
               \exp_not:N \else
                 \exp_not:N \text
                   {



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