更改参考书目条目和 Babel 问题的格式

更改参考书目条目和 Babel 问题的格式

我想更改参考书目条目的显示格式。我尝试过重新定义宏,但由于我也在包中使用爱沙尼亚语babel,因此它会覆盖我的定义。目前,此条目

@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}

出现为

Ian Goodfellow、Jean Pouget-Abadie、Mehdi Mirza、Bing Xu、David Warde-Farley、Sherjil Ozair 和 Aaron Courville Yoshua Bengio。生成对抗网络。主题:神经信息处理系统. Toim. Z. Ghahramani、M. Welling、C. Cortes、ND Lawrence 和 KQ Weinberger。纽约:Curran Associates, Inc.,2014 年,第 2672–2680 页。

但希望它看起来像

Ian Goodfellow、Jean Pouget-Abadie、Mehdi Mirza、Bing Xu、David Warde-Farley、Sherjil Ozair 和 Aaron Courville 与 Yoshua Bengio 2014。生成对抗网络。-神经信息处理系统. 编著 Z. Ghahramani、M. Welling、C. Cortes、ND Lawrence 和 KQ Weinberger。纽约:Curran Associates, Inc.,第 2672–2680 页

应该booktitle用斜体表示。

例如,我尝试重新定义in:bibmacro

\renewbibmacro*{in:}{%
  \setunit{\addperiod\space\textendash\space}}

但由于babel输出没有改变。

编辑,添加 MWEB

\documentclass{article}

\usepackage[estonian .notilde]{babel}

\usepackage[backend=biber, citestyle=authoryear, maxbibnames=99]{biblatex}
\DeclareFieldFormat{labelnumberwidth}{} % Doesn't print anything in the label
\setlength{\biblabelsep}{0pt} % Eliminates the spacing before the entries
\DeclareFieldFormat*{title}{#1} % No quotation marks

% This redefinition doesn't change anything due to babel
\renewbibmacro*{in:}{%
  \setunit{\addperiod\space\textendash\space}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza and Bing Xu and David Warde-Farley and Sherjil Ozair and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
    \parencite{gan}
    \printbibliography
\end{document}

答案1

estonain.lbx重新定义了 bibmacro in:\DeclareBibliographyExtras以一种违背分离风格和本地化思想的方式,但有时这被认为是必要的;在英语中也能看到类似的效果如何去掉三位或更多作者列表中的“牛津逗号”?, 法语:在 biblatex 中保留小写,意大利语:Biblatex 中的自定义破折号,一个更极端的例子是magyar.lbx)。如果您想覆盖该定义,则需要在内进行\DefineBibliographyExtras{estonian}

我还根据您的示例条目更改了一些 bibstring(我不懂爱沙尼亚语,我只采用了英文字符串)。

请注意,我切换到了完整authoryear样式,style=authoryear,而不是伪造citestyle=authoryear,并抑制数字标签。

\documentclass{article}
\usepackage[estonian.notilde]{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=authoryear, maxbibnames=99]{biblatex}

\DeclareFieldFormat*{title}{#1}

\DefineBibliographyExtras{estonian}{%
  \renewbibmacro*{in:}{%
    \setunit{\addperiod\space\textendash\space}}}

\DefineBibliographyStrings{estonian}{
  editor           = {ed\adddot},
  editors          = {ed\adddot},
  byeditor         = {ed\adddot},
  page             = {p\adddot},
  pages            = {pp\adddot},
}

\begin{filecontents}{\jobname.bib}
@inproceedings{gan,
  author    = {Ian Goodfellow and Jean Pouget-Abadie and Mehdi Mirza
               and Bing Xu and David Warde-Farley and Sherjil Ozair
               and Aaron Courville Yoshua Bengio},
  title     = {Generative adversarial networks},
  booktitle = {{NIPS}},
  editor    = {Z. Ghahramani and M. Welling and C. Cortes
               and N. D. Lawrence and K. Q. Weinberger},
  pages     = {2672--2680},
  year      = {2014},
  publisher = {Curran Associates, Inc.},
  location  = {New York},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  \parencite{gan}
  \printbibliography
\end{document}

Goodfellow, Ian、Jean Pouget-Abadie、Mehdi Mirza、Bing Xu、David Warde-Farley、Sherjil Ozair 和 Aaron Courville Yoshua Bengio (2014)。生成对抗网络。– NIPS。编者 Z. Ghahramani、M. Welling、C. Cortes、ND Lawrence 和 KQ Weinberger。纽约:Curran Associates, Inc.,第 2672-2680 页。

相关内容