Re: Weird problem with bibtex from LyX (but not from Latex)-- SOLVED

2009-03-17 Thread Stefano Franchi
On Monday 16 March 2009 04:59:18 Guenter Milde wrote:
 On 2009-03-15, Stefano Franchi wrote:
  3. The preamble of the master document calls the \bibliography commands
 with 4 .bib files

 As the preamble is free LaTeX source (like ERT), lyx is not aware of
 the \bibliography call there.

 Where are your .bib files?

  launching lyx from console and looking at the output reveals that the
  problem is that bibtex cannot find the bib files:
 
  However, If I export to the whole manuscript to latex (plain) and
  compile from the command line everything works fine, all the bib
  references are found, etcetera.

 LyX uses a temporary directory. This might be the cause. You can try to
 disable the temporary directory (I don't know how exactly but guess
 that giving an empty path for the TempDir in Toolssettings helps).

  2. I tried creating soft links to the actual files in the local
 directory and substituting just file names for absolute paths.  No
 difference.

 I would try to put (or link) the *.bib files into a directory in the
 BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.

 .. and substituting just file names for absolute paths.


 Günter

Problem solved. It tuned out to be two small problems, actually, which is why 
I was lost. I am typing what I found out for future reference and general 
posterity:

1. Thanks to Richard's and Gunter's explanations I know now what LyX does 
behind the scene when it compiles a .lyx to .pdf
Result: LyX will not find the bib files if both these conditions are true (Of 
course they both were in my case...):

a-  BibLatex is used for the bib references
b- the bib files are located in the document's directory and referred to by 
relative pathnames

This is because LyX does its behind the scene work by copying all the files it 
needs to a remote directory (/tmp/ on Linux) and doing the latex 
compilation there. If b is true and a is false, LyX strategy will work: the 
bib files declared within LyX will be copied as well, and everything is fine. 
When using BibLatex, however, the files are declared in the preamble, which LyX 
ignores, and will not get copied. BibTex will then use the relative pathnames 
from a remote directory and fail

Exporting to Latex, on the other hand, will work, because the exported .tex 
files are located in the original directory alongside the .bib files.

Moral of the story: never use relative pathnames with BibLatex unless you want 
to export to Latex everytime you want your references to come out right.

2. Second problem: It turns out that the preamble command needed to specify 
.bib files in Biblatex can accept comma-separated multiple files ONLY IF there 
are no spaces separating them. Otherwise BibteX will fail with a rather 
cryptic error message which it took me a while to decode. Of course, the 
comma space sequence is so deeply engrained in my fingers that I hadn't even 
noticed I was typing extra spaces. 
Moral of the story: Never put spaces in the \bibliography command


Cheers,

S.



 



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas AM University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)-- SOLVED

2009-03-17 Thread Stefano Franchi
On Monday 16 March 2009 04:59:18 Guenter Milde wrote:
 On 2009-03-15, Stefano Franchi wrote:
  3. The preamble of the master document calls the \bibliography commands
 with 4 .bib files

 As the preamble is free LaTeX source (like ERT), lyx is not aware of
 the \bibliography call there.

 Where are your .bib files?

  launching lyx from console and looking at the output reveals that the
  problem is that bibtex cannot find the bib files:
 
  However, If I export to the whole manuscript to latex (plain) and
  compile from the command line everything works fine, all the bib
  references are found, etcetera.

 LyX uses a temporary directory. This might be the cause. You can try to
 disable the temporary directory (I don't know how exactly but guess
 that giving an empty path for the TempDir in Toolssettings helps).

  2. I tried creating soft links to the actual files in the local
 directory and substituting just file names for absolute paths.  No
 difference.

 I would try to put (or link) the *.bib files into a directory in the
 BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.

 .. and substituting just file names for absolute paths.


 Günter

Problem solved. It tuned out to be two small problems, actually, which is why 
I was lost. I am typing what I found out for future reference and general 
posterity:

1. Thanks to Richard's and Gunter's explanations I know now what LyX does 
behind the scene when it compiles a .lyx to .pdf
Result: LyX will not find the bib files if both these conditions are true (Of 
course they both were in my case...):

a-  BibLatex is used for the bib references
b- the bib files are located in the document's directory and referred to by 
relative pathnames

This is because LyX does its behind the scene work by copying all the files it 
needs to a remote directory (/tmp/ on Linux) and doing the latex 
compilation there. If b is true and a is false, LyX strategy will work: the 
bib files declared within LyX will be copied as well, and everything is fine. 
When using BibLatex, however, the files are declared in the preamble, which LyX 
ignores, and will not get copied. BibTex will then use the relative pathnames 
from a remote directory and fail

Exporting to Latex, on the other hand, will work, because the exported .tex 
files are located in the original directory alongside the .bib files.

Moral of the story: never use relative pathnames with BibLatex unless you want 
to export to Latex everytime you want your references to come out right.

2. Second problem: It turns out that the preamble command needed to specify 
.bib files in Biblatex can accept comma-separated multiple files ONLY IF there 
are no spaces separating them. Otherwise BibteX will fail with a rather 
cryptic error message which it took me a while to decode. Of course, the 
comma space sequence is so deeply engrained in my fingers that I hadn't even 
noticed I was typing extra spaces. 
Moral of the story: Never put spaces in the \bibliography command


Cheers,

S.



 



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas AM University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)--> SOLVED

2009-03-17 Thread Stefano Franchi
On Monday 16 March 2009 04:59:18 Guenter Milde wrote:
> On 2009-03-15, Stefano Franchi wrote:
> > 3. The preamble of the master document calls the \bibliography commands
> >with 4 .bib files
>
> As the preamble is "free LaTeX source" (like ERT), lyx is not aware of
> the \bibliography call there.
>
> Where are your .bib files?
>
> > launching lyx from console and looking at the output reveals that the
> > problem is that bibtex cannot find the bib files:
> >
> > However, If I export to the whole manuscript to latex (plain) and
> > compile from the command line everything works fine, all the bib
> > references are found, etcetera.
>
> LyX uses a temporary directory. This might be the cause. You can try to
> disable the temporary directory (I don't know how exactly but guess
> that giving an empty path for the TempDir in Tools>settings helps).
>
> > 2. I tried creating soft links to the actual files in the local
> >directory and substituting just file names for absolute paths.  No
> >difference.
>
> I would try to put (or link) the *.bib files into a directory in the
> BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.
>
> .. and substituting just file names for absolute paths.
>
>
> Günter

Problem solved. It tuned out to be two small problems, actually, which is why 
I was lost. I am typing what I found out for future reference and general 
posterity:

1. Thanks to Richard's and Gunter's explanations I know now what LyX does 
behind the scene when it compiles a .lyx to .pdf
Result: LyX will not find the bib files if both these conditions are true (Of 
course they both were in my case...):

a-  BibLatex is used for the bib references
b- the bib files are located in the document's directory and referred to by 
relative pathnames

This is because LyX does its behind the scene work by copying all the files it 
needs to a remote directory (/tmp/ on Linux) and doing the latex 
compilation there. If b is true and a is false, LyX strategy will work: the 
bib files declared within LyX will be copied as well, and everything is fine. 
When using BibLatex, however, the files are declared in the preamble, which LyX 
ignores, and will not get copied. BibTex will then use the relative pathnames 
from a remote directory and fail

Exporting to Latex, on the other hand, will work, because the exported .tex 
files are located in the original directory alongside the .bib files.

Moral of the story: never use relative pathnames with BibLatex unless you want 
to export to Latex everytime you want your references to come out right.

2. Second problem: It turns out that the preamble command needed to specify 
.bib files in Biblatex can accept comma-separated multiple files ONLY IF there 
are no spaces separating them. Otherwise BibteX will fail with a rather 
cryptic error message which it took me a while to decode. Of course, the 
"comma space" sequence is so deeply engrained in my fingers that I hadn't even 
noticed I was typing extra spaces. 
Moral of the story: Never put spaces in the \bibliography command


Cheers,

S.



 



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas A University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-16 Thread Guenter Milde
On 2009-03-15, Stefano Franchi wrote:

 3. The preamble of the master document calls the \bibliography commands
with 4 .bib files

As the preamble is free LaTeX source (like ERT), lyx is not aware of
the \bibliography call there.

Where are your .bib files?

 launching lyx from console and looking at the output reveals that the
 problem is that bibtex cannot find the bib files:

 However, If I export to the whole manuscript to latex (plain) and
 compile from the command line everything works fine, all the bib
 references are found, etcetera.

LyX uses a temporary directory. This might be the cause. You can try to
disable the temporary directory (I don't know how exactly but guess
that giving an empty path for the TempDir in Toolssettings helps).

 2. I tried creating soft links to the actual files in the local
directory and substituting just file names for absolute paths.  No
difference.

I would try to put (or link) the *.bib files into a directory in the
BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.

.. and substituting just file names for absolute paths.


Günter



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-16 Thread Guenter Milde
On 2009-03-15, Stefano Franchi wrote:

 3. The preamble of the master document calls the \bibliography commands
with 4 .bib files

As the preamble is free LaTeX source (like ERT), lyx is not aware of
the \bibliography call there.

Where are your .bib files?

 launching lyx from console and looking at the output reveals that the
 problem is that bibtex cannot find the bib files:

 However, If I export to the whole manuscript to latex (plain) and
 compile from the command line everything works fine, all the bib
 references are found, etcetera.

LyX uses a temporary directory. This might be the cause. You can try to
disable the temporary directory (I don't know how exactly but guess
that giving an empty path for the TempDir in Toolssettings helps).

 2. I tried creating soft links to the actual files in the local
directory and substituting just file names for absolute paths.  No
difference.

I would try to put (or link) the *.bib files into a directory in the
BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.

.. and substituting just file names for absolute paths.


Günter



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-16 Thread Guenter Milde
On 2009-03-15, Stefano Franchi wrote:

> 3. The preamble of the master document calls the \bibliography commands
>with 4 .bib files

As the preamble is "free LaTeX source" (like ERT), lyx is not aware of
the \bibliography call there.

Where are your .bib files?

> launching lyx from console and looking at the output reveals that the
> problem is that bibtex cannot find the bib files:

> However, If I export to the whole manuscript to latex (plain) and
> compile from the command line everything works fine, all the bib
> references are found, etcetera.

LyX uses a temporary directory. This might be the cause. You can try to
disable the temporary directory (I don't know how exactly but guess
that giving an empty path for the TempDir in Tools>settings helps).

> 2. I tried creating soft links to the actual files in the local
>directory and substituting just file names for absolute paths.  No
>difference.

I would try to put (or link) the *.bib files into a directory in the
BIBINPUTS path, so it is found by LaTeX/BibTeX from everywhere.

.. and substituting just file names for absolute paths.


Günter



Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread Stefano Franchi
Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

Here is the setup:

1. I have a master document with several .lyx child documents (chapters in a 
book)

2. The bibliography is set up to use BibLatex according to the lyx wiki 
instructions

3. The preamble of the master document calls the \bibliography commands with 4 
.bib files

4. The preambles of the child documents are empty.

5. I am using LyX 1.6.2 (Thanks!) on a Kubuntu machine running the latest KDE 
version


and here is what happens:

when I compile the file (pdflatex) the bib refs are not found and left as 
bibkeys in the final output.

launching lyx from console and looking at the output reveals that the problem 
is that bibtex cannot find the bib files:

I could  not find open database fileetc. etc.

I'm skipping whatever remains of this command

So bibtex has problems on the first of the four 4 files, skips the remaining 
three, and proceeds. Unsurprisingly, the references do not come out as they 
should. 

However, If I export to the whole manuscript to latex (plain) and compile from 
the command line everything works fine, all the bib references are found, 
etcetera.

I checked and rechecked the filenames, and they are all right. 

Here is what I tried:

1. I tried switching the order of the four database files in the \bibliography 
command---no difference ( I didn't try all permutations, though..)


2. I tried creating soft links to the actual files in the local directory and 
substituting just file names for absolute paths.  No difference.

Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.

Help appreciated.


Cheers,

S.



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas AM University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread rgheck

Stefano Franchi wrote:

Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

[snip]
Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.


  
Me, too. Here's one way to proceed. When LyX compiles your document, it 
exports it, though in somewhat different form, in a temporary 
directory. On Linux, this would be in 
/tmp/lyx_tmpdir.RANDOM/lyx_tmpbufN, or thereabouts. So try compiling, 
and then go into that directory and have a look at the .tex files that 
have been put there. There must be some difference. If all is going 
well, LyX should also have copied your .bib files into the temporary 
directory. At least, that's usually the case.


I haven't worked with BibLaTeX under LyX, so I'm just guessing, but one 
possibility is that LyX isn't seeing that it needs to copy the .bib 
files into the temporary directory, and for some reason it isn't finding 
them through the usual lookup mechanism.


rh



Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread Stefano Franchi
Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

Here is the setup:

1. I have a master document with several .lyx child documents (chapters in a 
book)

2. The bibliography is set up to use BibLatex according to the lyx wiki 
instructions

3. The preamble of the master document calls the \bibliography commands with 4 
.bib files

4. The preambles of the child documents are empty.

5. I am using LyX 1.6.2 (Thanks!) on a Kubuntu machine running the latest KDE 
version


and here is what happens:

when I compile the file (pdflatex) the bib refs are not found and left as 
bibkeys in the final output.

launching lyx from console and looking at the output reveals that the problem 
is that bibtex cannot find the bib files:

I could  not find open database fileetc. etc.

I'm skipping whatever remains of this command

So bibtex has problems on the first of the four 4 files, skips the remaining 
three, and proceeds. Unsurprisingly, the references do not come out as they 
should. 

However, If I export to the whole manuscript to latex (plain) and compile from 
the command line everything works fine, all the bib references are found, 
etcetera.

I checked and rechecked the filenames, and they are all right. 

Here is what I tried:

1. I tried switching the order of the four database files in the \bibliography 
command---no difference ( I didn't try all permutations, though..)


2. I tried creating soft links to the actual files in the local directory and 
substituting just file names for absolute paths.  No difference.

Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.

Help appreciated.


Cheers,

S.



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas AM University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread rgheck

Stefano Franchi wrote:

Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

[snip]
Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.


  
Me, too. Here's one way to proceed. When LyX compiles your document, it 
exports it, though in somewhat different form, in a temporary 
directory. On Linux, this would be in 
/tmp/lyx_tmpdir.RANDOM/lyx_tmpbufN, or thereabouts. So try compiling, 
and then go into that directory and have a look at the .tex files that 
have been put there. There must be some difference. If all is going 
well, LyX should also have copied your .bib files into the temporary 
directory. At least, that's usually the case.


I haven't worked with BibLaTeX under LyX, so I'm just guessing, but one 
possibility is that LyX isn't seeing that it needs to copy the .bib 
files into the temporary directory, and for some reason it isn't finding 
them through the usual lookup mechanism.


rh



Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread Stefano Franchi
Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

Here is the setup:

1. I have a master document with several .lyx child documents (chapters in a 
book)

2. The bibliography is set up to use BibLatex according to the lyx wiki 
instructions

3. The preamble of the master document calls the \bibliography commands with 4 
.bib files

4. The preambles of the child documents are empty.

5. I am using LyX 1.6.2 (Thanks!) on a Kubuntu machine running the latest KDE 
version


and here is what happens:

when I compile the file (pdflatex) the bib refs are not found and left as 
bibkeys in the final output.

launching lyx from console and looking at the output reveals that the problem 
is that bibtex cannot find the bib files:

"I could  not find open database fileetc. etc."

""I'm skipping whatever remains of this command"

So bibtex has problems on the first of the four 4 files, skips the remaining 
three, and proceeds. Unsurprisingly, the references do not come out as they 
should. 

However, If I export to the whole manuscript to latex (plain) and compile from 
the command line everything works fine, all the bib references are found, 
etcetera.

I checked and rechecked the filenames, and they are all right. 

Here is what I tried:

1. I tried switching the order of the four database files in the \bibliography 
command---no difference ( I didn't try all permutations, though..)


2. I tried creating soft links to the actual files in the local directory and 
substituting just file names for absolute paths.  No difference.

Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.

Help appreciated.


Cheers,

S.



__
Stefano Franchi
Department of Philosophy  Ph:  (979) 862-2211
Texas A University  Fax: (979) 845-0458
305B Bolton Hall  fran...@philosophy.tamu.edu
College Station, TX 77843-4237



Re: Weird problem with bibtex from LyX (but not from Latex)

2009-03-15 Thread rgheck

Stefano Franchi wrote:

Dear Lyxers,

I am encountering a strange problem with bibtex when operated automatically 
from within LyX which does not exist when the LyX files are exported to latex 
and then compiled from the command line.

[snip]
Now I have run out of options. Since I can get the properly compiled pdf file 
from the command line the problem is not too annoying, but still, I would like 
to understand what is going on.


  
Me, too. Here's one way to proceed. When LyX compiles your document, it 
"exports" it, though in somewhat different form, in a temporary 
directory. On Linux, this would be in 
/tmp/lyx_tmpdir.RANDOM/lyx_tmpbufN, or thereabouts. So try compiling, 
and then go into that directory and have a look at the .tex files that 
have been put there. There must be some difference. If all is going 
well, LyX should also have copied your .bib files into the temporary 
directory. At least, that's usually the case.


I haven't worked with BibLaTeX under LyX, so I'm just guessing, but one 
possibility is that LyX isn't seeing that it needs to copy the .bib 
files into the temporary directory, and for some reason it isn't finding 
them through the usual lookup mechanism.


rh