03-23-2012, 08:46 PM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2011
Device: none
|
Force newline, and smart quotes
Hi All –
I'm at last going great with formatting into .mobi using Calibre to produce an Amazon e-book; discovered yesterday you can upload a book in .mobi form even though the Amazon webpage doesn't hint that you can! I also discovered Amazon doesn't like you posting 'testing' type pseudobooks! :-) Anyway, I'm trying to save an image file by writing a diagram in text, but I need to just force a simple newline throw at some points. Any ideas? I can't do or face CSS. Also, I've heard somewhere that it's best to use dumb quotes, but when I forget to convert them, smart quotes come out fine in Kindle for Mac and also Kindle previewer. Do we really need to stick to dumb quotes? I hope this was an ok place to ask this. Cheers. |
03-24-2012, 03:20 AM | #2 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
This appears to have absolutely nothing whatsoever to do with Calibre. I'm moving it to the Mobi forum.
|
03-24-2012, 03:23 AM | #3 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Don't do text "diagrams"; if you need a diagram, use a diagram and include it as a graphical image in the book.
Yes, smart quotes are absolutely fine in a Mobi book. Just make sure you specify the correct code page. |
03-24-2012, 09:53 AM | #4 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2011
Device: none
|
Thanks Harry!
Sorry about the wrong sub-forum... I'm never certain about whether effects are caused by for example the mobi identity of the file or something Calibre does with it. I've discovered that I can of course throw a line by using <br>. Trouble is, I tend to automatically ignore the obvious since the pagebreak command doesn't work and I have to devote a dummy header level to do that. I'm going to have a go with smart quotes then. However I'll just have to rely on Calibre sorting them out as it seems to, since the "correct code page" you speak of is Greek to me. I'm up against the 10MB limit which is why I'm trying to diagram in text if I can. The Kindle Previewer suggests the sort of thing below works successfully for most devices except the iPhone, but if iPhone viewers switch to the smallest type it's not too scrambled: ___ Coraciiformes: (kingfishers, hornbills, rollers, and allies)<br> |<br> | ____unnamed_ here_________<br> | | ____[Alcedimiformes without trogons?]________<br> | | |<br> | | | kingfishers – Alcedo<br> | | | motmots – Momotus<br> | | | todies – Todus<br> | | | ground rollers – Brachypteracias <br> | | | 'core' rollers – Coracias<br> | | | bee-eaters – Merops<br> | | |___________________<br> | |<br> | | ____ Piciformes: (woodpeckers etc.)<br> | | | <br> Cheers and thanks. |
03-24-2012, 12:02 PM | #5 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2011
Device: none
|
Important note for those tempted to go through their text in html form, 'educating' quotes to curly form... only do this with bits of real text – don't do it within html commands or they'll be ignored. For example, some aspects of names of headings, or image inclusions including "center". Curlify them, and the images won't be included :-S .
|
03-24-2012, 08:13 PM | #6 |
Wizard
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
|
The page break tag for Mobipocket is a custom tag: <mbpagebreak/>.
|
03-25-2012, 11:07 AM | #7 |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
The mobi pagebreak is now deprecated, and we are urged instead to use CSS. Here is mine:
p.breakhere { page-break-before: always } Then in the text, <p class="breakhere"> The html tag for a left double quote is “ (which can be easily adapted for right double quote or left or right single quote). If what the OP wanted is a blank line, that is difficult to achieve across all Kindle apps unless one does this: <p> <br /></p> I think it's a mistake to get too fancy with Kindle formatting, for example by trying to create text diagrams. Hope that helps! Last edited by Oldpilot; 03-25-2012 at 11:09 AM. |
03-25-2012, 11:28 AM | #8 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Your code example will convert fine, and will achieve the same goal, but both techniques are going to result in a <mbp:pagebreak/> tag in the long run. ;) |
|
03-26-2012, 01:01 PM | #9 | |
Groupie
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
By the Kindle Publishing Guidelines:
Quote:
Interesting that the conversion replaces "breakhere" with the mobibreak, but I suspect that will be phased out over time. That's okay for those of us who are active on the KDP and can keep updating our books, less so for a one-off publisher. |
|
03-26-2012, 01:47 PM | #10 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Forgive me for noticing, but that snippet from the guidelines mentions nothing about the <mbp:pagebreak/> tag, nor it's deprecation. But whatever, it's not that big of a deal. ;)
|
03-27-2012, 03:36 AM | #11 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Two notes of interest:
1. br tags really are bad coding. I'm not trying to be the html police, but you're far better off (and get infinitely smoother results) using top- and bottom-margin settings and/or break-before/after. HOWEVER, there's not a bloody thing wrong with the mbp pagebreak command, it's not actually deprecated. Amazon put that section in the Guidelines to stop those people who are addicted to the damn "enter" key, whacking the holy crap out of it to "force" page breaks and vertical whitespace. the mbp pagebreak command works fine. 2. More importantly to this discussion, kids, is this: don't use curlies or smartquotes in your ncx (and/or your chapter headers, if you're building your TOC therefore, either in Calibre and/or MBPC and/or KG); it will break the ncx. You have to be extremely careful about what encoded entities you use for anything that could end up in the ncx. Avoid Curlies if you can, including apostrophes and other "smart" Word-style entities. HTH, Hitch |
03-27-2012, 07:09 AM | #12 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
03-27-2012, 02:23 PM | #13 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Diap:
Are we talkin' Mobi or ePUB here? I see I wasn't explicit, in my language, but I was talking about the mobi ncx, which will break in the devices and in K4PC (for whatever the latter is worth). H. |
03-27-2012, 02:42 PM | #14 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's true you can't use entities like & rsquo; in the NCX file, but you can put the actual right single-quote (’) unicode character in there with no problems (the forum doesn't render that quote very "curly" but I assure you it is ). |
|
03-30-2012, 07:51 AM | #15 |
Member
Posts: 17
Karma: 10
Join Date: Dec 2011
Device: none
|
Thanks lots to HarryT, susan_cassidy, Oldpilot, DiapDealer and Hitch for all that advice!
The whole area seems very chewy! Cheers... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Smart Quotes | Paxman53 | Sigil | 15 | 02-15-2012 08:31 PM |
Calibre and Smart Quotes | salasnet | Calibre | 9 | 09-27-2010 04:32 AM |
Smart Quotes | Toxaris | ePub | 2 | 05-31-2010 10:32 AM |
Smart quotes in XHTML? | MaggieScratch | ePub | 12 | 03-28-2009 05:53 PM |
Smart quotes in RTF? | ogghead | Sony Reader | 8 | 01-23-2007 06:38 PM |