# Current behavior (undesired)

There are several thesis types available in BibLaTeX, such as mastersthesis/mathesis and phdthesis. This question applies to any of them equally, but I will focus on phdthesis here.

For phdthesis entries, I get something like the following (after a few adjustments to periods and parentheses):

Chomsky, Avram Noam. 1955. Transformational Analysis. PhD thesis. University of Pennsylvania.

# Desired

Now, while it's possible to modify PhD thesis and get PhD dissertation, described here, I would actually like to move it completely after the name of the institution. Basically, this:

Chomsky, Avram Noam. 1955. Transformational Analysis. University of Pennsylvania PhD thesis.

or, preferably:

Chomsky, Avram Noam. 1955. Transformational Analysis. University of Pennsylvania dissertation.

Which is described in the Linguistic Society of America's Unified Style Sheet.

The problem that I run into is that I cannot figure out how to reference the "PhD thesis" element. According to bibtex's btxbst.doc, this element is hardcoded into FUNCTION {phdthesis}.

I would be ok with hacking it together by clearing the PhD thesis element and adding this to the institution element, but because it appears to be hardcoded at that very location I have no idea how to do it or if it is even possible. If redefining various elements is not possible, is there some way to redefine FUNCTION {phdthesis} locally within the current .tex file (rather than editing the bibtex file)?

What is the best way to accomplish this?

MWE:

\documentclass{article}

\usepackage[%
backend=biber,%
citestyle=authoryear-comp,%
bibstyle=authoryear,%
natbib=true,%
dashed=false,%
ibidtracker=false,%
isbn=false,%
url=false,%
eprint=false,%
hyperref=false,%
uniquename=false,%
uniquelist=false,%
block=none,%
maxnames=3,%
giveninits=false,%
]{biblatex}

\usepackage[english]{babel}

%clear some stuff
\AtEveryBibitem{%
\clearfield{note}%
\clearfield{pagetotal}%
\clearlist{language}%
}

%Make all thesis/dissertation titles italic
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}%

% DON'T put parentheses around year
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%}%

\begin{filecontents}{mybib.bib}
@phdthesis{chomsky:1955,
title = {Transformational Analysis},
language = {English},
school = {University of Pennsylvania},
author = {Chomsky, Avram Noam},
year = {1955},
type = {phdthesis},
},
\end{filecontents}

\DefineBibliographyStrings{american}{phdthesis = {PhD dissertation}}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

• Can you show us an MWE of your actual document, so we can see which bibliography package and style you use. In your question you mention biblatex and your question is tagged as such, but then you talk about btxdoc and BibTeX functions. A solution will very heavily depend on the used package and style. – moewe Jul 30 '16 at 11:06
• You see, I mentioned btxdoc because I am searching around for where this PhD thesis text is coming from and that was the only place that I could find it. – whatisit Jul 30 '16 at 12:12

In order to move the field we need to modify the bibdriver for thesis. We can save ourselves copying and changing it by using the xpatch package.

We simply remove the type earlier in the driver and insert our own macro which prints the thesis type after the institution.

% this macro is based on institution+location+date from standard.bbx
\newbibmacro*{institution+thesistype+location+date}{%
\printlist{location}%
\iflistundef{institution}
\printlist{institution}%
\printfield{type}%
\usebibmacro{date}%
\newunit}

\usepackage{xpatch}
\xpatchbibdriver{thesis}
{\printfield{type}%
\newunit
\usebibmacro{institution+location+date}}
{\usebibmacro{institution+thesistype+location+date}}
{}{}


MWE

\documentclass{article}
\usepackage[english]{babel}
\usepackage[%
backend=biber,%
style=authoryear-comp,%
natbib=true,%
dashed=false,%
ibidtracker=false,%
isbn=false,%
url=false,%
eprint=false,%
hyperref=false,%
uniquename=false,%
uniquelist=false,%
block=none,%
maxnames=3,%
giveninits=false,%
]{biblatex}

%clear some stuff
\AtEveryBibitem{%
\clearfield{note}%
\clearfield{pagetotal}%
\clearlist{language}%
}

%Make all thesis/dissertation titles italic
\DeclareFieldFormat[thesis]{title}{\mkbibitalic{#1}}%

% DON'T put parentheses around year
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%}%

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@phdthesis{chomsky:1955,
title = {Transformational Analysis},
language = {English},
school = {University of Pennsylvania},
author = {Chomsky, Avram Noam},
year = {1955},
type = {phdthesis},
},
\end{filecontents}

\DefineBibliographyStrings{english}{phdthesis = {dissertation}}

\newbibmacro*{institution+thesistype+location+date}{%
\printlist{location}%
\iflistundef{institution}
\printlist{institution}%
\printfield{type}%
\usebibmacro{date}%
\newunit}

\usepackage{xpatch}
\xpatchbibdriver{thesis}
{\printfield{type}%
\newunit
\usebibmacro{institution+location+date}}
{\usebibmacro{institution+thesistype+location+date}}
{}{}

\begin{document}
\nocite{*}
\printbibliography
\end{document}


gives

Chomsky, Avram Noam. 1955. Transformational Analysis. University of Pennsylvania dissertation.

Where we used \DefineBibliographyStrings{english}{phdthesis = {dissertation}} to get "dissertation" instead of "PhD thesis".

• This works, thank you! I am a bit newer to biblatex and still in the learning curve. – whatisit Jul 31 '16 at 0:10