如何创建包含导师姓名的博士论文列表

如何创建包含导师姓名的博士论文列表

我正在尝试构建一个宏,使用 @thesis 条目的编辑器字段来分配论文的指导老师。我以以下帖子为起点如何在@thesis 字段中添加导师姓名?但这会以粗体字体打印出监督和联合监督字符串(不确定为什么),而不是使用与其余参考相同的 fnt。

以下是取自如何在@thesis 字段中添加导师姓名?我无法输出该帖子想要帮助完成的工作。也许首先应该帮助我理解为什么此代码不打印主管,然后如何为监管和加入监管字符串提供斜体而不是粗体字体:

\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}

答案1

我想我明白问题出在哪里了。你把 moewe 解决方案的第一和第二部分混在一起了(来自https://tex.stackexchange.com/a/184878/105447)。第二个假设supervisor信息将插入到editor字段中。在您的 MWE 中,如果您只是将supervisor字段名称更改为editorbibentries 中的字段名称,它应该可以按预期工作。例如:

\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},
        editor       = {James Oint and Stan Upervisor},  % <-- This changes (should be "editor", not "superviser")
    }

    @thesis{loh,
        author       = {Loh, Nin C.},
        title        = {High-Resolution Micromachined Interferometric Accelerometer},
        type         = {mathesis},
        institution  = {Massachusetts Institute of Technology},
        date         = 1992,
        location     = {Cambridge, Mass.},
        editor       = {Stan Upervisor},  % <-- This changes (should be "editor", not "superviser")
    }
\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}

正如 moewe 自己在他的解决方案中所说,这涉及到滥用该editor字段,并使其承担起监督者的角色@thesis

相关内容