-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsiunitx-locale.lvt
87 lines (70 loc) · 1.5 KB
/
siunitx-locale.lvt
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
\input{regression-test}
\documentclass{article}
\ExplSyntaxOn
\debug_on:n { check-declarations , deprecation }
\ExplSyntaxOfff
\usepackage{siunitx}
\usepackage
[
brazilian,
catalan,
english,
french,
german,
italian,
portuguese,
polish,
spanish
]
{babel}
\ExplSyntaxOn
\OMIT
\cs_set_protected:Npn \test:n #1
{
\selectlanguage {#1}
\hbox_set:Nn \l_tmpa_box { \siunitx_number_list:nn { { 1 } { 2 } { 3 } } }
\box_show:N \l_tmpa_box
\hbox_set:Nn \l_tmpa_box { \siunitx_number_range:nn { 1 } { 2 } }
\box_show:N \l_tmpa_box
}
\cs_set_protected:Npn \test:nn #1#2
{
\hbox_set:Nn \l_tmpa_box { \siunitx_quantity:nn {#1} {#2} }
\box_show:N \l_tmpa_box
}
\TIMO
\ExplSyntaxOff
\begin{document}
\ExplSyntaxOn
\START
\OMIT
% Set up math fonts
\hbox_set:Nn \l_tmpa_box { $ \mathrm { a } \mathsf { b } \mathtt{ c } \mathbf { d } $ }
\TIMO
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\TEST { Translated~strings }
{
\clist_map_function:nN
{
brazilian ,
catalan ,
english ,
french ,
german ,
italian ,
portuguese,
polish ,
spanish
}
\test:n
}
\TEST { Option~setting~"locale" }
{
\test:nn { 1.23e4 } { \metre\per\second }
\clist_map_inline:nn { DE , FR , IT , PL , UK , US , ZA }
{
\keys_set:nn { siunitx } { locale = #1 }
\test:nn { 1.23e4 } { \metre\per\second }
}
}
\END