That checkbox controls what package is used for formatted references, which are 
different a different type of cross reference. It has no effect on "<ref> on 
Page <page>" references, which always use varioref regardless. (I'm not sure 
why it doesn't, having never used varioref, but perhaps it already supports 
babel for translation which was the main reason for switching away from 
prettyref.)

As for why your workaround isn't working (if it isn't), I don't know. If no one 
else replies, you may have to ask on a more general LaTeX forum / list. 
http://tex.stackexchange.com/ usually gets very good answers.

Jim

-----Original Message-----
From: lyx-users@lists.lyx.org [mailto:lyx-users@lists.lyx.org] On Behalf Of 
Hugo Hinterberger
Sent: 25 September 2014 5:45 PM
To: lyx-users@lists.lyx.org
Subject: using refstyle for <Reference> on Page <Page> references

Hello,

I would like to use the "<Reference> on Page <Page>" cross-referencing format 
from refstyle in LyX.
I set the "Use refstyle (not prettyref) for cross-rferences" option in the 
Document settings, but LyX uses the \vref{LabelPrefix:Label} command for the 
references.

I tried to work around LyX with this:
\usepackage{xstring}
\renewcommand{\vref}[1]{\expandafter\csname\StrBefore{#1}{:}ref\endcsname[vref]{\StrBehind{#1}{:}}}

This should essentially replace the \vref{LabelPrefix:Label} command LyX 
inserts/outputs with \LabelPrefixref[vref]{Label} which would be the refstyle 
command to get the "<Reference> on Page <Page>" cross-referencing format.

Could someone who has more experience in TeX/LaTeX please point out what I did 
wrong.


Kind regards,
Hugo

Reply via email to