From 56fc7d5cfce2d3a7cb9084533f0579d9c506b21c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 24 Sep 2024 08:53:32 -0700 Subject: [PATCH] LaTeX reader: add em, ex, px, mu to list of units for dimension args. Closes #10212. --- src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index e5382e306ae4..a53b9092f623 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -898,7 +898,11 @@ dimenarg = try $ do let s = s1 <> s2 let (num, rest) = T.span (\c -> isDigit c || c == '.') s guard $ T.length num > 0 - guard $ rest `elem` ["", "pt","pc","in","bp","cm","mm","dd","cc","sp"] + guard $ rest `elem` + ["", "pt","pc","in","bp","cm","mm","dd","cc","sp","ex","em", + "mu", -- "mu" in math mode only + "px" -- "px" with pdftex and luatex only + ] return $ T.pack ['=' | ch] <> minus <> s ignore :: (Monoid a, PandocMonad m) => Text -> ParsecT s u m a