Epubs built by PreText yields errors when submitted to Google Books

Open
#2,835 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
build-system

Research direction

Start by building an EPUB and inspecting the generated EPUB/css/epub.css around lines 1004-1007 and 1379-1385, where Google Books rejects .code-display, .autopermalink, and a. Trace those rules back to the XSLT/CSS templates that emit the EPUB stylesheet, then reproduce with an EPUB build and compare epubcheck output against Google Books' parser. Done means the generated CSS no longer contains the rejected constructs and Google Books accepts the EPUB.

Written by the indexing model from the issue text.

Description

Despite the build to epub yielding 0 errors, and the output epub passing epubcheck with 0 errors as well, I get these errors when I submit the epub to Google Books:
EPUB/css/epub.css:1004, 20: An error occurred while parsing the CSS: Token ".code-display" not allowed here.

EPUB/css/epub.css:1004, 20: An error occurred while parsing the CSS: Token ".code-display" not allowed here.

EPUB/css/epub.css:1007, 20: An error occurred while parsing the CSS: Token ".code-display" not allowed here.

EPUB/css/epub.css:1007, 20: An error occurred while parsing the CSS: Token ".code-display" not allowed here.

EPUB/css/epub.css:1379, 18: An error occurred while parsing the CSS: Token ".autopermalink" not allowed here.

EPUB/css/epub.css:1379, 18: An error occurred while parsing the CSS: Token ".autopermalink" not allowed here.

EPUB/css/epub.css:1382, 18: An error occurred while parsing the CSS: Token ".autopermalink" not allowed here.

EPUB/css/epub.css:1382, 18: An error occurred while parsing the CSS: Token ".autopermalink" not allowed here.

EPUB/css/epub.css:1385, 20: An error occurred while parsing the CSS: Token "a" not allowed here.

EPUB/css/epub.css:1385, 20: An error occurred while parsing the CSS: Token "a" not allowed here.

May I know why is this so, and how to solve?

(Screenshot attached below also:)

Image
Dominant language
XSLT
Stars
466
Forks
251
Avg merge
4m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PreTeXtBook/pretext

All issues in PreTeXtBook/pretext

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.