06-28-2009, 11:45 PM | #1 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
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. |
06-29-2009, 12:00 AM | #2 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
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. |
Advert | |
|
07-01-2009, 03:44 AM | #3 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
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 |
|
07-01-2009, 03:49 AM | #4 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
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 |
|
07-01-2009, 08:29 AM | #5 | |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Quote:
|
|
Advert | |
|
07-01-2009, 06:14 PM | #6 | |
Lector minore
Posts: 655
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
|
Quote:
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;
}
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. |
|
07-01-2009, 06:34 PM | #7 |
Lector minore
Posts: 655
Karma: 1738720
Join Date: Jan 2008
Device: Aura One, Paperwhite Signature
|
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;
}
<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. |
07-01-2009, 06:58 PM | #8 |
Wizard
Posts: 2,366
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. |
07-01-2009, 08:52 PM | #9 |
zeldinha zippy zeldissima
Posts: 27,827
Karma: 921169
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.
|
07-01-2009, 09:42 PM | #10 | ||||
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
Quote:
Quote:
Quote:
Quote:
EDIT: Maybe tomorrow. Last edited by Nate the great; 07-01-2009 at 10:36 PM. |
||||
07-02-2009, 12:08 AM | #11 | |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
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 |
|
07-02-2009, 03:47 AM | #12 |
Banned
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 |
07-02-2009, 04:15 AM | #13 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
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 |
07-02-2009, 05:31 AM | #14 |
Banned
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. |
07-02-2009, 07:01 AM | #15 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
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 |
|
|
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 |