Skip to content

Instantly share code, notes, and snippets.

@moewew
Last active April 1, 2019 19:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moewew/628815aca7c32c9af0b095dc528f429f to your computer and use it in GitHub Desktop.
Save moewew/628815aca7c32c9af0b095dc528f429f to your computer and use it in GitHub Desktop.
A first draft of an MHRA style bibliography according to http://www.mhra.org.uk/Publications/Books/StyleGuide/StyleGuideV3_2.pdf
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{crut1997,
address = {Cambridge},
author = {Alan Cruttenden},
edition = {2},
publisher = {Cambridge University Press},
title = {Intonation},
year = 1997,
}
@book{mcarthur1986,
author = {Tom McArthur},
title = {Worlds of Reference},
subtitle = {Lexicography, Learning and Language from the Clay Tablet to the Computer},
date = {1986},
publisher = {Cambridge University Press},
location = {Cambridge},
}
@book{fuentes1986,
author = {Carlos Fuentes},
title = {Aura},
date = {1986},
editor = {Peter Standish},
publisher = {University of Durham},
location = {Durham},
series = {Durham Modern Language Series: Hispanic Texts},
number = {1},
}
@book{starobinski1986,
author = {Jean Starobinski},
title = {Montaigne in Motion},
date = {1986},
translator= {Arthur Goldhammer},
publisher = {University of Chicago Press},
location = {Chicago},
}
@mvbook{chadchad1932,
author = {H. Munro Chadwick and N. Kershaw Chadwick},
title = {The Growth of Literature},
date = {1932/1940},
translator= {Arthur Goldhammer},
publisher = {Cambridge University Press},
location = {Cambridge},
volumes = {3},
}
@collection{emilydickinson,
editor = {Thomas H. Johnson},
options = {useeditor=false},
title = {Emily Dickinson: Selected Letters},
date = {1985},
edition = {2},
publisher = {Harvard University Press},
location = {Cambridge, MA},
}
@incollection{elsky1982,
author = {Martin Elsky},
title = {Words, Things, and Names: Jonson's Poetry and Philosophical Grammar},
editor = {Claude J. Summers and Ted-Larry Pebworth},
booktitle = {Classic and Cavalier: Essays on Jonson and the Sons of Ben},
date = {1982},
publisher = {University of Pittsburgh Press},
location = {Pittsburgh},
pages = {31-55},
}
@incollection{calcraft1984,
author = {R. P. Calcraft},
title = {The Lover as Icarus},
subtitle = {Góngora’s \enquote{Qué de invidiosos montes levantados}},
editor = {Salvador Bacarisse and others},
booktitle = {What's Past Is Prologue},
booksubtitle = {A Collection of Essays in Honour of L. J. Woodward},
date = {1984},
publisher = {Scottish Academic Press},
location = {Edinburgh},
pages = {10-16},
}
@article{hillyer1990,
author = {Richard Hillyer},
title = {In More than Name Only},
subtitle = {Jonson's \enquote{To Sir Horace Vere}},
journal = {MLR},
volume = {85},
date = {1990},
pages = {1-11},
}
@article{spikes1970,
author = {J. D. Spikes},
title = {The Jacobean History Play and the Myth of the Elect Nation},
journal = {Renaissance Drama},
series = {newseries},
volume = {8},
date = {1970},
pages = {117-149},
}
@article{davis1983,
author = {Nathalie Z. Davis},
title = {Beyond the Market},
subtitle = {Books as Gifts in Sixteenth-Century France},
journal = {Transactions of the Royal Historical Society},
series = {5},
volume = {33},
date = {1983},
pages = {69-88},
}
@phdthesis{ingram1988,
author = {R. J. Ingram},
title = {Historical Drama in Great Britain from 1935 to the Present},
institution = {University of London, Birkbeck College},
year = {1988},
pubstate = {unpublished},
}
@article{jongeneel2007,
author = {Els Jongeneel},
title = {Art and Divine Order in the Divina Commedia},
journal = {Literature and Theology},
volume = {21},
date = {2007},
pages = {131-145},
doi = {10.1093/litthe/frm008},
}
@reference{crystal2010,
author = {Crystal, David},
date = {2010},
title = {An Encyclopedic Dictionary of Language and Languages},
edition = {3},
location = {Oxford},
publisher = {Blackwell},
}
@incollection{hermetet2006,
author = {Hermetet, Rachel},
date = {2006},
title = {\emph{The Criterion} et les littératures européennes, 1922--1925s},
booktitle = {Revues modernistes anglo-américaines: lieux d’échanges, lieux d’exil},
editor = {Benoît Tadié},
location = {Paris},
publisher = {Ent’revues},
pages = {189–2000},
}
@collection{macaulay1992,
editor = {MacAulay, Donald},
date = {1992},
title = {The Celtic Languages},
location = {Cambridge},
publisher = {Cambridge University Press},
}
@article{sohmer1999,
author = {Sohmer, Steve},
title = {The Lunar Calendar of Shakespeare's \emph{King Lear}},
journal = {Early Modern Literary Studies},
volume = {5},
number = {2},
date = {1999-09},
pages = {1-17},
url = {http://purl.oclc.org/emls/05-2/sohmlear.htm},
urldate = {2000-01-28},
}
@article{lee2009,
author = {Richard Lee},
title = {The Rebirth of Inherited Memories},
journal = {MHRA Working Papers in the Humanities},
volume = {4},
date = {2009},
pages = {18-24},
url = {http://www.mhra.org.uk/ojs/index.php/wph/article/viewFile/73/70},
urldate = {2012-05-01},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatletter
\newrobustcmd{\mkbibangle}[1]{%
\begingroup
\blx@blxinit
\blx@setsfcodes
<#1>%
\endgroup}
\makeatother
\renewcommand*{\RNfont}{\textsc}
\DeclareDelimFormat[bib]{nameyeardelim}{\addperiod\space}
\DeclareDelimFormat[bib]{nametitledelim}{\addperiod\space}
\renewcommand*{\intitlepunct}{\addspace}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\subtitlepunct}{\addcolon\space}
\DeclareFieldFormat{number}{\RN{#1}}
\DeclareFieldFormat[article,periodical]{pages}{#1}
\renewcommand*{\bibpagespunct}{%
\ifboolexpr{test {\ifentrytype{article}} or test {\ifentrytype{periodical}}}
{\addcolon\space}
{\addcomma\space}}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}
\DeclareFieldFormat{url}{\mkbibangle{\url{#1}}}
\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}
\DeclareFieldFormat{doi}{\mkbibangle{\url{http://dx.doi.org/#1}}}
\renewbibmacro*{in:}{%
\ifentrytype{article}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}}%
\newunit
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\usebibmacro{issue+date}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit}
\renewbibmacro*{series+number}{%
\printfield{series}%
\setunit{\addcomma\space}%
\printfield{number}%
\newunit}
\renewbibmacro*{publisher+location+date}{%
\setunit{\addspace}%
\printtext[parens]{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\usebibmacro{date}}%
\newunit}
\renewbibmacro*{doi+eprint+url}{%
\setunit{\addspace}%
\iftoggle{bbx:doi}
{\printfield{doi}}
{}%
\setunit{\addspace}%
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\setunit{\addspace}%
\iftoggle{bbx:url}
{\usebibmacro{url+urldate}}
{}}
\DeclareBibliographyDriver{thesis}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author}%
\setunit{\printdelim{nametitledelim}}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\printfield{note}%
\setunit{\addspace}\newblock
\printtext[parens]{%
\printfield{pubstate}%
\global\clearfield{pubstate}%
\setunit*{\addspace}%
\printfield{type}%
\newunit
\usebibmacro{institution+location+date}}%
\newunit\newblock
\usebibmacro{chapter+pages}%
\newunit
\printfield{pagetotal}%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\iftoggle{bbx:related}
{\usebibmacro{related:init}%
\usebibmacro{related}}
{}%
\usebibmacro{finentry}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment