Skip to content

Commit

Permalink
LaTeX reader: add em, ex, px, mu to list of units for dimension args.
Browse files Browse the repository at this point in the history
Closes #10212.
  • Loading branch information
jgm committed Sep 24, 2024
1 parent f3fff87 commit 56fc7d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Text/Pandoc/Readers/LaTeX/Parsing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56fc7d5

Please sign in to comment.