Michal, I've made progress, but have now hit several other problems in trying to get my document converted to an ebook. Some of them, I have "not very good workarounds" for, so I'm going to defer asking about them, but I'm blocked on one now. I've produced an MWE using the fixed example you sent me.
In that fixed example, there was a figure with an lstlisting in it, followed by references to the figure. In this new example, the references come first, then there is a footnote, and then a regular figure, followed by the figure-with-lstlisting. So there are two sorts of references: one to the regular figure, and two to the figure-with-listlisting. The latter references are properly resolved; the former is not. If I comment-out the footnote, they all get resolved. Looking at the generated HTML, it appears that the reference to the regular figure is a local reference, viz. <a href='#-mandelbrot-set'>1.1<!-- tex4ht:ref: fig:mandelbrot --></a> even though the figure is in a different HTML file. I would really appreciate your help. Thanks, --chet-- P.S. Separately, I'm finding other problems with math-mode and inline listings. Should I be sending all these issues to the mailing-list (and you) all at once, or do them one-at-a-time (in hope that as you and others help me figure this out, I will eventually get to where I can solve the rest of the problems)? On Thu, Feb 20, 2025 at 11:01 AM Michal Hoftich <michal....@gmail.com> wrote: > Hi Chet, > > I would try the config file with your current distribution first. It is > possible that the validation issue will be fixed just with these > definitions. Otherwise, it is best to use the TeX Live distribution from > https://www.tug.org/texlive/. But the new version will be released in few > weeks, so I don't think it is the best time to install it right now. You > can also try Docker, I think for example this should work: > https://github.com/islandoftex/texlive. > > But as I said, try the updated files first, maybe it isn't necessary to > install anything. > > Best regards, > Michal > > Michal, >> >> Thank you for your kind and rapid response! Um, do you have a >> recommendation for the right versions of tex4{ebook,ht}, and what other >> software I should be compiling from sources? Or if there's a Linux distro >> (let's say, Ubuntu or Debian's latest bleeding edge) I could get that >> working in Docker. >> >> I'd like to have the right software before proceeding. >> >
\documentclass[]{book} \usepackage[]{hyperref} \usepackage{listings} \newcounter{program} \renewcommand{\theprogram}{\arabic{program}} \newcommand\printprogram[1]{\theprogram\space #1\par} \newenvironment{program}[1]{\refstepcounter{program}\minipage{\textwidth}\printprogram{#1}}{\endminipage} \begin{document} Program~\ref{fig:label} (see page~\pageref{fig:label}) draws the Mandelbrot set (see figure~\ref{fig:mandelbrot}). C\footnote{text} \chapter{One}\label{chap:label} \begin{figure} foo \caption{Mandelbrot set.} \label{fig:mandelbrot} \end{figure} { \begin{figure}[tp] \begin{program}{Title} \label{fig:label} \lstinputlisting{/usr/share/texlive/README}% \end{program} \caption{Caption} %\label{fig:label} \end{figure} } \end{document} %%% Local Variables: %%% mode: latex %%% ispell-local-dictionary: "francais" %%% End:
config.cfg
Description: Binary data