5

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 provided by Radhakrishnan CV on the tex4ht mailing list. 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.

Can anyone see what the problem is and provide a solution?

% 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}
3

This has been fixed now. Please grab the nameref.4ht from here. This will soon migrate to TeXLive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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