On Friday 05 April 2002 3:11 pm, Jean-Marc Lasgouttes wrote:
> >>>>> "Herbert" == Herbert Voss <[EMAIL PROTECTED]> writes:
>
> Herbert> there are 7 different commands, for example one: the
> Herbert> lyx-format: \begin_inset LatexCommand
> Herbert> \citealp[<\before>see<\end_before><\after>page
> Herbert> 1ff<\end_after><\natbib>Wright, 1978; Wright, 1963; Wood,
> Herbert> 1961]{wright-78-book,wright-63,wood-61} \end_inset
>
> One purely cosmetic objection I have to your <> stuff is that, if you
> are going to make things SGML-like, this should be
> <before>see</before><after>page 1ff</after><natbib>Wright, 1978; Wright,
> 1963; Wood, 1961</natbib>
>
> Otherwise, you could use a more sensible solution.
>
> Herbert> this is a kind of overhead! for three words I start a search
> Herbert> in a database ...
>
> So you are doing caching of data in the document. I do not like this
> much...
>
> Herbert> and how do I know in the inset what bibtex-file I use?
>
> This one is of course the real problem. Angus?
>
> JMarc

Why blame me!

Let's try and think this through properly.

* Herbert would like a pretty citation label on the citation inset button.
* His proposed solution (writing temporary data to the LyX file) has been 
vetoed for good reasons.
* He has proposed this solution because the inset cannot easily access this 
info itself.

All this is fair enough, however, I'm not sure it's correct.

When the citation inset label is drawn, all the necessary info is available 
to it (I think) because getScreenLabel is passed a Buffer *.

So, Herbert, in getScreenLabel you 
* can access all available bibkeys (buffer->getBibkeyList()).
* know whether you're to use natbib (buffer->params.use_natbib).
* know whether you're to use numerical or author-year citations 
(buffer->params.use_numerical_citations).
* must create routines equivalent to biblio::getNumericalStrings and 
biblio::getAuthorYearStrings that return the pretty string you require.

Is it worth it?

Only you can decide.

Will it go in 1.2?

Only Lars can decide.

Over to you.
Angus

Reply via email to