summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
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/source/latex/siunitx/siunitx-emulation.dtx
parentb48bb6a909ebbc5a1af3a01a6fb187e8770e799c (diff)
siunitx (31may21)
git-svn-id: svn://tug.org/texlive/trunk@59410 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx85
1 files changed, 69 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
index dc2e9f90350..0878c37d74e 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx-emulation.dtx
@@ -446,6 +446,20 @@
}
{ \@@_option_removed:V \l_keys_key_tl }
} ,
+ group-four-digits .choice: ,
+ group-four-digits / false .code:n =
+ {
+ \@@_option_deprecated:nn
+ { group-four-digits~=~false }
+ { group-minimum-digits~=~5 }
+ } ,
+ group-four-digits / true .code:n =
+ {
+ \@@_option_deprecated:nn
+ { group-four-digits~=~false }
+ { group-minimum-digits~=~4 }
+ } ,
+ bracket-numbers .default:n = true ,
omit-uncertainty .code:n =
{
\@@_option_deprecated:nnV
@@ -996,30 +1010,69 @@
% \end{macrocode}
% \end{macro}
%
-% Units that have been removed.
+% Units that have been removed: to avoid issues, we mark them as deprecated.
% \begin{macrocode}
-\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 \@@_tmp:w #1#2
{
- \angstrom ,
- \atomicmassunit ,
- \bar ,
- \bohr ,
- \clight ,
- \electronmass ,
- \elementarycharge ,
- \hartree ,
- \planckbar
+ \quark_if_recursion_tail_stop:N #1
+ \bool_new:c { g_@@_unit_warning_ \token_to_str:N #1 _bool }
+ \siunitx_declare_unit:Nx #1
+ {
+ \exp_not:N \bool_if:NF
+ \exp_not:c { g_@@_unit_warning_ \token_to_str:N #1 _bool }
+ {
+ \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 }
+ }
+ #2
+ }
+ \@@_tmp:w
}
+\@@_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_declare_unit:Nx #1
- { \msg_error:nnn { siunitx } { unit-removed } { \token_to_str:N #1 } }
+ \@@_tmp:w \angstrom { \@@_non_latin:n { "00C5 } }
+ }
+ {
+ \@@_tmp:w \angstrom
+ { \exp_not:N \text { \@@_non_latin:n { "00C5 } } }
}
+ \q_recursion_tail { }
+ \q_recursion_stop
% \end{macrocode}
%
% \begin{macrocode}