4

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.

percusse
  • 157,807
  • 1
    See: http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management or every introduction of LaTeX – Marco Daniel Mar 10 '13 at 10:49
  • I couldn't understand it. – Josh Pinto Mar 10 '13 at 10:51
  • 1
    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 want to have a nice and simply phrased guide as to how to do referencing with bibtex for APA and Oxford styles so that I can implement it in my documents. I would also appreciate a few examples of how to do it because I find examples fit my learning style better. – Josh Pinto Mar 10 '13 at 10:56
  • 3
    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 [tag:apa-style] and [tag:bibtex] for possible use cases. – percusse Mar 10 '13 at 10:57
  • .bib files follow a style-agnostic text-based format, so you only need to write a plain text file which complies with the spec, or use one of the GUI tools available for the task, e.g, JabRef. The style will be determined according to the \bibliographystyle setting in your .tex file. – Paulo Cereda Mar 10 '13 at 11:06
  • 2
    One starting point is http://tex.stackexchange.com/questions/63852/question-mark-instead-of-citation-number – Andrew Swann Mar 10 '13 at 11:24
  • 2
    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

1 Answers1

3

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}

\addbibresource{mybib.bib}

\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

screenshot

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}

\addbibresource{mybib.bib}

\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
cmhughes
  • 100,947