Friday, June 8, 2012

LaTeX Bibliography with TeXstudio

TeXstudio (formerly TexMakerX, is an integrated environment for writing LaTeX documents. When you get a paper, there is normally the citation for that paper in BibTeX style. You can save the BibTeX entry for each paper in a BibTeX database file that has .bib file extension. In TeXstudio, it is also easy to create a BibTeX entry yourself. For example, create a new BibTeX database file, Ref1.bib and click bibliography menu. Thereafter, you can choose the command for your paper type. Both the required fields and optional fields will be inserted. If you want to clear the optional fields, you can click the clean command. The easiest way is to use BibTeX insert dialog ... as shown in the following figure.

When the new BibTeX entry dialog appears, you can fill the fields you want and click OK. When you filled the author names, they must be separated by the word and. Create a new TeX file, e.g. TestBibTex.tex, and you can use the database as follows. In this example the popular style, ieeetr, is used so that the references will be numbered in order of appearance. The database file, Ref1.bib, that you created is included using \bibliography{Ref1}.

Normally, you need to run LaTeX several times as shown in the following steps to produce the proper output. (you need to have MiKTeX or TeX Live software installed in your computer.) If you use pdflatex, run
Step 1. pdflatex
Step 2. bibtex
Step 3. pdflatex
Step 4. pdflatex
as shown in the following figure. Another good thing about TeXstudio is that you just need to press 'F1' for Quick Build only one time and it will carry out everything to produce the final pdf output. If you want author-year style citation, you can use \usepackage{natbib} as shown in the following figure.

The example files can be downloaded in the following links.
Using a software for management is more convenient and JabRef Reference Manager is a good one.

No comments:

Post a Comment

Comments are moderated and don't be surprised if your comment does not appear promptly.