git.iko.soy/typeable/pandoc
on 3645607 help sign in
147 lines 2.8 kB history raw
1```
2% pandoc -f latex -t native
3\SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}
4^D
5[Para [Str "1\160m",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "1000\160mm"]]
6```
8```
9% pandoc -f latex -t native
10\SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro}
11^D
12[Para [Str "$\160\&1",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "0.938094\160\8364"]]
13```
16```
17% pandoc -f latex -t native
18\SI{30}{\milli\meter}
19^D
20[Para [Str "30\160mm"]]
21```
23```
24% pandoc -f latex -t native
25\SI{6}{\gram}
26^D
27[Para [Str "6\160g"]]
28```
30```
31% pandoc -f latex -t native
32\SI{25}{\square\meter}
33^D
34[Para [Str "25\160m",Superscript [Str "2"]]]
35```
37```
38% pandoc -f latex -t native
39\SI{18.2}{\degreeCelsius}
40^D
41[Para [Str "18.2\160\176C"]]
42```
44```
45% pandoc -f latex -t native
46\SI{18.2}{\celsius}
47^D
48[Para [Str "18.2\160\176C"]]
49```
51# SIrange tests
53## Integer range with simple common units
55```
56% pandoc -f latex -t native
57\SIrange{10}{20}{\gram}
58^D
59[Para [Str "10\160g\8211\&20\160g"]]
60```
61```
62% pandoc -f latex -t native
63\SIrange{35}{9}{\milli\meter}
64^D
65[Para [Str "35\160mm\8211\&9\160mm"]]
66```
67```
68% pandoc -f latex -t native
69\SIrange{4}{97367265}{\celsius}
70^D
71[Para [Str "4\160\176C\8211\&97367265\160\176C"]]
72```
74## Decimal range with simple units
76```
77% pandoc -f latex -t native
78\SIrange{4.5}{97367265.5}{\celsius}
79^D
80[Para [Str "4.5\160\176C\8211\&97367265.5\160\176C"]]
81```
83## Squared, cubed etc. units
85```
86% pandoc -f latex -t native
87\SIrange{10}{20}{\square\meter}
88^D
89[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
90```
92```
93% pandoc -f latex -t native
94\SIrange{10}{20}{\cubic\meter}
95^D
96[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
97```
99```
100% pandoc -f latex -t native
101\SIrange{10}{20}{\raisetothe{4}\meter}
102^D
103[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
104```
107```
108% pandoc -f latex -t native
109\SIrange{10}{20}{\meter\squared}
110^D
111[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
112```
114```
115% pandoc -f latex -t native
116\SIrange{10}{20}{\meter\cubed}
117^D
118[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
119```
121```
122% pandoc -f latex -t native
123\SIrange{10}{20}{\meter\tothe{4}}
124^D
125[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
126```
130## Ignore round precision
132`round-precision` option appears to be ignored by `\SI` as of 7c6dbd37e, so
133`\SIrange` will ignore it as well.
135```
136% pandoc -f latex -t native
137\SIrange[round-precision=2]{10}{20}{\gram}
138^D
139[Para [Str "10\160g\8211\&20\160g"]]
140```
141```
142% pandoc -f latex -t native
143\SIrange[round-precision=2]{10.0}{20.25}{\gram}
144^D
145[Para [Str "10.0\160g\8211\&20.25\160g"]]
146```