From 884aef31c55e375cd62fcb55a71829d005087cae Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 16 May 2018 15:50:26 -0700 Subject: LaTeX reader: parse more siunitx unit commands. Improves on earlier fix for #4296. --- src/Text/Pandoc/Readers/LaTeX.hs | 74 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) 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") -- cgit v1.2.3