summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/siunitx
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/source/latex/siunitx
parentbe6bea34fdccbe0b80ba98b4c11b13d994001323 (diff)
siunitx (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58714 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx')
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx74
1 files changed, 36 insertions, 38 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 7609bf78771..bfef3f5f5e6 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -5225,7 +5225,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2020/02/25} {2.8b}
+\ProvidesExplPackage {siunitx} {2021/03/27} {2.8c}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -5279,6 +5279,15 @@ This work consists of the file siunitx.dtx
\RequirePackage{ amstext , array , l3keys2e }
% \end{macrocode}
%
+% \begin{macro}{@@_if_hooks:TF}
+% To work with updated hooks if available.
+% \begin{macrocode}
+\@ifl@t@r \fmtversion { 2020-10-01 }
+ { \cs_new_eq:NN \@@_if_hooks:TF \use_i:nn }
+ { \cs_new_eq:NN \@@_if_hooks:TF \use_ii:nn }
+% \end{macrocode}
+% \end{macro}
+%
%\begin{macro}{\@@_tmp:w}
% A scratch function.
% \begin{macrocode}
@@ -5750,11 +5759,21 @@ This work consists of the file siunitx.dtx
}
\group_end:
}
-\tl_put_right:Nn \document
+\@@_if_hooks:TF
+ {
+ \AddToHook { begindocument / end } [ siunitx ]
+ {
+ \@@_set_math_fam:n { sf }
+ \@@_set_math_fam:n { tt }
+ }
+ }
{
- \@@_set_math_fam:n { sf }
- \@@_set_math_fam:n { tt }
- \ignorespaces
+ \tl_put_right:Nn \document
+ {
+ \@@_set_math_fam:n { sf }
+ \@@_set_math_fam:n { tt }
+ \ignorespaces
+ }
}
% \end{macrocode}
%\end{macro}
@@ -11572,7 +11591,18 @@ This work consists of the file siunitx.dtx
\tl_map_function:nN { \bar \color \ng \pm \array@row@rst }
\@@_protect_symbols:N
}
-\tl_put_right:Nn \document { \@@_protect_symbols:N \fg }
+\@@_if_hooks:TF
+ {
+ \AddToHook { begindocument / end } [ siunitx ]
+ { \@@_protect_symbols:N \fg }
+ }
+ {
+ \tl_put_right:Nn \document
+ {
+ \@@_protect_symbols:N \fg
+ \ignorespaces
+ }
+ }
\cs_new_protected:Npn \@@_protect_symbols:N #1 {
\cs_if_exist:NT #1
{
@@ -15987,38 +16017,6 @@ This work consists of the file siunitx.dtx
% \pkg{hyperref}, and ensure that everything works cleanly and with
% no unnecessary warnings.
%
-% \begin{macro}{\@@_contents_add:N}
-% An updated version of \cs{addtocontents} which will ensure that
-% everything works properly. Using \cs{token_to_str:N} means that
-% there is no problem with the asynchronous nature of \TeX{}'s writing
-% mechanism.
-% \begin{macrocode}
-\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
- { \@@_contents_add:N ##1 }
- }
- { \token_to_str:N \@writefile {#1} {#2} }
- }
- }
-\cs_new_protected:Npn \@@_contents_add:N #1
- {
- \cs_set:Npn #1
- {
- \token_to_str:N #1
- \c_space_tl
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\@@_contents_bookmarks:}
% The idea here is two-fold. First, all of the unit macros are set
% up to simply print their literal interpretation: this is hopefully