[tex4ht] \autoref from hyperref with tex4ht

Radhakrishnan CV cvr at river-valley.org
Wed May 11 08:16:37 CEST 2011


On Tue, May 10, 2011 at 12:43 AM, Martin Heller <mr_heller at yahoo.dk> wrote:
> I've posted this on comp.text.tex too, but as tex4ht comes up rarely in that
> newsgroup I thought I might have better chances of a reply here.
>
> Is it possible to get the same output from \autoref using htlatex as when
> using pdflatex?
>
> Minimal example demonstrating the difference:
>
> \documentclass{article}
> \usepackage{hyperref}
>
> \begin{document}
>
> \begin{figure}
>  \caption{My figure.}
>  \label{fig}
> \end{figure}
>
> See~\autoref{fig}.
>
> \end{document}
>
> When compiled with pdflatex I get "See Figure 1".
>
> When compiled with htlatex I get "See 1".
>
> Can \autoref be configured to give "See Figure 1" in both cases? I tried
> \providecommand\figureautorefname{Figure} but it doesn't do the trick.
>

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.

Best regards
-- 
Radhakrishnan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20110511/04d3039b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin.aux
Type: application/octet-stream
Size: 1199 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20110511/04d3039b/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin.pdf
Type: application/pdf
Size: 22500 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20110511/04d3039b/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin.tex
Type: application/x-tex
Size: 719 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20110511/04d3039b/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nameref.4ht
Type: application/octet-stream
Size: 5616 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20110511/04d3039b/attachment-0003.obj>


More information about the tex4ht mailing list