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 09-28-2021, 04:53 PM   #1
clairvoyant
Junior Member
clairvoyant began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2021
Device: Kobo Libra H2O
Kobo and interlinear epub documents

I currently have a Kindle Paperwhite for language learning but find it slow and tedious to look up individual words. So I looked into interlinear texts and found this thread by @Doitsu as well as source code to generate interlinear epub documents through Google translate.

Now I'm considering getting a Kobo Libra H2O but I'm wondering if they support interlinear books. Or does maybe KOReader support it if I install it on Kobo?
clairvoyant is offline   Reply With Quote
Old 09-28-2021, 06:39 PM   #2
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: 43,443
Karma: 165170834
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I ran into this a couple of years back and thought it looked interesting. I played with Doitsu's original idea of using <ruby> since I knew that worked with Kobo's webkit based renderer. I converted his original to an epub3 document and using this in combination with Kobo's alternate renderer worked quite happily after sending it to my Kobo using the KoboTouchExtended driver to send as a kepub. I've attached a screenshot from a Kobo Forma.

Edit: Finding that document makes me realize that I really need to do some cleanup.
Attached Thumbnails
Click image for larger version

Name:	screen_001.png
Views:	237
Size:	289.8 KB
ID:	189429  

Last edited by DNSB; 09-28-2021 at 06:42 PM.
DNSB is online now   Reply With Quote
Advert
Old 01-31-2025, 03:41 PM   #3
clairvoyant
Junior Member
clairvoyant began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2021
Device: Kobo Libra H2O
I appreciate the response @DNSB.

So I went ahead and purchased a Kobo device and wrote a software in Rust to accomplish this. It automatically fetches all the words, translates them and then export a bilingual epub. I then use Calibre with Kobo Touch Extended Driver installed to convert the book into kepub while transferring it to my device.

<ruby> looks great but unfortunately I ran into two issues:
  1. Loading a chapter makes the device freeze for about 50 seconds while showing a blank page with the book title visible in the footer. Once the chapter (xhtml file I assume) is loaded, turning pages is as responsive as usual.
  2. Clicking on a word freezes the device for a couple of seconds and does nothing. When trying to select multiple words, it freezes and sometimes selects all the words from your word to the beginning of the page.

I assume it's due to how Kobo parse <ruby>. Code example:

Code:
<p>
    <ruby>
        Die
        <rt>the</rt>
    </ruby>
    <ruby>
        Unglücksfälle
        <rt>accidents</rt>
    </ruby>
    <ruby>
        des
        <rt>of the</rt>
    </ruby>
    <ruby>
        Studenten
        <rt>students</rt>
    </ruby>
    <ruby>
        Anselmus.
        <rt>*</rt>
    </ruby>
</p>
When converted to kepub by Kepubify for example:

Code:
<p>
    <ruby>
        <span class="koboSpan" id="kobo.13.1">Die</span>
        <rt><span class="koboSpan" id="kobo.13.2">the</span></rt>
    </ruby>
    <span class="koboSpan" id="kobo.13.3"> </span>
    <ruby>
        <span class="koboSpan" id="kobo.13.4">Unglücksfälle</span>
        <rt><span class="koboSpan" id="kobo.13.5">accidents</span></rt>
    </ruby>
    <span class="koboSpan" id="kobo.13.6"> </span>
    <ruby>
        <span class="koboSpan" id="kobo.13.7">des</span>
        <rt><span class="koboSpan" id="kobo.13.8">of the</span></rt>
    </ruby>
    <span class="koboSpan" id="kobo.13.9"> </span>
    <ruby>
        <span class="koboSpan" id="kobo.13.10">Studenten</span>
        <rt><span class="koboSpan" id="kobo.13.11">students</span></rt>
    </ruby>
    <span class="koboSpan" id="kobo.13.12"> </span>
    <ruby>
        <span class="koboSpan" id="kobo.13.13">Anselmus.</span>
        <rt>*</rt>
    </ruby>
</p>
To debug, I tried changing <ruby> to a similar format with <span> and relying on CSS to get the same style. It seems to have solved both the issues but results in Kobo ignoring the connection and sometimes have page breaks between a word and its translation. Playing around with "break-inside: avoid;" doesn't seem to make any difference. <ruby> doesn't seem to have this issue.

Is there anything else I could try to fix the issues?
clairvoyant 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
Is it possible to create interlinear text epubs? Doitsu ePub 8 05-24-2012 11:12 AM
[Old Thread] Problems with creating epubs w/ interlinear text Doitsu Calibre 6 11-20-2011 07:51 PM
Créer des documents ePub Thomas_ Software 3 04-17-2010 07:36 AM
ePub documents much slower? Matth3w Sony Reader 9 12-22-2009 12:58 PM
Producing ePub documents from Adobe InDesign Alexander Turcic Deals and Resources (No Self-Promotion or Affiliate Links) 12 09-07-2007 12:36 PM


All times are GMT -4. The time now is 03:11 PM.


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