1

I am adding references in slides created using beamer.Following the post in this link I made a few modifications. The line that appears in the footnote stops in the middle of the frame. How do we extend it until the end of the frame/ how to remove the line?

\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\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},
    Publisher = {University of Pennsylvania Press},
    Title = {Sociolinguistic Patterns},
    Year = {1972}}

\end{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}
\usepackage{chngcntr}
\usepackage{subcaption}
\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}
\usepackage{graphicx}
\graphicspath{ {image/} }
\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\begin{figure}[ht]
  \centering
  \begin{subfigure}{\linewidth}
    \centering\includegraphics[width=4cm]{rabbit.png}
  \end{subfigure}%
  \begin{subfigure}{\linewidth}
    \centering\includegraphics[width=4cm]{rabbit.png}\footcite{Saussure1995}
  \end{subfigure}
\end{figure}
\begin{figure}
\includegraphics[scale=0.6]{image/image.png}
\caption{Steps }
\end{figure}
\end{frame}
\end{document}

Edit1: Also, for images how do we directly include the reference at the footnote without displaying the reference number next to the image. enter image description here Edit2: The size of the font in the footnote appears big. I tried reducing the size using \tiny \footcite{Saussure1995}. But this isn't reducing the font size. Any suggestions?

Edit3:Here is the code without \subcaption and without figure

\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\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},
    Publisher = {University of Pennsylvania Press},
    Title = {Sociolinguistic Patterns},
    Year = {1972}}

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

\counterwithin*{footnote}{page}
\newcommand\footcite[1]{\footnote{\bibentry{#1}}\label{\thepage:#1}}
\newcommand\secondcite[1]{\textsuperscript{\ref{\thepage:#1}}}
\usepackage{graphicx}
\graphicspath{ {image/} }
\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\includegraphics[width=.47\textwidth]{rabbit.png}\hfill
\includegraphics[width=.47\textwidth]{rabbit.png}\footcite{Saussure1995}
\vfill
\includegraphics[width=\textwidth,height=50pt]{image.png}
\includegraphics[scale=0.6]{image/image.png}
\caption{Steps }
\end{frame}
\end{document}

Edit5:

\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\begin{filecontents}{\jobname.bib}

@article{aguiree2013idf,
  title={IDF diabetes atlas},
  author={Aguiree, Florencia and Brown, Alex and Cho, Nam Ho and Dahlquist, Gisela and Dodd, Sheree and Dunning, Trisha and Hirst, Michael and Hwang, Christopher and Magliano, Dianna and Patterson, Chris and others},
  year={2013},
  publisher={International Diabetes Federation}
}

\end{filecontents}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}

\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\begin{figure}
\includegraphics[width=.47\textwidth]{image/rabbit.png}\hfill
\includegraphics[width=.47\textwidth]{image/rabbit.png}
\vfill
\includegraphics[width=\textwidth,height=50pt]{example-image}
\caption{Steps}
\end{figure}
\vfill
\footnotesize Image credit: \bibentry{aguiree2013idf}
\end{frame}
\end{document}

enter image description here An error is displayed while compiling the above, citation not found.

Natasha
  • 511
  • Adding \usepackage{subcaption} changes the orientation of the images – Natasha May 06 '18 at 05:38
  • If there is no number next to an image, how schould anyone know which image the footnote belongs to? – leandriis May 06 '18 at 07:22
  • Is there a better way to display the number? It appears to the right and doesn't appear like a citation. Any help would be appreciated. – Natasha May 06 '18 at 07:37
  • Will your subfigures have captions? If so you could include the citation there. If not, why do you use the subfigure environment? In your previous question you were shown how to position the images without using subfigure or figure. – leandriis May 06 '18 at 07:45
  • 1
    I can't compile your document if I load the subcaption package, are you sure about your ECM? Which compilation engine do you use? – AndréC May 06 '18 at 08:26
  • @AndréC someone edited what I had originally posted to include subcaption. I'm using sharelatex – Natasha May 06 '18 at 08:42
  • @leandriis I don't have captions for the subfigures. I have also included the code without subfigure or figure – Natasha May 06 '18 at 08:43
  • 1
    Apologies, I should have asked, and not just edited. Your original example doesn't work at all, because the subfigure environment isn't defined by any of the packages you had (you get ! LaTeX Error: Environment subfigure undefined.). subcaption does define an environment like that, used in the way you did, so I assumed that package was just missing. Edit: I see you do by accident get some reasonable output if you skip through that error, but the code is still wrong without subcaption. – Torbjørn T. May 06 '18 at 12:23
  • 1
    (By the way, as far as I know it's possible to ping users who have edited a post as well, not just other commenters, so I think if you'd used @TorbjørnT. in your first comment, I would have been notified of it.) – Torbjørn T. May 06 '18 at 12:47
  • @TorbjørnT. No issues and thank you very much for pointing out the mistakes that I have made. For some reason, I didn't face any problem in compiling the file with subfigure. – Natasha May 06 '18 at 12:52
  • 2
    I think ShareLaTeX by default runs in nonstopmode, meaning latex will skip past any errors and try to generate some output. But ShareLaTeX tells you that there are errors with the small red box with the number in it, next to the compile button (https://i.stack.imgur.com/TWddi.png). Whenever you get a red box like that there, you should click it to find out what the error is, and then try to find and fix it. – Torbjørn T. May 06 '18 at 12:57

1 Answers1

2

Instead of trying to remove the footnoterule and the footnotemark, why not manually placing the reference at the bottom of the frame?

Off-topic: but you cannot use \caption outside of a figure or table environment.

\documentclass[xcolor={table,dvipsnames,usenames}]{beamer}
\begin{filecontents*}{\jobname.bib}

@article{aguiree2013idf,
  title={IDF diabetes atlas},
  author={Aguiree, Florencia and Brown, Alex and Cho, Nam Ho and Dahlquist, Gisela and Dodd, Sheree and Dunning, Trisha and Hirst, Michael and Hwang, Christopher and Magliano, Dianna and Patterson, Chris and others},
  year={2013},
  publisher={International Diabetes Federation}
}

\end{filecontents*}
\usepackage{natbib}
\usepackage{bibentry}
\bibliographystyle{apalike}

\begin{document}
\nobibliography{\jobname}
\subsection{frame 6}
\begin{frame}{}
\begin{figure}
\includegraphics[width=.47\textwidth]{rabbit.png}\hfill
\includegraphics[width=.47\textwidth]{rabbit.png}
\vfill
\includegraphics[width=\textwidth,height=50pt]{example-image}
\caption{Steps}
\end{figure}
\vfill
\footnotesize Image credit: \bibentry{aguiree2013idf}
\end{frame}
\end{document}

enter image description here