Mobileread
Advanced ebook formatting tips
#1  Nate the great 06-28-2009, 10:45 PM
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.
[zip] examples.zip (794 Bytes, 1754 views)
Reply 

#2  Nate the great 06-28-2009, 11:00 PM
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.
Reply 

#3  AlexBell 07-01-2009, 02:44 AM
Quote Nate the great
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
Reply 

#4  AlexBell 07-01-2009, 02:49 AM
Quote Nate the great
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
Reply 

#5  Nate the great 07-01-2009, 07:29 AM
Quote AlexBell
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.
Reply 

#6  radius 07-01-2009, 05:14 PM
Quote Nate the great
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!
Reply 

#7  radius 07-01-2009, 05:34 PM
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.
Reply 

#8  Elsi 07-01-2009, 05:58 PM
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.
Reply 

#9  zelda_pinwheel 07-01-2009, 07:52 PM
nate, i think this thread should be a sticky. since it's yours, i'll let you do the honours.
Reply 

#10  Nate the great 07-01-2009, 08:42 PM
Quote radius
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 radius

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 radius
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 Elsi
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.
Reply 

  Next »  Last »  (1/5)
Today's Posts | Search this Thread | Login | Register