0

I'm trying to cite more than one field (e.g., title, author and year).

I've tried \citefield but it doesn't seem to accept more than one field (How to extract BibTeX entries (as DOI, abstract, etc.))

Is there something like \citefield{somepaper2020}{title,author,year}?

1

\citefield only gives you one field. If you want to access several fields at once, you need to define a custom cite command.

A standard \...cite command has the structure

\DeclareCiteCommand{\atycite}
  {\usebibmacro{prenote}}
  {\usebibmacro{author:title:year}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

where the bibmacro (here author:title:year) does the real work and prints the desired fields and the punctuation between them. For example

\newbibmacro*{author:title:year}{%
  \printnames{labelname}%
  \setunit{\addcolon\space}%
  \printfield[citetitle]{labeltitle}%
  \setunit{\addcomma\space}%
  \printdate
}

Here I used the special fields labelname and labeltitle that are automatically calculated from the author, editor, ... fields and from title, shorttitle etc. instead of \printnames{author} and \printfield{title}.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, backend=biber]{biblatex}

\newbibmacro*{author:title:year}{%
  \printnames{labelname}%
  \setunit{\addcolon\space}%
  \printfield[citetitle]{labeltitle}%
  \setunit{\addcomma\space}%
  \printdate
}

\DeclareCiteCommand{\atycite}
  {\usebibmacro{prenote}}
  {\usebibmacro{author:title:year}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson}

\atycite{sigfridsson}

\printbibliography
\end{document}

Sigfridsson and Ryde: ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’, 1998


If this is supposed to come your go-to citation style instead of just a one-off, you may want to make this more advanced and make sure that the command can deal with advanced biblatex features like shorthand, works together correctly with the bibliography style (and its sorting) etc.

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.