Jean-Pierre Chrétien wrote:
> Jürgen Spitzmüller a écrit :
> > Jean-Pierre Chrétien wrote:
> >> What about bug #6608 ? Could the patch I suggested be applied ?
> > 
> > trac is down, but if I remember correctly, this was the French/prettyref
> > issue, right? I think this is too late for 1.6.6, we have to look into
> > that more deeply first.
> 
> No, this one is about the varioref problem (prettyref and varioref
> issues are different, so I split up bug #6420 in bugs #6608 and #6609).

I see.

> > IIRC you propose to load an extra package. I'm not sure about that. For
> > me, the following preamble code fixes the problem as well:
> > 
> > \let\oldlabel\label
> > \renewcommand*{\label}{\catcode`\:=12 \oldlabel}
> > \let\oldpref\prettyref
> > \renewcommand*{\prettyref}{\catcode`\:=12 \oldpref}
> > 
> > But it's tedious to change catcodes like that. OTOH I don't know what the
> > package you propose does.
> 
> Just loading nameref (a companion package of hyperref) before varioref,
> which can only be done by changing the lyX source in
> ./src/LaTeXFeatures.cpp
> ./src/insets/InsetRef.cpp
> ./src/mathed/InsetMathRef.cpp
> 
> This bug is discussed in
> http://www.tug.org/pipermail/texhax/2005-September/004707.html
> and in the README file of hyperref (section about varioref):
> http://tug.ctan.org/tex-archive/macros/latex/contrib/hyperref/
>
> The point here is that nameref can be loaded without hyperref,
> I've added the patch to bug #6608 (patch against the current branch).

But the README text is not very encouraging:

        There are too many problems with varioref. Nobody has time to
        sort them out. Therefore this package is now unsupported.

        Perhaps you are lucky and some of the features of varioref works
        with the following loading order:
        \usepackage{nameref}
        \usepackage{varioref}
        \usepackage{hyperref}

In any case, I'm reluctant to load such a complex package just because it 
fixes varioref/French ("if we are lucky"). That is to say: I'm fine to use the 
above order if hyperref is used, but without hyperref, I would rather welcome 
a simpler, standalone solution.

Also, the problem is supposed to be fixed within babel itself (see the babel 
docs, sec. 12.18.2). Babel does the same trick than nameref here (deactivating 
actice chars within \vref and \vpageref). The strange thing is: if I export 
your test file and compile it manually with pdflatex, no error occurs. The 
error only shows up when compiling with LyX. I'd like to know why the babel 
fix does not trigger when compiling with LyX.

> As far as prettyref is concerned (bug #6609), the best would be to
> remove this package, as it was already proposed in bug #2295 because of
> the lack of internationalization.

This is no option for branch. We cannot drop prettyref in branch, this is a 
file format change. For the same reason, we cannot add support for refstyle.

> >> I the same line, I submitted an example file for crossrefs
> >> http://article.gmane.org/gmane.editors.lyx.devel/126589
> >> and I got no comments about it. Should it have been posted to lyx-docs ?
> > 
> > This is for trunk only. I guess Richard has an eye on it.
> 
> No, this one is for branch, the idea was to have one file for branch, to
> check lyx2lyx translation to lyx-2.0 format.
> I made it as exhaustive as possible to discuss possible improvements of
> the lyx implementation of varioref/refstyle (ranges, lists,
> capitalization, plurals, etc.)
> As Richard's patch for refstyle needs some tuning, I did not turn it in
> a file for lyx-2.0 yet.
> 
> Maybe some of your prettyref constructs for German language should be
> added to file examples_crossrefs_lyx16.lyx,
> to check conservativeness of the refstyle implementation.

But still, this case concerns trunk, not branch. In branch, we cannot do 
anything wih refstyle.

Jürgen

Reply via email to