You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
导出pdf文件没有书签(或者说文档目录结构)Exporting PDF files without bookmarks (or document directory structure) #3357
这个功能已经实现了,但是使用起来有点麻烦。可能还没有来得及完善。
你需要在文档开头添加[TOC]然后在导出的弹窗中设置“Table of Content”的Title::名字,就是目录名,然后导出时就可以获得带有目录的PDF文档。
The feature you want has been implemented, but there are some steps before exporting. You need to add [TOC] ahead of the markdown file or the place you want. And then you need to give a name for your TOC in the window(“Table of Content”→Title::) when exporting PDF.
Typora costs money ( $ _ $ ), I hate it
Reacted by Carefree Lu, YogaWang, taoyes3, Zheng Xing and 烟雨
Yes, this feature is very convenient for large files, look forward to it!
The current TOC feature, which I tried twice in V0.17.1 without success。I think it's more suitable for HTML export
Yes, this feature is very convenient for large files, look forward to it! The current TOC feature, which I tried twice in V0.17.1 without success。I think it's more suitable for HTML export
Same v0.17.1. And got a success following #3357 (comment).
Maybe you should let "include top headings" in the export windows stay on and try it again.
这个功能已经实现了,但是使用起来有点麻烦。可能还没有来得及完善。 你需要在文档开头添加[TOC]然后在导出的弹窗中设置“Table of Content”的Title::名字,就是目录名,然后导出时就可以获得带有目录的PDF文档。
The feature you want has been implemented, but there are some steps before exporting. You need to add [TOC] ahead of the markdown file or the place you want. And then you need to give a name for your TOC in the window(“Table of Content”→Title::) when exporting PDF.
导出 PDF 时会自动生成左侧书签导航(不是文档内的 [TOC] 页)。The PDF export now passes generateTaggedPDF + generateDocumentOutline to printToPDF, which builds a real /Outlines tree from the document's h1–h6 headings — that is the left-hand bookmark pane you asked for.
Shipped in v0.20.0-beta.5 (51b039b3); not in stable 0.19.1, so you will see it in 0.20.0.
Activity
YalandHong commentedon Jul 20, 2022
Duplicate of #3238, #2695 and #80 (comment)
suye0620 commentedon Jul 21, 2022
这个功能已经实现了,但是使用起来有点麻烦。可能还没有来得及完善。

你需要在文档开头添加[TOC]然后在导出的弹窗中设置“Table of Content”的Title::名字,就是目录名,然后导出时就可以获得带有目录的PDF文档。
The feature you want has been implemented, but there are some steps before exporting. You need to add
[TOC]ahead of the markdown file or the place you want. And then you need to give a name for your TOC in the window(“Table of Content”→Title::) when exporting PDF.Typora costs money ( $ _ $ ), I hate it
CarefreeLu commentedon Jul 22, 2022
@suye0620 非常感谢你的回复,导出的确可以在文档首页生成目录。也能跳转到每个小节。比之前要方便一些了。但不是我最想要的左侧的书签导航。
wjuncn commentedon Jul 25, 2022
目前导出确实没找到这个功能,我一般用 pdfpatcher 来加上左侧的书签目录。 https://github.com/wmjordan/PDFPatcher
2016317200329 commentedon Sep 4, 2022
Thanks a lot. Really need that when I have to share files in PDF with others
coolxbin commentedon Sep 15, 2022
是的,这个功能对大文件来说非常方便,期待能实现!
当前TOC功能,我在v0.17.1上面尝试了两次没有成功,个人认为TOC功能还是更适合HTML导出
Yes, this feature is very convenient for large files, look forward to it!
The current TOC feature, which I tried twice in V0.17.1 without success。I think it's more suitable for HTML export
2016317200329 commentedon Sep 15, 2022
Same v0.17.1. And got a success following #3357 (comment).
Maybe you should let "include top headings" in the export windows stay on and try it again.
同样是v0.17.1. 按照https://github.com/marktext/marktext/issues/3357#issuecomment-1191182854提供的方法取得了成功。或许你应该让export窗口的"include top headings"保持打开然后再试一次
lightshares commentedon Oct 8, 2022
@suye0620 非常感谢你的回复,导出的确可以在文档首页生成目录。也能跳转到每个小节。比之前要方便一些了。但不是我最想要的左侧的书签导航。 这个什么时候支持
cmjzzx commentedon Aug 22, 2023
非常感谢🙏
SplitGemini commentedon Jan 18, 2024
Any updates? TOC is now implemented, but bookmarks for pdf are not.
有更新吗,导出PDF的书签目录还是没有实现
SplitGemini commentedon Jan 18, 2024
Pay attention to the bookmark on the left, need this effect.
Jocs commentedon Sep 22, 2026
This is implemented now.
导出 PDF 时会自动生成左侧书签导航(不是文档内的 [TOC] 页)。The PDF export now passes
generateTaggedPDF+generateDocumentOutlinetoprintToPDF, which builds a real/Outlinestree from the document'sh1–h6headings — that is the left-hand bookmark pane you asked for.Shipped in v0.20.0-beta.5 (
51b039b3); not in stable 0.19.1, so you will see it in 0.20.0.Closing as completed. (Same feature as #2695.)