I am trying to use both the hyperref
and tex4ht
packages to format a textbook into a web textbook. Everything works except if I comment out chapter one, but if I include chapter one in the document, I get:
/usr/local/texlive/2011/texmf-dist/tex/generic/tex4ht/hyperref.4ht:314: LaTeX Error: Command \Hy@SectionHShift already defined.
Or name \end... illegal, see p.192 of the manual in `'.
I tried using savesym
to resolve the conflict but it didn't seem to work. Any ideas? I have no idea why only chapter one of the document doesn't work... there is no difference between it and any of the other chapters.
Also, I created this very simple document to see if I could use hyperref
and tex4ht
there, but it comes up with the exact same error that I pasted above:
\documentclass{article}
\usepackage[html]{tex4ht}
\usepackage{hyperref}
\title{hello}
\author{Me}
\begin{document}
\maketitle
\section{The first}
A link:
\url{www.google.com}
\section{The second}
Another link:
\href{www.amazon.com}{amazon}
\end{document}
If anyone has any ideas, I would be much obliged.
pdflatex
. Your example works if I uselatex
orhtlatex
. – Ian Thompson Jun 20 '12 at 21:01\usepackage{tex4ht}
which is loaded automatically whenhtlatex
is called. – egreg Jun 20 '12 at 22:21