2

Is it possible to have Beamer bibliography icon together with a numbering?

This post shows a nice way of selecting the icon according to the type of reference. However, beyond showing the type I would like to include the numbering to be emphatic.

This is an example of the output I would like. enter image description here

A minimal working example (MWE).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents}{refs.bib} 
@Book{Kuttruff2007,
  author    = {Heinrich Kuttruff},
  publisher = {Taylor \& Francis},
  title     = {Acoustics: an introduction},
  year      = {2007},
  isbn      = {0203970896},
}
\end{filecontents} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[aspectratio=169]{beamer}

\usepackage[backend=biber, bibstyle=numeric, citestyle=numeric, sorting=none]{biblatex}
\addbibresource{refs.bib}

%% Set the icons 
\setbeamertemplate{bibliography item}{%
  \ifboolexpr{ test {\ifentrytype{book}} or test {\ifentrytype{mvbook}}
    or test {\ifentrytype{collection}} or test {\ifentrytype{mvcollection}}
    or test {\ifentrytype{reference}} or test {\ifentrytype{mvreference}} }
    {\setbeamertemplate{bibliography item}[book]}
    {\ifentrytype{online}
      {\setbeamertemplate{bibliography item}[online]}
      {\setbeamertemplate{bibliography item}[article]}}%
  \usebeamertemplate{bibliography item}}

\defbibenvironment{bibliography}
  {\list{}
     {\settowidth{\labelwidth}{\usebeamertemplate{bibliography item}}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}

\title[Example]{Beamer example}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{First section}
\begin{frame}{Title of frame: cite example}
    Contents \cite{Kuttruff2007}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{References}
\begin{frame}[t,noframenumbering,plain,allowframebreaks]{References}
    \frametitle{References}
    \printbibliography
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EOF

Thanks for the help.

1 Answer 1

1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents}{refs.bib} 
@Book{Kuttruff2007,
  author    = {Heinrich Kuttruff},
  publisher = {Taylor \& Francis},
  title     = {Acoustics: an introduction},
  year      = {2007},
  isbn      = {0203970896},
}
\end{filecontents} 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[aspectratio=169]{beamer}

\usepackage[backend=biber, bibstyle=numeric, citestyle=numeric, sorting=none]{biblatex}
\addbibresource{refs.bib}


%  
\mode<presentation>{
\setbeamertemplate{bibliography item}{
  \ifboolexpr{ test {\ifentrytype{book}} or test {\ifentrytype{mvbook}}
    or test {\ifentrytype{collection}} or test {\ifentrytype{mvcollection}}
    or test {\ifentrytype{reference}} or test {\ifentrytype{mvreference}} }
    {\lower2pt\hbox{\pgfuseimage{beamericonbook}}}
    {\ifentrytype{online}
      {\lower3pt\hbox{\pgfuseimage{beamericononline}}}
      {\lower2pt\hbox{\pgfuseimage{beamericonarticle}}}}%
~\insertbiblabel}}  

\title[Example]{Beamer example}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{First section}
\begin{frame}{Title of frame: cite example}
    Contents \cite{Kuttruff2007}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{References}
\begin{frame}[t,noframenumbering,plain,allowframebreaks]{References}
    \frametitle{References}
    \printbibliography
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EOF

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .