From 8437a4a002210a33ee721c58f5f95605898a8e1b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 20 May 2021 08:15:48 -0700 Subject: LaTeX reader: support `\pm` in `SI{..}`. Closes #6620. --- src/Text/Pandoc/Readers/LaTeX/SIunitx.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers') 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 = -- cgit v1.2.3