1

The following MWE shows the error with tex4ebook named in the question, when running epubcheck. It gives (in the MWE) 3 identical error messages:

\documentclass[a4paper]{report}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[rm,sc,small]{titlesec} 
\renewcommand{\thesection}{\arabic{section}}
\titleformat{\section}[display]% 
{}% 
{\Huge\centering\textbf{\thesection}}%
{0.2\textheight}{}%
[]

\begin{document}
    
\clearpage
\section{}
Some first little poem.
    
\clearpage
\section{}
Some second little poem.

\clearpage
\section{}
Some third little poem.
\end{document}

First I thought it has to do with the empty sectioning text, but that is not the problem. The error remains when giving a section-title.

1 Answer 1

0

This is caused by the sectionid filter from make4ht. It creates unique ID for each section based on it's name. When the section name is empty, it sets the empty ID for the first section, and then adds numerical suffixes, because it detects duplicate name (the empty name). epubcheck reports these epmty and numerical IDs as errors.

I've fixed this in the development version of make4ht, it now adds a _ prefix, so the ID should be valid. If you don't want to use the development version, you can disable make4ht filters using this command:

$ tex4ebook -f epub-common_domfilters  filename.tex

This should prevent creation of IDs for sections, but it can lead to other problems, depending on your document.

6
  • Thank you Michal. What is the "development version of make4ht" and how can I get and install it? - I will try this -f flag when running tex4ebook and report. Thank you.
    – Thomkrates
    Jul 6 at 20:32
  • @Thomkrates it is the version installed directly from Github, using make install - github.com/michal-h21/make4ht
    – michal.h21
    Jul 6 at 20:45
  • Ok. I tried it first with the -f flag and it came out as a valid epub. So all is great and good. I now do not see the need to make an new installation for make4ht. Thank you Michal. - By the way: Are you able to read german? You helped me recently in spring a lot with my first ebooks, so I would like to hand you the epub results over if your interest might be met. Just tell me, if you like.
    – Thomkrates
    Jul 6 at 21:18
  • @Thomkrates yes, if it works well without the post-processing, you don't need to install the development version. I don't read German unfortunately, but I would be interested anyway. It is always nice to see results from TeX4ebook in the wild :)
    – michal.h21
    Jul 6 at 21:26
  • Ok, fine. Is it possible to change in the backround and not publically E-Mail adresses? I would send you an invitation for my OneDrive for a special folder, that I would share with you, so I could send you for your own purpose for private use and viewing the epub results of last spring, that you could download from there.
    – Thomkrates
    Jul 7 at 22:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .