diff options
| author | Albert Krewinkel <[email protected]> | 2025-09-09 08:47:56 +0200 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-09-09 10:26:05 +0200 |
| commit | ff12c20f20067c55f8f55bb66e710b1d8910ad3a (patch) | |
| tree | f5233b0e1d7e92d1d657ce70c127af6f7b948cc2 /src | |
| parent | 36bbdc667a72311257a4a8aedaa26b330cf01206 (diff) | |
LaTeX writer: Don't add links to TOC.
Fixes: #11124
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index a2175b0d1..eb4671c18 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -785,6 +785,7 @@ sectionHeader classes ident level lst = do removeInvalidInline x = [x] let lstNoNotes = foldr (mappend . (\x -> walkM removeInvalidInline x)) mempty lst txtNoNotes <- inlineListToLaTeX lstNoNotes + txtNoLinksNoNotes <- inlineListToLaTeX (removeLinks lstNoNotes) -- footnotes in sections don't work (except for starred variants) -- unless you specify an optional argument: -- \section[mysec]{mysec\footnote{blah}} @@ -837,7 +838,7 @@ sectionHeader classes ident level lst = do $$ if unnumbered && not unlisted then "\\addcontentsline{toc}" <> braces (text sectionType) <> - braces txtNoNotes + braces txtNoLinksNoNotes else empty -- | Convert list of inline elements to LaTeX. |
