4

I knew citations can be embedded as footnotes in biblatex using \footcite{}. I encountered an error ! Undefined control sequence. .

! Undefined control sequence.
l.7 \footcite

I tried to solve it by adding the package biblatex, but encountered another issue ! LaTeX Error: Command \bibhang already defined..

How do I embed citations into footnotes using natbib?


This question is not duplicated with What to do to switch to biblatex? as I am seeking for a solution of embedding citations into footnotes (I use the template latex using natbib from Cambridge for my thesis) without switching to biblatex (it raises other issues.).

  • Short answer (because of missing MWE): \footnote{\cite{…}}. Nevertheless, I would recommend to switch over from natbib to biblatex. This means you should remove loading natbib and use biblatex and biber instead (and also remove \bibliographystyle and replace \bibliography by \addbibresource and printbibliography). If you need natbib compatibility you can use option natbib. – Schweinebacke Mar 06 '17 at 11:22
  • 2
  • @Schweinebacke, any reason to switch to biblatex? – SparkAndShine Mar 06 '17 at 11:54
  • You want to use \footcite and biblatex provides \footcite. ;-) And have a look into http://tex.stackexchange.com/questions/25701/bibtex-vs-biber-and-biblatex-vs-natbib – Schweinebacke Mar 06 '17 at 11:59
  • To the best of my knowledge natbib does not have a \footcite equivalent. There is footbib, but I'm not even sure if its compatible with natbib. Other than that your best bet might be \footnote{\cite{...}} or a new command for that. Is there any special reason you have to use natbib and can't use biblatex? – moewe Mar 06 '17 at 13:28
  • @moewe, I use the latex template from Cambridge for my thesis and they use natbib. When I replace natbib with biblatex, it raises a lot of issues such as Incompatible package 'backref'. – SparkAndShine Mar 06 '17 at 13:31
  • Mhhh, OK. If you insist on using that template and that template insists on using natbib there is not a lot you can do. If footbib does not work for you, you need the manual approach. (Bear in mind that templates are rightfully seen critically on this site, so if you don't have to use that particular template, why not start from scratch with only the things you need and want?) – moewe Mar 06 '17 at 13:34
  • @moewe, I've just tried footbib and it raised ! Package footbib Error: the output routine of LaTeX changed.. Anyway, I simply use footnote{}. – SparkAndShine Mar 06 '17 at 13:42

1 Answers1

2

natbib does not provide commands for citations in footnotes out of the box.

You can certainly use \footnote{\cite{sigfridsson}} and you can create a command for that

\newcommand*{\footcite}[1]{\footnote{\cite{#1}}}

Though you might want to make it more sophisticated with handling for optional arguments if you intend to use it more often.

There used to be the footbib package, but according to egreg's comment on Footbib package error that is incompatible with more recent versions of LaTeX.

If you can't switch to biblatex (or jurabib) you will have to use the poor man's version I suggested above.

moewe
  • 175,683
  • By way of follow-up... I recently started working on an older document that uses natbib and this custom command is very helpful! That said, how can I adjust the command for citations that include the page number for a citation, i.e. \footcite[2]{sigfridsson}? – gravityflyer Sep 23 '22 at 20:03
  • @gravityflyer As I said, you need a more sophisticated approach. If you only care about one optional argument, something like \NewDocumentCommand{\footcite}{om}{\footnote{\IfNoValueTF{#1}{\cite{#2}}{\cite[#1]{#2}}}} works. If you want both, you need more involved logic. (In which case I suggest you ask a new question, as it gets a bit tricky writing the required code here in the comments.) – moewe Sep 25 '22 at 11:49
  • @moewe Thank you! Yes, will add a new question since the suggested code \NewDocumentCommand{\footcite}{om}{\footnote{\IfNoValueTF{#1}{\cite{#2}}{\cite[#1]{#2}}}} unfortunately isn't working for me. – gravityflyer Sep 25 '22 at 21:25
  • Update: Successfully amended the code and got it to be fully functional! For future users, updated code can be found here – gravityflyer Sep 26 '22 at 03:41