biblatex:如何删除 ed./eds. 之前的逗号?

biblatex:如何删除 ed./eds. 之前的逗号?

我怎样才能删除 ed. 或 eds. 之前的逗号并将此缩写放在括号中?我正在使用 biblatex。

例如这个参考:

Dozy,Reinhart,编辑:阿拉伯词典补充。第 3 版2 卷莱顿:布里尔,1967 年。

看起来应该是这样的:

Dozy,Reinhart(编辑):阿拉伯词典补充。第 3 版2 卷莱顿:布里尔,1967 年。

此外,我想将“第 3 版”中的“rd”放在上标中。可以吗?

编辑:这是一个最小的例子(包括 lockstep 的上标解决方案,抱歉上次没有给出一个例子):

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[a4paper,12pt,final, oneside]{memoir}


% ********************************************************************
% Biblatex + Bibliography
% ********************************************************************

\usepackage[style=authortitle-ibid, sorting=nty, hyperref=auto]{biblatex}
\usepackage[english=british]{csquotes}
\bibliography{Bibliography}
\defbibheading{prim}{\subsection*{{Primary Sources}}}
\defbibheading{sec}{\subsection*{{Secondary Sources}}}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\DeclareFieldFormat{postnote}{#1}%%keine Anzeige von S.
\renewcommand{\labelnamepunct}{\addcolon\addspace} %%Doppelpunkt nach Autor

%Serientitel in Klammern und nach der bibliographischen Angabe
\renewbibmacro*{series+number}{}
\renewbibmacro*{publisher+location+date}{%
 \printlist{location}%
  \iflistundef{publisher}%
   {\setunit*{\space}}%
    {\setunit*{\addcolon\space}}%
  \printlist{publisher}%
    \setunit*{\addcomma\space}%
  \printfield{year}%
  \setunit*{\space}%
  \iffieldundef{series}%
    {}%
    {\printtext[brackets]{%
      =\addnbspace%
      \printfield{series}%
      \setunit*{\addspace}%
      \printfield{number}}}%
 \newunit}


%%Ed. in parenthesis
\renewbibmacro*{editor}{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\printnames{editor}%
%     \setunit{\addcomma\space}% DELETED
%     \usebibmacro{editorstrg}% DELETED
     \setunit{\addspace}% ADDED
     \printtext[parens]{\usebibmacro{editorstrg}}% ADDED
     \clearname{editor}}
    {}}

\renewbibmacro*{editor+others}{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\printnames{editor}%
%     \setunit{\addcomma\space}% DELETED
%     \usebibmacro{editor+othersstrg}% DELETED
     \setunit{\addspace}% ADDED
     \printtext[parens]{\usebibmacro{editor+othersstrg}}% ADDED
     \clearname{editor}}
    {}}


%Superscript for cardinal numbers before edition
\usepackage[super]{nth}
\AtBeginDocument{\renewcommand*{\mkbibordinal}[1]{\nth{#1}}}

\begin{document}

\printbibliography[heading=prim, keyword=prim, nottype=reference]
\printbibliography[heading=sec, notkeyword=prim, nottype=reference]


\end{document}

答案1

由于您没有提供最小的示例,我假设采用默认numeric样式。

编辑:最小示例更改为风格autortitle和朋友。

\documentclass{article}

\usepackage[style=authortitle-ibid]{biblatex}

\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
%   \setunit{\addcomma\space}% DELETED
    \setunit{\addspace}% ADDED
    \usebibmacro{bbx:savehash}}%
%     \usebibmacro{#1}% DELETED
     \printtext[parens]{\usebibmacro{#1}}% ADDED
     \clearname{editor}}
    {\global\undef\bbx@lasthash}}
\makeatother

\usepackage[super]{nth}
\AtBeginDocument{\renewcommand*{\mkbibordinal}[1]{\nth{#1}}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@collection{A01,
  editor = {Author, A.},
  year = {2001},
  title = {Alpha},
  edition = {3},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}

答案2

使用较新版本biblatex你只需要

\DeclareDelimFormat{editortypedelim}{\addspace}

编辑姓名和“ed.”之间的空格。翻译人员也有相同的分隔符

\DeclareDelimFormat{translatortypedelim}{\addspace}

您将得到“ed.”和“trans.”周围的括号

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}

没必要重新定义bbx:editor

在实践中,建议(因为冗余较少)使用别名translator

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

% (ed.)/(eds.) for editors
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

% same for (trans.)
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{vizedom:related,westfahl:frontier}
\printbibliography
\end{document}

相关内容