1

I found that the order of reference and appendices is compiled incorrectly by tex4ebook. Sample code:

\documentclass{amsbook}
\usepackage{bookmark}

\begin{document}
\tableofcontents

\chapter{Hello}
Hello

\chapter{Hi}
Hi

\appendix
\chapter{One}

One

\chapter{Two}
Two

\bibliographystyle{amsalphaabrvd}
\bibliography{test}

\end{document}

with test.bbl:

\begin{thebibliography}{DT}

\bibitem[DT]{test}
  D.~Trump, \emph{Make America Great Again}, slogan.
\end{thebibliography}

compiled with test.mk4:

if mode == "draft" then
  Make:htlatex {}
else
  -- Make:add("biber","biber ${input}")
  Make:htlatex {}
  -- Make:biber {}
  Make:htlatex {}
  Make:htlatex {}
end

Make:tex4ht{}
Make:t4ht{}

and the configure file:

\Preamble{xhtml,pic-align,new-accents,accent-}
\RequirePackage[T1]{fontenc}
\Configure{Picture}{.svg}  
\makeatletter
\makeatother
\DeclareRobustCommand{\[}{\begin{equation*}}
\DeclareRobustCommand{\]}{\end{equation*}}
\begin{document}
\EndPreamble

There are two issues: firstly, reference page is placed before all appendices, and secondly, in the bookmark, the reference is placed as a subsection of the last appendix. I wonder a workaround to fix these.

1

The handling of appendices was broken in tex4ebook. There are two separate problems. The bibliography comes before appendices because every chapter is put in a separate file, which needs to be registered to the file sequence list. If they are not registered, they are added at the end of file, as it happened with appendices. The second issue is the position of bibliography in the bookmark list. The issue was that the \appendix command was defined as superior to \chapter in the bookmark generator code.

Both of these issues had been fixed in the tex4ebook sources. The fix is too large to be posted here, so you need to update it manually for this moment.

This is the result viewed in Calibre:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.
https://tex.stackexchange.com/questions/482950/tex4ebook-the-incorrect-order-of-reference-and-appendices
tex.stackexchange.com
crawl=CC-MAIN-2019-47
130976
application/http; msgtype=response
sha1:FG2BZJ7S7AA5KCWZNHBVJ6GGGQK2CCQM
<urn:uuid:296af331-865d-4cab-8d1e-6e7750e2f1c9>
2019-11-13T15:36:42Z
151.101.65.69
text/html
sha1:4UYN3B4FBX6X3OSKVU4FD64FGZUJLZST
<urn:uuid:2099e509-ab10-48a9-bde3-ca7905a2a4cd>
https://tex.stackexchange.com/questions/482950/tex4ebook-the-incorrect-order-of-reference-and-appendices
response
<urn:uuid:d925ed3f-4c09-411f-89c5-2e6417ee7b8f>
isPartOf: CC-MAIN-2019-47
publisher: Common Crawl
description: Wide crawl of the web for November 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-222.ec2.internal
software: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/