Hi there,
Firstly, big thanks to the developer(s) for Calibre.
In an effort to learn about recipes, I thought I'd start by tweaking the already-existing Ars Technica one. There were two main issues I wanted to address:
1. Formatting: captions, images, authors, dates etc. could do with prettier formatting, and I have not had too much trouble customising the existing recipe to achieve this.
2. Structure / TOC in *.mobi: this is where I am stuck at the moment. I would appreciate help & advice on this. I am obviously new at this, so wouldn't be suprised if I'd missed something obvious.
This is what I do (using 0.7.40):
Code:
ebook-convert $CALIBRE_PATH/resources/recipes/ars_technica.recipe ars.mobi -vv --debug-pipeline ars_debug/ --test --output-profile=kindle
And then:
Code:
ebook-viewer ars.mobi
The problem is that when I click on the TOC in ebook-viewer, the main view moves to after the article title, image and caption, right at the beginning of the main article text. The behaviour I was expecting was that it should move to the beginning of the article, including the title/headline (this is what happens when I run the same command, but using the nytimes_sub recipe instead).
So I guess structure detection may be going wrong?
The article headline/titles are tagged with <h2> for both NYTimes and Ars Technica processed html, so I don't understand what is going on. I have tried to look at the processed HTML from the NYT recipe in detail, comparing to the Ars Technica processed HTML but I haven't found a clue as to what might be different which would explain bad structure detection in one case but not the other.
As a first attempt at forcing the structure detection, I tried adding
Code:
--level3-toc=//h:h2
to the command line, but to be honest I am a bit confused as to how I should go about debugging the problem. In fact, I'm still not sure whether it has to do with structure detection at all.
Any pointers, advice etc would be gratefully received!
Thanks!