Sunday, August 31, 2014

LaTeX : Part - 3 :Working with BibTex

 


In this post we'll discuss on how to use bibtex in Latex environment. The BibTeX tool is typically used together with the LaTeX document preparation system. BibTeX makes it easy to cite sources in a consistent manner, by separating bibliographic information from the presentation of this information, similarly to the separation of content and presentation/style supported by LaTeX itself[1].

Requirement:
TeXnicCenter [link] (Many other alternatives can be use)
BibTeX package for IEEE transaction [link] (if require)

Steps:
  1. Open TeXnicCenter
  2. Open new tex document. (File -> New -> File...)
  3. Use \bibliographystyle{ieeetran} inside "document" like below code snippet
    1. \documentclass[10pt,journal,cspaper,compsoc]{IEEEtran}
    2. \IEEEoverridecommandlockouts
    3. \hyphenation{op-tical net-works semi-conduc-tor}
    4. \begin{document}
    5.  \bibliographystyle{ieeetran}
    6. .
    7. .
    8. << your content>>
    9. .
    10. .
    11. \bibliography{IEEEabrv,referencefile}
    12. \end{document}
  4. Insert \bibliography{IEEEabrv,referencefile} just before ending the document section.
  5. With in the document, you use \cite{label} to refer to a particular source. 
  6. Run the .tex file.**
 Example of a bib file (referencefile.bib)

@article{label1,
     title   = "abc",
     author  = "aaaa",
     journal  = "XYZ",
    volume  = "xx",
    number  = "xx",
    pages   = "xxxx",
    year   = "xxxx"
}

@inproceedings{label2,
  title   = "xxxx",
  author  = "XXXX",
  booktitle  = "xxxx",
  pages   = "xxx",
  year   = "yyyy",
  organization = "IEEE"
}

*Bibliography file must have extension ".bib" and must be created in the same folder where .tex file is created else you need to specify the path to bib file.
** Run the .tex file four time to reflect the modification on output file.

Advantages of BibTeX [source]

  1. All the references in BibTeX are stored in a plain text database with an extension ".bib". Once it is in the database, it can be used in any file.
  2. Consistency through out the paper is another major advantage.
  3. Only refereed sources will appear in the output file. For example, if there is a reference entry in the database with label {label-23}, and no where in the paper you use, then the entry in database will NOT appear in the output file.
  4. Same reference file can be used for many paper with different style. This is possible because of its modularity function. Here Presentation is independent to the content.



-Thank you


---