一千萬個為什麽

搜索

Epub OPF'spine'元素:如何從線性閱讀順序中排除html文件,同時允許從鏈接訪問它



I converted an html source to epub with Calibre. Original 'html' source has got an individual html file for each footnote. Footnotes' files are reported in element of my content.opf, so they show up and can be navigated at the end of the book, which is an undesiderable behaviour. If I erase from the element the references to footnotes' files, footnotes are displayed in external browser instead of Calibre ebook viewer; therefore this behaviour is less desiderable than the previous one.

我怎樣才能將這些腳註從閱讀順序中提取出來,同時讓讀者點擊鏈接時將其顯示在電子書閱讀器中?

以下是典型的 itemref 元素:


附:我在 itemref 元素中嘗試了 linear =“no”屬性,但實際上它並未排除影響文件的讀取,它只是改變了閱讀順序,閱讀命令結束。

轉載註明原文: Epub OPF'spine'元素:如何從線性閱讀順序中排除html文件,同時允許從鏈接訪問它

一共有 1 個回答:

has linear="no" attribute exactly for this purpose.

編輯:

From the epub 2 specification

所有作為出版物一部分的OPS內容文件(即:   列在清單中),任何人都可以訪問它們   本規範允許的引用機制必須包含在內   脊柱。這樣的參考機制包括,作為部分列表,   OPS內容文件中的超文本鏈接,以及   NCX,旅遊和指南。

For each itemref, the publication author may specify the optional linear attribute to designate whether the associated OPS Content Document is primary (linear="yes", which is the default when linear is not present) or auxiliary (linear="no".) It is important that the publication author include some kind of internal reference, such as a hypertext link, to any OPS Content Document that is declared to be auxiliary; it is recommended that references be added to NCX for all auxiliary content. At least one itemref in spine must be declared primary.

Specifying whether an OPS Content Document is primary or auxiliary is useful for Reading Systems which opt to present auxiliary content differently than primary content. For example, a Reading System might opt to render auxiliary content in a popup window apart from the main window which presents the primary content. (For an example of the types of content that may be considered auxiliary, refer to the example below 和the subsequent discussion.)

Reading Systems are not required to differentiate between primary and auxiliary content, 和for the requirements 和recommendations given in this section may consider all OPS Content Documents in spine to be primary, regardless of the value of the linear attribute.

這意味著,必須包括所有引用的項目,作為您的案例中的腳註 在脊柱。可以用 linear = no 將它們聲明為auxilary,但它取決於閱讀 系統,它是如何處理的。

More advanced readers, like Azardi or Readium, works correctly 和display auxilary items only on request (link click). Others, like ADE, or Calibre in your case, work in the other way.

正如我認為使用 tex4htLaTeX 轉換為 html ,您可能會嘗試生成內聯腳註,這些腳註不會生成新文件每個腳註,但收集在 html 文件的最後:

htlatex filename "xhtml, fn-in"