我使用了以下 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,安装了它,然后再次尝试。它解决了所提到的问题。