定制 Biblatex 参考文献

定制 Biblatex 参考文献

我有这个代码:

\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage[authordate,bibencoding=auto,backend=biber,natbib,giveninits=true]{biblatex-chicago}
\usepackage{filecontents}

\begin{filecontents*}{references.bib}
@article{grossmanhart80,
    author  = {Sanford Grossman and Oliver Hart},
    title   = {Takeover Bids, The Free-Rider Problem, and the Theory of the Corporation},
    journal = {The Bell Journal of Economics},
    year    = {1980},
    volume  = {11},
    number  = {1},
    pages   = {42--64}
}

@book{hilliergrinblatttitman11,
    author      ={David Hillier and Mark Grinblatt and Sheridan Titman},
    title       ={Financial Markets and Corporate Strategy},
    publisher   ={McGraw-Hill},
    year        ={2011},
    edition     ={Second Edition}
}
\end{filecontents*}

\DeclareFieldFormat[article]{title}{#1} % remove quotation marks from articles
\addbibresource{references.bib}

\begin{document}

\nocite{*}
\linespread{1.5}
\printbibliography

\end{document}

输出结果如下:

参考

我有两个问题:1我怎样才能在文章和书籍的年份上添加括号,以及2我怎样才能将文章的卷数 (11) 变成斜体,而不将数字 (1) 也变成斜体?

先感谢您。

答案1

像这样的复杂风格biblatex-chicago修改起来可能很麻烦,特别是如果它们实现了全面的风格指南,比如 CMS 或 APA 风格。

对于第一个问题,我们可以重新定义宏cmsbibyear以添加\printtext{\bibopenparen}\printtext{\bibcloseparen}。代码不允许使用更惯用的\printtext[parens]{...},所以我们必须采用这种临时解决方案。

通过重新定义字段格式,可以轻松而优雅地解决第二个问题jourvol

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[authordate,bibencoding=auto,backend=biber,natbib,giveninits=true]{biblatex-chicago}

\renewbibmacro*{cmsbibyear}{%
  \printtext{\bibopenparen}%
  \iftoggle{cms@origlabel}%
    {\usebibmacro{origyear+labelyear}}%
    {\iftoggle{cms@bothlabelnew}%
       {\usebibmacro{bothyear+oldstyle}}%
       {\iftoggle{cms@bothlabelold}%
          {\usebibmacro{bothyear+oldstyle}}%
          {\usebibmacro{labelyear+extrayear}}}}%
  \ifcsdef{@cms@tempdate}%
    {\toggletrue{\@cms@tempdate}}%
    {}%
  \printtext{\bibcloseparen}}%


\DeclareFieldFormat{jourvol}{\mkbibbold{#1}}

\DeclareFieldFormat[article]{title}{#1}

\usepackage{filecontents}
\begin{filecontents*}{references.bib}
@article{grossmanhart80,
    author  = {Sanford Grossman and Oliver Hart},
    title   = {Takeover Bids, The Free-Rider Problem, and the Theory of the Corporation},
    journal = {The Bell Journal of Economics},
    year    = {1980},
    volume  = {11},
    number  = {1},
    pages   = {42--64}
}

@book{hilliergrinblatttitman11,
    author      ={David Hillier and Mark Grinblatt and Sheridan Titman},
    title       ={Financial Markets and Corporate Strategy},
    publisher   ={McGraw-Hill},
    year        ={2011},
    edition     ={Second Edition}
}
\end{filecontents*}

\addbibresource{references.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Grossman, S. 和 O. Hart。(1980 年)。《收购要约、搭便车问题和公司理论》。《贝尔经济学杂志》11 (1):42–64。Hillier, D.、M. Grinblatt 和 S. Titman。(2011 年)。《金融市场与公司战略》。第二版。麦格劳-希尔。

相关内容