Giter Club home page Giter Club logo

Comments (9)

Marcello1173214 avatar Marcello1173214 commented on June 2, 2024

@shoesforindustry @jgm Hi, I'm not a developer but a mere mortal who creates EPUB 2. Please can you tell me the solution in a simple way? (xml:lang is not allowed in the opf file for epub 2 but if I remove it it gives me an error in ACE by Daisy). I can't understand from the coded solution you put. I put language in every html file with the Sigil plugin (Access-aide) but it doesn't solve. I'll leave an email if you want to discuss but a comment here is also fine. Thank you. [email protected]

from pandoc.

shoesforindustry avatar shoesforindustry commented on June 2, 2024

Hi @Marcello1173214, I am not sure what you are asking. To put the language into the content.opf of an ePub2 it would be part of the opf metadata like <dc:language>en</dc:language>, is that what you were asking?

If using Panodc then see the ePub section for more information:
https://pandoc.org/MANUAL.html#epubs

You could also add this language attribute using the metdata editor in Sigil.

I don't think you need the language in the HTML, but I guess it would not hurt, something like:
<html lang="en">

If all is correct the epub will pass both ePubCheck and ACE validation.

Either Pandoc or Sigil should be able to create valid ePubs without editing the content.opf file :)

Hope this helps.

from pandoc.

Marcello1173214 avatar Marcello1173214 commented on June 2, 2024

@shoesforindustry Yes, it should be like this, the problem is that if I put the language only in the metadata (dc:languageit-IT</dc:language>) it passes validation only with epubchecker, while in ACE it gives me this error "The language must be specified (xml:lang in OPF package)
Ensures the OPF XML language is provided
Add the missing OPF xml:lang attribute". Conversely, if I put this value in the opf, as ACE says, it gives me an error in epub checker: "xml:lang attribute is not allowed in the opf file". It therefore seems that there is a bug in ACE that doesn't take into account that the language attribute in epub 2 can only be put in the metadata.

from pandoc.

shoesforindustry avatar shoesforindustry commented on June 2, 2024

@Marcello1173214 Odd as I have just tried one of my Epub2 files and it passes epubcheck and Ace? Can you publish one of your epubs that fails?

from pandoc.

Marcello1173214 avatar Marcello1173214 commented on June 2, 2024

from pandoc.

shoesforindustry avatar shoesforindustry commented on June 2, 2024

I am unable to at present, but if you are producing epub2 books then I think ACE only checks against epub3? So you would have to produce an epub3?

from pandoc.

Marcello1173214 avatar Marcello1173214 commented on June 2, 2024

from pandoc.

shoesforindustry avatar shoesforindustry commented on June 2, 2024

from pandoc.

Marcello1173214 avatar Marcello1173214 commented on June 2, 2024

I am pretty sure Ace only checks epub3 which has been around since 2011! I use pandoc which produces epub3 by default. I presume it is similar for Sigma?

So that explains everything (I didn't know this as I had never read anything about it on the Daisy website). I use Sigil and in fact there is a plugin that allows you to convert from epub 2 to 3 although, working as a professional, I think I will learn to work directly with epub 3. Thank you for your help!

from pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.