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.dtx48
1 files changed, 19 insertions, 29 deletions
diff --git a/macros/latex/contrib/siunitx/siunitx-symbol.dtx b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
index c86d77e9f1..a0c9368b21 100644
--- a/macros/latex/contrib/siunitx/siunitx-symbol.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-symbol.dtx
@@ -117,8 +117,7 @@
\@@_deal_with_utf:
\exp_after:wN \exp_after:wN \exp_after:wN
\exp_not:N \char_generate:nn {#1} { 13 }
- \exp_after:wN \exp_after:wN \exp_after:wN
- \exp_not:N \char_generate:nn {#2} { 13 }
+ \char_generate:nn {#2} { 12 }
}
}
\cs_new:Npn \@@_deal_with_utf: { }
@@ -165,34 +164,29 @@
\@@_if_replace:NnT \arcminute { "02B9 }
{
\siunitx_declare_unit:Nn \arcminute
- { \exp_not:N \ensuremath { { } ' } }
+ { \ensuremath { { } ' } }
}
\@@_if_replace:NnT \arcsecond { "02BA }
{
\siunitx_declare_unit:Nn \arcsecond
- { \exp_not:N \ensuremath { { } '' } }
+ { \ensuremath { { } '' } }
}
% \end{macrocode}
-% For |\degree|, direct input works in text mode so there is
-% only a need to tidy up for math mode. If \pkg{fontspec} is loaded then that
-% problem goes away, so nothing needs to be done.
+% For |\degree|, direct input works in text mode so there is only a need to
+% tidy up for math mode.
% \begin{macrocode}
\@@_if_replace:NnT \degree { "00B0 }
{
- \@ifpackageloaded { fontspec }
- { }
+ \siunitx_declare_unit:Nxn \degree
{
- \siunitx_declare_unit:Nxn \degree
+ \exp_not:N \text
{
- \exp_not:N \text
- {
- \@ifpackageloaded { inputenc }
- { \exp_not:N \textdegree }
- { \@@_non_latin:n { "00B0 } }
- }
+ \@ifpackageloaded { inputenc }
+ { \exp_not:N \textdegree }
+ { \@@_non_latin:n { "00B0 } }
}
- { quantity-product = { } }
- }
+ }
+ { quantity-product = { } }
}
% \end{macrocode}
% For |\degreeCelsius|, much the same to think about but the comparison
@@ -207,20 +201,16 @@
\str_if_eq:VVTF \l_@@_tmpa_tl \l_@@_tmpb_tl
{
\group_end:
- \@ifpackageloaded { fontspec }
- { }
+ \siunitx_declare_unit:Nx \degreeCelsius
{
- \siunitx_declare_unit:Nx \degreeCelsius
+ \exp_not:N \text
{
- \exp_not:N \text
- {
- \@ifpackageloaded { inputenc }
- { \exp_not:N \textdegree }
- { \@@_non_latin:n { "00B0 } }
- }
- C
+ \@ifpackageloaded { inputenc }
+ { \exp_not:N \textdegree }
+ { \@@_non_latin:n { "00B0 } }
}
- }
+ C
+ }
}
{ \group_end: }
% \end{macrocode}