LaTeX reader: support \pm in SI{..}.

Closes #6620.
This commit is contained in:
John MacFarlane 2021-05-20 08:15:48 -07:00
parent b6239f4150
commit 8437a4a002
2 changed files with 6 additions and 1 deletions

View file

@ -45,7 +45,9 @@ doSI tok = do
unit]
doSInum :: PandocMonad m => LP m Inlines
doSInum = skipopts *> (tonum . untokenize <$> braced)
doSInum = skipopts *> (tonum . untokenize . map convertPM <$> braced)
where convertPM (Tok pos (CtrlSeq "pm") _) = Tok pos Word "\xb1\xa0"
convertPM t = t
tonum :: Text -> Inlines
tonum value =

View file

@ -7,9 +7,12 @@
\SI{0.135(21)}{\m}
\SI{12.3(60)}{\m}
\SI{10.0 \pm 3.3}{\ms}
^D
<p>23 ± 2 m</p>
<p>125 ± 12 m</p>
<p>0.135 ± 0.021 m</p>
<p>12.3 ± 6 m</p>
<p>10.0 ± 3.3 ms</p>
```