summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-03 23:59:46 +0000
committerNorbert Preining <preining@logic.at>2021-04-03 23:59:46 +0000
commit3035fa3fb4b8e475519b23ce373cc3978590dcf7 (patch)
tree6dbc29e741ee12a7cf46a76745e58282c39a79f1 /Master/texmf-dist/tex/latex
parentbe6bea34fdccbe0b80ba98b4c11b13d994001323 (diff)
siunitx (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58714 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty59
1 files changed, 30 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index f24c7c51cdc..731ffbe497a 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -15,7 +15,7 @@
%%
\RequirePackage{expl3}[2020/01/12]
\RequirePackage{xparse}
-\ProvidesExplPackage {siunitx} {2020/02/25} {2.8b}
+\ProvidesExplPackage {siunitx} {2021/03/27} {2.8c}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2020/01/12 }
{ }
@@ -46,6 +46,9 @@
\__siunitx_load_check:n
}
\RequirePackage{ amstext , array , l3keys2e }
+\@ifl@t@r \fmtversion { 2020-10-01 }
+ { \cs_new_eq:NN \__siunitx_if_hooks:TF \use_i:nn }
+ { \cs_new_eq:NN \__siunitx_if_hooks:TF \use_ii:nn }
\cs_new:Npn \__siunitx_tmp:w { }
\cs_generate_variant:Nn \clist_map_function:nN { nc }
\cs_generate_variant:Nn \tl_if_blank:nTF { V }
@@ -361,11 +364,21 @@
}
\group_end:
}
-\tl_put_right:Nn \document
+\__siunitx_if_hooks:TF
{
- \__siunitx_set_math_fam:n { sf }
- \__siunitx_set_math_fam:n { tt }
- \ignorespaces
+ \AddToHook { begindocument / end } [ siunitx ]
+ {
+ \__siunitx_set_math_fam:n { sf }
+ \__siunitx_set_math_fam:n { tt }
+ }
+ }
+ {
+ \tl_put_right:Nn \document
+ {
+ \__siunitx_set_math_fam:n { sf }
+ \__siunitx_set_math_fam:n { tt }
+ \ignorespaces
+ }
}
\cs_new_protected:Npn \__siunitx_set_text_fam:n #1 {
\tl_const:cx { c__siunitx_text #1 _tl } { \use:c { #1 default } }
@@ -4357,7 +4370,18 @@
\tl_map_function:nN { \bar \color \ng \pm \array@row@rst }
\__siunitx_protect_symbols:N
}
-\tl_put_right:Nn \document { \__siunitx_protect_symbols:N \fg }
+\__siunitx_if_hooks:TF
+ {
+ \AddToHook { begindocument / end } [ siunitx ]
+ { \__siunitx_protect_symbols:N \fg }
+ }
+ {
+ \tl_put_right:Nn \document
+ {
+ \__siunitx_protect_symbols:N \fg
+ \ignorespaces
+ }
+ }
\cs_new_protected:Npn \__siunitx_protect_symbols:N #1 {
\cs_if_exist:NT #1
{
@@ -7281,29 +7305,6 @@
}
\group_end:
}
-\AtBeginDocument
- {
- \cs_set:Npn \addtocontents #1#2
- {
- \protected@write \@auxout
- {
- \cs_set_eq:NN \label \use_none:n
- \cs_set_eq:NN \index \use_none:n
- \cs_set_eq:NN \glossary \use_none:n
- \seq_map_inline:Nn \l_siunitx_unit_symbolic_seq
- { \__siunitx_contents_add:N ##1 }
- }
- { \token_to_str:N \@writefile {#1} {#2} }
- }
- }
-\cs_new_protected:Npn \__siunitx_contents_add:N #1
- {
- \cs_set:Npn #1
- {
- \token_to_str:N #1
- \c_space_tl
- }
- }
\cs_new_protected:Npn \__siunitx_contents_bookmarks:
{
\seq_map_inline:Nn \l_siunitx_unit_symbolic_seq