aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-11-19 12:17:46 -0800
committerJohn MacFarlane <[email protected]>2022-11-19 12:28:41 -0800
commit144bf90ab92b517dd721baf80f121f86187ccd61 (patch)
tree4f3616e8b11dce2e6f4191ae22eaf89842fa146f /src
parent202eacb6860967e6c74e8bc73eb8a4a677748243 (diff)
LaTeX writer: Use soul instead of ulem for strikeout, underline.
This handles things like hyphenation, line breaks, and nonbreaking spaces better. Closes #8411.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index ed5b1973d..d82838e0d 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -771,8 +771,8 @@ inlineToLaTeX (Span (id',classes,kvs) ils) = do
else foldr inCmd contents cmds)
inlineToLaTeX (Emph lst) = inCmd "emph" <$> inlineListToLaTeX lst
inlineToLaTeX (Underline lst) = do
- modify $ \st -> st{ stStrikeout = True } -- this gives us the ulem package
- inCmd "uline" <$> inlineListToLaTeX lst
+ modify $ \st -> st{ stStrikeout = True } -- this gives us the soul package
+ inCmd "ul" <$> inlineListToLaTeX lst
inlineToLaTeX (Strong lst) = inCmd "textbf" <$> inlineListToLaTeX lst
inlineToLaTeX (Strikeout lst) = do
-- we need to protect VERB in an mbox or we get an error
@@ -781,7 +781,7 @@ inlineToLaTeX (Strikeout lst) = do
-- incorrect results if there is a space, see #5529
contents <- inlineListToLaTeX $ walk (concatMap protectCode) lst
modify $ \s -> s{ stStrikeout = True }
- return $ inCmd "sout" contents
+ return $ inCmd "st" contents
inlineToLaTeX (Superscript lst) =
inCmd "textsuperscript" <$> inlineListToLaTeX lst
inlineToLaTeX (Subscript lst) =