Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 06-28-2009, 11:45 PM   #1
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,571
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Advanced ebook formatting tips

Elsi said she was interested in refining her ebook creation skills, so I decided to start this thread so we can share our best techniques. This thread is open to everyone. If you do something that you don't see here, post it.

When I make an ebook, I may start in Book Designer, but I always save as html becuase I prefer to work directly with the html. I think this produces the best ebook.

The first file is an example of how I do chapter headings. Open the file in a text editor, and note the page break, anchor, and the tags. If you add this file to a Mobi ebook, the code will work. I'm told it will also work with Epub, but I haven't tested it.

The second file is a title page. This goes as the first file in the ebook or at the very beginning of the only file. Note that there is a page break at the end; this is what makes it a page.

P.S. I only started using proper html today (before I was using nonstandard Mobi crap), so these files are not exactly perfect. You may want to tweak them so they look good to you.

P.P.S. I'd like to thank zelda for showing me the correct html, and Joshua Tallent for his book Kindle Formatting: The Complete Guide.
Attached Files
File Type: zip examples.zip (794 Bytes, 1203 views)
Nate the great is offline   Reply With Quote
Old 06-29-2009, 12:00 AM   #2
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,571
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
One last thing:

I'd recommend trying fonts for the chapter heading and book title that are different from the text of the ebook. If done right, it can enhance the ebook.
Nate the great is offline   Reply With Quote
 
Advertisement
Old 07-01-2009, 03:44 AM   #3
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 2,319
Karma: 3943904
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Quote:
Originally Posted by Nate the great View Post
One last thing:

I'd recommend trying fonts for the chapter heading and book title that are different from the text of the ebook. If done right, it can enhance the ebook.
No, I'm sorry, I don't agree, for two linked reasons.
Firstly, you don't have any control over what font (or font size) the readers of your ebook prefer to use. If you rely on the contrast between font X (the heading and font Y (the text) what will you do if your reader has set font Z as his or her preferred font? Or has set font X as the preferred font for text?
Secondly, and probably more importantly, ebooks are not print books, and what works for print books does not work for ebooks. Because readers can choose their font and font size the focus in designing ebooks should, in my opinion, be on the content and not the appearance. I think designing good ebooks requires a totally different mind set to designing print books, just as designing websites requires a different mindset from designing print books.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 07-01-2009, 03:49 AM   #4
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 2,319
Karma: 3943904
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Quote:
Originally Posted by Nate the great View Post
Elsi said she was interested in refining her ebook creation skills, so I decided to start this thread so we can share our best techniques. This thread is open to everyone. If you do something that you don't see here, post it.

When I make an ebook, I may start in Book Designer, but I always save as html becuase I prefer to work directly with the html. I think this produces the best ebook.

<snippped>

P.P.S. I'd like to thank zelda for showing me the correct html, and Joshua Tallent for his book Kindle Formatting: The Complete Guide.
Thanks for the examples. I would like to see more examples and discussion on designing ebooks.

For what it is worth I am struggling with designing an XHTML ebook template. I'll upload it for comments in a day or so, though it certainly won't be finished by then.

I also found Joshua Tennents book interesting and helpful, and recommend it.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 07-01-2009, 08:29 AM   #5
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,571
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by AlexBell View Post
No, I'm sorry, I don't agree, for two linked reasons.
Firstly, you don't have any control over what font (or font size) the readers of your ebook prefer to use. If you rely on the contrast between font X (the heading and font Y (the text) what will you do if your reader has set font Z as his or her preferred font? Or has set font X as the preferred font for text?
Secondly, and probably more importantly, ebooks are not print books, and what works for print books does not work for ebooks. Because readers can choose their font and font size the focus in designing ebooks should, in my opinion, be on the content and not the appearance. I think designing good ebooks requires a totally different mind set to designing print books, just as designing websites requires a different mindset from designing print books.

Regards, Alex
But you can embed the font in Epub, and even with Mobi you can include them with a zip file.
Nate the great is offline   Reply With Quote
Old 07-01-2009, 06:14 PM   #6
radius
Lector minore
radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.
 
radius's Avatar
 
Posts: 362
Karma: 128734
Join Date: Jan 2008
Device: Sony PRS-T3, Amazon Kindle PaperWhite 2
Quote:
Originally Posted by Nate the great View Post
The first file is an example of how I do chapter headings. Open the file in a text editor, and note the page break, anchor, and the tags. If you add this file to a Mobi ebook, the code will work. I'm told it will also work with Epub, but I haven't tested it.
Hi Nate, great idea for a thread.

Personally, I would like to use heading tags for chapter titles. So for example, I might use h1 for the book title and then h2 for each chapter title because I don't see chapter titles as just being special paragraphs.

Then, since there seems to be a slight preference on Mobileread among North American English readers to have paragraphs indicated by indenting but not indent the first paragraph, I would add something like this:

Code:
p {
    text-indent: 1.5em;
}

h2 + p {
    text-indent: 0em;
}
This should make most paragraphs have an indent of 1.5em but paragraphs that come after chapter headings have no indent.

I got this snippet from the Thoughtcrime Experiments Anthology which is a nicely laid out e-book.

Edit: Also, I'm curious why you put some top margin in your first paragraph of text. Why not put bottom margin on the chapter title? Then all of the text could be just plain paragraphs.

Edit 2: If you use some kind of break to indicate switch of point of view, or time has passed etc. (like a horizontal rule, or maybe some centered asterisks etc.) don't forget to make a rule for the first paragraph after the break to also not indent....

Edit 3: <headslap> I forgot to mention that the reason my copy of Thoughtcrime Experiments is so nicely laid out is because it was done by forum member llahsram!

Last edited by radius; 07-01-2009 at 06:52 PM.
radius is offline   Reply With Quote
Old 07-01-2009, 06:34 PM   #7
radius
Lector minore
radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.radius trips the light fantastic.
 
radius's Avatar
 
Posts: 362
Karma: 128734
Join Date: Jan 2008
Device: Sony PRS-T3, Amazon Kindle PaperWhite 2
Another idea I got from Thoughcrime Experiments and from forum user pepak is use emphasis tags to make text regular typeface instead of italics.

I was working on a copy of Enter Without Desire by Ed Lacy that I downloaded from Munsey's, and there is a preface which is shown italicized, and then there is a word here and there which is shown in regular typeface for emphasis.

What I originally did was something like:

<em>...blah blah blah...</em>emphasized words<em>...blah blah blah...</em>

Which works but is very inelegant from the point of marking up text semantically.

If you put in some CSS that looks like this:

Code:
.preface {
    font-style: italic;
}

.preface em {
    font-style: normal;
}
then you can instead write:

<div class="preface">...blah blah blah...<em>emphasized word</em>...blah blah blah...</div>

which is a lot more satisfying.

Last edited by radius; 07-01-2009 at 07:11 PM.
radius is offline   Reply With Quote
Old 07-01-2009, 06:58 PM   #8
Elsi
Wizard
Elsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of lightElsi is a glorious beacon of light
 
Elsi's Avatar
 
Posts: 2,372
Karma: 12000
Join Date: Jan 2008
Location: Texas, USA
Device: Kindle; Sony PRS 505; Blackberry 8700C
Guys -- this is exciting!

Can someone relate this markup to Calibre? It seems that although I start from the same source that Calibre's "rules" for chapter detection are different for LRF output than they are for MOBI output. I find that I just run Calibre with all the defaults when I create books, and I'm sure there is a smarter way to do this.
Elsi is offline   Reply With Quote
Old 07-01-2009, 08:52 PM   #9
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
nate, i think this thread should be a sticky. since it's yours, i'll let you do the honours.
zelda_pinwheel is offline   Reply With Quote
Old 07-01-2009, 09:42 PM   #10
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,571
Karma: 3586209
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by radius View Post
Hi Nate, great idea for a thread.

Personally, I would like to use heading tags for chapter titles. So for example, I might use h1 for the book title and then h2 for each chapter title because I don't see chapter titles as just being special paragraphs.

Then, since there seems to be a slight preference on Mobileread among North American English readers to have paragraphs indicated by indenting but not indent the first paragraph, I would add something like this:
I like to make the chapter headings a defined amount larger than the text for reasons of control. I don't know for certain that the header tags will scale at the same rate as the text when the user changes the font size. If I use p tags to designate so many sizes larger, then I will know how it behaves.

Quote:
Originally Posted by radius View Post

Edit: Also, I'm curious why you put some top margin in your first paragraph of text. Why not put bottom margin on the chapter title? Then all of the text could be just plain paragraphs.
That's an excellent idea. This way we only need to insert one tag and attribute, instead of two.

Quote:
Originally Posted by radius View Post
Edit 2: If you use some kind of break to indicate switch of point of view, or time has passed etc. (like a horizontal rule, or maybe some centered asterisks etc.) don't forget to make a rule for the first paragraph after the break to also not indent....
Actually, most of the paper books I've checked have that first paragraph after the scene break indented. BTW, I love the hr tag, but after several request I now use 3 centered asterisks instead. A non-indented paragraph would be a good idea for those ebook creators who use blank space as a scene break, though. The blank space separator is too subtle for me.

Quote:
Originally Posted by Elsi View Post
Guys -- this is exciting!

Can someone relate this markup to Calibre? It seems that although I start from the same source that Calibre's "rules" for chapter detection are different for LRF output than they are for MOBI output. I find that I just run Calibre with all the defaults when I create books, and I'm sure there is a smarter way to do this.
It's possible to tell calibre what tags and atributes to build a toc out of. This really belongs in a separate thread. I'll start it later tonight.

EDIT: Maybe tomorrow.

Last edited by Nate the great; 07-01-2009 at 10:36 PM.
Nate the great is offline   Reply With Quote
Old 07-02-2009, 12:08 AM   #11
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Quote:
Originally Posted by AlexBell View Post
For what it is worth I am struggling with designing an XHTML ebook template. I'll upload it for comments in a day or so, though it certainly won't be finished by then.
I'm working now on a set of macros to implement a very basic xhtml template. I use NoteTab, so it's slightly influenced by the way that editor works.

I posted publicly here, looking for feedback. I'd love to see what you're doing, and if there's any chance to help each other.

My basic premise is that the xhtml is an archive file, convertible to anything else. It's also heavy on meta information, and fairly strict in its layout so that I can automate the creation/conversion using regex and search/replace macros.

Done properly, it should be trivial to generate .oef files, and .epub.

m a r

Last edited by rogue_ronin; 07-02-2009 at 12:10 AM. Reason: typo
rogue_ronin is offline   Reply With Quote
Old 07-02-2009, 03:47 AM   #12
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Of course, I've changed what's listed there -- once I finish working through my tools, I'll have an "improved" version. For example, Table of Contents, what I'm working on now, has had to change.

I'm a beginner at xhtml -- trying for a purely semantic markup is both easier and more thought-intensive...

I haven't even been able to consider the CSS part yet!

I'll post some thoughts on markup soon. I'm on the hump with this, just at around 50% done.

m a r
rogue_ronin is offline   Reply With Quote
Old 07-02-2009, 04:15 AM   #13
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 2,319
Karma: 3943904
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
As mentioned in an earlier post here is the very first draft of an ebook template. The zip file contains EbookTemplate.html, ebook.css, EbookTemplate.jpg (for the cover), and pachelbel.jpg for the title page.

Yes, I know Pachelbel is best known as a composer rather than an author, but he looks so cute.

I have built EbookTemplate.prc with Mobipocket Creator, and it seems to look reasonable on a Cybook Gen3. I'd really appreciate it if people could look at it on other readers, and especially if people could suggest improvements in the HTML and CSS. I'd like the Author and Book title to look better than they do.

Regards, Alex
Attached Files
File Type: zip EbookTemplate.zip (30.4 KB, 687 views)
AlexBell is offline   Reply With Quote
Old 07-02-2009, 05:31 AM   #14
rogue_ronin
Banned
rogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-booksrogue_ronin has learned how to read e-books
 
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
Minor error: image is Pachelbel.jpg, but html file is looking for pachelbel.jpg -- didn't show up on my system until I renamed the jpg.

First impression: isn't the name attribute deprecated? Should you add the id attribute directly to either the div or the h#?

One of the things that I'm doing is making sure that each div has a unique name -- as you've done with the id="titlepage" bit. This will let you apply styles to any section individually.

If you were to use divs for each chapter, you would not have to explicitly page-break. Simply make it a part of the CSS.

Good start!

m a r

Last edited by rogue_ronin; 07-02-2009 at 05:38 AM.
rogue_ronin is offline   Reply With Quote
Old 07-02-2009, 07:01 AM   #15
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 2,319
Karma: 3943904
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Quote:
Originally Posted by rogue_ronin View Post
Minor error: image is Pachelbel.jpg, but html file is looking for pachelbel.jpg -- didn't show up on my system until I renamed the jpg.

First impression: isn't the name attribute deprecated? Should you add the id attribute directly to either the div or the h#?

One of the things that I'm doing is making sure that each div has a unique name -- as you've done with the id="titlepage" bit. This will let you apply styles to any section individually.

If you were to use divs for each chapter, you would not have to explicitly page-break. Simply make it a part of the CSS.

Good start!

m a r
Thanks, and sorry about the jpg.

So far as I know the name attribute is is not deprecated, and I don't know of any alternative for it. The file validates as XHTML strict, which it wouldn't do if name was deprecated.

id refers to unique divs or elements; there is only one title page but several chapters, and I don't think it's worth the trouble to give each chapter a unique id. And the other side of the coin is that although I have only one Author's name h1 I may well want to use several h3s, so I can't make them unique.

Could you give an example please of how a chapter could be put into it's own div and not need an explicit page break? I'd certainly use that technique, but can't work out how to do it.

And could you tell me please whether you built the prc with Mobipocket Creator or with Calibre? And what reader you are using? I suspect there are differences in the way a given prc or mobi format ebook looks depending on how it was built and on what reader it is read, but as I have only a Cybook and can't work out how to use Calibre I've no way of testing that suspicion.

Regards, Alex
AlexBell is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New ebook user, looking for tips and advice krunk Amazon Kindle 3 09-20-2010 06:35 PM
My fiction...formatting thoughts and tips...? Simon John Cox Writers' Corner 5 01-22-2010 12:25 AM
My share on making an Ebook! For Easy - Medium - and semi-advanced books. ProDigit Reading and Management 16 06-08-2009 10:28 AM
An example of an eBook with terrible formatting jswinden Amazon Kindle 10 05-08-2009 07:44 PM


All times are GMT -4. The time now is 03:55 AM.


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