4

This should be really simple, but I can't find the answer. I want to use \textcite with authoryear style, but replace the comma after the year by a colon; that is, have Nichols (2004: 13) instead of Nichols (2004, 13). Here's an MWE:

\documentclass[preview]{standalone} %
\usepackage[backend=biber,style=authoryear]{biblatex} %
\usepackage{filecontents} %

\addbibresource{example.bib} %

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

\begin{filecontents}{example.bib}
@Article{nichols04,
author =       {Nichols, Shaun},
title =        {After Objectivity: An Empirical Study of Moral Judgment},
journal =      {Philosophical Psychology},
year =         {2004},
volume =       {17},
number =       {1},
pages =        {3--26}
}
\end{filecontents}

\begin{document}

As described in \textcite[13]{nichols04}.
\end{document}

I have already removed the p. with \DeclareFieldFormat{postnote}{#1}. I have also omitted \printbibliography, since I'm not interested in modifying the bibliography, but the citation.

4

There's an error in the manual which makes this hard to find. The macro described as defining punctuation after the post-note actually seems to define punctuation before the post-note.

At least, redefining it seems to work.

\begin{filecontents}{\jobname.bib}
@Article{nichols04,
author =       {Nichols, Shaun},
title =        {After Objectivity: An Empirical Study of Moral Judgment},
journal =      {Philosophical Psychology},
year =         {2004},
volume =       {17},
number =       {1},
pages =        {3--26}
}
\end{filecontents}
\documentclass[border=10pt]{standalone} 
\usepackage[backend=biber,style=authoryear]{biblatex} 

\addbibresource{\jobname.bib} 

\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand\postnotedelim{\addcolon\addspace}


\begin{document}

As described in \textcite[13]{nichols04}.
\end{document}

redefined post-note delimiter

  • The description is fixed now: github.com/plk/biblatex/commit/… (I hope that is what you referred to). In fact \postnotdelim is documented twice. The description in the user guide part of the manual was OK, the problem was in the author guide bit. I'm beginning to doubt it makes sense to duplicate the information. It is probably enough to have it only once. – moewe May 24 '18 at 5:35

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.