Discussion:
Correct usage of \nobibliography in Lyx?
Stefano Franchi
2009-11-25 17:34:59 UTC
Permalink
I have a document (my CV, actually) where I want to use full bibliographic
references in the text, but I do not want any reference section at the end of
the document. I used to solve this problem with a strategy similar to what is
recommended for biblatex. Namely:

1. Insert bibliography "the Lyx way" (Insert>List/Toc>BibTeX bibliography) at
the end of the document

2. Put the inserted bibliography in a Lyx note.

These two steps give access to the reference from within the LyX document

3. Add the ERT commands \bibliographystyle{style} \nobibliography{absolute
/path/to/file.bib}

The final step takes care of omitting the reference section at the end of the
formatted document.

I have been using this method for years without any problems. Yet today, when
I tried to update and print my Cv, I found out that LyX cannot find the
references when producing the (pdf)Latex file and puts the infamous question
marks in their place in the final pdf file. Yet, if I export to Latex and
compile manually everything works as expected.

Can anyone tell me what I am doing wrong? The Latex log tells me nothing
useful---the usual list of "Latex Warning: Citation XXX is undefined on line
YYY"


Cheers,

Stefano

______________________________________________________________
Stefano Franchi
Department of Philosophy Ph: (979) 862-2211
Texas A&M University Fax: (979) 845-0458
305B Bolton Hall franchi-us/rlpdCQ34rA+0O+***@public.gmane.org
College Station, TX 77843-4237
rgheck
2009-11-25 17:58:33 UTC
Permalink
Post by Stefano Franchi
I have a document (my CV, actually) where I want to use full bibliographic
references in the text, but I do not want any reference section at the end of
the document. I used to solve this problem with a strategy similar to what is
1. Insert bibliography "the Lyx way" (Insert>List/Toc>BibTeX bibliography) at
the end of the document
2. Put the inserted bibliography in a Lyx note.
These two steps give access to the reference from within the LyX document
3. Add the ERT commands \bibliographystyle{style} \nobibliography{absolute
/path/to/file.bib}
The final step takes care of omitting the reference section at the end of the
formatted document.
I have been using this method for years without any problems. Yet today, when
I tried to update and print my Cv, I found out that LyX cannot find the
references when producing the (pdf)Latex file and puts the infamous question
marks in their place in the final pdf file. Yet, if I export to Latex and
compile manually everything works as expected.
Can anyone tell me what I am doing wrong? The Latex log tells me nothing
useful---the usual list of "Latex Warning: Citation XXX is undefined on line
YYY"
This sounds like something that has been reported a few times recently,
involving environment variables set from the shell that aren't being set
when LyX is run from an icon. Try running LyX itself from the shell and
see if that helps.

rh
Stefano Franchi
2009-11-25 18:48:24 UTC
Permalink
Post by rgheck
This sounds like something that has been reported a few times recently,
involving environment variables set from the shell that aren't being set
when LyX is run from an icon. Try running LyX itself from the shell and
see if that helps.
I usually start LyX from the Kde mini-command line (i.e. Alt-F2), but I tried
starting it from a real terminal just in case. Unfortunately there is no
difference.

A further puzzle: if I export to Pdflatex and compile (successfully) in the
local directory, successive attempts by Lyx are successful as well. I suppose
this is due to the presence of .aux and .bbl files. But shouldn't Lyx compile
to pdf in a remote and safe environment, where the presence of stranded latex
byproducts should have no effect?


S.
Post by rgheck
rh
______________________________________________________________
Stefano Franchi
Department of Philosophy Ph: (979) 862-2211
Texas A&M University Fax: (979) 845-0458
305B Bolton Hall franchi-us/rlpdCQ34rA+0O+***@public.gmane.org
College Station, TX 77843-4237
rgheck
2009-11-25 21:28:14 UTC
Permalink
Post by Stefano Franchi
Post by rgheck
This sounds like something that has been reported a few times recently,
involving environment variables set from the shell that aren't being set
when LyX is run from an icon. Try running LyX itself from the shell and
see if that helps.
I usually start LyX from the Kde mini-command line (i.e. Alt-F2), but I tried
starting it from a real terminal just in case. Unfortunately there is no
difference.
A further puzzle: if I export to Pdflatex and compile (successfully) in the
local directory, successive attempts by Lyx are successful as well. I suppose
this is due to the presence of .aux and .bbl files. But shouldn't Lyx compile
to pdf in a remote and safe environment, where the presence of stranded latex
byproducts should have no effect?
Hmm. This is puzzling.

Try starting LyX from a terminal and see if you're getting any errors
there; maybe try "lyx -dbg latex" or "lyx -dbg files". Also, peek into
LyX's temporary directory---should be /tmp/lyx_tmpdir.RANDOM---and see
if the bib file is successfully being copied over; you can also look
there are the *.tex file that LyX is generating. For some reason, LyX
just isn't finding that file.

rh
Stefano Franchi
2009-11-27 18:45:07 UTC
Permalink
Post by rgheck
Post by Stefano Franchi
Post by rgheck
This sounds like something that has been reported a few times recently,
involving environment variables set from the shell that aren't being set
when LyX is run from an icon. Try running LyX itself from the shell and
see if that helps.
I usually start LyX from the Kde mini-command line (i.e. Alt-F2), but I
tried starting it from a real terminal just in case. Unfortunately there
is no difference.
A further puzzle: if I export to Pdflatex and compile (successfully) in
the local directory, successive attempts by Lyx are successful as well. I
suppose this is due to the presence of .aux and .bbl files. But shouldn't
Lyx compile to pdf in a remote and safe environment, where the presence of
stranded latex byproducts should have no effect?
Hmm. This is puzzling.
Try starting LyX from a terminal and see if you're getting any errors
there; maybe try "lyx -dbg latex" or "lyx -dbg files". Also, peek into
LyX's temporary directory---should be /tmp/lyx_tmpdir.RANDOM---and see
if the bib file is successfully being copied over; you can also look
there are the *.tex file that LyX is generating. For some reason, LyX
just isn't finding that file.
Well, I checked the /tmp directory, and I am none the wiser:
1. Lyx did copy the correct .bib file to the temp directory.
2. A temporary .tex file was generated. That file had a correct /bibliography
command that pointed to the copied .bib file (or /nobibliography, I played
around with both options)
3. Nonetheless, the generated .pdf file did not have any refs.



I am afraid I will leave it at that for the time being. Indeed, since I have
switched to BibLatex for all my new documents, a simpler way to achieve the
/nobibliography effect is to use biblatex in the preamble and simply omit the
/printbibliography command at the end of the file.


Cheers,

S.
Post by rgheck
rh
______________________________________________________________
Stefano Franchi
Department of Philosophy Ph: (979) 862-2211
Texas A&M University Fax: (979) 845-0458
305B Bolton Hall franchi-us/rlpdCQ34rA+0O+***@public.gmane.org
College Station, TX 77843-4237

Loading...