# References or Bibliography Made Easy with LaTeX :

Posted on February 28, 2013

In this tutorial, we will learn how to easily insert a bibliography within your LaTeX document.

1) Create an empty LaTeX document and call it : paper.tex

2) Create another empty text file and call it : mybib.bib

[info] The Extension of the file should be .bib [/info]

3) Let’s open your latex file paper.tex with your Latex Editor ( TexNicCenter, Kile, TexWorks …)

4) Type the following latex code into your article :

\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{amsmath,times}
\usepackage{graphicx}
\usepackage{tabularx}

\begin{document}
\title{The title of your article here....}
\author{I. Bouchrika \ A. Another \\
University of ABC \\
Country, post code}
\date{}
\maketitle
\begin{abstract}
This is the text for my abstract .....
This is the text for my abstract .....
\end{abstract}

\section{introduction}
the introduction here as  \cite{kale2005adaptive} have shown
that a and b ...

\bibliographystyle{plain}
\bibliography{mybib}

\end{document}

Looking at the end of the document, there are two magic lines which are :

\bibliographystyle{plain} : This is for the styling of the references and can take various arguments including : plain , ieeetr , acm , IEEE , alpha …..
\bibliography{mybib} : This is where you tell Latex about your bibliography file ( mybib.bib )

[info] The bibliography file should contain records of the references formated in a special way as shown below [/info]

5) Open your bibliography file (mybib.bib) using any text editor such as TexNicCenter, WordPad, Notepad++, Kate ..BUT NOT MS WORD

6) Type in the following into your mybib.bib file:

@article{kale2005adaptive,
title={An adaptive hysteresis band current controller for shunt active power filter},
author={Kale, Murat and Ozdemir, Engin},
journal={Electric power systems research},
volume={73},
number={2},
pages={113--119},
year={2005},
publisher={Elsevier}
}

@inproceedings{marques1998comparison,
title={A comparison of active power filter control methods in unbalanced and non-sinusoidal conditions},
author={Marques, GD},
booktitle={Industrial Electronics Society, 1998. IECON'98. Proceedings of the 24th Annual Conference of the IEEE},
volume={1},
pages={444--449},
year={1998},
organization={IEEE}
}

We have two references here!. Each entry begins with the declaration of the reference type, in the form of @type. BibTeX knows of practically all types you can think of, common ones such as @book, @article, and for papers presented at conferences, there is @inproceedings, etc. ( Most of the time, you will be using @article, @book only ).

After the type, you must have a left curly brace ‘{‘ to signify the beginning of the reference attributes. The first one follows immediately after the brace, which is the citation key. This key must be unique for all entries in your bibliography. It is with this identifier that you will use within your document to cross-reference it to this entry.
7) Look at the command : \cite{kale2005adaptive} inside the LaTex article ? This command will cross-reference the record inside your bibliography file which has the citation key : kale2005adaptive

The output of the file should be as shown below: