tex4ebook、biblatex 和腳註/尾註具有正確的輸出,但有錯誤訊息

tex4ebook、biblatex 和腳註/尾註具有正確的輸出,但有錯誤訊息

我在中使用了以下 MWE Testdocument.tex

\documentclass[11pt,a4paper]{report}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tex4ebook}
\providecommand\phantomsection{}
\ifdefined\HCode
\usepackage[xindy,noautomatic]{imakeidx}
\else
\usepackage{imakeidx}
\fi
\makeindex[intoc=false,columns=1,noautomatic,title=Alphabetisches Verzeichnis]
\ifdefined\HCode
\usepackage[hyperindex=true,
pdfauthor={Autor},
pdftitle={Titel},
pdfkeywords={Philosophy}]{hyperref}
\else\fi
\usepackage[sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp]{biblatex}
\addbibresource{Bibliographie.bib}
\usepackage{endnotes}
\let\footnote=\endnote
\begin{document}

    "`Ein zitierter Satz eines Autors."'\footcite{AG1986}
    
    \nocite{AG1987}

\clearpage
\theendnotes

\clearpage
\defbibnote{BibVorwort}{Erläuterung zum Literaturverzeichnis.}
\defbibheading{TestBib}{%
    \chapter*{\scshape #1}\thispagestyle{empty}%
    \ifdefined\HCode\else\addcontentsline{toc}{chapter}{Literatur}\fi}
\printbibliography[title=Literatur,prenote=BibVorwort,heading=TestBib]

\end{document}

只有當我忽略以下錯誤訊息時,它才會在 epub 檔案中提供正確的輸出:

Package biblatex Warning: Patching footnotes failed.
(biblatex)                Footnote detection will not work.


! Package biblatex Error: Patching 'endnotes' package failed.

See the biblatex package documentation for explanation.
Type  H <return>  for immediate help.
...

l.41 \begin{document}

我想知道如何修復錯誤並獲得相同的正確輸出。有人知道該怎麼辦嗎?

更新1:

sample.tex文件看起來最小化如下:

\documentclass[11pt,a4paper]{report}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tex4ebook}
\ifdefined\HCode
\usepackage[hyperindex=true,
pdfauthor={Autor},
pdftitle={Titel},
pdfkeywords={Philosophy}]{hyperref}
\else\fi
\usepackage[sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{endnotes}
\let\footnote=\endnote

\begin{document}

    "`Ein zitierter Satz eines Autors."'\footcite{sigfridsson}

\clearpage
\theendnotes

\clearpage
\printbibliography

\end{document}

文件myconfig.cfg內容如下:

\Preamble{xhtml}
\begin{document}
\Configure{DocumentLanguage}{de}
\EndPreamble

結果仍然是上面的錯誤訊息,但是 epub 文件看起來是正確的,並且製作了超連結。

更新 2:這是 Testdocument.tex 的進一步減少的程式碼(對應於Testdocument.log上的文件gist.github.com,見下文)

\documentclass[11pt,a4paper]{report}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tex4ebook}
\usepackage[sortlocale=auto,bibstyle=authoryear,citestyle=authortitle-ticomp]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{endnotes}
\let\footnote=\endnote
\begin{document}

    "`Ein zitierter Satz eines Autors."'\footcite{sigfridsson}

\theendnotes

\printbibliography

\end{document}

答案1

評論裡隱藏著答案。簡而言之:

我等了幾天最新版本的 TeX Live 2023,安裝了它,然後再次嘗試。它解決了所解決的問題。

相關內容