![]() |
#1 |
Banned
![]() Posts: 8
Karma: 10
Join Date: Jan 2016
Device: none
|
Unable to generate custom toc
My real problem isn't really related to this file, but this works as a test case.
I want to know how can I specify the TOC using the levelX-toc options. I tried a million things but nothing work. Here is an example. In this case there is no match for the expression so the TOC created by calibre should be empty. However it still shows a TOC. How does the levelX-toc options work? Code:
book="pg5200.epub" ebook-convert "${book}" "${book%.*}.pdf" --level1-toc '//*[re:test(., "\s*((foobar)\s+)", "i"]' --no-chapters-in-toc I'm using an update version of Calibre in Linux via command line. After I know how to do this I'll be able to fix my real problem I think. Which would be to have all h1 tags to level2-toc and only a selected to level1-toc. Thanks in advance for any help. edit: added file (it was downloaded from the "EPUB (no images)" from https://www.gutenberg.org/ebooks/5200 ) Last edited by hounddog; 02-21-2016 at 11:41 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to generate a physical TOC? | Books987 | Conversion | 2 | 01-24-2015 11:08 PM |
html does not generate TOC | iliakan | Conversion | 3 | 01-05-2015 01:56 PM |
Unable to generate catalog | Jade Aislin | Library Management | 3 | 11-12-2012 09:58 PM |
PRS-950 A little web too to generate custom CSS | gsgleason | Sony Reader | 0 | 12-18-2011 06:51 PM |
generate TOC duplicates puzzle | cybmole | Calibre | 14 | 01-09-2011 07:01 PM |