I am trying to construct a macro to use the editor field of @thesis entries to assign the supervisors of the thesis. I used the following post as a starting point How to add the name of the supervisor in a @thesis field? but this prints out the supervision and joint supervision strings in bold fonts (not sure why) instead that using the same fnt than the rest of the reference.
Here an MWE taken from How to add the name of the supervisor in a @thesis field? that I cannot get to output what the post intended to help doing as is provided. Perhaps the first would be to help me understand why this code does not print the supervisors and then how to give the supervision and joinsupervision strings an italic rather than bold font:
\documentclass[british,12pt,a4paper]{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@thesis{geer,
author = {de Geer, Ingrid},
title = {Earl, Saint, Bishop, Skald~-- and Music},
type = {phdthesis},
institution = {Uppsala Universitet},
date = 1985,
subtitle = {The Orkney Earldom of the Twelfth Century. A Musicological
Study},
location = {Uppsala},
supervisor = {James Oint and Stan Upervisor},
}
@thesis{loh,
author = {Loh, Nin C.},
title = {High-Resolution Micromachined Interferometric Accelerometer},
type = {mathesis},
institution = {Massachusetts Institute of Technology},
date = 1992,
location = {Cambridge, Mass.},
supervisor = {Stan Upervisor},
}
\end{filecontents*}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{xpatch}
\usepackage[style=authoryear,backend=biber]{biblatex}
\usepackage{hyperref}
\begin{filecontents*}{english-thesis.lbx}
\ProvidesFile{english-thesis.lbx}[2014/06/14 english for thesis]
\InheritBibliographyExtras{english}
\NewBibliographyString{supervision,jointsupervision}
\DeclareBibliographyStrings{%
inherit = {english},
supervision = {{under the supervision of}{under sup\adddotspace of}},
jointsupervision = {{under the joint supervision of}{under joint sup\adddotspace of}},
}
\end{filecontents*}
\DeclareLanguageMapping{english}{english-thesis}
\newbibmacro*{thesissupervisor}{%
\ifnameundef{editor}{}{%
\ifnumgreater{\value{editor}}{1}
{\bibstring{jointsupervision}}
{\bibstring{supervision}}
\printnames{editor}}}
\xpatchbibdriver{thesis}
{\printfield{type}}
{\printfield{type}
\newunit
\usebibmacro{thesissupervisor}}
{\typeout{yep}}
{\typeout{no}}
\addbibresource{\jobname.bib}
\nocite{*}
\begin{document}
\printbibliography
\end{document}
\documentclassand end with\end{document}. This would help others to get the general context of what you are trying to do and make it easier for them to be able to assist. – gusbrs Jun 06 '17 at 21:19thesissupervisornever calls the fieldsupervisor. The macro starts with\ifnameundef{editor}{}, which essentially it tellingbiblatexto print nothing if the entryfieldeditoris empty, which is the case. Why does the original code does not work for you? What happens? – gusbrs Jun 06 '17 at 23:45