Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 07-28-2021, 11:59 PM   #16
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kovidgoyal View Post
xml:lang (or actually just lang in modern html) sets the language for the contents of the tag it appears on, *and that is all*. Not the whole book, or even not the whole html file (assuming the tag is not the root <html> tag). And spellcheck respects that, as it is supposed to. That has *nothing* to do with what the overall language for the book is.
I think there has been a little confusion in the discussion. I don't think that anyone was denying that the book language was set in the OPF but that it could be overridden in other places. I think the real question was why the language set for the titlepage.xhtml was always English. And, I understand you reasoning. But...

That doesn't take into account TTS applications. Which includes the calibre viewer. Testing it, that page is completely skipped as there is no text to be read out. For most of my books that is sort of OK as it is the cover and there is a text title page after it. That gets read out. But, I also have enough books that don't have this, and some that have an image as the second page with the title and author.

I add a heading the to titlepage.xhtml so that it will be added to the ToC if I rebuild it. It will either just be "Cover" or the actual title if the second page doesn't have it. But, I add it with "display:none" so it doesn't appear and is not read out.

I think it would be good to have something on this page for TTS. And if that was done, setting the language correctly should be done.

I had a quick look at what needed to be done when using the svg style covers. It looks like adding an <desc> tag will be read out. So:

Code:
  <div>

    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 781 1250" preserveAspectRatio="xMidYMid meet">
        <desc>Description of Book Cover Page</desc>
      <image width="781" height="1250" xlink:href="../cover.jpeg"/>
    </svg>

  </div>
There was mention of using the <title> tag and an attribute "aria-labelledby" and ids on the other tags to connect them together. But, the above is what worked.

I assume the alt attribute on img tags are read. I haven't played with that as I like the way svg covers work.
davidfor is offline   Reply With Quote
Old 07-29-2021, 04:36 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@davidfor: Does that actually work though? At least in the calibre viewer, IIRC, cover pages that just contain an image are removed and the image is rendered specially taking into account the users preferences for aspect ratio preservation. And also to make sure the cover renders well, since not every book has correct cover markup. So does the viewer's TTS read that?

Not to mention that titlepages are EPUB specific, no other format has them.
kovidgoyal is online now   Reply With Quote
Advert
Old 07-29-2021, 06:14 AM   #18
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kovidgoyal View Post
@davidfor: Does that actually work though? At least in the calibre viewer, IIRC, cover pages that just contain an image are removed and the image is rendered specially taking into account the users preferences for aspect ratio preservation. And also to make sure the cover renders well, since not every book has correct cover markup. So does the viewer's TTS read that?
Yes, the viewer read it out. But, there is a heading on the page. I have changed the template used to generated the title page so that it has a heading with style "display:none" to make generating the ToC easy. That probably means it is treating the first page as a normal page.
Quote:
Not to mention that titlepages are EPUB specific, no other format has them.
But, including a page with a cover image isn't unusual in other formats. Sometimes it isn't first, but, it is there. Do the epub standards say the cover page should be treated differently than other pages? I've never looked at the details for covers.

From the point of view of using a TTS for a book. I would expect something to be read for the cover. But, I could also see a dedicated TTS reader might say the title and author from the metadata at that point. When I was testing this with the viewer, it felt like something was missing. That was compounded by the book I chose. It has the cover page followed by a title page. But, that was also an image so it skipped to the third page before anything was read out.

I don't know what should be done. I don't normally use TTS. It was just something I thought of when reading this thread and decided to try it.
davidfor is offline   Reply With Quote
Reply

Tags
metadata language


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add xml:lang to ePub abraum ePub 14 07-12-2025 08:08 PM
xml:lang tage fredheim Conversion 5 04-25-2019 06:45 AM
xml:lang oddities jcsalomon ePub 1 06-06-2016 05:28 PM
xml:lang empty (pdf to epub) fxp33 Conversion 3 05-07-2015 11:40 PM
After merging all the .xml files, how do you divide it back into .xml files? automa Sigil 10 08-13-2013 07:43 AM


All times are GMT -4. The time now is 10:52 PM.


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