tex4ebook 与参考书目环境

tex4ebook 与参考书目环境

我尝试使用 进行转换LaTeX to EpubTex4ebook结果显示错误。但是当我使用 时,没有显示任何错误PdfLaTeX

我的 MWE 是:

\providecommand\Author[1]{#1\def\Author{#1}}
\documentclass{acm-book}
\usepackage{balance,amsmath,amsfonts,hyperref}

\begin{document}

\chapter{Single Source Path Algorithm}

For every node $v\in V,$ Dijkstra's algorithm operates on a distance estimate $v.d\ge \delta (v).$ We will always have $s.d=\delta (s)=0.$ For all other nodes $v\neq s,$ we start with $v.d=\infty$. If we later find a better distance $v.d<\infty$, then we have predecessor $v.\pi $ of \textit{v} on a path from \textit{s} to \textit{v} of length $v.d.$.

If we just use Williams' classic heap [\citealt{chap:2:Williams:1964}], we support both extract-min and decrease-key operations in \textit{O}(log \textit{n}) time, thus ending with a total running time of $O((n+m)\log n)=O(m\log n).$.

\section{Integer Weights}

Assume now that the weights are integer and that we can use these integers to index arrays. Then we no longer have an $\Omega (n\log n)$ lower bound.

\textit{Dial's algorithm}. \citeauthor{chap:2:Dial:1969} [\citeyear{chap:2:Dial:1969}] used\index{Dial's algorithm} a very different approach applicable if we somehow know that the maximal finite distance from \textit{s} is $\Delta $. Possible distance stores a doubly linked list of the nodes having that estimated distance. We can then for increasing distances $x=0,\ldots ,\Delta $.

\textit{Fibonacci Heaps}. Speeding\index{Fibonacci heaps} up Dijkstra's algorithm for denser graphs was the main motivation for \citeauthor{chap:2:FredmanandTarjan:1987} [\citeyear{chap:2:FredmanandTarjan:1987}].

\textit{Comparison-based sorting lower bound}. The\index{Comparison-based sorting lower bound} $O(n\log n+m)$ bound is optimal using any comparison-based priority queue because Dijkstra's algorithm visits nodes in order of nondecreasing distances. This means that it can be used to sort \textit{n} keys.   

\begin{thebibliography}{00}\pdfbookmark[1]{References}{chap:02:References}

\bibitem[Chan(2012)]{chap:2:Chan:2012}{T. M. Chan. 2012. All-pairs shortest paths for unweighted undirected graphs in \textit{O}(\textit{mn}) time. \textit{ACM Trans. Algorithms} 8, 4, 34:1--34:17. DOI: \href{https://doi.org/10.1145/2344422.2344424}{https://{\allowbreak}doi.{\allowbreak}org/{\allowbreak}10.{\allowbreak}1145/{\allowbreak}2344422.{\allowbreak}2344424}.}

\bibitem[Fredman and Tarjan's(1987)]{chap:2:FredmanandTarjan:1987}{M. L. Fredman and R. E. Tarjan. 1987. Fibonacci heaps and their uses in improved network \hbox{optimization} algorithms. \textit{J. ACM} 34, 3, 596--615. Announced at FOCS'84. DOI: \href{https://doi.org/10.1145/28869.28874}{https://{\allowbreak}doi.{\allowbreak}org/{\allowbreak}10.{\allowbreak}1145/{\allowbreak}28869.28874}.}

\bibitem[Dial(1969)]{chap:2:Dial:1969}{R. B. Dial. 1969. Algorithm 360: Shortest path forest with topological ordering. \textit{Comm. ACM} 12, 11, 632--633. DOI: \href{https://doi.org/10.1145/363269.363610}{https://doi.{\allowbreak}org/{\allowbreak}10.{\allowbreak}1145/{\allowbreak}363269.{\allowbreak}363610}.}

\bibitem[Williams(1964)]{chap:2:Williams:1964}{J. W. J. Williams. 1964. Heapsort. \textit{Comm. ACM} 7, 6, 347--348.}

\end{thebibliography}
\end{document}

答案1

书目问题是由该bookmark包引起的。由于其功能在 HTML 模式下无用,我们可以禁用它。另一个问题是 MnSymbol 包,它使用了不受支持的字体。

我将在 TeX4ht 源代码中修复这些问题,但与此同时,您可以在使用 TeX4ebook 编译文档时禁用这些软件包。在序言中使用此条件:

\ifdefined\HCode\else                                                                                                                                                                     
\usepackage{bookmark}                                                                                                                                                                   
\usepackage{MnSymbol}                                                                                                                                                                     
\fi 

经过此更改,你的文档应该可以顺利编译:

在此处输入图片描述

相关内容