diff options
Diffstat (limited to 'lib/generate/ebook/index.js')
-rw-r--r-- | lib/generate/ebook/index.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/generate/ebook/index.js b/lib/generate/ebook/index.js index eb85b30..d3b2aea 100644 --- a/lib/generate/ebook/index.js +++ b/lib/generate/ebook/index.js @@ -37,10 +37,12 @@ Generator.prototype.finish = function() { "--authors": that.options.author, "--chapter": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter ')]", "--chapter-mark": "pagebreak", + "--page-breaks-before": "/", "--level1-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-1 ')]", "--level2-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-2 ')]", "--level3-toc": "descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), ' book-chapter-3 ')]", - "--no-chapters-in-toc": true + "--no-chapters-in-toc": true, + "--max-levels": "1000" }; if (format == "pdf") { @@ -56,8 +58,8 @@ Generator.prototype.finish = function() { "--pdf-mono-font-size": String(pdfOptions.fontSize), "--paper-size": String(pdfOptions.paperSize), "--pdf-page-numbers": Boolean(pdfOptions.pageNumbers), - "--pdf-header-template": pdfOptions.headerTemplate, - "--pdf-footer-template": pdfOptions.footerTemplate + "--pdf-header-template": String(pdfOptions.headerTemplate), + "--pdf-footer-template": String(pdfOptions.footerTemplate) }); } |