使用 biblatex-chicago 替换文章类型页面前的冒号为逗号

使用 biblatex-chicago 替换文章类型页面前的冒号为逗号

通常,芝加哥风格的参考文献会产生以下文章结构:

姓氏,名字。“文章标题。”著名期刊24 (2019): 1-78。

但是,我需要将年份后的冒号改为逗号(在所有位置、注释和参考书目中,以及引用全文或特定页面时):

姓氏,名字。“文章标题。”著名期刊24 (2019),1-78。

根据 SE 上讨论的各种相关问题,我认为解决方案是\renewcommand\bibpagespunct但如以下示例所示,这根本不会改变行为。这里最好的方法是什么?

梅威瑟:

\documentclass[12pt]{memoir}

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

\renewcommand{\bibpagespunct}{\addcomma\space}

\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*}
\addbibresource{jobname.bib}

\begin{document}

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

\end{document}

答案1

这非常棘手。使用标准样式,您可能只需要修改\bibpagespunct\postnotdelim,但biblatex-chicago冒号在许多地方都是硬编码的。

有命令\postvolpunct可以自定义条目中某些冒号的出现,但它不适用于您问题中的示例。

总的来说,您可能希望重新定义\postnotedelim并自定义一些硬编码的冒号。不幸的是,尽管更改很小,但代码却变得很长。

\documentclass[12pt]{memoir}

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

\makeatletter
\renewcommand*{\postnotedelim}{\addcomma\space}

\newcommand*{\erikapostvolpunct}{\addcomma\space}

\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}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \newcunit\printfield{pages}}%
    {\setunit{\addspace}%
    \printtext[parens]{%
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \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}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \newcunit\printfield{pages}}%
    {\setunit{\addspace}%
    \printtext[parens]{%
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \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}}}%
    {\addcomma\addspace}}%
  {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
    {\newcunit%
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \addcomma\addspace}%
    {\setunit{\addspace}%
    \printtext[parens]{% parens is the default here
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \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}}}%
    {\addcomma\addspace}}%
  {\ifthenelse{\iffieldundef{volume}\AND\iffieldundef{number}}% 16th ed.
    {\newcunit%
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \usebibmacro{cmsyear}}%
      \addcomma\addspace}%
    {\setunit{\addspace}%
    \printtext[parens]{% parens is the default here
      \iffieldundef{issue}%
      {\usebibmacro{number+or+month}}%
      {\printfield{issue}%
        \setunit{\addspace}%
        \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*}
\addbibresource{\jobname.bib}

\begin{document}
Look how referenced this sentence is.\autocite{lastname19}
\printbibliography
\end{document}

F. Lastname,《文章标题》,《Prestigious Journal》24(2019),1-78。

正如您所见,biblatex-chicago当您想要遵循 CMoS 时,这是一种很好的风格,但修改起来可能很麻烦,因为它必须竭尽全力才能满足 CMoS 的所有要求。

鉴于您最近的问题,您可能已经陷入了困境,但也许这可以给其他考虑将biblatex-chicago其用作自己风格基础的人一个警告:高度定制的样式(例如biblatex-chicago或)biblatex-apa有时很难调整。与标准样式不同,它们不适用于深远的定制,而是旨在提供样式指南规定的样式。有时,这意味着必须对可定制性做出妥协。

相关内容