diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty | 269 |
1 files changed, 259 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty index 825b65f9a2e..cdfd10a7769 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx.sty @@ -6,7 +6,7 @@ %% %% lwarp.dtx (with options: `siunitx') %% This is a generated file. -%% Copyright 2016-2019 Brian Dunn +%% Copyright 2016-2020 Brian Dunn %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -94,18 +94,64 @@ \__siunitx_number_output_parse:n {#1} } { - \__siunitx_unit_output_pre_print: - \LWR@subsingledollar{% lwarp - \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp - }{siunitx}{% - \__siunitx_print:nn { number } {% - \LWR@origensuredmath{#1}% - }% - }% lwarp - \__siunitx_unit_output_print: + \__siunitx_unit_output_pre_print: + \begingroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + }{siunitx}{% + \__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 + { + \bool_if:NTF \l__siunitx_number_parse_bool + { + \tl_clear:N \l__siunitx_number_out_tl + \tl_clear:N \l__siunitx_number_out_saved_tl + \bool_set_false:N \l__siunitx_number_compound_bool + \__siunitx_number_output_parse:n {#1} + \bool_if:NT \l__siunitx_number_compound_bool + { \msg_error:nnx { siunitx } { multi-part-range } {#1} } + } + { + \__siunitx_unit_output_pre_print: + \begingroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + }{siunitx}{% + \__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 { + \tl_if_empty:nF {#1} + { + \tl_set:Nn \l__siunitx_unit_tl {#2} + \begingroup% lwarp + \boolfalse{mathjax}% lwarp + \LWR@subsingledollar{% lwarp + \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp + }{siunitx}{% + \__siunitx_print:nn { number } { + \LWR@origensuredmath{#1}% + } % lwarp + }% lwarp + \endgroup% lwarp + \__siunitx_unit_output_print: + } +} \cs_undefine:N \__siunitx_number_output_quotient_fraction: \cs_new_protected:Npn \__siunitx_number_output_quotient_fraction: { \bool_set_true:N \l__siunitx_number_compound_bool @@ -168,6 +214,8 @@ \l__siunitx_tmpa_tl { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl } } +\cs_undefine:N \__siunitx_textsuperscript:n +\cs_new_protected:Npn \__siunitx_textsuperscript:n #1 {\textsuperscript{#1}} \RenewDocumentCommand \num { o m } { \leavevmode \group_begin:% lwarp @@ -235,6 +283,207 @@ \ExplSyntaxOff +\begin{warpMathJax} +\CustomizeMathJax{\newcommand{\ang}[2][]{(\mathrm{#2})\degree}} +\CustomizeMathJax{\newcommand{\num}[2][]{\mathrm{#2}}} +\CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}} +\CustomizeMathJax{\newcommand{\LWRSI}[2][]{\mathrm{#1\LWRSInumber\,#2}}} +\CustomizeMathJax{\newcommand{\SI}[2][]{\def\LWRSInumber{#2}\LWRSI}} +\CustomizeMathJax{\newcommand{\numlist}[2][]{\mathrm{#2}}} +\CustomizeMathJax{\newcommand{\numrange}[3][]{\mathrm{#2~-- #3}}} +\CustomizeMathJax{\newcommand{\SIlist}[3][]{\mathrm{#2\,#3}}} +\CustomizeMathJax{\newcommand{\SIrange}[4][]{\mathrm{#2\,#4~-- #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{x0127}}}} +\CustomizeMathJax{\newcommand{\angstrom}{\mathrm{\unicode{x00C5}}}} +\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}{/}} +\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 %% %% End of file `lwarp-siunitx.sty'. |