aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-05-16 15:50:26 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-05-16 15:50:26 -0700
commit884aef31c55e375cd62fcb55a71829d005087cae (patch)
treea0720bd6d9c085b6672eaa7e224f4223a2eee6f7
parent48ba3e815f059b3607fa9b707edaa6d7400ffee8 (diff)
downloadpandoc-884aef31c55e375cd62fcb55a71829d005087cae.tar.gz
LaTeX reader: parse more siunitx unit commands.
Improves on earlier fix for #4296.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs74
1 files changed, 73 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index f2c0d1fbb..35c85d023 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1508,12 +1508,84 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
-- siuntix
, ("SI", dosiunitx)
-- units of siuntix
+ , ("angstrom", lit "Å")
+ , ("arcmin", lit "′")
+ , ("arcminute", lit "′")
+ , ("arcsecond", lit "″")
+ , ("astronomicalunit", lit "ua")
+ , ("atomicmassunit", lit "u")
+ , ("atto", lit "a")
+ , ("bar", lit "bar")
+ , ("barn", lit "b")
+ , ("becquerel", lit "Bq")
+ , ("bel", lit "B")
+ , ("candela", lit "cd")
, ("celsius", lit "°C")
- , ("degreeCelsius", lit "°C")
+ , ("centi", lit "c")
+ , ("coulomb", lit "C")
+ , ("dalton", lit "Da")
+ , ("day", lit "d")
+ , ("deca", lit "d")
+ , ("deci", lit "d")
+ , ("decibel", lit "db")
+ , ("degreeCelsius",lit "°C")
+ , ("degree", lit "°")
+ , ("deka", lit "d")
+ , ("electronvolt", lit "eV")
+ , ("exa", lit "E")
+ , ("farad", lit "F")
+ , ("femto", lit "f")
+ , ("giga", lit "G")
, ("gram", lit "g")
+ , ("hectare", lit "ha")
+ , ("hecto", lit "h")
+ , ("henry", lit "H")
+ , ("hertz", lit "Hz")
+ , ("hour", lit "h")
+ , ("joule", lit "J")
+ , ("katal", lit "kat")
+ , ("kelvin", lit "K")
+ , ("kilo", lit "k")
+ , ("kilogram", lit "kg")
+ , ("knot", lit "kn")
+ , ("liter", lit "L")
+ , ("litre", lit "l")
+ , ("lumen", lit "lm")
+ , ("lux", lit "lx")
+ , ("mega", lit "M")
, ("meter", lit "m")
+ , ("metre", lit "m")
, ("milli", lit "m")
+ , ("minute", lit "min")
+ , ("mmHg", lit "mmHg")
+ , ("mole", lit "mol")
+ , ("nano", lit "n")
+ , ("nauticalmile", lit "M")
+ , ("neper", lit "Np")
+ , ("newton", lit "N")
+ , ("ohm", lit "Ω")
+ , ("Pa", lit "Pa")
+ , ("pascal", lit "Pa")
+ , ("percent", lit "%")
+ , ("per", lit "/")
+ , ("peta", lit "P")
+ , ("pico", lit "p")
+ , ("radian", lit "rad")
+ , ("second", lit "s")
+ , ("siemens", lit "S")
+ , ("sievert", lit "Sv")
, ("square", dosquare)
+ , ("steradian", lit "sr")
+ , ("tera", lit "T")
+ , ("tesla", lit "T")
+ , ("tonne", lit "t")
+ , ("volt", lit "V")
+ , ("watt", lit "W")
+ , ("weber", lit "Wb")
+ , ("yocto", lit "y")
+ , ("yotta", lit "Y")
+ , ("zepto", lit "z")
+ , ("zetta", lit "Z")
-- hyphenat
, ("bshyp", lit "\\\173")
, ("fshyp", lit "/\173")