[Tex/LaTex] \footcite command generates errors

bibliographiesbibtex

I am trying to use BibTeX to generate references for a paper. I can just about get it to cite as I want using the \cite command. But I would like the references to be below the text. I have attempted to use the \footcite command, but this produces the following error "! Undefined control sequence. l.74 …Generic text.\footcite
[{pp.~20-1.}]{ref… The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., \hobx'), typeI' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined."

In abbreviated form my code is like this:

\documentclass[11pt]{article}
\usepackage{fullpage}  
\renewcommand{\baselinestretch}{1.5}
\usepackage[hang]{footmisc}
\setlength\footnotemargin{10pt}
\usepackage[natbibapa]{apacite}
\bibliographystyle{apacite}
\begin{document}
Generic text.\footcite{ref}
\bibliography{QPbib}
\end{document}

Bib is like this:

@article{ref,
Author = {Garth Marenghi},
Date-Added = {2017-09-07 18:04:40 +0000},
Date-Modified = {2017-09-07 18:05:14 +0000},
Journal = {Expertise},
Number = {4},
Pages = {208},
Title = {Darkplace},
Volume = {38},
Year = {1988}}

(I have included the footnote margin commands in case these are part of what is generating the problem. Likewise for \baselinestretch. I was originally using the setspace package but this generated errors that I will be asking about in a separate question.)

Thank you for your help and apologies for my no doubt callow errors.

Best Answer

Here's one possible way you might define \footcite. If you want something different, just substitute the relevant citation command from apacite.

\begin{filecontents}{\jobname.bib}
@article{ref,
Author = {Garth Marenghi},
Date-Added = {2017-09-07 18:04:40 +0000},
Date-Modified = {2017-09-07 18:05:14 +0000},
Journal = {Expertise},
Number = {4},
Pages = {208},
Title = {Darkplace},
Volume = {38},
Year = {1988}}
\end{filecontents}
\documentclass[11pt]{article}
\usepackage{xparse}
\usepackage{fullpage}
\renewcommand{\baselinestretch}{1.5}
\usepackage[hang]{footmisc}
\setlength\footnotemargin{10pt}
\usepackage[natbibapa]{apacite}
\bibliographystyle{apacite}
\NewDocumentCommand\footcite{ O{} O{} m }{%
  \footnote{\citet[#1][#2]{#3}.}%
}
\begin{document}
Generic text.\footcite{ref}
\bibliography{\jobname}
\end{document}

possible footnote citation format