2017-04-22 21:57:21 +02:00
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "1\160m"
|
|
|
|
, Space
|
|
|
|
, Str "is"
|
|
|
|
, Space
|
|
|
|
, Str "equal"
|
|
|
|
, Space
|
|
|
|
, Str "to"
|
|
|
|
, Space
|
|
|
|
, Str "1000\160mm"
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2017-04-22 21:57:21 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "$\160\&1"
|
|
|
|
, Space
|
|
|
|
, Str "is"
|
|
|
|
, Space
|
|
|
|
, Str "equal"
|
|
|
|
, Space
|
|
|
|
, Str "to"
|
|
|
|
, Space
|
|
|
|
, Str "0.938094\160\8364"
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2017-04-22 21:57:21 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI{30}{\milli\meter}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "30\160mm" ] ]
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI{6}{\gram}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "6\160g" ] ]
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI{25}{\square\meter}
|
|
|
|
^D
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Para [ Str "25\160m" , Superscript [ Str "2" ] ] ]
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI{18.2}{\degreeCelsius}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "18.2\160\176C" ] ]
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SI{18.2}{\celsius}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "18.2\160\176C" ] ]
|
2018-03-18 04:59:20 +01:00
|
|
|
```
|
|
|
|
|
2020-08-14 20:30:17 +02:00
|
|
|
# SIrange tests
|
2020-07-24 01:47:32 +02:00
|
|
|
|
|
|
|
## Integer range with simple common units
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange{10}{20}{\gram}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "10\160g\8211\&20\160g" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange{35}{9}{\milli\meter}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "35\160mm\8211\&9\160mm" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange{4}{97367265}{\celsius}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "4\160\176C\8211\&97367265\160\176C" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Decimal range with simple units
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange{4.5}{97367265.5}{\celsius}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "4.5\160\176C\8211\&97367265.5\160\176C" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
|
2020-09-02 20:06:26 +02:00
|
|
|
## Squared, cubed etc. units
|
2020-07-24 01:47:32 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange{10}{20}{\square\meter}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "2" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "2" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SIrange{10}{20}{\cubic\meter}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 17:28:54 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "3" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "3" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SIrange{10}{20}{\raisetothe{4}\meter}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "4" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "4" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SIrange{10}{20}{\meter\squared}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "2" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "2" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SIrange{10}{20}{\meter\cubed}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 17:28:54 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "3" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "3" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
|
|
|
\SIrange{10}{20}{\meter\tothe{4}}
|
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para
|
2021-09-29 06:17:53 +02:00
|
|
|
[ Str "10\160m"
|
|
|
|
, Superscript [ Str "4" ]
|
|
|
|
, Str "\8211\&20\160m"
|
|
|
|
, Superscript [ Str "4" ]
|
|
|
|
]
|
2021-09-19 21:09:51 +02:00
|
|
|
]
|
2020-09-02 20:06:26 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-24 01:47:32 +02:00
|
|
|
## Ignore round precision
|
|
|
|
|
|
|
|
`round-precision` option appears to be ignored by `\SI` as of 7c6dbd37e, so
|
2020-08-14 20:30:17 +02:00
|
|
|
`\SIrange` will ignore it as well.
|
2020-07-24 01:47:32 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange[round-precision=2]{10}{20}{\gram}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "10\160g\8211\&20\160g" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
```
|
|
|
|
% pandoc -f latex -t native
|
2020-08-14 20:30:17 +02:00
|
|
|
\SIrange[round-precision=2]{10.0}{20.25}{\gram}
|
2020-07-24 01:47:32 +02:00
|
|
|
^D
|
2021-09-19 21:09:51 +02:00
|
|
|
[ Para [ Str "10.0\160g\8211\&20.25\160g" ] ]
|
2020-07-24 01:47:32 +02:00
|
|
|
```
|
|
|
|
|