[Tex/LaTex] Biblatex-apa: numbered, annotated bibliography using \fullcitebib

apa-styleapa6biblatex

EDIT #3: The code below has been updated to what I'm currently using, from the post at https://tex.stackexchange.com/a/91381/24264; note that I've added a field to my bibentry (annote) as part of this fix. I've decided to forgo adding the numbering, since it seems to be more trouble than it's worth, and my prof may end up seeing it as against APA style, anyway 🙂

EDIT #2: I arrived at a satisfactory fix for the issue from EDIT #1 (reflected in the code below), but I would still like the annotation(s) to line up with the numbered references—"Howlin" and the word "Annotations" in my example. Can anyone tell me how to accomplish this?

EDIT #1: @Guido was very helpful with my main question. At this point, I'm trying to insert a "References" page that mimics the vertical spacing of \printbibliography in the current document—and I've, again, run into a gap in my knowledge.

Original post: My goal is to create an annotated bibliography in APA format (for a term paper due in April). Up to now, my only experience with biblatex is the simple \printbibliography command. Having done some searching, I was looking to replicate the solution here, but I get no joy, even when I stick as closely as possible to Alan's original example; \fullcitebib itself works without a hitch, as long as Alan's code—starting with \newcounter{bibnum} and ending with {\end{thebibliography}}—is not present. When I insert the code block, I get the following errors at compile time:

! Undefined control sequence.
\blx@precode ...egin {thebibliography}\thebibitem
l.91 \fullcitebib{howlin04}

! LaTeX Error: Something's wrong--perhaps a missing \item.
See the LaTeX manual or LaTeX Companion for explanation.
...
l.91 \fullcitebib{howlin04}

My question (if you can call it a question, rather than a "please tell me how this is done") is why my MiKTeX seems to be behaving strangely—I don't have enough LaTeX knowledge to understand how \thebibitem is properly defined, and thus fix the problem.

Here is my minimal example:

\documentclass[man,12pt,noextraspace]{apa6}
\usepackage{filecontents}
\shorttitle{Cog paper}

\begin{filecontents}{cogsources.bib} 
@article{howlin04,
author = {Howlin, Patricia and Goode, Susan and Hutton, Jane and Rutter, Michael},
title = {Adult outcome for children with autism},
journal = {Journal of Child Psychology and Psychiatry},
volume = {45},
number = {2},
publisher = {Blackwell Publishing},
issn = {1469-7610},
url = {http://dx.doi.org/10.1111/j.1469-7610.2004.00215.x},
doi = {10.1111/j.1469-7610.2004.00215.x},
pages = {212--229},
keywords = {Autistic disorder, prognosis, adulthood, follow-up studies},
year = {2004},
annote = {Annotations go here.},
}
\end{filecontents}

%% fontspec
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Times New Roman}

%% bibliography
\usepackage[canadian]{babel}
\usepackage{csquotes}
\usepackage[style=apa,backend=biber,sortcites=true,sorting=nyt,language=american]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{cogsources.bib}

%% annote
\renewbibmacro*{finentry}{%
  \iffieldundef{annotation}
    {\finentry}
    {\setunit{\finentrypunct\par\vspace{\bibitemsep}\nobreak}
     \printfield{annotation}%
     \finentry}}    

\begin{document}

\printbibliography
\nocite{howlin04}

\end{document}

Best Answer

The code in https://tex.stackexchange.com/a/13655/24264 must modified as follows: \thebibitem must be replaced with \item. Here is the resulting code

\newcounter{bibnum}
\DeclareCiteCommand{\fullcitebib}
  {\renewenvironment*{thebibliography}
  {\list
     {\stepcounter{bibnum}\thebibnum.\ }
     {\setlength{\leftmargin}{1.65\bibhang}
      %
      \setlength{\itemindent}{-\bibhang}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  \renewcommand{\finalnamedelim}{\ifnum\value{liststop}>2 \finalandcomma\fi\addspace\&\space}%
  \begin{thebibliography}\item}
  {\usedriver
    {\DeclareNameAlias{sortname}{default}}
    {\thefield{entrytype}}\finentry}
  {\item}
  {\end{thebibliography}}