Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-21-2024, 07:19 AM   #1
akerbeltz
Junior Member
akerbeltz began at the beginning.
 
akerbeltz's Avatar
 
Posts: 3
Karma: 10
Join Date: Apr 2024
Device: none
How to prevent any ereader from forcing hyphenation on an epub

We publish ebooks in Scottish Gaelic and for the most part that works fine but there's an issue we just can't seem to get a grip on, which is that while certain ereaders (like Google Play) seem to only apply automatic word breaking IF there is a hyphenation dictionary installed for a language, others (ReadEra is top of the list) just force block text on the whole title and break words anywhere they like. Is there something we can do, maybe to the CSS (there's currently nothing set that touches on hyphenation), that ALL ereaders are likely to obey?

Related to that - does anyone know if ereaders in general can handle the non-breaking hyphen as a character? We have words like t-aran which ereaders love to break at the hyphen (and I get it why) but there's a language specific rule in our language that says you shouldn't. In normal word processing we use non-breaking hyphens but we've had issues in the past with typesetting software doing strange things to those so we're not sure about how good ereaders are with them?
akerbeltz is offline   Reply With Quote
Old 04-21-2024, 10:12 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by akerbeltz View Post
Is there something [...] that ALL ereaders are likely to obey?
That's easy: No.

Many (probably most) ereaders and apps are broken in some way or another. They all have their quirks, weird defaults, missing support, etc. You could try adding "hypens: none" (and vendor-specific properties like "adobe-hyphenate: none", but I'd bet there is some reader that either chokes on it or ignores it.
Jellby is offline   Reply With Quote
Old 04-21-2024, 05:40 PM   #3
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,215
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
The non-breaking hyphen might work.
Or an en-dash or minus-dash might work.

Quote:
They all have their quirks, weird defaults, missing support, etc. You could try adding "hypens: none" (and vendor-specific properties like "adobe-hyphenate: none", but I'd bet there is some reader that either chokes on it or ignores it.
I strip such css if I see it.

Excessive hyphenation is a problem on a small screen like a phone with a larger font.

I personally read on an 8″ screen so hardly see much hyphenation. The TTS is also an issue, even with Irish installed and proper spans on the irish content in the mostly English novel, the TTS is rubbish.

The problem is that any unicode character that looks like a hyphen but isn't (so it won't wrap at it) might render as [?].

I shall investigate what hyphen or hyphen-like character doesn't wrap.
"-adobe-hyphenate: none" should work on ADE and be ignored by other renderers?

At least the Celtic languages* work better on ereaders than Greek, Cyrillic, Hebrew, Arabic and most Asian ones. Even the very oldest mobi only Kindles, which might also manage Icelandic ð Ð þ Þ ö and ø etc, but only some Greek letters.

Edit
[* Maybe Cornish has some tricky letters?]

Last edited by Quoth; 04-21-2024 at 05:42 PM.
Quoth is offline   Reply With Quote
Old 04-21-2024, 11:31 PM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Quoth View Post
I shall investigate what hyphen or hyphen-like character doesn't wrap.
If you don't want a word to be hyphenate, an easy way is to apply the property "display: inline-block". Something like:

Code:
<p>The following word must not be <span class="ib">hyphenated</span></p>
And in the .css stylesheet:

Code:
.ib {
  display: inline-block;
}
RbnJrg is offline   Reply With Quote
Old 04-22-2024, 06:32 AM   #5
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,215
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
I thought "inline-block" was for defining a fixed size of inline block so an element can sit beside other elements.

How portable is that for Amazon mobi/KF7, azw3/KF8 and KFX conversions of epub by Amazon for KDP, or for preventing hyphenation on epub based ereaders in general inc older ADE on many eink ereaders without other side effects?

Also what if "display: inline-block;" is applied to html, body or p?

What happens if a long word in a larger font on a small screen doesn't fit? Is it truncated?
Quoth is offline   Reply With Quote
Old 04-22-2024, 09:39 AM   #6
akerbeltz
Junior Member
akerbeltz began at the beginning.
 
akerbeltz's Avatar
 
Posts: 3
Karma: 10
Join Date: Apr 2024
Device: none
Quote:
Excessive hyphenation is a problem on a small screen like a phone with a larger font.
It's a readability issue in any language where hyphenation is not common (like Scottish Gaelic) or obeys specific rules. ReadEra just puts them ANYwhere... that's hard to read even in English

Quote:
At least the Celtic languages* work better on ereaders
As long as you stay away from the Gaelic ampersand ⁊ I suppose. Not sure how Welsh ŵ, ŷ display...

Quote:
Many (probably most) ereaders and apps are broken in some way or another.
Yuck. You know, I had a feeling but didn't want to make sweeping statements, so thanks for spelling it out!

Code:
<p>The following word must not be <span class="ib">hyphenated</span></p>
Right, but I can't very well set that for EVERY multi-character word in the book

Quote:
What happens if a long word in a larger font on a small screen doesn't fit? Is it truncated?
Gaelic doesn't have really long words, not like German. So it's not really an issue.

So basically, the answer is you can't, at least not in an efficient manner from the publishers point of view and if the hyphenation of a particular ereader is driving you nuts in your languages, you have to hunt around for one which is marginally less bad? LOL how can an entire industry operate on such a shoogly peg? And we thought VHS was bad!

The Google reader and Kindle don't seem to obey non-breaking hyphens but they don't seem to box them either, so I'm going to leave those in and pray that nobody complains.

Thanks for all the responses!

Last edited by akerbeltz; 04-22-2024 at 09:42 AM.
akerbeltz is offline   Reply With Quote
Old 04-22-2024, 09:06 PM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Quoth View Post
I thought "inline-block" was for defining a fixed size of inline block so an element can sit beside other elements.
That is one of the posibilities, but you also can apply the property without setting a width. For that reason is called INLINE-block.

Quote:
How portable is that for Amazon mobi/KF7, azw3/KF8 and KFX conversions of epub by Amazon for KDP, or for preventing hyphenation on epub based ereaders in general inc older ADE on many eink ereaders without other side effects?
It works everywhere except for mobi K7.

Quote:
Also what if "display: inline-block;" is applied to html, body or p?
No, no; you can't apply it to body (nor html), but you can use it on div, p, span, img (very useful here). I would be able to write a book with all the tricks allowed by the use of this property; for example is wonderful to avoid fragmentation.

Quote:
What happens if a long word in a larger font on a small screen doesn't fit? Is it truncated?
It can happen the same as is the property is not employed and the ereader doesn't have the feature "hyphens" But in those "rare" cases, you can handle the situation by means of the property "overflow" (you can employ the value "ellipsis").

Last edited by RbnJrg; 04-23-2024 at 09:08 AM.
RbnJrg is offline   Reply With Quote
Old 04-22-2024, 09:10 PM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,552
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by akerbeltz View Post
Right, but I can't very well set that for EVERY multi-character word in the book
Can you post examples of those words? Maybe regex can do a miracle.
RbnJrg is offline   Reply With Quote
Old 04-23-2024, 12:17 AM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,665
Karma: 145624988
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
My workaround for avoiding hyphens to read left justified (AKA ragged right).
DNSB is offline   Reply With Quote
Old 04-23-2024, 08:32 AM   #10
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,102
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by DNSB View Post
My workaround for avoiding hyphens to read left justified (AKA ragged right).
I prefer left aligned also but iBooks, and probably others, ignore that and force justification and hyphens.
Turtle91 is offline   Reply With Quote
Old 04-23-2024, 08:44 AM   #11
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: 74,188
Karma: 129333564
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 Turtle91 View Post
I prefer left aligned also but iBooks, and probably others, ignore that and force justification and hyphens.
I prefer fully justified with hyphens.
JSWolf is offline   Reply With Quote
Old 04-23-2024, 11:12 AM   #12
akerbeltz
Junior Member
akerbeltz began at the beginning.
 
akerbeltz's Avatar
 
Posts: 3
Karma: 10
Join Date: Apr 2024
Device: none
Even left aligning is no guarantee. ReadEra seems to be the worst - maybe I should just stop using it to test - it breaks stuff whether it's block aligned



or left aligned



it puts hyphen it totally messed up places (ealainte just shouldn't break and if you have to break fear-càraidh, then at the word hyphen pretty please)...

Though perhaps there's a sick poetry to Sha-kespeare
akerbeltz is offline   Reply With Quote
Old 04-23-2024, 02:25 PM   #13
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: 74,188
Karma: 129333564
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 akerbeltz View Post
Even left aligning is no guarantee. ReadEra seems to be the worst - maybe I should just stop using it to test - it breaks stuff whether it's block aligned



or left aligned



it puts hyphen it totally messed up places (ealainte just shouldn't break and if you have to break fear-càraidh, then at the word hyphen pretty please)...

Though perhaps there's a sick poetry to Sha-kespeare
Does the eBook have the correct language defined?
JSWolf is offline   Reply With Quote
Old 04-23-2024, 04:45 PM   #14
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,215
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Readera is one of the poorer apps.
Bluefire, Aldiko Basic, Lithium, Pocketbook apps are far better.

A lot of Android ereader apps are poor.

Also having the correct language defined doesn't help if the ereader doesn't support it.
Quoth is offline   Reply With Quote
Old 04-24-2024, 09:15 AM   #15
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: 74,188
Karma: 129333564
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 Quoth View Post
Readera is one of the poorer apps.
Bluefire, Aldiko Basic, Lithium, Pocketbook apps are far better.

A lot of Android ereader apps are poor.

Also having the correct language defined doesn't help if the ereader doesn't support it.
But it doesn't help if the wrong dictionary is being used because the language is incorrectly defined.
JSWolf is offline   Reply With Quote
Reply

Tags
hyphenation, word break


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get epub to display with hyphenation intrelis Conversion 4 09-04-2022 06:33 AM
Prevent ereader from opening web browser Leonatus Recipes 2 04-26-2022 09:30 AM
Can I prevent hyphenation in a block of text? AlexBell ePub 7 03-15-2019 08:09 PM
i62HD Hack: forcing hyphenation into cr3 internal folder rfog Onyx Boox 1 08-14-2012 10:02 AM
Prevent titles hyphenation in iPad and iPhone fante1998 ePub 0 02-24-2012 05:43 AM


All times are GMT -4. The time now is 10:08 AM.


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