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

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2017, 05:54 AM   #31
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,143
Karma: 2150557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by GrannyGrump View Post
I am currently without a reading device, and using ADE on PC, and I see ending punctuation and quotation marks splitting off to the next line very very often. Especially quote marks.


I don't know if this happens on reading devices, but it is something I have come to expect from ADE.
This is a disaster. The use of no-break spaces (or narrow no-break spaces) allows to efficiently avoid this pitfall... at least in French (because it may not be part of English punctuation rules). You just need a plain regex to apply them.

Last edited by roger64; 09-19-2017 at 05:57 AM.
roger64 is offline   Reply With Quote
Advert
Old 09-19-2017, 05:58 AM   #32
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,143
Karma: 2150557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
mistake
roger64 is offline   Reply With Quote
Old 09-19-2017, 08:08 AM   #33
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: 49,653
Karma: 42906343
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by patrik View Post
When I use "justify" on my Kobo there is usually a space between quote marks and the text within. I would prefer it to not be (but it's not a big deal, just looks strange).
What firmware are you using and are you reading ePub or kepub? I've not see a space between quotes with ePub or kepub. I'm using firmware 4.5.9587. But, I've never seen this on any of the firmware I've used.
JSWolf is online now   Reply With Quote
Old 09-19-2017, 08:10 AM   #34
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: 49,653
Karma: 42906343
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by GrannyGrump View Post
I am currently without a reading device, and using ADE on PC, and I see ending punctuation and quotation marks splitting off to the next line very very often. Especially quote marks.

I don't know if this happens on reading devices, but it is something I have come to expect from ADE.
I hope your being without a Reader is due not to it being broken.

What version ADE are you using? I don't recall seeing this on my H2O reading ePub.
JSWolf is online now   Reply With Quote
Old 09-19-2017, 07:49 PM   #35
nabsltd
Groupie
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 172
Karma: 4396924
Join Date: Aug 2013
Location: Hamden, CT
Device: Onyx Boox M92
Quote:
Originally Posted by JSWolf View Post
an em dash is treated differently.
It shouldn't be. It's punctuation just like any other, and should always "glue" to the previous characters.

I've never seen a typeset book (where things like line breaks are manually controlled) where an em-dash immediately preceded by a letter starts a line, with the letter on the previous line.

Quote:
Originally Posted by GrannyGrump View Post
I am currently without a reading device, and using ADE on PC, and I see ending punctuation and quotation marks splitting off to the next line very very often. Especially quote marks.
If there is no space before the character that drops to the next line, then, yeah, that's horribly broken.

Assuming no automatic hyphenation using a dictionary, white space is the only place a line should break in HTML. If a break has to be forced because there just isn't any white space (or no white space near enough to allow reasonably sized spaces in justified text), then breaking after a punctuation mark and before a non punctuation mark is the only choice that matches the style of nearly 100 years of typesetting.

My problem is that I read with a renderer that follow line break rules strictly, and won't break after punctuation that often has no spaces around it (em- and en-dashes, ellipsis, etc.), so I get some very weird spacing on justified lines with at lot of those characters. My solution is to put a thin space (&thinsp after those kind of marks. It is almost not visible, but allows breaking where it should happen.
nabsltd is offline   Reply With Quote
Old 09-19-2017, 08:33 PM   #36
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,149
Karma: 8644756
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad mini, Samsung SB 2 tablet
Quote:
Originally Posted by RbnJrg View Post
Hi Alex;

Try using the following code:

...

Regards
Rubén
Thanks, Rubén. I'll keep that in mind as an alternative. But & # 8288; works well on my Kindle after changing the epub file to AZW3 with calibre, and works on my other readers too.
AlexBell is offline   Reply With Quote
Old 09-23-2017, 05:25 AM   #37
Tex2002ans
Guru
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 859
Karma: 3900001
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by nabsltd View Post
It shouldn't be. It's punctuation just like any other, and should always "glue" to the previous characters.

I've never seen a typeset book (where things like line breaks are manually controlled) where an em-dash immediately preceded by a letter starts a line, with the letter on the previous line.
If you've never seen em dashes at the beginning of lines, then you need to have looked at more books. It is perfectly valid to have a linebreak occur before an em dash. See Unicode's Line Break rules:

http://www.unicode.org/reports/tr14/#Table1

or more specifically, this section:

http://www.unicode.org/reports/tr14/#B2

Last year, we also discussed a similar situation with linebreaking around thin spaces:

https://www.mobileread.com/forums/sh...=278187&page=4

Quote:
Originally Posted by nabsltd View Post
Assuming no automatic hyphenation using a dictionary, white space is the only place a line should break in HTML.
Read the Unicode links above. Really interesting stuff.

In reality, you would want language- and locale-specific linebreaking rules + low-level access to tweaking which characters allow linebreaks before/after. Nothing I know currently does this (LaTeX is probably the closest).

For now, you are mostly at the mercy of the people who coded the renderers (and you do get some abominations like GrannyGrump's examples).

Last edited by Tex2002ans; 09-23-2017 at 06:23 AM.
Tex2002ans is offline   Reply With Quote
Old 09-23-2017, 12:54 PM   #38
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,389
Karma: 119701607
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
In some typography a dash at the beginning of the line can also mean start of a dialogue. So, there is more than one use for the dash at the beginning.
Toxaris is offline   Reply With Quote
Old 09-23-2017, 07:08 PM   #39
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 9,094
Karma: 7214933
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Toxaris View Post
In some typography a dash at the beginning of the line can also mean start of a dialogue. So, there is more than one use for the dash at the beginning.
But in that case the emdash would be immediately preceded by a newline - wouldn't it?

Quote:
Originally Posted by nabsltd View Post
I've never seen a typeset book (where things like line breaks are manually controlled) where an em-dash immediately preceded by a letter starts a line, with the letter on the previous line.
My emphasis. I read that as being in respect of a 'hot metal typeset to paper' book.

I've often seen the emdash at the end of dialogue (to indicate interrupted speech) dropped to a new line, even though its coded as “Blah blah blah—” it appears as

“Blah blah blah
—”


rather than

“Blah blah
blah—”


I've never seen an ellipsis (used to indicate incomplete speech) dropped to a new line in the same way.

I first saw it in DISOSS and PROFS - in pre-historic times. It's long been my belief that just because IBM made a blunder in their code, some others have been doing the same ever since. Contagion or inheritance - take your pick.

BR

Last edited by BetterRed; 09-23-2017 at 07:17 PM.
BetterRed is offline   Reply With Quote
Old 09-24-2017, 03:39 AM   #40
Tex2002ans
Guru
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 859
Karma: 3900001
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by BetterRed View Post
But in that case the emdash would be immediately preceded by a newline - wouldn't it?
Not necessarily. For example, Polish uses it all over:

https://en.wikipedia.org/wiki/Non-En...Quotation_dash

Quote:
Originally Posted by BetterRed View Post
I've often seen the emdash at the end of dialogue (to indicate interrupted speech) dropped to a new line, even though its coded as “Blah blah blah—” it appears as

“Blah blah blah
—”


rather than

“Blah blah
blah—”


I've never seen an ellipsis (used to indicate incomplete speech) dropped to a new line in the same way.
I've seen the em dash + closing quote on its own line. You also might run across something like this:

Original: As Mr. F—— said.
Wrong: As Mr. F—
— said.

or this:

Original: And then …… nothing.
Wrong: And then …
… nothing.

I've also seen crappy breaks like:

Original: Example Sentence..."
Wrong: Example Sentence..
."

This is where the weird edge cases come into play. So you can't just implement broad rules (break after an em dash or always break after a period), you have to take into account what kinds of characters are also in/around them.

One of the best discussions I've come across on the em dash line breaking was this post on the TeX Stack Exchange:

https://tex.stackexchange.com/a/60038
Tex2002ans is offline   Reply With Quote
Old 09-26-2017, 07:20 PM   #41
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,092
Karma: 480516
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by nabsltd View Post
It shouldn't be. It's punctuation just like any other, and should always "glue" to the previous characters.

I've never seen a typeset book (where things like line breaks are manually controlled) where an em-dash immediately preceded by a letter starts a line, with the letter on the previous line.


If there is no space before the character that drops to the next line, then, yeah, that's horribly broken.

Assuming no automatic hyphenation using a dictionary, white space is the only place a line should break in HTML. If a break has to be forced because there just isn't any white space (or no white space near enough to allow reasonably sized spaces in justified text), then breaking after a punctuation mark and before a non punctuation mark is the only choice that matches the style of nearly 100 years of typesetting.

My problem is that I read with a renderer that follow line break rules strictly, and won't break after punctuation that often has no spaces around it (em- and en-dashes, ellipsis, etc.), so I get some very weird spacing on justified lines with at lot of those characters. My solution is to put a thin space (&thinsp after those kind of marks. It is almost not visible, but allows breaking where it should happen.
For a couple of years at least, Amazon Kindle will start a new line before or after a hyphen or an en or emdash even when there is no space. In the early days, I got into the habit of avoiding hyphens whenever I could, and adopting British style for dash (that is, space/dash/space) in order to avoid rivers of white. This is no longer necessary, though I continue to do it because I decided I preferred it. Like the Oxford comma, it's one of those flourishes that makes sentences easier to read.
Notjohn is offline   Reply With Quote
Old 10-11-2017, 03:20 AM   #42
doubleshuffle
Flamboyant Flamethrower
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 9,279
Karma: 85044639
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
This has been a very informative thread. Thanks to all.

Very useful for me in particular, because I like making poetry ebooks, and a dash at the end of a verse dropping to the next line looks plain awful. To avoid it, I've started to use the "nowrap" method proposed by Rubén in post #17. Works great.

And I've come up with a regex that puts the nowrap span around the last word plus dash of each verse:

Find (note that there's a space at the beginning):
Code:
 ([^\s]*)—</p>
Replace with (again the space...):
Code:
 <span class="nowrap">\1—</span></p>
doubleshuffle is offline   Reply With Quote
Old 10-17-2017, 02:49 PM   #43
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,092
Karma: 480516
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by nabsltd View Post
It shouldn't be. It's punctuation just like any other, and should always "glue" to the previous characters.

I've never seen a typeset book (where things like line breaks are manually controlled) where an em-dash immediately preceded by a letter starts a line, with the letter on the previous line.
The space before and after a dash (usually an en dash) is standard in British publications. Perhaps they glue the dash to the spaces, and the spaces to the words, but I doubt it.

I don't know if Donna Leon is much given to dashes, but I will check the book I'm currently reading.
Notjohn is offline   Reply With Quote
Old 10-17-2017, 02:55 PM   #44
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,092
Karma: 480516
Join Date: Dec 2012
Device: Kindle
Yeah, here's one, page 194 of The Waters of Eternal Youth, published in Canada but printed in the US, third line from the top ends as undefined --
Notjohn 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
italic at end of line causes next line to start with a space ebookreadr Sigil 29 03-20-2017 11:25 AM
Preventing chemical symbol from being split by page or line break Nick Payne ePub 8 10-23-2013 03:06 AM
Line breaks on Kindle, no line breaks on 4 PC Siavahda Kindle Formats 0 10-20-2012 05:50 AM
Spurious Line Breaks Halk Workshop 1 05-15-2010 01:22 PM
No line breaks ecpepper Amazon Kindle 3 08-09-2009 06:42 PM


All times are GMT -4. The time now is 06:09 PM.


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