1

I want to change the field format of editor only when the entry type is incollection. So that the author name remains bold. The editor name should not be bold.

I've attached an example:

\documentclass[12pt]{scrartcl}
%
\usepackage[%
backend=biber,%
citestyle=authoryear,%-comp,%
bibstyle=authortitle,%
]{biblatex}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{filecontents}
\usepackage{verbatim}
\usepackage{csquotes}
%\usepackage{newtxtext}
%\usepackage{mathptmx}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\fontspec[
% SmallCapsFont=Times,
 SmallCapsFeatures={Letters=SmallCaps}]{Times New Roman}
 %\setmainfont[SmallCapsFont=Times]{Times New Roman}
%
\addbibresource{\jobname.bib} 
% ===
% ===============
\renewcommand{\finentrypunct}{}% kein Punkt am Ende im LitVZ
% ==========================================================
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}%Kapitaelchen Name
%\renewcommand{\mkbibnamegiven}[1]{\textsc{#1}}%Kapitaelchen Vorname
% ==========================================================
\renewcommand*{\multinamedelim}{~/\space}% Separation der Autoren
  \renewcommand*{\finalnamedelim}{~/\space}%
% ==========================================================
%\renewcommand*{\labelnamepunct}{}%\newunitpunct}
\renewcommand*{\newunitpunct}{\addcomma\space}% Bibentry Felder werden mit Komma getrennt
% ==========================================================
\renewbibmacro{in:}{% kein 'in' bei @article
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% ==========================================================
\renewbibmacro{issue+date}{%
  %\printtext[parens]{% Klammern um Jahr weg
    \printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}%}%
  \newunit}
% ===============
% =====
\newbibmacro*{cite:article:journal}{%
       \newunit
       \printfield{journaltitle}
       %\newunit% no comma between journal and year
}
%
\newbibmacro*{cite:article:pages}{%
\newunit%\addcomma
\printfield{pages}}
%
\newbibmacro*{cite:book:shorttitle}{%
  \printfield[citetitle]{labeltitle}}
%
\renewbibmacro{postnote}{%
  \iffieldundef{postnote}
    {}
    {%\setunit{%\postnotedelim}%
    \printfield{postnote}}}
% ======================
\makeatletter
%% ===
\renewbibmacro{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
       \ifentrytype{book}% === field
       {\setunit{\printdelim{nametitledelim}}\usebibmacro{cite:book:shorttitle}}% === true
       {}%\usebibmacro{cite:labeldate+extradate}% === false
        \ifentrytype{article}% === field
        {\usebibmacro{cite:article:journal}\usebibmacro{cite:labeldate+extradate}
        \usebibmacro{cite:article:pages}%
        }% === true
     {}% === false
    {\usebibmacro{cite:shorthand}}
    }
    }
\makeatother
% ===
% ===
% ===
% =========== incollection bib driver
\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \newunit\newblock
  \usebibmacro{editor+others}% It shouldn't be bold
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
%  \usebibmacro{editor+others}% OLD
  \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
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
% ===
% ===
% ===
% === BIB
\begin{filecontents}{\jobname.bib}
@book{book,
    author      = {Brox, Hans and Walker, Wolf-Dietrich},
    shortauthor = {Brox/Walker},
    title       = {Allgemeiner Teil BGB},
    shorttitle  = {BGB AT},
    year        = {2012},
    edition     = {36},
}

@article{article,
    author      = {Jorg Neuner},
    title       = {Was ist eine Willenserklärung?},
    journal     = {JuS},
    year        = {2007},
    pages       = {881-888},
}

@misc{misc,
    TITLE           = {Beck'scher Online-Kommentar BGB},
    SHORTTITLE      = {},
    EDITOR          = {Bamberger, Heinz Georg and Roth, Herbert and Hau, Wolfgang and Poseck, Roman},
    SHORTAUTHOR     = {BeckOK},
    VOLUME          = {},
    VOLUMETITLE     = {},
    YEAR            = {2018},
    ADDRESS         = {},
    EDITION         = {45},
    %HOWCITED       = {1},
}

@incollection{incoll,
    TITLE           = {Unvernunft als Zurechnungskriterium in den "Retterfällen"},
    AUTHOR          = {Beckemper, Katharina},   
    BOOKTITLE       = {Strafrecht als Scientia Universalis - Festschrift f{\"u}r Claus Roxin zum 80. Geburtstag},
    EDITOR          = {Manfred, Heinrich},
    SHORTTITLE      = {FS Roxin},
    YEAR            = {2011},
    PAGES           = {397--411},
}
\end{filecontents}
%
\begin{document}
\fontspec[
 %SmallCapsFont=Times,
 SmallCapsFeatures={Letters=SmallCaps}]{Times New Roman}
% ===
\printbibliography[title=Bibliography]
%
I want to achieve that the editor is not bold when using the \verb|\ifentrytype{incollection}|.\footcite{incoll}\\
\\The author should remain bold.
\end{document}

I'm also using this biblatex.cfg:

% !TEX encoding = UTF-8 Unicode

\ProvidesFile{biblatex.cfg}
%
% ==========================================================
% === Autoren Fett, Nachname, Vorname ====
%
\DeclareNameAlias{sortname}{last-first-bold}
\DeclareNameFormat{last-first-bold}{\mkbibbold{%
  \ifgiveninits
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
  \usebibmacro{name:andothers}}}
% ==========================================================
% === Titel nicht kursiv ===
%
\DeclareFieldFormat{citetitle}{\normalfont{#1}}% Zitate: Schriftart der Titel
\DeclareFieldFormat{title}{\normalfont{#1}}% Titel im LitVZ
\DeclareFieldFormat{journaltitle}{\normalfont{#1}}%
% ==========================================================
% === kein Punkt in Library ===
%
\renewcommand{\finentrypunct}{}% Kein Punkt am Ende des Eintrags im LitVZ
% ==========================================================
% === Hrsg. ===
%
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}% Authortyp in Klammern
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}% Editortyp in Klammern
% ==========================================================
\DeclareDelimFormat{authortypedelim}{\space}% Kein Komma nach Autor
\DeclareDelimFormat{editortypedelim}{\space}% Kein Komma nach Editor
% ==========================================================
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace%\labelnamepunct% Kein Punkt zwischen Autoren und Werk
}
% ==========================================================
% === Auflage/Aufl. ===
%
\DefineBibliographyStrings{german}{%
  edition          = {\ifbibliography{Auflage}{Aufl\adddot}},% 'Auflage' statt 'Aufl.'
}
% ==========================================================
% === Erkennt Satzzeichen & setzt kein Komma ausser bei Abkurzungen ===
%
\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}
% ==========================================================

\endinput

Any ideas?

  • What version of biblatex are you running? (You can find out by adding \listfiles to the beginning of your .tex file, TeX will then write a list of packages and their versions to the .log file.) – moewe Jul 11 '18 at 13:12
  • @moewe biblatex 3.11 – texnewbie Jul 11 '18 at 13:16
2

I would not use editor+others after in: for @incollection and friends. Instead I would define a new macro that can be used in that place and uses its own format.

\documentclass[12pt]{scrartcl}
%
\usepackage[%
backend=biber,%
citestyle=authoryear,%-comp,%
bibstyle=authortitle,%
]{biblatex}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{libertine}

\usepackage{filecontents}

\usepackage{csquotes}

\addbibresource{\jobname.bib} 
\DeclareNameAlias{sortname}{family-given-bold}
\DeclareNameFormat{family-given-bold}{\mkbibbold{%
  \ifgiveninits
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}
    {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
  \usebibmacro{name:andothers}}}


\DeclareFieldFormat{citetitle}{\normalfont{#1}}
\DeclareFieldFormat{title}{\normalfont{#1}}
\DeclareFieldFormat{journaltitle}{\normalfont{#1}}%

\renewcommand{\finentrypunct}{}

\DeclareFieldFormat{authortype}{\mkbibparens{#1}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{authortypedelim}{\addspace}
\DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addspace}

\DefineBibliographyStrings{german}{%
  edition          = {\ifbibliography{Auflage}{Aufl\adddot}},
}

\DefineBibliographyExtras{german}{\DeclarePunctuationPairs{comma}{*}}


\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
%\renewcommand{\mkbibnamegiven}[1]{\textsc{#1}}
\DeclareDelimFormat{multinamedelim}{\addnbspace/\space}%
\DeclareDelimAlias{finalnamedelim}{multinamedelim}%

%\renewcommand*{\labelnamepunct}{}%\newunitpunct}
\renewcommand*{\newunitpunct}{\addcomma\space}%

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\renewbibmacro{issue+date}{%
  %\printtext[parens]{%
    \printfield{issue}%
    \setunit*{\addspace}%
    \usebibmacro{date}%}%
  \newunit}

\newbibmacro*{cite:article:journal}{%
  \newunit
  \printfield{journaltitle}%
  %\newunit%
}

\newbibmacro*{cite:article:pages}{%
  \newunit%\addcomma
  \printfield{pages}}

\newbibmacro*{cite:book:shorttitle}{%
  \printfield[citetitle]{labeltitle}}

\renewbibmacro{postnote}{%
  \iffieldundef{postnote}
    {}
    {%\setunit{%\postnotedelim}%
     \printfield{postnote}}}

\makeatletter
\renewbibmacro{cite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
     \ifentrytype{book}%
       {\setunit{\printdelim{nametitledelim}}\usebibmacro{cite:book:shorttitle}}%
       {}%\usebibmacro{cite:labeldate+extradate}%
     \ifentrytype{article}%
       {\usebibmacro{cite:article:journal}\usebibmacro{cite:labeldate+extradate}
        \usebibmacro{cite:article:pages}}
       {}%
    {\usebibmacro{cite:shorthand}}}}
\makeatother


%%%%%%%%%%%% answer starts here %%%%%%%%%%%%%%%%%%
\DeclareNameAlias{ineditor}{family-given}

\newbibmacro*{bbx:in:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\printnames[ineditor]{editor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {}}
\newbibmacro*{in:editor}{%
  \usebibmacro{bbx:in:editor}{editorstrg}}
\newbibmacro*{in:editor+others}{%
  \usebibmacro{bbx:in:editor}{editor+othersstrg}}

\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \newunit\newblock
  \usebibmacro{in:editor+others}%<----- new macro
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
%  \usebibmacro{editor+others}% OLD
  \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
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\begin{filecontents}{\jobname.bib}
@book{book,
  author      = {Brox, Hans and Walker, Wolf-Dietrich},
  title       = {Allgemeiner Teil BGB},
  shorttitle  = {BGB AT},
  year        = {2012},
  edition     = {36},
}

@article{article,
  author      = {Jorg Neuner},
  title       = {Was ist eine Willenserklärung?},
  journal     = {JuS},
  year        = {2007},
  pages       = {881-888},
}

@misc{misc,
  title       = {Beck'scher Online-Kommentar BGB},
  editor      = {Bamberger, Heinz Georg and Roth, Herbert and Hau, Wolfgang and Poseck, Roman},
  shortauthor = {BeckOK},
  year        = {2018},
  edition     = {45},
  %HOWCITED   = {1},
}

@incollection{incoll,
  title      = {Unvernunft als Zurechnungskriterium in den \enquote{Retterfällen}},
  author     = {Beckemper, Katharina},
  booktitle  = {Strafrecht als Scientia Universalis - Festschrift für Claus Roxin zum 80. Geburtstag},
  editor     = {Manfred, Heinrich},
  shortitle  = {FS Roxin},
  year       = {2011},
  pages      = {397--411},
}
\end{filecontents}
%
\begin{document}
\printbibliography[title=Bibliography]
%
I want to achieve that the editor is not bold when using the \verb|\ifentrytype{incollection}|.\footcite{incoll}\\
\\The author should remain bold.
\end{document}

Note that in the MWE I merged the contents of biblatex.cfg into the preamble. At least here I saw no good reason to keep the two separated (and it makes the example self-contained).

enter image description here

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.