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

Index pages use – but it can not be used in ePub #12359

Closed
methane opened this issue May 7, 2024 · 2 comments · May be fixed by #12386
Closed

Index pages use – but it can not be used in ePub #12359

methane opened this issue May 7, 2024 · 2 comments · May be fixed by #12386
Labels

Comments

@methane
Copy link
Contributor

methane commented May 7, 2024

Describe the bug

Books.app shows "error on line 34 at column 29: Entity 'ndash' not defined" on index pages.

epubcheck shows

FATAL(RSC-016): build/epub/Python.epub/genindex-A.xhtml(34,29): Fatal Error while parsing file: The entity "ndash" was referenced, but not declared.

How to Reproduce

make venv && make epub in Doc/ folder in Python source tree.
Show build/epub/Python.epub with Books.app or epubcheck --locale en-US build/epub/Python.epub 2>python-epub-errors.txt

Environment Information

Platform:              darwin; (macOS-14.4.1-arm64-arm-64bit)
Python version:        3.12.2 (main, Feb 25 2024, 03:55:42) [Clang 17.0.6 ])
Python implementation: CPython
Sphinx version:        7.3.7
Docutils version:      0.21.2
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

No response

Additional context

No response

@chrisjsewell
Copy link
Member

Heya, I believe this issue needs to be opened at https://github.com/python/cpython

@methane methane changed the title Index pages use &endash; but it can not be used in ePub Index pages use – but it can not be used in ePub May 15, 2024
@methane
Copy link
Contributor Author

methane commented May 15, 2024

@chrisjsewell cpython avoid this issue by epub_use_index=False.
python/cpython#118690

The index pages are generated by sphinx itself, not extensions we used.

<h1 id="index">{% trans key=key %}Index &ndash; {{ key }}{% endtrans %}</h1>

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

Successfully merging a pull request may close this issue.

2 participants