texlive[59694] Master/texmf-dist: siunitx (24jun21)

commits+karl at tug.org commits+karl at tug.org
Thu Jun 24 22:09:24 CEST 2021


Revision: 59694
          http://tug.org/svn/texlive?view=revision&revision=59694
Author:   karl
Date:     2021-06-24 22:09:24 +0200 (Thu, 24 Jun 2021)
Log Message:
-----------
siunitx (24jun21)

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-unit.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
    trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-print.pdf
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-06-24 20:09:24 UTC (rev 59694)
@@ -7,6 +7,12 @@
 
 ## [Unreleased]
 
+## [v3.0.16]
+
+### Fixed
+- Treatment of spaces before `/` in literal units (issue #495)
+- Printing of `\mathchoice` entries in text mode (issue #497)
+
 ## [v3.0.15]
 
 ### Fixed
@@ -1403,7 +1409,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.15...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.16...HEAD
+[v3.0.16]: https://github.com/josephwright/siunitx/compare/v3.0.15...v3.0.16
 [v3.0.15]: https://github.com/josephwright/siunitx/compare/v3.0.14...v3.0.15
 [v3.0.14]: https://github.com/josephwright/siunitx/compare/v3.0.13...v3.0.14
 [v3.0.13]: https://github.com/josephwright/siunitx/compare/v3.0.12...v3.0.13

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

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

Index: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-print.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-print.pdf	2021-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-print.pdf	2021-06-24 20:09:24 UTC (rev 59694)

Property changes on: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-print.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf	2021-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf	2021-06-24 20:09:24 UTC (rev 59694)

Property changes on: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-unit.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
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-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2021-06-24 20:09:24 UTC (rev 59694)
@@ -722,6 +722,8 @@
 % \begin{macro}{\@@_text_replace:n}
 % \begin{macro}{\@@_text_replace:N}
 % \begin{macro}{\@@_text_replace:NNn}
+% \begin{macro}{\@@_text_replace:Nnnn}
+% \begin{macro}{\@@_text_replace_frac:n}
 % \begin{macro}{\@@_text_sub:n, \@@_text_super:n}
 % \begin{macro}{\@@_text_scripts:NnN}
 % \begin{macro}{\@@_text_scripts:}
@@ -763,9 +765,13 @@
 \cs_new_protected:Npn \@@_text_replace:n #1
   {
     \group_begin:
-      \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}
+        \@@_text_replace:N \l_@@_tmp_tl
+        \tl_use:N \l_@@_tmp_tl
+      }
     \group_end:
   }
 \cs_new_protected:Npx \@@_text_replace:N #1
@@ -797,7 +803,28 @@
     \tl_replace_all:Nnn #1 {#2} {#3}
     \@@_text_replace:NNn #1
   }
+\cs_new_protected:Npn \@@_text_replace:Nnnnn #1#2#3#4#5
+  {
+    \ensuremath
+      {
+        \mathchoice
+          { \@@_print_replace_frac:n {#2} }
+          { \@@_print_replace_frac:n {#3} }
+          { \@@_print_replace_frac:n {#4} }
+          { \@@_print_replace_frac:n {#5} }
+      }
+  }
 %    \end{macrocode}
+%   Almost the same as the lead-off but here we need to deal with re-inserting
+%   a text mode shift.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_print_replace_frac:n #1
+  {
+    \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+      { \@@_text_fraction:Nnn #1 }
+      { \mbox { \@@_text_replace:n {#1} } }
+  }
+%    \end{macrocode}
 %   When the \pkg{bidi} package is loaded, we need to make sure
 %   that \cs{text} is doing the correct thing.
 %    \begin{macrocode}
@@ -918,6 +945,8 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
+% \end{macro}
 %
 % \subsection{Standard settings for module options}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-06-24 20:09:24 UTC (rev 59694)
@@ -1190,6 +1190,7 @@
 % \begin{macro}{\@@_format_literal_super:nn, \@@_format_literal_sub:nn}
 % \begin{macro}{\@@_format_literal_add:n}
 % \begin{macro}{\@@_format_literal_auxix:nn}
+% \begin{macro}{\@@_format_literal_auxx:nw}
 % \begin{variable}{\l_@@_separator_tl}
 %   To format literal units, there are two tasks to do. The input is
 %   \texttt{x}-type expanded to force any symbolic units to be converted into
@@ -1285,7 +1286,11 @@
   {
     \tl_if_head_is_N_type:nTF {#2}
       { \@@_format_literal_auxvi:nN }
-      { \@@_format_literal_auxix:nn }
+      {
+        \tl_if_head_is_group:nTF {#2}
+          { \@@_format_literal_auxix:nn }
+          { \@@_format_literal_auxx:nw }
+      }
         {#1} #2 \q_recursion_stop
   }
 \cs_new_protected:Npx \@@_format_literal_auxvi:nN #1#2
@@ -1347,6 +1352,12 @@
   }
 \cs_new_protected:Npn \@@_format_literal_auxix:nn #1#2
   { \@@_format_literal_auxvi:nN { #1 {#2} } }
+\use:x
+  {
+    \cs_new_protected:Npn \exp_not:N \@@_format_literal_auxx:nw
+      ##1 \c_space_tl
+  }
+  { \@@_format_literal_auxv:nw {#1} }
 \tl_new:N \l_@@_separator_tl
 %    \end{macrocode}
 % \end{variable}
@@ -1361,6 +1372,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \subsection{(PDF) String creation}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-06-24 20:09:24 UTC (rev 59694)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-06-22} {3.0.15}
+\ProvidesExplPackage {siunitx} {2021-06-24} {3.0.16}
   {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-06-24 20:09:01 UTC (rev 59693)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-06-24 20:09:24 UTC (rev 59694)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2021-06-22} {3.0.15}
+\ProvidesExplPackage {siunitx} {2021-06-24} {3.0.16}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -3754,9 +3754,13 @@
 \cs_new_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
-      \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_text_replace:N \l__siunitx_print_tmp_tl
+        \tl_use:N \l__siunitx_print_tmp_tl
+      }
     \group_end:
   }
 \cs_new_protected:Npx \__siunitx_print_text_replace:N #1
@@ -3788,6 +3792,23 @@
     \tl_replace_all:Nnn #1 {#2} {#3}
     \__siunitx_print_text_replace:NNn #1
   }
+\cs_new_protected:Npn \__siunitx_print_text_replace:Nnnnn #1#2#3#4#5
+  {
+    \ensuremath
+      {
+        \mathchoice
+          { \__siunitx_print_print_replace_frac:n {#2} }
+          { \__siunitx_print_print_replace_frac:n {#3} }
+          { \__siunitx_print_print_replace_frac:n {#4} }
+          { \__siunitx_print_print_replace_frac:n {#5} }
+      }
+  }
+\cs_new_protected:Npn \__siunitx_print_print_replace_frac:n #1
+  {
+    \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+      { \__siunitx_print_text_fraction:Nnn #1 }
+      { \mbox { \__siunitx_print_text_replace:n {#1} } }
+  }
 \sys_if_engine_xetex:T
   {
     \AtBeginDocument
@@ -4994,7 +5015,11 @@
   {
     \tl_if_head_is_N_type:nTF {#2}
       { \__siunitx_unit_format_literal_auxvi:nN }
-      { \__siunitx_unit_format_literal_auxix:nn }
+      {
+        \tl_if_head_is_group:nTF {#2}
+          { \__siunitx_unit_format_literal_auxix:nn }
+          { \__siunitx_unit_format_literal_auxx:nw }
+      }
         {#1} #2 \q_recursion_stop
   }
 \cs_new_protected:Npx \__siunitx_unit_format_literal_auxvi:nN #1#2
@@ -5053,6 +5078,12 @@
   }
 \cs_new_protected:Npn \__siunitx_unit_format_literal_auxix:nn #1#2
   { \__siunitx_unit_format_literal_auxvi:nN { #1 {#2} } }
+\use:x
+  {
+    \cs_new_protected:Npn \exp_not:N \__siunitx_unit_format_literal_auxx:nw
+      ##1 \c_space_tl
+  }
+  { \__siunitx_unit_format_literal_auxv:nw {#1} }
 \tl_new:N \l__siunitx_unit_separator_tl
 \cs_new_protected:Npn \siunitx_unit_pdfstring_context:
   {



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