[tex4ht] [bug #214] tex4ht + hyperref + mwbk + secnumdepth issue

Sylwester Arabas puszcza-hackers at gnu.org.ua
Wed Jun 18 09:23:32 CEST 2014


                 Summary: tex4ht + hyperref + mwbk + secnumdepth issue
                 Project: tex4ht
            Submitted by: slayoo
            Submitted on: Wed 18 Jun 2014 10:23:32 AM EEST
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



As suggested by Deimantas Galcius on tex4ht mailing list, I'm submitting below
an issue related with the mwbk document class. The failing code is:




I think it's a bug  that should be fixed in mwbk.4ht.
(probably also reported as such at

Tracing down the error, I see that \mw at normalheading macro gives  trouble.

\newcommand*\mw at normalheading{%
  \if\mw at HeadingBreakBefore \hrule\@height\z@\nobreak
     \else \addpenalty\@secpenalty \fi
  \addvspace{\csname \mw at HeadingType @preskip\endcsname}%

The condition is TRUE if section is numbered, and FALSE if section is
In latter case \addpenalty is excuted and gives error if section is not in
vertical mode.
(and most probably hyperref's hooks introduce code that puts section in
horizontal mode).

possible fix in mwbk.4ht:
\let\:o:mw at normalheading\mw at normalheading
\pend:def\mw at normalheading{\def\mw at HeadingBreakBefore{00}}

This fix  sets  the if statement to be always TRUE.
Another possible fix would be redefine \mw at normalheading macro
dropping first two lines (I assume that these two lines are irrelevant to html

MWE for testing:




Reply to this item at:


  Message sent via/by Puszcza

More information about the tex4ht mailing list