On 12/25/2009 08:17 AM, Petr Šimon wrote:
On 25.12.2009 19:51, Pavel Sanda wrote:
Petr Šimon wrote:
I have some questions on the capabilities of LYXCMD.
Is it possible to get list of citations and the bibtex file name for
current document or do I have to look through the document myself?
How can I get to master file when the active tab is child document?
not sure what you mean by LYXCMD, but in case you are talking about
LFUNs you
can put into lyx pipe, then answer for your questions is no.
searching for
string "bib" through lyx functions manual shows probably all we know
as far
as bibtex citations is concerned.
Thanks for reply, yes that's what I meant, sorry, I just started to
explore the internals of Lyx, so I'm getting used to the lingo.
I thought might there might be some undocumented tricks to send
commands over the pipe other than the LFUNs, that would allow more
access to Lyx from the lyxserver client.
Is there some reason you want to know those filenames externally? If so,
then it would be a simple matter to add an LFUN to return them.
Regarding bibliography stuff, LyX always gets the relevant info from the
master document.
It seems that the bibtex file is read every time I try to insert
citation
via the dialog, is that correct?
i would try breakpoint on Buffer::localBibInfo()
The files should not be re-read every time. If you look at
Buffer::localBibInfo(), you'll see that we cache this information and
compare timestamps to decide whether a particular file needs to be
re-read. On high latency network connections, therefore, you could see a
lag each time, as the last modified time is re-read. But this should not
be significant.
As noted, however, in a FIXME at Buffer.cpp:229 in trunk, this could be
improved, because we cache per-Buffer, rather than per-bibfile. So you
could end up reading the same file a few times.
rh