On Thu, 25 Sep 2014 18:44:46 +0200, Hugo Hinterberger
<hugo.hinterber...@gmx.net> wrote:
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
As I noticed before the actual format I want is "Formatted Reference on
Page <Page>".
I now have a solution that works on the mwe:
\def\formatreftext#1:#2 {\csname#1ref\endcsname[vref]{#2}}
\def\vref#1{\formatreftext #1 }
Hugo