[Tex/LaTex] Adding numbers to the APA references

apa-styleapacitebibliographies

I need to use APA for my text, which I have now, but I also need my bibliography to be numbered [1] blabh blah, sorted as it is now (alphabetically).

     \documentclass[12pt,a4paper]{report}
     \usepackage{apacite}
     \bibliographystyle{apacite}


     \bibliography{referanser}

Does anyone know how to do this? (with Bibtex)
(my bibliography is referanser.bib)

Best Answer

Here's a way to do this with plain apacite (it won't work if you use the [natbibapa] option; that would require a different method.)

You can adjust the two lengths \bibleftmargin and \bibindent to your liking. For example, if you don't need the hanging indent, you can set \bibleftmargin to 2.5em and \bibindent to 0em.

You can change the formatting of the number itself by changing the definition of \thebibcount:

\renewcommand{\thebibcount}{\arabic{bibcount}.}  % puts dot after it
\renewcommand{\thebibcount}{[\arabic{bibcount}]} % put number in [ ]

Here's a complete example:

\documentclass[12pt]{article}
\begin{filecontents}{\jobname.bib}
@book{Ansoff2007,
address = {London},
author = {Ansoff, H. Igor},
edition = {Classic Ed},
isbn = {978-0-230-52548-1},
pages = {272},
publisher = {Palgrave Macmillan UK},
title = {{Strategic Management}},
year = {2007}
}

@article{Webster2002,
    Author = {Webster, Jane and Watson, Richard T},
    Journal = {Source: MIS Quarterly},
    Keywords = {WA},
    Number = {2},
    Title = {{Analyzing the Past to Prepare for the Future: Writing a Literature Review}},
    Url = {http://www.jstor.org/stable/4132319},
    Volume = {26},
    Year = {2002},
}
\end{filecontents}

\usepackage{apacite}
\usepackage{etoolbox}
\makeatletter
\newcounter{bibcount}
\renewcommand{\thebibcount}{\arabic{bibcount}.} % format number
\patchcmd{\@lbibitem}{\item[}{\item[\stepcounter{bibcount}{\hss\llap{\thebibcount}\quad}}{}{}
\setlength{\bibleftmargin}{5em}
\setlength{\bibindent}{-2em}

\makeatother


\begin{document}
\section{Section}
Cite:               \cite{Ansoff2007} \\
Cite page:          \cite[p. 5]{Webster2002} \\
\bibliographystyle{apacite}

\bibliography{\jobname}
\end{document}

output of code

Related Question