diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-04 22:21:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-04 22:21:00 +0000 |
commit | 1bde92bd528b3ba41950517fa33b93fa3005f691 (patch) | |
tree | 1f4c3b88feaaca04adfa4a34f6479304f8d42218 /Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx | |
parent | 41cf6f44720974b28006a7b9fe8692961ab59503 (diff) |
siunitx (4feb22)
git-svn-id: svn://tug.org/texlive/trunk@61879 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx index 8f1e4bb4677..10a316da897 100644 --- a/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx +++ b/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% File: siunitx-print.dtx Copyright (C) 2016-2019,2021 Joseph Wright +% File: siunitx-print.dtx Copyright (C) 2016-2019,2021,2022 Joseph Wright % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -791,6 +791,7 @@ % % \begin{macro}{\siunitx_print_text:n} % \begin{macro}{\@@_text_replace:n, \@@_text_replace_aux:n} +% \begin{macro}[EXP]{\@@_text_replace_first:N} % \begin{macro}{\@@_text_replace:N} % \begin{macro}{\@@_text_replace:NNn} % \begin{macro}{\@@_text_replace:Nnnn} @@ -844,28 +845,31 @@ \tl_if_empty:NF \l_siunitx_unit_font_tl { \exp_after:wN \cs_set_eq:NN \l_siunitx_unit_font_tl \use:n } \cs_set:Npn \mathord ##1 - { - \str_case:nnF {##1} - { - { \cdot } { \exp_not:N \textperiodcentered } - { \pm } { \exp_not:N \textpm } - { \times } { \exp_not:N \texttimes } - } - {##1} - } + { \@@_text_replace_first:N ##1 } \cs_set:Npn \pm { \: \exp_not:N \textpm \: } \tl_map_inline:nn { \mp \ge \le \gg \ll } { \cs_set:Npn ##1 { \exp_not:N \ensuremath { \exp_not:N ##1 } } } \cs_set:Npn \cdot { \: \exp_not:N \textperiodcentered \: } \cs_set:Npn \times { \: \exp_not:N \texttimes \: } - \protected@edef \l_@@_tmp_tl { \l_@@_tmp_tl } + \protected@edef \l_@@_tmp_tl + { \exp_after:wN \@@_text_replace_first:N \l_@@_tmp_tl } \@@_text_replace:N \l_@@_tmp_tl \@@_text_replace_aux:n { \tl_use:N \l_@@_tmp_tl } } \group_end: } \cs_new_protected:Npn \@@_text_replace_aux:n #1 {#1} +\cs_new:Npn \@@_text_replace_first:N #1 + { + \str_case:nnF {#1} + { + { \cdot } { \exp_not:N \textperiodcentered } + { \pm } { \exp_not:N \textpm } + { \times } { \exp_not:N \texttimes } + } + {#1} + } \cs_new_protected:Npx \@@_text_replace:N #1 { \exp_not:N \@@_text_replace:NNn #1 @@ -1022,6 +1026,7 @@ % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \subsection{Standard settings for module options} % |