Skip to content

Commit 56fc7d5

Browse files
committed
LaTeX reader: add em, ex, px, mu to list of units for dimension args.
Closes #10212.
1 parent f3fff87 commit 56fc7d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Text/Pandoc/Readers/LaTeX/Parsing.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,11 @@ dimenarg = try $ do
898898
let s = s1 <> s2
899899
let (num, rest) = T.span (\c -> isDigit c || c == '.') s
900900
guard $ T.length num > 0
901-
guard $ rest `elem` ["", "pt","pc","in","bp","cm","mm","dd","cc","sp"]
901+
guard $ rest `elem`
902+
["", "pt","pc","in","bp","cm","mm","dd","cc","sp","ex","em",
903+
"mu", -- "mu" in math mode only
904+
"px" -- "px" with pdftex and luatex only
905+
]
902906
return $ T.pack ['=' | ch] <> minus <> s
903907

904908
ignore :: (Monoid a, PandocMonad m) => Text -> ParsecT s u m a

0 commit comments

Comments
 (0)