Tex4ebook is producing strange page numbers in the toc on a kindle.
MWE:
\documentclass[ebook,12pt,oneside,openany]{memoir}
\begin{filecontents}{\jobname.bib}
@book{Hiemenz,
author={Hiemenz},
title={Polymer Chemistry}
}
\end{filecontents}
\usepackage{pgffor}
\usepackage{lipsum}
\usepackage[backend=biber,hyperref=auto,backref=true]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{imakeidx}
\makeindex[intoc=true,columns=1,noautomatic]
\usepackage[hyperindex=true]{hyperref}
\title{Book}
\author{Author}
\date{}
\begin{document}
\maketitle
\frontmatter
\tableofcontents
\mainmatter
\foreach \n in {1,...,100}{%
\chapter{Chapter}
Here comes a quotation \cite{Hiemenz}.
aword\index{aword}
\lipsum
}
\printbibliography
\printindex
\end{document}
Running tex4ebook and producing a mobi version gives a toc without page numbers when viewed in Calibre:
If I transfer the mobi to a Kindle reader, I get strange page numbers:
The numbers increase but then stop at 224 for the rest of the book.
Where are these numbers coming from and why are they wrong? Is it possible to delete them or stop Tex4ebook from producing them?
Thank you.
Update for Michal.h21:
Thanks for your additional comments on page numbers with tex4ebook. It gave me a clue to look at the conversion of the epub to mobi.
I originally used the kindlegen program to convert the epub to mobi. Using the Calibre conversion program doesn't give the page number problem so it looks like a bug in kindlegen.
However the Calibre conversion doesn't handle the bibliography properly and there is an incorrect line break after the reference number:
Is there any way to change the way the bibliography items are coded in html using css commands to avoid this? If not I will resort to manually trying to typeset the bibliography items.
If tex4ebook doesn't produce page numbers, what do the numbers from biblatex/backref shown in the picture mean and how are they produced?
As always thanks for all your help and patience with my questions.
Update 2:
Thanks for the extra explanations and suggestions. I tried your css suggestions. The result for the epub is:
The mobi conversion with kindlegen and Calibre now produce the same result as the epub look. There is the large gap after the reference number and no hanging indent but otherwise it's ok. I presume from your comments that it's not possible to get the normal style for the reference that is produced with pdf output.
Update 3:
What I wrote about the reference layout is wrong for multiple references. The epub output with the new css is:
The two references are overlapping.
Thanks again for all your help.
Another update for Michal.h21:
I have looked at this page issue again. When I check the epub with epubcheck, it gives a lot of errrors, such as
ERROR(RSC-005): sample.epub/OEBPS/samplech90.html(-1,-1): Error while parsing file 'Attribute name "X0-Hiemenz" associated with an element type "a" must be followed by the ' = ' character.'.
FATAL(RSC-016): sample.epub/OEBPS/samplech91.html(17,11): Fatal Error while parsing file 'Attribute name "X0-Hiemenz" associated with an element type "a" must be followed by the ' = ' character.'.
and
ERROR(RSC-012): sample.epub/OEBPS/sampleli3.html(24,33): Fragment identifier is not defined.
ERROR(RSC-012): sample.epub/OEBPS/sampleli3.html(26,33): Fragment identifier is not defined.
Could this be the reason why kindlegen gives bad page numbers?
Thanks again.