It seems I've encountered a problem using tex4ebook with the latest version
of Texlive. I installed it this AM, and here is the version
information (Googling turned this up, but if this isn't the right
version info, please let me know and I'll send better info (and make a note
of it)).

The first file (mwe.tex) produces a "TeX capacity exceeded, sorry [input
stack size=10000]." error.

If I remove a single line (to yield mwe2.tex), I get lots of syntax errors,
none of which are produced by lualatex.

====
Files attached:

config.cfg: tex4ebook config, obtained from Michal
mwe.tex: MWE for the problem
mwe2.tex: MWE for the second problem
====
Version info:

$ htlatex --version
This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025) (preloaded
format=latex)

 tex --version
TeX 3.141592653 (TeX Live 2025)
====
Synopsis: It looks like a bad interaction between htlatex, urls, and
indexes.  I'm sorry I was unable to get this MWE any smaller, but literally
removing any element that was left made it go thru OK.  Also, the main
error happened regardless of whether I ran:

$ tex4ebook -c config.cfg working.tex

or

$ tex4ebook working.tex

But I got errors from config.cfg (also attached) with the first command.

====
Error output:

tex4ebook -c config.cfg working.tex
[STATUS]  tex4ebook: Conversion started
[STATUS]  tex4ebook: Input file: working.tex
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ./config.cfg         ?        LaTeX Error: Command
\printprogram undefined in `config.cfg'.
[STATUS]  htlatex:  <- Type  H <return>  for immediate help. ...

[ERROR]   htlatex: ./config.cfg         ?        LaTeX Error: Missing
\begin{document} in `config.cfg'.
[STATUS]  htlatex:  <- Type  H <return>  for immediate help. ...

[ERROR]   htlatex: ./config.cfg         ?        Undefined control sequence.
[STATUS]  htlatex:  <- "> l.17          {\start:LstLn \HCode{<span
class="label">}}% The control sequence at the end of the top line
[ERROR]   htlatex: ?    ?        Argument of \idx:extI has an extra }.
[STATUS]  htlatex:  <- \par l.16 ...package manager,
\texttt{opam}\index{opam} . I've run across a `}' that doesn't seem to
match anything.
[ERROR]   htlatex: ?    ?        Paragraph ended before \idx:extI was
complete.
[STATUS]  htlatex:  <- \par l.16 ...package manager,
\texttt{opam}\index{opam} . I suspect you've forgotten a `}', causing me to
apply this
[ERROR]   htlatex: ?    ?        TeX capacity exceeded, sorry [input stack
size=10000].
[STATUS]  htlatex:  <- {\@par } l.16 ...package manager,
\texttt{opam}\index{opam} . If you really absolutely need more capacity,
[FATAL]   make4ht-lib: Fatal error. Command htlatex returned exit code 1
\documentclass[]{book}

\usepackage{url}
\usepackage{makeidx,index}
\makeindex

\begin{document}

\begin{center}
  \url{https://ocaml.org/}
\end{center}
The site contains installation instructions for these systems.
%
Once you have installed OCaml, you will have access to the following tools:
an interpreter, \texttt{ocaml}; two compilers, \texttt{ocamlc} and
\texttt{ocamlopt}; and a package manager, \texttt{opam}\index{opam}.

\end{document}

%%% Local Variables:
%%% mode: latex
%%% ispell-local-dictionary: "francais"
%%% End:

Attachment: config.cfg
Description: Binary data

\documentclass[]{book}

\usepackage{url}
\usepackage{makeidx,index}
\makeindex

\begin{document}

\begin{center}
  \url{https://ocaml.org/}
\end{center}

%
Once you have installed OCaml, you will have access to the following tools:
an interpreter, \texttt{ocaml}; two compilers, \texttt{ocamlc} and
\texttt{ocamlopt}; and a package manager, \texttt{opam}\index{opam}.

\end{document}

%%% Local Variables:
%%% mode: latex
%%% ispell-local-dictionary: "francais"
%%% End:

Reply via email to