[tex4ht] question on split levels for tex4ht

Nasser M. Abbasi nma at 12000.org
Sun Oct 1 14:56:27 CEST 2023


On 10/1/2023 7:41 AM, Michal Hoftich wrote:

>> But with the new option, one do not have to worry changing the command
>> to get the numbers right, if they change from article to
>> book.
> 
> I am not sure about this. If you take a look at the html4.4ht file,
> you will find that the code for the numerical options is quite
> complex. For example, search for \:CheckOption{7} and then try to find
> \CheckOption{1}. It is quite a lot of code. And it is duplicated for
> every document class. It would be another several hundreds of
> kilobytes if we added that.
> 
> Best regards,
> Michal

Hello Michal;

I was thinking this will just be a very thin API, where
only make4ht will handle, and simply process this option
split_at and determines the split number needed and then pass it
to tex4ht as before.

i.e. no code changes needed at all internally for tex4ht.
I was thinking make4ht will do something like (translate to lua code)

     IF split_at="section" THEN
        IF article class THEN
           split =2
        ELIF book class THEN
           split = 3
        END IF
    ELIF split_at="subsection" THEN
       etc...
    END IF

And now make4ht will call tex4ht as before, nothing
changed. But using split number that was determined by the above code
so user does not have to figure it out.

I do not know how make4ht works, but I assume it takes all the
arguments passed from command line and passes these to
lower level calls to tex4ht? But maybe I was wrong about this.

Best
--Nasser





More information about the tex4ht mailing list.