32

I have the following Latex code, where I use biber and chicago style for citations:

\documentclass[12pt,a4paper]{article}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[authordate,bibencoding=auto,strict,backend=biber]{biblatex-chicago}
\selectlanguage{ngerman}

\bibliography{bibliography}

\begin{document}

    \cite{Herlocker2004}

    \newpage

    \printbibliography
\end{document} 

And this bibliography.bib:

@article{Herlocker2004,
author = {Herlocker, Jonathan L. and Konstan, Joseph a. and Terveen, Loren G. and Riedl, John T.},
journal = {ACM Transactions on Information Systems},
month = jan,
number = {1},
pages = {5--53},
title = {{Evaluating collaborative filtering recommender systems}},
volume = {22},
year = {2004}
}

This produces

Herlocker u.a. 2004

But I want to put the year in brackets, and replace the german u.a. with et al., so that it looks like this

Herlocker et al. (2004)

Is there any way to format my citations like this?

2 Answers 2

28

Here's my suggestion. I added the natbib option for biblatex. This allows you to use the citation commands \citep (whole citation in parentheses) and \citet (only the year is in parentheses). I then redefined the andothers bibliography string for German, like so

\DefineBibliographyStrings{german}{%
  andothers = {et al.},
}

I'd recommend you use the command \addbibresource in the preamble, instead of \bibliography which is legacy (see biblatex manual for v.2.5, p.82).

My suggestion for your working example then becomes

\begin{filecontents*}{\jobname.bib}
@article{Herlocker2004,
author = {Herlocker, Jonathan L. and Konstan, Joseph a. and Terveen, Loren G. and Riedl, John T.},
journal = {ACM Transactions on Information Systems},
month = jan,
number = {1},
pages = {5--53},
title = {{Evaluating collaborative filtering recommender systems}},
volume = {22},
year = {2004}
}

\end{filecontents*}

\documentclass[12pt,a4paper]{article}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[authordate,bibencoding=auto,strict,backend=biber,natbib]{biblatex-chicago}

\addbibresource{\jobname.bib}

\DefineBibliographyStrings{german}{%
  andothers = {et al.},
}


\selectlanguage{ngerman}


\begin{document}

    \citet{Herlocker2004}

    \printbibliography
\end{document}

enter image description here

3
  • 22
    \citet is just an alias for the standard biblatex \textcite (with the addition of the starred option), one might add. \textcite does not need the natbib compatibility mode.
    – moewe
    Sep 7, 2014 at 14:18
  • @moewe \textcite worked fine for me with biblatex. Seems logical to avoid natbib compatibility mode, if I've already chosen biblatex? This is also the simplest answer. I now have brackets () around the date where I need them. Unless there's a reason not to do it this way? Sep 13, 2015 at 20:21
  • 1
    @DaveEveritt Of course it does. The natbib compatibility mode has a few side-effects besides allowing to use \citet and \citep (you can find the definitions in blx-natbib.def): the starred versions of \cite commands differ and the delimiter between year and date in authoryear-like styles is set to \addcomma\space. So I generally don't use it if I don't need natbib-like commands. I just commented because I felt that one could take the first few lines in the answer to mean that it is the natbib-option that allows us to have parenthetical citations (but there is \parencite).
    – moewe
    Sep 14, 2015 at 5:37
6

Here is how to wrap the year in brackets and avoiding issues with an ibid style.

Specifying the natbib option and using the citet command (as stated in the accepted answer) doesn't work as expected when using an ibid style.

Consider the following:

\documentclass[paper=a4]{scrreprt}
\usepackage[style=authoryear-ibid]{biblatex}
\begin{document}

    \cite[21]{keyxyz}
    % outputs: someauthor (2003, p. 21)
   \citet[23]{keyxyz}
    % outputs: someauthor (ibid., p.23) <-- that's fine
   \citet{keyxyz}
    % outputs: someauthor (ibid.) <-- the isssue:
    % what if you want to refer to the authors work as a whole, without
    % referencing the page number as well (as ibid usually implies)?

\end{document}

A quick workaround would be:

\documentclass[paper=a4]{scrreprt}
\usepackage[style=authoryear-ibid]{biblatex}

\newcommand{\citeauthorandyear}[2][]{
   \citeauthor{#2} (\citeyear[#1]{#2})
}

\begin{document}

    \cite[21]{keyxyz}
    % outputs: someauthor (2003, p. 21)
    \citeauthorandyear{keyxyz}
    % outputs: someauthor (2003) <- that's better now
    \citet[22]{keyxyz}
    % outputs: someauthor (ibid., p.22)

\end{document}

For more complex rewrites see the biblatex manual p.131, 4.3.1 \DeclareCiteCommand.

3
  • 2
    Please be a bit more specific about how your posting addresses the OP's issue.
    – Mico
    Sep 6, 2014 at 21:37
  • Maybe authoryear-ibid is not for you then, if you dislike "someauthor (ibid.)". Try authoryear instead, then the output will exactly resemble that of the workaround.
    – moewe
    Sep 7, 2014 at 14:18
  • @moewe no, ibid is fine in most cases but if i want to refer to the author's work as a whole, ibid is not suitable at that moment, as it also refers to the recently mentioned page number. as i cannot use citet then, i created a command that produces 'author (date)'. please see the updated example.
    – Felix K.
    Sep 17, 2014 at 8:25

You must log in to answer this question.

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