Wed Jun 18 07:23:32 2014, original submission:
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:
\documentclass{mwbk}
\usepackage[tex4ht]{hyperref}
\setcounter{secnumdepth}{0}
\begin{document}
\section{bug}
\end{document}
HTH,
Sylwester
------
Sylwester,
I think it's a bug that should be fixed in mwbk.4ht.
(probably also reported as such at https://puszcza.gnu.org.ua/projects/tex4ht/)
Tracing down the error, I see that \mw@normalheading macro gives trouble.
\newcommand*\mw@normalheading{%
\if\mw@HeadingBreakBefore \hrule\@height\z@\nobreak
\else \addpenalty\@secpenalty \fi
\addvspace{\csname \mw@HeadingType @preskip\endcsname}%
................
The condition is TRUE if section is numbered, and FALSE if section is unnumbered.
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@normalheading\mw@normalheading
\pend:def\mw@normalheading{\def\mw@HeadingBreakBefore{00}}
This fix sets the if statement to be always TRUE.
Another possible fix would be redefine \mw@normalheading macro
dropping first two lines (I assume that these two lines are irrelevant to html output)
MWE for testing:
\documentclass{mwbk}
\usepackage{hyperref}
\begin{document}
\section*{bug}
\subsection*{foo}
\subsubsection*{bar}
\end{document}
Regards,
--
Deimantas
|