[英]How can I convert markdown to PDF using CSS with a table of contents?
I tried using the Pandoc and Wkhtmltopdf, and Wkhtmltopdf is working fine. 我尝试使用Pandoc和Wkhtmltopdf,并且Wkhtmltopdf运行正常。 But I am unable to get a table of contents and page numbering.
但是我无法获得目录和页码表。 Is there a way to get those using Pandoc?
有办法让那些使用Pandoc的人吗?
Edit: 编辑:
I would like to add another potential solution that has helped me. 我想添加另一个对我有帮助的潜在解决方案。 It is PagedMeda/Paged.js .
它是PagedMeda / Paged.js 。 I allows for the usage of PagedMedia CSS , which you can use to make a table of contents.
我允许使用PagedMedia CSS ,您可以使用它来创建目录。
将输出通过管道wkhtmltopdf
到wkhtmltopdf
并使用其目录生产者表( pandoc --toc
不执行页码):
pandoc input.md -s -t html | wkhtmltopdf toc - output.pdf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.