bugtex4ht - Bugs: bug #214, tex4ht + hyperref + mwbk +...

 
 
Show feedback again

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

bug #214: tex4ht + hyperref + mwbk + secnumdepth issue

Submitted by:  Sylwester Arabas <slayoo>
Submitted on:  Wed Jun 18 07:23:32 2014  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri Jun 27 16:00:17 2014, comment #2:

Thanks to both of you. I installed the patch as given (worked for me) in tex4ht-4ht.tex and updated the tex4ht and tex live repositories.

Karl Berry <karl>
Project Administrator
Wed Jun 18 22:31:43 2014, comment #1:

hi sylwester - thanks for the report and patch. i'll take a look and most probably make your change as soon as i can. (next week, hopefully.)

Karl Berry <karl>
Project Administrator
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

Sylwester Arabas <slayoo>

 

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 karl (Posted a comment)
  • -unavailable- added by slayoo (Submitted the item)
  • -unavailable- added by slayoo
  •  

    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):

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jun 27 16:00:17 2014karlOpen/ClosedOpen=>Closed
    Wed Jun 18 07:23:32 2014slayooCarbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray