如何编辑 bst 文件以在 @incollection 中将编辑者排在书名之前?当前代码
\documentclass{article}
\usepackage{natbib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{key,
Author = {Tony Soprano},
Booktitle = {Book title},
Editor = {Sonny Crockett and Ricardo Tubbs },
Pages = {1-10},
Publisher = {Oxford: OUP},
Title = {Title of the chapter},
Year = {2001}}
\end{filecontents}
\begin{document}
\noindent \cite{key} wrote it first.
\bibliographystyle{degruyterbib}
\bibliography{\jobname}
\end{document}
而期望的结果是书名前带有“in: editors (eds.),”的序列,如下所示:
我已经在 .bst 文件中重新排序了除这个有问题的元素之外的其他元素(基于 Alexis Dimitriadis linquiry.bst)。以下是相关函数:
FUNCTION {bbl.in}
{ "in:" }
FUNCTION {word.in}
{ bbl.in capitalize
" " * }
FUNCTION {bbl.editor}
{ "(ed.)," }
FUNCTION {format.editors}
{ editor empty$
{ "" }
{ editor format.names
editor num.names$ #1 >
{ ", " * bbl.editors * }
{ ", " * bbl.editor * }
if$
}
if$
}
FUNCTION {format.in.editors}
{ editor empty$
{ "" }
{ editor format.names.ed
}
if$
}
包括我遇到的主要问题:
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
{ "" }
{ editor empty$
{ word.in booktitle "t" change.case$ emphasize * }
{ word.in booktitle "t" change.case$ emphasize *
", " *
editor num.names$ #1 >
{ bbl.editors }
{ bbl.editor }
if$
* " " *
format.in.editors *
}
if$
}
if$
}