summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siunitx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-05 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2021-06-05 03:00:55 +0000
commit4e703bdd2f304028698cd4ab92b0dda0b95a95a8 (patch)
treeeb585fb7163ef4f11c18dfd7e958f24881232885 /macros/latex/contrib/siunitx
parenta5ae129f3aa3a3a0aeaa21c55b75a1d543fe4111 (diff)
CTAN sync 202106050300
Diffstat (limited to 'macros/latex/contrib/siunitx')
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md11
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1447170 -> 1482618 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-complex.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx-emulation.dtx15
-rw-r--r--macros/latex/contrib/siunitx/siunitx-table.dtx14
-rw-r--r--macros/latex/contrib/siunitx/siunitx-unit.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin607150 -> 634770 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex28
9 files changed, 58 insertions, 16 deletions
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 6cde2cdc72..10450afb9c 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,14 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.10]
+
+### Changed
+- Documenation improvements
+
+### Fixed
+- Incompatibility with REVTeX (issue #469)
+
## [v3.0.9]
### Changed
@@ -1343,7 +1351,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.9...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.10...HEAD
+[v3.0.10]: https://github.com/josephwright/siunitx/compare/v3.0.9...v3.0.10
[v3.0.9]: https://github.com/josephwright/siunitx/compare/v3.0.8...v3.0.9
[v3.0.8]: https://github.com/josephwright/siunitx/compare/v3.0.7...v3.0.8
[v3.0.7]: https://github.com/josephwright/siunitx/compare/v3.0.6...v3.0.7
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index 3c20dfb0f6..123afd32cf 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-complex.dtx b/macros/latex/contrib/siunitx/siunitx-complex.dtx
index 87c1b684ef..1a81054a5c 100644
--- a/macros/latex/contrib/siunitx/siunitx-complex.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-complex.dtx
@@ -412,7 +412,7 @@
% \item All of the number was before the complex root: |#2| will
% be empty and we need to check |#1| fully to split out the two
% parts
-% \item The input has a a real part with the complex part starting
+% \item The input has a real part with the complex part starting
% with the root symbol: just the last token needs to be separated.
% \end{itemize}
% \begin{macrocode}
diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
index 3d2e0370f1..cc60aa85e8 100644
--- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
@@ -478,7 +478,7 @@
{ print-unity-mantissa }
\l_keys_value_tl
} ,
- retain-unity-mantisa .default:n = true ,
+ retain-unity-mantissa .default:n = true ,
retain-zero-exponent .code:n =
{
\@@_option_deprecated:nnV
@@ -1013,12 +1013,13 @@
%
% Units that have been removed: to avoid issues, we mark them as deprecated.
% \begin{macrocode}
-\msg_new:nnnn { siunitx } { unit-deprecated }
- { Unit~macro~#1~has~been~deprecated~in~this~release. }
+\msg_new:nnn { siunitx } { unit-deprecated }
{
+ Unit~macro~#1~has~been~deprecated~in~this~release. \\ \\
The~BIPM~have~removed~this~unit~from~the~SI~Brochure.~
- You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit
- in~your~source.
+ You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit\ %
+ in~your~source. The~current~definition~is\\ \\
+ \token_to_str:N \DeclareSIUnit \{ #2 \}
}
\cs_gset_protected:Npn \@@_tmp:w #1#2
{
@@ -1031,8 +1032,8 @@
{
\exp_not:N \bool_gset_true:N
\exp_not:c { g_@@_unit_warning_ \token_to_str:N #1 _bool }
- \msg_warning:nnn { siunitx } { unit-deprecated }
- { \token_to_str:N #1 }
+ \msg_warning:nnnn { siunitx } { unit-deprecated }
+ { \token_to_str:N #1 } {#2}
}
#2
}
diff --git a/macros/latex/contrib/siunitx/siunitx-table.dtx b/macros/latex/contrib/siunitx/siunitx-table.dtx
index 269015d857..137c2e18d6 100644
--- a/macros/latex/contrib/siunitx/siunitx-table.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-table.dtx
@@ -185,7 +185,7 @@
% would allow space for one digit in the integer part, two in the decimal
% part and three in the exponent part. Signs can be allowed for using any
% valid input sign, so for example |+1.2 \pm 1.2| would allow for a sign,
-% a number with one integer and two decimal digits and a uncertainty of
+% a number with one integer and two decimal digits and an uncertainty of
% the same size.
% \end{function}
%
@@ -445,12 +445,22 @@
\l_@@_after_tl
}
}
+% \end{macrocode}
+% To cover the use of REV\TeX{}, we need to allow for the insertion of
+% \cs{array@row@rst} into cell content: that explodes inside
+% \cs{protected@edef}. We use the classical solution of making locally
+% equal to \cs{scan_stop:}.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_collect_end:n #1
{
\str_if_eq:eeTF { \exp_not:n {#1} }
{ { \@@_collect_end_aux:n {#1} } }
{ \tl_set:Nn }
- { \protected@edef }
+ {
+ \cs_if_exist:NT \array@row@rst
+ { \cs_set_eq:NN \array@row@rst \scan_stop: }
+ \protected@edef
+ }
\l_@@_collect_tl {#1}
}
\cs_new:Npn \@@_collect_end_aux:n #1
diff --git a/macros/latex/contrib/siunitx/siunitx-unit.dtx b/macros/latex/contrib/siunitx/siunitx-unit.dtx
index 782ac23dcf..01f85be714 100644
--- a/macros/latex/contrib/siunitx/siunitx-unit.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-unit.dtx
@@ -1276,7 +1276,7 @@
% To deal properly with literal formatting, we have to worry about super-
% and subscript markers. That can be complicated as they could come anywhere
% in the input: we handle that by iterating through the input and picking
-% them out. This avoids any issue with loosing braces for mid-input scripts.
+% them out. This avoids any issue with losing braces for mid-input scripts.
% We also have to deal with fractions, hence needing a series of nested
% loops and a change of separator.
% \begin{macrocode}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index cd0c5ca2c9..d6f8821495 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-06-01} {3.0.9}
+\ProvidesExplPackage {siunitx} {2021-06-04} {3.0.10}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 356fee236b..426815f99c 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 86db9afa6c..360a395e6f 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -1171,7 +1171,7 @@ when printing: the standard font setting is upright mid-weight roman
In math mode, the font used by \LaTeX{} is \enquote{invariant}, and this is
reflected in the options available. With the standard settings, in math mode
printing uses the standard math font and version (weight). The option
-\opt{propagate-math-font} may be used to apply the a prevailing math font
+\opt{propagate-math-font} may be used to apply the prevailing math font
to the printed material. The setting \opt{reset-math-version} controls
whether the math version is reset or not. Note that math version is typically
used to set \enquote{bold math} but may also be used for other effects, for
@@ -2904,6 +2904,9 @@ this means that
\item Complex values need to be given using the dedicated command
\cs{complexnum}.
\end{itemize}
+The option \opt{round-integer-to-decimal = false} has been removed, and whilst
+there is not a direct replacement, users are likely to find that \opt{round-pad
+= false} offers the desired outcome.
A new approach has been taken to providing non-Latin symbols for use in
units: these are now handled directly where needed, for example in the
@@ -3025,6 +3028,25 @@ When the \pkg{physics} package is loaded before \pkg{siunitx}, the command
\section{Hints for using \pkg{siunitx}}
+\subsection{Adjusting \cs{litre} and \cs{liter}%
+ \label{sec:hint:litre}}
+
+As detailed earlier, the unit macros \cs{litre} and \cs{liter} are both
+available for litres. With the standard settings, \cs{liter} is defined as
+\begin{LaTeXdemo}[code only]
+ \DeclareSIUnit\liter{\litre}
+\end{LaTeXdemo}
+meaning that \cs{litre} is the \enquote{canonical} unit. This follows the same
+relationship as exists between \cs{metre} and \cs{meter}.
+
+In contrast to metres, however, there is more likelihood of users wishing to
+adjust the appearance of litres: both \enquote{\unit{l}} and \enquote{\unit{L}}
+are commonly used. The recommended approach to adjustment is to re-declare
+the \cs{litre} macro, as \cs{liter} will follow automatically.
+\begin{LaTeXdemo}[code only]
+ \DeclareSIUnit\liter{l}
+\end{LaTeXdemo}
+
\subsection{Ensuring text or math output%
\label{sec:hint:text-math}}
@@ -3485,7 +3507,7 @@ It is often convenient to have a pre-defined set of useful units available
without needing to copy the full set of definitions into each source file. At
the same time, it is important that such sources do show that they are using
units not defined by the core part of \pkg{siunitx}. The most straight-forward
-way to acheive this is to create a separate file, for example
+way to achieve this is to create a separate file, for example
\texttt{siunitx-local-units.tex}, and place it in your local \TeX{} tree
(usually \verb|~/texmf/tex/latex/| on Linux, \verb|~/Library/texmf/tex/latex/|
on macOS or \verb|C:\Users\<name>\texmf\tex\latex| on Windows). This can then
@@ -3647,7 +3669,7 @@ unit raised to the appropriate power: \qtyproduct[product-units = power]{2 x
potentially-confusing and is not encouraged.
Care must be taken when writing ranges of numbers. For purely numerical values,
-it is common to use a en-dash to show a range, for example \enquote{see pages
+it is common to use an en-dash to show a range, for example \enquote{see pages
1--5}. On the other hand, physical quantities could be misinterpret as negative
values if written in this way. As the quantity is a single mathematical entity,
writing the values with an en-dash followed by a single unit is also incorrect.