# tex4ebook with bibliography environ

I have tried to convert LaTeX to Epub with Tex4ebook and it's showing ERROR. But it's not showing any error when I have used PdfLaTeX.

My MWE IS:

\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}

• Where can we find the document class acm-book that your are using? It does not appear to be on CTAN and a Google search does not turn up anything that looks official. Jul 6, 2022 at 5:56
• @moewe: Please go to <books.acm.org/authors/author-instruction> and Files and Templates for Authors. Jul 6, 2022 at 6:14
• Thanks that lets me reproduce the error with tex4ebook and htlatex. These formats redefine a lot of internal commands in order to generate non-PDF/DVI output. Your code is most likely incompatible with one of those redefinitions. Unfortunately, I have no idea where to start looking, but (one of?) the maintainers of that software is fairly active here, maybe he sees your question and has an idea. Jul 6, 2022 at 6:38
• I will look at this. But, if your question is about bibliography, why do you include non-relevant equations and algorithms? And dozens of packages? MWE means minimal. All this stuff is unnecessary and only makes it harder to find a fix. Jul 6, 2022 at 11:06

The problem with bibliography was caused by the bookmark package. As its functionality isn't useful in the HTML mode, we can disable it. The other problem is with the MnSymbol package, which uses unsupported fonts.
\ifdefined\HCode\else