HollowMan6 / mdbook-pdf

A backend for mdBook written in Rust for generating PDF based on headless chrome and Chrome DevTools Protocol. (用 Rust 编写的 mdBook 后端,基于headless chrome和Chrome开发工具协议生成PDF)
https://crates.io/crates/mdbook-pdf
GNU General Public License v3.0
153 stars 18 forks source link

can it make a toc like pandoc? #36

Closed oldbotman closed 10 months ago

oldbotman commented 10 months ago

Can this generate a table of contents (TOC)? Currently, when generating a PDF, I not only need a TOC on the left side, but I also hope that the PDF has a table of contents page.

HollowMan6 commented 10 months ago

I'm not sure how does toc like in pandoc, but we can of course have a Table of Contents page at the beginning of the PDF. You can check https://github.com/HollowMan6/mdbook-pdf/issues/18#issuecomment-1500819358

For TOC as bookmarks, check Common Issues 3: https://github.com/HollowMan6/mdbook-pdf?tab=readme-ov-file#common-issues

oldbotman commented 10 months ago

I'm not sure how does toc like in pandoc, but we can of course have a Table of Contents page at the beginning of the PDF. You can check #18 (comment)

For TOC as bookmarks, check Common Issues 3: https://github.com/HollowMan6/mdbook-pdf?tab=readme-ov-file#common-issues

Thank you for your response, I've looked at this solution and it can achieve the effect I want.