Blog

Bibliography in Latex: Generating and using a *.bib file

posted Jul 15, 2013, 8:27 PM by Computandia Amir H. Meghdadi   [ updated Oct 28, 2013, 8:00 AM by Amir H. Meghdadi ]

The gadget spec URL could not be found
If you have a large list of references that you frequently cite in your publications, you already know how difficult it is to keep track of all your references and to cite them in your documents using a specified bibliography style. Using “Bibtex” for citing the references is the smart way of referencing in Latex. In this method, the required information for each and every reference is written in a plain text file named as a “bibfile”. 
Here you can read about how to create this file manually and how to use it in your latex document. More information can be found here. You can easily cite any of the references which are listed in your bibfile. I will explain everything you need to do in few steps.

Step 1Choosing a reference manager program.

The first step is to choose a reference manager program (lets call it RMP) to store and organize the citation information of all your references. RMP creates and manages a bibliography database and allows you to import/export citations to/from database. RMP will create your *.bib file that will be used in your document. If you don’t use an RMP, you have to create the bib file manually. Examples of RMPs are EndNoteRefWorks, or JabRef. I recommend JabRef especially since it is free. There is a comparison chart between RMPs in here.

Step 2Importing the citations into your reference manager program.

There is generally two ways in which you can add a reference to your bibliography database in RMP. The first way is to manually enter the required information such as author, journal title, publication year and so on. However, if you use databases such as Google ScholarIEEE XploreScience Direct or similar digital libraries to find your references, you can export the citation information from these libraries into a file and consequently import them into your RMP.

Step 3Exporting your citations (bibliography) into a bibtex file.

Export your bibliography database (or a selected number of references) into a text file with the *.bib extension (e.g myRefs.bib). Copy this file into your latex document directory. (Part C in the above figure).

Step 4Using your bibtex file in your latex file.

Use the following commands at the bottom of your latex source code where you need the references to appear. Replace plain with any other bibliography style file that is required (e.g. IEEE.bst).

\bibliographystyle{plain}	% (uses file "plain.bst")
\bibliography{myRefs}		% expects file "myRefs.bib"

Step 5How to cite the references when you write your paper.

Each entry in your RMP (or in your bibfile for that matter) has a label which is a unique key representing that particular reference. Inside your document, use the command

\cite{YourLabel}

to cite a reference with the label “Your label” and make it appear at the references section.

PS. Some useful external links

1.      IEEE bst (IEEE bibliography style file)
2.      Wibtex (A literature management program for bibtex files)
3.      BibTeX and bibliography styles (A short guide to BibTeX and bibliography styles)
4.      LaTeX Style and BiBTeX Bibliography Formats (An extensive guide to Bibtex formats and style files)
5.      BibTeX Style Examples (Examples of bibliography formats for some common style files)

numencl: Add a list of notations to your Latex document

posted Jul 15, 2013, 7:33 PM by Computandia Amir H. Meghdadi

In this post, I will explain how to use the package : numencl in Latex.

  1. You can find the package and its documentation here, if it is not already in your latex distribution:
  2. Add the following commands in your preamble:
    \usepackage{nomencl}
    \makenomenclature
    \renewcommand{\nomname}{List of Symbols}
  3. In your document, whenever you introduce a new symbol or variable, add the following command to introduce the new symbol (e.g. X)
    \nomenclature[]{$X$}{Explain here what does X mean}
  4. Use the following command wherever you need the list of symbols to appear in your document:
    \printnomenclature
  5. Download the makeindex executable file from CTAN website here into your document directory.
  6. Go to the command prompt in your directory and run the following command:
    makeindex hfilenamei.nlo -s nomencl.ist -o hfilenamei.nls
  7. Compile your file!

1-2 of 2