texlive[59270] Master/texmf-dist: siunitx (19may21)

commits+karl at tug.org commits+karl at tug.org
Wed May 19 22:00:29 CEST 2021


Revision: 59270
          http://tug.org/svn/texlive?view=revision&revision=59270
Author:   karl
Date:     2021-05-19 22:00:29 +0200 (Wed, 19 May 2021)
Log Message:
-----------
siunitx (19may21)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2021-05-19 20:00:29 UTC (rev 59270)
@@ -7,6 +7,20 @@
 
 ## [Unreleased]
 
+## [v3.0.1]
+
+### Added
+- Public `\l_siunitx_unit_fraction_tl` variable
+
+### Changed
+- Documentation improvements
+
+### Fixed
+- Printing of fractional units in text mode (issue #418)
+- Include `siunitx-abbreviations.cfg` in fallback v2 files
+  (issue #419)
+- French translation of 'to' for ranges (issue #421)
+
 ## [v3.0.0]
 
 ### Added
@@ -1239,7 +1253,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.0...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.1...HEAD
+[v3.0.1]: https://github.com/josephwright/siunitx/compare/v3.0.0...v3.0.1
 [v3.0.0]: https://github.com/josephwright/siunitx/compare/v2.8e...v3.0.0
 [v2.8e]: https://github.com/josephwright/siunitx/compare/v2.8d...v2.8e
 [v2.8d]: https://github.com/josephwright/siunitx/compare/v2.8c...v2.8d

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-locale.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx	2021-05-19 20:00:29 UTC (rev 59270)
@@ -137,7 +137,7 @@
   {
     \RequirePackage { translations }
     \DeclareTranslation { English } { to~(numerical~range) } { to }
-    \DeclareTranslation { French }  { to~(numerical~range) } { á }
+    \DeclareTranslation { French }  { to~(numerical~range) } { à }
     \DeclareTranslation { German }  { to~(numerical~range) } { bis }
     \DeclareTranslation { Spanish } { to~(numerical~range) } { a }
     \keys_set:nn { siunitx }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2021-05-19 20:00:29 UTC (rev 59270)
@@ -73,7 +73,7 @@
 % \cs{fontfamily}, \cs{fontseries} and \cs{fontshape}, \cs{familydefault},
 % \cs{seriesdefault}, \cs{shapedefault} and \cs{selectfont}.
 % It also requires the standard
-% \LaTeXe{} kernel commands \cs{ensuremath}, \cs{textsubscript} and
+% \LaTeXe{} kernel commands \cs{ensuremath}, \cs{mbox}, \cs{textsubscript} and
 % \cs{textsuperscript} for printing in text mode. The following packages are
 % also required to provide the functionality detailed.
 % \begin{itemize}
@@ -756,6 +756,7 @@
 % \begin{macro}{\@@_text_scripts_two:NnNn}
 % \begin{macro}{\@@_text_scripts_two:nn}
 % \begin{macro}{\@@_text_scripts_two:n}
+% \begin{macro}{\@@_text_fraction:Nnn}
 %   Typesetting in text mode is easy in font control terms but more tricky
 %   in the manipulation of the input. The easy part comes first.
 %    \begin{macrocode}
@@ -777,7 +778,9 @@
           }
           { \selectfont }
         \tl_use:N \l_@@_text_font_tl
-        \@@_text_replace:n {#1}
+        \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+          { \@@_text_fraction:Nnn #1 }
+          { \@@_text_replace:n {#1} }
       }
   }
 %    \end{macrocode}
@@ -913,6 +916,19 @@
       }
   }
 %    \end{macrocode}
+%   Fraction commands are always math mode, so we have to go back and forth:
+%   this is done after general font setting for performance reasons.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_text_fraction:Nnn #1#2#3
+  {
+    \ensuremath
+      { 
+        #1
+          { \mbox { \@@_text_replace:n {#2} } }
+          { \mbox { \@@_text_replace:n {#3} } }
+      }
+  }
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
@@ -924,6 +940,7 @@
 % \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-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2021-05-19 20:00:29 UTC (rev 59270)
@@ -270,6 +270,11 @@
 %    formatted units: set by |font-command|.
 % \end{variable}
 %
+% \begin{variable}{\l_siunitx_unit_fraction_tl}
+%    The fraction function which is applied whne constructing fractional units:
+%    set by |fraction-command|.
+% \end{variable}
+%
 % \begin{variable}{\l_siunitx_unit_symbolic_seq}
 %   This sequence contains all of the symbolic names defined:
 %   these will be in the form of control sequences such as |\kilogram|.
@@ -1631,9 +1636,9 @@
 %
 % \begin{variable}
 %   {
+%     \l_siunitx_unit_fraction_tl    ,
 %     \l_@@_denominator_bracket_bool ,
 %     \l_@@_forbid_literal_bool      ,
-%     \l_@@_fraction_function_tl     ,
 %     \l_@@_parse_bool               ,
 %     \l_@@_per_symbol_tl            ,
 %     \l_@@_qualifier_mode_tl        ,
@@ -1648,7 +1653,7 @@
     forbid-literal-units .bool_set:N =
       \l_@@_forbid_literal_bool ,
     fraction-command .tl_set:N =
-      \l_@@_fraction_function_tl ,
+      \l_siunitx_unit_fraction_tl ,
     parse-units .bool_set:N =
       \l_@@_parse_bool ,
     per-mode .choice: ,
@@ -2416,7 +2421,7 @@
   {
     \tl_set:Nx \l_@@_formatted_tl
       {
-        \exp_not:V \l_@@_fraction_function_tl
+        \exp_not:V \l_siunitx_unit_fraction_tl
           { \exp_not:V \l_@@_formatted_tl }
           { \exp_not:V \l_@@_denominator_tl }
       }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2021-05-19 20:00:29 UTC (rev 59270)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-05-17} {3.0.0}
+\ProvidesExplPackage {siunitx} {2021-05-18} {3.0.1}
   {A comprehensive (SI) units package}
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.ins	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.ins	2021-05-19 20:00:29 UTC (rev 59270)
@@ -49,7 +49,7 @@
 This work consists of the files siunitx.dtx,
                                 siunitx.ins,
                                 siunitx.tex,
-                                siunitx-abbreviation.cfg,
+                                siunitx-abbreviations.cfg,
                                 siunitx-abbreviation.dtx,
                                 siunitx-angle.dtx,
                                 siunitx-binary.cfg,

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.tex	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.tex	2021-05-19 20:00:29 UTC (rev 59270)
@@ -2856,12 +2856,16 @@
 \begin{LaTeXdemo}[code only]
   \usepackage{siunitx}[=v2]
 \end{LaTeXdemo}
+This approach will work with older systems which still have version~$2$
+installed, meaning that you can reliably use it to work between systems
+with different versions of \pkg{siunitx}.
 
 \begin{function}{\SI, \SIlist, \SIrange, \si}
   In version~$3$, the document commands have been revised to be more
   descriptive. As such, the commands \cs{SI}, \cs{SIlist}, \cs{SIrange}
   and \cs{si} remain available but are not recommended for use in new
-  documents.
+  documents. Use the new \cs{qty\ldots} commands instead: they are clearer
+  and in some cases very slightly faster.
 \end{function}
 
 Some changes have been made to the semantics of commands or options. Most
@@ -2873,7 +2877,7 @@
 \end{itemize}
 
 The font control system has been completely re-written for version~$3$. The
-method used in entirely different from version~$2$. Emulation is therefore not
+method used is entirely different from version~$2$. Emulation is therefore not
 provided for all outcomes: if you need non-standard font settings, you will
 need to adjust your source. See Section~\ref{sec:print} for more details on the
 options available in this area.

Added: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg	2021-05-19 20:00:29 UTC (rev 59270)
@@ -0,0 +1,124 @@
+%%
+%% This is file `siunitx-abbreviations.cfg',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% siunitx-v2.dtx  (with options: `config,abbreviations')
+%% ---------------------------------------------------------------
+%% The siunitx package --- A comprehensive (SI) units package
+%% Maintained by Joseph Wright
+%% E-mail: joseph.wright at morningstar2.co.uk
+%% Released under the LaTeX Project Public License v1.3c or later
+%% See http://www.latex-project.org/lppl.txt
+%% ---------------------------------------------------------------
+%% 
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2021-04-17} {2.8e}
+  {siunitx: Abbreviated units}
+\DeclareSIUnit \A  {        \ampere }
+\DeclareSIUnit \pA { \pico  \ampere }
+\DeclareSIUnit \nA { \nano  \ampere }
+\DeclareSIUnit \uA { \micro \ampere }
+\DeclareSIUnit \mA { \milli \ampere }
+\DeclareSIUnit \kA { \kilo  \ampere }
+\DeclareSIUnit \Hz  {        \hertz }
+\DeclareSIUnit \mHz { \milli \hertz }
+\DeclareSIUnit \kHz { \kilo  \hertz }
+\DeclareSIUnit \MHz { \mega  \hertz }
+\DeclareSIUnit \GHz { \giga  \hertz }
+\DeclareSIUnit \THz { \tera  \hertz }
+\DeclareSIUnit \mol  {        \mole }
+\DeclareSIUnit \fmol { \femto \mole }
+\DeclareSIUnit \pmol { \pico  \mole }
+\DeclareSIUnit \nmol { \nano  \mole }
+\DeclareSIUnit \umol { \micro \mole }
+\DeclareSIUnit \mmol { \milli \mole }
+\DeclareSIUnit \kmol { \kilo  \mole }
+\DeclareSIUnit \V  {        \volt }
+\DeclareSIUnit \pV { \pico  \volt }
+\DeclareSIUnit \nV { \nano  \volt }
+\DeclareSIUnit \uV { \micro \volt }
+\DeclareSIUnit \mV { \milli \volt }
+\DeclareSIUnit \kV { \kilo  \volt }
+\DeclareSIUnit \hl { \hecto \litre }
+\DeclareSIUnit \l  {        \litre }
+\DeclareSIUnit \ml { \milli \litre }
+\DeclareSIUnit \ul { \micro \litre }
+\DeclareSIUnit \hL { \hecto \liter }
+\DeclareSIUnit \L  {        \liter }
+\DeclareSIUnit \mL { \milli \liter }
+\DeclareSIUnit \uL { \micro \liter }
+\DeclareSIUnit \fg  { \femto \gram }
+\DeclareSIUnit \pg  { \pico  \gram }
+\DeclareSIUnit \ng  { \nano  \gram }
+\DeclareSIUnit \ug  { \micro \gram }
+\DeclareSIUnit \mg  { \milli \gram }
+\DeclareSIUnit \g   { \gram }
+\DeclareSIUnit \kg  { \kilo \gram }
+\DeclareSIUnit \amu { \atomicmassunit }
+\DeclareSIUnit \W   {        \watt }
+\DeclareSIUnit \uW  { \micro \watt }
+\DeclareSIUnit \mW  { \milli \watt }
+\DeclareSIUnit \kW  { \kilo  \watt }
+\DeclareSIUnit \MW  { \mega  \watt }
+\DeclareSIUnit \GW  { \giga  \watt }
+\DeclareSIUnit \J   { \joule }
+\DeclareSIUnit \uJ  { \micro \joule }
+\DeclareSIUnit \mJ  { \milli \joule }
+\DeclareSIUnit \kJ  { \kilo \joule }
+\DeclareSIUnit \eV  { \electronvolt }
+\DeclareSIUnit \meV { \milli \electronvolt }
+\DeclareSIUnit \keV { \kilo  \electronvolt }
+\DeclareSIUnit \MeV { \mega  \electronvolt }
+\DeclareSIUnit \GeV { \giga  \electronvolt }
+\DeclareSIUnit \TeV { \tera  \electronvolt }
+\DeclareSIUnit [ inter-unit-product = ] \kWh { \kilo \watt \hour }
+\DeclareSIUnit \m  {        \metre }
+\DeclareSIUnit \pm { \pico  \metre }
+\DeclareSIUnit \nm { \nano  \metre }
+\DeclareSIUnit \um { \micro \metre }
+\DeclareSIUnit \mm { \milli \metre }
+\DeclareSIUnit \cm { \centi \metre }
+\DeclareSIUnit \dm { \deci  \metre }
+\DeclareSIUnit \km { \kilo  \metre }
+\DeclareSIUnit \K { \kelvin }
+\DeclareSIUnit \dB { \deci \bel }
+\DeclareSIUnit \F  {        \farad }
+\DeclareSIUnit \fF { \femto \farad }
+\DeclareSIUnit \pF { \pico  \farad }
+\DeclareSIUnit \N  {        \newton }
+\DeclareSIUnit \mN { \milli \newton }
+\DeclareSIUnit \kN { \kilo  \newton }
+\DeclareSIUnit \MN { \mega  \newton }
+\DeclareSIUnit \Pa  {        \pascal }
+\DeclareSIUnit \kPa { \kilo  \pascal }
+\DeclareSIUnit \MPa { \mega  \pascal }
+\DeclareSIUnit \GPa { \giga  \pascal }
+\DeclareSIUnit \mohm { \milli \ohm }
+\DeclareSIUnit \kohm { \kilo  \ohm }
+\DeclareSIUnit \Mohm { \mega  \ohm }
+\DeclareSIUnit \s  { \second }
+\DeclareSIUnit \as { \atto  \second }
+\DeclareSIUnit \fs { \femto \second }
+\DeclareSIUnit \ps { \pico  \second }
+\DeclareSIUnit \ns { \nano  \second }
+\DeclareSIUnit \us { \micro \second }
+\DeclareSIUnit \ms { \milli \second }
+%% Copyright (C) 2008-2021 by
+%%   Joseph Wright <joseph.wright at morningstar2.co.uk>
+%% 
+%% It may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License (LPPL), either version 1.3c of
+%% this license or (at your option) any later version.  The latest
+%% version of this license is in the file:
+%%    http://www.latex-project.org/lppl.txt
+%% 
+%% This work is "maintained" (as per LPPL maintenance status) by
+%%   Joseph Wright.
+%% 
+%% This work consists of the file  siunitx.dtx
+%%           and the derived files siunitx.pdf,
+%%                                 siunitx.sty and
+%%                                 siunitx.ins.
+%%
+%% End of file `siunitx-abbreviations.cfg'.


Property changes on: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-05-19 19:59:58 UTC (rev 59269)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2021-05-19 20:00:29 UTC (rev 59270)
@@ -42,7 +42,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2021-05-17} {3.0.0}
+\ProvidesExplPackage {siunitx} {2021-05-18} {3.0.1}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -1394,7 +1394,7 @@
   {
     \RequirePackage { translations }
     \DeclareTranslation { English } { to~(numerical~range) } { to }
-    \DeclareTranslation { French }  { to~(numerical~range) } { á }
+    \DeclareTranslation { French }  { to~(numerical~range) } { à }
     \DeclareTranslation { German }  { to~(numerical~range) } { bis }
     \DeclareTranslation { Spanish } { to~(numerical~range) } { a }
     \keys_set:nn { siunitx }
@@ -3663,7 +3663,9 @@
           }
           { \selectfont }
         \tl_use:N \l__siunitx_print_text_font_tl
-        \__siunitx_print_text_replace:n {#1}
+        \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+          { \__siunitx_print_text_fraction:Nnn #1 }
+          { \__siunitx_print_text_replace:n {#1} }
       }
   }
 \cs_new_protected:Npn \__siunitx_print_text_replace:n #1
@@ -3775,6 +3777,15 @@
         \__siunitx_print_text_scripts_one:Nn \use:n {#1}
       }
   }
+\cs_new_protected:Npn \__siunitx_print_text_fraction:Nnn #1#2#3
+  {
+    \ensuremath
+      {
+        #1
+          { \mbox { \__siunitx_print_text_replace:n {#2} } }
+          { \mbox { \__siunitx_print_text_replace:n {#3} } }
+      }
+  }
 \keys_set:nn { siunitx }
   {
     color               =       ,
@@ -5072,7 +5083,7 @@
     forbid-literal-units .bool_set:N =
       \l__siunitx_unit_forbid_literal_bool ,
     fraction-command .tl_set:N =
-      \l__siunitx_unit_fraction_function_tl ,
+      \l_siunitx_unit_fraction_tl ,
     parse-units .bool_set:N =
       \l__siunitx_unit_parse_bool ,
     per-mode .choice: ,
@@ -5538,7 +5549,7 @@
   {
     \tl_set:Nx \l__siunitx_unit_formatted_tl
       {
-        \exp_not:V \l__siunitx_unit_fraction_function_tl
+        \exp_not:V \l_siunitx_unit_fraction_tl
           { \exp_not:V \l__siunitx_unit_formatted_tl }
           { \exp_not:V \l__siunitx_unit_denominator_tl }
       }
@@ -7345,7 +7356,7 @@
 %% This work consists of the files siunitx.dtx,
 %%                                 siunitx.ins,
 %%                                 siunitx.tex,
-%%                                 siunitx-abbreviation.cfg,
+%%                                 siunitx-abbreviations.cfg,
 %%                                 siunitx-abbreviation.dtx,
 %%                                 siunitx-angle.dtx,
 %%                                 siunitx-binary.cfg,



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