0

I want to customize my bibliography and format the names in italics. But I do not want to format the editor's name in italics.

To format the names, I use the code below. But how can I differ the author's and editor's names?

How can I change the title to normalfont?

\documentclass{scrbook}
\begin{filecontents*}{test.bib}
    @book{Test.2021,
        author   = {Mustermann, Thomas},
        year     = {2021},
        title    = {Mustertitel},
        editor   =  {Musterfrau, Erika},
    }
\end{filecontents*}
\usepackage[backend=biber, style=authoryear-ibid, bibstyle=authortitle]{biblatex}
\addbibresource{test.bib}
\renewcommand{\mkbibnamefamily}[1]{\mkbibemph{#1}}
\renewcommand{\mkbibnamegiven}[1]{\mkbibemph{#1}}

\begin{document}
Dies ist ein Test.\footcite{Test.2021}
\printbibliography
\end{document}

1 Answer 1

0

We can use the name wrapper format to switch the name formatting more locally. In particular sortname applies only to the primary name in the bibliography and labelname to the citations.

Instead of \mkbibnamefamily and \mkbibnamegiven we redefine \mkbibcompletename to format the whole name at once.

\documentclass{scrbook}
\usepackage[backend=biber, style=authoryear-ibid, bibstyle=authortitle]{biblatex}

\DeclareNameWrapperFormat{sortname}{%
  \renewcommand*{\mkbibcompletename}{\mkbibemph}%
  #1}

\DeclareNameWrapperAlias{labelname}{sortname}

\begin{filecontents*}{\jobname.bib}
@book{Test.2021,
  author = {Mustermann, Thomas},
  year   = {2021},
  title  = {Mustertitel},
  editor = {Musterfrau, Erika},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
Dies ist ein Test.\footcite{Test.2021}
\printbibliography
\end{document}

Mustermann, Thomas. Mustertitel. Ed. by Erika Musterfrau. 2021.


I missed the line about the title formatting. Have a look at Remove Quotation Marks from Style for help with that. If that doesn't help, I suggest you ask a new question since the title formatting is not directly connected to name formatting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .