2

I'm writing my own bibliography style based on the trad-standard.bbx. For the phdthesis driver I'd like to include the department as a separate input in the bib file. So my bibfile looks like this:

@phdthesis{Test2018,
    author = {Doe, John},
    school = {University of Foo},
    department = {Department for eggs and bacon},
    title = {{Studies on the cooking time of eggs and bacon, searching for the perfect symbiosis.}},
    type = {Master's Thesis},
    year = {2018}
}

The driver for a thesis is defined in the trad-standard.bbx as:

\DeclareBibliographyDriver{thesis}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author}%
    \setunit{\printdelim{nametitledelim}}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \printfield{type}%
    \newcommaunit
    \usebibmacro{institution+location+date}%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
    \newunit
    \printfield{pagetotal}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url+issn}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}%
    \setunit{\bibpagerefpunct}\newblock
    \usebibmacro{pageref}%
    \newunit\newblock
    \iftoggle{bbx:related}{%
        \usebibmacro{related:init}%
        \usebibmacro{related}%
    }{}%
    \usebibmacro{finentry}%
}

And the current output of the Test2018 is

J. Doe: “Studies on the cooking time of eggs and bacon, searching for the perfect symbiosis”. Master's Thesis, University of Foo, 2018.

I would like to add the department after the school, so the result would be:

J. Doe: “Studies on the cooking time of eggs and bacon, searching for the perfect symbiosis”. Master's Thesis, University of Foo, Department for eggs and bacon, 2018.

In the driver, I cannot find the print-function for the school, so I'm unable to define a new check to print the department afterwards. I guess that the school is printed by the command \printlist{location} but I don't find the definition of that command and thus, I have no idea how this list is set up and how I could inject the department.

Can anyone help me out?


(M)WE

Attention: Long file! (To save some space I removed all the drivers but the one used for a thesis.)

\documentclass{article}

\usepackage{filecontents}
\usepackage{hyperref}


\begin{filecontents*}{custom-abbrv.bbx}
    % %%%%%%%%%%%%%
    % Declare Style
    % %%%%%%%%%%%%%

    \ProvidesFile{custom-abbrv.bbx}[2018/08/20 v2.0.0 Custom abbrv Bibliography Style]



    % %%%%%%%%%%%%%
    % Require Style
    % %%%%%%%%%%%%%

    \RequireBibliographyStyle{standard}



    % %%%%%%%%%%%%%
    % Basic Options
    % %%%%%%%%%%%%%

    \ExecuteBibliographyOptions{%
        abbreviate      = false,
        arxiv           = false,
        useprefix       = true,
        autolang        = hyphen,
        backref         = false,
        dateabbrev      = true,
        eprint          = false,
        hyperref        = true,
        labelnumber     = true,
        maxnames        = 3,
        minnames        = 3,
        sorting         = none,
    }



    % %%%%%%%%%%%%%%%%%%%%%
    % Package Functionality
    % %%%%%%%%%%%%%%%%%%%%%

    \@ifpackagelater{biblatex}{2016/03/01}
        {\ExecuteBibliographyOptions{giveninits=true}}
        {\ExecuteBibliographyOptions{firstinits=true}}

    \@ifpackagelater{biblatex}{2016/03/01}{%
        \@ifpackagelater{biblatex}{2016/05/14}{%
            \DeclareNameFormat{abbrv}{%
                \usebibmacro{name:given-family}%
                {\namepartfamily}%
                {\namepartgiveni}%
                {\namepartprefixi}%
                {\namepartsuffixi}%
                \usebibmacro{name:andothers}%
            }%
        }{%
            \DeclareNameFormat{abbrv}{%
                \nameparts{#1}%
                \usebibmacro{name:given-family}%
                {\namepartfamily}%
                {\namepartgiveni}%
                {\namepartprefixi}%
                {\namepartsuffixi}%
                \usebibmacro{name:andothers}%
            }%
        }%
    }{%
        \DeclareNameFormat{abbrv}{%
            \usebibmacro{name:first-last}{#1}{#4}{#6}{#8}%
            \usebibmacro{name:andothers}%
        }%
    }%
    \DeclareNameAlias{default}{abbrv}

    \@ifpackagelater{biblatex}{2016/05/14}{%
        \defbibenvironment{bibliography}%
            {%
                \list{%
                    \printtext[labelnumberwidth]{%
                        \printfield{labelprefix}%
                        \printfield{labelnumber}%
                    }%
                }{%
                    \setlength{\labelwidth}{\labelnumberwidth}%
                    \setlength{\leftmargin}{\labelwidth}%
                    \setlength{\labelsep}{\biblabelsep}%
                    \addtolength{\leftmargin}{\labelsep}%
                    \setlength{\itemsep}{\bibitemsep}%
                    \setlength{\parsep}{\bibparsep}%
                }%
                \renewcommand*{\makelabel}[1]{\hss##1}%
            }
            {\endlist}
            {\item}%
    }{%
        \defbibenvironment{bibliography}%
            {%
                \list{%
                    \printtext[labelnumberwidth]{%
                        \printfield{prefixnumber}%
                        \printfield{labelnumber}%
                    }%
                }{%
                    \setlength{\labelwidth}{\labelnumberwidth}%
                    \setlength{\leftmargin}{\labelwidth}%
                    \setlength{\labelsep}{\biblabelsep}%
                    \addtolength{\leftmargin}{\labelsep}%
                    \setlength{\itemsep}{\bibitemsep}%
                    \setlength{\parsep}{\bibparsep}%
                }%
                \renewcommand*{\makelabel}[1]{\hss##1}%
            }%
            {\endlist}%
            {\item}%
    }

    \defbibenvironment{shorthands}%
        {%
            \list{%
                \printfield[shorthandwidth]{shorthand}%
            }{%
                \setlength{\labelwidth}{\shorthandwidth}%
                \setlength{\leftmargin}{\labelwidth}%
                \setlength{\labelsep}{\biblabelsep}%
                \addtolength{\leftmargin}{\labelsep}%
                \setlength{\itemsep}{\bibitemsep}%
                \setlength{\parsep}{\bibparsep}%
                \renewcommand*{\makelabel}[1]{\hss##1}%
            }%
        }%
        {\endlist}%
        {\item}%



    % %%%%%%%%%%%%%%%%%%%%%%%
    % Preliminary Definitions
    % %%%%%%%%%%%%%%%%%%%%%%%

    % Booleans
    \providebool{bbx:subentry}
    \DeclareBibliographyOption[boolean]{subentry}[true]{%
        \setbool{bbx:subentry}{#1}%
    }

    \newbool{bbxtrad:doisequal}
    \newbool{bbxtrad:eprintsequal}
    \newbool{bbxtrad:urlsequal}
    \newbool{bbxtrad:notesequal}
    \newbool{bbxtrad:addendumsequal}

    % Aliases
    \DeclareNameAlias{author}{default}
    \DeclareNameAlias{editor}{default}
    \DeclareNameAlias{translator}{default}

    % New commands
    \newcommand*{\volumenumberdelim}{} % delim between number and volume
    \renewcommand*{\intitlepunct}{\addspace} % after the bibstring in
    \renewcommand*{\newunitpunct}{\addperiod\space}
    \newcommand*{\newcommaunit}{\@ifstar\newcommaunitStar\newcommaunitNoStar}
    \newcommand*{\newcommaunitStar}{\setunit*{\addcomma\space}}
    \newcommand*{\newcommaunitNoStar}{\setunit{\addcomma\space}}
    \renewcommand*{\labelnamepunct}{\addcolon\space}
    \renewcommand*{\subtitlepunct}{\addperiod\space}




    % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Field Formatting and Appearance
    % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    % Title
    \DeclareFieldFormat*{title}{%
        \enquote{#1}\isdot%
    }

    % Titlecase
    \DeclareFieldFormat{titlecase}{%
        \MakeTitleCase{#1}%
    }
    \newrobustcmd{\MakeTitleCase}[1]{%
        \ifthenelse{
            \ifcurrentfield{booktitle}%
            \OR\ifcurrentfield{booksubtitle}%
                \OR\ifcurrentfield{maintitle}\OR\ifcurrentfield{mainsubtitle}%
            \OR\ifcurrentfield{journaltitle}%
                \OR\ifcurrentfield{journalsubtitle}%
            \OR\ifcurrentfield{issuetitle}%
                \OR\ifcurrentfield{issuesubtitle}%
            \OR\ifentrytype{book}%
                \OR\ifentrytype{mvbook}%
                \OR\ifentrytype{bookinbook}%
            \OR\ifentrytype{booklet}%
                \OR\ifentrytype{suppbook}%
            \OR\ifentrytype{collection}%
                \OR\ifentrytype{mvcollection}%
            \OR\ifentrytype{suppcollection}%
                \OR\ifentrytype{manual}%
            \OR\ifentrytype{periodical}%
                \OR\ifentrytype{suppperiodical}%
            \OR\ifentrytype{proceedings}%
                \OR\ifentrytype{mvproceedings}%
            \OR\ifentrytype{reference}%
                \OR\ifentrytype{mvreference}%
            \OR\ifentrytype{report}%
                \OR\ifentrytype{thesis}%
        }
        {#1}
        {\MakeSentenceCase{#1}}%
    }

    % Journal title
    \DeclareFieldFormat{journaltitle}{%
        \mkbibemph{#1},%
    }

    % Chapter
    \DeclareFieldFormat{chapter}{%
        \bibstring{chapter}~#1%
    }

    % Volume
    \DeclareFieldFormat[article]{volume}{#1}

    % Number
    \DeclareFieldFormat*{number}{\mkbibparens{#1}}
    \DeclareFieldFormat[book,incollection,inproceedings,proceedings]{number}{%
        \biblstring{number}~#1%
    }
    \DeclareFieldFormat[techreport,report]{number}{#1}

    % Edition
    \DeclareFieldFormat{edition}{%
        \ifinteger{#1}%
            {\mkbibordedition{#1}~\bibstring{edition}}%
            {\MakeLowercase{#1}~\bibstring{edition}}%
    }

    % Series
    \DeclareFieldFormat[book,inproceedings,proceedings]{series}{%
        \mkbibemph{#1}%
    }

    % Pages
    \DeclareFieldFormat*{pages}{\space#1\space}
    \renewcommand*{\bibpagespunct}{\addspace}

    % Year
    \DeclareFieldFormat{date}{\textbf{#1}}

    % URL
    \DeclareFieldFormat{url}{URL:\space\url{#1}}

    % ISSN / ISBN
    \DeclareFieldFormat{issn}{ISSN:\space\url{#1}}
    \DeclareFieldFormat{isbn}{ISBN:\space\url{#1}}

    % DOI
    \DeclareFieldFormat{doi}{%
        DOI\addcolon\space
        \ifhyperref
            {\href{http://dx.doi.org/#1}{\nolinkurl{#1}}}
            {\nolinkurl{#1}}%
    }

    % Item Separation
    \setlength\bibitemsep{.5\baselineskip}

    % Alignment
    \AtBeginBibliography{\raggedright}

    % Bibentrysetcount
    \DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}

    % Labelnumberwidth
    \DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}

    % Shorthandwidth
    \DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

    % In
    \renewbibmacro*{in:}{%
        \printtext{%
            \bibstring{in}%
            \printunit{\intitlepunct}%
        }%
    }



    % %%%%%%%%%%%%
    % Driver Setup
    % %%%%%%%%%%%%

    % Thesis
    \DeclareBibliographyDriver{thesis}{%
        \usebibmacro{bibindex}%
        \usebibmacro{begentry}%
        \usebibmacro{author}%
        \setunit{\printdelim{nametitledelim}}\newblock
        \usebibmacro{title}%
        \newunit
        \printlist{language}%
        \newunit\newblock
        \usebibmacro{byauthor}%
        \newunit\newblock
        \printfield{type}%
        \newcommaunit
        \usebibmacro{institution+location+date}%
        \newunit\newblock
        \usebibmacro{chapter+pages}%
        \newunit
        \printfield{pagetotal}%
        \newunit\newblock
        \usebibmacro{doi+eprint+url+issn}%
        \newunit\newblock
        \printfield{note}%
        \newunit\newblock
        \usebibmacro{addendum+pubstate}%
        \setunit{\bibpagerefpunct}\newblock
        \usebibmacro{pageref}%
        \newunit\newblock
        \iftoggle{bbx:related}{%
            \usebibmacro{related:init}%
            \usebibmacro{related}%
        }{}%
        \usebibmacro{finentry}%
    }



    % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Redefinition of diverse Macros
    % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \newbibmacro*{crossref:label}{%
        \usebibmacro{maintitle+booktitle:noemph}%
        \setunit{\addspace}%
        \entrydata{\strfield{crossref}}{%
            \printtext[labelnumberwidth]{%
                \printfield{prefixnumber}%
                \printfield{labelnumber}%
            }%
        }%
    }

    \newbibmacro*{maintitle+booktitle:noemph}{%
        \iffieldundef{maintitle}{}{%
            \usebibmacro{maintitle:noemph}%
            \newunit\newblock
            \iffieldundef{volume}%
                {}%
                {\printfield{volume}%
            \printfield{part}%
            \setunit{\addcolon\space}}%
        }%
        \usebibmacro{booktitle:noemph}%
        \newunit%
    }

    \newbibmacro*{maintitle:noemph}{%
        \ifboolexpr{
            test {\iffieldundef{maintitle}}
            and
            test {\iffieldundef{mainsubtitle}}
        }%
            {}%
            {%
                \printtext{%
                    \printfield[titlecase]{maintitle}%
                    \setunit{\subtitlepunct}%
                    \printfield[titlecase]{mainsubtitle}%
                }%
                \newunit%
            }%
        \printfield{maintitleaddon}%
    }

    \newbibmacro*{booktitle:noemph}{%
        \ifboolexpr{
            test {\iffieldundef{booktitle}}
            and
            test {\iffieldundef{booksubtitle}}
        }%
            {}%
            {%
                \printtext{%
                    \printfield[titlecase]{booktitle}%
                    \setunit{\subtitlepunct}%
                    \printfield[titlecase]{booksubtitle}%
                }%
                \newunit%
            }%
        \printfield{booktitleaddon}%
    }

    \newbibmacro*{inproc:crossref:full}{%
        \ifboolexpr{
            test {\ifnameundef{editor}}
            and
            test {\ifnameundef{editora}}
            and
            test {\ifnameundef{editorb}}
            and
            test {\ifnameundef{editorc}}
            and
            test {\ifnameundef{translator}}
        }%
            {}%
            {%
                \usebibmacro{byeditor+others}\newcommaunit%
            }%
        \usebibmacro{maintitle+booktitle}%
        \newunit
        \usebibmacro{event+venue+date}%
        \newcommaunit
        \iffieldundef{maintitle}{%
            \printfield{volume}%
            \printfield{part}%
            \ifboolexpr{
                test {\iffieldundef{volume}}
                and
                test {\iffieldundef{part}}
            }%
                {}%
                {%
                    \setunit{\addspace\bibstring{ofseries}\addspace}%
                }%
        }%
        {}%
        \usebibmacro{series+number:emphcond}%
        \newcommaunit
        \iffieldundef{maintitle}{%
            \printfield{volumes}%
            \newcommaunit%
        }%
        {}%
    }

    \newbibmacro*{inproc:crossref:extra}{%
        \newcommaunit
        \printlist{location}%
        \newcommaunit
        \printfield{edition}%
        \newunit
        \printlist{organization}%
        \newcommaunit*%
        \printlist{publisher}%
        \newcommaunit
        \usebibmacro{date}%
        \newunit\newblock
        \usebibmacro{doi+eprint+url+issn}
        \newunit\newblock
        \printfield{note}%
        \newunit\newblock
        \usebibmacro{addendum+pubstate}%
    }

    \newbibmacro*{inproc:crossref:conditional}{%
        \entrydata*{\strfield{crossref}}{%
            \iffieldsequal{doi}{saveddoi}%
                {\global\booltrue{bbxtrad:doisequal}}%
                {\global\boolfalse{bbxtrad:doisequal}}%
            \iffieldsequal{eprint}{savedeprint}%
                {\global\booltrue{bbxtrad:eprintsequal}}%
                {\global\boolfalse{bbxtrad:eprintsequal}}%
            \iffieldsequal{url}{savedurl}%
                {\global\booltrue{bbxtrad:urlsequal}}%
                {\global\boolfalse{bbxtrad:urlsequal}}%
            \iffieldsequal{note}{savednote}%
                {\global\booltrue{bbxtrad:notesequal}}%
                {\global\boolfalse{bbxtrad:notesequal}}%
            \iffieldsequal{addendum}{savedaddendum}%
                {\global\booltrue{bbxtrad:addendumsequal}}%
                {\global\boolfalse{bbxtrad:addendumsequal}}%
        }
        \newunit\newblock
        \iftoggle{bbx:doi}
            {\ifbool{bbxtrad:doisequal}{}{\printfield{saveddoi}}}
            {}%
        \newunit\newblock
        \iftoggle{bbx:eprint}
            {\ifbool{bbxtrad:eprintsequal}{}{\usebibmacro{eprint}}}
            {}%
        \newunit\newblock
        \iftoggle{bbx:url}
            {\ifbool{bbxtrad:urlsequal}{}{\usebibmacro{url+urldate}}}
            {}%
        \newunit\newblock
        \ifbool{bbxtrad:notesequal}{}{\printfield{note}}%
        \newunit\newblock
        \ifbool{bbxtrad:addendumsequal}{}{\printfield{addendum}}%
    }

    \newbibmacro*{journal+date+issuetitle}{%
        \usebibmacro{journal}%
        \usebibmacro{date}
        \newcommaunit*%
        \iffieldundef{series}
            {}
            {%
                \newunit
                \printfield{series}%
                \setunit{\addcomma\space}%
            }%
        \usebibmacro{volume+number+pages+eid}%
        \newcommaunit
        % \setunit{\addspace}%
        \usebibmacro{issue-parens}%
        \setunit*{\addcolon\space}%
        \usebibmacro{issue}%
        \newunit%
    }

    \newbibmacro*{volume+number+pages+eid}{%
        \printfield{volume}%
        \setunit*{\volumenumberdelim}%
        \printfield{number}%
        \setunit{\addcolon}
        \printfield{pages}%
        \newcommaunit
        \printfield{eid}%
    }

    \renewbibmacro*{byeditor+others}{%
        \ifnameundef{editor}
            {}
            {%
                \printnames[byeditor]{editor}%
                \setunit{\addcomma\space}%
                \usebibmacro{editorlstr}%
                \clearname{editor}%
                \newunit%
            }%
        \usebibmacro{byeditorx}%
        \usebibmacro{bytranslator+others}%
    }

    \newbibmacro*{editorlstr}{%
        \ifboolexpr{
            test {\ifnumgreater{\value{editor}}{1}}
            or
            test {\ifandothers{editor}}
        }%
            {\biblstring{editors}}%
            {\biblstring{editor}}%
    }

    \renewbibmacro*{series+number}{%
        \printfield{number}%
        \setunit*{\addspace\bibstring{inseries}\addspace}%
        \printfield{series}%
        \newunit%
    }

    \newbibmacro*{series+number:emphcond}{%
        \printfield{number}%
        \setunit*{\addspace\bibstring{inseries}\addspace}%
        \ifboolexpr{
            not test {\iffieldundef{volume}}
        }%
            {\printfield{series}}%
        {%
            \ifboolexpr{
                test {\iffieldundef{volume}}
                and
                test {\iffieldundef{part}}
                and
                test {\iffieldundef{number}}
                and
                test {\ifentrytype{book}}
            }%
                {\newunit\newblock}%
                {}%
            \printfield[noformat]{series}%
        }%
        \newunit%
    }

    \newbibmacro*{book:series+number}{%
        \iffieldundef{maintitle}%
        {%
            \printfield{volume}%
            \printfield{part}%
            \ifboolexpr{
                test {\iffieldundef{volume}}
                and
                test {\iffieldundef{part}}
            }%
                {}%
                {\setunit{\addspace\bibstring{ofseries}\addspace}}%
        }%
        {}%
        \usebibmacro{series+number:emphcond}%
        \newunit%
    }

    \renewbibmacro*{volume+number+eid}{%
        \printfield{volume}%
        \setunit*{\volumenumberdelim}%
        \printfield{number}%
        \setunit{\addcomma\space}%
        \printfield{eid}%
    }

    \renewbibmacro*{publisher+location+date}{%
        \printlist{publisher}%
        \newcommaunit*%
        \printlist{location}%
        \newcommaunit*%
        \printfield{edition}%
        \newcommaunit*%
        \usebibmacro{date}%
        \newunit%
    }

    \renewbibmacro*{institution+location+date}{%
        \printlist{institution}%
        \newcommaunit*%
        \printlist{location}%
        \printlist{location}%
        \newcommaunit*%
        \usebibmacro{date}%
        \newunit%
    }

    \newbibmacro*{location+date+publisher}{%
        \printlist{location}%
        \newcommaunit*%
        \printfield{edition}%
        \newcommaunit*%
        \usebibmacro{date}%
        \newunit
        \printlist{publisher}%
    }

    \newbibmacro*{issue-parens}{%
        \printfield{issue}%
        \newunit%
    }

    \newbibmacro*{doi+eprint+url+issn}{%
        \iftoggle{bbx:doi}
            {\printfield{doi}}
            {%
                \iftoggle{bbx:isbn}
                    {\printfield{issn}}
                    {%
                        \iftoggle{bbx:eprint}
                            {\usebibmacro{eprint}}
                            {%
                                \iftoggle{bbx:url}
                                    {\usebibmacro{url+urldate}}
                                    {}
                            }%
                    }%
            }%
    }



    \endinput

\end{filecontents*}

\begin{filecontents*}{references.bib}
    @phdthesis{Test2018,
        author = {Doe, John},
        school = {University of Foo},
        department = {Department for eggs and bacon},
        title = {{Studies on the cooking time of eggs and bacon, searching for the perfect symbiosis.}},
        type = {Master's Thesis},
        year = {2018}
    }
\end{filecontents*}

\usepackage[backend = biber, style = custom-abbrv, citestyle = numeric-comp]{biblatex}
\addbibresource{references.bib}

\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\cite{Test2018}

\printbibliography

\end{document}
1

biblatex does not recognise department as a valid field. You need to specify it in a dbx file for your style. Since you are writing a style, you would just call it custom-abbrev.dbx and biblatex will pick it up when you specify your style.

In this answer, I've used the datamodel option to specify this and just used trad-standard as the style to simplify what is going on.

Some other notes:

  • biblatex prefers institution rather than school.
  • You could make your style automatically use sentence case.
  • You should use type={mathesis} which will give you language independent strings

institution (and location) are lists by default in biblatex (meaning they can have multiple entries). In this answer, I've made department a field and printed it using \printfield, but if you think you might need multiple departments to go with multiple institutions, you could make it a list instead.

I print the department by redefining the institution+location+date macro.

MWE

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{department.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{
  department}
\end{filecontents}
\begin{filecontents}{\jobname.bib}
@thesis{Test2018,
  author = {Doe, John},
  institution = {University of Foo},
  department = {Department for Eggs and Bacon},
  title = {Studies on the Cooking Time of Eggs and Bacon, Searching for the Perfect Symbiosis},
  type = {mathesis},
  year = {2018}
}
\end{filecontents}
\usepackage[datamodel=department,style=trad-standard,giveninits]{biblatex}
\addbibresource{\jobname.bib}
\DeclareFieldFormat[thesis]{title}{\mkbibquote{#1}}
\DeclareFieldFormat{titlecase}{\MakeSentenceCase{#1}}
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}
\renewbibmacro*{institution+location+date}{%
  \printlist{institution}%
  \newcommaunit*%
  \printfield{department}%
  \newcommaunit*%
  \printlist{location}%
  \newcommaunit*%
  \usebibmacro{date}%
  \newunit}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

  • Thanks for your answer David! I knew that "department" was not a valid field, therefore I wanted to define it, which you now did. My idea was to inject the department field content to the institution list, but you're right inprinting it afterwards as it is a separate thing. Now to your notes: The field "school" is set by Mendeley, so I kept it and only added the department, whiich, unfortunately, is currently not exported by Mendeley. – Sam Aug 22 '18 at 7:03
  • @Sam, using school is OK. In biblatex it is an alias to institution. Regarding sentence case: at present you have: {{Studies on the cooking time of eggs and bacon, searching for the perfect symbiosis.}}. You should definitely remove the period. But also having the double braces is unnecessary and may cause problems with biblatex. Using title case is optional, but allows your entry to work with other bibliography styles that do not use sentence case for titles. biblatex can then make it into sentence case for you. You can protect single words using {Braces}. – David Purton Aug 22 '18 at 7:13
  • @Sam, see tex.stackexchange.com/a/439473/87678 for further discussion on case with tites. – David Purton Aug 22 '18 at 7:13
  • @Sam, BTW if you have multiple institutions and departments. It is possible to intersperse them, rather than print the list of institutions followed by the list of departments, but it's a bit of a pain. And I would have thought not likely to occur with a thesis. – David Purton Aug 22 '18 at 7:17
  • 1
    @Sam if you decide you want to intersperse things, have a look how I interspersed locations and publishers (and related fields) in biblatex-sbl. See lines 1961–2078 of biblatex-sbl.def – David Purton Aug 22 '18 at 7:38

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.