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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 03-23-2012, 09:46 PM   #1
Streadmob
Member
Streadmob began at the beginning.
 
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.
Streadmob is offline   Reply With Quote
Old 03-24-2012, 04:20 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,601
Karma: 44618293
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
This appears to have absolutely nothing whatsoever to do with Calibre. I'm moving it to the Mobi forum.
HarryT is offline   Reply With Quote
Old 03-24-2012, 04:23 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,601
Karma: 44618293
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
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.
HarryT is offline   Reply With Quote
Old 03-24-2012, 10:53 AM   #4
Streadmob
Member
Streadmob began at the beginning.
 
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.
Streadmob is offline   Reply With Quote
Old 03-24-2012, 01:02 PM   #5
Streadmob
Member
Streadmob began at the beginning.
 
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 .
Streadmob is offline   Reply With Quote
Old 03-24-2012, 09:13 PM   #6
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 1,964
Karma: 1726558
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
The page break tag for Mobipocket is a custom tag: <mbpagebreak/>.
susan_cassidy is offline   Reply With Quote
Old 03-25-2012, 12:07 PM   #7
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
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 &ldquo; (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>&nbsp;<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 12:09 PM.
Oldpilot is offline   Reply With Quote
Old 03-25-2012, 12:28 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,563
Karma: 44291176
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
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">
Deprecated and urged by whom? Kindlegen (and all other programs that build MOBIs) will take the CSS you provided and convert it directly to <mbp:pagebreak/> in the resulting Mobi's internal markup. Unpack any brand-new mobi file and you will find scads of <mbp:pagebreak/> scattered throughout. That's because excluding the new KF8 format, MOBI still doesn't do CSS. At all. All the CSS is converted (by kindlegen et al) into html 3.2 attributes, and mobi-specific tags like <mbp:pagebreak/>

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. ;)
DiapDealer is offline   Reply With Quote
Old 03-26-2012, 02:01 PM   #9
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
Deprecated and urged by whom?
By the Kindle Publishing Guidelines:
Quote:
3.1.2 Text Guideline #2: Use CSS for Page Breaks
Do not insert blank lines of text to create empty pages. Use the CSS page-break-before and pagebreak-after attributes
I appreciate they're trying to avoid lots of Enter-Enter stuff, but going to CSS is almost certainly one of the KDP's "future-proofing" protocols.

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.
Oldpilot is offline   Reply With Quote
Old 03-26-2012, 02:47 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,563
Karma: 44291176
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Oldpilot View Post
By the Kindle Publishing Guidelines:

3.1.2 Text Guideline #2: Use CSS for Page Breaks
Do not insert blank lines of text to create empty pages. Use the CSS page-break-before and pagebreak-after attributes
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. ;)
DiapDealer is offline   Reply With Quote
Old 03-27-2012, 04:36 AM   #11
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,711
Karma: 15513561
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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
Hitch is online now   Reply With Quote
Old 03-27-2012, 08:09 AM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,563
Karma: 44291176
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Hitch View Post
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.
Entities... yes. I agree. Those shouldn't be used in the NCX (named or otherwise). But the NCX file is perfectly capable of handling actual "curly-quotes" (and other unicode characters). I use them all the time. It's still a utf-8 encoded document... it's just not (x)html.
DiapDealer is offline   Reply With Quote
Old 03-27-2012, 03:23 PM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,711
Karma: 15513561
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
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.
Hitch is online now   Reply With Quote
Old 03-27-2012, 03:42 PM   #14
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,563
Karma: 44291176
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Hitch View Post
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.
I'm talking either/or. I have epubs that have curly-quotes and special unicode characters (acutes, umlauts, etc...) in the NCX file that work just fine. I convert those epubs to mobis using kindlegen and they still work fine on Kindle devices/apps. Using Kindle Previewer, I can verify all the special characters are still in the NCX of the resulting mobi.

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 ).
DiapDealer is offline   Reply With Quote
Old 03-30-2012, 08:51 AM   #15
Streadmob
Member
Streadmob began at the beginning.
 
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...
Streadmob 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
Smart Quotes Paxman53 Sigil 15 02-15-2012 09:31 PM
Calibre and Smart Quotes salasnet Calibre 9 09-27-2010 05:32 AM
Smart Quotes Toxaris ePub 2 05-31-2010 11:32 AM
Smart quotes in XHTML? MaggieScratch ePub 12 03-28-2009 06:53 PM
Smart quotes in RTF? ogghead Sony Reader 8 01-23-2007 07:38 PM


All times are GMT -4. The time now is 11:51 PM.


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