 |
 |
Help with BibTeX and TeXShop
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
I've been trying to get BibTeX working with TeXShop but I just can't find the directions on what it is supposed to do, much less how to do it.
Can anyone explain how I go from a BibTeX database file to using it to create a bibliography in a TeXShop document, and having citations? There is some mention that they "link", but no documentation on how to do anything.
Again, I have the bibliography entries in a BibTeX file, and I have a LaTeX document in TeXShop. How do I add the bibliography into the file somewhat automatically so that I can manage them with BibTeX and they will be generated in the TeXShop document. Anyway?
|
|
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2001
Location: Bolton, UK
Status:
Offline
|
|
1. Put the citations in your .tex file in the form \cite{<key>}. Papers you have not cited will not appear in the bibliography.
2. Put \bibliography{<bibfilename>} in your .tex file where you want the bibliography to appear. Make sure the .bib file is somewhere that latex can find it, such as the same folder as the .tex file.
3. Run latex then bibtex then latex then latex again, all on your .tex file (actually you run bibtex on the .aux file, but texshop does this for you).
Check the results.
For more details, see appendix B of the latex book, or chapter 13 of the latex companion.
Barney.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by barney ntd:
<STRONG>1. Put the citations in your .tex file in the form \cite{<key>}. Papers you have not cited will not appear in the bibliography.
2. Put \bibliography{<bibfilename>} in your .tex file where you want the bibliography to appear. Make sure the .bib file is somewhere that latex can find it, such as the same folder as the .tex file.
3. Run latex then bibtex then latex then latex again, all on your .tex file (actually you run bibtex on the .aux file, but texshop does this for you).
Check the results.
For more details, see appendix B of the latex book, or chapter 13 of the latex companion.
Barney.</STRONG>
Thanks Barney. I acutally followed what you said to the letter and it worked perfectly. Shouldn't it be a bit less redundant? I'm sure they'll fix it in the future.
Now, is there a way to have the bibliography print the entire database instead of only those entries that are cited? There are many sources that I've consulted but that I don't want to explicitly quote on the text. I can't find that option.
Also, how do I change the format shown in the output from the [1] to something more like (Lastname:97) ? I"m using the {plain} bib style and it looks too complex for me to hack it.
|
|
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2001
Location: Bolton, UK
Status:
Offline
|
|
To put an uncited reference in the bibliography, use \nocite{<key>} anywhere in the .tex file. To put everything in, use \nocite{*}. The idea is that all your references can be in one .bib file, and only those which you need for this paper get included.
To change the way references look, use \bibliographystyle{<bstfilename>}. If you have installed teTeX, there will be lots of .bst files in teTeX/share/texmf/bibtex/bst/. Try them all; if there isn't one you like, you'll have to write your own, which is not that easy. You should really use the one recomended by your publisher.
There are also certain packages (.sty files) which alter the way references appear, and some of the bibliography styles have packages which go with them. Look in teTeX/share/texmf/tex/latex for .sty files, or get hold of a copy of the latex companion, which describes lots of them.
The reason for the redundancy is in the way latex works. The first run of latex puts all the \cites into the .aux file. Bibtex reads the .aux file, and creates a .bbl file containing the actual bibliography. The second run of latex inserts the .bbl file into your paper, and puts the references into the .aux file. The final run of latex gets the cross-references right.
This means that you only need to run bibtex again if you change which papers you cite. If you add or remove citations, you have to go through the latex, bibtex, latex, latex business again, but otherwise you just run latex as normal (sometimes twice if cross-references have changed). You can look at the .bbl file to see the latex source for your bibliography, and even edit it if you like, though it will get overwritten if you run bibtex again.
Barney.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Oct 2000
Status:
Offline
|
|
Originally posted by barney ntd:
<STRONG>To put an uncited reference in the bibliography, use \nocite{<key>} anywhere in the .tex file. To put everything in, use \nocite{*}. The idea is that all your references can be in one .bib file, and only those which you need for this paper get included.
To change the way references look, use \bibliographystyle{<bstfilename>}. If you have installed teTeX, there will be lots of .bst files in teTeX/share/texmf/bibtex/bst/. Try them all; if there isn't one you like, you'll have to write your own, which is not that easy. You should really use the one recomended by your publisher.
There are also certain packages (.sty files) which alter the way references appear, and some of the bibliography styles have packages which go with them. Look in teTeX/share/texmf/tex/latex for .sty files, or get hold of a copy of the latex companion, which describes lots of them.
The reason for the redundancy is in the way latex works. The first run of latex puts all the \cites into the .aux file. Bibtex reads the .aux file, and creates a .bbl file containing the actual bibliography. The second run of latex inserts the .bbl file into your paper, and puts the references into the .aux file. The final run of latex gets the cross-references right.
This means that you only need to run bibtex again if you change which papers you cite. If you add or remove citations, you have to go through the latex, bibtex, latex, latex business again, but otherwise you just run latex as normal (sometimes twice if cross-references have changed). You can look at the .bbl file to see the latex source for your bibliography, and even edit it if you like, though it will get overwritten if you run bibtex again.
Barney.</STRONG>
Great! This helped out a lot. I actually understand how it works and even managed to get it working. It's not hard, though it should be simpler.
Btw, for anyone else that reads this and wants to format their own .bst file: there is a "script" that takes you step by step on each of the format options and creates a .bst file exactly how you want it. You can specify little details such as where the publisher and date go, if there are commas after the titles, how the authors' names get displayed, etc.
It's called custom-bib and you can find instructions on how to use it here: custom-bib instructioins
Note that the page is geared for users of SWP, but custom-bib requires only a TeX installation (such as LaTeX).
The instructios are also found in the ReadMe file found in the custom-bib package itself.
Get the package here: custom-bib tar file from this page (sorry, ubb code is not working well):
URL=http://www.ctan.org/getfile/?filename=macros/latex/contrib/supported/custom-bib/&preferredCTAN=ctan.unsw.edu.au&action=/tools/filesearch&catstring=macros/latex/contrib/support ed/custom-bib/
Thanks to all those above who helped out.
edit: looks like ubb code is not working right.
[ 04-17-2002: Message edited by: Brazuca ]
|
|
"It's about time trees did something good insted of just standing there LIKE JERKS!" :)
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|