aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-11-19 12:23:11 -0800
committerJohn MacFarlane <[email protected]>2022-11-19 12:23:11 -0800
commitad5947ff53b0b80cb43411caac6b71e17d8117c4 (patch)
treeb3618c6e065c680de424718bc6e81c6a02594cc9
parent824c0ea050fc8813b613d9bf6ce0a7cc9643aa13 (diff)
LaTeX writer: support highlighted text for Span with class `mark`.
See #7743.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index d82838e0d..6a402e1c5 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -735,6 +735,9 @@ inlineListToLaTeX lst = hcat <$>
inlineToLaTeX :: PandocMonad m
=> Inline -- ^ Inline to convert
-> LW m (Doc Text)
+inlineToLaTeX (Span ("",["mark"],[]) lst) = do
+ modify $ \st -> st{ stStrikeout = True } -- this gives us the soul package
+ inCmd "hl" <$> inlineListToLaTeX lst
inlineToLaTeX (Span (id',classes,kvs) ils) = do
linkAnchor <- hypertarget False id' empty
lang <- toLang $ lookup "lang" kvs