01-27-2016, 11:39 PM | #1 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
How add book when it's divided into separate html files?
Hi all!
I have been using Guido Henkel's Ebook Formatting Guide to prepare my novel for ebook publishing. He advises creating clean html versions, using simple CSS for formatting, etc. I build websites so I'm very comfortable with html/CSS, so great! However, based on other stuff I read, I made each chapter a separate html document -- to speed up load time on devices -- so I have: chapter01.html, chapter02.html, etc. I also have an introduction and an afterword (2 more html documents). Finally, I have a separate stylesheet for the CSS. All in a folder at the same level. Henkel advises using Calibri to convert the source file to the various formats for Amazon, iBooks, etc, and he has good instructions. But what I can't find instruction on is how to "add" my book to Calibri to start it all, when it is broken up this way, or even if that is possible. His instructions assume the book is all in one html document with CSS in the head. So, do I have to put the entire book's content into one giant html document to add it to Calibri? If not, can I have a separate stylesheet, linked in the head code of each document, or do I have to include styles in the head section of each document? If I can keep these separate documents, how do I "add book"? I saw in FAQ's in the user manual a section about creating a TOC as an html document which I can do, but it wasn't clear where that would go in the context of these separate documents. Do I create a TOC as noted in the FAQ and put them all together in one folder? Can I just add the folder with them all in there via "add book"? Greatly appreciate a response!! Thanks, thanks, thanks! |
01-28-2016, 12:08 AM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The ToC assumes all the files it points to are valid filesystem locations, but I don't believe it enforces any particular folder structure.
Import the ToC file itself, and it will drag in the linked files and bundle it as an HTMLZ (ZIPped HTML). Personally, I would recommend importing the files directly into the Editor (more control). In fact, I would suggest you do your HTML editing in calibre's Editor -- it makes a decent HTML editor and has tools to directly facilitate the needs of an EPUB. |
01-28-2016, 12:25 AM | #3 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
Eschwartz: Thank you for your reply!
OK, if I'm understanding you, I should create the html TOC as directed in the FAQ and when I go to "add book" in Calibri I select the TOC document and it will, in turn, bring the rest, right? Since each chapter document has the style sheet linked in it's head code the stylesheet should come in as well? Just want to be sure I understand :-) Re: I didn't know Calibri had an html editor. I used BBEdit because I do my normal coding in that. I'll check out the Calibri editor. While I've got you: is there any validity to the idea that breaking the book up into separate chapter documents will reduce load time on devices? That came from an ebook formatting book from 2012 -- not sure if conditions have changed enough to render that unnecessary? Thanks so much! |
01-28-2016, 01:07 AM | #4 |
Grand Sorcerer
Posts: 12,752
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
No.. He is suggesting to use the Calibre editor to CREATE the ePub; then, once it's made you would add it to calibre.
|
01-28-2016, 01:07 AM | #5 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
But as I said, you can also import the files into the Editor, rather than going through an HTMLZ ==> EPUB conversion. BBEdit -- that is a Mac application, yes? I don't believe the Mac builds of calibre have a .app launcher for the Viewer and Editor components of calibre -- you may have to go through the main Library gui to get to the Editor. Quote:
The Kindle and Kobo have no such issues, and they are the most common E-Ink devices (they cover most of the market). I don't know of any app ever that had the problem. It is mostly unnecessary to reduce load times, but I still think it is more organized to split by chapter. It gives you free chapter breaks (instead of setting page-break-* properties), and helps you keep track of where you are when editing. And there certainly is no good reason to specifically avoid doing so! Last edited by eschwartz; 01-28-2016 at 01:12 AM. |
||
01-28-2016, 01:55 AM | #6 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
Thanks!
Eshwartz: Just so you know, the idea of doing the HTML version is to be able to then convert both to ePub and other formats cleanly and thereby get better and more predictable results in different devices. The process involves stripping out word processing formatting/code, extra spacing, etc. and replacing that formatting with CSS styling, named entities for punctuation, etc. It made total sense to me because I do websites and am used to dealing with idiosyncrasies and limitations of different browsers and viewport sizes. And, over the years, have seen the horrible mess you get if you paste text directly from MS Word and the like into HTML pages.
So the idea is to create the clean HTML, then use Calibri to do conversions. I also have a book that walks you through creating epubs and mobis from scratch, building every file out of HTML documents -- once again, the goal being clean presentation regardless of device. Using Calibri cuts down on some of the steps -- or should! I've only just started using it so I'll see how it all works out. Thanks you so much for your help! Thank You Peter too! |
01-28-2016, 12:38 PM | #7 |
Well trained by Cats
Posts: 30,444
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I really don't think it matters When or How the cleanup phase is done.
You can ADD a series of HTML files following the directions in this FAQ http://manual.calibre-ebook.com/faq....specific-order |
01-31-2016, 11:37 AM | #8 |
Book E d i t o r
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
I would create the entire book in a .txt file without any HTML codes. Enter Chapter at the top of each chapter and enter ## above the word Chapter and above all the other sections of the book, like this:
## Title Author ## Prologue Your text... ## Dedication Your text... ## Chapter Your text... ## Epilogue Your text... Then open the .txt file in Calibre and convert it to epub. Click the Txt Input at the left, open the dropdown box under Structure, and choose Markdown. Doing this will create separate HTML files for each section in the book that has ## above it. When you have separate HTML files in the epub, they will each have page breaks before each section, so you won't have to do any extra coding for page breaks. Then you can use the Edit Book feature in Calibre to add all your CSS codes to everything. |
02-01-2016, 02:28 PM | #9 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
debeck: thank you for outlining the steps for working within Calibri from the start --
Just want to confirm something: if I were to bring a the book in as a txt file, it would have NO formatting, right? Part of the process I went through before importing into Calibri involved moving the text from a writing program to LibreOffice, where I was able to wrap italicized text with <i> tags, replacing -- with mdashes, etc. before bringing it into BBEdit. That way I didn't have to scroll through the whole book adding italics, etc. I BBEdit I wrapped all the paragraphs in para tags, replaced punctuation marks with named entities, removed extra spaces, etc. and did my styling. Is there a good search and replace function in Calibri's html editor? Last edited by Paula-59; 02-01-2016 at 02:47 PM. |
02-01-2016, 03:04 PM | #10 | |
Well trained by Cats
Posts: 30,444
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
But... Look at the writer2EPUB plugin for OO/LO It works pretty good |
|
02-01-2016, 03:59 PM | #11 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
I'd recommend breaking up the HTML into as many separate files as possible, i.e. start a new file every time there is a page break, as there is no disadvantage to doing so, and there are advantages on some devices. Last edited by GeoffR; 02-01-2016 at 04:13 PM. Reason: I suspect the same applies ... |
|
02-01-2016, 07:37 PM | #12 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
GoeffR: thanks for the input!
|
02-01-2016, 08:48 PM | #13 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
It would involve using a different workflow, and converting from markdown into HTML. Quote:
You can also use snippets etc. to wrap specified text in <i> tags, rather than importing into LibreOffice just for that. Where does the text start out -- what is your writing program? Last edited by eschwartz; 02-01-2016 at 08:51 PM. |
||
02-01-2016, 09:18 PM | #14 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
|
eschwarz: I used a program called Jer's Novel Writer - a mac based program.
I can export text as plain text, rtf, word and XHTML. The xhtml version had program-generated styles which I didn't want; though I could probably find/replace to remove/change. Jer's makes it easy to copy a chapter at a time and I found it nice a workable to do that, fwiw. |
Tags |
html book, toc creation |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Separate HTML Chapters/Files | Doctor T | Kindle Formats | 1 | 10-19-2014 03:47 PM |
Can't add HTML files in calibre | homeoLN | Conversion | 3 | 05-31-2013 08:06 PM |
ePub conversion not adding page breaks on separate HTML files | neonbible | Conversion | 1 | 11-06-2012 12:36 PM |
Newbie Question: Separate XHTML files become separate ePub files | marck | Conversion | 3 | 09-02-2011 01:58 PM |
Best way to convert to epub when book has separate chapter files? | Valkrider | Conversion | 4 | 04-07-2011 03:03 AM |