Distinguish regular EPUB hyperlinks from footnote links

Author: serhii-moskalenkoCreated Sep 23, 2026Updated Sep 23, 2026

Scope Self-Check (required)

  • I have read SCOPE.md and ROADMAP.md.
  • This is not a new theme or theming change (themes are temporarily closed pending the move to SD-loaded themes).
  • This is not a new external network connector (sync engine, cloud storage, remote file access, or any new "talk to a server" feature). Improvements to the existing OPDS support are in scope and do not count as a new connector.
  • This is not an interactive app (game, calculator, notepad), writing/authoring tool, RSS/news/browser feature, media playback feature, or PDF rendering.
  • The stock firmware does not already handle this well.
  • No other popular CrossPoint fork already handles this well (or, if one does, I explain below why CrossPoint still needs it).

Problem this solves

CrossPoint currently treats every internal EPUB hyperlink as a footnote-style navigation event, even when the link is a normal book navigation link and does not have epub:type="noteref".

This causes problems in highly structured EPUBs such as Bibles, dictionaries, reference books, and technical manuals that contain their own navigation pages.

For example, my Bible has links such as:

  • Books
  • Chapters
  • Individual chapter numbers
  • Footnote markers
  • Cross-references to other verses

On an Xteink X4 Pro running CrossPoint 1.6.5rc, all of these internal links are added to the same temporary footnote return stack.

As a result:

  1. I use the in-book navigation to select a testament, book, and chapter.
  2. I read the selected chapter and close the book.
  3. When I reopen it, CrossPoint returns to the original navigation page instead of the last page I was reading.

The same stack pollution also breaks cross-reference navigation:

  1. I open a real footnote from a verse.
  2. The footnote displays a list of cross-references.
  3. I open one of those references.
  4. Back may return to an earlier Books or Chapters menu instead of the cross-reference list.

For a Bible with 66 books and more than 1,000 chapters, removing the in-book Books and Chapters navigation is not a practical workaround.

Steps to reproduce

  1. Open an EPUB containing both regular internal navigation links and footnotes.
  2. Tap a regular link such as Books, Chapters, or a chapter number.
  3. Navigate to a chapter and read several pages.
  4. Close and reopen the EPUB.
  5. Observe that CrossPoint may reopen the earlier navigation page instead of the last reading position.

A minimal distinction in the markup is:

xml
<a href="book-list.xhtml">Books</a>

<a href="notes.xhtml#note-1"
   epub:type="noteref">*</a>

The first link is ordinary navigation. Only the second link is a footnote reference.

Expected behavior

CrossPoint should distinguish regular internal hyperlinks from actual footnote references.

  • Links with epub:type="noteref" should use the temporary footnote return stack.
  • Regular internal EPUB links should navigate normally without being treated as footnotes.
  • Only actual noteref links should appear in the Footnotes menu.
  • Closing the book after following a regular navigation link should save the current reading position.
  • Back navigation from a real footnote should continue to return to the originating text.

If normal hyperlinks need their own Back history, it should be separate from the footnote stack and must not cause CrossPoint to save the original navigation page when the book is closed.

Suggested implementation

When parsing an internal <a href> element, inspect epub:type as a space-separated token list.

Suggested classification:

  • Contains noteref: footnote link; preserve the existing temporary-return behavior.
  • Does not contain noteref: regular internal hyperlink; navigate without adding it to the footnote stack.

The touch handler could then choose between footnote navigation and normal navigation based on the parsed link type.

The per-page Footnotes list should also contain only links classified as footnotes.

The EPUB section-cache version may need to be incremented so books cached before this change are re-indexed with the correct link types.

Acceptance criteria

  • Tapping Books, Chapters, or a chapter number does not add a footnote return position.
  • Closing and reopening the book resumes at the last page actually being read.
  • A link marked epub:type="noteref" still opens its note and supports Back.
  • Regular internal links do not appear in the Footnotes menu.
  • Existing EPUBs that use proper noteref markup continue to work.
  • Touch navigation on the X4 Pro continues to work.
  • Button-based footnote navigation on other supported devices continues to work.

Why the stock firmware and other forks do not already solve this

The stock firmware does not provide an equivalent standards-aware EPUB hyperlink and footnote workflow.

This also cannot be reliably fixed by restructuring the EPUB. Splitting navigation into additional XHTML pages or limiting the number of links per page does not change how CrossPoint classifies internal links or saves the footnote return stack.

I have not found a documented X4 Pro-compatible fork that clearly separates regular internal hyperlinks from noteref links. A similar concern was also raised in CrossPoint Discussion #1773:

https://github.com/crosspoint-reader/crosspoint-reader/discussions/1773

This request concerns core EPUB navigation, progress persistence, and footnote behavior. It does not add a theme, network service, interactive app, media feature, or PDF functionality.

Why the stock firmware (and other forks) do not already solve this

  • Device: Xteink X4 Pro
  • CrossPoint version: 1.6.5rc
  • Release commit: a1ceb63
  • Format: EPUB 3
  • Language of the test book: Ukrainian

Proposed change

Treat only links marked with epub:type="noteref" as footnotes. Regular internal EPUB links should navigate normally without affecting the footnote return stack or saved reading position.

Memory / flash / complexity cost

No response

Additional context

No response

Source: crosspoint-reader/crosspoint-reader