Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2016, 10:39 PM   #1
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
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!
Paula-59 is offline   Reply With Quote
Old 01-27-2016, 11:08 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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.
eschwartz is offline   Reply With Quote
Advert
Old 01-27-2016, 11:25 PM   #3
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
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!
Paula-59 is offline   Reply With Quote
Old 01-28-2016, 12:07 AM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,250
Karma: 74000002
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
No.. He is suggesting to use the Calibre editor to CREATE the ePub; then, once it's made you would add it to calibre.
PeterT is offline   Reply With Quote
Old 01-28-2016, 12:07 AM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by Paula-59 View Post
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.
Yes.

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:
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!
It will help for people who have really old devices. It was definitely a big problem with at least some of the Sony PRS devices.
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 12:12 AM.
eschwartz is offline   Reply With Quote
Advert
Old 01-28-2016, 12:55 AM   #6
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
Smile 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!
Paula-59 is offline   Reply With Quote
Old 01-28-2016, 11:38 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,944
Karma: 55705602
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
theducks is offline   Reply With Quote
Old 01-31-2016, 10:37 AM   #8
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
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.
deback is offline   Reply With Quote
Old 02-01-2016, 01:28 PM   #9
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
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 01:47 PM.
Paula-59 is offline   Reply With Quote
Old 02-01-2016, 02:04 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,944
Karma: 55705602
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Paula-59 View Post
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?
Calibre editor has REGEX S&R

But...

Look at the writer2EPUB plugin for OO/LO It works pretty good
theducks is offline   Reply With Quote
Old 02-01-2016, 02:59 PM   #11
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by Paula-59 View Post
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?
The size of the individual HTML files in ePub books does affect the time it takes to turn the page to start a new file on current Kobo devices. The reading experience for large ePubs on Kobo devices is definitely better for books that are split into one file per chapter than for those which are not. Edit: I suspect the same applies to any device with limited memory that has a reader based on Adobe RMSDK.

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 03:13 PM. Reason: I suspect the same applies ...
GeoffR is offline   Reply With Quote
Old 02-01-2016, 06:37 PM   #12
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jan 2016
Device: none
GoeffR: thanks for the input!
Paula-59 is offline   Reply With Quote
Old 02-01-2016, 07:48 PM   #13
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
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:
Originally Posted by Paula-59 View Post
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?
Markdown has its own way of applying formatting, via things like **bold** and _italics_ (depending on which dialect you use, it's the double asterisk or the switch to underscore that matters).

It would involve using a different workflow, and converting from markdown into HTML.

Quote:
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?
calibre has an excellent S&R (based on the enhanced regex module), which also has a function-replace mode that calls custom user-created python functions to generate the replacement text.

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 07:51 PM.
eschwartz is offline   Reply With Quote
Old 02-01-2016, 08:18 PM   #14
Paula-59
Enthusiast
Paula-59 began at the beginning.
 
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.
Paula-59 is offline   Reply With Quote
Reply

Tags
html book, toc creation


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate HTML Chapters/Files Doctor T Kindle Formats 1 10-19-2014 02:47 PM
Can't add HTML files in calibre homeoLN Conversion 3 05-31-2013 07:06 PM
ePub conversion not adding page breaks on separate HTML files neonbible Conversion 1 11-06-2012 11:36 AM
Newbie Question: Separate XHTML files become separate ePub files marck Conversion 3 09-02-2011 12:58 PM
Best way to convert to epub when book has separate chapter files? Valkrider Conversion 4 04-07-2011 02:03 AM


All times are GMT -4. The time now is 08:12 AM.


MobileRead.com is a privately owned, operated and funded community.