On 03/22/2010 11:59 AM, Jürgen Spitzmüller wrote:
Richard Heck wrote:
or whatever. So we could support that sort of thing directly in LyX. And
refstyle will do other things, too, like plurals and ranges, e.g.,
"sections 3 to 5".
Looks promising. I'm eager to see if this can handle different syntactic cases
as well (which is slightly more relevant in German than English -- "vgl. die
Abschnitte 3 bis 5" vs. "in den Abschnitten 3 bis 5" -- and even more relevant
in other languages)
I don't think it will do this. It's hard to see how any program could
handle this generally. It'd have to have a lot of information about
case. Maybe even more than we actually have these days.
But you can also do the sort of thing you do there. E.g., we can
redefine figure refs as follows:
\newref{fig}{%
name = \RSfigtxt,
names = \RSfigstxt,
Name = \RSFigtxt,
Names = \RSFigstxt,
rngtxt = \RSrngtxt,
lsttxt = \RSlsttxt,
refcmd = \ref{#1} \vpageref{#1}}
Other than refcmd, this is all just from refstyle.cfg. There isn't any
straightforward way just to redefine refcmd for figs.
I see. I guess this would do for my case. But anyway, this change will
probably affect many more documents.
Well, note that a large part of what you were doing, namely, all of this:
\newrefformat{cha}{Kapitel~\ref{#1}}
\newrefformat{sec}{Abschnitt~\ref{#1}}
\newrefformat{sub}{Abschnitt~\ref{#1}}
\newrefformat{anm}{Anm.~\ref{#1}}
\newrefformat{fn}{Anm.~\ref{#1}}
\newrefformat{app}{Anhang~\ref{#1}}
can simply be deleted, since refstyle has its own mechanism for i18n.
So, in so far as people were using this sort of thing for that purpose,
it's unnecessary, except in so far as refstyle could use more
translations. But we can encourage our own translators to send them in.
So if we come to decide that prettyref will be dropped, we will have to add a
big fat warning in the release notes.
Of course. We could even try translating the \newrefformat stuff in
lyx2lyx. It is possible, I think, though it'd probably be a bit dangerous.
rh