4

I'm having difficulties making a footnote style reference at the end of a beamer slide. In the MWE below, I have used the footcite command, as per References at the end of beamer slides However, the author of that post himself mentions that this is just a hack and will not work in all cases. In my specific case, I have exported my bibliography from Endnote to LaTeX as a text file (this is why I use bibliography{example.txt}). I cannot convert example.txt to example.bib via a manual file extension conversion for some reason (probably because information is lost during the conversion when it's done by hand by changing .txt to .bib). However, all entries of that text file are as they should be (i.e., all fields are present in the correct LaTeX formatting). What could be the problem?

\documentclass{beamer}

\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}

\bibliography{example.txt}

\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}

\begin{document}
Hello,World\footcite{Name2014}
\end{document}

P.S. I have tried creating my own custom text file with only one entry (as per References at the end of beamer slides):

@book{Saussure1995,
    Author = {Ferdinand de Saussure},
    Origyear = {1916},
    Publisher = {Payot},
    Title = {Cours de Linguistique G{\'e}n{\'e}rale},
    Year = {1995}}

And changing the footcite command to footcite{Saussure1995}. I have the exact same output produced as with the code block above, so clearly this is not a problem with my text file.

P.P.S. I have tried making a custom .bib file with just one entry with the following MWE below but I still get the same result:

\documentclass{beamer}

\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}

\bibliography{example2.bib}

\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}

\begin{document}
Hello,World\footcite{Saussure1995}
\end{document}
1

I'm not really sure I have understood what your problem is. However, here is a possible solution using biblatex (and there is no need to change the extension of the bibliography file from txt to bib).

\documentclass{beamer}

\usepackage[american]{babel}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\usepackage{chngcntr}

\DeclareCiteCommand{\footcite}
  [\mkbibfootnote]
  {}
  {\usedriver{}{\thefield{entrytype}}}
  {}
  {}

\addbibresource{apa-test-bib1.txt}

\counterwithin*{footnote}{page}

\begin{document}
\begin{frame}{}
Hello, World\footcite{Labov1972}

Hello, World\footcite{Saussure1995}
\end{frame}

\begin{frame}{}
Hello,World\footcite{Saussure1995}
\end{frame}

\end{document}

This produces the following output:

enter image description here

  • I'm not getting the full footnote citation below, I only get the footnote produced and the following text in bold-face: Saussure1995. Both my text file and .tex file are in the same directory. – warship Dec 30 '14 at 1:15
  • You have to compile with biber instead of bibtex (or alternatively, you can add backend=bibtex as one of the options of the biblatex package, i.e., \usepackage[style=apa,backend=bibtex]{biblatex} – Guido Dec 30 '14 at 1:17
  • \usepackage[style=apa,backend=bibtex]{biblatex} completely throws things off in the MWE above. – warship Dec 30 '14 at 1:20
  • Yes, biblatex-apa requires biber, just checked in its manual. – Guido Dec 30 '14 at 1:22
  • Any other suggestions? I'm not sure what to put in my MWE above to get it to work with biber and hopefully you can provide some alternatives (e.g., natbib). – warship Dec 30 '14 at 1:24
1

The package bibentry requires to have a \bibliography{<bib-file>} or \nobibliography{<bib-file>} after the \begin{document}.

Thus a simple MWE should be:

\documentclass{beamer}
\usepackage{filecontents}    
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}

% filecontents to make the MWE self-contained.
\begin{filecontents}{\jobname.bib}
@book{Saussure1995,
Author = {Ferdinand de Saussure},
Origyear = {1916},
Publisher = {Payot},
Title = {Cours de Linguistique G{\'e}n{\'e}rale},
Year = {1995}}

@book{Labov1972,
Address = {Philadelphia},
Author = {William Labov},
year = {1972},
Publisher = {University of Pennsylvania Press},
Title = {Sociolinguistic Patterns},
}
\end{filecontents}

\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}

\begin{document}
\nobibliography{\jobname}

\begin{frame}{Frame Title}
Hello,World \footcite{Labov1972}
\end{frame}

\end{document}  

resulting in

enter image description here

  • How are you getting this? When I replace apa-test-bib1 with the name of my own file, I just get a fatal error with no output whatsoever. Have you tested this code? Neither the bibliography{<bib-file>} nor the nobibliography{<bib-file>} options work. – warship Dec 30 '14 at 5:27
  • The screenshot has been created by compiling the MWE in the answer. So yes, it has been tested. Normal workflow: pdflatex <file> -> bibtex <file> -> pdflatex <file>. – Guido Dec 30 '14 at 5:38
  • Can you please post what your .bib entry looks like? It could be a problem with the entry formatting. – warship Dec 30 '14 at 5:46
  • You should test your bib file with a standard document. – Guido Dec 30 '14 at 5:54
1

Answering this question has been a real struggle (e.g., Putting a bibliography citation at bottom of beamer slide), here is a hack that I propose that I came up with thanks to a lot of trial and error (if someone could propose something else besides for this hack, I think that it would really help the community):

\documentclass{beamer}

\usepackage{biblatex}


\begin{document}
\begin{frame}
Hello,World\footfullcite{Write something here, anything you like}
\end{frame}
\end{document}

biblatex footnote hack

Please note that using \footcite in place of \footfullcite produces the same output.

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.