Michal Hoftich michal.h21 at gmail.com
Sun Nov 22 10:20:01 CET 2015

Hi Nasser,

>
> This MWE
>
> ---------------------------
> \documentclass[11pt]{article}%
> \usepackage[T1]{fontenc}
> \usepackage{hyperref}
> \usepackage[hyphenbreaks]{breakurl}
> \begin{document}
> \end{document}
> ------------------------
>
> Compiles with pdflatex and lualatex but gives syntax error with htlatex:

This package checks for PDF mode, which is why it works with pdflatex
and luatex. In dvi mode, it tries to insert some postscript specials,
and it does it before point where redefined hooks are inserted by
tex4ht. This means that we can't fix that with some .4ht file. Only
solutions is either to modify your preamble to not include the package
with tex4ht, or to contact the author and let him know about the issue.
The package is almost ten years old, so I am not sure whether the
contact mail still works though. I would propose a following fix, which
is based on a code used when the pdf mode is detected:

% Dummy package options
\DeclareOptionX{preserveurlmacro}{}
\DeclareOptionX{hyphenbreaks}{}
\DeclareOptionX{anythingbreaks}{}
\DeclareOptionX{vertfit}{}
\ProcessOptionsX\relax

\PackageWarning{breakurl}{%
You are using breakurl while processing via tex4ht.\MessageBreak
\string\burl\space will be just a synonym of \string\url.\MessageBreak}
\DeclareRobustCommand{\burl}{\url}
\DeclareRobustCommand*{\burlalt}{\hyper at normalise\burl at alt}