Change SIRange to SIrange (#6617)

This commit is contained in:
Emerson Harkin 2020-08-14 14:30:17 -04:00 committed by GitHub
parent e65c6b0b5d
commit 6cfb31bbe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -259,9 +259,9 @@ dosiunitx = do
emptyOr160 unit,
unit]
-- converts e.g. \SIRange{100}{200}{\ms} to "100 ms--200 ms"
doSIRange :: PandocMonad m => LP m Inlines
doSIRange = do
-- converts e.g. \SIrange{100}{200}{\ms} to "100 ms--200 ms"
doSIrange :: PandocMonad m => LP m Inlines
doSIrange = do
skipopts
startvalue <- tok
startvalueprefix <- option "" $ bracketed tok
@ -1098,7 +1098,7 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
, ("acsp", doAcronymPlural "abbrv")
-- siuntix
, ("SI", dosiunitx)
, ("SIRange", doSIRange)
, ("SIrange", doSIrange)
-- hyphenat
, ("bshyp", lit "\\\173")
, ("fshyp", lit "/\173")

View file

@ -55,25 +55,25 @@
[Para [Str "18.2\160\176C"]]
```
# SIRange tests
# SIrange tests
## Integer range with simple common units
```
% pandoc -f latex -t native
\SIRange{10}{20}{\gram}
\SIrange{10}{20}{\gram}
^D
[Para [Str "10\160g\8211\&20\160g"]]
```
```
% pandoc -f latex -t native
\SIRange{35}{9}{\milli\meter}
\SIrange{35}{9}{\milli\meter}
^D
[Para [Str "35\160mm\8211\&9\160mm"]]
```
```
% pandoc -f latex -t native
\SIRange{4}{97367265}{\celsius}
\SIrange{4}{97367265}{\celsius}
^D
[Para [Str "4\160\176C\8211\&97367265\160\176C"]]
```
@ -82,7 +82,7 @@
```
% pandoc -f latex -t native
\SIRange{4.5}{97367265.5}{\celsius}
\SIrange{4.5}{97367265.5}{\celsius}
^D
[Para [Str "4.5\160\176C\8211\&97367265.5\160\176C"]]
```
@ -91,7 +91,7 @@
```
% pandoc -f latex -t native
\SIRange{10}{20}{\square\meter}
\SIrange{10}{20}{\square\meter}
^D
[Para [Str "10\160m\178\8211\&20\160m\178"]]
```
@ -99,17 +99,17 @@
## Ignore round precision
`round-precision` option appears to be ignored by `\SI` as of 7c6dbd37e, so
`\SIRange` will ignore it as well.
`\SIrange` will ignore it as well.
```
% pandoc -f latex -t native
\SIRange[round-precision=2]{10}{20}{\gram}
\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}
\SIrange[round-precision=2]{10.0}{20.25}{\gram}
^D
[Para [Str "10.0\160g\8211\&20.25\160g"]]
```