summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/siunitx/siunitx-symbol.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/siunitx/siunitx-symbol.dtx')
-rw-r--r--macros/latex/contrib/siunitx/siunitx-symbol.dtx32
1 files changed, 29 insertions, 3 deletions
diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
index 6d67c5a29d..1307e2ee0b 100644
--- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
@@ -259,6 +259,8 @@
% same as |\textmu| support. It's hard to check for the product symbol, so
% we just go with it an hope for the best!
% \begin{macrocode}
+\keys_set:nn { siunitx }
+ { product-symbol = \ifmmode \times \else \texttimes \fi }
\AtBeginDocument
{
\group_begin:
@@ -273,12 +275,36 @@
\keys_set:nn { siunitx }
{
exponent-product =
- \ifmmode \times \else \texttimes \fi ,
- product-symbol =
\ifmmode \times \else \texttimes \fi
}
}
- { \group_end: }
+ {
+ \tl_set:Nn \l_@@_tmpb_tl { 2 \cdot 10 ^ { 1 } }
+ \tl_if_eq:NNTF \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {
+ \group_end:
+ \keys_set:nn { siunitx }
+ {
+ exponent-product =
+ \ifmmode \cdot \else \textperiodcentered \fi
+ }
+ }
+ { \group_end: }
+ }
+ \group_begin:
+ \tl_set:Nn \l_@@_tmpa_tl { \mathrm { m } \cdot \mathrm { s } }
+ \tl_set:Nn \l_siunitx_unit_font_tl { \mathrm }
+ \siunitx_unit_format:nN { m . s } \l_@@_tmpb_tl
+ \tl_if_eq:NNTF \l_@@_tmpa_tl \l_@@_tmpb_tl
+ {
+ \group_end:
+ \keys_set:nn { siunitx }
+ {
+ inter-unit-product =
+ \ifmmode \cdot \else \textperiodcentered \fi
+ }
+ }
+ { \group_end: }
}
% \end{macrocode}
%