2

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

Guillaume
  • 321

1 Answers1

5
  • 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

  • For \footcite I would suggest https://gist.github.com/moewew/982ae890970a97f3bfc0a17bca693f12 – moewe Oct 03 '18 at 06:41
  • @moewe I knew you would come up with a much better definition of \footcite -- Thanks a lot! I made the answer community wiki, please feel free to edit if you'd like to change anything. One small problem remains: The family name still is in small caps (which is not available in combination with italics, thus the fallback to upright font). Do you happen to know how to change this? I tried to change this with \DeclareFieldFormat but failed. – samcarter_is_at_topanswers.xyz Oct 03 '18 at 11:08
  • @moewe Thanks a lot for your edit! I would never have thought of that the font family would be related to the language! – samcarter_is_at_topanswers.xyz Oct 03 '18 at 19:47
  • 1
    Yeah, it's a bit of a weird one that the language module would change the font of the name display, but apparently it is that relevant for French that PL accepted its inclusion into the.lbx file. While the files should ideally be just localisation files, style issues sometimes creep into this and it becomes hard to clearly separate them. So we are stuck with a slightly-more-than-only-translations localisation. – moewe Oct 03 '18 at 20:01
  • @moewe Oh, interesting background information. I hope this will help me to remember to check the .lbx files if I encounter a similar problem again! – samcarter_is_at_topanswers.xyz Oct 03 '18 at 20:23
  • Don't look at latvian.lbx and magyar.lbx in the development version of biblatex.... Especially magyar.lbx had to do some truly terrifying things. – moewe Oct 03 '18 at 20:39
  • @moewe I'll do my very best to stay away from these files :) – samcarter_is_at_topanswers.xyz Oct 03 '18 at 21:08
  • Is there a way to span this over two columns? I could open a new question if needed. – Baraliuh Jul 09 '22 at 17:32
  • @Baraliuh Please do ask a new question, including a minimal working example – samcarter_is_at_topanswers.xyz Jul 09 '22 at 18:43