将书籍打包成单个pdf文件。

安装calibre(在这里下载),然后在GitBook文档目录下运行gitbook pdf便可。

 /d/docs/gitbook/tex (master) $ gitbook pdf
info: 27 plugins are installed
info: 20 explicitly listed
info: loading plugin "page-toc-button"... OK
info: loading plugin "page-treeview"... OK
info: loading plugin "back-to-top-button"... OK
info: loading plugin "splitter"... OK
info: loading plugin "code"... OK
info: loading plugin "search-pro"... OK
info: loading plugin "pageview-count"... OK
info: loading plugin "auto-scroll-table"... OK
info: loading plugin "popup"... OK
info: loading plugin "custom-favicon"... OK
info: loading plugin "scroll-to-top"... OK
info: loading plugin "anchors"... OK
info: loading plugin "klipse"... OK
info: loading plugin "prism"... OK
info: loading plugin "insert-logo"... OK
info: loading plugin "tbfed-pagefooter"... OK
info: loading plugin "flexible-alerts"... OK
info: loading plugin "donate"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 23 pages
info: found 37 asset files
warn: "options" property is deprecated, use config.get(key) instead
warn: "options.generator" property is deprecated, use "output.name" instead
info: >> generation finished with success in 12.2s !
info: >> 1 file(s) generated

打包成pdf,可读性比网页版还是差了一些,比如代码块一行太长直接截断,如下图所示:

gitbook-pdf-code

本文系Spark & Shine原创,转载需注明出处本文最近一次修改时间 2022-04-09 21:31

results matching ""

    No results matching ""