# Replace colon with comma before pages in article type with biblatex-chicago

Normally, Chicago-style references produce the following structure for articles:

Lastname, Firstname. "Article Title." Prestigious Journal 24 (2019): 1–78.

However, I need the colon after the year to change to a comma (in all positions, notes and bibliography, and when citing either the full article or a specific page):

Lastname, Firstname. "Article Title." Prestigious Journal 24 (2019), 1–78.

Based on various related problems discussed on SE, I thought that the solution would be to \renewcommand for \bibpagespunct, but as in the following example, this doesn't change the behavior at all. What's the best approach here?

MWE:

\documentclass[12pt]{memoir}

\usepackage[notes, backend=biber, sorting=nyt,
giveninits=true, useprefix=false,
shorthandibid, shorthandfull,
]{biblatex-chicago}

\usepackage{filecontents}
\begin{filecontents*}{jobname.bib}
@article{lastname19,
author = {Lastname, Firstname},
title = {Article Title},
journal = {Prestigious Journal},
volume = {24},
pages = {1--78},
date = {2019},
}

\end{filecontents*}

\begin{document}

Look how referenced this sentence is.\autocite{lastname19}

\end{document}


That is surprisingly tricky. With the standard styles you would only have to modify \bibpagespunct and maybe \postnotdelim, but with biblatex-chicago the colon is hard-coded in many places.

There is the command \postvolpunct to customise some of the appearances of colons in the entries, but it does not apply to the example in your question.

In total you probably want to redefine \postnotedelim and make a few of the hard-coded colons customisable. The code unfortunately becomes really long even though the changes are quite small.

\documentclass[12pt]{memoir}

\usepackage[notes, backend=biber, sorting=nyt,
giveninits=true, useprefix=false,
shorthandibid, shorthandfull,
]{biblatex-chicago}

\makeatletter

\renewbibmacro*{journal+issue+year+pages}{%
\usebibmacro{cjournal+ser+vol+num}%
\ifboolexpr{% 16th ed.
test {\iffieldundef{issue}}%
and
test {\iffieldundef{year}}%
and
not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\iffieldundef{bookpagination}%
{\setunit{\postvolpunct}}%
{\setunit{\erikapostvolpunct}}%
\printfield{pages}}%
{\newcunit\printfield{pages}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}%
\newcunit\printfield{pages}}%
\printtext[parens]{%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}}%
\setunit{\erikapostvolpunct}%
\printfield{pages}}}}

\renewbibmacro*{periodical+issue+year+pages}{%
\usebibmacro{cperiodical+ser+vol+num}%
\ifboolexpr{% 16th ed.
test {\iffieldundef{issue}}%
and
test {\iffieldundef{year}}%
and
not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\iffieldundef{bookpagination}%
{\setunit{\postvolpunct}}%
{\setunit{\erikapostvolpunct}}%
\printfield{pages}}%
{\newcunit\printfield{pages}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}%
\newcunit\printfield{pages}}%
\printtext[parens]{%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}}%
\setunit{\erikapostvolpunct}%
\printfield{pages}}}}

\renewbibmacro*{cjournal+issue+year+pages}{%
\usebibmacro{cjournal+ser+vol+num}%
\ifboolexpr{% 16th ed.
test {\iffieldundef{issue}}%
and
test {\iffieldundef{year}}%
and
not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
{\setunit{\postvolpunct}}%
{\setunit{\erikapostvolpunct}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}%
\printtext[parens]{% parens is the default here
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}}}}}

\renewbibmacro*{cperiodical+issue+year+pages}{% For periodicals,
\usebibmacro{cperiodical+ser+vol+num}% subtype article
\ifboolexpr{% 16th ed.
test {\iffieldundef{issue}}%
and
test {\iffieldundef{year}}%
and
not togl {cms@switchdates}%
}%
{\iffieldundef{number}%
{\ifthenelse{\iffieldundef{pagination}\AND%
\iffieldundef{bookpagination}}%
{\setunit{\postvolpunct}}%
{\setunit{\erikapostvolpunct}}}%
{\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
{\newcunit%
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}%
\printtext[parens]{% parens is the default here
\iffieldundef{issue}%
{\usebibmacro{number+or+month}}%
{\printfield{issue}%
\usebibmacro{cmsyear}}}}}}
\makeatother

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{lastname19,
author = {Lastname, Firstname},
title = {Article Title},
journal = {Prestigious Journal},
volume = {24},
pages = {1--78},
date = {2019},
}

\end{filecontents*}

As you can see biblatex-chicago is a great style when you want to follow the CMoS, but it can be a pain to modify because it must go to great lengths to comply with all the CMoS wishes.
Given your recent questions you might be in too deep already, but maybe this can be a warning to other people who consider using biblatex-chicago as basis for their own styles: Heavily customised styles such as biblatex-chicago or biblatex-apa can be quite challenging to tweak at times. Unlike the standard styles they are not intended for far-reaching customisations, they are intended to deliver the style as prescribed by the style guides. Sometimes that means that compromises w.r.t. customisability have to be made.
• Wow, that is surprisingly tricky indeed--no wonder I wasn't getting anywhere on my own. And a useful general warning about biblatex-chicago I think, for those who are at earlier stages of their projects (alas, not me). Of course in an ideal world each university/publisher would just stick to one of the major discipline-accepted guides rather than introducing minor variations, but what can you do... – Erika Apr 11 at 12:04