bugtex4ht - Bugs: bug #608, Adding hyperref package makes...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #608: Adding hyperref package makes tex4ht change its split level order

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sun Sep 10 01:53:10 2023  
Category: NonePriority: 5 - Normal
Severity: 7 - ImportantStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Sep 11 08:59:20 2023, comment #1:

Thanks for the report. It seems to be caused by the Nameref package, which redefines the \@chapter command regardless of the fact if the document class provides it. We need to undefine it for the correct functioning of the page-splitting functionality.

Michal Hoftich <michal_h21>
Project Member
Sun Sep 10 01:53:10 2023, original submission:

Reference and screen shots at


I noticed big problem. When I was using split level on document, which should split it at section level because I used level 2, it did not.

It turned out when I remove the hyperref, then it does the right thing and split at section level.

See How to split an article at the subsubsection level using tex4ht? for splitting levels.

Here is a MWE


\section{section one}

\section{section two}

Compiled using

make4ht -ulm default -a debug foo.tex "mathjax,htm,2"

gives this HTML

enter image description here

You see, it did not split the page. Now by just removing the \usepackage{hyperref} and compiling again, it now gives this correct page, where it puts each section on its own page

enter image description here

I checked this in TL 2023 and also in TL 2022.

No wonder I always had hard time with split levels with tex4ht. It works different depending if \usepackage{hyperref} is used or not. To get it to split at section level when hyperref is loaded, level 3 should be used and not 2. But this is all wrong. Splitting level should not be affected by loading hyperref


Nasser M. Abbasi <nma123>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Sep 21 14:03:59 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup+gray