aboutsummaryrefslogtreecommitdiff
path: root/test/command/3587.md
blob: 1493a08c5aae94424f969b104b1063cb1839ad84 (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
```
% pandoc -f latex -t native
\SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}
^D
[Para [Str "1\160m",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "1000\160mm"]]
```

```
% pandoc -f latex -t native
\SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro}
^D
[Para [Str "$\160\&1",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "0.938094\160\8364"]]
```


```
% pandoc -f latex -t native
\SI[round-precision=2]{\{\}}[\{\}]{\{\}}
^D
[Para [Str "{}\160{}\160{}"]]
```

```
% pandoc -f latex -t native
\SI{30}{\milli\meter}
^D
[Para [Str "30\160mm"]]
```

```
% pandoc -f latex -t native
\SI{6}{\gram}
^D
[Para [Str "6\160g"]]
```

```
% pandoc -f latex -t native
\SI{25}{\square\meter}
^D
[Para [Str "25\160m\178"]]
```

```
% pandoc -f latex -t native
\SI{18.2}{\degreeCelsius}
^D
[Para [Str "18.2\160\176C"]]
```

```
% pandoc -f latex -t native
\SI{18.2}{\celsius}
^D
[Para [Str "18.2\160\176C"]]
```

# SIrange tests

## Integer range with simple common units

```
% pandoc -f latex -t native
\SIrange{10}{20}{\gram}
^D
[Para [Str "10\160g\8211\&20\160g"]]
```
```
% pandoc -f latex -t native
\SIrange{35}{9}{\milli\meter}
^D
[Para [Str "35\160mm\8211\&9\160mm"]]
```
```
% pandoc -f latex -t native
\SIrange{4}{97367265}{\celsius}
^D
[Para [Str "4\160\176C\8211\&97367265\160\176C"]]
```

## Decimal range with simple units

```
% pandoc -f latex -t native
\SIrange{4.5}{97367265.5}{\celsius}
^D
[Para [Str "4.5\160\176C\8211\&97367265.5\160\176C"]]
```

## Squared units

```
% pandoc -f latex -t native
\SIrange{10}{20}{\square\meter}
^D
[Para [Str "10\160m\178\8211\&20\160m\178"]]
```

## Ignore round precision

`round-precision` option appears to be ignored by `\SI` as of 7c6dbd37e, so
`\SIrange` will ignore it as well.

```
% pandoc -f latex -t native
\SIrange[round-precision=2]{10}{20}{\gram}
^D
[Para [Str "10\160g\8211\&20\160g"]]
```
```
% pandoc -f latex -t native
\SIrange[round-precision=2]{10.0}{20.25}{\gram}
^D
[Para [Str "10.0\160g\8211\&20.25\160g"]]
```