# What Program do I need to write .bib files and how do I use their contents in my bibliography?

What Program do I need to write .bib files and how do I use their contents to create my bibliography with the help of the additional input of my bst file which I downloaded from http://ftp.math.utah.edu/pub//tex/bibtex/apa.bst (APA style)?

I am running Ubuntu 12.10 if it is relevant.

-
See: en.wikibooks.org/wiki/LaTeX/Bibliography_Management or every introduction of LaTeX –  Marco Daniel Mar 10 '13 at 10:49
I think the repeating of the linked article can't be the aim. What is your main issue? A bib file can be created by every editor. –  Marco Daniel Mar 10 '13 at 10:54
I think you need to be introduced to how BibTeX and LaTeX interacts. This is also not related to how you keep your bibliography database file wit the extension .bib. The quickest way to try out is JabRef. It's fairly easy to populate a database with it and you don't need any TeX knowledge to obtain a .bib file. If you alredy have a .bib file then you can look at the questions tagged with apa-style and bibtex for possible use cases. –  percusse Mar 10 '13 at 10:57
One starting point is tex.stackexchange.com/questions/63852/… –  Andrew Swann Mar 10 '13 at 11:24
If this is your "first learning" of bibliographies in LaTeX, then I'd recommend you go the path of BibLaTeX, not BibTeX, which is showing its age. BibLaTeX does have an APA style. –  Brent.Longborough Mar 10 '13 at 13:30

Let's demonstrate how you can achieve this with biblatex, which comes with in-built support for APA style; technically, we'll actually be using biber, which is a 'backend bibliography processor for biblatex'

We will have the following files in the same directory

myfile.tex

\documentclass{article}

\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\begin{document}

\begin{itemize}
\item \verb!\cite! \cite{Ab_Steg}
\item \verb!\textcite! \textcite{Ab_Steg}
\item \verb!\parencite! \parencite{Ab_Steg}
\end{itemize}

\printbibliography

\end{document}


mybib.bib

@BOOK{Ab_Steg,
author = "M. Abramowitz and I. A. Stegun",
title = {Handbook of mathematical functions},
publisher = "Dover publications",
year = "1965",
language="English" }


To compile this, you run

pdflatex myfile
biber myfile
pdflatex myfile
pdflatex myfile


note that each command doesn't have an extension- if you wanted to, you could use the extensions

pdflatex myfile.tex
biber myfile.bcf
pdflatex myfile.tex
pdflatex myfile.tex


This gives the following output

To facilitate this process we can use the excellent arara automation tool to help- we can change myfile.tex to include the following lines

% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
\documentclass{article}

\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\begin{document}

\begin{itemize}
\item \verb!\cite! \cite{Ab_Steg}
\item \verb!\textcite! \textcite{Ab_Steg}
\item \verb!\parencite! \parencite{Ab_Steg}
\end{itemize}

\printbibliography

\end{document}


which gives

  __ _ _ __ __ _ _ __ __ _
/ _ | '__/ _ | '__/ _ |
| (_| | | | (_| | | | (_| |
\__,_|_|  \__,_|_|  \__,_|

Running PDFLaTeX... SUCCESS
Running Biber... SUCCESS
Running PDFLaTeX... SUCCESS
Running PDFLaTeX... SUCCESS

-
For APA, it is better to use biblatex-apa (which requires biber): the authoryear style is not meant to be an implementation of the strict APA requirements. Also, newer versions of biblatex encourage the use of \addbibresource{<bibfile>.bib} over the deprecated use of \bibliography{<bibfile>}. –  jon Mar 10 '13 at 20:15
I ran PDFLaTeX and received the error: ! LaTeX Error: File biblatex.sty' not found. –  Brenton Horne Mar 10 '13 at 20:54
@jon thanks for the corrections- I have updated with your feedback. –  cmhughes Mar 10 '13 at 22:54
@BrentonHorne are you using the texlive from the repositories? If so, please see How to install "vanilla" TeXLive on Debian or Ubuntu? and also How do I update my TeX distribution? –  cmhughes Mar 10 '13 at 22:54
@cmhughes -- No problem. A nice and complete answer. –  jon Mar 11 '13 at 1:57