tex4ebook:當標題或作者有腳註時產生損壞的電子書

tex4ebook:當標題或作者有腳註時產生損壞的電子書

微量元素:

\documentclass{article}

\begin{document}
\title{Hello}%\footnote{Just a test}}
\author{Somebody\footnote{Anonymous.}}
\date{}
\maketitle
\end{document}

編譯時出現錯誤

line 13 column 1 - Error: unexpected </manifest> in <dc:title>
line 21 column 1 - Error: unexpected </package> in <dc:title>
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.

且產生的 epub 檔案已損壞。

有什麼解決辦法嗎?或者這實際上是不標準的?

答案1

Epub 檔案包含content.opf檔案中的一些元資料。例如,作者和標題應以純文字格式顯示。任何可能產生一些額外標記的巨集都需要在 a @author、 resp 中重新定義。@title配置:

\Preamble{xhtml}
\makeatletter
\Configure{@author}{\let\footnote\@gobble}
\makeatother
\begin{document}
\EndPreamble

此配置重新定義\footnote為吃一個參數並且不列印任何內容。此變更僅存在於 OPF 檔案中,因此腳註在文件中仍然有效。

相關內容