Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-25-2021, 09:44 AM   #1
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,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Welsh

I came upon this statement in a related thread:

>If you mark your code properly, Multi-Language Hyphenation should work in a properly designed reader.

How should I handle the name of Llanfairpwllgwyngyllgogerychwyrndrobwllllantysilio gogogoch?

I will manually hyphenate it in the print edition, but what about the Sigil-generated epub?

(When I preview this, I see a space in it, though there is no space in the original.)

Thanks!
Notjohn is offline   Reply With Quote
Old 06-25-2021, 10:32 AM   #2
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,350
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
What are the Welsh Hyphenation rules? I'd probably use those...
Turtle91 is online now   Reply With Quote
Advert
Old 06-25-2021, 03:06 PM   #3
Quoth
Still reading
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: 14,030
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Manually hyphenate it.
Quoth is offline   Reply With Quote
Old 06-25-2021, 06:07 PM   #4
Tex2002ans
Wizard
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: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Notjohn View Post
How should I handle the name of Llanfairpwllgwyngyllgogerychwyrndrobwllllantysilio gogogoch?
Llan-fair-pwll-gwyn-gyll-gog-er-ych-wyrn-dro-bwllll-ant-ysil-iog-ogogoch

Quote:
Originally Posted by Notjohn View Post
I came upon this statement in a related thread:

Quote:
Originally Posted by Tex2002ans View Post
If you mark your code properly, Multi-Language Hyphenation should work in a properly designed reader.
Welsh's HTML lang = "cy".

So you'd mark this in your HTML:

Code:
<p>A Welsh word is: <span lang="cy" xml:lang="cy">Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch</span>.</p>
then rely on Welsh Hyphenation Dictionaries.

Luckily, people have already created that for you.

See the list at Hyphenation.org: "Languages".

If you wanted proper Welsh hyphenation on your actual ereader (like Kobo), you'd do a few tweaks to those files so your device can understand them.

JSWolf explains how + goes into more detail in this thread:

Kobo Reader > "Better Hyphenation"

Kobo's hyphenation dictionaries use LibreOffice's hyphenation format + a few different lines in the beginning.

(And LibreOffice's is a few minor differences from the raw TeX/Hyphenation.org ones.)

Quote:
Originally Posted by Quoth View Post
Manually hyphenate it.
No. Bad idea. Rely on the hyphenation dictionaries.

Rare Exception: If you're creating this ebook for personal use... then PERHAPS, maybe, you could run the HyphenateThis! plugin on it.

This inserts tons of soft hyphens throughout your text.

But there are many disadvantages to this. I wrote about that in more detail in:

2018: "Auto-Hyphenation".

Never ever clog up an ebook for sale with soft hyphens.

Note: Although you have to make sure you're using the proper dictionary... if you use the wrong one, you'd get this:

✓ Llan-fair-pwll-gwyn-gyll-gog-er-ych-wyrn-dro-bwllll-ant-ysil-iog-ogogoch (Welsh)
✗ Llan-fair-p-wll-gwyn-gyll-gogerych-wyrn-drob-wl-l-l-lan-tysil-i-o-gogogoch (English)

Quote:
Originally Posted by Notjohn View Post
I will manually hyphenate it in the print edition, but what about the Sigil-generated epub?

(When I preview this, I see a space in it, though there is no space in the original.)
You shouldn't rely on manual hyphenation in print either. Mark the language properly, then rely on the Hyphenation Dictionaries.

That will make sure it breaks at valid locations + optimally distributes the spacing throughout the paragraph.

People have already done all the hard legwork for you.

Last edited by Tex2002ans; 06-25-2021 at 07:17 PM.
Tex2002ans is offline   Reply With Quote
Old 06-26-2021, 06:18 AM   #5
Quoth
Still reading
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: 14,030
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by Tex2002ans View Post
If you wanted proper Welsh hyphenation on your actual ereader (like Kobo), you'd do a few tweaks to those files so your device can understand them.

JSWolf explains how + goes into more detail in this thread:

Kobo Reader > "Better Hyphenation"

Kobo's hyphenation dictionaries use LibreOffice's hyphenation format + a few different lines in the beginning.

(And LibreOffice's is a few minor differences from the raw TeX/Hyphenation.org ones.)

Quote:
Originally Posted by Quoth
Manually hyphenate it.
No. Bad idea. Rely on the hyphenation dictionaries.

Rare Exception: If you're creating this ebook for personal use... then PERHAPS, maybe, you could run the HyphenateThis! plugin on it.

This inserts tons of soft hyphens throughout your text.

But there are many disadvantages to this. )
I was thinking of just that one word, not generally for every word. Llanfairpwllgwyngyllgogerychwyrndrobwllllantysilio gogogoch. I'd normally never add hyphens unless the words are compound and normally have hard hyphens.

But will an ordinary customer of an ebook have other than the stock dictionaries or even know how to add them?
That's why all my ereaders used for testing are "stock" except I have the DXG set to have the book cover as a sleep screen.
Quoth is offline   Reply With Quote
Advert
Old 06-26-2021, 11:51 AM   #6
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,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Thank you both. Wonderful stuff.
Notjohn is offline   Reply With Quote
Old 07-01-2021, 02:13 PM   #7
Tex2002ans
Wizard
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: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Quoth View Post
But will an ordinary customer of an ebook have other than the stock dictionaries or even know how to add them?
Probably not.

Only the hardcorest of hardcore will probably mess with hyphenation dictionaries. And you need a more open device too (like Kobo).

But this does come up, especially when:
  • dealing with languages that aren't on the device itself.
    • Like Hungarian or Portuguese or Welsh.
  • you want to tweak awful defaults
    • Every language has a proper "left/right hyphenmin".
      • This sets how many characters must appear before a word's allowed to break. (See Hyphenation.org for proper left/rights.)
    • English should use 2/3.
      • Kobo accidentally set theirs to 5/5, so only 10+ letter words would hyphenate!

For some more details, see JSWolf's hyphenation thread. (It does also seem to be one of the more popular topics in the Kobo Developer section [over 50k hits].)

And on the browser front:

Firefox/Safari have proper multi-language hyphenation (Chrome only supports English).

For an entire list of current browser's hyphenation status, see: MDN: "hyphens" > Browser Compatibility.

... but hyphenation is still getting better all the time.

These hyphenation enhancements will trickle down to devices/programs eventually.

Last edited by Tex2002ans; 07-01-2021 at 02:17 PM.
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
20% off top Welsh Authors on Directebooks.com bclark Self-Promotions by Authors and Publishers 1 03-02-2011 06:56 AM
Any fans of Irvine Welsh Fathermole Reading Recommendations 9 06-19-2009 02:14 AM


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


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