summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-31 20:24:44 +0000
committerKarl Berry <karl@freefriends.org>2021-05-31 20:24:44 +0000
commit43f5ef960aa5e3a6ed8845d7577deab29d0baff4 (patch)
treeb731db3e3c4ba2ecf34c2df5d1a4c2e6733cb850 /Master/texmf-dist/tex/latex/siunitx
parentb48bb6a909ebbc5a1af3a01a6fb187e8770e799c (diff)
siunitx (31may21)
git-svn-id: svn://tug.org/texlive/trunk@59410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty103
1 files changed, 76 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index 7c0d3387b3a..1e3411436d2 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-28} {3.0.7}
+\ProvidesExplPackage {siunitx} {2021-05-31} {3.0.8}
{A comprehensive (SI) units package}
\msg_new:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
@@ -3112,13 +3112,9 @@
}
\cs_new:Npn \__siunitx_number_output_integer:nnn #1#2#3
{
- \bool_lazy_all:nF
- {
- { \str_if_eq_p:nn {#1} { 1 } }
- { \tl_if_blank_p:n {#2} }
- { ! \str_if_eq_p:nn {#3} { 0 } }
- { ! \l__siunitx_number_unity_mantissa_bool }
- }
+ \bool_lazy_or:nnT
+ { \l__siunitx_number_unity_mantissa_bool }
+ { ! \str_if_eq_p:nn { #1 . #2 } { 1. } }
{ \__siunitx_number_output_digits:nn { integer } {#1} }
}
\cs_new:Npn \__siunitx_number_output_decimal:nn #1#2
@@ -3334,10 +3330,9 @@
}
\cs_new:Npn \__siunitx_number_output_exponent_auxi:nnnn #1#2#3#4
{
- \bool_lazy_and:nnTF
- { \str_if_eq_p:nn {#3} { 1. } }
- { ! \l__siunitx_number_unity_mantissa_bool }
- { \exp_not:n {#4} }
+ \bool_lazy_or:nnTF
+ { \l__siunitx_number_unity_mantissa_bool }
+ { ! \str_if_eq_p:nn {#3} { 1. } }
{
\bool_if:NTF \l__siunitx_number_tight_bool
{ \exp_not:N \mathord }
@@ -3345,6 +3340,7 @@
{ \exp_not:V \l__siunitx_number_exponent_product_tl }
\exp_not:n {#4}
}
+ { \exp_not:n {#4} }
\exp_not:V \l__siunitx_number_exponent_base_tl
^
{ \__siunitx_number_output_exponent_auxiii:nn {#1} {#2} }
@@ -6663,6 +6659,20 @@
}
{ \__siunitx_option_removed:V \l_keys_key_tl }
} ,
+ group-four-digits .choice: ,
+ group-four-digits / false .code:n =
+ {
+ \__siunitx_option_deprecated:nn
+ { group-four-digits~=~false }
+ { group-minimum-digits~=~5 }
+ } ,
+ group-four-digits / true .code:n =
+ {
+ \__siunitx_option_deprecated:nn
+ { group-four-digits~=~false }
+ { group-minimum-digits~=~4 }
+ } ,
+ bracket-numbers .default:n = true ,
omit-uncertainty .code:n =
{
\__siunitx_option_deprecated:nnV
@@ -7107,28 +7117,67 @@
}
}
\siunitx_declare_unit:Nn \celsius { \degreeCelsius }
-\msg_new:nnnn { siunitx } { unit-removed }
- { Unit~macro~#1~has~been~removed~in~this~release. }
+\msg_new:nnnn { siunitx } { unit-deprecated }
+ { Unit~macro~#1~has~been~deprecated~in~this~release. }
{
The~BIPM~have~removed~this~unit~from~the~SI~Brochure.~
- You~will~need~to~define~it~yourself~using~\token_to_str:N \DeclareSIUnit.
+ You~should~define~it~yourself~using~\token_to_str:N \DeclareSIUnit
+ in~your~source.
}
-\clist_map_inline:nn
+\cs_gset_protected:Npn \__siunitx_emulation_tmp:w #1#2
{
- \angstrom ,
- \atomicmassunit ,
- \bar ,
- \bohr ,
- \clight ,
- \electronmass ,
- \elementarycharge ,
- \hartree ,
- \planckbar
+ \quark_if_recursion_tail_stop:N #1
+ \bool_new:c { g__siunitx_emulation_unit_warning_ \token_to_str:N #1 _bool }
+ \siunitx_declare_unit:Nx #1
+ {
+ \exp_not:N \bool_if:NF
+ \exp_not:c { g__siunitx_emulation_unit_warning_ \token_to_str:N #1 _bool }
+ {
+ \exp_not:N \bool_gset_true:N
+ \exp_not:c { g__siunitx_emulation_unit_warning_ \token_to_str:N #1 _bool }
+ \msg_warning:nnn { siunitx } { unit-deprecated }
+ { \token_to_str:N #1 }
+ }
+ #2
+ }
+ \__siunitx_emulation_tmp:w
+ }
+\__siunitx_emulation_tmp:w
+ \atomicmassunit { u }
+ \bar { bar }
+ \barn { b }
+ \bohr
+ { \text { \ensuremath { a } } \char_generate:nn { `\_ } { 8 } { 0 } }
+ \clight
+ { \text { \ensuremath { c } } \char_generate:nn { `\_ } { 8 } { 0 } }
+ \electronmass
+ {
+ \text { \ensuremath { m } }
+ \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { e } }
+ }
+ \elementarycharge { \text { \ensuremath { e } } }
+ \hartree
+ {
+ \text { \ensuremath { E } }
+ \char_generate:nn { `\_ } { 8 } { \exp_not:N \mathrm { h } }
+ }
+ \knot { kn }
+ \mmHg { mmHg }
+ \nauticalmile { M }
+ \planckbar
+ { \text { \ensuremath { \exp_not:N \hbar } } }
+ \q_recursion_tail { }
+ \q_recursion_stop
+\@ifpackageloaded { fontspec }
+ {
+ \__siunitx_emulation_tmp:w \angstrom { \__siunitx_emulation_non_latin:n { "00C5 } }
}
{
- \siunitx_declare_unit:Nx #1
- { \msg_error:nnn { siunitx } { unit-removed } { \token_to_str:N #1 } }
+ \__siunitx_emulation_tmp:w \angstrom
+ { \exp_not:N \text { \__siunitx_emulation_non_latin:n { "00C5 } } }
}
+ \q_recursion_tail { }
+ \q_recursion_stop
\IfFormatAtLeastTF { 2020-10-01 }
{ }
{ \RequirePackage { xparse } }