summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-22 21:09:17 +0000
committerKarl Berry <karl@freefriends.org>2021-06-22 21:09:17 +0000
commit4eabd917e9bbaa92f941cae342a676cc0f7ec5ea (patch)
treedec6a99bcdcdff96952a545213f97cf24f450fa8 /Master/texmf-dist/tex/latex/siunitx/siunitx.sty
parent15916837cb7d1e611738688cf132d91977ae99fb (diff)
siunitx (22jun21)
git-svn-id: svn://tug.org/texlive/trunk@59677 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/siunitx/siunitx.sty')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty51
1 files changed, 36 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index d9bb92ea9cc..c19d68ab47f 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-06-17} {3.0.14}
+\ProvidesExplPackage {siunitx} {2021-06-22} {3.0.15}
{A comprehensive (SI) units package}
\msg_new:nnnn { siunitx } { incompatible-package }
{ Package~'#1'~incompatible. }
@@ -677,9 +677,20 @@
\exp_after:wN \__siunitx_complex_extract_exponent:w \l__siunitx_complex_tmp_tl \q_stop
\tl_set:Nx \l__siunitx_complex_tmp_tl
{
- \bool_lazy_and:nnTF
- { \l_siunitx_number_bracket_ambiguous_bool }
- { ! \tl_if_empty_p:N \l__siunitx_complex_exp_tl }
+ \bool_lazy_or:nnTF
+ {
+ \bool_lazy_and_p:nn
+ { \l_siunitx_number_bracket_ambiguous_bool }
+ { ! \tl_if_empty_p:N \l__siunitx_complex_exp_tl }
+ }
+ {
+ ! \bool_lazy_any_p:n
+ {
+ { \tl_if_blank_p:n {#1} }
+ { \tl_if_empty_p:N \l__siunitx_complex_real_tl }
+ { \tl_if_empty_p:N \l__siunitx_complex_img_tl }
+ }
+ }
{ \__siunitx_complex_format_bracket:n }
{ \use:n }
{
@@ -2382,7 +2393,7 @@
{ \exp_not:n { #1 00 } } { }
{ \__siunitx_number_exponent_engineering_uncert:nn {#3} { 00 } }
}
- {\__siunitx_number_exponent_engineering:nnNw {#1} {#3} #2 \q_stop }
+ { \__siunitx_number_exponent_engineering:nnNw {#1} {#3} #2 \q_stop }
\__siunitx_number_exponent_finalise:n { #4 - 2 }
}
\cs_new:Npn \__siunitx_number_exponent_engineering:nnNw #1#2#3#4 \q_stop
@@ -2390,7 +2401,7 @@
\tl_if_blank:nTF {#4}
{
{ \exp_not:n { #1#3 0 } } { }
- { { \__siunitx_number_exponent_engineering_uncert:nn {#2} { 0 } } }
+ { \__siunitx_number_exponent_engineering_uncert:nn {#2} { 0 } }
}
{
{ \exp_not:n {#1#3} \exp_not:o { \tl_head:w #4 \q_stop } }
@@ -3366,7 +3377,9 @@
{
\tl_if_blank:nTF {#1}
{
- \bool_if:NT \l__siunitx_number_implicit_plus_bool
+ \bool_lazy_and:nnT
+ { \l__siunitx_number_implicit_plus_bool }
+ { ! \str_if_eq_p:nn {#2} { 0 } }
{ \__siunitx_number_output_sign:N + }
}
{ \__siunitx_number_output_sign:N #1 }
@@ -6146,22 +6159,30 @@
{ \group_end: }
\__siunitx_symbol_if_replace:NnT \ohm { "03A9 }
{
+ \tl_set:Nx \l__siunitx_symbol_tmp_tl
+ {
+ \cs_if_exist:NTF \upOmega
+ { \exp_not:N \upOmega }
+ { \exp_not:N \Omega }
+ }
\siunitx_declare_unit:Nx \ohm
{
\@ifpackageloaded { fourier }
{
\exp_not:N \ensuremath
- {
- \cs_if_exist:NTF \upOmega
- { \exp_not:N \upOmega }
- { \exp_not:N \Omega }
- }
+ { \exp_not:V \l__siunitx_symbol_tmp_tl }
}
{
\exp_not:N \ifmmode
- \cs_if_exist:NTF \upOmega
- { \exp_not:N \upOmega }
- { \exp_not:N \Omega }
+ \@ifpackageloaded { fontspec }
+ {
+ \exp_not:N \text
+ {
+ \exp_not:N \ensuremath
+ { \exp_not:V \l__siunitx_symbol_tmp_tl }
+ }
+ }
+ { \exp_not:V \l__siunitx_symbol_tmp_tl }
\exp_not:N \else
\exp_not:N \text
{