# Beamer citation footnote: Adding *note* to citation

This is a follow-up question (see this question too for another follow-up question).

From the accepted answer, when I try to add note [not sure what the proper terminology is] to the citation (as in \cite[page 0]{mybibitem}), I observe that the note appears twice (see minimal working example below):

\documentclass{beamer}
\usepackage[style=numeric,citecounter=true,citetracker=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
year = {1313},
}
\end{filecontents*}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
citecolor=red,
%   backref=true
}

\usepackage{algorithm}
\PassOptionsToPackage{noend}{algpseudocode}% comment out if want end's to show
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\usepackage{algorithmicx}

\let\svthefootnote\thefootnote

\makeatletter
% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}%
{%
\ifciteseen{}{%
\usebibmacro{citeindex}%
\let\thefootnote\relax%
\footnotetext{%
\blx@anchor
\mkbibbrackets{\usebibmacro{cite}}%
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
\newunit%
\printfield[]{year}%
}%
\let\thefootnote\svthefootnote%
}%
\autocite{\thefield{entrykey}}%
}
{\usebibmacro{postnote}}
\makeatother

\begin{document}

\begin{frame}{What I found}
\end{frame}

\begin{frame}{Again}
\end{frame}

\end{document}


Here are the screen-shots (see the duplication of the notes):

How can I get rid of the duplication?

You should remove the prenote and postnote parts, and perhaps the associated punctation, in your definition of \cite as the \autocite call will take care of these:

\documentclass{beamer}
\usepackage[style=numeric,citecounter=true,citetracker=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
year = {1313},
}
\end{filecontents*}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
citecolor=red,
%   backref=true
}

\usepackage{algorithm}
\PassOptionsToPackage{noend}{algpseudocode}% comment out if want end's to show
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\usepackage{algorithmicx}

\let\svthefootnote\thefootnote

\makeatletter
% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\cite}
{}%
{%
\ifciteseen{}{%
\usebibmacro{citeindex}%
\let\thefootnote\relax%
\footnotetext{%
\blx@anchor
\mkbibbrackets{\usebibmacro{cite}}%
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
\newunit%
\printfield[]{year}%
}%
\let\thefootnote\svthefootnote%
}%
\autocite{\thefield{entrykey}}%
}
{}
{}
\makeatother

\begin{document}

\begin{frame}{What I found}
\end{frame}

\begin{frame}{Again}
\end{frame}

\end{document}


I have also removed the \addsemicolon\space, but you might want to retain this, it is the punctuation between multiple citations in the same call of \cite: \cite{one,two}.

In your comments you asked for removing the year from the output in the footnote. All you need to is remove the corresponding lines from the new cite command:

\makeatletter
\DeclareCiteCommand{\cite}
{}%
{%
\ifciteseen{}{%
\usebibmacro{citeindex}%
\let\thefootnote\relax%
\footnotetext{%
\blx@anchor
\mkbibbrackets{\usebibmacro{cite}}%
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
}%
\let\thefootnote\svthefootnote%
}%
\autocite{\thefield{entrykey}}%
}
{}
{}
\makeatother


• Probably a stupid question, but how can I remove the year field from the bibliography? – hola Jun 7 '19 at 3:16
• You can either delete the year line from the entry in the bib file, or you can dynamically delete this for all @online entries via \DeclareSourcemap{\maps[datatype=bibtex]{\map{\pertype{online}\step[fieldset=year,null]}}} – Andrew Swann Jun 7 '19 at 6:54
• The second approach seems tangential to my head :-). Can we do something like deleting \newunit% and \printfield[]{year}%? – hola Jun 7 '19 at 22:58
• Yes, if you just want to remove it from that output of the citation command; but this won't affect the bibliography that you asked about. – Andrew Swann Jun 8 '19 at 8:26
• OK, I mistyped the question... I wanted to remove the year from output of the citation command (so that year is not printed where the information on the cited entry is printed). – hola Jun 8 '19 at 16:02

Here's an answer from the user samcarter (who is apparently suspended from this site):

\documentclass{beamer}
\usepackage[style=numeric,citecounter=true,citetracker=true]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{myreferences.bib}
year = {1313},
}
\end{filecontents*}

%https://tex.stackexchange.com/a/165016/38244
\hypersetup{
citecolor=red,
%   backref=true
}

\usepackage{algorithm}
\PassOptionsToPackage{noend}{algpseudocode}% comment out if want end's to show
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\usepackage{algorithmicx}

\let\svthefootnote\thefootnote

\makeatletter
% https://tex.stackexchange.com/a/29931/38244
\DeclareCiteCommand{\cite}
{\usebibmacro{prenote}}%
{%
\ifciteseen{}{%
\usebibmacro{citeindex}%
\let\thefootnote\relax%
\footnotetext{%
\blx@anchor
\mkbibbrackets{\usebibmacro{cite}}%
\printnames{labelname}%
\setunit{\labelnamepunct}
\printfield[citetitle]{title}%
\newunit%
\printfield[]{year}%
}%
\let\thefootnote\svthefootnote%
}%
\autocite{\thefield{entrykey}}%
}
{}
{}
\makeatother

\begin{document}

\begin{frame}{What I found}