On 11/11/2010 03:35 AM, Jean-Pierre Chrétien wrote:
Richard Heck a écrit :

I thought about something like this:
    RefCommand prop
RefStyle \def...@proptxt{proposition}\newref{prop}{refcmd={\rs@proptxt \ref{#1}}

Rather
\RSaddto{\RSenglish}{%
\def...@proptxt{proposition}%
}%
\newref{prop}{refcmd={...@proptxt \ref{#1}}

or you kill the multilingual stuff here.

Right, thanks. And of course we can add translations, too, though I'm not sure if we can do it via the usual mechanism.

But if refstyle later provides a prop reference, then we over-write it.

Depends how you see the enhancements in refstyle in the future.
If we should hand over LyX developement contributions to the package maintainer, it would be better to edit and maintain directly a cfg-alike file.

This would be the best solution in many ways, but I'm not sure what we do with the cfg file once we have it. Installing it ourselves to some location that LaTeX will find it does not look good to me. The big issue is what happens at export to LaTeX, e.g., so the user can send the file to a journal. We can't expect people to bundle our cfg file with the .tex file. So everything needs to go into the .tex file, or so it looks to me.

I guess it gets less messy if you do something like this globally:
\newcommand\newrefmaybe[2]{...@undefined{\csname #1ref\endcsname}}{\newref{#1}{#2}}{} and then use \newrefmaybe in the configuration file. But then maybe we have problems like we had with \lyxref?

Plus we'd still need the fallback in other cases.

Why create a fallback when we know that we provide a command ?

We wouldn't need it for prop, if we did the above, but we would need it if the user decides to label something with a prefix we don't know. That's all I meant.

rh

Reply via email to