diff options
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index a09e366a7..3585e1544 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -734,12 +734,11 @@ sectionHeader classes ident level lst = do else empty lab <- labelFor ident let star = if unnumbered then text "*" else empty - let stuffing = star <> optional <> contents - stuffing' <- hypertarget True ident $ - text ('\\':sectionType) <> stuffing <> lab + let title = star <> optional <> contents return $ if level' > 5 then txt - else prefix $$ stuffing' + else prefix + $$ text ('\\':sectionType) <> title <> lab $$ if unnumbered && not unlisted then "\\addcontentsline{toc}" <> braces (text sectionType) <> @@ -960,7 +959,7 @@ inlineToLaTeX (Link (id',_,_) txt (src,_)) = Just ('#', ident) -> do contents <- inlineListToLaTeX txt lab <- toLabel ident - return $ text "\\protect\\hyperlink" <> braces (literal lab) <> braces contents + return $ text "\\hyperref" <> brackets (literal lab) <> braces contents _ -> case txt of [Str x] | unEscapeString (T.unpack x) == unEscapeString (T.unpack src) -> -- autolink do modify $ \s -> s{ stUrl = True } |
