Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output from GladTeX filter doesn't validate against EPub 3.2 #15

Open
Penaz91 opened this issue Mar 5, 2021 · 8 comments
Open

Output from GladTeX filter doesn't validate against EPub 3.2 #15

Penaz91 opened this issue Mar 5, 2021 · 8 comments

Comments

@Penaz91
Copy link

Penaz91 commented Mar 5, 2021

Hello, I've been trying to make an EPub of an E-book I'm writing using Pandoc Markdown and GladTeX seems to have solved most of my issues.

I want to bring to your attention some errors that EpubCheck raises when scanning the book, here are some of them:

ERROR(RSC-005): Book_Epub.epub/EPUB/text/ch026.xhtml(152,436): Error while parsing file: value of attribute "height" is invalid; must be a decimal number without any significant digits after the decimal point
ERROR(RSC-005): Book_Epub.epub/EPUB/text/ch026.xhtml(152,436): Error while parsing file: value of attribute "width" is invalid; must be a decimal number without any significant digits after the decimal point

It seems that this is due to the "width" and "height" attributes assigned to the images, I'm not sure if their values must be integers (even a value of 127.00 will trigger the error, it seems).

Another error is the following:

ERROR(RSC-007): Book_Epub.epub/EPUB/text/ch004.xhtml(112,149): Referenced resource "EPUB/text/gladtex_imgs/outsourced-descriptions.html" could not be found in the EPUB.
ERROR(RSC-007): Book_Epub.epub/EPUB/text/ch004.xhtml(118,219): Referenced resource "EPUB/text/gladtex_imgs/outsourced-descriptions.html" could not be found in the EPUB.

Is there a way to programmatically include the outsourced-descriptions.html file inside the generated epub?

Thank you very much for your attention and thank you for GladTeX, it really saved me a lot of trouble.

@humenda
Copy link
Owner

humenda commented Mar 7, 2021 via email

@Penaz91
Copy link
Author

Penaz91 commented Mar 8, 2021

Here is the minimal example, I just took out a single paragraph from the book I'm writing:

Let’s assume that our main character has 100 health points, and touching an enemy deals 5 points of damage. In absence of I-Frames, this would translate into 5 points of damage every frame, which would in turn come out between $5 \cdot 60 = 150$ and $5 \cdot 60 = 300$ points of damage per second (at respectively 30 and 60fps).

For ease of use, I also attached it in a zip file:

gladtex_test.md.zip

I'm using the following program versions:

  • EPUBCheck v4.2.4
  • pandoc 2.11.4 (Compiled with pandoc-types 1.22, texmath 0.12.1, skylighting 0.10.2)
  • GladTeX 3.1.0

If this helps, my OS is Artix Linux (an ArchLinux Derivative) and GladTeX is taken from the AUR (here's the link)

The "resource reference" issues don't really worry me that much at the moment, since it accounts for around 3% of the errors I get, so don't worry. After we tackle this first issue, I'm thinking of taking a look at the code base and (if possible) try to implement a solution to the issues.

I'm at your disposal for any further information needed.

@humenda
Copy link
Owner

humenda commented May 27, 2021 via email

@Penaz91
Copy link
Author

Penaz91 commented May 28, 2021

No worries! Thank you a lot for your work!
About the other issue: technically epub should be something akin to a "glorified archive" so maybe we can try "injecting" the resource reference file inside the Epub file.
If I'm not mistaken the method used is not only supported by epub but even suggested for long descriptions, so this could be a solution to the problem.

I will clone the repository as soon as possible and get back to you. Thank you again.

@Penaz91
Copy link
Author

Penaz91 commented May 28, 2021

I tried the new version, using the --epub flag and I'd say it's an absolute success!
The "width" and "height" errors are gone.

@humenda
Copy link
Owner

humenda commented Jun 20, 2021 via email

@Penaz91
Copy link
Author

Penaz91 commented Jun 20, 2021

Sure thing, take all the time you need and I'll be ready to test when needed!

@humenda
Copy link
Owner

humenda commented Mar 21, 2023

I've researched the issue regarding the missing resource from the EPUB. This is
now reported in #19. I'll fix it in the next weeks.

The rounding issue should be fixed by using --epub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants