使用 biblatex-chicago 从“inproceedings”字段中删除文本“In”

使用 biblatex-chicago 从“inproceedings”字段中删除文本“In”

我的代码如下:

\documentclass{book}

\usepackage[natbib,authordate,backend=biber]{biblatex-chicago}%

\makeatletter
\AtEveryBibitem{\global\undef\bbx@lasthash}%
\setlength{\bibhang}{5\p@}%
\setlength{\bibitemsep}{4\p@}%
%\setlength{\biblabelsep}{-10\p@}%
\def\bibfont{\small}%
%\setlength{\bibhang}{1cm}
%%%
\newlength{\bibleftadd}%
\setlength{\bibleftadd}{-5\p@}%
%%
\defbibenvironment{bibliography}
  {\markboth{\bibname}{\bibname}\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \addtolength{\leftmargin}{\bibleftadd}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}
\makeatother

\bibliography{test}

\begin{document}

Test \citet{abernethy2011blackwell}

\clearpage

\printbibliography

\end{document}

文件内容.bib

@inproceedings{abernethy2011blackwell,
  title={Blackwell Approachability and No-regret Learning Are Equivalent},
  author={Abernethy, Jacob and Bartlett, Peter L and Hazan, Elad},
  booktitle={Proceedings of the 24th Annual Conference on Learning Theory},
  volume={19},
  pages={27--46},
  year={2011}
}

输出

在此处输入图片描述

我不想在书名前打印“In”文本,我该如何解决这个问题?请提出建议...

我已尝试使用innamebeforetitle=false作为选项biblatex-chicago,但出现错误......

答案1

bibmacrocms-in:似乎负责打印 中的“in” biblatex-chicago。其原始定义是

\newbibmacro*{cms-in:}{% Fix for 0.9a compat.
  \iftoggle{cms@origpublished}%
  {}%
  {\bibstring{in}%
    \setunit{\addspace}}}

我们可以像下面这样重新定义它,以便不打印任何@inproceedings条目。

\documentclass{article}

\usepackage[natbib,authordate,backend=biber]{biblatex-chicago}%

\renewbibmacro*{cms-in:}{% Fix for 0.9a compat.
  \ifboolexpr{
    togl {cms@origpublished}
    or test {\ifentrytype{inproceedings}}}
    {}%
    {\bibstring{in}%
     \setunit{\addspace}}}

\begin{filecontents}{\jobname.bib}
@inproceedings{abernethy2011blackwell,
  title     = {Blackwell Approachability and No-regret Learning Are Equivalent},
  author    = {Abernethy, Jacob and Bartlett, Peter L and Hazan, Elad},
  booktitle = {Proceedings of the 24th Annual Conference on Learning Theory},
  volume    = {19},
  pages     = {27--46},
  year      = {2011},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Test \citet{abernethy2011blackwell}

\printbibliography
\end{document}

Abernethy, Jacob、Peter L Bartlett 和 Elad Hazan。2011 年。“布莱克威尔可接近性和无悔学习是等价的。”第 24 届学习理论年会论文集,19:27-46。

相关内容