Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-19-2019, 10:49 AM   #1
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,567
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Question Hyphenation under epub3

By chance, does anyone know how to enable hyphens under epub3? The following css properties seem not to have any effect with ADE 4.5x:

Code:
p {
   -epub-hyphens: auto;
   adobe-hyphenate: auto;
   -webkit-hyphens: auto;
   hyphens: auto;
}
Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 02-25-2019, 07:02 AM   #2
momoha
Annabelle Viau
momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.momoha 's shirt has a full set of merit badges.
 
momoha's Avatar
 
Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
I am using the Blitz framework with ePub3 and hyphenation is happening in ADE. Here’s the CSS (the class justified is applied on the body, not the paragraphs):

.justified {
/* Designed as a class for body — We don't enforce as user setting > author */
text-align: justify;
adobe-hyphenate: auto;
/* proprietary for Legacy RMSDK */
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
-epub-hyphens: auto;
hyphens: auto;
/* before and after not in spec but iBooks support all three (-webkit-) */
-ms-hyphenate-limit-lines: 3;
-moz-hyphenate-limit-lines: 3;
-webkit-hyphenate-limit-lines: 3;
hyphenate-limit-lines: 3;
/* No support except Trident (Windows) and Webkit (old deprecated spec) */
-ms-hyphenate-limit-chars: 6 3 2;
-moz-hyphenate-limit-chars: 6 3 2;
-webkit-hyphenate-limit-before: 3;
-webkit-hyphenate-limit-after: 2;
hyphenate-limit-chars: 6 3 2;
/* No support except Trident (Windows) */
-ms-hyphenate-limit-zone: 10%;
-moz-hyphenate-limit-zone: 10%;
-webkit-hyphenate-limit-zone: 10%;
hyphenate-limit-zone: 10%;
/* No support */
-ms-hyphenate-limit-last: always;
-moz-hyphenate-limit-last: always;
-webkit-hyphenate-limit-last: always;
hyphenate-limit-last: always;
}
momoha is offline   Reply With Quote
Advert
Old 02-25-2019, 10:14 AM   #3
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,567
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Thank you very much momoha!!! Your code does work!!! The properties involved are very complex and I didn't know many of them. So, many thanks again.

Rubén

EDIT: Your styles also work in <p> tags, so if I add the properties you indicated me in

Code:
p {
...
}
and nothing in <body> it also works!! By chance, do you have something to handle "breaks" after some tags? Because "page-break-after: avoid" (or "break-after: avoid") under epub3 with ADE doesn't work. Hopefully you have something for that too

Last edited by RbnJrg; 02-25-2019 at 10:34 AM.
RbnJrg is offline   Reply With Quote
Old 02-10-2023, 01:57 PM   #4
DeepVoid
Member
DeepVoid began at the beginning.
 
DeepVoid's Avatar
 
Posts: 15
Karma: 10
Join Date: Feb 2016
Location: Rome, Italy
Device: Kindle Paperwhite 11th Gen
I apologize for resuming this old thread, but I'm trying to add hyphenation to an epub book, and the solution proposed by Momoha only works in Kindle Previewer 3. When I send the epub to my Paperwhite (11th gen), hyphenation is gone :-(

Any hint to figure out what to do?
DeepVoid is offline   Reply With Quote
Old 02-10-2023, 03:26 PM   #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,703
Karma: 87663461
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
No Kindle does epub. Amazon converts them with nearly secret rules.
Or did you use Calibre to convert to azw3?
Quoth is offline   Reply With Quote
Advert
Old 02-10-2023, 04:16 PM   #6
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,669
Karma: 130140792
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 DeepVoid View Post
I apologize for resuming this old thread, but I'm trying to add hyphenation to an epub book, and the solution proposed by Momoha only works in Kindle Previewer 3. When I send the epub to my Paperwhite (11th gen), hyphenation is gone :-(

Any hint to figure out what to do?
Do not use send to kindle. That won't work. You'll have to use Calibre to convert ePub to KF8. Once you have the KF8, use Hyphenate This! (plugin) to add soft hyphens. From there you have to side load your KF8 to your Kindle. That's what works. It's what I do.
JSWolf is offline   Reply With Quote
Old 02-11-2023, 07:33 AM   #7
DeepVoid
Member
DeepVoid began at the beginning.
 
DeepVoid's Avatar
 
Posts: 15
Karma: 10
Join Date: Feb 2016
Location: Rome, Italy
Device: Kindle Paperwhite 11th Gen
I really thank you for your hints, guys!!!

I managed to solve the issue with some little workarounds, and above all I was able to use the "Send to Kindle" webservice to sync the epub file with its hyphenation to my Amazon cloud!!!

So, no need for sideloading the book, which would have ended in the know issue of the lacking cover and the unability to sync the book across all my devices.

Here is the recipe:
  1. Edit your book as usual (I use Sigil 1.9.20 to generate the epub3 final file).
  2. Import the epub file into Calibre (I'm using Calibre ver. 6.12) and use the Hyphenate This! plugin to generate the hyphenation. Since I'm editing a book written in italian, I installed an italian hyphenation dictionary, which I send with this very message, should someone else like me needs to work with italian (just unzip it and load its .dic file in the Hyphenate This! settings panel). If you work with different languages, you'll need to find a proper .dic file, of course (just search in the LibreOffice extensions repository).

    Important: Make sure that the language metadata for the book is set to "Italian" (or to the language you're using) with Calibre's "Edit Metadata" function before using Hyphenate This!.
  3. Finally, send the epub file generated with Calibre to the Kindle (I configured my device's email in Calibre to quickly send the book, but you can also use your email client to send the file as attachment, or use the Amazon's webservice "Send To Kindle").

And that's all, folks!

Your book will show up in your Kindle after a little crunching by the Amazon servers, and will be synchronized across all your devices with its precious cover and its beloved hyphenation

I'm doing some testing right now with my Kindle (a Paperwhite 11th gen) and it seems to work like a breeze, no issues whatsoever, perfect hyphenation across the entire book, very high satisfaction

Hope this helps
Attached Files
File Type: zip hyph_it_IT.zip (1.1 KB, 96 views)

Last edited by DeepVoid; 02-11-2023 at 07:49 AM.
DeepVoid is offline   Reply With Quote
Old 02-11-2023, 07:35 AM   #8
DeepVoid
Member
DeepVoid began at the beginning.
 
DeepVoid's Avatar
 
Posts: 15
Karma: 10
Join Date: Feb 2016
Location: Rome, Italy
Device: Kindle Paperwhite 11th Gen
Quote:
Originally Posted by Quoth View Post
No Kindle does epub
They do, now
DeepVoid is offline   Reply With Quote
Old 02-11-2023, 08:57 AM   #9
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,703
Karma: 87663461
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by DeepVoid View Post
They do, now
No, they do not.

Amazon has accepted epub as a preferred upload source for KDP & KDP Select for years. It's now preferred source for "Send to Kindle" (email or web). It's converted to mobi, azw3 etc.

It's preferable to use USB transfer, in which case you do your own conversion if it's not mobi, azw, azw3 or KFX.

Both transfer systems require that there is no DRM, unless it's a Kindle file copied off that exact Kindle earlier.
Quoth is offline   Reply With Quote
Old 02-11-2023, 09:43 AM   #10
DeepVoid
Member
DeepVoid began at the beginning.
 
DeepVoid's Avatar
 
Posts: 15
Karma: 10
Join Date: Feb 2016
Location: Rome, Italy
Device: Kindle Paperwhite 11th Gen
Quote:
Originally Posted by Quoth View Post
No, they do not
Whatever, I hate sideloading via usb transfer because of its drawbacks, books loose their cover, and there is no way to sync them on your cloud account. I can easily manage epubs, now, without the need to convert them to mobi or anything else before sending them to the Paperwhite, and this is enough for me, to stay within the kindle ecosystem a little longer.
DeepVoid is offline   Reply With Quote
Old 02-11-2023, 10:18 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,669
Karma: 130140792
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 DeepVoid View Post
I really thank you for your hints, guys!!!

I managed to solve the issue with some little workarounds, and above all I was able to use the "Send to Kindle" webservice to sync the epub file with its hyphenation to my Amazon cloud!!!

So, no need for sideloading the book, which would have ended in the know issue of the lacking cover and the unability to sync the book across all my devices.
Calibre has a work around for missing covers. If you have WiFi on and the cover get lost, just plug the Kindle back into Calibre to have he covers sorted. It's that easy.

One thing you have to do that I don't do is turn on WiFi every time you want to add books. It means you then upload all kinds of stuff back to Amazon.
JSWolf is offline   Reply With Quote
Old 02-11-2023, 10:20 AM   #12
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,669
Karma: 130140792
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 DeepVoid View Post
Whatever, I hate sideloading via usb transfer because of its drawbacks, books loose their cover, and there is no way to sync them on your cloud account. I can easily manage epubs, now, without the need to convert them to mobi or anything else before sending them to the Paperwhite, and this is enough for me, to stay within the kindle ecosystem a little longer.
You are so very wrong. There are no drawbacks to using Calibre ot send eBooks. See my previous post about the covers.

The Kindle ecosystem is full of pollution.

And saying whatever when you are wrong is very snarky and you really should apologize.

Last edited by JSWolf; 02-11-2023 at 01:21 PM.
JSWolf is offline   Reply With Quote
Old 02-11-2023, 04:52 PM   #13
DeepVoid
Member
DeepVoid began at the beginning.
 
DeepVoid's Avatar
 
Posts: 15
Karma: 10
Join Date: Feb 2016
Location: Rome, Italy
Device: Kindle Paperwhite 11th Gen
Quote:
Originally Posted by JSWolf View Post
You are so very wrong
I'll make my peace with it, it's the story of my whole life.

Quote:
Originally Posted by JSWolf View Post
There are no drawbacks to using Calibre ot send eBooks
There are, indeed. Cloud sync is so necessary for me. My needs, my wrongs.
DeepVoid is offline   Reply With Quote
Old 02-23-2023, 07:21 PM   #14
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by DeepVoid View Post
I apologize for resuming this old thread, but I'm trying to add hyphenation to an epub book, [...]

Any hint to figure out what to do?
For CSS hyphens to work, it requires:
  • Your device to have the proper Hyphenation Dictionaries for your language.
  • Your ebook to be marked with the proper HTML language.

For example, Kobo has great support, and even allows you to add your own custom dictionaries for any language.

Kindles are locked down, so if Amazon hasn't added a hyphenation dictionary for (RandomLanguageX), you're out of luck.

- - - -

Side Note: According to jhowell in 2021, your Kindle should already support Italian hyphenation:

Quote:
Originally Posted by jhowell View Post
The hyphenation dictionary languages are: English, German, Italian, Portuguese, Spanish, French, Russian, Dutch, Hindi, Gujarati, Tamil, and Malayalam.
So, having no hyphenation automatically happening on your Kindle, something else must've been wrong.

- - -

Quote:
Originally Posted by DeepVoid View Post
I managed to solve the issue with some little workarounds, [...]

[...] use the Hyphenate This! plugin to generate the hyphenation.
I'd put a very huge WARNING label on this.

Only use Hyphenate This! on an ebook:
  • You are going to be personally reading.
  • As a very, very last resort.
    • Like if your ereader is really old.

DO NOT ever use it on a book you're trying to sell.

It completely fills the book full of SOFT HYPHENS... and while it may LOOK like "hyphenation now works", it can cause many other problems with:
  • Search
  • Spellchecking
  • Copy/Pasting
  • Dictionary popups
    • Where you press+hold on words.
  • [...]

(More disadvantages listed in my 2021 post.)

It's much better to do hyphenation automatically + on your actual device.

(Luckily, things have been getting much better in the past few years!)

- - -

Side Note #2: For all the hyphenation info you'll ever need to know... I've written A TON about it:

I'd also recommend just typing this into your favorite search engine:

Code:
hyphenation Tex2002ans site:mobileread.com
The past few years, I've been really explaining why:
  • Marking your ebook + HTML language properly

is super important. And proper hyphenation is one of the key reasons!

Last edited by Tex2002ans; 02-23-2023 at 07:33 PM.
Tex2002ans is offline   Reply With Quote
Old 02-24-2023, 08:03 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,669
Karma: 130140792
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 Tex2002ans View Post
I'd put a very huge WARNING label on this.

Only use Hyphenate This! on an ebook:
  • You are going to be personally reading.
  • As a very, very last resort.
    • Like if your ereader is really old.

DO NOT ever use it on a book you're trying to sell.

It completely fills the book full of SOFT HYPHENS... and while it may LOOK like "hyphenation now works", it can cause many other problems with:
  • Search
  • Spellchecking
  • Copy/Pasting
  • Dictionary popups
    • Where you press+hold on words.
  • [...]
I believe that search still works on a Kindle when soft hyphens are using with KF8. I do not know about the rest of the gotchas in your list.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] ePub3-itizer - epub3 output plugin for Sigil KevinH Plugins 435 01-19-2023 09:46 PM
epub3 app with epub3 dictionary support Doitsu ePub 0 01-21-2017 09:38 AM
Epub3 XHTML Validation epub3 Ramesh Arpitha ePub 5 06-30-2014 08:32 PM
PRS-T3 hyphenation - whether you want it or not ? cybmole Sony Reader 10 01-13-2014 02:43 PM
New Errors Converting epub3 -> zip -> epub3 Lola25 ePub 2 11-12-2013 09:37 PM


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


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