1

My beamer presentation does not cite references as I want to. I want to have Name1 and Name2 (year). Currently I got (Name1 & Name2, year). Also on the references slide I want to have those icons before the article. I have many references so I would like to keep working with the bib file.

My bib file is (biblio.bib)

@article {ref1,
author = {Aa, Bb and Cc, Dd.},
title = {title},
journal = {journal},
volume = {1},
number = {1},
publisher = {publisher},
pages = {1--10},
year = {2017}
}

and the beamer latexcode is

%\documentclass[compress,black]{beamer}
\documentclass[handout]{beamer}

\usepackage{etex}
\usetheme{Szeged}
\useoutertheme[subsection=false]{smoothbars}

\usefonttheme{serif}

% include packages
\setbeamercovered{transparent}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[all,knot]{xy}
\xyoption{arc}
\usepackage{undertilde}
\usepackage{url}
\usepackage{multimedia}
\usepackage{setspace}
\usepackage{mathtools}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{lscape}
\usepackage{epstopdf}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{xcolor}
\setbeamercovered{dynamic}
\usepackage{apacite}
\usepackage{filecontents}
\usepackage{hyperref}
%\usepackage{natbib}


\captionsetup[figure]{labelformat=empty}% redefines the caption setup of the figures environment in the beamer class.




% define your own colours:
\definecolor{Red}{rgb}{1,0,0}
\definecolor{Blue}{rgb}{0,0,1}
\definecolor{Green}{rgb}{0,1,0}
\definecolor{magenta}{rgb}{1,0,.6}
\definecolor{lightblue}{rgb}{0,.5,1}
\definecolor{lightpurple}{rgb}{.6,.4,1}
\definecolor{gold}{rgb}{.6,.5,0}
\definecolor{orange}{rgb}{1,0.4,0}
\definecolor{hotpink}{rgb}{1,0,0.5}
\definecolor{newcolor2}{rgb}{.5,.3,.5}
\definecolor{newcolor}{rgb}{0,.3,1}
\definecolor{newcolor3}{rgb}{1,0,.35}
\definecolor{darkgreen1}{rgb}{0, .35, 0}
\definecolor{darkgreen}{rgb}{0, .6, 0}
\definecolor{darkred}{rgb}{.75,0,0}
\definecolor{indigo}{rgb}{0.0, 0.25, 0.42}

\definecolor{lightgray}{gray}{1}
\definecolor{gainsboro}{rgb}{0.86, 0.86, 0.86}

\xdefinecolor{olive}{cmyk}{0.64,0,0.95,0.4}
\xdefinecolor{purpleish}{cmyk}{0.75,0.75,0,0}

% - I need a darkred background color in the sections bar (at the top) on all slides.
\setbeamercolor{section in head/foot}{bg=gainsboro!50!white}

% - Just beneath the sections bar I need a narrow darkblue bar on all slides.
\makeatletter
\AtBeginDocument{%
    \usebeamerfont{headline}%
    \colorlet{global.bg}{bg}%
    \pgfdeclareverticalshading{beamer@barshade}{\the\paperwidth}{%
       color(0ex)=(darkred);%
       color(1ex)=(darkred);%
       color(2ex)=(section in head/foot.bg);%
       color(7ex)=(section in head/foot.bg)%
    }
    \pgfdeclareverticalshading{beamer@aboveframetitle}{\the\paperwidth}{%
       color(0ex)=(darkred);%
       color(1ex)=(darkred);%
       color(2.5ex)=(section in head/foot.bg)%
     }
    \pgfdeclareverticalshading{beamer@belowframetitle}{\the\paperwidth}{%
      color(0ex)=(global.bg);%
      color(1ex)=(frametitle.bg)%
    }
    \fontsize{10}{12}\selectfont%
}

%Define box environment
\newenvironment<>{theorem}[1][\undefined]{%
\begin{actionenv}#2%
\ifx#1\undefined%
   \def\insertblocktitle{Theorem}%
\else%
   \def\insertblocktitle{Theorem ({\em#1})}%
\fi%
\par%
\mode<presentation>{%
  \setbeamercolor{block title}{fg=black,bg=gainsboro!50!white}
  \setbeamercolor{block body}{fg=black,bg=gainsboro!20}
}%
\usebeamertemplate{block begin}\em}
{\par\usebeamertemplate{block end}\end{actionenv}}

%Define box environment
\newenvironment<>{definition}[1][\undefined]{%
\begin{actionenv}#2%
\ifx#1\undefined%
   \def\insertblocktitle{Definition}%
\else%
   \def\insertblocktitle{Definition ({\em#1})}%
\fi%
\par%
\mode<presentation>{%
  \setbeamercolor{block title}{fg=black,bg=gainsboro!50!white}
  \setbeamercolor{block body}{fg=black,bg=gainsboro!20}
}%
\usebeamertemplate{block begin}\em}
{\par\usebeamertemplate{block end}\end{actionenv}}

\makeatother

% - Nothing should be displayed on the bottom bar of the slides (no authorname, no section, etc)
\setbeamertemplate{footline}{}

% - All text should be in black.
\setbeamercolor{title}{fg=black}
\setbeamercolor{frametitle}{fg=black, bg=white}

\title{title}

\author{Name}
%\date{}




\begin{document}

\begin{frame}
    \titlepage
\end{frame}

\section{Introduction}
\subsection{Chapter 1}
\begin{frame}
   \cite{ref1}

\end{frame}

\section{References}
\begin{frame}[allowframebreaks]
\frametitle{}
    {\bibliographystyle{apacite}}
    \bibliography{biblio}
\end{frame}
\end{document} 
3
  • A couple of your previous questions don't have an accepted answer despite having one or more answers which seems to solve the questions. Can you have a look? Feb 13 '17 at 15:33
  • I still do not get icons on the references slide. Another problem is how the references are listed. For articles with multiple authors I have for example ',& last author' instead of '& last author'
    – Nadori
    Mar 1 '17 at 20:21
2

You should use \citet and \citep to get Name1 (2016) and (Name1, 2016) respectively.

5
  • Okay, it works with the package natbib. What remains is the listing of the references
    – Nadori
    Feb 13 '17 at 15:28
  • What is going wrong with the references then? The representation of the references in the rendered bibliography?
    – Martin
    Feb 13 '17 at 15:36
  • yes, I want to have when listing the references those small pictograms for paper, book etc
    – Nadori
    Feb 13 '17 at 15:49
  • Ah I see, so every reference is being prefixed with the correct icon for the several types. You could take a look at this
    – Martin
    Feb 13 '17 at 15:55
  • It did not help.
    – Nadori
    Mar 1 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.