Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-23-2016, 04:23 PM   #46
brahms
Enthusiast
brahms began at the beginning.
 
Posts: 43
Karma: 30
Join Date: Feb 2016
Device: none
Lots of questions there Hitch .

First, yes I'm publishing my books, not aiming to become an expert. The luxury of total immersion isn't available.

I'm pleased with myself for making the effort rather than reaching for conversion programs, but yes the result is going to be patchy.

I worked to learn enough html to mark up a manuscript from scratch and pass checks. I learned enough css to get by but then made the mistake of inspecting the products of major publishers imagining they'd show the best approaches. Now, of course, I understand that they're likely to be poor examples, and definitely not right to borrow from.

As a general point, the typical author new to e-publishing has three choices: learn to do it from scratch (and carry a heavy cost in time and frustration), use conversion programs with all the negatives; or hire somebody to do it (and never understand what they're doing).

The terrific help that you guys give makes the first option just about bearable. Do I regret going at it this way? No, because I'm publishing a series so the investment will get spread over a number of books.

I'm involved in a lot of discussion with fellow authors atm about this very subject. I guess the only thing we all agree on is that writing the books comes first. That's where most of our limited time should go.

The biggest advance for me in this process, as it happens, is that I 've probably learned enough to hire somebody else and communicate sensibly.

Sorry about the dissertation, but I'm very grateful for the help and aware that we're all part of a true revolution here. Love it.
brahms is offline   Reply With Quote
Old 03-23-2016, 04:28 PM   #47
brahms
Enthusiast
brahms began at the beginning.
 
Posts: 43
Karma: 30
Join Date: Feb 2016
Device: none
Oops, while wandering off there, i forgot to ask the question I'd intended to ask.

What's the best current approach to coding non-breaking em dashes? I'm seeing lots of disagreement out there about what's the solution likely to work across the different kindles.

Any thoughts?
brahms is offline   Reply With Quote
Advert
Old 03-23-2016, 04:47 PM   #48
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,798
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by brahms View Post
Oops, while wandering off there, i forgot to ask the question I'd intended to ask.

What's the best current approach to coding non-breaking em dashes? I'm seeing lots of disagreement out there about what's the solution likely to work across the different kindles.

Any thoughts?
There is no such thing as a non-breaking em-dash and Kindles will treat them as they will and there's nothing you can do about it.
JSWolf is offline   Reply With Quote
Old 03-23-2016, 05:03 PM   #49
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: 85,556
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
As Jon says, a dash is (or at least should always be) a valid point at which to break a line. Can you give an example of a situation in which you'd want a non-breaking dash?
HarryT is offline   Reply With Quote
Old 03-23-2016, 07:56 PM   #50
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by HarryT View Post
As Jon says, a dash is (or at least should always be) a valid point at which to break a line. Can you give an example of a situation in which you'd want a non-breaking dash?
I'd imagine that the reason for the question is that some renderers (Kindle, iBooks, and anything else based on WebKit) incorrectly allow wrapping before an em dash. It is acceptable to wrap after one, but wrapping before it is considered poor typography.

The answer to your question is appallingly complex because old kindles don't support zero-width non-breaking space characters (displayed as a box). Otherwise, you could fix this trivially.

Instead, I've done this:

Code:
<span class="kf8only">& #65279;</span>
without the space (working around a forum bug), where the kf8only class is display:none for MOBI readers, or inline for KF8.

It works for me in limited testing, though it is unholy ugly. For EPUB books, I use the same entity without the span so that iBooks will do the right thing.

YMMV.

Last edited by dgatwood; 03-24-2016 at 02:33 PM.
dgatwood is offline   Reply With Quote
Advert
Old 03-24-2016, 10:27 AM   #51
brahms
Enthusiast
brahms began at the beginning.
 
Posts: 43
Karma: 30
Join Date: Feb 2016
Device: none
Yes, the break before punctuation was the concern.

I'll maybe try your solution, though I'll admit I'm starting to wonder whether I mightn't just live with the problem (puts tin hat on ).

Many thanks
brahms is offline   Reply With Quote
Old 03-24-2016, 11:56 AM   #52
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,798
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by brahms View Post
Yes, the break before punctuation was the concern.

I'll maybe try your solution, though I'll admit I'm starting to wonder whether I mightn't just live with the problem (puts tin hat on ).

Many thanks
It won't work because it's the same character and Kindles treat em-dashes the same no matter how you code it. There is no secret coding you can use to get a Kindle to to treat an em-dash any differently.
JSWolf is offline   Reply With Quote
Old 03-24-2016, 12:29 PM   #53
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: 85,556
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by JSWolf View Post
It won't work because it's the same character and Kindles treat em-dashes the same no matter how you code it. There is no secret coding you can use to get a Kindle to to treat an em-dash any differently.
Breaking before a dash isn't nearly as bad as the behaviour of one of my first reading device - the Bookeen CyBook Gen 3 - which wouldn't break a sentence at all at a dash, which meant that if (as is correct) you used em-dashes without surrounding spaces, you'd get horrible justification, particularly if the two words on either side of the dash were long words.
HarryT is offline   Reply With Quote
Old 03-24-2016, 12:32 PM   #54
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: 85,556
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Hitch View Post
Oh, Doits:

You always know the way to a girl's heart. That will be super.

Hitch
I can imagine the scene now, Hitch:

The romantic candle-lit dinner for two.
Your gentleman friend arrives and presents you with a bunch of flowers...
... and is told "If you really loved me you'd write me a CSS parser..."

HarryT is offline   Reply With Quote
Old 03-24-2016, 02:34 PM   #55
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
It won't work because it's the same character and Kindles treat em-dashes the same no matter how you code it. There is no secret coding you can use to get a Kindle to to treat an em-dash any differently.
That is true only on pre-KF8 Kindles. The newer Kindle devices use WebKit for rendering, which does respect zero-width nonbreaking spaces.

BTW, I just edited my previous post. I don't know why I thought I was using zero-width joiners (which shouldn't work). I was actually using zwnbsp, which is different, and any properly functioning (Unicode-compliant) HTML/XHTML renderer should treat it as an indication that the line should not be broken at that point even if it otherwise would be.

Last edited by dgatwood; 03-24-2016 at 02:36 PM.
dgatwood is offline   Reply With Quote
Old 03-24-2016, 03:57 PM   #56
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,798
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by dgatwood View Post
That is true only on pre-KF8 Kindles. The newer Kindle devices use WebKit for rendering, which does respect zero-width nonbreaking spaces.

BTW, I just edited my previous post. I don't know why I thought I was using zero-width joiners (which shouldn't work). I was actually using zwnbsp, which is different, and any properly functioning (Unicode-compliant) HTML/XHTML renderer should treat it as an indication that the line should not be broken at that point even if it otherwise would be.
How would older Kindles handle a zero-width non-breaking space? How would Mobi handle it?

The thing is, if you do need such, then it's a bug in the renderer.
JSWolf is offline   Reply With Quote
Old 03-24-2016, 04:05 PM   #57
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,735
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by HarryT View Post
I can imagine the scene now, Hitch:
The romantic candle-lit dinner for two.
Your gentleman friend arrives and presents you with a bunch of flowers...
... and is told "If you really loved me you'd write me a CSS parser..."
Actually, writing a CSS parser is way above my skill set. I merely wrote a super-simple Sigil plugin wrapper for it. This plugin is the Python equivalent of a four-line MS Word macro and I'm pretty sure if I turned it in as Python 101 homework assignment my teacher would probably fail me.

@Hitch: In case you missed the announcement: the CSSLint plugin is ready for download.
Doitsu is offline   Reply With Quote
Old 03-24-2016, 05:52 PM   #58
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: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by HarryT View Post
I can imagine the scene now, Hitch:

The romantic candle-lit dinner for two.
Your gentleman friend arrives and presents you with a bunch of flowers...
... and is told "If you really loved me you'd write me a CSS parser..."

Hell with that...how about a magic eBook-making thingy? My infamous "ePUBliarmus!" magic wand. Sigh...

Mr. Hitch is the official "Scotty" of the spaceship Booknook.biz. When one of our ships needs gigs, terabytes, monitors, webcams, microphones, or has a BIOS issue, the onboard fans fail, or you-name-it, Scotty takes care of it. It's VERY romantic, once all the cursing is over.

Quote:
Originally Posted by Doitsu View Post
Actually, writing a CSS parser is way above my skill set. I merely wrote a super-simple Sigil plugin wrapper for it. This plugin is the Python equivalent of a four-line MS Word macro and I'm pretty sure if I turned it in as Python 101 homework assignment my teacher would probably fail me.

@Hitch: In case you missed the announcement: the CSSLint plugin is ready for download.
I certainly wouldn't fail you, Doits!

GREAT, I did indeed--of course--miss the announcement. Thank you!

Hitch
Hitch is offline   Reply With Quote
Old 03-25-2016, 01:58 AM   #59
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by JSWolf View Post
How would older Kindles handle a zero-width non-breaking space? How would Mobi handle it?

The thing is, if you do need such, then it's a bug in the renderer.

Pre-KF8 renderers incorrectly show a no-glyph box. That's why it is wrapped in markup to prevent it from getting copied into the MOBI side.

And yes, wrapping before an em dash is almost inarguably a bug in the KF8 renderer, albeit a bug that is shared by an awful lot of other HTML renderers. (And yes, that sentence can be read in two ways. I meant both.)
dgatwood is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil ignores some CSS-specified fonts tetrault Sigil 12 01-29-2016 10:43 AM
FBReader ignores margin-top AlanHK ePub 24 03-25-2015 06:59 AM
Kindle ignores Title Sort Ravenswd Devices 7 02-05-2013 11:04 AM
Indents and hanging indents in epub poetry Derek R ePub 14 02-19-2012 04:43 AM
fbreader ignores line breaks red_dragon OpenInkpot 3 03-20-2009 08:38 AM


All times are GMT -4. The time now is 07:35 PM.


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