Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

in TL 2013, new installation. When adding \label below causes an error in htlatex

\documentclass[12pt]{article}%
\usepackage{hyperref}
\begin{document}
\begin{equation}  \label{eq1}
   x=y
\end{equation}
\end{document}

compiling

htlatex note_on_lecture_2_21_2013.tex

(./note_on_lecture_2_21_2013.aux)
! Undefined control sequence.
\a:newlabel ...utoref\string \endcsname {\NR:Type 
                                                  }#1}
l.4 \begin{equation}  \label{eq1}

? 

Removing hyperref causes the error to go away. Also keeping hyperref but removing \label the error goes away.

Adding the patch posted here does not help:

\documentclass[12pt]{article}%
\usepackage{hyperref}

\makeatletter
\catcode`\:=11 %
\AtBeginDocument{%
  \@ifpackageloaded{tex4ht}{%
    \def\no@sect#1#2#3#4#5#6[#7]#8{\gdef\NR:Title{\a:newlabel{#7}}%
        \gdef\NR:Type{#1}%
        \NR:no@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}%
    }
    \def\:tempc#1#2#3#4#5#6[#7]#8{%
       \gdef\NR:Title{\a:newlabel{#7}}%
       \gdef\NR:Type{#1}%
       \o:NR@sect:{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]{#8}}
    \HLet\NR@sect\:tempc
  }{}%
}%
\@makeother\:
\makeatother

\begin{document}
\begin{equation}  \label{eq1}
x=y
\end{equation}
\end{document}

Compiling the same way, gives the same error.

(/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./note_on_lecture_2_21_2013.aux)
! Undefined control sequence.
\a:newlabel ...utoref\string \endcsname {\NR:Type 
                                                  }#1}
l.23 \begin{equation}  \label{eq1}

?  

Using

>latex -v
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
kpathsea version 6.1.1

On Linux mint 15.

share|improve this question
2  
If I add \section*{} before the equation, no error appears. By the way, the same happens with TL 2012. –  egreg Jun 24 '13 at 10:25

1 Answer 1

up vote 5 down vote accepted

It looks like a bug that should be reported to the tex4ht list but this works around this case:

\documentclass[12pt]{article}%
\usepackage{hyperref}
\expandafter\let\csname NR:Type\endcsname\relax
\begin{document}
\begin{equation}  \label{eq1}
   x=y
\end{equation}
\end{document}
share|improve this answer
2  
I posted a bug report - puszcza.gnu.org.ua/bugs/index.php?186 –  michal.h21 Jun 24 '13 at 12:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.