06-03-2010, 05:57 PM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Jun 2010
Device: none
|
Creating Sectionbreaks (i.e. defining widths)
A standard section break (within a chapter) is three stars, or other symbol, spaced equidistant across the page. I can do this with CSS/HTML easily enough, but kindlegen removes all formatting, leaving the three stars lumped together in the middle of the screen.
I can't manually add non-breaking spaces between the stars, because I don't know how wide the device's screen will be. Any thoughts on how to fix this obvious problem? Note - please don't suggest I just use an hr of percentage width. If I can find a fix for the actual star problem instead of kludging a replacement, then I'll be able to fix a number of other problems as well, thus saving me from posting eight different questions at once that all relate to the same basic concept. I should note that I'm using the cleanest HTML imaginable (hand-coded and xhtml 1.1 compliant) and running it through the latest command-line version of kindlegen on the Mac. I have also tried Calibre, but get the same results. Thanks! -James Last edited by synosure; 06-03-2010 at 05:59 PM. Reason: additional info |
06-04-2010, 06:20 AM | #2 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
It could be done with in HTML with a table, but I doubt mobipocket/kindlegen support it. Try something like:
Code:
<table width="75%"> <tr> <td align="center" width="33%">*</td> <td align="center" width="33%">*</td> <td align="center" width="33%">*</td> </tr> </table> |
Advert | |
|
06-04-2010, 12:53 PM | #3 |
Member
Posts: 13
Karma: 10
Join Date: Jun 2010
Device: none
|
Sadly, no tables
Sadly, the mobi format is very specific: tables can not be used for layout purposes, only to display information that actually belongs in a table. Of course, they also don't support using floating divs, so they apparently just don't care about layout. You'd think that if they weren't going to really support html they could have at least added special commands for sectionbreaks and epigraphs, since I run up against this same issue with both.
|
06-04-2010, 03:05 PM | #4 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Not using tables for layout is a (very good) general recomendation, there's nothing in the format that actually prevents it if that's what you want.
Without tables, your only solution is probably using an image with a relative width, if it works. But anyway, the mobipocket format allows only for some basic layout, you should't try to be very specific. For a section break, I'd just use an <hr> or fixed-spaced asterisks, sure, it's not as nice as with printed books, but the meaning is conveniently conveyed; there are many other things that can't be done in mobipocket. |
06-04-2010, 04:22 PM | #5 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
I've used tables in a number of my Mobi books; they are the only way (that I know of) of presenting data in multiple columns.
What I did very soon discover, though, is that different Mobi implementations have very different support for tables. Some respect specified column widths; others don't. But stick to very simple table layouts and they work OK. |
Advert | |
|
Tags |
kindlegen, margins, widths |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Defining Metadata with "calibredb add" command line function. | macr0t0r | Calibre | 3 | 03-01-2012 07:36 PM |
Creating Catalogs (Archived) | GRiker | Library Management | 419 | 01-23-2011 03:16 PM |
Highlighting, Defining Words on K3 - Problem with | detacht69 | Amazon Kindle | 2 | 09-29-2010 10:36 PM |
Need Help Creating an eBook | jaylemi | Workshop | 1 | 06-25-2010 08:04 PM |
Help with creating IMP, please | vivaldirules | Upload Help | 5 | 02-07-2008 10:53 PM |