summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-19 20:00:29 +0000
committerKarl Berry <karl@freefriends.org>2021-05-19 20:00:29 +0000
commitcc53a2c30201f9ac5454b948e94340a692aa3ebe (patch)
tree2c3f93c8422070d384d7114134bace2b8a9046b5 /Master
parente3bf523e628a1e9ff7b3ba31de512c0b08406147 (diff)
siunitx (19may21)
git-svn-id: svn://tug.org/texlive/trunk@59270 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md17
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdfbin1431907 -> 1432693 bytes
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin600690 -> 601047 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx2
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx21
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx11
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx2
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.ins2
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.tex8
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg124
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty23
11 files changed, 193 insertions, 17 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
index be1b3b2ac14..958d0b50d69 100644
--- a/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
@@ -7,6 +7,20 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [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 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### 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
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
index 7a34f865a87..dd338db3ac1 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index 23c1e8fea4b..d09687fc0d9 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx
index 07a934b2fe7..f037fcfae34 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-locale.dtx
@@ -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 }
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
index 0885d4f1aa7..8cdc068b910 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
@@ -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,20 @@
}
}
% \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}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
index 8eaf45c5ace..f066530439a 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
@@ -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 }
}
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 887d0c03118..99932bd943f 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -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}
%
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.ins b/Master/texmf-dist/source/latex/siunitx/siunitx.ins
index 18e3a127361..32ef6f900a7 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.ins
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.ins
@@ -49,7 +49,7 @@ This work is "maintained" (as per LPPL maintenance status) by
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,
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.tex b/Master/texmf-dist/source/latex/siunitx/siunitx.tex
index 2637236df4a..2fc9e465d0b 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.tex
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.tex
@@ -2856,12 +2856,16 @@ or
\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 @@ notably
\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.
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
new file mode 100644
index 00000000000..85d87c12454
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx-abbreviations.cfg
@@ -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@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@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'.
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 84ea93a78da..e8760fb6dfe 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -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,