[tex4ht] \autoref from hyperref with tex4ht
Martin Heller
mr_heller at yahoo.dk
Fri Jan 6 09:29:24 CET 2012
Radhakrishnan CV wrote, on 11-05-2011 08:16:
> Attached is a newer version of nameref.4ht. In my tests, this version
> seems to fix the problem of not only \autoref, but also \nameref which
> was also broken. If this version passes your tests, I shall update the
> literate sources and nameref.4ht in the SVN.
>
> Look forward to hearing from you.
The following document when compiled with
htlatex test-nameref.tex "html,4"
generates wrong targets (but correct displayed text) for the subsection
and subsubsection references with the updated nameref.4ht. The targets
for the links are correct with
% nameref.4ht 2010-09-04-21:02 %
% Copyright (C) 2005--2010 Eitan M. Gurari %
distributed with MikTeX (but the displayed text is wrong).
% test-nameref.tex
\documentclass{book}
\usepackage{hyperref}
\setcounter{secnumdepth}{4}
\begin{document}
\chapter{Chapter}
\label{chap:chapter}
\section{Section}
\label{sec:section}
\subsection{Subsection}
\label{subsec:section}
\subsubsection{Subsubsection}
\label{subsubsec:section}
\begin{equation}
a\label{eq:a}
\end{equation}
\begin{figure}
\caption{Figure.}
\label{fig:test}
\end{figure}
\chapter{Second Chapter}
\autoref{eq:a}\\
\autoref{fig:test}\\
\autoref{chap:chapter}\\
\autoref{sec:section}\\
\autoref{subsec:section}\\
\autoref{subsubsec:section}\\
Equation~(\ref{eq:a})\\
Figure~\ref{fig:test}\\
Chapter~\ref{chap:chapter}\\
Section~\ref{sec:section}\\
Subsection~\ref{subsec:section}\\
Subsubsection~\ref{subsubsec:section}
\end{document}
I don't know if the fix is easy to make. I have tried to look in the
source files, but sadly, I have a hard time following what is going on.
Best regards,
Martin Heller
P.S.: I've sent this message to the tex4ht mailing list too (through the
gmane nntp interface). I don't know if this e-mail address redirects to
the mailing list too. If so, I apologize for the double posting.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nameref.4ht
URL: <http://tug.org/pipermail/tex4ht/attachments/20120106/bc31aba1/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-nameref.tex
URL: <http://tug.org/pipermail/tex4ht/attachments/20120106/bc31aba1/attachment-0001.ksh>
More information about the tex4ht
mailing list