[tex4ht] [bug #214] tex4ht + hyperref + mwbk + secnumdepth issue
Sylwester Arabas
puszcza-hackers at gnu.org.ua
Wed Jun 18 09:23:32 CEST 2014
URL:
<http://puszcza.gnu.org.ua/bugs/?214>
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
_______________________________________________________
Details:
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 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
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 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
output)
MWE for testing:
\documentclass{mwbk}
\usepackage{hyperref}
\begin{document}
\section*{bug}
\subsection*{foo}
\subsubsection*{bar}
\end{document}
Regards,
--
Deimantas
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?214>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list