diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty | 714 |
1 files changed, 299 insertions, 415 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty index edcbd9e259d..d4173520e3d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty @@ -18,7 +18,7 @@ \RequirePackage{xcolor}% for \convertcolorspec -\LWR@ProvidesPackagePass{siunitx-v2}[2021-04-17] +\LWR@ProvidesPackagePass{siunitx}[=v2]% 2021-04-17 \AtBeginDocument{% in case textcomp was not loaded \DeclareSIUnit\bohr{\textit{a}\textsubscript{0}} @@ -30,13 +30,35 @@ }% AtBeginDocument \AtBeginDocument{ -\HTMLnewcolumntype{S}{c} -\HTMLnewcolumntype{s}{c} +\HTMLnewcolumntype{S}[1][]{>{\begingroup\sisetup{#1}}c<{\endgroup}} +\HTMLnewcolumntype{s}[1][]{>{\begingroup\sisetup{#1}}c<{\endgroup}} } \ExplSyntaxOn -\cs_set_protected:Npn \__siunitx_print_aux: +\AtBeginDocument{ +\cs_set_protected:Npn \__siunitx_print_text: + { + \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp + \tl_replace_all:Nnn \l__siunitx_print_arg_tl { - } + { \textminus } + \__siunitx_print_text_aux: + \tl_replace_all:Nnn \l__siunitx_print_arg_tl { \mp } + { \ensuremath { \mp } } + \tl_remove_all:Nn \l__siunitx_print_arg_tl { \mathord } + \cs_set_eq:NN \PrintSubscript \__siunitx_print_text_sub:n + \cs_set_eq:NN \PrintSuperscript \__siunitx_print_text_super:n + \__siunitx_print_text_aux:NnN + _ { math_subscript } \__siunitx_print_text_sub:n + _ { active } \__siunitx_print_text_sub:n + ^ { math_superscript } \__siunitx_print_text_super:n + ^ { active } \__siunitx_print_text_super:n + \q_recursion_tail ? ? + \q_recursion_stop + \l__siunitx_print_arg_tl + } +} +\cs_new_protected:Npn \LWR@HTML@__siunitx_print_aux: { \text { @@ -65,13 +87,10 @@ } } } +\LWR@formatted{__siunitx_print_aux:} -\cs_set_protected:Npn \__siunitx_set_math_fam:n #1 { +\cs_new_protected:Npn \LWR@HTML@__siunitx_set_math_fam:n #1 { \group_begin: - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \hbox_set:Nn \l__siunitx_tmp_box - { \ensuremath { \use:c { math #1 } @@ -79,14 +98,12 @@ \int_const:cn { c__siunitx_math #1 _int } { \fam } } } - } \group_end: } +\LWR@formatted{__siunitx_set_math_fam:n} -\cs_set_protected:Npn \__siunitx_combined_output:n #1 { +\cs_new_protected:Npn \LWR@HTML@__siunitx_combined_output:n #1 { \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp \bool_if:NTF \l__siunitx_number_parse_bool { \tl_clear:N \l__siunitx_number_out_tl @@ -97,22 +114,26 @@ \__siunitx_unit_output_pre_print: \begingroup% lwarp \boolfalse{mathjax}% lwarp - \LWR@subsingledollar{% lwarp + \LWR@subsingledollar% lwarp + {% alt text \textbackslash( % space \LWR@HTMLsanitizedetokenized{% \detokenize{#1}% } \textbackslash)% lwarp - }{siunitx}{% - \__siunitx_print:nn { number } {% - \LWR@origensuredmath{#1}% - }% - }% lwarp + } + {siunitx}% addl hashing + {% + \__siunitx_print:nn { number } {% + \LWR@origensuredmath{#1}% + }% + }% lwarp \endgroup% lwarp \__siunitx_unit_output_print: } \group_end:% lwarp } -\cs_set_protected:Npn \__siunitx_range_numbers_aux:n #1 +\LWR@formatted{__siunitx_combined_output:n} +\cs_new_protected:Npn \LWR@HTML@__siunitx_range_numbers_aux:n #1 { \bool_if:NTF \l__siunitx_number_parse_bool { @@ -126,22 +147,26 @@ { \__siunitx_unit_output_pre_print: \begingroup% lwarp - \boolfalse{mathjax}% lwarp - \LWR@subsingledollar{% lwarp - \textbackslash( % space - \LWR@HTMLsanitizedetokenized{% - \detokenize{#1}% - } \textbackslash)% lwarp - }{siunitx}{% - \__siunitx_print:nn { number } {% - \LWR@origensuredmath{#1}% - } % lwarp - }% lwarp - \endgroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar% lwarp + {% alt text + \textbackslash( % space + \LWR@HTMLsanitizedetokenized{% + \detokenize{#1}% + } \textbackslash)% lwarp + }% + {siunitx}% addl hashing + {% + \__siunitx_print:nn { number } {% + \LWR@origensuredmath{#1}% + } % lwarp + }% lwarp + \endgroup% lwarp \__siunitx_unit_output_print: } } -\cs_set_protected:Npn \__siunitx_angle_print_direct_aux:nn #1#2 { +\LWR@formatted{__siunitx_range_numbers_aux:n} +\cs_new_protected:Npn \LWR@HTML@__siunitx_angle_print_direct_aux:nn #1#2 { \tl_if_empty:nF {#1} { \tl_set:Nn \l__siunitx_unit_tl {#2} @@ -152,7 +177,9 @@ \LWR@HTMLsanitizedetokenized{% \detokenize{#1}% } \textbackslash)% lwarp - }{siunitx}{% + }% + {siunitx}% + {% \__siunitx_print:nn { number } { \LWR@origensuredmath{#1}% }% lwarp @@ -161,7 +188,8 @@ \__siunitx_unit_output_print: } } -\cs_set_protected:Npn \__siunitx_number_output_quotient_fraction: { +\LWR@formatted{__siunitx_angle_print_direct_aux:nn} +\cs_new_protected:Npn \LWR@HTML@__siunitx_number_output_quotient_fraction: { \bool_set_true:N \l__siunitx_number_compound_bool \__siunitx_number_output_quotient_aux_i: \tl_set_eq:NN \l__siunitx_number_out_tl @@ -171,7 +199,8 @@ \l__siunitx_number_denominator_tl \__siunitx_number_output_single_aux: } -\cs_set_protected:Npn \__siunitx_unit_format_fraction_fraction: { +\LWR@formatted{__siunitx_number_output_quotient_fraction:} +\cs_new_protected:Npn \LWR@HTML@__siunitx_unit_format_fraction_fraction: { \__siunitx_unit_format_fraction_symbol_aux: \int_compare:nNnT { \l__siunitx_unit_denominator_int } > { 1 } { @@ -185,7 +214,8 @@ \tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_per_symbol_tl \tl_put_right:NV \l__siunitx_unit_tl \l__siunitx_unit_denominator_tl } -\cs_set_protected:Npn \__siunitx_angle_print_astronomy_aux: { +\LWR@formatted{__siunitx_unit_format_fraction_fraction:} +\cs_new_protected:Npn \LWR@HTML@__siunitx_angle_print_astronomy_aux: { \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer } \l__siunitx_tmpa_tl { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl } @@ -213,406 +243,260 @@ { \__siunitx_angle_print_astronomy_unit: } }% lateximage {% not a lateximage - \__siunitx_print:nV { unit } \l__siunitx_unit_tl \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } } + \__siunitx_print:nV { unit } \l__siunitx_unit_tl }% not a lateximage \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-decimal } \l__siunitx_tmpa_tl { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl } } -\cs_set_protected:Npn \__siunitx_textsuperscript:n #1 {\textsuperscript{#1}} -\RenewDocumentCommand \num { o m } { - \leavevmode - \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \bool_set_false:N \l__siunitx_font_set_bool - \IfNoValueF {#1} - { \keys_set:nn { siunitx } {#1} } - \__siunitx_number_output:n {#2} - \group_end:% lwarp +\LWR@formatted{__siunitx_angle_print_astronomy_aux:} +\cs_new_protected:Npn \LWR@HTML@__siunitx_textsuperscript:n #1 {\textsuperscript{#1}} +\LWR@formatted{__siunitx_textsuperscript:n} + +\cs_new_eq:NN \LWR@HTML@__siunitx_print_text_super:n \textsuperscript +\LWR@formatted{__siunitx_print_text_super:n} + +\cs_new_eq:NN \LWR@HTML@__siunitx_print_text_sub:n \textsubscript +\LWR@formatted{__siunitx_print_text_sub:n} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_number_format_final_exponent: { + \prop_get:NnN \l__siunitx_number_out_prop { exponent } + \l__siunitx_tmpa_tl + \tl_if_empty:NTF \l__siunitx_output_exponent_tl + { + \tl_set:Nx \l__siunitx_tmpa_tl + { ^ { \exp_not:V \l__siunitx_tmpa_tl } } + \tl_put_left:NV \l__siunitx_tmpa_tl \l__siunitx_exponent_base_tl + } + { + \tl_set:Nx \l__siunitx_tmpa_tl + { + \LWR@origensuredmath{% lwarp + \exp_not:V \l__siunitx_output_exponent_tl + }% lwarp + \exp_not:N \mathord + \exp_not:V \l__siunitx_tmpa_tl + } + } + \prop_put:NnV \l__siunitx_number_out_prop { exponent-result } + \l__siunitx_tmpa_tl } -\RenewDocumentCommand \numrange { o m m } { - \leavevmode - \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \bool_set_false:N \l__siunitx_font_set_bool - \IfNoValueF {#1} - { \keys_set:nn { siunitx } {#1} } - \__siunitx_range_numbers:nn {#2} {#3} - \group_end:% lwarp +\LWR@formatted{__siunitx_number_format_final_exponent:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_number_format_final_combined: { + \__siunitx_number_format_brackets:n { mantissa } + \prop_get:NnN \l__siunitx_number_out_prop { mantissa-result } + \l__siunitx_tmpa_tl + \tl_if_empty:NT \l__siunitx_output_exponent_tl + { + \tl_put_right:Nx \l__siunitx_tmpa_tl + { + \exp_not:N \LWR@origensuredmath% lwarp + { + \bool_if:NTF \l__siunitx_tight_bool + { { \exp_not:V \l__siunitx_exponent_product_tl } } + { { } \exp_not:V \l__siunitx_exponent_product_tl { } } + } + } + } + \prop_get:NnN \l__siunitx_number_out_prop { exponent-result } + \l__siunitx_tmpb_tl + \tl_put_right:NV \l__siunitx_tmpa_tl \l__siunitx_tmpb_tl + \prop_put:NnV \l__siunitx_number_out_prop { result } + \l__siunitx_tmpa_tl + \prop_put:Nnn \l__siunitx_number_out_prop + { result-bracket-exponent } { true } } -\RenewDocumentCommand \ang { o > { \SplitArgument { 2 } { ; } } m } { - \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \IfNoValueF {#1} - { \keys_set:nn { siunitx } {#1} } - \__siunitx_angle_output:nnn #2 - \group_end:% lwarp +\LWR@formatted{__siunitx_number_format_final_combined:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_number_output_parts_aux: { + \bool_if:NTF \l__siunitx_multi_repeat_bool + { + \prop_if_in:NnT \l__siunitx_number_out_prop { mantissa-result } + { + \__siunitx_number_output_parts_aux:n { mantissa } + \__siunitx_number_output_parts_aux:n { complex } + } + \prop_get:NnNT \l__siunitx_number_out_prop { exponent-result } + \l__siunitx_tmpa_tl + { + \prop_if_in:NnT \l__siunitx_number_out_prop { mantissa-result } + { + \tl_put_left:Nx \l__siunitx_tmpa_tl + { + \exp_not:N \LWR@origensuredmath + { + \bool_if:NTF \l__siunitx_tight_bool + { { \exp_not:V \l__siunitx_exponent_product_tl } } + { { } \exp_not:V \l__siunitx_exponent_product_tl { } } + } + } + \prop_put:NnV \l__siunitx_number_out_prop { exponent } + \l__siunitx_tmpa_tl + } + \__siunitx_number_output_parts_print:n { exponent } + } + } + { \__siunitx_number_output_single: } } -\RenewDocumentCommand \si { o m } { - \leavevmode - \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \bool_set_false:N \l__siunitx_font_set_bool - \IfNoValueTF {#1} - { \__siunitx_unit_output:nn {#2} { } } +\LWR@formatted{__siunitx_number_output_parts_aux:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_unit_output_print: { + \int_compare:nNnF { \l__siunitx_unit_prefix_int } = { 0 } + { + \tl_set:Nx \l__siunitx_tmpa_tl + { + \bool_if:NTF \l__siunitx_tight_bool + { + \exp_not:N \LWR@origensuredmath% lwarp + { { \exp_not:V \l__siunitx_exponent_product_tl } } + } + { + \exp_not:N \LWR@origensuredmath% lwarp + { { } \exp_not:V \l__siunitx_exponent_product_tl { } } + } + \int_use:N \l__siunitx_unit_prefix_base_int + ^ { \int_use:N \l__siunitx_unit_prefix_int } + } + \__siunitx_print:nV { number } \l__siunitx_tmpa_tl + } + \tl_if_empty:NF \l__siunitx_unit_tl + { + \__siunitx_unit_output_number_sep: + \__siunitx_print:nV { unit } \l__siunitx_unit_tl + } +} +\LWR@formatted{__siunitx_unit_output_print:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_range_exponent: + { + \bool_if:NT \l__siunitx_process_fixed_bool + { + \tl_set_eq:NN \l__siunitx_tmpa_tl \l__siunitx_exponent_product_tl + \bool_if:NT \l__siunitx_tight_bool + { + \tl_set:Nx \l__siunitx_tmpa_tl + { \exp_not:N \mathord \exp_not:o \l__siunitx_tmpa_tl } + } + \tl_set:Nx \l__siunitx_tmpa_tl + { + \exp_not:N \LWR@origensuredmath {% lwarp + { } \exp_not:o \l__siunitx_tmpa_tl { } + } + 10 \exp_not:N \PrintSuperscript + { \int_use:N \l__siunitx_process_fixed_int } + } + \__siunitx_print:nV { number } \l__siunitx_tmpa_tl + } + } +\LWR@formatted{__siunitx_range_exponent:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_table_print_S_reserved_exponent_product: + { + \tl_set_eq:NN \l__siunitx_tmpb_tl \l__siunitx_exponent_product_tl + \bool_if:NT \l__siunitx_tight_bool { - \keys_set:nn { siunitx } {#1} - \__siunitx_unit_output:nn {#2} {#1} + \tl_set:Nx \l__siunitx_tmpb_tl + { \exp_not:N \mathord \exp_not:o \l__siunitx_tmpb_tl } } - \group_end:% lwarp + \tl_set:Nx \l__siunitx_tmpa_tl + { + \exp_not:N \LWR@origensuredmath { { } \exp_not:o \l__siunitx_tmpb_tl { } } + \exp_not:o \l__siunitx_tmpa_tl + } + } +\LWR@formatted{__siunitx_table_print_S_reserved_exponent_product:} + +\cs_new_protected:Npn \LWR@HTML@__siunitx_number_output_product_aux: { + \bool_set_true:N \l__siunitx_number_compound_bool + \__siunitx_number_preprocess:V \l__siunitx_number_arg_tl + \bool_if:NF \l__siunitx_error_bool + { + \tl_if_empty:NTF \l__siunitx_number_multi_tl + { \__siunitx_number_output_parse_aux: } + { \__siunitx_number_output_quotient: } + \tl_if_empty:NF \l__siunitx_number_next_tl + { + \bool_if:NTF \l__siunitx_tight_bool + { + \__siunitx_print:nn { number } + { \LWR@origensuredmath { \l__siunitx_output_product_tl } } + } + { + \__siunitx_print:nn { number } + { \LWR@origensuredmath { { } \l__siunitx_output_product_tl { } } } + } + \__siunitx_number_output_parse:V \l__siunitx_number_next_tl + } + } } -\RenewDocumentCommand{\SIrange}{o m m m} -{% - \leavevmode - \group_begin:% lwarp - \LetLtxMacro\@ensuredmath\LWR@origensuredmath% lwarp - \LetLtxMacro\mbox\LWR@print@mbox% lwarp - \bool_set_false:N \l__siunitx_font_set_bool - \IfNoValueTF {#1} - { \__siunitx_range_unit:nnnn {#4} { } {#2} {#3} } +\LWR@formatted{__siunitx_number_output_product_aux:} + +\cs_set_protected:Npn \__siunitx_set_math_fam:n #1 { + \group_begin: + \hbox_set:Nn \l__siunitx_tmp_box { - \keys_set:nn { siunitx } {#1} - \__siunitx_range_unit:nnnn {#4} {#1} {#2} {#3} + \LWR@origensuredmath% lwarp + { + \use:c { math #1 } + { + \int_const:cn { c__siunitx_math #1 _int } { \fam } + } + } } - \group_end:% lwarp + \group_end: } + +\cs_set_protected:Npn \__siunitx_range_numbers:nn #1#2 + { + \__siunitx_range_numbers_aux:n {#1} + \text{\l__siunitx_range_phrase_tl}% lwarp + \__siunitx_range_numbers_aux:n {#2} + } + +\cs_set_protected:Npn \__siunitx_range_unit:nnnn #1#2#3#4 { + \__siunitx_unit_parse_options:nn {#1} {#2} + \bool_if:NTF \l__siunitx_range_repeat_bool + { + \__siunitx_unit_in:nn {#1} {#2} + \__siunitx_range_numbers_aux:n {#3} + \text{\l__siunitx_range_phrase_tl}% lwarp + \__siunitx_range_numbers_aux:n {#4} + } + { + \bool_if:NT \l__siunitx_process_fixed_bool + { \bool_set_true:N \l__siunitx_process_drop_exponent_bool } + \bool_if:NT \l__siunitx_range_brackets_bool + { \__siunitx_print:nV { number } \l__siunitx_bracket_open_tl } + \__siunitx_range_numbers:nn {#3} {#4} + \bool_if:NT \l__siunitx_range_brackets_bool + { \__siunitx_print:nV { number } \l__siunitx_bracket_close_tl } + \__siunitx_range_exponent: + \__siunitx_unit_output_number_sep: + \__siunitx_unit_output:nn {#1} {#2} + } +} + \ExplSyntaxOff -\begin{warpMathJax} -\LWR@infoprocessingmathjax{siunitx} -\CustomizeMathJax{\newcommand{\tothe}[1]{^{#1}}} -\CustomizeMathJax{\newcommand{\raiseto}[2]{{#2}^{#1}}} -\CustomizeMathJax{\newcommand{\LWRsiunitxEND}{}} -\CustomizeMathJax{\def\LWRsiunitxang#1;#2;#3;#4\LWRsiunitxEND{% - \ifblank{#1}{}{\num{#1}\degree}% - \ifblank{#2}{}{\num{#2}^{\unicode{x2032}}}% \prime - \ifblank{#3}{}{\num{#3}^{\unicode{x2033}}}% \dblprime -}} -\CustomizeMathJax{\newcommand{\ang}[2][]{\LWRsiunitxang#2;;;\LWRsiunitxEND}} -\ExplSyntaxOn \AtBeginDocument{ -\ifdefstring{\l__siunitx_output_decimal_tl}{{,}} - {\CustomizeMathJax{\def\LWRsiunitxdecimal{,}}} - {\CustomizeMathJax{\def\LWRsiunitxdecimal{.}}} +\sisetup{ + detect-mode=true, + per-mode=symbol, % fraction is not seen by pdftotext + text-celsius = {\LWR@siunitx@textcelsius}, + text-degree = {\LWR@siunitx@textdegree}, + text-arcminute = {\LWR@siunitx@textprime} , + text-arcsecond = {\LWR@siunitx@textdblprime} , +} } -\ExplSyntaxOff -\CustomizeMathJax{\newcommand{\LWRsiunitxENDTWO}{}} -\CustomizeMathJax{\def\LWRsiunitxprintdecimalsubtwo#1,#2,#3\LWRsiunitxENDTWO{% - \ifblank{#1}{0}{\mathrm{#1}}% - \ifblank{#2}% - {}% - {% - {\LWRsiunitxdecimal}% - \mathrm{#2}% - }% -}} -\CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{% - \LWRsiunitxprintdecimalsubtwo#1,,\LWRsiunitxENDTWO% - \ifblank{#2}% - {}% - {% - {\LWRsiunitxdecimal}% - \LWRsiunitxprintdecimalsubtwo#2,,\LWRsiunitxENDTWO% - }% -}} +\LWR@origRequirePackage{lwarp-common-mathjax-siunitx} -\CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{% - \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND% -}} -\CustomizeMathJax{\def\LWRsiunitxnumplus#1+#2+#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxprintdecimal{#1}}% no plus - {% - \ifblank{#1}% - {\LWRsiunitxprintdecimal{#2}}% leading plus, ignore - {% a+b - \LWRsiunitxprintdecimal{#1}% - \unicode{x02B}% plus sign - \LWRsiunitxprintdecimal{#2}% - }% - }% -}} -\CustomizeMathJax{\def\LWRsiunitxnumminus#1-#2-#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumplus#1+++\LWRsiunitxEND}% - {% - \ifblank{#1}{}{\LWRsiunitxprintdecimal{#1}}% - \unicode{x02212}% mathematical minus sign - \LWRsiunitxprintdecimal{#2}% - }% -}} -\CustomizeMathJax{\def\LWRsiunitxnumpm#1+-#2+-#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumminus#1---\LWRsiunitxEND}% - {% - \LWRsiunitxprintdecimal{#1}% - \unicode{x0B1}% \pm - \LWRsiunitxprintdecimal{#2}% - }% -}} -\CustomizeMathJax{\def\LWRsiunitxnumx#1x#2x#3x#4\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumpm#1+-+-\LWRsiunitxEND}% - {% - \ifblank{#3}% - {% - \LWRsiunitxprintdecimal{#1}% - \times% - \LWRsiunitxprintdecimal{#2}% - }% - {% - \LWRsiunitxprintdecimal{#1}% - \times% - \LWRsiunitxprintdecimal{#2}% - \times% - \LWRsiunitxprintdecimal{#3}% - }% - }% -}} -\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{% - \ifblank{#1}% - {}% - {% - \ifstrequal{#1}{-}% - {-}% - {\LWRsiunitxprintdecimal{#1}\times}% - }% - 10^{\LWRsiunitxprintdecimal{#2}} -}} -\CustomizeMathJax{\def\LWRsiunitxnumD#1D#2D#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumx#1xxxxx\LWRsiunitxEND}% - {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% -}} -\CustomizeMathJax{\def\LWRsiunitxnumd#1d#2d#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumD#1DDD\LWRsiunitxEND}% - {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% -}} -\CustomizeMathJax{\def\LWRsiunitxnumE#1E#2E#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumd#1ddd\LWRsiunitxEND}% - {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% -}} -\CustomizeMathJax{\def\LWRsiunitxnume#1e#2e#3\LWRsiunitxEND{% - \ifblank{#2}% - {\LWRsiunitxnumE#1EEE\LWRsiunitxEND}% - {\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}% -}} -\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnume#2eee\LWRsiunitxEND}} -\CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}} -\CustomizeMathJax{\def\LWRsiunitxSIopt#1[#2]#3{% - {#2}\num{#1}{#3}% -}} +\AtBeginDocument{ +\CustomizeMathJax{\def\LWRsiunitxrangephrase{\unicode{x2013}}} +} -\CustomizeMathJax{\newcommand{\LWRsiunitxSI}[2]{% - \num{#1}\,{#2}% -}} -\CustomizeMathJax{\newcommand{\SI}[2][]{% - \ifnextchar[% - {\LWRsiunitxSIopt{#2}}% - {\LWRsiunitxSI{#2}}% -}} -\CustomizeMathJax{\newcommand{\numlist}[2][]{\text{#2}}} -\CustomizeMathJax{\newcommand{\numrange}[3][]{\num{#2}\,\unicode{x2013}\,\num{#3}}} -\CustomizeMathJax{\newcommand{\SIlist}[3][]{\text{#2}\,#3}} -\CustomizeMathJax{\newcommand{\SIrange}[4][]{\num{#2}\,#4\,\unicode{x2013}\,\num{#3}\,#4}} -\CustomizeMathJax{\newcommand{\tablenum}[2][]{\mathrm{#2}}} -\CustomizeMathJax{\newcommand{\ampere}{\mathrm{A}}} -\CustomizeMathJax{\newcommand{\candela}{\mathrm{cd}}} -\CustomizeMathJax{\newcommand{\kelvin}{\mathrm{K}}} -\CustomizeMathJax{\newcommand{\kilogram}{\mathrm{kg}}} -\CustomizeMathJax{\newcommand{\metre}{\mathrm{m}}} -\CustomizeMathJax{\newcommand{\mole}{\mathrm{mol}}} -\CustomizeMathJax{\newcommand{\second}{\mathrm{s}}} -\CustomizeMathJax{\newcommand{\becquerel}{\mathrm{Bq}}} -\CustomizeMathJax{\newcommand{\degreeCelsius}{\unicode{x2103}}} -\CustomizeMathJax{\newcommand{\coulomb}{\mathrm{C}}} -\CustomizeMathJax{\newcommand{\farad}{\mathrm{F}}} -\CustomizeMathJax{\newcommand{\gray}{\mathrm{Gy}}} -\CustomizeMathJax{\newcommand{\hertz}{\mathrm{Hz}}} -\CustomizeMathJax{\newcommand{\henry}{\mathrm{H}}} -\CustomizeMathJax{\newcommand{\joule}{\mathrm{J}}} -\CustomizeMathJax{\newcommand{\katal}{\mathrm{kat}}} -\CustomizeMathJax{\newcommand{\lumen}{\mathrm{lm}}} -\CustomizeMathJax{\newcommand{\lux}{\mathrm{lx}}} -\CustomizeMathJax{\newcommand{\newton}{\mathrm{N}}} -\CustomizeMathJax{\newcommand{\ohm}{\mathrm{\Omega}}} -\CustomizeMathJax{\newcommand{\pascal}{\mathrm{Pa}}} -\CustomizeMathJax{\newcommand{\radian}{\mathrm{rad}}} -\CustomizeMathJax{\newcommand{\siemens}{\mathrm{S}}} -\CustomizeMathJax{\newcommand{\sievert}{\mathrm{Sv}}} -\CustomizeMathJax{\newcommand{\steradian}{\mathrm{sr}}} -\CustomizeMathJax{\newcommand{\tesla}{\mathrm{T}}} -\CustomizeMathJax{\newcommand{\volt}{\mathrm{V}}} -\CustomizeMathJax{\newcommand{\watt}{\mathrm{W}}} -\CustomizeMathJax{\newcommand{\weber}{\mathrm{Wb}}} -\CustomizeMathJax{\newcommand{\day}{\mathrm{d}}} -\CustomizeMathJax{\newcommand{\degree}{\mathrm{^\circ}}} -\CustomizeMathJax{\newcommand{\hectare}{\mathrm{ha}}} -\CustomizeMathJax{\newcommand{\hour}{\mathrm{h}}} -\CustomizeMathJax{\newcommand{\litre}{\mathrm{l}}} -\CustomizeMathJax{\newcommand{\liter}{\mathrm{L}}} -\CustomizeMathJax{\newcommand{\arcminute}{^\prime}} -\CustomizeMathJax{\newcommand{\minute}{\mathrm{min}}} -\CustomizeMathJax{\newcommand{\arcsecond}{^{\prime\prime}}} -\CustomizeMathJax{\newcommand{\tonne}{\mathrm{t}}} -\CustomizeMathJax{\newcommand{\astronomicalunit}{au}} -\CustomizeMathJax{\newcommand{\atomicmassunit}{u}} -\CustomizeMathJax{\newcommand{\bohr}{\mathit{a}_0}} -\CustomizeMathJax{\newcommand{\clight}{\mathit{c}_0}} -\CustomizeMathJax{\newcommand{\dalton}{\mathrm{D}_\mathrm{a}}} -\CustomizeMathJax{\newcommand{\electronmass}{\mathit{m}_{\mathrm{e}}}} -\CustomizeMathJax{\newcommand{\electronvolt}{\mathrm{eV}}} -\CustomizeMathJax{\newcommand{\elementarycharge}{\mathit{e}}} -\CustomizeMathJax{\newcommand{\hartree}{\mathit{E}_{\mathrm{h}}}} -\CustomizeMathJax{\newcommand{\planckbar}{\mathit{\unicode{x210F}}}} -\CustomizeMathJax{\newcommand{\angstrom}{\mathrm{\unicode{x212B}}}} -\CustomizeMathJax{\let\LWRorigbar\bar} -\CustomizeMathJax{\newcommand{\bar}{\mathrm{bar}}} -\CustomizeMathJax{\newcommand{\barn}{\mathrm{b}}} -\CustomizeMathJax{\newcommand{\bel}{\mathrm{B}}} -\CustomizeMathJax{\newcommand{\decibel}{\mathrm{dB}}} -\CustomizeMathJax{\newcommand{\knot}{\mathrm{kn}}} -\CustomizeMathJax{\newcommand{\mmHg}{\mathrm{mmHg}}} -\CustomizeMathJax{\newcommand{\nauticalmile}{\mathrm{M}}} -\CustomizeMathJax{\newcommand{\neper}{\mathrm{Np}}} -\CustomizeMathJax{\newcommand{\yocto}{\mathrm{y}}} -\CustomizeMathJax{\newcommand{\zepto}{\mathrm{z}}} -\CustomizeMathJax{\newcommand{\atto}{\mathrm{a}}} -\CustomizeMathJax{\newcommand{\femto}{\mathrm{f}}} -\CustomizeMathJax{\newcommand{\pico}{\mathrm{p}}} -\CustomizeMathJax{\newcommand{\nano}{\mathrm{n}}} -\CustomizeMathJax{\newcommand{\micro}{\mathrm{\unicode{x00B5}}}} -\CustomizeMathJax{\newcommand{\milli}{\mathrm{m}}} -\CustomizeMathJax{\newcommand{\centi}{\mathrm{c}}} -\CustomizeMathJax{\newcommand{\deci}{\mathrm{d}}} -\CustomizeMathJax{\newcommand{\deca}{\mathrm{da}}} -\CustomizeMathJax{\newcommand{\hecto}{\mathrm{h}}} -\CustomizeMathJax{\newcommand{\kilo}{\mathrm{k}}} -\CustomizeMathJax{\newcommand{\mega}{\mathrm{M}}} -\CustomizeMathJax{\newcommand{\giga}{\mathrm{G}}} -\CustomizeMathJax{\newcommand{\tera}{\mathrm{T}}} -\CustomizeMathJax{\newcommand{\peta}{\mathrm{P}}} -\CustomizeMathJax{\newcommand{\exa}{\mathrm{E}}} -\CustomizeMathJax{\newcommand{\zetta}{\mathrm{Z}}} -\CustomizeMathJax{\newcommand{\yotta}{\mathrm{Y}}} -\CustomizeMathJax{\newcommand{\percent}{\mathrm{\%}}} -\CustomizeMathJax{\newcommand{\meter}{\mathrm{m}}} -\CustomizeMathJax{\newcommand{\metre}{\mathrm{m}}} -\CustomizeMathJax{\newcommand{\gram}{\mathrm{g}}} -\CustomizeMathJax{\newcommand{\kg}{\kilo\gram}} -\CustomizeMathJax{\newcommand{\of}[1]{_{\mathrm{#1}}}} -\CustomizeMathJax{\newcommand{\squared}{^2}} -\CustomizeMathJax{\newcommand{\square}[1]{\mathrm{#1}^2}} -\CustomizeMathJax{\newcommand{\cubed}{^3}} -\CustomizeMathJax{\newcommand{\cubic}[1]{\mathrm{#1}^3}} -\CustomizeMathJax{\newcommand{\per}{\,\mathrm{/}}} -\CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}} -\CustomizeMathJax{\newcommand{\fg}{\femto\gram}} -\CustomizeMathJax{\newcommand{\pg}{\pico\gram}} -\CustomizeMathJax{\newcommand{\ng}{\nano\gram}} -\CustomizeMathJax{\newcommand{\ug}{\micro\gram}} -\CustomizeMathJax{\newcommand{\mg}{\milli\gram}} -\CustomizeMathJax{\newcommand{\g}{\gram}} -\CustomizeMathJax{\newcommand{\kg}{\kilo\gram}} -\CustomizeMathJax{\newcommand{\amu}{\mathrm{u}}} -\CustomizeMathJax{\newcommand{\pm}{\pico\metre}} -\CustomizeMathJax{\newcommand{\nm}{\nano\metre}} -\CustomizeMathJax{\newcommand{\um}{\micro\metre}} -\CustomizeMathJax{\newcommand{\mm}{\milli\metre}} -\CustomizeMathJax{\newcommand{\cm}{\centi\metre}} -\CustomizeMathJax{\newcommand{\dm}{\deci\metre}} -\CustomizeMathJax{\newcommand{\m}{\metre}} -\CustomizeMathJax{\newcommand{\km}{\kilo\metre}} -\CustomizeMathJax{\newcommand{\as}{\atto\second}} -\CustomizeMathJax{\newcommand{\fs}{\femto\second}} -\CustomizeMathJax{\newcommand{\ps}{\pico\second}} -\CustomizeMathJax{\newcommand{\ns}{\nano\second}} -\CustomizeMathJax{\newcommand{\us}{\micro\second}} -\CustomizeMathJax{\newcommand{\ms}{\milli\second}} -\CustomizeMathJax{\newcommand{\s}{\second}} -\CustomizeMathJax{\newcommand{\fmol}{\femto\mol}} -\CustomizeMathJax{\newcommand{\pmol}{\pico\mol}} -\CustomizeMathJax{\newcommand{\nmol}{\nano\mol}} -\CustomizeMathJax{\newcommand{\umol}{\micro\mol}} -\CustomizeMathJax{\newcommand{\mmol}{\milli\mol}} -\CustomizeMathJax{\newcommand{\mol}{\mol}} -\CustomizeMathJax{\newcommand{\kmol}{\kilo\mol}} -\CustomizeMathJax{\newcommand{\pA}{\pico\ampere}} -\CustomizeMathJax{\newcommand{\nA}{\nano\ampere}} -\CustomizeMathJax{\newcommand{\uA}{\micro\ampere}} -\CustomizeMathJax{\newcommand{\mA}{\milli\ampere}} -\CustomizeMathJax{\newcommand{\A}{\ampere}} -\CustomizeMathJax{\newcommand{\kA}{\kilo\ampere}} -\CustomizeMathJax{\newcommand{\ul}{\micro\litre}} -\CustomizeMathJax{\newcommand{\ml}{\milli\litre}} -\CustomizeMathJax{\newcommand{\l}{\litre}} -\CustomizeMathJax{\newcommand{\hl}{\hecto\litre}} -\CustomizeMathJax{\newcommand{\uL}{\micro\liter}} -\CustomizeMathJax{\newcommand{\mL}{\milli\liter}} -\CustomizeMathJax{\newcommand{\L}{\liter}} -\CustomizeMathJax{\newcommand{\hL}{\hecto\liter}} -\CustomizeMathJax{\newcommand{\mHz}{\milli\hertz}} -\CustomizeMathJax{\newcommand{\Hz}{\hertz}} -\CustomizeMathJax{\newcommand{\kHz}{\kilo\hertz}} -\CustomizeMathJax{\newcommand{\MHz}{\mega\hertz}} -\CustomizeMathJax{\newcommand{\GHz}{\giga\hertz}} -\CustomizeMathJax{\newcommand{\THz}{\tera\hertz}} -\CustomizeMathJax{\newcommand{\mN}{\milli\newton}} -\CustomizeMathJax{\newcommand{\N}{\newton}} -\CustomizeMathJax{\newcommand{\kN}{\kilo\newton}} -\CustomizeMathJax{\newcommand{\MN}{\mega\newton}} -\CustomizeMathJax{\newcommand{\Pa}{\pascal}} -\CustomizeMathJax{\newcommand{\kPa}{\kilo\pascal}} -\CustomizeMathJax{\newcommand{\MPa}{\mega\pascal}} -\CustomizeMathJax{\newcommand{\GPa}{\giga\pascal}} -\CustomizeMathJax{\newcommand{\mohm}{\milli\ohm}} -\CustomizeMathJax{\newcommand{\kohm}{\kilo\ohm}} -\CustomizeMathJax{\newcommand{\Mohm}{\mega\ohm}} -\CustomizeMathJax{\newcommand{\pV}{\pico\volt}} -\CustomizeMathJax{\newcommand{\nV}{\nano\volt}} -\CustomizeMathJax{\newcommand{\uV}{\micro\volt}} -\CustomizeMathJax{\newcommand{\mV}{\milli\volt}} -\CustomizeMathJax{\newcommand{\V}{\volt}} -\CustomizeMathJax{\newcommand{\kV}{\kilo\volt}} -\CustomizeMathJax{\newcommand{\W}{\watt}} -\CustomizeMathJax{\newcommand{\uW}{\micro\watt}} -\CustomizeMathJax{\newcommand{\mW}{\milli\watt}} -\CustomizeMathJax{\newcommand{\kW}{\kilo\watt}} -\CustomizeMathJax{\newcommand{\MW}{\mega\watt}} -\CustomizeMathJax{\newcommand{\GW}{\giga\watt}} -\CustomizeMathJax{\newcommand{\J}{\joule}} -\CustomizeMathJax{\newcommand{\uJ}{\micro\joule}} -\CustomizeMathJax{\newcommand{\mJ}{\milli\joule}} -\CustomizeMathJax{\newcommand{\kJ}{\kilo\joule}} -\CustomizeMathJax{\newcommand{\eV}{\electronvolt}} -\CustomizeMathJax{\newcommand{\meV}{\milli\electronvolt}} -\CustomizeMathJax{\newcommand{\keV}{\kilo\electronvolt}} -\CustomizeMathJax{\newcommand{\MeV}{\mega\electronvolt}} -\CustomizeMathJax{\newcommand{\GeV}{\giga\electronvolt}} -\CustomizeMathJax{\newcommand{\TeV}{\tera\electronvolt}} -\CustomizeMathJax{\newcommand{\kWh}{\kilo\watt\hour}} -\CustomizeMathJax{\newcommand{\F}{\farad}} -\CustomizeMathJax{\newcommand{\fF}{\femto\farad}} -\CustomizeMathJax{\newcommand{\pF}{\pico\farad}} -\CustomizeMathJax{\newcommand{\K}{\mathrm{K}}} -\CustomizeMathJax{\newcommand{\dB}{\mathrm{dB}}} -\CustomizeMathJax{\newcommand{\kibi}{\mathrm{Ki}}} -\CustomizeMathJax{\newcommand{\mebi}{\mathrm{Mi}}} -\CustomizeMathJax{\newcommand{\gibi}{\mathrm{Gi}}} -\CustomizeMathJax{\newcommand{\tebi}{\mathrm{Ti}}} -\CustomizeMathJax{\newcommand{\pebi}{\mathrm{Pi}}} -\CustomizeMathJax{\newcommand{\exbi}{\mathrm{Ei}}} -\CustomizeMathJax{\newcommand{\zebi}{\mathrm{Zi}}} -\CustomizeMathJax{\newcommand{\yobi}{\mathrm{Yi}}} -\end{warpMathJax} \endinput %% |