suttacentral / editions

Generated files for SuttaCentral editions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Middle discourses - missing footnotes in the ePub formatted book.

pingssgp opened this issue · comments

commented

Operating scenario:

  • Product file name: "Middle-Discourses-sujato-2024-02-12.epub"
  • Date downloaded: 2024-02-18
  • Platform, hardware: MacBook Pro, 2023 version, Apple M2 Pro.
  • Operating system: macOS Sonoma 14.3.1
  • Software used to open & read the book: Apple Books version 6.2 (build 6030)

Problem description:
I downloaded the complete bundle editions-2024-02-12 from the releases on GitHub. This bundle contains the ePub versions of the publications.

From the ePub versions, I opened the file stated above ("Middle-Discourses-sujato-2024-02-12.epub") in the Apple Books application on my MacBook Pro.

Within the ePub book there are clickable links for each of the numbered footnotes.

Expected behaviour:
When a footnote number is clicked, the book reader application should take me to the footnote and show its contents on the screen.

Actual behaviour:
Nothing happens when the footnote link is clicked.

Other supporting information:
The PDF version of the book has the text of the footnotes on the same page as the footnote itself. None of these footnotes appear anywhere in the ePub version.

I have not checked the ePubs for the other texts.

commented

As an example, I looked through the LaTeX source file for the Majjhima Nikaya. The source for MN1 starts on line 880 in the file "Middle-Discourses-sujato-2023-10-09-1.tex".

Take, for example, footnote (1). The source file does have the relevant markup for the footnote.

\scevam{So\marginnote{1.1} I have heard.\footnote{Just as the \textsanskrit{Dīghanikāya} begins with the complex and 
...
...

However, there could be an issue when it was converted to ePub. Both the open source Calibre reader and Apple's books application fail to render the footnote.

Hovering over footnote (1) in Calibre shows an internal link.
image

(see the status line at the bottom of the window for details).

However, clicking on that link fails to render anything. See the screenshot below.
image

commented

When opening the same file in the Apple Books application, the footnote (1) shows as a clickable link that does nothing.

image

You can see that the footnotes (1 ... onwards) are blue hyperlinks and are clickable.

As an example of working links, here's a book that has a clickable bit of text linking to another section in the same ePub.
01

Clicking on the link in the rectangle (above) takes you to the relevant section within the same book (below).
image

@ihongda I went ahead and assigned this to you since I think you are the only one who can fix it. But maybe Bhante @sujato needs to be involved too.

commented

I looked further into the ePub file. As an ePub is simply a ZIP file with XHTML content and some markup, you can unzip it and look into the individual XHTML chapter files.

The link in question above is the first footnote from MN1. The XHTML file for this chapter is mn-mulapannasa.xhtml. The reference to footnote (1) appears in line 17.

image

The footnote refers to an external file endnotes.xhtml that does not appear in the ePub bundle. I'm guessing that this file was just not generated when creating the ePub package.