11

How can I remove the comma before ed. or eds. and put this abbreviation in parentheses? I'm using biblatex.

For example this reference:

Dozy, Reinhart, ed.: Supplément aux dictionnaires arabes. 3rd ed. 2 vols. Leiden: Brill, 1967.

should look like this:

Dozy, Reinhart (ed.): Supplément aux dictionnaires arabes. 3rd ed. 2 vols. Leiden: Brill, 1967.

Moreover, I would like to have the "rd" of "3rd edition" in superscript. Is this possible?

EDIT: Here is a minimal example (with lockstep's solution for superscripts inluded, sorry for not having given an example the last time):

%!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}
8

Since you did not provide a minimal example, I'm assuming the default numeric style.

EDIT: Minimal exampe changed to style autortitle & friends.

\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}
  • Thank you for your fast reply! The superscript works perfectly. Unfortunately, for the redefinition of the editor format I get the response: \abx@macro@editor+others ->\ifboolexpr { test \ifuseeditor and not test {\if... – Christopher Oct 1 '11 at 13:34
  • @Christopher: Edit your original question to include informations about the style you use and other possible redefinitions. – lockstep Oct 1 '11 at 13:36
  • Thanks for changing your example to the authortitle-style, but I still get the same error message: ! Undefined control sequence. \abx@macro@bbx:editor #1->\ifboolexpr { test \ifuseeditor and not test {\ifn... – Christopher Oct 1 '11 at 14:42
  • Do I have to make some changes? I tried your minimal example and it causes the same error message. Maybe there is a typing error somewhere? – Christopher Oct 1 '11 at 14:44
  • 1
    Try my minimal example without any changes. – lockstep Oct 1 '11 at 14:54
2

With more recent versions of biblatex you only need

\DeclareDelimFormat{editortypedelim}{\addspace}

for the space between the editor name and "ed.". The same delimiter exists for translators

\DeclareDelimFormat{translatortypedelim}{\addspace}

You get the parentheses around "ed." and "trans." with

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

There is no need to redefine bbx:editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.