19

I would like to put a few reference inside a beamer presentation. Adding a full fledge bibliography is certainly awkward but the output of the \fullcite command from the biblatex pacakge is too verbose.

I am looking for a command similar to \fullcite that would only insert author, title and year

Some sort of MWE would be:

\documentclass{beamer}
\usepackage[backend=bibtex, style=authoryear-comp]{biblatex}
\addbibresource{biblio}

\begin{document}
\begin{frame}
  \XXXcite{Kennedy01}
\end{frame}

\end{document}

with biblio.bib containing

@Article{Kennedy01,
  author =       {Kennedy, Marc C. and O'Hagan, Anthony},
  title =        {Bayesian calibration of computer models},
  journal =      {Journal of the royal statistical society: series b (statistical methodology)},
  year =         2001,
  volume =    63,
  number =    3,
  pages =     {425-464}}

and \XXXcite being the needed command similar to \fullcite.

I suppose that Where can I find collections of bibliography styles? could be used but I have only a very restricted understanding of the working of biblatex.

3 Answers 3

22

Probably not the most efficient way to do this (I'm new to biblatex), but it works

\documentclass{beamer}
\usepackage[backend=bibtex, style=authoryear-comp]{biblatex}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@Article{Kennedy01,
  author =       {Kennedy, Marc C. and O'Hagan, Anthony},
  title =        {Bayesian calibration of computer models},
  journal =      {Journal of the royal statistical society: series b (statistical methodology)},
  year =         2001,
  volume =    63,
  number =    3,
  pages =     {425-464}}
\end{filecontents}

\addbibresource{\jobname.bib}

\newcommand{\customcite}[1]{\citeauthor{#1}, \citetitle{#1}, \citeyear{#1}}

\begin{document}
\begin{frame}
  \customcite{Kennedy01}
\end{frame}

\end{document}
4
  • How would one do this for placing citations as footnotes? (e.g. a replacement for \footcite)? Dec 2, 2013 at 20:35
  • 2
    \newcommand{\customfootcite}[1]{\footnote{\citeauthor{#1}, \citetitle{#1}, \citeyear{#1}}} worked! Thanks. Dec 2, 2013 at 20:42
  • Just a warning that putting together several \...cite commands into one \newcommand is not best practice with biblatex. For one commands defined like this deal badly with multiple citation keys and don't support pre- and postnotes. Additionally, the fact that a work is passed to several \...cite commands can cause issues with citation tracking (e.g. "ibid.".) ...
    – moewe
    Apr 2 at 16:04
  • ... It's usually much safer and better to define a new citation command with \DeclareCiteCommand as shown in Oleg's (tex.stackexchange.com/a/123145/35864) and user's (tex.stackexchange.com/a/511717/35864) answer.
    – moewe
    Apr 2 at 16:04
8

Probably the most straightforward way is to define a new citation command:

\DeclareCiteCommand{\customcite}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}%
      \indexfield{indextitle}}
     {}%
   \printnames{labelname}%
   \setunit{\labelnamepunct}%
   \printfield[citetitle]{labeltitle}%
   \newunit
   \printfield{year}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
4

The same answer as @Oleg Domanov but also adding a hyperlink to the citation:

\documentclass{article}
\usepackage[backref=true]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\DeclareCiteCommand{\customcite}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}%
      \indexfield{indextitle}}
     {}%
   \printtext[bibhyperref]{%
       \printnames{labelname}%
       \setunit{\labelnamepunct}%
       \printfield[citetitle]{labeltitle}%
       \newunit
       \printfield{year}%
     }%
   }
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}

In this cite \customcite{A01} I do get a link now.

\printbibliography

\end{document}

enter image description here

Related questions:

  1. What do \setunit and \newunit do?
  2. Suppress quotes or other markup in \citetitle
  3. Make \cite{my reference} show name and year
  4. hyperlinking author names in biblatex when using \citeauthor
  5. biblatex+hyperref: citetitle/citeauthor and get hyperlink
  6. Hanging references using \fullcite
  7. Using printfield of biblatex without formatting
  8. How to extract BibTeX entries (as DOI, abstract, etc.)
  9. Custom \cite command
  10. biblatex - How can I make \printfield{number} just print the number (figures) without "Nr."?
  11. \citefield link to bibliography (hyperref & backref)
  12. \citefield{key}{author} and \citefield{key}{journal} of biblatex do not work
  13. Alternative \citetitle command without italics
  14. Is bibtex unable to \cite specific entry (author, title) in latex?
  15. How do I cite author in LaTeX?
  16. Cite title and author with one command

You must log in to answer this question.

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