在条目末尾列出作者或编辑者

在条目末尾列出作者或编辑者

在我的 CV 中,我想使用 biblatex(biber,数字样式)并在条目末尾列出作者和编辑者。我首先在 bibfile 中标识特定的作者/编辑者,将其从作者/编辑者字段中删除,然后将作者/编辑者字段的内容放在 bibentry 的末尾。以下是它的编码方式:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{bibliography.bib}
@collection{cit:kline2015ActPro,
    Address = {Barcelona},
    Booktitle = {Actas. Proceedings of the VIII. Conference of the Society of Right},
    Title = {Actas. Proceedings of the VIII. Conference of the Society of Right},
    Editor = {Kline, Peter and Wurst, Hans},
    Publisher = {Universitat de Barcelona},
    Year = {2015}
}

@collection{cit:maki2015RecDev,
    Address = {Heidelberg},
    Booktitle = {Recent Developments in the Philosophy of Science: EPSA13 Helsinki},
    Editor = {M{\"a}ki, Uskali and Votsis, Ioannis and Ruphy, Stephanie and Schurz, Gerhard},
    Files = {cit.maki2015RecDev.pdf},
    Publisher = {Springer},
    Title = {Recent Developments in the Philosophy of Science: EPSA13 Helsinki},
    Year = {2015}
}

@incollection{cit:kline2015EquWei,
    Author = {Kline, Peter},
    Crossref = {cit:maki2015RecDev},
    Date-Added = {2018-08-29 17:02:50 +0200},
    Date-Modified = {2018-08-29 17:02:50 +0200},
    Doi = {10.1007/978-3-319-23015-3_7},
    Files = {cit.feldbacher-escamilla2015EquWei.pdf},
    Pages = {87-98},
    Title = {Is the Equal-Weight View Really Supported by Positive Crowd Effects?}
}

@book{cit:kline2019EleDef,
    Address = {Wiesbaden},
    Author = {Wurst, Hans and Kline, Peter},
    Publisher = {Springer},
    Title = {Elementare Definitionstheorie},
    Year = {2019}
}


@article{cit:kline2017OneDog,
    Author = {Wurst, Hans and Kline, Peter and Forest, Chris},
    Journal = {Logique et Analyse},
    Pages = {429-444},
    Title = {One Dogma of Analyticism},
    Volume = {240},
    Issue = {1},
    Year = {2017}
}

@article{cit:wurst2018NoSe,
    Author = {Wurst, Hans},
    Journal = {Synthese},
    Pages = {329-344},
    Title = {No Se},
    Volume = {140},
    Issue = {1},
    Year = {2018}
}
\end{filecontents}

\usepackage[backend=biber,maxnames=99]{biblatex}
\addbibresource{bibliography.bib}

\DeclareSourcemap{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \maps[datatype=bibtex,overwrite=true]{%                                 %
        %IDENTIFY author/editor's (Kline, Peter) publications and mark them %
        \map{%                                                              %
            \step[fieldsource=author,match=\regexp{Kline,\s+Peter},final]%  %
            \step[fieldset=keywords,fieldvalue=mybib]%                      %
        }%                                                                  %
        \map{%                                                              %
            \step[fieldsource=editor,match=\regexp{Kline,\s+Peter},final]%  %
            \step[fieldset=keywords,fieldvalue=mybib]%                      %
        }%                                                                  %
        %REMOVE author/editor's name mark co-authorship                     %
        \map{%                                                              %
            \step[fieldsource=keywords,match=mybib,final]%                  %
            \step[fieldsource=author,match=\regexp{\s*(and)?\s*Kline,\s*Peter\s*(and)?},replace=\regexp{}]%                                     %
            \step[fieldsource=author,match=\regexp{(.+)},replace=\regexp{\{(together~with~$1)\}}]%                                                  %
            \step[fieldsource=editor,match=\regexp{\s*(and)?\s*Kline,\s*Peter\s*(and)?},replace=\regexp{}]%                                     %
            \step[fieldsource=editor,match=\regexp{(.+)},replace=\regexp{\{(together~with~$1)\}}]%                                                  %
        }%                                                                  %
    }%                                                                      %
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%PLACE information on co-authors at the end of the bib-entry%%%%%%%%%%%%%%%%%
\renewbibmacro*{finentry}{%                                                 %
    \ifnameundef{author}{}{. }\printnames{author}\finentry%                 %
    \ifnameundef{editor}{}{. }\printnames{editor}\finentry%                 %
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%SUPRESS output of author field%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewbibmacro*{author}{}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\sloppy

\noindent Here is a list of Peter Kline's publications.

\nocite{*}
\printbibliography[keyword=mybib,title={List of Publications}]

\end{document}

输出如下: 在此处输入图片描述

如您所见,它对作者字段(条目 1、3、4)运行良好。问题是它对编辑者字段(条目 2)不起作用。知道为什么吗?

非常感谢,祝一切顺利,克里斯蒂安

答案1

您需要重新定义一些宏。并且您需要一个技巧来避免编辑器在不需要的地方打印。请注意我如何使用biblatex常用的标点符号命令而不是文字句号和检查。

\documentclass{article}
\usepackage[backend=biber,maxnames=99]{biblatex}

\renewbibmacro*{finentry}{%
  \newunit\newblock
  \printnames{author}%
  \newunit\newblock
  \restorename{editor}{\savededitor}%
  \global\undef\savededitor
  \printnames{editor}%
  \finentry
}

\renewbibmacro*{author}{}
\renewbibmacro*{author/editor}{}
\renewbibmacro*{author/translator+others}{}
\renewbibmacro*{author/editor+others/translator+others}{}
\renewbibmacro*{editor}{\savename{editor}{\savededitor}\clearname{editor}}
\renewbibmacro*{editor+others}{\savename{editor}{\savededitor}\clearname{editor}}

\DeclareSourcemap{%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \maps[datatype=bibtex,overwrite=true]{%                                 %
        %IDENTIFY author/editor's (Kline, Peter) publications and mark them %
        \map{%                                                              %
            \step[fieldsource=author,match=\regexp{Kline,\s+Peter},final]%  %
            \step[fieldset=keywords,fieldvalue=mybib]%                      %
        }%                                                                  %
        \map{%                                                              %
            \step[fieldsource=editor,match=\regexp{Kline,\s+Peter},final]%  %
            \step[fieldset=keywords,fieldvalue=mybib]%                      %
        }%                                                                  %
        %REMOVE author/editor's name mark co-authorship                     %
        \map{%                                                              %
            \step[fieldsource=keywords,match=mybib,final]%                  %
            \step[fieldsource=author,match=\regexp{\s*(and)?\s*Kline,\s*Peter\s*(and)?},replace=\regexp{}]%                                     %
            \step[fieldsource=author,match=\regexp{(.+)},replace=\regexp{\{(together~with~$1)\}}]%                                                  %
            \step[fieldsource=editor,match=\regexp{\s*(and)?\s*Kline,\s*Peter\s*(and)?},replace=\regexp{}]%                                     %
            \step[fieldsource=editor,match=\regexp{(.+)},replace=\regexp{\{(together~with~$1)\}}]%                                                  %
        }%                                                                  %
    }%                                                                      %
}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@collection{cit:kline2015ActPro,
    Address = {Barcelona},
    Booktitle = {Actas. Proceedings of the VIII. Conference of the Society of Right},
    Title = {Actas. Proceedings of the VIII. Conference of the Society of Right},
    Editor = {Kline, Peter and Wurst, Hans},
    Publisher = {Universitat de Barcelona},
    Year = {2015}
}

@collection{cit:maki2015RecDev,
    Address = {Heidelberg},
    Booktitle = {Recent Developments in the Philosophy of Science: EPSA13 Helsinki},
    Editor = {M{\"a}ki, Uskali and Votsis, Ioannis and Ruphy, Stephanie and Schurz, Gerhard},
    Files = {cit.maki2015RecDev.pdf},
    Publisher = {Springer},
    Title = {Recent Developments in the Philosophy of Science: EPSA13 Helsinki},
    Year = {2015}
}

@incollection{cit:kline2015EquWei,
    Author = {Kline, Peter},
    Crossref = {cit:maki2015RecDev},
    Doi = {10.1007/978-3-319-23015-3_7},
    Pages = {87-98},
    Title = {Is the Equal-Weight View Really Supported by Positive Crowd Effects?}
}

@book{cit:kline2019EleDef,
    Address = {Wiesbaden},
    Author = {Wurst, Hans and Kline, Peter},
    Publisher = {Springer},
    Title = {Elementare Definitionstheorie},
    Year = {2019}
}


@article{cit:kline2017OneDog,
    Author = {Wurst, Hans and Kline, Peter and Forest, Chris},
    Journal = {Logique et Analyse},
    Pages = {429-444},
    Title = {One Dogma of Analyticism},
    Volume = {240},
    Issue = {1},
    Year = {2017}
}

@article{cit:wurst2018NoSe,
    Author = {Wurst, Hans},
    Journal = {Synthese},
    Pages = {329-344},
    Title = {No Se},
    Volume = {140},
    Issue = {1},
    Year = {2018}
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\sloppy
\noindent Here is a list of Peter Kline's publications.

\nocite{*}
\printbibliography[keyword=mybib,title={List of Publications}]
\end{document}

第 2 项内容为“Actas. 第八届右派学会大会论文集。巴塞罗那:巴塞罗那大学,2015 年。(与汉斯·沃斯特合作)”。

相关内容