aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-10-11 08:54:45 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-11 08:54:45 -0700
commit84d68b92a211a14f5f6f2e08118e107fab5591de (patch)
treea9ece05441017fd06f7e2bc0b26b47b15dec914b
parent0f98cbff4b61b8e79f386f77d18b3218f1214b25 (diff)
downloadpandoc-84d68b92a211a14f5f6f2e08118e107fab5591de.tar.gz
LaTeX reader: Implement siunitx v3 commands.
We support `\unit`, `\qty`, `\qtyrange`, and `\qtylist` as synonynms of `\si`, `\SI`, `\SIrange`, and `\SIlist`. Closes #7614.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/SIunitx.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
index b8bf0ce7f..e4738a763 100644
--- a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
@@ -23,11 +23,15 @@ siunitxCommands :: PandocMonad m
=> LP m Inlines -> M.Map Text (LP m Inlines)
siunitxCommands tok = M.fromList
[ ("si", dosi tok)
+ , ("unit", dosi tok) -- v3 version of si
, ("SI", doSI tok)
+ , ("qty", doSI tok) -- v3 version of SI
, ("SIrange", doSIrange True tok)
+ , ("qtyrange", doSIrange True tok) -- v3 version of SIrange
+ , ("SIlist", doSIlist tok)
+ , ("qtylist", doSIlist tok) -- v3 version of SIlist
, ("numrange", doSIrange False tok)
, ("numlist", doSInumlist)
- , ("SIlist", doSIlist tok)
, ("num", doSInum)
, ("ang", doSIang)
]