LaTeX writer: Use ulem for underline.
ulem is conditionally included already when the `strikeout` variable is set, so we set this when there is underlined text, and use `\uline` instead of `\underline`. This fixes wrapping for underlined text. Closes #7351.
This commit is contained in:
parent
832196fb17
commit
1f1a30bbf6
2 changed files with 4 additions and 1 deletions
|
@ -315,6 +315,7 @@ $if(links-as-notes)$
|
|||
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
|
||||
$endif$
|
||||
$if(strikeout)$
|
||||
$-- also used for underline
|
||||
\usepackage[normalem]{ulem}
|
||||
% Avoid problems with \sout in headers with hyperref
|
||||
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
|
||||
|
|
|
@ -786,7 +786,9 @@ inlineToLaTeX (Span (id',classes,kvs) ils) = do
|
|||
then braces contents
|
||||
else foldr inCmd contents cmds)
|
||||
inlineToLaTeX (Emph lst) = inCmd "emph" <$> inlineListToLaTeX lst
|
||||
inlineToLaTeX (Underline lst) = inCmd "underline" <$> inlineListToLaTeX lst
|
||||
inlineToLaTeX (Underline lst) = do
|
||||
modify $ \st -> st{ stStrikeout = True } -- this gives us the ulem package
|
||||
inCmd "uline" <$> 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
|
||||
|
|
Loading…
Add table
Reference in a new issue