[Tex/LaTex] Perfect APA Style Bibliography

apa-stylebibliographies

I've been trying to tweak the bibliography style of my document for a while without success. I need to change the appearance of my bibliography to match exactly the requirements of APA Style, especially on the electronic references. As you can see in my document, I've included two websites, one without author and one with author. I am currently using the "apacite" package but is not giving me the results I want. Is there any way to mimic exactly the APA Style?

% APA Style template
\documentclass{llncs}

\usepackage[ngerman,british]{babel} 
\usepackage[british,ngerman]{babel} 
\usepackage[latin1,utf8]{inputenc}
\usepackage{microtype}
\usepackage[pdftex]{graphicx}    
\usepackage{hyperref} 
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage[export]{adjustbox}

% Citation styles
\usepackage{apacite}

\begin{document}
\title{Letzte Spiel hatten wir in Platz drei Spitzen: Elber, Jancka und dann Zickler}
\author{Jukka Bildmeister}
\institute{Zickler-Institut\\ \email{email@domain.com}}
\maketitle

\begin{abstract}
Die Schritte wurden lauter und lauter, er sah eine dunkle Gestalt um die Ecke biegen. Fieberhaft irrten seine Augen durch die nächtliche Dunkelheit und suchten einen Ausweg. Hatte einer seiner zahllosen Kollegen dieselbe Idee gehabt, ihn beobachtet und abgewartet, um ihn nun um die Früchte seiner Arbeit zu erleichtern? 
\end{abstract}

\section{Introduction}

%\subsection{First Subsection}
Er hörte leise Schritte hinter sich. Gerade jetzt, wo er das Ding seines Lebens gedreht hatte und mit der Beute verschwinden wollte! Hatte einer seiner zahllosen Kollegen dieselbe Idee gehabt, ihn beobachtet und abgewartet, um ihn nun um die Früchte seiner Arbeit zu erleichtern? Weil wir haben gesehen viele Male solche Spiel! Oder gehörten die Schritte \cite{middle} hinter ihm zu einem der unzähligen Gesetzeshüter dieser Stadt. Die Schritte wurden lauter und lauter, er sah eine dunkle Gestalt \cite{secular} um die Ecke biegen. Fieberhaft irrten seine Augen durch die nächtliche Dunkelheit und suchten einen Ausweg. War jetzt wirklich alles'' Danke. Offensiv, offensiv ist wie machen wir in Platz \cite{wallace}. 

\bibliographystyle{apacite}
\bibliography{bibliography}

\end{document}


%\bibliographystyle{apacite}
\bibliography{bibliography} 

\end{document}

Here's the external bibligraphy (.bib) file:

% This file was created with JabRef 2.9.2.
% Encoding: MacRoman

@ELECTRONIC{middlekid,
  author = {MiddleKid},
  title = {Re: {T}he Unfortunate Prerequisites and Consequences of Partitioning
    Your Mind},
  url = {http://scienceblogs.com/pharyngula/2007/01/the_unfortunate_prerequisites.php},
  date = {2007-01-22},
  entrysubtype = {Web log comment}
}

@ELECTRONIC{middle,
  author = {Simon Newman},
  year = {n.d.},
  title = {Religion in the Middle Ages},
  howpublished = {The Finer Times: War, Crime and History Resource},
  url = {http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html},
  bdsk-url-1 = {http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html},
  keywords = {religion,middle age},
  lastchecked = {July 4 2014}
}

@BOOK{wallace,
  title = {Religion: an anthropological view},
  publisher = {New York: Random House},
  year = {1966},
  author = {Anthony Wallace},
  keywords = {history,religion}
}

@ELECTRONIC{secular,
  year = {n.d.},
  title = {10 Countries That Have Secular Governments},
  howpublished = {Der Spiegel},
  url = {http://religion.answers.com/secularism/10-countries-that-have-secular-governments},
  bdsk-url-1 = {http://religion.answers.com/secularism/10-countries-that-have-secular-governments},
  keywords = {secular},
  lastchecked = {July 11 2014}
}

This is the result:

10 Countries That Have Secular Governments. (n.d.). Der Spiegel. Retrieved July 14, 2014, from http://religion.answers.com/secularism/10-countries-that-have-secular-governments

Newman, S. (n.d.). Religion in the Middle Ages. The Finer Times: War, Crime and History Resource. Retrieved July 4, 2014, from http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html

Wallace, A. (1966). Religion: an anthropological view. New York: Random House.

This is how it should look:

10 Countries That Have Secular Governments. (n.d.). Der Spiegel. Retrieved July 14, 2014, from http://religion.answers.com/secularism/10-countries-that-have-secular-governments

Newman, S. (n.d.). Religion in the Middle Ages. The Finer Times: War, Crime and History Resource. Retrieved July 4, 2014, from http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html

Wallace, A. (1966). Religion: an anthropological view. New York: Random House.

Best Answer

Here is your example formatted using biblatex-apa. As far as I know, this is a very accurate rendition of the current APA style. The one point of difference between your expected output and the actual output is the howpublished fields you have in your entries. Those fields do not get printed in the style as currently configured. The howpublished field is not a possible field for the @online entry type, but organization is, so I changed them to organization in my version of your .bib file, but this field is not printed in the biblatex-apa output. The only field that is currently part of the @online entry type in biblatex-apa is the addendum, which would be printed in parentheses after the URL. I've changed one bib item to show this.

It's not entirely clear to me what these fields are in your actual examples.

\documentclass{llncs}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@electronic{middlekid,
  author = {MiddleKid},
  title = {Re: {T}he Unfortunate Prerequisites and Consequences of Partitioning
    Your Mind},
  url = {http://scienceblogs.com/pharyngula/2007/01/the_unfortunate_prerequisites.php},
  date = {2007-01-22},
  entrysubtype = {Web log comment}
}
@electronic{middle,
    Author = {Simon Newman},
    Addendum = {The Finer Times: War, Crime and History Resource},
    Keywords = {religion,middle age},
    Urldate = {2014-07-04},
    Title = {Religion in the Middle Ages},
    Url = {http://www.thefinertimes.com/Middle-Ages/religion-in-the-middle-ages.html}
    }

@electronic{secular,
    Organization = {Der Spiegel},
    Keywords = {secular},
    Urldate = {2014-07-11},
    Title = {10 Countries That Have Secular Governments},
    Url = {http://religion.answers.com/secularism/10-countries-that-have-secular-governments}
    }

@book{wallace,
    Author = {Anthony Wallace},
    Keywords = {history,religion},
    Publisher = {New York: Random House},
    Title = {Religion: an anthropological view},
    Year = {1966}}
\end{filecontents*}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hyphens]{url}

\usepackage[ngerman,british]{babel} 
\usepackage{csquotes} 
\usepackage[style=apa,backend=biber]{biblatex}


\DeclareLanguageMapping{british}{british-apa}
\DeclareLabeldate{%
                 \field{date}
                 \field{eventdate}
                 \field{origdate}
                 \field{urldate}
                 \literal{n.d.}
}
\usepackage[breaklinks=true]{hyperref}
\addbibresource{\jobname.bib}
\begin{document}
This is a citation \textcite{middle,secular,wallace,middlekid}.
\sloppy % needed in this case to allow one long URL to break correctly
\printbibliography
\end{document}

output of code