TOC links not working in exported PDF
// Please enter a detailed description of the issue // Description of the issue:
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
- Create a markdown document
- Add a Table of contents using the <!--TOC--> syntax
- View document in Marked (The TOC works and clicking on a link in the TOC navigates/scrolls to the correct header in the document)
- Export as PDF (paginated or continuous)
- Open PDF in Preview
- TOC links are displayted, but they do not actually link (clicking them has no effect)
// If applicable please attach a sample document that causes the issue for you.
Original document, and example out put PDF attached
// Configuration (do not edit) Marked 2 1031 (Direct)
macOS Version: 12.4
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: YES
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 3
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: YES
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: YES
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: YES
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight: %page of %total
printHeaderFirstPage: NO
printFooterFirstPage: YES
printHeaderTopLeft:
printHeaderTopRight: %title
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
- toc_test.md 5.32 KB
- toc_test_paginated.pdf 36.3 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 30 May, 2022 01:40 PM
If you search the support site, you’ll find that this is a long-standing issue. It’s due to a bug in the version of WebKit that Marked relies on, and that version is deprecated by Apple and the bug is unlikely to be fixed.
Marked may eventually be refactored to use a version of WebKit that fixes this issue, but at present that would result in the loss of a significant amount of other functionality.
One option is to export html from Marked, including scripts and styles, and then open in a current version of Safari or Firefox and print to PDF. You lose Marked‘s headers and footers, but the TOC links will work.
Thanks,
Brett
2 Posted by Paul Walk on 30 May, 2022 01:43 PM
Thanks Brett - I did see this explanation flagged up as a response to my issue - and I did accept it as a good response, but then the helpdesk system went ahead and posted my question anyway...!
Anyway - understood - thanks!
Paul
Support Staff 3 Posted by Brett on 30 May, 2022 02:20 PM
Well at least *part* of the support system is working properly :P. Thanks for understanding :)
- Brett
4 Posted by Paul Walk on 30 May, 2022 02:22 PM
:-)