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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-10-2013, 09:29 AM   #1
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 577
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Hyphenation not working with kepubs

I've uploaded a Dutch hyphenation file to the device. Works correct with the Adobe renderer but not with the Access renderer (kepub).

Do kepubs need some additional hyphenation CSS entries?
Anak is offline   Reply With Quote
Old 07-12-2013, 09:47 AM   #2
spruitje
Junior Member
spruitje doesn't litterspruitje doesn't litter
 
Posts: 8
Karma: 106
Join Date: Jul 2013
Location: Netherlands
Device: kobos, kindles
Dutch hyphenation not working correctly with kepubs

Your title implies that hyphenation does not work at all in kepubs. My experience is that Dutch text in kepubs is not hyphenated according to the Dutch hyphenation rules that I supplied. In some more detail:
  • without supplying a Dutch hyphenation file there is no hyphenation in epub or kepub;
  • with a valid /usr/local/Kobo/hyphenDicts/hyph_nl.dic hyphenation works correctly in epub, but hyphens appear in arbitrary places, often incorrect, in kepub: uitg-esproken, ziekenh-uis, wasm-achine, tanda-rts;
  • test cases have proper language code nl in dc:language element of opf and in xml:lang attribute on html element of xhtml;
  • the presence of a symbolic link /usr/share/hyphen/hyph_nl_NL.dic does not seem to make a difference.
spruitje is offline   Reply With Quote
Old 07-12-2013, 11:50 AM   #3
Anak
Fanatic
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 577
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by spruitje View Post
Your title implies that hyphenation does not work at all in kepubs. My experience is that Dutch text in kepubs is not hyphenated according to the Dutch hyphenation rules that I supplied. In some more detail:
  • without supplying a Dutch hyphenation file there is no hyphenation in epub or kepub;
  • with a valid /usr/local/Kobo/hyphenDicts/hyph_nl.dic hyphenation works correctly in epub, but hyphens appear in arbitrary places, often incorrect, in kepub: uitg-esproken, ziekenh-uis, wasm-achine, tanda-rts;
  • test cases have proper language code nl in dc:language element of opf and in xml:lang attribute on html element of xhtml;
  • the presence of a symbolic link /usr/share/hyphen/hyph_nl_NL.dic does not seem to make a difference.
Yes, hyphenation does work with epubs and not with kepubs.
Quote:
Also, RMSDK only supplies hyphenation dictionaries for English, French, German, Italian, Brazilian Portuguese, and Spanish. Customers may add their own hyphenation dictionaries for other languages. Hyphenation dictionaries are in the same format as the ones used in OpenOffice. Customers need to be aware that many of the non-Adobe hyphenation dictionaries available might support only a subset of the required functionalities.
I use a Dutch hyphenation dictionary file
  • source: Open Taal (hyph_nl_NL.dic)
  • complies to Dutch hyphenation rules, so there is no incorrect hyphenation.
  • hyphenation dictionary is in OpenOffice format (and UTF-8)
  • to define the default language for an XHTML document the language attributes need to be attached to the root html element. The language code should match the language code specified in a dc:language element in the package document's metadata section.
    Code:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl">
  • adding CSS properties, doesn't seem to make any difference for kepubs. Regardless of whether these properties are required or not as the default settings of these properties are "auto", or "normal". I tried:
    • -adobe-hyphenate:explicit; (only for Adobe RMSDK)
    • -epub-hyphens:auto;
    • -webkit-hyphens:auto;
    • hyphens:auto;
    • text-wrap:normal;
    • overflow-wrap:break-word;

All I had to do is to build a patch to load the Dutch hyphenation dictionary on to the Kobo. Containing:
Code:
.\usr\local\Kobo\hyphenDicts\hyph_nl.dic
.\usr\share\hyphen\hyph_nl_NL.dic
Anak is offline   Reply With Quote
Old 07-13-2013, 12:10 PM   #4
spruitje
Junior Member
spruitje doesn't litterspruitje doesn't litter
 
Posts: 8
Karma: 106
Join Date: Jul 2013
Location: Netherlands
Device: kobos, kindles
Quote:
Originally Posted by Anak View Post
I use a Dutch hyphenation dictionary file
  • source: Open Taal (hyph_nl_NL.dic)
  • complies to Dutch hyphenation rules, so there is no incorrect hyphenation.
After reading this German thread and doing some experiments with specially crafted hyphenation rule sets, I concluded this standard Dutch hyphenation dictionary is much too complex for the simple hyphenation algorithm that is apparently used by the Access renderer. Therefore I started experimenting with a simple limited hyphenation dictionary with only the digits 1 and 2 in patterns, only based on rules of Dutch orthography and pronunciation. After a day of optimizing for apparent bugs I gave up on hyphenation in kepubs. Just one more reason to stick to standard epubs. I my current configuration text in epubs is hyphenated using the standard Dutch rules, but hyphenation in kepubs is disabled.

Quote:
Originally Posted by Anak View Post
adding CSS properties, doesn't seem to make any difference for kepubs. Regardless of whether these properties are required or not as the default settings of these properties are "auto", or "normal". I tried:
  • -adobe-hyphenate:explicit; (only for Adobe RMSDK)
  • -epub-hyphens:auto;
  • -webkit-hyphens:auto;
  • hyphens:auto;
I haven't seen any useful effect of the *hyphen* attributes either.
spruitje is offline   Reply With Quote
Old 07-24-2013, 07:09 AM   #5
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 76
Karma: 165846
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by spruitje View Post

I haven't seen any useful effect of the *hyphen* attributes either.
I got an (almost) correct hypenation of kepubs by adding this simple line to the top of the CSS:
Code:
* { -webkit-hyphens: auto; }
and using the correct value for the "<dc:language>" element.

I found this line while peeking through libnickel.so in kobo's firmware, near the 'justify' string... I guess this is what kobo uses when you select "justified" in font options dialog.

I suspect that the poor quality of Italian hyphenation depends on the provided hyphenation dictinary, but didn't made any test with a better one.
met67 is offline   Reply With Quote
Old 07-25-2013, 09:22 PM   #6
RobertJSawyer
Fanatic
RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.RobertJSawyer ought to be getting tired of karma fortunes by now.
 
RobertJSawyer's Avatar
 
Posts: 510
Karma: 1812388
Join Date: Jun 2006
Location: Toronto
Device: Kobo Clara HD, Aura HD, Aura, Mini; Kindle PaperWhite
I don't know if this is related to your problem or not, but I noticed today on an English-language kepub that if you set justification ON then hyphenation happens, and if you turn it OFF, it doesn't.
RobertJSawyer is offline   Reply With Quote
Old 07-26-2013, 01:42 AM   #7
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 76
Karma: 165846
Join Date: Jan 2012
Device: Nook Touch
Quote:
Originally Posted by RobertJSawyer View Post
I don't know if this is related to your problem or not, but I noticed today on an English-language kepub that if you set justification ON then hyphenation happens, and if you turn it OFF, it doesn't.
I knew that, the problem is that with justification ON everything is justified, even those paragraph that should be centered or right justified.

Adding this line to the CSS you get hyphenation without side effects...
met67 is offline   Reply With Quote
Old 07-26-2013, 06:41 AM   #8
met67
Connoisseur
met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.met67 can program the VCR without an owner's manual.
 
Posts: 76
Karma: 165846
Join Date: Jan 2012
Device: Nook Touch
You may also want to check this:
https://www.mobileread.com/forums/sho...d.php?t=218814
met67 is offline   Reply With Quote
Old 08-12-2013, 12:46 PM   #9
eevan
Junior Member
eevan began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Location: Belgrade, Serbia
Device: Kobo Glo
Quote:
Originally Posted by met67 View Post
I suspect that the poor quality of Italian hyphenation depends on the provided hyphenation dictinary, but didn't made any test with a better one.
Here is what I tried.
I replaced the built-in italian hyphenation dictionary with the serbian one using the anak's method. Then I marked properly a serbian language book as an italian (so, the Dublin Core language metadata in content file of the book is set to "it" along with lang and xml:lang attributes of html tags of all .html files in the book are set to "it"). Then I transfered the book as kepub. Book details on the Kobo displays the language of the book as Italiano. I also used * { -webkit-hyphens: auto; } rule.

But the hyphenation doesen't work

When I deleted the book and transfered it again as regular epub, the hyphenation was done properly in the ADOBE renderer.

I also tried to load the dictionary as a new language, hyph_sr.dic and hyph_sr_RS.dic and marked the book's language the same way as in the first experiment using "sr" tag. Again, the hyphenation was missing in ACCESS renderer and worked fine in ADOBE.

So, maybe this means that the ACCESS doesn't share the same dictionary files with ADOBE renderer?

Cheers
eevan is offline   Reply With Quote
Old 08-12-2013, 06:22 PM   #10
Bonex
Connoisseur
Bonex began at the beginning.
 
Posts: 63
Karma: 10
Join Date: Oct 2010
Device: KDXG, Kobo Glo, Kobo Aura HD
I have the very same problem, but I'm using the spelling dictionaries provided by the firmware. Both english and italian books are always spelt correctly from the epub renderer, but are often wrong when using the kepub renderer.
What I find odd is that they do similar errors in both languages. For example "trasmiss-ione" instead of "trasmis-sione" in italian, or "pointl-essly" instead of "point-lessly" in english.
IMHO it is some bug.
Bonex 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
Some serious issues with kepubs Anak Kobo Reader 73 05-09-2013 06:57 PM
Pros and Cons of using Kepubs vs ePubs kaufman Kobo Reader 8 04-30-2013 04:41 PM
Unsynced kepubs show up as on device in Calibre Mrs_Often Kobo Reader 18 04-09-2013 07:13 AM
Is it possible to have kepubs on different devices without them getting locked? Nascarfan1972 Kobo Reader 5 01-20-2013 08:10 AM
[Kobo Glo] kepubs and series (or: some kepubs invisible for Calibre) beedaddy Devices 3 01-14-2013 02:05 AM


All times are GMT -4. The time now is 03:36 AM.


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