summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty
blob: edcbd9e259dfef87db65b22a4602d9e4f90be5d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
%%
%% This is file `lwarp-siunitx-v2.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `siunitx-v2')
%% This is a generated file.
%% 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
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.

\RequirePackage{xcolor}% for \convertcolorspec

\LWR@ProvidesPackagePass{siunitx-v2}[2021-04-17]

\AtBeginDocument{% in case textcomp was not loaded
    \DeclareSIUnit\bohr{\textit{a}\textsubscript{0}}
    \DeclareSIUnit\clight{\textit{c}\textsubscript{0}}
    \DeclareSIUnit\elementarycharge{\textit{e}}
    \DeclareSIUnit\electronmass{\textit{m}\textsubscript{e}}
    \DeclareSIUnit\hartree{\textit{E}\textsubscript{h}}
    \DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar}
}% AtBeginDocument

\AtBeginDocument{
\HTMLnewcolumntype{S}{c}
\HTMLnewcolumntype{s}{c}
}


\ExplSyntaxOn
\cs_set_protected:Npn \__siunitx_print_aux:
  {
    \text
      {
        \__siunitx_ensure_ltr:n
          {
            \color@begingroup
            \__siunitx_print_color:
            \__siunitx_font_shape:
            \__siunitx_font_weight:
            \use:c
              {
                __siunitx_ \l__siunitx_print_type_tl _
                text \l__siunitx_font_family_tl :
              }
               {
                    \LWR@findcurrenttextcolor% lwarp
                    \ifdefstring{\LWR@tempcolor}{000000}% lwarp
                        {\__siunitx_print_text:}% lwarp
                        {% lwarp
                            \LWR@textcurrentcolor{% lwarp
                                \__siunitx_print_text:
                            }% lwarp
                        }% lwarp
               }
            \color@endgroup
          }
      }
  }

\cs_set_protected:Npn \__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 }
              {
                \int_const:cn { c__siunitx_math #1 _int } { \fam }
              }
          }
      }
  \group_end:
}

\cs_set_protected:Npn \__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
      \bool_set_false:N \l__siunitx_number_compound_bool
      \__siunitx_number_output_parse:n {#1}
    }
    {
        \__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
        \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( % space
                    \LWR@HTMLsanitizedetokenized{%
                        \detokenize{#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( % space
                    \LWR@HTMLsanitizedetokenized{%
                        \detokenize{#1}%
                    } \textbackslash)%                  lwarp
                }{siunitx}{%
                    \__siunitx_print:nn { number } {
                        \LWR@origensuredmath{#1}%
                    }%                                  lwarp
                }%                                      lwarp
        \endgroup%                                      lwarp
      \__siunitx_unit_output_print:
    }
}
\cs_set_protected:Npn \__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
    \l__siunitx_number_numerator_tl
  \tl_put_right:NV \l__siunitx_number_out_tl \l__siunitx_output_quotient_tl
  \tl_put_right:NV \l__siunitx_number_out_tl
    \l__siunitx_number_denominator_tl
  \__siunitx_number_output_single_aux:
}
\cs_set_protected:Npn \__siunitx_unit_format_fraction_fraction: {
  \__siunitx_unit_format_fraction_symbol_aux:
  \int_compare:nNnT { \l__siunitx_unit_denominator_int } > { 1 }
    {
      \bool_if:NT \l__siunitx_unit_denominator_bracket_bool
        {
          \tl_put_left:NV \l__siunitx_unit_denominator_tl \l__siunitx_bracket_open_tl
          \tl_put_right:NV \l__siunitx_unit_denominator_tl \l__siunitx_bracket_close_tl
        }
    }
  \tl_set_eq:NN \l__siunitx_unit_tl \l__siunitx_unit_numerator_tl
  \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: {
  \prop_get:NnNT \l__siunitx_number_out_prop { mantissa-integer }
    \l__siunitx_tmpa_tl
    { \__siunitx_print:nV { number } \l__siunitx_tmpa_tl }
 \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}% lwarp
 {% lateximage
  \hbox_set:Nn \l__siunitx_angle_marker_box
    {
      \__siunitx_print:nn { number } { { \l__siunitx_output_decimal_tl } }
    }
  \hbox_set:Nn \l__siunitx_angle_unit_box
    {
      \__siunitx_print:nV { unit } \l__siunitx_unit_tl
      \skip_horizontal:n { -\scriptspace }
    }
  \__siunitx_angle_print_astronomy_aux:n { marker }
  \__siunitx_angle_print_astronomy_aux:n { unit }
  \hbox_set:Nn \l__siunitx_angle_marker_box
    {
      \box_use:N \l__siunitx_angle_marker_box
      \box_use:N \l__siunitx_angle_unit_box
    }
  \dim_compare:nNnTF
    { \l__siunitx_angle_marker_dim } > { \l__siunitx_angle_unit_dim }
    { \__siunitx_angle_print_astronomy_marker: }
    { \__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 } }
 }% 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
}
\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
}
\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
}
\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} { } }
      {
        \keys_set:nn { siunitx } {#1}
        \__siunitx_unit_output:nn {#2} {#1}
      }
  \group_end:% lwarp
}
\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} }
      {
        \keys_set:nn { siunitx } {#1}
        \__siunitx_range_unit:nnnn {#4} {#1} {#2} {#3}
      }
  \group_end:% lwarp
}
\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{.}}}
}
\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%
        }%
}}

\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}%
}}

\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
%%
%% End of file `lwarp-siunitx-v2.sty'.