如何改变编辑器在 biblatex @inbook 中的显示方式/样式?

如何改变编辑器在 biblatex @inbook 中的显示方式/样式?

我想引用一本由多位作者撰写的书中的一个章节,@inbook其中的内容如下:

[1] A. Fischer、W. Dudzinski、B. Gleising、P. Stemmer,摩擦分析(编辑:M. Dienwiebel、M.-I. de Barros),Springer,柏林,德国2018,第 2 章。

但是我不知道如何获取表格中的编辑者(编辑姓名)和章节从“chap.”到“Ch.”

使用我的代码,我得到:

[1] A. Fischer、W. Dudzinski、B. Gleising、P. Stemmer,摩擦分析,由 M. Dienwiebel、M.-I. de Barros 编辑,Springer,柏林,德国2018,第 2 章。

我的代码是:

\documentclass{article}

\usepackage[
  style = numeric,
  backend=biber,   
  autolang=hyphen, 
  sorting=none,    
  maxbibnames=99,
  doi=false,isbn=false,url=false,
  giveninits=true,
  date=year,
  punctfont=true,
]{biblatex}

\DeclareBibliographyDriver{inbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{booktitle}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \iflistundef{publisher}
    {\setunit*{\addcomma\space}}
    {\setunit*{\addcomma\space}}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit
  \newunit\newblock
  \printfield{chapter}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\renewcommand*{\newunitpunct}{\addcomma\space} % replaces . with , 
\renewcommand*{\intitlepunct}{\space} %removes : after in
\DeclareFieldFormat{date}{\mkbibbold{#1}} %write date in bold
\DeclareFieldFormat{parens}{#1} 

\addbibresource{references.bib}
\begin{document}
\title{Test title}
\section{Introduction}
Just some example text~\cite{Fischer2018}.
\medskip
\printbibliography
\end{document}

references.bib 文件:

@inbook{Fischer2018,
   author = {Fischer, A. and Dudzinski, W.  and Gleising, B.  and Stemmer, P.},
   title = {Analyzing Mild- and Ultra-Mild Sliding Wear of Metallic Materials by Transmission Electron Microscopy},
   booktitle = {Triboanalytics},
   editor = {Dienwiebel, M. and de Barros, M.-I.},
   publisher = {Springer},
   address = {Berlin, Germany},
   pages = {29-59},
   year = {2018},
   type = {Book Section},
   chapter = {2}
}

也许有人可以帮助我将参考书目中的“ed. by”改为“(Eds. names)”,并将“chap.”改为“Ch.”。

答案1

对于大多数意图和目的而言(即当您只使用editor而不是editora...editorc和朋友时),重新定义 bibmacro 就足够了byeditor+others

有问题的条目通常是@incollection而不是@inbook,所以我也改变了它(例如参见我的@inbook 没有显示编辑者和书名?)。

\documentclass{article}

\usepackage[
  style = numeric,
  backend=biber,   
  autolang=hyphen, 
  sorting=none,    
  maxbibnames=99,
  doi=false, isbn=false, url=false,
  giveninits=true,
  date=year,
  punctfont=true,
]{biblatex}

\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{booktitle}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \setunit*{\addcomma\space}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}
  \printlist{location}%
  \setunit*{\space}%
  \usebibmacro{date}%
  \newunit
  \newunit\newblock
  \printfield{chapter}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\setunit{\addspace}%
     \printtext[parens]{%
       \bibsentence
       \usebibmacro{editor+othersstrg}%
       \setunit{\addcolon\space}%
       \printnames[byeditor]{editor}%
       \clearname{editor}%
       \newunit}}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\renewcommand*{\newunitpunct}{\addcomma\space} % replaces . with , 
\renewcommand*{\intitlepunct}{\space} %removes : after in
\DeclareFieldFormat{date}{\mkbibbold{#1}} %write date in bold

\DefineBibliographyStrings{english}{
  chapter  = {Ch\adddot},
}

\begin{filecontents}{\jobname.bib}
@incollection{Fischer2018,
   author = {Fischer, A. and Dudzinski, W.  and Gleising, B.  and Stemmer, P.},
   title = {Analyzing Mild- and Ultra-Mild Sliding Wear of Metallic Materials by Transmission Electron Microscopy},
   booktitle = {Triboanalytics},
   editor = {Dienwiebel, M. and de Barros, M.-I.},
   publisher = {Springer},
   address = {Berlin, Germany},
   pages = {29-59},
   year = {2018},
   type = {Book Section},
   chapter = {2}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Just some example text \autocite{Fischer2018}.
\printbibliography
\end{document}

A. Fischer、W. Dudzinski、B. Gleising 和 P. Stemmer,载于《Triboanalytics》(编辑:M. Dienwiebel 和 M.-I. de Barros),Springer,柏林,德国 2018 年,第 2 章。

相关内容