2

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.

  • Welcome! 'Callow errors'? – cfr Sep 8 '17 at 1:28
  • 1
    apacite doesn't provide \footcite and it is not a core LaTeX macro. Hence, it is not defined, which is why LaTeX tells you that. Note: I'm guessing here. You didn't actually include the crucial part of the error message which tells you which sequence is undefined and on which line it occurs. Please always include the full text of error messages. – cfr Sep 8 '17 at 1:31
  • You could define it yourself to do whatever you want it to do. Or you could use a package or whatever which provides the macro. (Biblatex certainly does, but that means switching away from BibTeX which you may not wish to do.) – cfr Sep 8 '17 at 1:32
  • Note that you can either use one of the standard .bibs when asking a question which needs one or you need to include the require entry or entries, along with your .tex example in order for people to compile the code. – cfr Sep 8 '17 at 1:33
  • Thank you! I think the missing error message is one such callow mistake. I'll try and edit in, I think I understand what is missing. Likewise for .bib. – Marmitrob Sep 8 '17 at 1:52
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.