View Single Post
Old Yesterday, 12:52 PM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 54,065
Karma: 182150337
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
  1. In Sigil, you select the files to merge and then Merge from the right click menu or ctrl-M using the keyboard.
  2. I did a search and replace for '<h1' and replaced with '<hr class="sigil_split_marker" /> <h1'
  3. The option is under Sigil's Edit Menu Split At Markers or F6 on the keyboard
  4. I simply removed all the ids. Find id=".*?" and replace with nothing using Regex mode. If there had been an index or footnotes, it would have been more complex.
  5. The new Toc was generated in Sigil. I generally use Sigil for most of my ePub edits and drop into calibre's editor for those items it handles better (finding duplicate CSS for instance).
  6. A ToC entry can either point to a html file or an id within a html file. For the first header in a html file, Sigil just creates a ToC entry, for subsequent headers below the first one in a file, an id is generated. i.e.
    Code:
      <h1 class="block_">$10 Million, 10 Years, Zero Excuses</h1>
      <h3 class="calibre6" id="sigil_toc_id_1">
    The number is incremented for each subsequent generated ID within the ePub.
  7. I generated a ToC from the h1 headers and used that to generate the simplified HTML ToC (the one you see inline in the ebook). I then generated a full ToC from the h1 to h4 headers which is the one you see when you open the ToC. I originally generated the ePub as an ePub3 but generated an ePub2 version since I was not happy with calibre's ePub3 conversion. As a habit when working with ePub3, I also generate the NCX file used by ePub2 for it's navigation document just for backwards compatibility. This is not normally required since most documents do not have a very complex ToC.

This was pretty much a quick and dirty edit just to get a compliant ePub for the KF8/azw3 conversion.
DNSB is offline   Reply With Quote