Discussion:
bib to bbl
Bruce Pourciau
2006-07-17 20:57:17 UTC
Permalink
I've got a .bib file and a .bst style file. A journal tells me to
make from these a .bbl file, so I can include (as a TeX inset?)
the .bbl file in my LyX document and/or cut and paste the .bbl file
into the TeX file. Any suggestions on how to make such a .bbl file? I
know I need to "run BibTeX on the .bib file," but I'm not sure how to
do this using TeXShop.

Any help would be appreciated.

Bruce
Bruce Pourciau
2006-07-17 21:36:51 UTC
Permalink
Actually, I'm told I should "run BibTeX on my source tex file," but
when I do what I think this means, with a small test file
BblTest.tex, I get an error message from BibDesk: "cannot open file
name BibTest.aux"

Suggestions?

Bruce
Post by Bruce Pourciau
I've got a .bib file and a .bst style file. A journal tells me to
make from these a .bbl file, so I can include (as a TeX inset?)
the .bbl file in my LyX document and/or cut and paste the .bbl file
into the TeX file. Any suggestions on how to make such a .bbl file?
I know I need to "run BibTeX on the .bib file," but I'm not sure
how to do this using TeXShop.
Any help would be appreciated.
Bruce
Richard Heck
2006-07-17 21:55:39 UTC
Permalink
You have to run latex once on the tex file to create the aux file.
BibTeX reads the aux file to find out what references exist in the document.

Richard
Post by Bruce Pourciau
Actually, I'm told I should "run BibTeX on my source tex file," but
when I do what I think this means, with a small test file BblTest.tex,
I get an error message from BibDesk: "cannot open file name BibTest.aux"
Suggestions?
Bruce
Post by Bruce Pourciau
I've got a .bib file and a .bst style file. A journal tells me to
make from these a .bbl file, so I can include (as a TeX inset?) the
.bbl file in my LyX document and/or cut and paste the .bbl file into
the TeX file. Any suggestions on how to make such a .bbl file? I know
I need to "run BibTeX on the .bib file," but I'm not sure how to do
this using TeXShop.
Any help would be appreciated.
Bruce
Paul A. Rubin
2006-07-17 22:07:42 UTC
Permalink
Actually, I'm told I should "run BibTeX on my source tex file," but when
I do what I think this means, with a small test file BblTest.tex, I get
an error message from BibDesk: "cannot open file name BibTest.aux"
Suggestions?
Bruce
I've got a .bib file and a .bst style file. A journal tells me to make
from these a .bbl file, so I can include (as a TeX inset?) the .bbl
file in my LyX document and/or cut and paste the .bbl file into the
TeX file. Any suggestions on how to make such a .bbl file? I know I
need to "run BibTeX on the .bib file," but I'm not sure how to do this
using TeXShop.
Any help would be appreciated.
Bruce
You have to export to latex, run latex against the .tex file (this
produces the .aux file), then run bibtex against the .tex file.

An easier solution may be to View->DVI in LyX, and (while the DVI file
is open) cruise to the temp directory LyX is using. There should be a
copy of the .bbl file there.

/Paul
Bruce Pourciau
2006-07-18 13:46:01 UTC
Permalink
Post by Paul A. Rubin
An easier solution may be to View->DVI in LyX, and (while the DVI
file is open) cruise to the temp directory LyX is using. There
should be a copy of the .bbl file there.
Thanks, Paul. How would I find this temporary directory?
Post by Paul A. Rubin
Post by Bruce Pourciau
Actually, I'm told I should "run BibTeX on my source tex file,"
but when I do what I think this means, with a small test file
BblTest.tex, I get an error message from BibDesk: "cannot open
file name BibTest.aux"
Suggestions?
Bruce
Post by Bruce Pourciau
I've got a .bib file and a .bst style file. A journal tells me to
make from these a .bbl file, so I can include (as a TeX inset?)
the .bbl file in my LyX document and/or cut and paste the .bbl
file into the TeX file. Any suggestions on how to make such
a .bbl file? I know I need to "run BibTeX on the .bib file," but
I'm not sure how to do this using TeXShop.
Any help would be appreciated.
Bruce
You have to export to latex, run latex against the .tex file (this
produces the .aux file), then run bibtex against the .tex file.
An easier solution may be to View->DVI in LyX, and (while the DVI
file is open) cruise to the temp directory LyX is using. There
should be a copy of the .bbl file there.
/Paul
Paul A. Rubin
2006-07-18 16:49:56 UTC
Permalink
Post by Bruce Pourciau
Post by Paul A. Rubin
An easier solution may be to View->DVI in LyX, and (while the DVI file
is open) cruise to the temp directory LyX is using. There should be a
copy of the .bbl file there.
Thanks, Paul. How would I find this temporary directory?
You use one of those Mac thingies, right? Isn't there a way to rub the
machine's case and then tell the genie what you need?

Alternatively, Tools->Preferences...->Paths->Temp directory should point
you to the parent directory of the buffer. You'll have to drill down a
level or so from there.

/Paul
Bruce Pourciau
2006-07-18 19:58:49 UTC
Permalink
Post by Paul A. Rubin
You use one of those Mac thingies, right? Isn't there a way to rub
the machine's case and then tell the genie what you need?
I love the Mac genie, in part because she protects me from things
that I _generally_ don't need or want to see, like this /tmp folder.
A mac guru friend has taught me how to get past that protection in
order to find /tmp and the .bbl file., which was produced, as you
pointed out, by View > DVI.

Thanks for the help, Paul.
Post by Paul A. Rubin
Post by Bruce Pourciau
Post by Paul A. Rubin
An easier solution may be to View->DVI in LyX, and (while the DVI
file is open) cruise to the temp directory LyX is using. There
should be a copy of the .bbl file there.
Thanks, Paul. How would I find this temporary directory?
You use one of those Mac thingies, right? Isn't there a way to rub
the machine's case and then tell the genie what you need?
Alternatively, Tools->Preferences...->Paths->Temp directory should
point you to the parent directory of the buffer. You'll have to
drill down a level or so from there.
/Paul
Richard Heck
2006-07-17 21:52:16 UTC
Permalink
Basically, what you need to do is run LaTeX manually instead of letting
LyX do it for you. Detailed instructions follow.

Let's say your LyX file is /home/you/doc.lyx. Open it in LyX and export
your LyX document as LaTeX (File>Export>LaTeX). It will turn up as
/home/you/doc.tex. Open a terminal and go to /home/you. (Better yet:
Create a temporary directory /tmp/lyx and copy doc.tex over there, so
you don't make a mess.) Now run:
#latex doc.tex
<<Much output follows>>
#bibtex doc
That will create /home/you/doc.bbl.

As far as pasting the .bbl file into the LaTeX file goes, here's how we
do that. (I'd suggest you NOT try this with the LyX file.) Open
/home/you/doc.tex and /home/you/doc.bbl in whatever text editor you
like. TeXShop will do. So will anything else that is a text editor. At
or near the end of the LaTeX file you will find lines like these:

\bibliographystyle{/home/rgheck/files/texmf/bibtex/bst/base/heck}
\bibliography{/home/rgheck/files/bibtex/articles,/home/rgheck/files/bibtex/books}

Delete (or comment out) these lines. Now paste the whole of the .bbl
file where those lines used to be. Save as /home/you/doc.new.tex.

We can check that this worked by now going back to /home/you/ and running:
#latex doc.new.tex
<<Much output follows>>
#latex doc.new.tex
<<Much less output follows>>
Yes, twice. The second time, as noted, much less output should appear.
In particular, you should not see a bunch of "undefined citation"
warnings, which you will see the first time. This should create
doc.new.dvi, which you can now view using whatever dvi viewer you wish.

Richard
I've got a .bib file and a .bst style file. A journal tells me to make
from these a .bbl file, so I can include (as a TeX inset?) the .bbl
file in my LyX document and/or cut and paste the .bbl file into the
TeX file. Any suggestions on how to make such a .bbl file? I know I
need to "run BibTeX on the .bib file," but I'm not sure how to do this
using TeXShop.
Any help would be appreciated.
Bruce
Ed Gatzke
2006-07-18 13:13:58 UTC
Permalink
You may need to run the latex and bibtex commands two or three times to make
sure labels take as well.

I usually run something like:

latex file.tex
latex file.tex
latex file.tex

bibtex file
bibtex file

!!! Make modifiation to file.tex here using file.bbl

latex file.tex
latex file.tex
latex file.tex

dvips -t letter -Ppdf -o file.ps file.dvi

ps2pdf file.ps


LyX is such a godsend, people don't know how terrible the old school ways are.
Bruce Pourciau
2006-07-18 13:42:55 UTC
Permalink
Richard, thanks for the help. I really appreciate it.

I see you're now at Brown, my alma mater (mathematics).

Bruce
Post by Richard Heck
Basically, what you need to do is run LaTeX manually instead of letting
LyX do it for you. Detailed instructions follow.
Let's say your LyX file is /home/you/doc.lyx. Open it in LyX and export
your LyX document as LaTeX (File>Export>LaTeX). It will turn up as
Create a temporary directory /tmp/lyx and copy doc.tex over there, so
#latex doc.tex
<<Much output follows>>
#bibtex doc
That will create /home/you/doc.bbl.
As far as pasting the .bbl file into the LaTeX file goes, here's how we
do that. (I'd suggest you NOT try this with the LyX file.) Open
/home/you/doc.tex and /home/you/doc.bbl in whatever text editor you
like. TeXShop will do. So will anything else that is a text editor. At
\bibliographystyle{/home/rgheck/files/texmf/bibtex/bst/base/heck}
\bibliography{/home/rgheck/files/bibtex/articles,/home/rgheck/files/
bibtex/books}
Delete (or comment out) these lines. Now paste the whole of the .bbl
file where those lines used to be. Save as /home/you/doc.new.tex.
#latex doc.new.tex
<<Much output follows>>
#latex doc.new.tex
<<Much less output follows>>
Yes, twice. The second time, as noted, much less output should appear.
In particular, you should not see a bunch of "undefined citation"
warnings, which you will see the first time. This should create
doc.new.dvi, which you can now view using whatever dvi viewer you wish.
Richard
I've got a .bib file and a .bst style file. A journal tells me to make
from these a .bbl file, so I can include (as a TeX inset?) the .bbl
file in my LyX document and/or cut and paste the .bbl file into the
TeX file. Any suggestions on how to make such a .bbl file? I know I
need to "run BibTeX on the .bib file," but I'm not sure how to do this
using TeXShop.
Any help would be appreciated.
Bruce
Bruce Pourciau
2006-07-18 20:10:39 UTC
Permalink
Post by Richard Heck
As far as pasting the .bbl file into the LaTeX file goes, here's how we
do that. (I'd suggest you NOT try this with the LyX file.)
As an experiment, I did try pasting the .bbl file into an ERT inset
of a small text LyX file, and this seemed to work. What reasons would
make you prefer a direct copy/paste into the exported .tex file? For
one thing, I could see advantages in keeping the BibTeX generated
bibliography in the LyX file, since that would make it easier to
revise the references if you had to. Are there other reasons?

Bruce

Loading...