Michal,

The latest file doesn't change the outcome of the run.  At this point, we
have 4 files: build.lua, config.cfg, index.4ht, listings.4ht.  And then, to
keep track of the command, there's a Makefile, and the actual sample.tex.

Do you think it would be useful if I created a little Github repo, and sent
you pointers to branches in that repo, instead of sending attachments?

For now, I'll continue to send attachments.  This time, I'm attaching a
zipfile: hope that's OK.

When I run the commands to build and then check:

$ tex4ebook -c config.cfg -e build.lua sample.tex
$ java -jar ../jcf*/tools/epubcheck/epubcheck-5.2.1.jar sample.epub

I no longer get the "duplicate id" errors, but I still get the "fragment id
not defined" errors:
====
ERROR(RSC-012): sample.epub/OEBPS/sample.ncx(25,46): Fragment identifier is
not defined.
ERROR(RSC-012): sample.epub/OEBPS/sample.html(11,78): Fragment identifier
is not defined.
ERROR(RSC-012): sample.epub/OEBPS/sample.html(11,160): Fragment identifier
is not defined.
ERROR(RSC-012): sample.epub/OEBPS/sample.html(11,256): Fragment identifier
is not defined.
ERROR(RSC-012): sample.epub/OEBPS/samplech1.html(16,50): Fragment
identifier is not defined.
====

and looking at the unpacked EPUB, I can see that the fragment-id ("fn1x1"),
referenced in file samplech1.html, exists in file sample3.html.  So the
problem was that the reference was of the form <a href='#fn1x1' -- instead
of including the filename.

Your advice appreciated,
--chet--


On Thu, Feb 27, 2025 at 6:01 AM Michal Hoftich <[email protected]> wrote:

> Hi Chet,
>
> ad indexing:
>
> you need to require the build file using -e option, like
>
> $ tex4ebook -e build.lua filename.tex
>
> ad duplicated ids:
>
> this is  caused by destination links for list of listings. They reuse the
> same ID as the last command that updated labels, like sections etc. The
> attached listings.4ht file should fix that.
>
> Best regards,
> Michal
>
> On Tue, Feb 25, 2025 at 10:26 PM Chet Murthy <[email protected]>
> wrote:
>
>> I neglected to mention, but should have, that I removed all trace of
>> indexing from this sample, b/c it wasn't implicated in the most salient
>> "broken refs" errors that showed up.
>>
>> You wrote:
>>
>> > you need to use the  special make4ht commands for the index
>>
>> I was not sure what you meant by this.  Perhaps you meant that the
>> build.lua and index.4ht needed to be present when tex4ebook is invoked?  If
>> not, could you explain how I should be using make4ht ?
>>
>> Thanks,
>> --chet--
>>
>>

<<attachment: sample.zip>>

Reply via email to