summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-15 14:41:46 +0000
committerKarl Berry <karl@freefriends.org>2012-07-15 14:41:46 +0000
commit64217311a59127ef6612975f38d5e3df9110eaef (patch)
tree27698d14c02641c5ab9d4edab98a090efa23a7f7
parenta88eee4f63bd9cb82a7e71070f20fef1bc3d3bce (diff)
siunitx 2.5d (11jun12)
git-svn-id: svn://tug.org/texlive/trunk@27065 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/siunitx/siunitx.pdfbin576529 -> 578043 bytes
-rw-r--r--Master/texmf-dist/source/latex/siunitx/siunitx.dtx175
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg2
-rw-r--r--Master/texmf-dist/tex/latex/siunitx/siunitx.sty95
6 files changed, 173 insertions, 103 deletions
diff --git a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
index eb5e1184e40..26d5e25ead8 100644
--- a/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
+++ b/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
index 97dfb15c5a8..edb45e96427 100644
--- a/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
+++ b/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
@@ -585,6 +585,10 @@ This work consists of the file siunitx.dtx
%\changes{v2.5c}{2012/04/03}{Allow conversion of numbers with more than
% nine digits when using fixed exponents}
%\changes{v2.5c}{2012/05/03}{Detect entirely empty cells in \texttt{s} columns}
+%\changes{v2.5d}{2012/06/11}{Extend range of settings automatically altered
+% to use UTF-8 values is appropriate}
+%\changes{v2.5e}{2012/06/13}{Fix an internal error in unit expansion,
+% introduced in v2.4f}
%
%\begin{abstract}
% Physical quantities have both numbers and units, and each physical
@@ -2959,11 +2963,15 @@ This work consists of the file siunitx.dtx
%\DescribeOption{qualifier-mode}
%\changes{v2.1c}{2010/11/13}{New \opt{text} choice for
% \opt{qualifier-mode} option}
+% \changes{v2.5d}{2012/06/11}{New \opt{phrase} choice for \opt{qualifier-mode}
+% option}
+% \DescribeOption{qualifier-phrase}
+% \changes{v2.5d}{2012/06/11}{New \opt{qualifier-phrase} option}
% Unit qualifiers can be printed in three different formats, set by the
% \opt{qualifier-mode} option. The standard setting is \opt{subscript},
-% while the options \opt{brackets}, \opt{space} and \opt{text} are also
-% possible. With the last settings, powers can lead to ambiguity and are
-% automatically detected and brackets added as appropriate.
+% while the options \opt{brackets}, \opt{phrase}, \opt{space} and \opt{text}
+% are also possible. With the last settings, powers can lead to ambiguity and
+% are automatically detected and brackets added as appropriate.
%\begin{LaTeXdemo}
% \si{\kilogram\polymer\squared\per\mole\catalyst\per\hour} \\
% \si[qualifier-mode = brackets]
@@ -2975,6 +2983,14 @@ This work consists of the file siunitx.dtx
% \si[qualifier-mode = text]
% {\deci\bel\isotropic}
%\end{LaTeXdemo}
+% The \opt{phrase} setting for \opt{qualifier-mode} uses the text stored using
+% \opt{qualifier-phrase} to separate the qualifier.
+%\begin{LaTeXdemo}
+% \si[qualifier-mode = phrase]
+% {\kilogram\polymer\squared\per\mole\catalyst\per\hour} \\
+% \si[qualifier-mode = phrase, qualifier-phrase = { by }]
+% {\kilogram\polymer\squared\per\mole\catalyst\per\hour} \\
+%\end{LaTeXdemo}
%
%\DescribeOption{prefixes-as-symbols}
% The unit prefixes (\cs{kilo}, \emph{etc}.) are normally given as
@@ -3838,7 +3854,7 @@ This work consists of the file siunitx.dtx
% the definitions are variations using \cs{text} or \cs{ensuremath} to
% produce the correct output, as the symbols available in the document
% may vary considerably. In the case of the micro symbol
-% (\SIUnitSymbolMicro), \pkg{sunitx} provides a suitable low-level
+% (\SIUnitSymbolMicro), \pkg{siunitx} provides a suitable low-level
% definition for the symbol. Depending on the fonts available, this
% may need to be replaced by an alternative by the user. The
% ohm symbol (\SIUnitSymbolOhm) is usually set to \cs{Omega}, but
@@ -5078,7 +5094,7 @@ This work consists of the file siunitx.dtx
%
% The usual preliminaries.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2012/05/03} {2.5c}
+\ProvidesExplPackage {siunitx} {2012/06/13} {2.5e}
{A comprehensive (SI) units package}
% \end{macrocode}
%
@@ -11446,49 +11462,32 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%\end{macro}
%
-% \begin{macro}{\siunitx_unit_if_literal:nTF}
-% \begin{macro}[aux]
-% {
-% \siunitx_unit_if_literal_aux:n,
-% \siunitx_unit_if_literal_aux_std:n,
-% \siunitx_unit_if_literal_aux_skip:n
-% }
-% A test to see if there is anything in the input which is not know to
-% the package. As the full list of names is rather long and there is no
-% need to worry about nesting here, the best approach is to look for all
-% of the implemetation functions. The only issue with that is dealing with
-% the non-standard names, which are sorted out using a set up to gobble
-% their argument.
-% \begin{macrocode}
-\cs_new_protected:Npn \siunitx_unit_if_literal:nTF #1
- {
- \bool_set_false:N \l_siunitx_tmp_bool
- \tl_map_function:nN {#1} \siunitx_unit_if_literal_aux:n
- \bool_if:NTF \l_siunitx_tmp_bool
- }
-\cs_new_protected:Npn \siunitx_unit_if_literal_aux_std:n #1
- {
- \cs_if_exist:cF { siunitx_ \tl_to_str:o { \token_to_str:N #1 } _function:w }
- {
- \bool_set_true:N \l_siunitx_tmp_bool
- \tl_map_break:
- }
- \tl_if_in:nnT { \of \highlight \raiseto \tothe } {#1}
- {
- \cs_set_eq:NN \siunitx_unit_if_literal_aux:n
- \siunitx_unit_if_literal_aux_skip:n
- }
- }
-\cs_new_protected:Npn \siunitx_unit_if_literal_aux_skip:n #1
- {
- \cs_set_eq:NN \siunitx_unit_if_literal_aux:n
- \siunitx_unit_if_literal_aux_std:n
- }
-\cs_new_eq:NN \siunitx_unit_if_literal_aux:n \siunitx_unit_if_literal_aux_std:n
-\cs_generate_variant:Nn \tl_to_str:n { o }
+%\begin{macro}{\siunitx_unit_if_literal:nTF}
+%\begin{macro}[aux]{\siunitx_unit_if_literal_aux:N}
+% A test is needed to see if the input only contains unit macros. This
+% is done by altering setting all of the unit macros to expand to
+% nothing at all. Thus there will only be anything left if there is
+% a literal in the unit.
+% \begin{macrocode}
+\cs_new_protected:Npn \siunitx_unit_if_literal:nTF #1#2#3 {
+ \group_begin:
+ \seq_map_function:NN \l_siunitx_declare_list_seq
+ \siunitx_unit_if_literal_aux:N
+ \cs_set_eq:NN \of \use_none:n
+ \cs_set_eq:NN \highlight \use_none:n
+ \cs_set_eq:NN \raiseto \use_none:n
+ \cs_set_eq:NN \tothe \use_none:n
+ \protected@edef \l_siunitx_tmpa_tl {#1}
+ \exp_args:NNNV \group_end:
+ \tl_set:Nn \l_siunitx_tmpa_tl \l_siunitx_tmpa_tl
+ \tl_if_empty:NTF \l_siunitx_tmpa_tl {#3} {#2}
+}
+\cs_new_protected:Npn \siunitx_unit_if_literal_aux:N #1 {
+ \cs_set_eq:NN #1 \prg_do_nothing:
+}
% \end{macrocode}
-% \end{macro}
-% \end{macro}
+%\end{macro}
+%\end{macro}
%
%\subsection{Parsing macro units}
%
@@ -11805,7 +11804,8 @@ This work consists of the file siunitx.dtx
% \l_siunitx_unit_denominator_bracket_bool ,
% \l_siunitx_unit_product_tl ,
% \l_siunitx_literal_power_bool ,
-% \l_siunitx_per_symbol_tl
+% \l_siunitx_per_symbol_tl ,
+% \l_siunitx_qualifier_phrase_tl
%}
% At this stage, output formatting options are created.
% \begin{macrocode}
@@ -11871,12 +11871,15 @@ This work consists of the file siunitx.dtx
qualifier-mode .choice:,
qualifier-mode / brackets .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { brackets } },
+ qualifier-mode / phrase .code:n =
+ { \tl_set:Nn \l_siunitx_qualifier_mode_tl { phrase } },
qualifier-mode / space .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { space } },
qualifier-mode / subscript .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { subscript } },
qualifier-mode / text .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { text } },
+ qualifier-phrase .tl_set:N = \l_siunitx_qualifier_phrase_tl
}
\keys_set:nn { siunitx } {
bracket-unit-denominator = true,
@@ -11885,7 +11888,8 @@ This work consists of the file siunitx.dtx
per-mode = reciprocal,
per-symbol = /,
power-font = number,
- qualifier-mode = subscript
+ qualifier-mode = subscript,
+ qualifier-phrase = { ~ of ~ }
}
% \end{macrocode}
%\end{macro}
@@ -12413,6 +12417,7 @@ This work consists of the file siunitx.dtx
%\begin{macro}{\siunitx_unit_format_qualifier:}
%\begin{macro}[aux]{
% \siunitx_unit_format_qualifier_brackets: ,
+% \siunitx_unit_format_qualifier_phrase: ,
% \siunitx_unit_format_qualifier_space: ,
% \siunitx_unit_format_qualifier_subscript: ,
% \siunitx_unit_format_qualifier_text:
@@ -12439,6 +12444,14 @@ This work consists of the file siunitx.dtx
\tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_tmpa_tl
\tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_bracket_close_tl
}
+\cs_new_protected_nopar:Npn \siunitx_unit_format_qualifier_phrase:
+ {
+ \tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_qualifier_phrase_tl
+ \tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_tmpa_tl
+ \tl_set:Nx \l_siunitx_tmpa_tl
+ { bracket- \int_use:N \l_siunitx_unit_int }
+ \prop_put:NVn \l_siunitx_unit_prop \l_siunitx_tmpa_tl { true }
+ }
\char_set_catcode_active:N \~
\cs_new_protected:Npn \siunitx_unit_format_qualifier_space: {
\tl_put_right:Nn \l_siunitx_unit_current_tl { \text { ~ } }
@@ -15213,14 +15226,19 @@ This work consists of the file siunitx.dtx
%
% \begin{variable}
% {
-% \c_siunitx_degree_int,
-% \c_siunitx_micro_int,
-% \c_siunitx_angstrom_int,
-% \c_siunitx_celsius_int,
-% \c_siunitx_ohm_int
+% \c_siunitx_degree_int ,
+% \c_siunitx_micro_int ,
+% \c_siunitx_angstrom_int ,
+% \c_siunitx_ohm_int ,
+% \c_siunitx_arcminute_int,
+% \c_siunitx_arcsecond_int
% }
% For UTF-8 engines, it may be possible to use better symbols than those set
-% up as standard.
+% up as standard. Unicode normalises both the ohm and {\aa}ngstr{\"{o}}m
+% symbols to the appropriate letters, so these are used directly. On the
+% other hand, micro is distinct from mu, so the proper symbol is selected.
+% The single degree Celsius symbol is a compatibility character, and so
+% the two separate glyphs \enquote{degree} and \enquote{C} are used.
% \begin{macrocode}
\pdftex_if_engine:F
{
@@ -15228,17 +15246,19 @@ This work consists of the file siunitx.dtx
{
\@ifpackageloaded { fontspec }
{
- \int_const:Nn \c_siunitx_degree_int { 176 }
- \int_const:Nn \c_siunitx_micro_int { 181 }
- \int_const:Nn \c_siunitx_angstrom_int { 197 }
- \int_const:Nn \c_siunitx_celsius_int { 8451 }
- \int_const:Nn \c_siunitx_ohm_int { 8486 }
+ \int_const:Nn \c_siunitx_degree_int { 176 }
+ \int_const:Nn \c_siunitx_micro_int { 181 }
+ \int_const:Nn \c_siunitx_angstrom_int { 197 }
+ \int_const:Nn \c_siunitx_ohm_int { 937 }
\siunitx_option_unchanged:Nnn \l_siunitx_angstrom_math_tl
{ \text { \AA } }
{ \tex_char:D \c_siunitx_angstrom_int }
\siunitx_option_unchanged:Nnn \l_siunitx_celsius_math_tl
{ { } ^ { \circ } \kern - \scriptspace \text { C } }
- { \tex_char:D \c_siunitx_celsius_int }
+ {
+ \tex_char:D \c_siunitx_degree_int
+ C
+ }
\siunitx_option_unchanged:Nnn \l_siunitx_degree_math_tl
{ { } ^ { \circ } }
{ \tex_char:D \c_siunitx_degree_int }
@@ -15256,7 +15276,10 @@ This work consists of the file siunitx.dtx
\ensuremath
{ { } ^ { \circ } \kern - \scriptspace \text { C } }
}
- { \tex_char:D \c_siunitx_celsius_int }
+ {
+ \tex_char:D \c_siunitx_degree_int
+ C
+ }
\siunitx_option_unchanged:Nnn \l_siunitx_degree_text_tl
{ \ensuremath { { } ^ { \circ } } }
{ \tex_char:D \c_siunitx_degree_int }
@@ -15268,6 +15291,28 @@ This work consists of the file siunitx.dtx
{ \tex_char:D \c_siunitx_ohm_int }
}
{ }
+% \end{macrocode}
+% Slightly more specialised: these only work in math mode with
+% \pkg{unicode-math}.
+% \begin{macrocode}
+ \@ifpackageloaded { unicode-math }
+ {
+ \int_const:Nn \c_siunitx_arcminute_int { 8242 }
+ \int_const:Nn \c_siunitx_arcsecond_int { 8243 }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcminute_math_tl
+ { { } ^ { \prime } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcminute_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcsecond_math_tl
+ { { } ^ { \prime \prime } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcsecond_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcminute_text_tl
+ { \ensuremath { { } ^ { \prime } } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcminute_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcsecond_text_tl
+ { \ensuremath { { } ^ { \prime \prime } } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcsecond_int } }
+ }
+ { }
}
}
% \end{macrocode}
@@ -16420,7 +16465,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-version-1.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/06/13} {2.5e}
{siunitx: Version 1 settings}
% \end{macrocode}
%
@@ -17365,7 +17410,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/06/13} {2.5e}
{siunitx: Abbreviated units}
% \end{macrocode}
%
@@ -17547,7 +17592,7 @@ This work consists of the file siunitx.dtx
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesExplFile {siunitx-binary.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/06/13} {2.5e}
{siunitx: Binary units}
% \end{macrocode}
%
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
index 11d17a80cc8..b4e87ff14b8 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-abbreviations.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-abbreviations.cfg} {2012/06/13} {2.5e}
{siunitx: Abbreviated units}
\DeclareSIUnit \A { \ampere }
\DeclareSIUnit \pA { \pico \ampere }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
index ebca64c0c6e..ea100300477 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-binary.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-binary.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-binary.cfg} {2012/06/13} {2.5e}
{siunitx: Binary units}
\DeclareBinaryPrefix \kibi { Ki } { 10 }
\DeclareBinaryPrefix \mebi { Mi } { 20 }
diff --git a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
index 820967ab99c..a477aaebe02 100644
--- a/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
+++ b/Master/texmf-dist/tex/latex/siunitx/config/siunitx-version-1.cfg
@@ -13,7 +13,7 @@
%% See http://www.latex-project.org/lppl.txt
%% ---------------------------------------------------------------
%%
-\ProvidesExplFile {siunitx-version-1.cfg} {2012/05/03} {2.5c}
+\ProvidesExplFile {siunitx-version-1.cfg} {2012/06/13} {2.5e}
{siunitx: Version 1 settings}
\keys_define:nn { siunitx } {
addsign .choice: ,
diff --git a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
index e729c455ff9..993b5fd345a 100644
--- a/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
+++ b/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
@@ -14,7 +14,7 @@
%% ---------------------------------------------------------------
%%
\RequirePackage{expl3}
-\ProvidesExplPackage {siunitx} {2012/05/03} {2.5c}
+\ProvidesExplPackage {siunitx} {2012/06/13} {2.5e}
{A comprehensive (SI) units package}
\@ifpackagelater { expl3 } { 2011/09/05 }
{ }
@@ -4343,32 +4343,22 @@
}
\cs_generate_variant:Nn \siunitx_unit_in:nn { V }
\cs_new:Npn \siunitx_pm: { }
-\cs_new_protected:Npn \siunitx_unit_if_literal:nTF #1
- {
- \bool_set_false:N \l_siunitx_tmp_bool
- \tl_map_function:nN {#1} \siunitx_unit_if_literal_aux:n
- \bool_if:NTF \l_siunitx_tmp_bool
- }
-\cs_new_protected:Npn \siunitx_unit_if_literal_aux_std:n #1
- {
- \cs_if_exist:cF { siunitx_ \tl_to_str:o { \token_to_str:N #1 } _function:w }
- {
- \bool_set_true:N \l_siunitx_tmp_bool
- \tl_map_break:
- }
- \tl_if_in:nnT { \of \highlight \raiseto \tothe } {#1}
- {
- \cs_set_eq:NN \siunitx_unit_if_literal_aux:n
- \siunitx_unit_if_literal_aux_skip:n
- }
- }
-\cs_new_protected:Npn \siunitx_unit_if_literal_aux_skip:n #1
- {
- \cs_set_eq:NN \siunitx_unit_if_literal_aux:n
- \siunitx_unit_if_literal_aux_std:n
- }
-\cs_new_eq:NN \siunitx_unit_if_literal_aux:n \siunitx_unit_if_literal_aux_std:n
-\cs_generate_variant:Nn \tl_to_str:n { o }
+\cs_new_protected:Npn \siunitx_unit_if_literal:nTF #1#2#3 {
+ \group_begin:
+ \seq_map_function:NN \l_siunitx_declare_list_seq
+ \siunitx_unit_if_literal_aux:N
+ \cs_set_eq:NN \of \use_none:n
+ \cs_set_eq:NN \highlight \use_none:n
+ \cs_set_eq:NN \raiseto \use_none:n
+ \cs_set_eq:NN \tothe \use_none:n
+ \protected@edef \l_siunitx_tmpa_tl {#1}
+ \exp_args:NNNV \group_end:
+ \tl_set:Nn \l_siunitx_tmpa_tl \l_siunitx_tmpa_tl
+ \tl_if_empty:NTF \l_siunitx_tmpa_tl {#3} {#2}
+}
+\cs_new_protected:Npn \siunitx_unit_if_literal_aux:N #1 {
+ \cs_set_eq:NN #1 \prg_do_nothing:
+}
\int_new:N \l_siunitx_unit_int
\prop_new:N \l_siunitx_unit_prop
\prop_new:N \l_siunitx_unit_saved_prop
@@ -4568,12 +4558,15 @@
qualifier-mode .choice:,
qualifier-mode / brackets .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { brackets } },
+ qualifier-mode / phrase .code:n =
+ { \tl_set:Nn \l_siunitx_qualifier_mode_tl { phrase } },
qualifier-mode / space .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { space } },
qualifier-mode / subscript .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { subscript } },
qualifier-mode / text .code:n =
{ \tl_set:Nn \l_siunitx_qualifier_mode_tl { text } },
+ qualifier-phrase .tl_set:N = \l_siunitx_qualifier_phrase_tl
}
\keys_set:nn { siunitx } {
bracket-unit-denominator = true,
@@ -4582,7 +4575,8 @@
per-mode = reciprocal,
per-symbol = /,
power-font = number,
- qualifier-mode = subscript
+ qualifier-mode = subscript,
+ qualifier-phrase = { ~ of ~ }
}
\cs_new_protected:Npn \siunitx_unit_format: {
\siunitx_unit_format_init:
@@ -4994,6 +4988,14 @@
\tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_tmpa_tl
\tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_bracket_close_tl
}
+\cs_new_protected_nopar:Npn \siunitx_unit_format_qualifier_phrase:
+ {
+ \tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_qualifier_phrase_tl
+ \tl_put_right:NV \l_siunitx_unit_current_tl \l_siunitx_tmpa_tl
+ \tl_set:Nx \l_siunitx_tmpa_tl
+ { bracket- \int_use:N \l_siunitx_unit_int }
+ \prop_put:NVn \l_siunitx_unit_prop \l_siunitx_tmpa_tl { true }
+ }
\char_set_catcode_active:N \~
\cs_new_protected:Npn \siunitx_unit_format_qualifier_space: {
\tl_put_right:Nn \l_siunitx_unit_current_tl { \text { ~ } }
@@ -6787,17 +6789,19 @@
{
\@ifpackageloaded { fontspec }
{
- \int_const:Nn \c_siunitx_degree_int { 176 }
- \int_const:Nn \c_siunitx_micro_int { 181 }
- \int_const:Nn \c_siunitx_angstrom_int { 197 }
- \int_const:Nn \c_siunitx_celsius_int { 8451 }
- \int_const:Nn \c_siunitx_ohm_int { 8486 }
+ \int_const:Nn \c_siunitx_degree_int { 176 }
+ \int_const:Nn \c_siunitx_micro_int { 181 }
+ \int_const:Nn \c_siunitx_angstrom_int { 197 }
+ \int_const:Nn \c_siunitx_ohm_int { 937 }
\siunitx_option_unchanged:Nnn \l_siunitx_angstrom_math_tl
{ \text { \AA } }
{ \tex_char:D \c_siunitx_angstrom_int }
\siunitx_option_unchanged:Nnn \l_siunitx_celsius_math_tl
{ { } ^ { \circ } \kern - \scriptspace \text { C } }
- { \tex_char:D \c_siunitx_celsius_int }
+ {
+ \tex_char:D \c_siunitx_degree_int
+ C
+ }
\siunitx_option_unchanged:Nnn \l_siunitx_degree_math_tl
{ { } ^ { \circ } }
{ \tex_char:D \c_siunitx_degree_int }
@@ -6815,7 +6819,10 @@
\ensuremath
{ { } ^ { \circ } \kern - \scriptspace \text { C } }
}
- { \tex_char:D \c_siunitx_celsius_int }
+ {
+ \tex_char:D \c_siunitx_degree_int
+ C
+ }
\siunitx_option_unchanged:Nnn \l_siunitx_degree_text_tl
{ \ensuremath { { } ^ { \circ } } }
{ \tex_char:D \c_siunitx_degree_int }
@@ -6827,6 +6834,24 @@
{ \tex_char:D \c_siunitx_ohm_int }
}
{ }
+ \@ifpackageloaded { unicode-math }
+ {
+ \int_const:Nn \c_siunitx_arcminute_int { 8242 }
+ \int_const:Nn \c_siunitx_arcsecond_int { 8243 }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcminute_math_tl
+ { { } ^ { \prime } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcminute_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcsecond_math_tl
+ { { } ^ { \prime \prime } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcsecond_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcminute_text_tl
+ { \ensuremath { { } ^ { \prime } } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcminute_int } }
+ \siunitx_option_unchanged:Nnn \l_siunitx_arcsecond_text_tl
+ { \ensuremath { { } ^ { \prime \prime } } }
+ { \ensuremath { \tex_char:D \c_siunitx_arcsecond_int } }
+ }
+ { }
}
}
\clist_new:N \l_siunitx_pgf_link_clist