[Tex/LaTex] Customization of \footcite in Beamer

beamerbiblatex

I'm trying to customize the appearance of citation in footnotes in a Beamer presentation. I want them on a personal format (Last Name, Initial of first name, Journal and Year) in tiny fontsize and italics.

I've almost succeeded combining tips from Stackexchange as I'm not an expert of biblatex but I'm stuck with two remaining things:

  • the dot before the citation

  • the first name in capital letters

Here is my MWE

\documentclass{beamer}
\usepackage[french]{babel}
\usepackage{filecontents}

\begin{filecontents}{jobname.bib}
@article{testArt,
 AUTHOR = {Author, Aa},
  TITLE = {A long title illustrating the need to remove the title from footnote citations, at least in Presentations},
JOURNAL = {Lorem Ipsum Stud.},
 VOLUME = {15},
  PAGES = {1--20},
   YEAR = {1999},
    URL = {https://math.stackexchange.com},
}
@Article{fakearXiv,
     AUTHOR = {Buthor, Bb},
      TITLE = {Not a real arXiv article},
      JOURNAL = {Lorem Ipsum Stud.},
 VOLUME = {15},
  PAGES = {1--20},
   YEAR = {1999},
    URL = {https://math.stackexchange.com},
}
\end{filecontents}

\usepackage[style=authoryear,backend=bibtex, firstinits=true]{biblatex}

\addbibresource{jobname.bib}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {%
   %\setunit{\addnbspace}
   \printnames{author}%
       %\setunit{\labelnamepunct}
   \printfield{journaltitle}{}
   %\newunit
   \printfield{year}}
  {\addsemicolon\space}
 {\usebibmacro{postnote}}

  \newcommand\footnotenonum[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{\itshape#1}}
\let\footnotesize\tiny

\makeatletter
\renewrobustcmd{\blx@mkbibfootnote}[2]{%
  \iftoggle{blx@footnote}
    {\blx@warning{Nested notes}%
     \addspace\mkbibparens{#2}}
    {\unspace
     \ifnum\blx@notetype=\tw@
       \expandafter\@firstoftwo
     \else
       \expandafter\@secondoftwo
     \fi
       {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
       {\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
\makeatother


\begin{document}
\begin{frame}
  \frametitle{essai}
  \footcite{testArt}
  \footcite{fakearXiv}
\end{frame}
\end{document}

I'm aware that my code is probably not efficient enough (and not clean enough) but that's all I got… enter image description here

Best Answer

  • Our biblatex expert @moewe recommends in his comment the following definition of \footcite:

    \DeclareCiteCommand{\footcite}[\mkbibfootnote]
      {\usebibmacro{prenote}}
      {\printnames[family-given]{labelname}%
       \newunit
       \printfield{journaltitle}%
       \newunit
       \printlabeldateextra}
      {\addsemicolon\space}
      {\usebibmacro{postnote}}
    
  • The French language module for biblatex automatically sets family names in small caps, that can be turned off with

    \DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
    

    See also Keep lowercase in biblatex

  • To change the size and font shape of the footnotes, you can simply set the corresponding beamer font:

    \setbeamerfont{footnote}{size=\tiny,shape=\itshape}
    
  • To get unnumbered footnotes, you can redefine the footnote template:

    \setbeamertemplate{footnote}{%
      \parindent 1em\noindent%
      \raggedright
      \insertfootnotetext\par%
    }
    
  • please also note that firstinits is deprecated and should be replaces by giveninits.


\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{csquotes}
\usepackage{lmodern}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{testArt,
 AUTHOR = {Author, Aa},
  TITLE = {A long title illustrating the need to remove the title from footnote citations, at least in Presentations},
JOURNAL = {Lorem Ipsum Stud.},
 VOLUME = {15},
  PAGES = {1--20},
   YEAR = {1999},
    URL = {https://math.stackexchange.com},
}
@Article{fakearXiv,
     AUTHOR = {Buthor, Bb},
      TITLE = {Not a real arXiv article},
      JOURNAL = {Lorem Ipsum Stud.},
 VOLUME = {15},
  PAGES = {1--20},
   YEAR = {1999},
    URL = {https://math.stackexchange.com},
}
\end{filecontents}

\usepackage[style=authoryear,giveninits=true,uniquename=init]{biblatex}

\addbibresource{\jobname.bib}

\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\printnames[family-given]{labelname}%
   \newunit
   \printfield{journaltitle}%
   \newunit
   \printlabeldateextra}
  {\addsemicolon\space}
  {\usebibmacro{postnote}}

\makeatletter
\def\@makefnmark{}
\makeatother      

\setbeamerfont{footnote}{size=\tiny,shape=\itshape}

\setbeamertemplate{footnote}{%
  \parindent 1em\noindent%
  \raggedright
  \insertfootnotetext\par%
}

\begin{document}
\begin{frame}
  \frametitle{essai}
  \footcite{testArt}
  \footcite{fakearXiv}
\end{frame}
\end{document}

enter image description here