View Single Post
Old 07-07-2013, 08:58 PM   #10
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 698
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by bubism View Post
Update

The links were created within Dreamweaver. It looks like the HTML to EPUB conversion (with Calibre) randomly deleted several anchors. I am now reinserting them in Sigil and the errors are slowly disappearing.

Other errors were caused by missing extended references to the right split where the anchors were. Since we are talking about roughly 1,700 anchors here, the only possible solution was to merge all the text into one file, but I am now very worried by how the readers will manage one sizeable file (310K).

Any suggestions will be very appreciated.
If it were me, and if possible, I would go back to the DreamWeaver HTML output and import it into Sigil rather than go through Calibre. Once in sigil, you can split it into reasonable "chapter files" (it will be slow working until you do this) and all the links should be correctly handled. At least, for me they are, but I've never tried 1700 anchors at a time.

What I'd do, before splitting, is go through and add sigil split markers where you want them (perhaps can be done via search-and-replace), and maybe do other things that make sense to be done over the whole book (e.g. add chapter headers or the like). Then split the book, validate, and clean up as necessary.

ETA: Also, before splitting, be sure to convert any in-line css definitions (located in the <head> section of the html file) to a separate .css file in sigil. That way, you only have to do it once, and the CSS will all be in one place rather than in each of the split chapters, for easy maintenance. (please ask if you need further instructions or clarification on this -- but do it for sure.) I don't work with dream weaver, but in the best of all possible worlds it would already produce a separate .css file in its output. Then just import that into the "Styles" directory in Sigil, make sure the appropriate link is provided in the <head> section of the HTML file, and you're good to go.

This is my normal workflow when dealing with epub export from InDesign CS4, which outputs the entire book in one .xhtml file. The largest I've worked on so far contained ~ 18,000 lines of code. It was a bit sluggish, but workable with the previewer turned off. (I usually work exclusively in code view.) So that's how I'd be inclined to handle your situation.

I've nothing against Calibre, but it is not known for producing especially human-readable code, and besides, from what you're saying it looks like this situation is beyond its capablilities.

BTW, the "sigil split marker" I'm referring to is

Code:
<hr class="sigil_split_marker" />
and is inserted (in code view) at the point where you want the split to occur. For me, that is usually just before the next chapter header.

Of course, you can insert them via book view as well, but you have to be very careful how you do it if you want to get the expected result. YOYO in that case, since I never do that. Other threads here (sigil forum) will have good information.

HTH

Albert

Last edited by st_albert; 07-07-2013 at 09:08 PM. Reason: forgot to add something
st_albert is offline   Reply With Quote