On Tue, May 10, 2011 at 12:43 AM, Martin Heller <[email protected]> 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

1 One

This is a test section.



Figure 1: My figure.



Table 1: My table.

Theorem 1 (Optional Theorem Heading) This is a theorem.

See NormalRef: 1. See AutoRef: Figure 1. NameRef: My figure..

See NormalRef: 1. See AutoRef: Table 1. NameRef: My table..

See NormalRef: 1. See AutoRef: section 1. NameRef: One.

See NormalRef: 1. See AutoRef: Theorem 1. NameRef: Optional Theorem Heading.

Attachment: martin.aux
Description: Binary data

Attachment: martin.pdf
Description: Adobe PDF document

Attachment: martin.tex
Description: TeX document

Attachment: nameref.4ht
Description: Binary data

Reply via email to