Jürgen Spitzmüller <juer...@...> writes:

> 
> Hm. I have in one of my class files this:
> 
> % Prettyref:
> \RequirePackage{prettyref}
> \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}}
> \newrefformat{tab}{Tabelle~\vref{#1}}
> \newrefformat{fig}{Abbildung~\vref{#1}}
> \newrefformat{exp}{Argumentation~\vref{#1}}
> 
> Note that some of these definitions include varioref (the \vref macro), so 
> \prettyref{fig:foo} actually yields "see figure X on the following page" (or 
> whatever the context requires). I am aware that I will be forced to change 
> that class file if we completely ditch prettyref (which is bad enough), but 
> is 
> refstyle at least able to allow similar inclusion of varioref functionality?

refstyle is internationalized through a configuration file, prettyref is not as
shows the fact that you had to do it in your classes: the strings being
hardcoded in English in prettref.sty.

Currently, Richard's patch aims only to replace the formatted reference choice
in the crossrefs manu.
This will need to distribute an improved refstyle.cfg file
to insure theorem and lemma compatibility with prettyref, as you can see in file
examples_crossrefs_lyx20_thm.pdf attached to bug #6420, where I did yhis in a
local refstyle.cfg file.

IMHO, the fact that refstyle.cfg allows to define in one single place all the
variants of the text added to the reference for various languages offers a frame
to extend the current sophisticated crossref management in LyX:

 - the need for layout level management of prettyref translations would be
transferred to global management in the cfg file. LyX can really benefit from
the numerous translators to improve a lot refstyle.cfg, for the benefit of the
latex community, with each and every variant of theorem-like inserts available
with the modules. Transfer of your class translation above in refstyle.cfg might
insure compatibility.

 - capitalization allows to tune the text to various language rules: e.g. in
French, chapitre should not be capitalized in a sentence, nor at the beginning.
An article could be inserted in that case, e.g.: 
  \def\RSchaptername{chapitre~}%
  \def\RSChaptername{Le chapitre~}%
  \def\RSchaptersname{chapitres~}%
  \def\RSChaptersname{Les chapitres~}%

 - plurals for range and list management with varioref: this requires more than
a checkbox in the menu, like capitalization does: as the selected labels must be
ordered, it would need an interface like the one developed for bibliographic
citations to add/remove labels which should appear in the range or list.

There are limits to what is possible to automate in formatted references, as you
mentioned in another message of this thread: in French again, sectioning
references does not fit well with the current model, as e.g. one should like to
get "la première partie" instead of "Part I", and even "la seconde partie" if
there are two parts and "la deuxième partie" if there are more :-)

BTW, I've split up bug #6420 in two bugs, and I have retargeted the varioref bug
#6608 to lyx-1.6.6. Do you think that it should only appear in lyx-2.0.0 to pass
the various alpha, beta, etc. release tests?

-- 
Jean-Pierre





Reply via email to