diff --git a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs index 1952f4e1a..c4fb06700 100644 --- a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs +++ b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs @@ -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 = diff --git a/test/command/6620.md b/test/command/6620.md index 314200d30..00643e57c 100644 --- a/test/command/6620.md +++ b/test/command/6620.md @@ -7,9 +7,12 @@ \SI{0.135(21)}{\m} \SI{12.3(60)}{\m} + +\SI{10.0 \pm 3.3}{\ms} ^D

23 ± 2 m

125 ± 12 m

0.135 ± 0.021 m

12.3 ± 6 m

+

10.0 ± 3.3 ms

```