summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siunitx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-05-19 03:01:49 +0000
committerNorbert Preining <norbert@preining.info>2021-05-19 03:01:49 +0000
commit94c996b5f40175b4a858ddd1f19e3947198b9bd0 (patch)
tree3ab5124a874983f13f00d3c7d8e29842cca36933 /macros/latex/contrib/siunitx
parent97eca13a92a0b8ad423b606c8970c9ce64d9b2bf (diff)
CTAN sync 202105190301
Diffstat (limited to 'macros/latex/contrib/siunitx')
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md17
-rw-r--r--macros/latex/contrib/siunitx/siunitx-abbreviations.cfg124
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1431907 -> 1432693 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-locale.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx-print.dtx21
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx11
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.ins2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin600690 -> 601047 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex8
10 files changed, 176 insertions, 11 deletions
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index be1b3b2ac1..958d0b50d6 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx-abbreviations.cfg b/macros/latex/contrib/siunitx/siunitx-abbreviations.cfg
new file mode 100644
index 0000000000..85d87c1245
--- /dev/null
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 7a34f865a8..dd338db3ac 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-locale.dtx b/macros/latex/contrib/siunitx/siunitx-locale.dtx
index 07a934b2fe..f037fcfae3 100644
--- a/macros/latex/contrib/siunitx/siunitx-locale.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx-print.dtx b/macros/latex/contrib/siunitx/siunitx-print.dtx
index 0885d4f1aa..8cdc068b91 100644
--- a/macros/latex/contrib/siunitx/siunitx-print.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 8eaf45c5ac..f066530439 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 887d0c0311..99932bd943 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx.ins b/macros/latex/contrib/siunitx/siunitx.ins
index 18e3a12736..32ef6f900a 100644
--- a/macros/latex/contrib/siunitx/siunitx.ins
+++ b/macros/latex/contrib/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/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 23c1e8fea4..d09687fc0d 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 2637236df4..2fc9e465d0 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/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.