William Hanson writes:
> 
> Dear All,  Last summer Stefano Franchi did something  for me that I was
> unable do.  He created a tex file out of a lyx file and a bib file.
> I'm in the same bind again.  The problem, then and now, is that when I try
> to create a tex file of my LyX document, the resulting tex file does not
> contain the References that are in the original LyX document.  (All the
> references are from BiBtex.  Following Stefano's instructions, I have the
> document itself (a lyx file) and my Bibtex database (a bib file) in the
> same folder--under My Documents in Windows 7).
> 
> When I use LyX to create a tex file (by selecting File -> Export -> LaTeX
> (plain)),  I get an error message saying that the filename "... can cause
> troubles when running the exported file through LaTeX and opening the
> resulting DVI".  If I ignore this warning and press on, I get another error
> message that says, "There are spaces in the paths to your BibTeX database.
> BibTeX will be unable to find them".  (The only space in the path in
> question is between "My" and "Documents" in "My Documents".  I've tried
> closing this space by renaming "My Documents" in Windows 7 as
> "MyDocuments", but it doesn't help.  I still get the same two error
> messages.)  If I ignore this second warning and continue I get a tex file
> of the document itself but without any of the references.
>
> What should I do?

Try the following procedure:
1) Start LyX and preview your document (generate a pdf).
2) Go to Tools->Preferences->Paths and take note of the
   "Temporary directory" location.
3) Select File->Import->LaTeX (plain) and navigate to the
   "Temporary directory" location.
4) Enter the directory whose name starts with "lyx_tmpdir" and then
   the subdirectory named lyx_tmpbuf0 (you may have more than one,
   lyx_tmpbuf1, lyx_tmpbuf2, etc., each one corresponding to a different
   document).
5) Select "Show all files" in the file dialog and choose the file whose
   name is the same as that of your document but with extension .bbl.
6) If tex2lyx does its job, you will now have your bibliography in LyX
   format in another tab. Copy everything and paste it in place of
   the "BibTeX Generated Bibliography" inset in your document.
7) You can now export to latex with complete references.

HTH

-- 
Enrico

Reply via email to