# biblatex-dw: redefine text formatting for specific entry type (incollection)

I am using biblatex-dw with the BibTeX8 backend and option namefont=italic,

In the footnotes, this works great: https://www.screencast.com/t/Df8hOSYzd0S

In the bibliography, it is absolutely perfect for authors and editors in most entry types: https://www.screencast.com/t/sDpI3QVQ

• author = always italic: perfect
• editor = italic when type=@book perfect
• editor = should not be italic if entry type is @incollection

So I guess I need an exception for entry type @incollection only, but I have no idea how to solve this...

MWE:

\begin{filecontents*}{literatur.bib}
@Book{archiv-verwaltung1919,
Title                    = {Geschichte der Archiv-Verwaltung bei dem Deutschen Generalgouvernement Warschau},
Editor                   = {{Archiv-Verwaltung des Deutschen Generalgouvernements Warschau}},
Publisher                = {Mittler},
Year                     = {1919},

Shorttitle               = {Archiv-Verwaltung},

__markedentry            = {[tw:1]},
Abstract                 = {Aufsätze 32 Exzerpt vorhanden},
Owner                    = {tw},
Timestamp                = {2014.12.11}
}

@Book{deutscheostforschung1,
Title                    = {Deutsche Ostforschung. Ergebnisse und Aufgaben seit dem ersten Weltkrieg. Erster Band},
Editor                   = {Aubin, Hermann and Brunner, Otto and Kohte, Wolfgang and Papritz, Johannes},
Publisher                = {Hirzel},
Year                     = {1942},

Shorttitle               = {Ostforschung I},

__markedentry            = {[tw:1]},
Owner                    = {tw},
Timestamp                = {2016.03.22}
}
@Incollection{ash2006,
Title                    = {Wissenschaftswandlungen und politische Umbrüche im 20. Jahrhundert -- was hatten sie miteinander zu tun?},
Author                   = {Ash, Mitchell G.},
Booktitle                = {Kontinuitäten und Diskontinuitäten in der Wissenschaftsgeschichte des 20. Jahrhunderts},
Publisher                = {Steiner},
Year                     = {2006},

Editor                   = {vom Bruch, Rüdiger and Gerhardt, Uta and Pawliczek, Aleksandra},
Pages                    = {S. 19-38},
Shorttitle               = {Wissenschaftswandlungen},

Abstract                 = {Exzerpt vorhanden Aufsätze 9},
Owner                    = {tw},
Timestamp                = {2013.05.14}
}

@Incollection{arnold-etal2009,
Title                    = {Tod, Zerstörung, Wiederaufbau. Zu einer europäischen Erinnerungsgeschichte des Luftkriegs},
Author                   = {Arnold, Jörg and Süß, Dietmar and Thießen, Malte},
Booktitle                = {Luftkrieg. Erinnerungen in Deutschland und Europa},
Publisher                = {Wallstein},
Year                     = {2009},

Editor                   = {Arnold, Jörg and Süß, Dietmar and Thießen, Malte},
Pages                    = {S. 9-26},
Shorttitle               = {Erinnerungsgeschichte},

Owner                    = {tw},
Timestamp                = {2016.03.28}
}
\end{filecontents*}

\documentclass[a4paper,fontsize=10pt,numbers=noenddot]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{times}

\usepackage[backend=bibtex8,
style=authortitle-dw,
namefont=italic,
idembib=false,
sorting=nty,
hyperref=false,
edbyidem=false,
]{biblatex}

\DeclareNameAlias{sortname}{last-first}

\begin{document}
kjsdb\footcite{archiv-verwaltung1919}jkd\footcite{deutscheostforschung1}sbfsjkdbfsdjk\footcite{armbruster2007} kjsddh\footcite{ash2006}fkjdsh hsdjkfhdsjfhdsj fdsh hwhsdjkfh sdkjh

\printbibliography
\end{document}


Unfortunately, there is no convenient way to hook in biblatex to format only the primary name (i.e. the name that is printed as the first name in sortname format and usually goes into labelname). I have long thought that it would be a good idea to have something like this, but I have not found a convenient way to implement it yet, suggestions are welcome.

With biblatex-dw's authortitle-dw the following trick should do it: We set namefont=normal and effectively switch it to italic for citations with the help of \AtEveryCite, for the bibliography we use a special format for sortname.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[backend=bibtex8,
style=authortitle-dw,
namefont=normal,%      <- change this to 'normal'
idembib=false,
sorting=nty,
hyperref=false,
edbyidem=false,
]{biblatex}

\makeatletter
\AtEveryCite{\renewcommand{\bbx@namefont}{\mkbibemph}}
\DeclareNameAlias{sortname}{family-given-namefont-italic}
\DeclareNameFormat{family-given-namefont-italic}{%
\renewcommand{\bbx@namefont}{\mkbibemph}%
\ifgiveninits
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}}
{\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}%
\usebibmacro{name:andothers}}
\makeatother

\begin{document}
Lorem\footcite{westfahl:space} ipsum\footcite{westfahl:frontier} dolor\footcite{sigfridsson} sit\footcite{brandt,moraux}

\printbibliography
\end{document}


This would not work for footnote-dw.

• @binsky Brilliant! I just noticed I had forgotten a % and edited in. – moewe Jun 22 '18 at 15:14
• Thanks for the update, I also added the % and compiled again; doesn't look like this had any effects – binsky Jun 22 '18 at 15:30
• @binsky It did actually, compare the position of the first letter in each bibliography entry with and without the %. Without % each entry is slightly indented to the right because an unwanted space starts the entry instead of the first letter. It is more visible if you compare the position with respect to the heading "Literatur". – moewe Jun 22 '18 at 15:33
• indeed, you're absolutely right; thanks for the hint, very appreciated – binsky Jun 22 '18 at 15:37
• this solution not only works in my MWE but also in my main text/thesis. But in there, I realized this solution had influence on the footnotes and the whole document. Instead of 606 there are 604 pages if I use this workaround to get some editors non-italic. But these editors aren't mentioned in the footnotes, what makes me wonder... This shouldn't be a problem in general, but in this case, the publisher has already approved the whole document except the issue in the bibliography and would not be happy to re-check it completely because of new line-&page-breaks etc. Any idea for that? – binsky Jun 27 '18 at 8:13