Re: Relative path to bib source doesn't work in lyx (but does work when exported as .tex)

2013-01-18 Thread Julien Rioux

On 27/11/2012 6:47 PM, stefano franchi wrote:

On Tue, Nov 27, 2012 at 5:34 PM, Roey Angel  wrote:

So, a bug or a 'feature'?



Feature, p/h? It has a great educational value: it forces you to understand
how lyx uses the latex (and biber, texindy, etc) backends ;-)

Cheers,

Stefano




There's an enhancement request that might solve this, eventually (don't 
hold your breath, it's 7 year old): http://www.lyx.org/trac/ticket/2645


--
Julien


Re: Relative path to bib source doesn't work in lyx (but does work when exported as .tex)

2012-11-27 Thread stefano franchi
On Tue, Nov 27, 2012 at 5:34 PM, Roey Angel  wrote:

> Hi,
> Not sure if it's a bug or I'm missing out on something but when I enter a
> bib
> source to the preamble it only works when the path to the bib source is
> absolute
> but doesn't in case I simply write the file name (yes, I double checked
> the bib
> file is in the same directory).
> I don't get an error but simply a PDF with the reference fields
> unrecognised (so
> it's got to be that lyx can't find the bib file).
>
Since Lyx compiles the tex files in a temp directory, I doubt a relative
path would ever work. Lyx would have to parse the preamble, extract the
path, convert it to an absolute path (or a new path relative to the temp
directory), and rewrite the preamble accordingly.
In fact, if you add the bibliography with the Lyx inset (i..e using bibtex,
not BibLateX) and then check the lyx source, you'll see that Lyx uses the
absolute path.


> If I export the file to LaTeX and compile it from command line everything
> works
> fine.
>
>
This is because if you export to Latex and then compile, you are working in
your local directory (the directory where your original lyx file is). And
Latex (or rather, biber) is therefore able to find the file from the
relative path.


> my preamble line looks something like
>
> \usepackage[style=authoryear-
>>
>> comp, natbib=true, backend=biber]{biblatex}
>> \addbibresource{/full/path/to/bib/file.bib}
>>
>>
>
This looks fine---as long as /full/path/to/bib/file.bib is really
/absolute/path/to/file.bib



> So, a bug or a 'feature'?
>

Feature, p/h? It has a great educational value: it forces you to understand
how lyx uses the latex (and biber, texindy, etc) backends ;-)

Cheers,

Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic StudiesPh:   +1 (979) 845-2125
Texas A&M University  Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Relative path to bib source doesn't work in lyx (but does work when exported as .tex)

2012-11-27 Thread Roey Angel
Hi,
Not sure if it's a bug or I'm missing out on something but when I enter a bib
source to the preamble it only works when the path to the bib source is absolute
but doesn't in case I simply write the file name (yes, I double checked the bib
file is in the same directory). 
I don't get an error but simply a PDF with the reference fields unrecognised (so
it's got to be that lyx can't find the bib file).
If I export the file to LaTeX and compile it from command line everything works
fine.

my preamble line looks something like

\usepackage[style=authoryear-comp, natbib=true, backend=biber]{biblatex}
\addbibresource{/full/path/to/bib/file.bib}

So, a bug or a 'feature'?
Roey



using Lyx 2.05 and kubuntu 12.10 but i got the same problem on lyx2.1(dev)