[tex4ht] question on split levels for tex4ht
Michal Hoftich
michal.h21 at gmail.com
Sun Oct 1 14:41:08 CEST 2023
Hi Nasser,
> 1 - split at \part
> 2 - split at \chapter
> 3 - split at \section
> 4 - split at \subsection
> 5 - split at \subsubsection
> 6 - split at \paragraph
> For document classes without \chapter (like article):
>
> 1 - split at \part
> 2 - split at \section
> 3 - split at \subsection
> 5 - split at \subsubsection
> 6 - split at \paragraph
> -----------------------------------------
>
> My question is: Why does in article, it skips split level 4, and
> goes from 3 to 5? I find this confusing. May be there is reason
> internally when tex4ht does this?
>
I am not sure why this works in this way, I guess it would be more
logical for classes without \chapter to skipt the option "2". But I am
not sure about changing this, as it would be a quite a big breaking
change. I didn't notice this because if I break pages at all, then I
usually break pages only at the top level, so either at \section or
\chapter.
> I'd like to suggest for some future version that this
> option should be redone. May be add new option calling it
> "split_at" so current method stays backward compatible.
>
> The new option will have the form
>
> split_at="name"
>
> where name can be "part" or "chapter" or "section" or "subsection"
> and so on.
>
> So one can now do
>
> make4ht foo.tex 'html,mathjax,split_at="section"'
>
> If string does not work for value, it can just name, as in
>
> make4ht foo.tex 'html,mathjax,split_at=section'
>
> Not only is this much more clear than
>
> make4ht foo.tex 'html,mathjax,3'
>
> 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
More information about the tex4ht
mailing list.