[texhax] babel, varioref and hyperref with french option problem

Uwe Lück uwe.lueck at web.de
Tue Sep 27 14:06:37 CEST 2005


At 18:18 26.09.05, Ignacy Gawedzki wrote:
>On Fri, Sep 23, 2005 at 08:17:12PM +0200, thus spake Ignacy Gawedzki:
> >
> > I get a nasty error when I try to compile the following lines:
> >
> >   \documentclass[french]{article}
> >   \usepackage{babel}
> >   \usepackage{varioref}
> >   \usepackage{hyperref}
> >   \begin{document}
> >   \vref{fig:tag}
> >   \end{document}
>
>For those interested, I eventually found the solution.
>
>There are some clashes between varioref and hyperref that can be resolved by
>"splitting" the hyperref inclusion.
>
>   \documentclass[french]{article}
>   \usepackage{nameref}
>   \usepackage{varioref}
>   \usepackage{hyperref}
>   \usepackage{babel}
>
>... as explained in the Hyperref README file. =)

At this point, I might at last contribute the following guessings:

Sorry that I don't study this matter exactly, but I know from
own experience and some other bug report that hyperref
causes troubles. It needs a change of the former LaTeX
\label . Some packages try to take this into account by
testing \AtBeginDocument whether nameref.sty has been
loaded, but hyperref is nasty enough to postpone loading
nameref.sty to \AtBeginDocument as well, and this happens
_after_ the other package's test when hyperref is loaded
after the other package. So in your case I guess that
the problem has to do with varioref. I recommend loading
hyperref as early as possible so other packages can
detect it. (If my guess is wrong, I think that this
recommendation is useful anyway.)

And if the reason really is that `:' is made \active, why
couldn't \vref{fig:tag} just be replaced by \vref{fig.tag} or so?

Best, Uwe.



More information about the texhax mailing list