参考文献中的方括号中注明来源

参考文献中的方括号中注明来源

使用cmsdate=bothbiblatex-chicago,使用\textcite\autocite将 放在origdate方括号中。

但是,在参考文献下,当我使用时\citeorigdate会出现在圆括号中。

有没有办法使它们保持一致,特别是origdate始终出现在方括号中?

我的 bib 文件包含:

@book{Hayek41,
    author  = "Friedrich A. Hayek",
    date        = 1962,
    origdate    = 1941,
    title   = "The Pure Theory of Capital",
    publisher   = "Routledge",
    address = "London"
    }

以及 tex 文件:

\usepackage[backend=biber,
    authordate,     %author-date in-text form
    cmsdate=both]   %show original date
    {biblatex-chicago}
\addbibresource{sources.bib}

text\autocite{Hayek41}

\nocite{*}  %Show all references
\printbibliography[heading=bibintoc]

在文本中,我得到:

(哈耶克[1941]1962)。

在参考文献中,我得到

Hayek, Friedrich A. (1941) 1962.《资本的纯粹理论》。伦敦:Routledge & Kegan Paul。

使用\cite我得到

哈耶克(1941)1962。

答案1

biblatex-chicago是一种非常复杂的风格,它执行非常复杂的指导方针,因此原本简单的更改可能需要相当多的代码。这里的情况确实如此。

我们唯一要做的就是在正确的位置\bibopenparen\bibopenbracket\bibcloseparen替换。\bibclosebracket

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

\usepackage[backend=biber,
    authordate,     %author-date in-text form
    cmsdate=both]   %show original date
    {biblatex-chicago}

\renewbibmacro*{cite:bothyear+oldstyle}{%
  \ifboolexpr{ (
    test {\ifentrytype{music}}%
    or
    test {\ifentrytype{review}}%
    or
    test {\ifentrytype{standard}}%
    or
    test {\ifentrytype{suppperiodical}}%
    or
    test {\ifentrytype{video}}%
    )
    and
    togl {cms@avdate}%
  }%
  {\usebibmacro{cite:av+labelyear+extrayear}}%
  {\iftoggle{cms@switchdates}%
    {\printtext[cmsyearhyper]{%
        \bibopenbracket
        \usebibmacro{cite:labelyear+extrayear}%
        \bibclosebracket
        \clearfield{extradate}\clearfield{extratitleyear}%
        \addspace%
        \printorigdateextra}}% \usebibmacro{origyear+endyear}
    {\iffieldundef{origyear}% ???
      {\iftoggle{cms@ordate}%
        {}%
        {\clearfield{extradate}\clearfield{extratitleyear}}%
        \usebibmacro{cite:standard+labelyear+extrayear}}%
      {\iftoggle{cms@ordate}% Added test for year field ???
        {\iffieldundef{year}%
          {\usebibmacro{cite:origfirst+labelyear+extrayear}}%
          {\printtext[cmsyearhyper]{%
              \bibopenbracket
              \usebibmacro{cite:origfirst+labelyear+extrayear}%
              \bibclosebracket
              \setunit{\addspace}%\addspace% ???
              \clearfield{extradate}\clearfield{extratitleyear}%
              \printdateextra}}}%\usebibmacro{year+endyear}
        {\iffieldundef{year}%
          {\usebibmacro{cite:origfirst+labelyear+extrayear}}%
          {\printtext[cmsyearhyper]{%
              \bibopenbracket
              \clearfield{extradate}\clearfield{extratitleyear}%
              \printorigdateextra%
              % \usebibmacro{origyear+endyear}%
              \bibclosebracket
              \addspace%
              \usebibmacro{cite:standard+labelyear+extrayear}}}}}}}}%


\renewbibmacro*{bothyear+oldstyle}{%
  \ifboolexpr{ (
    test {\ifentrytype{music}}%
    or
    test {\ifentrytype{review}}%
    or
    test {\ifentrytype{standard}}%
    or
    test {\ifentrytype{suppperiodical}}%
    or
    test {\ifentrytype{video}}%
    )
    and
    togl {cms@avdate}%
  }%
  {\usebibmacro{av+labelyear+extrayear}}% \clearfield local to \printtext
  {\iftoggle{cms@switchdates}%
    {\printtext{%
        \bibopenbracket
        \usebibmacro{labelyear+extrayear}%
        \bibclosebracket
        \setunit{\addspace}%
        \clearfield{extrayear}%
        \printorigdateextra}% \usebibmacro{origyear+endyear}
      \usebibmacro{clear+datefield}{}%
      \usebibmacro{clear+datefield}{orig}}%
    {\iffieldundef{origyear}%
      {\iftoggle{cms@ordate}%
        {}%
        {\clearfield{extradate}\clearfield{extratitleyear}}%
        \usebibmacro{standard+labelyear+extrayear}}%
      {\iftoggle{cms@ordate}% ???
        {\iffieldundef{year}%
          {\usebibmacro{origfirst+labelyear+extrayear}}%
          {\printtext{%
              \bibopenbracket
              \usebibmacro{origfirst+labelyear+extrayear}%
              \bibclosebracket
              \setunit*{\addspace}%
              \clearfield{extradate}\clearfield{extratitleyear}%
              \printdateextra}}}% \usebibmacro{year+endyear}
        {\iffieldundef{year}%
          {\usebibmacro{origfirst+labelyear+extrayear}}%
          {\printtext{%
              \bibopenbracket
              \clearfield{extradate}\clearfield{extratitleyear}%
              \printorigdateextra%
              % \usebibmacro{origyear+endyear}%
              \bibclosebracket
              \setunit*{\addspace}%
              \usebibmacro{standard+labelyear+extrayear}}}}%
        \usebibmacro{clear+datefield}{orig}%
        \usebibmacro{clear+datefield}{}}}}}%

\begin{filecontents}{\jobname.bib}
@book{Hayek41,
  author    = {Friedrich A. Hayek},
  date      = 1962,
  origdate  = 1941,
  title     = {The Pure Theory of Capital},
  publisher = {Routledge},
  address   = {London},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Lorem \autocite{Hayek41}
ipsum \textcite{Hayek41}
dolor \cite{Hayek41}

\printbibliography
\end{document}

Lorem (Hayek [1941] 1962) ipsum Hayek ([1941] 1962) dolor Hayek [1941] 1962 Hayek, Friedrich A. [1941] 1962. 《资本纯理论》。伦敦:劳特利奇。

相关内容