% \iffalse
%<*internal|bbx|cbx|dbx|lbx|doc>
\def\Version{2024/08/26 v3.3}
%</internal|bbx|cbx|dbx|lbx|doc>
%<*internal>
\iffalse
%</internal>
%<*bbx|cbx|dbx|lbx>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%</bbx|cbx|dbx|lbx>
%<*bbx&o>
\ProvidesFile{oxref.bbx}
    [\Version\space Base settings for bibliography styles inspired by the Oxford Guide to Style]
%</bbx&o>
%<*bbx&n>
%<default>\ProvidesFile{oxnotes.bbx}
%<ibid>\ProvidesFile{oxnotes-ibid.bbx}
%<note>\ProvidesFile{oxnotes-note.bbx}
%<inote>\ProvidesFile{oxnotes-inote.bbx}
%<trad1>\ProvidesFile{oxnotes-trad1.bbx}
%<trad2>\ProvidesFile{oxnotes-trad2.bbx}
%<trad3>\ProvidesFile{oxnotes-trad3.bbx}
    [\Version\space Footnote-based bibliography style inspired by the Oxford Guide to Style]
%</bbx&n>
%<*bbx&m>
\ProvidesFile{oxnum.bbx}
    [\Version\space Numeric bibliography style inspired by the Oxford Guide to Style]
%</bbx&m>
%<*bbx&a>
\ProvidesFile{oxalph.bbx}
    [\Version\space Alphabetic bibliography style inspired by the Oxford Guide to Style]
%</bbx&a>
%<*bbx&y>
\ProvidesFile{oxyear.bbx}
    [\Version\space Author-year bibliography style inspired by the Oxford Guide to Style]
%</bbx&y>
%<*cbx&n>
%<default>\ProvidesFile{oxnotes.cbx}
%<ibid>\ProvidesFile{oxnotes-ibid.cbx}
%<note>\ProvidesFile{oxnotes-note.cbx}
%<inote>\ProvidesFile{oxnotes-inote.cbx}
%<trad1>\ProvidesFile{oxnotes-trad1.cbx}
%<trad2>\ProvidesFile{oxnotes-trad2.cbx}
%<trad3>\ProvidesFile{oxnotes-trad3.cbx}
    [\Version\space Footnote-based citation style inspired by the Oxford Guide to Style]
%</cbx&n>
%<*cbx&m>
\ProvidesFile{oxnum.cbx}
    [\Version\space Numeric citation style inspired by the Oxford Guide to Style]
%</cbx&m>
%<*cbx&a>
\ProvidesFile{oxalph.cbx}
    [\Version\space Alphabetic citation style inspired by the Oxford Guide to Style]
%</cbx&a>
%<*cbx&y>
\ProvidesFile{oxyear.cbx}
    [\Version\space Author-year citation style inspired by the Oxford Guide to Style]
%</cbx&y>
%<*dbx>
%<*n>
%<default>\ProvidesFile{oxnotes.dbx}
%<ibid>\ProvidesFile{oxnotes-ibid.dbx}
%<note>\ProvidesFile{oxnotes-note.dbx}
%<inote>\ProvidesFile{oxnotes-inote.dbx}
%<trad1>\ProvidesFile{oxnotes-trad1.dbx}
%<trad2>\ProvidesFile{oxnotes-trad2.dbx}
%<trad3>\ProvidesFile{oxnotes-trad3.dbx}
%</n>
%<m>\ProvidesFile{oxnum.dbx}
%<a>\ProvidesFile{oxalph.dbx}
%<y>\ProvidesFile{oxyear.dbx}
    [\Version\space Data model for the Oxref family of styles]
%</dbx>
%<*lbx&en>
\ProvidesFile{english-oxref.lbx}
    [\Version\space Generic English conventions required by the biblatex-oxref styles]
%</lbx&en>
%<*lbx&gb>
\ProvidesFile{british-oxref.lbx}
    [\Version\space British English conventions required by the biblatex-oxref styles]
%</lbx&gb>
%<*lbx&us>
\ProvidesFile{american-oxref.lbx}
    [\Version\space American English conventions required by the biblatex-oxref styles]
%</lbx&us>
%<*lbx&es>
\ProvidesFile{spanish-oxref.lbx}
    [\Version\space Spanish conventions required by the biblatex-oxref styles]
%</lbx&es>
%<*lbx&pl>
\ProvidesFile{polish-oxref.lbx}
    [\Version\space Polish conventions required by the biblatex-oxref styles]
%</lbx&pl>
%<*doc&n>
\ProvidesFile{oxnotes-doc.tex}
    [\Version\space Footnote-based biblatex style inspired by the Oxford Guide to Style]
%</doc&n>
%<*doc&m>
\ProvidesFile{oxnum-doc.tex}
    [\Version\space Numeric biblatex style inspired by the Oxford Guide to Style]
%</doc&m>
%<*doc&a>
\ProvidesFile{oxalph-doc.tex}
    [\Version\space Alphabetic biblatex style inspired by the Oxford Guide to Style]
%</doc&a>
%<*doc&y>
\ProvidesFile{oxyear-doc.tex}
    [\Version\space Author-year biblatex style inspired by the Oxford Guide to Style]
%</doc&y>
%<*readme>
# biblatex-oxref: Biblatex styles inspired by the *Oxford Guide to Style*

This bundle provides four [biblatex] styles that implement (some of) the
stipulations and examples provided by the 2014 *New Hart's Rules* and the 2002
*Oxford Guide to Style*:

  * `oxnotes` is a style similar to the standard `verbose`,
    intended for use with footnotes;
  * `oxnum` is a style similar to the standard `numeric`,
    intended for use with numeric in-text citations.
  * `oxalph` is a style similar to the standard `alphabetic`,
    intended for use with alphabetic in-text citations.
  * `oxyear` is a style similar to the standard `authoryear`,
    intended for use with parenthetical in-text citations.

[biblatex]: http://ctan.org/pkg/biblatex
%</readme>
%<*bib>
@reference{ritter2002ogs,
  editor = {R. M. Ritter},
  editortype= {editorcm},
  title = {The {Oxford} Guide to Style},
  date = {2002},
  publisher = {Oxford University Press},
  location = {Oxford, UK}}
@reference{waddingham2014nhr,
  editor = {Anne Waddingham},
  title = {New {Hart's} Rules},
  subtitle = {The {Oxford} Guide to Style},
  date = {2014},
  edition = {2},
  publisher = {Oxford University Press},
  location = {Oxford, UK}}
@book{law.oxford2012oscola,
  author = {{Faculty of Law, University of Oxford}},
  editor = {Donal Nolan and Sandra Meredith},
  title = {{OSCOLA}},
  subtitle = {The {Oxford} {University} Standard for Citation of Legal Authorities},
  date = {2012},
  edition = {4},
  publisher = {Hart},
  location = {Oxford, UK},
  url = {https://www.law.ox.ac.uk/oscola}}
%</bib>
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse

\nopreamble\nopostamble

\usedir{doc/latex/\jobname}
\generate{
  \file{README.md}{\from{\jobname.dtx}{readme}}
  \file{\jobname.bib}{\from{\jobname.dtx}{bib}}
}

\preamble
----------------------------------------------------------------
biblatex-oxref --- Biblatex styles inspired by the Oxford Guide to Style
Author:  Alex Ball
E-mail:  a.j.ball@bath.ac.uk
License: Released under the LaTeX Project Public License v1.3c or later
See:     http://www.latex-project.org/lppl.txt
----------------------------------------------------------------

\endpreamble
\postamble

Copyright (C) 2016–2023 Alex Ball
\endpostamble

\usedir{tex/latex/\jobname}
\generate{
  \file{\jobname.bbx}{\from{\jobname.dtx}{bbx,o}}
  \file{oxnotes.bbx}{\from{\jobname.dtx}{bbx,n,default}}
  \file{oxnotes-ibid.bbx}{\from{\jobname.dtx}{bbx,n,ibid}}
  \file{oxnotes-note.bbx}{\from{\jobname.dtx}{bbx,n,note}}
  \file{oxnotes-inote.bbx}{\from{\jobname.dtx}{bbx,n,inote}}
  \file{oxnotes-trad1.bbx}{\from{\jobname.dtx}{bbx,n,trad1}}
  \file{oxnotes-trad2.bbx}{\from{\jobname.dtx}{bbx,n,trad2}}
  \file{oxnotes-trad3.bbx}{\from{\jobname.dtx}{bbx,n,trad3}}
  \file{oxnum.bbx}{\from{\jobname.dtx}{bbx,m}}
  \file{oxalph.bbx}{\from{\jobname.dtx}{bbx,a}}
  \file{oxyear.bbx}{\from{\jobname.dtx}{bbx,y}}
  \file{oxnotes.cbx}{\from{\jobname.dtx}{cbx,n,default}}
  \file{oxnotes-ibid.cbx}{\from{\jobname.dtx}{cbx,n,ibid}}
  \file{oxnotes-note.cbx}{\from{\jobname.dtx}{cbx,n,note}}
  \file{oxnotes-inote.cbx}{\from{\jobname.dtx}{cbx,n,inote}}
  \file{oxnotes-trad1.cbx}{\from{\jobname.dtx}{cbx,n,trad1}}
  \file{oxnotes-trad2.cbx}{\from{\jobname.dtx}{cbx,n,trad2}}
  \file{oxnotes-trad3.cbx}{\from{\jobname.dtx}{cbx,n,trad3}}
  \file{oxnum.cbx}{\from{\jobname.dtx}{cbx,m}}
  \file{oxalph.cbx}{\from{\jobname.dtx}{cbx,a}}
  \file{oxyear.cbx}{\from{\jobname.dtx}{cbx,y}}
  \file{oxnotes.dbx}{\from{\jobname.dtx}{dbx,n,default}}
  \file{oxnotes-ibid.dbx}{\from{\jobname.dtx}{dbx,n,ibid}}
  \file{oxnotes-note.dbx}{\from{\jobname.dtx}{dbx,n,note}}
  \file{oxnotes-inote.dbx}{\from{\jobname.dtx}{dbx,n,inote}}
  \file{oxnotes-trad1.dbx}{\from{\jobname.dtx}{dbx,n,trad1}}
  \file{oxnotes-trad2.dbx}{\from{\jobname.dtx}{dbx,n,trad2}}
  \file{oxnotes-trad3.dbx}{\from{\jobname.dtx}{dbx,n,trad3}}
  \file{oxnum.dbx}{\from{\jobname.dtx}{dbx,m}}
  \file{oxalph.dbx}{\from{\jobname.dtx}{dbx,a}}
  \file{oxyear.dbx}{\from{\jobname.dtx}{dbx,y}}
  \file{american-\jobname.lbx}{\from{\jobname.dtx}{lbx,us}}
  \file{british-\jobname.lbx}{\from{\jobname.dtx}{lbx,gb}}
  \file{english-\jobname.lbx}{\from{\jobname.dtx}{lbx,en}}
  \file{spanish-\jobname.lbx}{\from{\jobname.dtx}{lbx,es}}
  \file{polish-\jobname.lbx}{\from{\jobname.dtx}{lbx,pl}}
  \file{oxnotes-doc.tex}{\from{\jobname.dtx}{doc,n}}
  \file{oxnum-doc.tex}{\from{\jobname.dtx}{doc,m}}
  \file{oxalph-doc.tex}{\from{\jobname.dtx}{doc,a}}
  \file{oxyear-doc.tex}{\from{\jobname.dtx}{doc,y}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\usedir{source/latex/\jobname}
\generate{
  \file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%<*driver>
\ProvidesFile{oxref.dtx}
    [\Version\space Biblatex styles inspired by the Oxford Guide to Style]
\PassOptionsToPackage{style=oxnotes}{biblatex}
%</driver>
%<doc&n>\PassOptionsToPackage{style=oxnotes,scnames,varissuedate,anon}{biblatex}
%<doc&m>\PassOptionsToPackage{style=oxnum,scnames,varissuedate,anon,backref=true}{biblatex}
%<doc&a>\PassOptionsToPackage{style=oxalph,varissuedate,anon}{biblatex}
%<doc&y>\PassOptionsToPackage{style=oxyear,varissuedate,anon}{biblatex}
%<*driver|doc>
\documentclass[extrafontsizes,11pt,a4paper,oneside]{memoir}
\setlrmarginsandblock{3cm}{3cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*}
\checkandfixthelayout
% Document divisions
\chapterstyle{ell}
\renewcommand{\prechapterprecis}{%
  \vspace*{\prechapterprecisshift}%
  \begin{flushright}\precisfont
}
\renewcommand{\postchapterprecis}{\end{flushright}}
\hangsecnum
\setsecheadstyle{\Large\bfseries\raggedright}
\setsubsecheadstyle{\large\bfseries\scshape\raggedright}
\setsecnumdepth{subsection}
% Pagination and headers
\nouppercaseheads
\makeoddhead{myheadings}{\textsc{\leftmark}}{}{\thepage}
\makepsmarks{myheadings}{%
  \def\chaptermark##1{\markboth{##1}{##1}}%
  \def\sectionmark##1{\markright{##1}}%
}
\pagestyle{myheadings}
\aliaspagestyle{title}{empty}
% Paragraphs and lists
\setlength{\parindent}{0pt}\nonzeroparskip
\firmlists

\usepackage[british]{babel}
\usepackage[mono=false,defaultfeatures={SmallCapsFeatures={Letters=SmallCaps,Renderer=Basic,Ligatures=NoCommon}}]{libertine}
\usepackage{fontawesome}[2015/07/07]
\newcommand{\booksym}{\makebox[1em][c]{\faicon{book}}}
\newcommand{\cogsym}{\makebox[1em][c]{\faicon{cog}}}
\makeatletter
\@ifpackageloaded{fontspec}{%
  \setmonofont[Scale=MatchLowercase,StylisticSet=1,AutoFakeSlant]{Inconsolatazi4}
}{%
  \usepackage[utf8]{inputenc}
  \usepackage[varl]{zi4}
}
\makeatother

\usepackage{xcolor,xparse}
\definecolor{Green}{rgb}{0,.5,0}
\colorlet{ok}{Green}
\colorlet{todo}{red}
\colorlet{hacked}{orange}
\colorlet{manual}{purple}

\usepackage{iftex}
\ifluatex
  % Fix spacing in tcolorbox
  \usepackage{luacolor}
\fi

\usepackage{tcolorbox}
\tcbuselibrary{skins,xparse,documentation,breakable,minted}
\colorlet{Option}{violet}
\colorlet{Command}{red!75!black}
\colorlet{Environment}{blue!75!black}
\colorlet{Value}{olive!75!black}
\colorlet{Color}{cyan!75!black}
\tcbset
  { enhanced
  , listing engine=minted
  , minted options=
    { breaklines
    , fontsize=\footnotesize
%<*!doc>
    , linenos
    , numbersep=20pt
    , firstnumber=last
%</!doc>
    }
  , index format=pgf
  , color command=Command
  , color environment=Environment
  , color key=Option
  , color value=Value
  , color color=Color
  }
\renewcommand{\theFancyVerbLine}{\footnotesize\itshape\color{gray}\arabic{FancyVerbLine}}
\let\tcbcs=\cs
\renewcommand*{\cs}[1]{\textcolor{Command}{\tcbcs{#1}}}
\def\sqbrackets#1{%
  \texttt{\textcolor{Option}{[}#1\textcolor{Option}{]}}}
\def\brackets#1{%
  \texttt{\textcolor{Environment}{\char`\{}#1\textcolor{Environment}{\char`\}}}}
\def\marg#1{%
  \textcolor{Environment}{\ttfamily\char`\{}\meta{#1}\textcolor{Environment}{\ttfamily\char`\}}}
\newcommand*{\env}[1]{\textcolor{Environment}{\ttfamily #1}}
\newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}}
\newcommand*{\val}[1]{\textcolor{Value}{\ttfamily #1}}
\makeatletter
\newcommand{\resetmintedformat}{%
  % Comments
  \expandafter\def\csname PYGdefault@tok@c\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc####1{\textcolor{gray}{####1}}}
  % Command sequences
  \expandafter\def\csname PYGdefault@tok@k\endcsname{\def\PYGdefault@tc####1{\textcolor{Command}{####1}}}
  % Optional arguments
  \expandafter\def\csname PYGdefault@tok@na\endcsname{\def\PYGdefault@tc####1{\textcolor{Option}{####1}}}
  % Braces
  \expandafter\def\csname PYGdefault@tok@nb\endcsname{\def\PYGdefault@tc####1{\textcolor{Environment}{####1}}}
}
\apptocmd{\minted@checkstyle}{\resetmintedformat}{}{}
\makeatother

\RecustomVerbatimEnvironment
  {Verbatim}{Verbatim}
  {commentchar=\%}

\usepackage{xpatch,csquotes,multicol}

\usepackage
[backend=biber%
,hyperref=false%
%,isbn=false%
]{biblatex}
\addbibresource{oxref.bib}
\setcounter{biburllcpenalty}{900}
\setcounter{biburlucpenalty}{800}
\setcounter{biburlnumpenalty}{700}
\DeclareBibliographyCategory{hidden}
\makeatletter
\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\defcounter{maxnames}{\blx@maxbibnames}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}\finentrypunct}
\makeatother
% \xpretobibmacro{finentry}{%
%   \ifboolexpr{ test {\ifcitation} and  }{%
%     \finentrypunct
%   }{}%
% }{}{}
%<*doc>
% Shorthands useful for oxyear make overlong labels for oxnum/oxalph,
% so we remove them.
\DeclareSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite=true]{%
%<a>      \pertype{legislation}
%<a>      \pertype{legal}
%<n|y>      \pernottype{legslation}
%<n|y>      \pernottype{legal}
      \step[fieldset=shorthand, null=true]
    }%
  }%
}
%</doc>

%<*!doc>
\usepackage[tightLists=false]{markdown}
\markdownSetup{rendererPrototypes={%
    link = {\href{#3}{#1}},%
}}

%</!doc>
\hypersetup{pdfborder={0 0 0},pdfencoding=unicode}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\crefname{page}{page}{pages}

\NewDocumentCommand{\pkg}{om}{%
  \IfNoValueTF{#1}
    {\lowercase{\href{http://www.ctan.org/pkg/#2}}{\textsf{#2}}}
    {\lowercase{\href{http://www.ctan.org/pkg/#1-#2}}{\textsf{#2}}}%
}
\newcommand*{\lit}[1]{\textsf{#1}}
\newcommand*{\code}[1]{\texttt{#1}}
\newcommand*{\aside}[1]{\textcolor{violet}{[\textsc{tip:} #1]}}
\newcommand{\tip}[1]{\hangfrom{\makebox[2em][c]{\faLightbulbO}}#1\par}
\newcommand{\info}[1]{\hangfrom{\makebox[2em][c]{\faInfoCircle}}#1\par}
\newcommand{\hack}[1]{\hangfrom{\makebox[2em][c]{\faWrench}}#1\par}

% For debugging; userd is either ‘todo’, ‘hacked’, ‘manual’
\makeatletter
\def\CiteStatus{todo}
\newcommand{\dbgcolor}[2]{%
  \bgroup
  \blx@citecmdinit
  \blx@citeinit
  \def\blx@precode{}%
  \def\blx@postcode{}%
  \def\blx@loopcode{%
    \iffieldundef{userd}
    {\xdef\CiteStatus{ok}}
    {\xdef\CiteStatus{\abx@field@userd}}}%
  \blx@citeloop{#1}%
  \textcolor{\CiteStatus}{#2}%
  \egroup
}
\makeatother
% bibexbox displays a sample reference:
% (colour)<source reference>[citation postnote]{bib key}[additional TCB options]
% Put hand-coded reference in the environment upper part.
% Put a bib entry (wrapped in a Verbatim environment) in the environment lower part.
\NewTColorBox{bibexbox}{D(){ok}d<>omo}%
  {bicolor
  ,colframe = #1
  ,colback = #1!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize
  ,before upper = {\hangfrom{\booksym\space}\biburlsetup}
  ,IfNoValueTF={#3}%
    {after upper = {\par\hangfrom{\cogsym\space}\fullcite{#4}}
    }%
    {after upper = {\par\hangfrom{\cogsym\space}\fullcite[#3]{#4}}
    ,title = {\texttt{\string\fullcite[#3]\{#4\}}}
    }
  ,IfNoValueTF={#2}{}%
    {overlay = {
      \node[anchor=south east,text=teal] at (frame.south east) {#2};
      }
    }
  ,phantomlabel={ex:#4}
  ,IfNoValueTF={#5}{}{#5}
  }
\NewTotalTColorBox{\spec}{m}%
  {enhanced
  ,sharp corners = west
  ,colframe = teal
  ,colback = teal!5!white
  ,toprule = 0pt
  ,bottomrule = 0pt
  ,rightrule = 0pt
  }{#1}
% egcite displays a sample citation:
% (colour)[title]{hand-coded citation text}[additional TCB options]
% Put the citation command in the environment.
\NewTCBListing{egcite}{D(){ok} o m !o}%
  {colframe = #1
  ,colback = #1!5!white
  ,listing side text
  ,lefthand width = 14em
  ,IfNoValueTF={#2}{}{title = #2}
  ,before lower = {\raggedright\ifblank{#3}{}{\hangfrom{\booksym\space}#3\par}\hangfrom{\cogsym\space}}
  ,IfNoValueTF={#4}{}{#4}}
% egcite* uses upper and lower portions
\NewTCBListing{egcite*}{D(){ok} o m !o}%
  {colframe = #1
  ,colback = #1!5!white
  ,IfNoValueTF={#2}{}{title = #2}
  ,before lower = {\raggedright\ifblank{#3}{}{\hangfrom{\booksym\space}#3\par}\hangfrom{\cogsym\space}}
  ,IfNoValueTF={#4}{}{#4}}

\frenchspacing

\usepackage[british]{isodate}
%</driver|doc>
%<*doc>
\usepackage{readprov}
\GetFileInfo{\jobname.tex}
%</doc>
%<*driver>

% For typesetting the implementation
\makeatletter
\let\docdate\@undefined
\let\theglossary\@undefined
\let\endtheglossary\@undefined
\makeatother
\usepackage{doc}
\makeatletter
\renewenvironment{theglossary}{%
  \bgroup
    \glossary@prologue
    \GlossaryParms \let\item\@idxitem \ignorespaces
}{%
  \egroup
}
\renewenvironment{macro}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintComC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed a macro environment you have not opened on \the\inputlineno.}%
  }
  \index{\MyName@\tcbIndexPrintComC {\MyName}|)}%
}
\renewenvironment{environment}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|(emph}%
  \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an environment environment you have not opened on \the\inputlineno.}%
  }
  \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|)}%
}
\newenvironment{optionkey}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintKeyCA {\MyName}|(emph}%
  \index{Keys!\MyName@\tcbIndexPrintKeyC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an optionkey environment you have not opened on \the\inputlineno.}%
  }
  \index{Keys!\MyName@\tcbIndexPrintKeyC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintKeyCA {\MyName}|)}%
}
\newenvironment{optionvalue}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintValCA {\MyName}|(emph}%
  \index{Values!\MyName@\tcbIndexPrintValC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an optionvalue environment you have not opened on \the\inputlineno.}%
  }
  \index{Values!\MyName@\tcbIndexPrintValC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintValCA {\MyName}|)}%
}
\let\PrintMacroName\@gobble
\let\PrintEnvName\@gobble
\renewenvironment{tcb@manual@entry}{\begin{list}{}{%
  \setlength{\topsep}{0pt}
  \setlength{\partopsep}{0pt}
  \setlength{\leftmargin}{\kvtcb@doc@left}%
  \setlength{\itemindent}{0pt}%
  \setlength{\itemsep}{0pt}%
  \setlength{\parsep}{0pt}%
  \setlength{\rightmargin}{\kvtcb@doc@right}%
  }\item}{\end{list}}
\makeatother
\MakeShortVerb{\|}

% This bit inspired by ydoc
\makeatletter
\newwrite\ydocwrite
\def\ydocfname{\jobname.listing}
\def\ydoc@catcodes{%
  \let\do\@makeother
  \dospecials
  \catcode`\\=\active
  \catcode`\^^M=\active
  \catcode`\ =\active
}
\def\macrocode{%
  \begingroup
  \ydoc@catcodes
  \macro@code
}
\def\endmacrocode{}
\begingroup
\endlinechar\m@ne
\@firstofone{%
\catcode`\|=0\relax
\catcode`\(=1\relax
\catcode`\)=2\relax
\catcode`\*=14\relax
\catcode`\{=12\relax
\catcode`\}=12\relax
\catcode`\ =12\relax
\catcode`\%=12\relax
\catcode`\\=\active
\catcode`\^^M=\active
\catcode`\ =\active
}*
|gdef|macro@code#1^^M%    \end{macrocode}(*
|endgroup|expandafter|macro@@code|expandafter(|ydoc@removeline#1|noexpand|lastlinemacro)*
)*
|gdef|ydoc@removeline#1^^M(|noexpand|firstlinemacro)*
|gdef|ydoc@defspecialmacros(*
|def^^M(|noexpand|newlinemacro)*
|def (|noexpand|spacemacro)*
|def\(|noexpand|bslashmacro)*
)*
|gdef|ydoc@defrevspecialmacros(*
|def|newlinemacro(|noexpand^^M)*
|def|spacemacro(|noexpand )*
|def|bslashmacro(|noexpand\)*
)*
|endgroup
\def\macro@@code#1{%
  {\ydoc@defspecialmacros
  \xdef\themacrocode{#1}}%
  \PrintMacroCode
  \end{macrocode}%
}
\def\PrintMacroCode{%
  \begingroup
  \let\firstlinemacro\empty
  \let\lastlinemacro\empty
  \def\newlinemacro{^^J}%
  \let\bslashmacro\bslash
  \let\spacemacro\space
  \immediate\openout\ydocwrite=\ydocfname\relax
  \immediate\write\ydocwrite{\themacrocode}%
  \immediate\closeout\ydocwrite
  \let\input\@input
  \tcbinputlisting{breakable,listing only,docexample,listing file=\ydocfname}%
  \endgroup
}
\makeatother
\AtBeginDocument{%
\hypersetup{linkcolor=black}%
}

\GetFileInfo{\jobname.dtx}
\title{OXREF -- Biblatex styles inspired by the \emph{Oxford Guide to Style}}
%</driver>
%<doc&n>\title{OXNOTES -- A notes-based style for Biblatex}
%<doc&m>\title{OXNUM -- A numeric style for Biblatex}
%<doc&a>\title{OXALPH -- An alphabetic style for Biblatex}
%<doc&y>\title{OXYEAR -- An author–year style for Biblatex}
%<*driver|doc>

\newcounter{elementcount}
\newcommand{\commaorandlist}[1]{%
  % Counting up
  \renewcommand*{\do}[1]{\stepcounter{elementcount}}%
  \dolistloop{#1}%
  \ifnumgreater{\value{elementcount}}{2}{%
    \def\thisfinaland{,\space and\space}%
  }{%
    \def\thisfinaland{\space and\space}%
  }%
  % Counting back down
  \renewcommand*{\do}[1]{%
    \ifnumgreater{\value{elementcount}}{2}{% antipenultimate or earlier
      ##1,\space
    }{%
      \ifnumequal{\value{elementcount}}{2}{% penultimate
        ##1\thisfinaland
      }{% last
        ##1%
      }%
    }%
    \addtocounter{elementcount}{-1}%
  }%
  \dolistloop{#1}}

\author{Alex Ball}
\listadd\thetranslators{Bruno Maltras}
\listadd\thetranslators{Sebastian Wasiuta}
\date{\printdateTeX{\filedate}}
\begin{document}
\thispagestyle{empty}
\begin{adjustwidth}{.2\textwidth}{0pt}
  \sffamily\setlength{\parindent}{0pt}%
  \LARGE\textsc{oxref bundle}

  \vspace{\stretch{1}}
  \LARGE\thetitle

  \bigskip
  \Large\theauthor\par
  \normalsize with translations by \commaorandlist\thetranslators

  \bigskip
  \Large\thedate

  \bigskip
  \Large\fileversion
\end{adjustwidth}

\vspace{\stretch{3}}
\noindent
\hspace*{.1\textwidth}\raisebox{0pt}[0pt][0pt]{\rule{\normalrulethickness}{\textheight}}

\newpage
\begin{KeepFromToc}
\tableofcontents
\end{KeepFromToc}

%</driver|doc>
%<*driver>
\chapter{Introduction}

This document provides the documented sources for the \pkg[biblatex]{oxref}
biblography styles:
\begin{itemize}
\item
  \textsf{oxnotes}: a style similar to the standard \textsf{verbose}
  and its variants, intended for use with footnotes;
\item
  \textsf{oxnum}: a style similar to the standard \textsf{numeric},
  intended for use with numeric in-text citation labels;
\item
  \textsf{oxalph}: a style similar to the standard \textsf{alphabetic},
  intended for use with alphabetic in-text citation labels;
\item
  \textsf{oxyear}: a style similar to the standard \textsf{authoryear},
  intended for use with parenthetical in-text citations.
\end{itemize}

\section{Quick start}

The styles are self-contained, so you can load them with \pkg{biblatex}:

\begin{multicols}{2}
\begin{tcblisting}{listing only}
\usepackage[style=oxnotes]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxnum]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxalph]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxyear]{biblatex}
\end{tcblisting}
\end{multicols}

For further information, including some additional options you can set,
please refer to the separate documentation files
\href{./oxnotes-doc.pdf}{\texttt{oxnotes-doc.pdf}},
\href{./oxnum-doc.pdf}{\texttt{oxnum-doc.pdf}},
\href{./oxalph-doc.pdf}{\texttt{oxalph-doc.pdf}},
and
\href{./oxyear-doc.pdf}{\texttt{oxyear-doc.pdf}}
respectively.

\sloppy
\begin{markdown*}{hybrid=true}
%</driver>
%<*driver|readme>

## Installation

### Dependencies

To compile the documentation you will need to have the [minted] package working,
which in turn relies on Python 2.6+ and Pygments. See the documentation of that
package for details.

### Managed way

The latest stable release of the biblatex-oxref bundle has been packaged for
TeX Live and MiKTeX. If you are running TeX Live and have `tlmgr` installed, you
can install the bundle simply by running `tlmgr install biblatex-oxref`. If you
are running MiKTeX, you can install the bundle by running
`mpm --install=biblatex-oxref`. Both `tlmgr` and `mpm` have GUI versions that
you might find friendlier.

### Automated way

A makefile is provided which you can use with the Make utility on
UNIX-like systems:

  * Running `make source` generates the derived files
      - README.md
      - oxref.bbx, oxnotes.bbx, oxnotes-ibid.bbx, oxnotes-note.bbx,
        oxnotes-inote.bbx, oxnotes-trad1.bbx, oxnotes-trad2.bbx,
        oxnotes-trad3.bbx, oxyear.bbx, oxnum.bbx, oxalph.bbx
      - oxnotes.cbx, oxnotes-ibid.cbx, oxnotes-note.cbx, oxnotes-inote.cbx,
        oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx,
        oxnum.cbx, oxalph.cbx
      - american-oxref.lbx, british-oxref.lbx, english-oxref.lbx,
        spanish-oxref.lbx, polish.lbx
      - oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx,
        oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx,
        oxnum.dbx, oxalph.dbx
      - oxref.bib
      - oxref.ins
      - oxnotes-doc.tex, oxyear-doc.tex, oxnum-doc.tex, oxalph-doc.tex

  * Running `make` generates the above files and also oxref.pdf,
    oxnotes-doc.pdf, oxyear-doc.pdf, oxnum-doc.pdf and oxalph-doc.pdf.

  * Running `make inst` installs the files in the user's TeX tree.
    You can undo this with `make uninst`.

  * Running `make install` installs the files in the local TeX tree.
    You can undo this with `make uninstall`.

  * Running `make clean` removes auxiliary files from the working directory.

  * Running `make distclean` removes the generated files from the working
    directory as well.

### Manual way

To install the bundle from scratch, follow these instructions. If you have
downloaded the zip file from the [Releases] page on GitHub, you can skip the
first two steps.

 1. Run `luatex oxref.dtx` to generate the source files. (You can safely skip
    this step if you are confident about step 2.)

 2. Compile oxref.dtx, oxnotes-doc.tex, oxyear-doc.tex, and oxnum-doc.tex with
    LuaLaTeX and Biber to generate the documentation. You will need to enable
    shell escape so that [minted] can typeset the listings.

 3. Move the files to your TeX tree as follows:
      - `source/latex/biblatex-oxref`:
        oxref.dtx,
        (oxref.ins)
      - `tex/latex/biblatex-oxref`:
        american-oxref.lbx,
        british-oxref.lbx,
        english-oxref.lbx,
        spanish-oxref.lbx,
        polish-oxref.lbx,
        oxalph.bbx,
        oxalph.cbx,
        oxalph.dbx,
        oxnotes.bbx,
        oxnotes.cbx,
        oxnotes.dbx,
        oxnotes-ibid.bbx,
        oxnotes-ibid.cbx,
        oxnotes-ibid.dbx,
        oxnotes-inote.bbx,
        oxnotes-inote.cbx,
        oxnotes-inote.dbx,
        oxnotes-note.bbx,
        oxnotes-note.cbx,
        oxnotes-note.dbx,
        oxnotes-trad1.bbx,
        oxnotes-trad1.cbx,
        oxnotes-trad1.dbx,
        oxnotes-trad2.bbx,
        oxnotes-trad2.cbx,
        oxnotes-trad2.dbx,
        oxnotes-trad3.bbx,
        oxnotes-trad3.cbx,
        oxnotes-trad3.dbx,
        oxnum.bbx,
        oxnum.cbx,
        oxnum.dbx,
        oxref.bbx,
        oxyear.bbx,
        oxyear.cbx,
        oxyear.dbx
      - `doc/latex/biblatex-oxref`:
        README.md,
        oxalph-doc.pdf,
        oxalph-doc.tex,
        oxnotes-doc.pdf,
        oxnotes-doc.tex,
        oxnum-doc.pdf,
        oxnum-doc.tex,
        oxref.bib,
        oxref.pdf,
        oxyear-doc.pdf,
        oxyear-doc.tex

 4. You may then have to update your installation's file name database
    before TeX and friends can see the files.

[Releases]: https://github.com/alex-ball/biblatex-oxref/releases
[minted]: http://ctan.org/pkg/minted

## Licence

Copyright 2016–2023 Alex Ball.

This work consists of the documented LaTeX file oxref.dtx and a Makefile.

The text files contained in this work may be distributed and/or modified
under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
either version 1.3c of this license or (at your option) any later
version.

This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].

[lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
[me]: https://alexball.me.uk/ "Alex Ball"

%</driver|readme>
%<*driver>
\end{markdown*}

\fussy
\iffalse % syntax highlighting \fix
%</driver>
%<*doc|bib>
%<*n|m|a|y>
\chapter{Introduction}

\section{Loading the style}\label{sec:loading}

The style is self-contained, so you can load it with \pkg{biblatex}:
\begin{tcblisting}{listing only}
%<n>\usepackage[style=oxnotes]{biblatex}
%<m>\usepackage[style=oxnum]{biblatex}
%<a>\usepackage[style=oxalph]{biblatex}
%<y>\usepackage[style=oxyear]{biblatex}
\end{tcblisting}

The style has some options additional to the regular \pkg{biblatex} ones:

\begin{docKey}{anon}{=\val{literal}|\val{long}|\val{short}}{default \val{short}, initially \val{literal}}
  Affects what happens if the author name matches the value of \cs{oxrefanon}.
  By default, this is \enquote{Anonymous}, but you could change it a different word (such as \enquote{Anonimo}) instead.
  \begin{itemize}
  \item\docValue{literal}
    means no special handling is used.
  \item\docValue{long}
    will print the unabbreviated localization string \code{anon} (\enquote{Anonymous}) instead of the author name
%<y>    in citations and the bibliography.
%<m|a>    in the bibliography.
%<n>    in the bibliography, but neither are printed in citations.
  \item\docValue{short}
    will print the abbreviated localization string \code{anon} (\enquote{Anon.\@}) instead of the author name
%<y>    in citations and the bibliography.
%<m|a>    in the bibliography.
%<n>    in the bibliography, but neither are printed in citations.
  \end{itemize}
\end{docKey}

\begin{docKey}{bookseries}{=\val{in}|\val{out}}{default \val{in}, initially \val{in}}
  Puts the series information for a book \docValue{in}side or \docValue{out}side the parenthetical publication block.
\end{docKey}

\begin{docKey}{court-plain}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints courts of decision without parentheses.
\end{docKey}

\begin{docKey}{dashed}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  In the biblography, replaces recurring author\slash editor names with a dash.
\end{docKey}

\begin{docKey}{ecli}{=\val{yes}|\val{only}|\val{no}}{default \val{yes}, initially \val{yes}}
  Determines when ECLI numbers for EU legal cases are printed (if provided).
  \begin{itemize}
  \item\docValue{yes}
    prints the ECLI number in addition to the official report.
  \item\docValue{only}
    prints the ECLI number instead of the official report.
  \item\docValue{no}
    only prints the ECLI number if the case is otherwise unreported.
  \end{itemize}
\end{docKey}

\begin{docKey}{isourls}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Surrounds URLs with angle brackets.
\end{docKey}

\begin{docKey}{issuedate-plain}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Removes the parentheses around the date of a periodical without a volume number.
  This can also be set on a per-type and per-entry basis.
  (This option was previously called \key{varissuedate}.)
\end{docKey}

\begin{docKey}{issuestyle}{=\val{slash}|\val{colon}|\val{comma}|\val{parens}}{default \val{slash}, initially \val{slash}}
  Affects how journal volumes and numbers are printed.
  \begin{itemize}
  \item\docValue{slash}
    separates the two with a solidus, e.g. \enquote{23/2}.
  \item\docValue{colon}
    separates the two with a colon and space, e.g. \enquote{23: 2}.
%<a|y>    It is intended for use with \textsf{oxnotes}\slash\textsf{oxnum} and not recommended for this style.
  \item\docValue{comma}
    separates the two with a comma and space, e.g. \enquote{23, 2}.
  \item\docValue{parens}
    sets off the issue number in parentheses, e.g. \enquote{23 (2)}.
%<n|m>    It is intended for use with \textsf{oxalph}\slash\textsf{oxyear} and not recommended for this style.
  \end{itemize}
\end{docKey}

%<*a|y>
\begin{docKey}{mergedate}{=\val{maximum}|\val{compact}|\val{basic}|\val{minimum}|\val{year}|\val{false}}{default \val{year}, initially \val{year}}
  Affects how the date at the start of the references relates to the date in the \enquote{normal} position.
  The default value of \val{year} is intended for use with the default setting of \key{labeldate}\texttt{=}\val{year}.
  If you set \key{labeldate} to something else, you will probably want to set this option to \val{compact} or \val{maximum}. It can also be set on a per-type basis.
\end{docKey}
%</a|y>

\begin{docKey}{nolocation}{}{no value, initially unset}
  Replaces missing locations with \enquote{n.p.} or the localized equivalent in books, collections, reference works, proceedings, and similar entry types. Once set, this option cannot be overridden.
  Alternatively, it may be set on a per-entry basis.
\end{docKey}

%<*a|y>
\begin{docKey}{nonodate}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Suppresses the printing of the \code{nodate} localization string when an entry is missing a recognizable date. It can also be set on a per-type and per-entry basis. It is automatically set to \val{true} for entries with a \code{sortyear}, on the assumption that the date has been given in a non-date field (e.g.\@ the number of a standard).
\end{docKey}
%</a|y>

\begin{docKey}{nopublisher}{}{no value, initially unset}
  Removes publisher name from all entries. Once set, this option cannot be overridden.
\end{docKey}

\begin{docKey}{norelatedin}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Suppresses the printing of the \code{in} localization string in circumstances where it would appear directly following a related string such as \enquote{originally published as}. It can also be set on a per-type and per-entry basis. The effects of this key are not well tested, so do please get in touch (see below) if you encounter problems with it.
\end{docKey}

\begin{docKey}{relationpunct}{=\val{period}|\val{comma}|\val{semicolon}|\val{colon}|\val{space}}{default \val{semicolon}, initially \val{semicolon}}
  Sets the punctuation that precedes the \code{relatedtype} localization string.
  An additional space is assumed unless the value is \val{space}.
  This can also be set on a per-type and per-entry basis.
  Note that the general and per-type settings are ignored for some values of \code{relatedtype},
  but the per-entry setting is always effective.
\end{docKey}

%<*n|m>
\begin{docKey}{scnames}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints initial author or editor names in bibliography entries in small capitals.
\end{docKey}
%</n|m>

\begin{docKey}{thesis}{=\val{in}|\val{out}|\val{plain}}{default \val{out}, initially \val{out}}
  Puts the thesis type \docValue{in}side or \docValue{out}side the parenthetical publication block,
  while \docValue{plain} removes the parentheses entirely.
\end{docKey}

\begin{docKey}{timefirst}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints the time (if provided) before the date instead of after it.
  This can also be set on a per-type and per-entry basis.
\end{docKey}

\begin{docKey}{usenametitles}{=\val{true}|\val{false}}{default \val{true}, initially \val{true}}
  Controls whether titular prefixes such as Revd, Dr, Mrs, Sir, and so on are printed.
  (See \cref{sec:nametitles} for how to supply titles as part of a name.)
  This can also be set on a per-type and per-entry basis.
\end{docKey}

\pkg[biblatex]{Oxref} makes use of Biber-specific techniques to solve some of the challenges presented by Oxford style.
It will not stop you from using Bib\TeX\ instead but, if you do, only simple and standard entries will work.
In particular, manuscripts, legal references and anything involving related entries will be adversely affected.

\section{How to use this document}

Bibliographical items are given throughout this document, and serve three purposes:

\begin{itemize}
  \item
  To demonstrate which of the variations discussed by the
  \emph{Oxford Guide to Style} and \emph{New Hart's Rules} have been chosen
  in this style.
  \item
  To help me, as package author, check that the style is working as intended.
  \item
  To show you, as document author, how to use the style to get the effect you want.
\end{itemize}

Examples that follow standard \textsf{biblatex} semantics, and are therefore
(mostly) portable to other styles, are in green:

\begin{tcolorbox}%
  [bicolor
  ,colframe = ok
  ,colback = ok!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize\ttfamily
  ,overlay = {\node[anchor=south east,text=teal] at (frame.south east) {Source};}
  ]
  \hangfrom{\booksym\space} Reference text as it should look.\par
  \hangfrom{\cogsym\space} Reference text as generated by \textsf{biblatex}.
  \tcblower
  Code used in bibliography file.
\end{tcolorbox}

Examples that have been \enquote{hacked} in some way, and are therefore not portable
to other styles, are in amber:

\begin{tcolorbox}%
  [bicolor
  ,colframe = hacked
  ,colback = hacked!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize\ttfamily
  ,overlay = {\node[anchor=south east,text=teal] at (frame.south east) {Source};}
  ]
  \hangfrom{\booksym\space} Reference text as it should look.\par
  \hangfrom{\cogsym\space} Reference text as generated by \textsf{biblatex}.
  \tcblower
  Code used in bibliography file.
\end{tcolorbox}

Where a source is provided, it refers to a section from one of the reference works below:

\begin{description}
\item[OGS]
\fullcite{ritter2002ogs}

\item[NHR]
\fullcite{waddingham2014nhr}

\item[OSCOLA]
\fullcite{law.oxford2012oscola}
\end{description}

Where the source is starred (*), this indicates the example is not quite how it appears in the book,
usually because the original is demonstrating an option that is not the \pkg[biblatex]{oxref} default.
%<*a|y>
Where the source is marked with a dagger (\textdagger),
this indicates that the example has been coverted from an \textsf{oxnotes}-style one,
since the guides provide relatively few for author-year references.
%</a|y>

\section{Design philosophy}

The stipulations given by the \emph{Oxford Guide to Style} regarding citations and references
amount not so much to a consistent style as a body of advice for creating one.
Unlike the style manuals published by the American Psychological Association,
the Modern Language Association, and the University of Chicago to name but three,
the emphasis of the Oxford guide is to describe good practice rather than prescribe a particular style.
This means that when it comes to \pkg[biblatex]{oxref}, there are decisions to be made
as to which variations to support by default, which to support as options,
and which to ignore quietly.

The situation is complicated further by the nature of the available versions.
The 2002 guide remains the most comprehensive in terms of rules, principles and examples.
The succeeding versions, under the title \emph{New Hart's Rules},
update the aspects of the 2002 guide that now seem somewhat dated,
such as its handling of URLs and DOIs,
and have more of an eye on machine processing of bibliographies.
They do, however, introduce additional variations with less of a steer on what is preferred,
and are considerably shorter with fewer examples.

The approach of \pkg[biblatex]{oxref} is to follow the 2014 \emph{New Hart's Rules} as much as possible,
but where variations are given without strong preference, or where guidance is lacking,
to follow the preferences of the 2002 guide.
Where the practices of the humanities and the sciences are contrasted,
the former are followed for \textsf{oxnotes}\slash\textsf{oxnum}
and the latter for \textsf{oxalph}\slash\textsf{oxyear}.
Where neither version gives explicit guidance on citing a resource supported by \textsf{biblatex},
\pkg[biblatex]{oxref} extrapolates from what is provided, guided by standard \textsf{biblatex}
and other major referencing styles.

Where it is practical to do so,
ways and means of achieving the variations defined by the two guides are provided,
but by no means all of them will be supported.

\section{Technical documentation}

For information on installing the styles, and for the documented source code,
see the separate documentation file \href{./oxref.pdf}{\texttt{oxref.pdf}}

\section{Stability}

The \pkg[biblatex]{oxref} family of styles is currently at \fileversion.

I have no plans to change the default (expected) behaviour of the styles,
and will do my best to avoid backwards-incompatible changes, though
alternative behaviour may be added. If changes are introduced that alter
the advertised output, this will be signalled by a change in major
version number.

Please report any bugs you discover on the
\href{https://github.com/alex-ball/biblatex-oxref/issues}{GitHub issue tracker}.%
\footnote{Issue tracker for \pkg[biblatex]{oxref}:
\url{https://github.com/alex-ball/biblatex-oxref/issues}}
You are also welcome to leave your thoughts there on how the styles could
be improved, especially for the cases not covered by the two style manuals.

\chapter{Citations and common formatting}\label{sec:citing}

%<*n>
The \textsf{oxnotes} bibliography style is intended for use with a footnote or endnote citation style,
and indeed loads a standard \textsf{biblatex} one.
While the note text generated by the style is very similar to that which appears in the bibliography,
there is a difference in how author names are printed.
%</n>
%<*m>
The \textsf{oxnum} bibliography style is intended for use with a numeric citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</m>
%<*a>
The \textsf{oxalph} bibliography style is intended for use with an alphabetic citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</a>
%<*y>
The \textsf{oxyear} bibliography style is intended for use with an author–year citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</y>

\section{Test citations}

%<*n>
Following the advice of \emph{New Hart's Rules}, \textsf{oxnotes} loads by default a tweaked version of the  standard \textsf{verbose} citation style, in which repeated citations are abbreviated to the author surname and a short title.

%</n>
%</n|m|a|y>
%<*bib>
@book{faith1997epg,
  author = {R. J. Faith},
  title = {The {English} Peasantry and the Growth of Lordship},
  shorttitle = {{English} Peasantry},
  date = {1997}}
@book{knowles.hadcock1953mrh,
  author = {D. Knowles and R. N. Hadcock},
  title = {Medieval Religious Houses},
  subtitle = {England and Wales},
  date = {1953}}
@book{kershaw1973bp,
  author = {I. Kershaw},
  title = {Bolton Priory},
  date = {1973}}
@article{cobban,
  author = {Cobban},
  title = {Colleges and halls}}
%</bib>
%<*n|m|a|y>
%<*n>
\begin{egcite}{}
Test\footcite{faith1997epg}
Test\footcite[49-50]{faith1997epg}
\end{egcite}
\begin{egcite}{}
\cites[80 (Westminster), 66
  (Glastonbury), 149 (Osney), 128
  (Bolton)]{knowles.hadcock1953mrh}%
  [186]{kershaw1973bp}[609]{cobban}
\end{egcite}
\addtocategory{hidden}{cobban}

Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} describe an alternative system that uses the abbreviations \enquote{ibid.\@}, \enquote{op.\@ cit.\@}, \enquote{loc.\@ cit.\@}, and \enquote{id.\@} and friends, though with underwhelming enthusiasm. If you would like to use these abbreviations, you can use the \textsf{oxnotes-trad1} citation style instead (and remember to use the \code{gender} field). As with the standard styles, a bibliographic style alias has been provided so you can just do this:

\begin{tcblisting}{listing only}
\usepackage[style=oxnotes-trad1]{biblatex}
\end{tcblisting}

If you are particularly keen to use the other variants that \pkg{biblatex} provides, then parallel \textsf{oxnotes} variants have been provided for your convenience: \textsf{oxnotes-ibid}, \textsf{oxnotes-note}, \textsf{oxnotes-inote}, \textsf{oxnotes-trad2}, and \textsf{oxnotes-trad3}.

%</n>
%<*m|a>
Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} describe a system that uses simple numbers as citation labels, almost as if they were endnotes. This system does not support page references, unlike the citation labels familiar to \LaTeX\ users. In the absence of a better idea, therefore, this style treats citation labels rather like author–year parenthetical citations and adopts the conventions from \textsf{oxyear}. Pages are set off with a colon, and multiple works are separated with a semicolon.

\begin{egcite}%
%<m>{Test [\citefield{hankinson1988mmm}{labelnumber}: 93, 96; \citefield{hankinson1989gba}{labelnumber}: 72]}
%<a>{Test [\citefield{hankinson1988mmm}{labelalpha}: 93, 96; \citefield{hankinson1989gba}{labelalpha}: 72]}
Test \parencites%
  [93, 96]{hankinson1988mmm}%
  [72]{hankinson1989gba}
\end{egcite}
%</m|a>
%<*y>
The \emph{Oxford Guide to Style} consistently promotes an author–date citation scheme which uses parentheses, within which there is only a space between the name and date.
If there is no date, the replacement text is separated from the name by a comma.

\begin{egcite}{(Anon.\@ 1956), (Marx 1867), (Clarke, n.d.).}
\parencite{anon1956lu},
\parencite{marx1867ccp},
\parencite{clarkeNDeci}.
\end{egcite}

Pages are set off with a colon, and multiple works are separated with a semicolon.

\begin{egcite}{Hankinson (1988: 93, 96; 1989: 72)}
\textcites%
  [93, 96]{hankinson1988mmm}%
  [72]{hankinson1989gba}
\end{egcite}

Up to two author names are given, after which \enquote{et al.} is used.

\begin{egcite}{(Barnes and Griffin 1989; Brady et al. 1994)}
\parencite{barnes.griffin1989pte,%
  brady.etal1994hehsa}
\end{egcite}

If different authors have the same surname, they are distinguished by their initial.

%</y>
%</n|m|a|y>
%<*bib>
@inbook{smithFCct,
  author = {P. Smith},
  title = {The Case of {Tigray}},
  bookauthor = {P. Smith},
  booktitle = {Gender and Famine},
  volume = {2},
  pages = {76-94},
  location = {London},
  pubstate = {forthcoming}}
%</bib>
%<*n|m|a|y>
%<*y>
\nocite{smithFCct}
\begin{egcite}{(P. Smith, forthcoming \emph{a}; T. Smith 1988)}
\parencite{smithFCgaf,smith1988fag}
\end{egcite}

If a short author label is provided, it is used in place of the full author.

\begin{egcite}{(WHO 1986)}
\parencite{who1986nde}
\end{egcite}

\emph{New Hart's Rules} is mostly consistent with this, but has some variations where the author and date are separated by a comma, and where multiple references are also separated by commas.
%</y>

\section{Missing or inferred attribution}

\subsection{Missing attribution}
%<*n>
Where works have no attribution, both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} suggest printing them without further adornment in notes, but listing them under \enquote{Anonymous} (or \enquote{Anon.\@} in the latter case) in the bibliography.
%</n>
%<*y>
The \emph{Oxford Guide to Style} prefers anonymous works to have \enquote{Anonymous} in place of the author name, while \emph{New Hart's Rules} suggests using \enquote{Anon.\@} or a short title.
%</y>

\tip{\pkg[biblatex]{Oxref} will not automatically generate anonymous labels for you, but if you use the \key{anon} option (see \cref{sec:loading}), you can transform an author name of \enquote{Anonymous} (or whatever \cs{oxrefanon} is set to) in your .bib file to either the long or short localization string \code{anon}.
%<n>  Doing this will automatically suppress the printing of the anonymous author in notes.
}

%<*n>
\begin{egcite}{}
\cite{anon1822san}.
\textcite{anon1956lu}.
\end{egcite}

%</n>
\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{anon1822san}
%<n|m>\textsc{Anon.}, \emph{Stories after Nature} (London: Allman, 1822).
%<a|y>Anon.\@ (1822), \emph{Stories after Nature} (London: Allman).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{anon1822san,
  author = {Anonymous},
  title = {Stories after Nature},
  location = {London},
  publisher = {Allman},
  date = {1822}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{anon1956lu}
%<n|m>\textsc{Anon.}, \emph{Liber usualis} (Tournai: Desclée, 1956).
%<a|y>Anon.\@ (1956), \emph{Liber usualis} (Tournai: Desclée).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{anon1956lu,
  author = {Anonymous},
  title = {Liber usualis},
  location = {Tournai},
  publisher = {Desclée},
  year = {1956}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*m|a>
\begin{egcite}{}
\textcite{anon1822san,anon1956lu}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{(Anon.\@ 1822; 1956), Anon.\@ (1956)}
\parencite{anon1822san,anon1956lu},
\textcite{anon1956lu}
\end{egcite}
%</y>
%<!n>

\subsection{Pseudepigraphy}
Some older works are known to have been written pseudepigraphically, that is, falsely attributed to a more famous author. The way of indicating this in Oxford style, if desired, is
%<n>to add the prefix \enquote{Pseudo-} before the name in notes, and
to put \enquote{(Ps.-)} after the name in the bibliography.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the name with the keyword \code{pseudo}.
%<n>Since this mechanism is aimed at ancient texts, it has only been designed to work with single-part names
%<n>(i.e. either a single word, or a whole name wrapped in braces).
}

%<*n|m|a>
\begin{egcite}{}
\textcite{boethius1976dds}
\end{egcite}
%</n|m|a>
%<*y>
\begin{egcite}{}
\parencite{boethius1976dds}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{boethius1976dds}
%<n|m>\textsc{Boethius} (\textsc{Ps.-}), \emph{De disciplina scolarium: Édition critique, introduction et notes}, ed. Olga Weijers (Leiden, 1976).
%<a|y>Boethius (Ps.-) (1976), \emph{De disciplina scolarium: Édition critique, introduction et notes}, ed.\@ O. Weijers (Leiden).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{boethius1976dds,
  author = {Boethius},
  author+an = {1=pseudo},
  title = {De disciplina scolarium},
  subtitle = {Édition critique, introduction et notes},
  editor = {Olga Weijers},
  location = {Leiden},
  date = {1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\subsection{Inferred attribution}

If the attribution is missing from the work but may be inferred from other sources,
Oxford style is to give the attribution in square brackets.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the whole name field
  (usually \code{author} or \code{editor}) with the keyword \code{inferred}.
  You can also annotate names individually within the list, if only some of them should be taken as inferred.}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{balfour1768pe}[]
%<n|m>[James Balfour], \emph{Philosophical Essays} (Edinburgh, 1768).
%<a|y>[Balfour, J.] (1768), \emph{Philosophical Essays} (Edinburgh).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{balfour1768pe,
  author = {James Balfour},
  author+an = {=inferred},
  title = {Philosophical Essays},
  location = {Edinburgh},
  date = {1768}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{You can also use the syntax from \textsf{biblatex-realauthor}.
  If you do not specify the \code{author}, then \code{realauthor} is treated as an alias for \code{author} annotated with the keyword \code{inferred}.
  The equivalent is true for \code{realeditor}.
  Note, however, that \pkg[biblatex]{oxref} does not recognize the \key{userealauthor} and \key{userealeditor} options.}

\subsection{Pseudonyms}

If an author publishes under a pen name, and you want to link the names in the bibliography,
the name as given in the work should be given first, immediately followed by the other name
in parentheses (\emph{Oxford Guide to Style}) or brackets (\emph{New Hart's Rules}).

\tip{If you don't mind the second name being printed as-is,
  the canonical place to include it is the \code{nameaddon} field.}

\begin{bibexbox}
%<n|m><NHR \S18.2.2>
%<a|y><NHR \S18.2.2\textdagger>
{dodgson1896sl}
%<n|m>C. L. Dodgson [Lewis Carroll], \emph{Symbolic Logic} (Oxford, 1896).
%<a|y>Dodgson, C. L. [Lewis Carroll] (1896), \emph{Symbolic Logic} (Oxford).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{dodgson1896sl,
  author = {C. L. Dodgson},
  nameaddon = {Lewis Carroll},
  title = {Symbolic Logic},
  location = {Oxford},
  date = {1896}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{You can switch to using parentheses for name addons by changing the \code{nameaddon} field format.}

\begin{tcblisting}{listing only}
\DeclareFieldFormat{nameaddon}{\mkbibparens{#1}}
\end{tcblisting}

\tip{If you do want the second name to be normalized, or you are dealing with a list of names,
  you can use the (non-standard) \code{authoraddon} and \code{editoraddon} fields. The addon
  name will be printed after the corresponding name in the regular name list, using the
  \code{nameaddon} field format, but only if it is different.}

\begin{bibexbox}
%<n|m><NHR \S18.2.2>
%<a|y><NHR \S18.2.2\textdagger>
{lauder1965lss}
%<n|m>Afferbeck Lauder [Alistair Morrison], \emph{Let Stalk Strine} (Sydney, 1965).
%<a|y>Lauder, A. [Morrison, A.] (1965), \emph{Let Stalk Strine} (Sydney).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{lauder1965lss,
  author = {Afferbeck Lauder},
  authoraddon = {Alistair Morrison},
  title = {Let Stalk Strine},
  location = {Sydney},
  date = {1965}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Again, you can also use the syntax from \textsf{biblatex-realauthor}.
  If you specify the \code{author}, then \code{realauthor} is treated as an alias for \code{authoraddon}.
  The equivalent is true for \code{realeditor}.}

\section{Name variants}

In cases where an author changes the name under which they publish (e.g.\ due to changes of marital status), both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} suggest putting the later form of the name first, followed by parentheses containing an equals sign and the earier form of the name.
%<n>This is only supposed to to printed in the bibliography, not in notes.

\tip{To trigger this formatting, annotate the relevant name in \code{authoraddon} or \code{editoraddon} with the keyword \code{variant}.}

%<*n>
\begin{egcite*}{}
\cite{joukovsky1967gdd}
\end{egcite*}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite{joukovsky1967gdd}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite{joukovsky1967gdd}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.17.4>
%<a|y><OGS \S15.17.4\textdagger>
{joukovsky1967gdd}
%<n|m>\textsc{Joukovsky}, \textsc{F.} (= \textsc{Joukovsky-Micha}, \textsc{F.}), \enquote{La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e} siècle (1500–1585)}, \emph{Bibliothèque d'Humanisme et Renaissance}, 29 (1967), 55–92.
%<a|y>Joukovsky, F. (= Joukovsky-Micha, F.) (1967), \enquote{La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e} siècle (1500–1585)}, \emph{Bibliothèque d'Humanisme et Renaissance}, 29: 55–92.
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{joukovsky1967gdd,
  author = {F. Joukovsky},
  authoraddon = {F. Joukovsky-Micha},
  authoraddon+an = {1=variant},
  title = {La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e}
    siècle (1500--1585)},
  journaltitle = {Bibliothèque d'Humanisme et Renaissance},
  volume = {29},
  date = {1967},
  langid = {french},
  pages = {55-92}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Author-translators and author-revisers}

If the contribution of the translators or revisers is so great they could be joint authors, Oxford style is to print them immediately after the actual author. The motivation comes from textbooks like this one:

%<*n>
\begin{egcite*}{}
\textcite{kuehner.blass1890ef}
\end{egcite*}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite{kuehner.blass1890ef}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite{kuehner.blass1890ef}
\end{egcite}
%</y>

\begin{bibexbox}
{kuehner.blass1890ef}
%<n|m>\textsc{Kühner}, \textsc{Raphael}, rev. \textsc{Blass}, \textsc{Friedrich}, \emph{Ausführliche grammatik der griechischen sprache}, i: \emph{Elementar- und Formenlehre} (Hannover: Hahnsche Buchhandlung, 1890–2).
%<a|y>Kühner, R., rev. Blass, F. (1890–2), \emph{Ausführliche grammatik der griechischen sprache}, i: \emph{Elementar- und Formenlehre} (Hannover: Hahnsche Buchhandlung).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{kuehner.blass1890ef,
  author = {Raphael Kühner},
  editor = {Friedrich Blass},
  editor+an = {=jointauthor},
  editortype = {reviser},
  shortauthor = {Kühner--Blass},
  title = {Elementar- und Formenlehre},
  maintitle = {Ausführliche grammatik der griechischen sprache},
  volume = {1},
  location = {Hannover},
  publisher = {Hahnsche Buchhandlung},
  date = {1890/1892}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Annotate \emph{either} the \code{editor} \emph{or} \code{translator} field with the keyword \code{jointauthor} to promote the name to the joint author position (you cannot do it for both). Internally, what this does is move the names to the \pkg[biblatex]{oxref}-specific \code{jointauthor} field; you can use this and \code{jointauthortype} directly if you like, at the cost of portability to other styles. Note that you have to supply a suitable \code{shortauthor} value yourself; \pkg[biblatex]{oxref} does not calculate it for you.}

\section{Titular prefixes}\label{sec:nametitles}

Generally speaking, using titular prefixes like Revd, Dr, Mrs, Sir, and so on as part of an author's name is unnecessary,
but there are occasions when removing them can cause problems, so with \pkg[biblatex]{oxref} you can supply them if you need to.
I have not added special rules for recognizing such titles, so if you want to include one you have to label each part of the name explicitly, as in the following example (the keyword for the titular prefix is \code{title}).

\begin{bibexbox}
%<n|m><NHR \S18.2.2*>
%<a|y><NHR \S18.2.2*\textdagger>
{wood1861el}
%<n|m>Mrs Henry Wood, \emph{East Lynne}, 3 vols. (London, 1861).
%<a|y>Wood, Mrs H. (1861), \emph{East Lynne}, 3 vols. (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{wood1861el,
  author = {title=Mrs, given=Henry, family=Wood},
  title = {East Lynne},
  volumes = {3},
  location = {London},
  date = {1861}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

You can switch the display of titular prefixes on or off using the \key{usenametitles} option.
This can be set globally or on a per-type or per-entry basis.

\section{Works in foreign languages}

If you used a work in a different language from the one in which you are currently writing,
you might want to recommend a good translation into the latter language.

\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}.
  The localized bibstring reflects the current localization language:
  \enquote{English translation}, \enquote{traducido espa\~nol}, and so on.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5*>
%<a|y><NHR \S18.2.5*\textdagger>
{tschichold1955tg}
%<n|m>J. Tschichold, \emph{Typographische Gestaltung} (Basle, 1955); Eng. trans. as \emph{Asymmetric Typography} (London, 1967).
%<a|y>Tschichold, J. (1955), \emph{Typographische Gestaltung} (Basle); Eng. trans. as \emph{Asymmetric Typography} (London, 1967).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{tschichold1955tg,
  author = {J. Tschichold},
  title = {Typographische Gestaltung},
  location = {Basle},
  date = {1955},
  related = {tschichold1967tg},
  relatedtype = {translationas}}
@book{tschichold1967tg,
  title = {Asymmetric Typography},
  location = {London},
  date = {1967}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To specify the translator up front, or to recommend a translation into a third language,
  set the \code{relatedtype} to \code{bytranslator} instead.}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{sarrau1975ta}
%<n|m>José Sarrau, \emph{Tapas y aperitivos} (Madrid, 1975); trans. Francesca Piemonte Slesinger as \emph{Tapas and Appetizers} (New York, 1987).
%<a|y>Sarrau, J. (1975), \emph{Tapas y aperitivos} (Madrid); trans. F. P. Slesinger as \emph{Tapas and Appetizers} (New York, 1987).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{sarrau1975ta,
  author = {José Sarrau},
  title = {Tapas y aperitivos},
  location = {Madrid},
  date = {1975},
  related = {sarrau1987ta},
  relatedtype = {bytranslator}}
@book{sarrau1987ta,
  author = {José Sarrau},
  translator = {Francesca Piemonte Slesinger},
  title = {Tapas and Appetizers},
  location = {New York},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


If you used the translation, you might want to give the original publication as well.

\tip{Add the original in \code{related}, and set \code{relatedtype} to \code{translationof}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5>
%<a|y><NHR \S18.2.5\textdagger>
{metz1938hyb}
%<n|m>R. Metz, \emph{A Hundred Years of British Philosophy}, ed. J. H. Muirhead, trans. J. W. Harvey (1938) [Ger. orig., \emph{Die philosophischen Strömungen der Gegenwart in Grossbritannien} (1935)]
%<a|y>Metz, R. (1938), \emph{A Hundred Years of British Philosophy}, ed. J. H. Muirhead, trans. J. W. Harvey [Ger. orig., \emph{Die philosophischen Strömungen der Gegenwart in Grossbritannien} (1935)]
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{metz1938hyb,
  author = {R. Metz},
  title = {A Hundred Years of British Philosophy},
  editor = {J. H. Muirhead},
  translator = {J. W. Harvey},
  date = {1938},
  related = {metz1935psg},
  relatedtype = {translationof}}
@book{metz1935psg,
  title = {Die philosophischen Strömungen der Gegenwart in Grossbritannien},
  date = {1935},
  language = {german}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

It is often helpful to provide an informative translation of foreign language titles.

\tip{Put the translation in \code{titleaddon}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5>
%<a|y><NHR \S18.2.5\textdagger>
{nissan1965hnm}
%<n|m>Nissan Motor Corporation, \emph{Nissan Jidosha 30nen shi} [A 30-year history of Nissan Motors] (1965).
%<a|y>Nissan Motor Corporation (1965), \emph{Nissan Jidosha 30nen shi} [A 30-year history of Nissan Motors].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{nissan1965hnm,
  author = {{Nissan Motor Corporation}},
  title = {Nissan Jidosha 30nen shi},
  titleaddon = {A 30-year history of Nissan Motors},
  date = {1965}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


Conversely, it might be helpful to provide the English original of a translated title.

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{milne1938pb}
%<n|m>A. A. Milne, \emph{Pu der Bär} [Ger. trans. of \emph{Winnie the Pooh}] (Potsdam: Williams, 1938).
%<a|y>Milne, A. A. (1938), \emph{Pu der Bär} [Ger. trans. of \emph{Winnie the Pooh}] (Potsdam: Williams).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{milne1938pb,
  author = {A. A. Milne},
  title = {Pu der Bär},
  language = {german},
  origtitle = {Winnie the Pooh},
  location = {Potsdam},
  publisher = {Williams},
  date = {1938}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Missing place of publication}

For periodicals, grey literature, audiovisual and online material, the lack of a place of publication is not surprising; indeed it may be expected. For books, however, it may be remarkable and deserve marking in the bibliography with \enquote{n.p.\@} (for \enquote{no place}).

\tip{To have \pkg[biblatex]{oxref} automatically insert \enquote{n.p.\@} or the localized equivalent for books, collections, reference works, proceedings and similar entry types, use the \key{nolocation} bibliography option.}

\tip{To have \pkg[biblatex]{oxref} automatically insert \enquote{n.p.\@} or the localized equivalent for only a specific entry, use the \key{nolocation} entry option instead.
  The advantage of doing this over simply giving \enquote{n.p.\@} as the publisher is that it hides it from other styles that do not follow the same convention.}

\begin{bibexbox}
%<n|m><NHR \S18.2.9>
%<a|y><NHR \S18.2.9\textdagger>
{padua1961p}
%<n|m>Marchetto of Padua, \emph{Pomerium}, ed. Guiseppe Vecchi (n.p., 1961).
%<a|y>Marchetto of Padua (1961), \emph{Pomerium}, ed. G. Vecchi (n.p.).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{padua1961p,
  author = {{Marchetto of Padua}},
  title = {Pomerium},
  editor = {Guiseppe Vecchi},
  date = {1961},
  options = {nolocation}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Missing or inferred date of publication}

If the date is missing from a work, you can sometimes make an educated guess
what it should be. It is usual practice to enclose such guesses in square
brackets.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the
  \code{date}, \code{origdate}, or \code{eventdate} field with the keyword
  \code{inferred}.}

\begin{tcblisting}{listing only}
  date+an = {=inferred},
\end{tcblisting}
%<*a|y>

Otherwise, if you don't supply a suitable date, it will be replaced with the
localization string \code{nodate}. If you don't want this behaviour, you can
suppress it with the \key{nonodate} option, which can be set globally or on a
per-type or per-entry basis.
%</a|y>

\chapter{Articles and periodicals}\label{sec:article}
\chapterprecis{article, periodical, suppperiodical, review}


\section{Articles in periodicals with volumes/numbers}

The \emph{Oxford Guide to Style} consistently prefers volume and part numbers to be written like \enquote{23/2}, but also discusses formats such as \enquote{23: 2} and \enquote{23 (2)}. \emph{New Hart's Rules} adds \enquote{23, 2} as a further possibility. The latter two are better suited to \textsf{oxalph}\slash\textsf{oxyear} which use a colon to demarcate the page numbers. These variations are implemented as the option \key{issuestyle}; see \autoref{sec:loading} for details.

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Vol/Number: Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.1>
{goldblatt1973dmm}
Robert Goldblatt, \enquote{Diodorean Modality in Minkowski Space-Time}, \emph{Studia Logica}, 39/3 (1973), 219–36.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{goldblatt1973dmm,
  author = {Robert Goldblatt},
  title = {Diodorean Modality in Minkowski Space-Time},
  journaltitle = {Studia Logica},
  volume = {39},
  number = {3},
  date = {1973},
  pages = {219-236}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{hollingsworth1957dsb}
Hollingsworth, T. H. (1957), \enquote{A Demographic Study of the British Ducal Families}, \emph{Population Studies}, 11/1: 4–26.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{hollingsworth1957dsb,
  author = {T. H. Hollingsworth},
  date = {1957},
  title = {A Demographic Study of the British Ducal Families},
  journaltitle = {Population Studies},
  volume = {11},
  number = {1},
  pages = {4-26}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m>
% Internal quotes, subtitle, no number
\begin{bibexbox}<OGS \S15.4.1>
{inalcik1992csm}
Halil Inalcik, \enquote{Comments on \enquote{Sultanism}: Max Weber's Typification of the Ottoman Polity}, \emph{Princeton Papers in Near Eastern Studies}, 1 (1992), 49–72.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{inalcik1992csm,
  author = {Halil Inalcik},
  title = {Comments on \enquote{Sultanism}},
  subtitle = {Max Weber's Typification of the Ottoman Polity},
  journaltitle = {Princeton Papers in Near Eastern Studies},
  volume = {1},
  date = {1992},
  pages = {49-72}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
% Subtitle
\begin{bibexbox}<NHR \S17.3.2*>
{unwin1994sce}
Unwin, T. (1994), \enquote{Structural Change in Estonian Agriculture: From Command Economy to Privatisation}, \emph{Geography}, 79/3: 246–61.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{unwin1994sce,
  author = {Tim Unwin},
  date = {1994},
  title = {Structural Change in Estonian Agriculture},
  subtitle = {From Command Economy to Privatisation},
  journaltitle = {Geography},
  volume = {79},
  number = {3},
  pages = {246-261}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>

% Many authors, 'von' part, no number
\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{vaucouleurs1975nmn}
%<n|m>Gerald de Vaucouleurs et al., \enquote{The New Martian Nomenclature of the International Astronomical Union}, \emph{Icarus}, 26 (1975), 85–98.
%<a|y>Vaucouleurs, G. de, et al. (1975), \enquote{The New Martian Nomenclature of the International Astronomical Union}, \emph{Icarus}, 26: 85–98.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{vaucouleurs1975nmn,
  author = {Gerald de Vaucouleurs and J. Blunck and M. Davies and A. Dollfus and I. Koval and
    G. Kuiper and H. Masursky and S. Miyamoto and V Moroz and Carl Sagan},
  title = {The New {Martian} Nomenclature of the {International} {Astronomical} {Union}},
  journaltitle = {Icarus},
  volume = {26},
  date = {1975},
  pages = {85-98}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

% DOI
\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{druin2002rcd}
%<n|m>A. Druin, \enquote{The Role of Children in the Design of New Technology}, \emph{Behaviour \& Information Technology}, 21/1 (2002), 1–25. doi: \nolinkurl{10.1080/01449290110108659}
%<a|y>Druin, A. (2002), \enquote{The Role of Children in the Design of New Technology}, \emph{Behaviour \& Information Technology}, 21/1: 1–25. doi: \nolinkurl{10.1080/01449290110108659}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{druin2002rcd,
  author = {A. Druin},
  title = {The Role of Children in the Design of New Technology},
  journaltitle = {Behaviour \& Information Technology},
  volume = {21},
  number = {1},
  date = {2002},
  pages = {1-25},
  doi = {10.1080/01449290110108659}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

% Journal title is abbreviated, no following comma
%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.1>
{lindars1965eir}
B. Lindars, \enquote{Ezechiel and Individual Responsibility}, \emph{VT} 15 (1965), 452–67.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{lindars1965eir,
  author = {B. Lindars},
  title = {Ezechiel and Individual Responsibility},
  journaltitle = {VT},
  volume = {15},
  date = {1965},
  pages = {452-467}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}
%</n|m>
%<*n|m|a|y>

If the last\slash only word of the journal title is abbreviated
(indicated by point or capital letter), it does not need a comma after it.
\pkg[biblatex]{Oxref} will try to detect this and adjust the punctuation accordingly;
the list of characters that it uses is set with \cs{DeclareAbbrEndChars}.
The default setting is this:

\begin{tcblisting}{listing only}
\DeclareAbbrEndChars{A\^{A}BCDEFG\u{G}HI\^{I}JKLMNO\"{O}\^{O}PQRSTU\"{U}\^{U}VWXYZ.}
\end{tcblisting}

There is also a starred version of the command that appends to this list:

\begin{tcblisting}{listing only}
\DeclareAbbrEndChars*{\c{C}\.{I}\c{S}}
\end{tcblisting}

\hack{To override this mechanism for a single entry, you can suppress the comma by adding \cs{nopunct} to the end of the journal (sub)title, or restore it by adding a pair of braces.}

% Electronic identifier instead of a page range
\begin{bibexbox}(hacked)
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{li.etal2013flh}
%<n|m>Shu Li et al., \enquote{Forever Love: The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China}, \emph{PLoS ONE}, 8/11 (2013), e78188. doi: \nolinkurl{10.1371/journal.pone.0078188}
%<a|y>Li, S., et al. (2013), \enquote{Forever Love: The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China}, \emph{PLoS ONE}, 8/11, e78188. doi: \nolinkurl{10.1371/journal.pone.0078188}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{li.etal2013flh,
  author = {Shu Li and Chungkun Shih and Chen Wang and Hong Pang and Dong Ren},
  title = {Forever Love},
  subtitle = {The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China},
  journaltitle = {{PLoS ONE}},
  volume = {8},
  number = {11},
  date = {2013},
  eid = {e78188},
  doi = {10.1371/journal.pone.0078188}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

% Unsigned, with month as issue name
\begin{bibexbox}
%<n|m><OGS \S15.4.1*>
%<a|y><OGS \S15.4.1*\textdagger>
{jsr1990spt}
%<n|m>\enquote{Solar Photon Thruster}, \emph{Journal of Spacecraft and Rockets}, 28/4 (July–Aug. 1990), 411–6.
%<a|y>\enquote{Solar Photon Thruster} (1990), \emph{Journal of Spacecraft and Rockets}, 28/4 (July–Aug.): 411–6.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{jsr1990spt,
  title = {Solar Photon Thruster},
  journaltitle = {Journal of Spacecraft and Rockets},
  volume = {28},
  number = {4},
  date = {1990-07/1990-08},
  pages = {411-416}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Articles in periodicals with series}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, nth \lit{ser}., Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, nth \lit{ser}., Vol/Number: Pages.}

\begin{bibexbox}
%<n|m><NHR \S18.3.3>
%<a|y><NHR \S18.3.3\textdagger>
{moody1953mdb}
%<n|m>T. W. Moody, \enquote{Michael Davitt and the British Labour Movement, 1882–1906}, \emph{Transactions of the Royal Historical Society}, 5th ser., 3 (1953), 53–76.
%<a|y>Moody, T. W. (1953), \enquote{Michael Davitt and the British Labour Movement, 1882–1906}, \emph{Transactions of the Royal Historical Society}, 5th ser., 3: 53–76.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{moody1953mdb,
  author = {T. W. Moody},
  title = {Michael Davitt and the British Labour Movement, 1882--1906},
  journaltitle = {Transactions of the Royal Historical Society},
  series = {5},
  volume = {3},
  date = {1953},
  pages = {53-76}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, \textsc{ns} Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, \textsc{ns} Vol/Number, Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.3>
{barnes1971has}
J. Barnes, \enquote{Homonymy in Aristotle and Speusippus}, \emph{Classical Quarterly}, \textsc{ns} 21 (1971), 65–80.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{barnes1971has,
  author = {J. Barnes},
  title = {Homonymy in Aristotle and Speusippus},
  journaltitle = {Classical Quarterly},
  series = {newseries},
  volume = {21},
  date = {1971},
  pages = {65-80}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2*>
{hankinson1989gba}
Hankinson, R. J. (1989), \enquote{Galen and the Best of All Possible Worlds}, \emph{CQ}, \textsc{ns} 39: 43–76.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{hankinson1989gba,
  author = {R. J. Hankinson},
  date = {1989},
  title = {Galen and the Best of All Possible Worlds},
  journaltitle = {CQ},
  series = {newseries},
  volume = {39},
  pages = {43-76}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>


\section{Articles in issues identified by date alone}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Day Month Year, Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Day Month: Pages.}

%</n|m|a|y>
%<*n|m>
% No author
\begin{bibexbox}<OGS \S15.4.1>
{bw1984wen}
\enquote{Who's Excellent Now?}, \emph{Business Week}, 5 Nov. 1984, 76–86.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{bw1984wen,
  title = {Who's Excellent Now?},
  journaltitle = {Business Week},
  date = {1984-11-05},
  pages = {76-86}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

% No pages
\begin{bibexbox}<OGS \S15.4.1>
{lee1995ehf}
Alan Lee, \enquote{England Haunted by Familiar Failings}, \emph{The Times}, 23 June 1995.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{lee1995ehf,
  author = {Alan Lee},
  title = {England Haunted by Familiar Failings},
  journaltitle = {The Times},
  date = {1995-06-23}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2*>
{marx1842kaa}
Marx, K. (1842), \enquote{Der Kommunismus und die Augsburger \enquote{Allgemeine Zeitung}}, \emph{Rheinische Zeitung}, 16 Oct.: 1–2.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{marx1842kaa,
  author = {Karl Marx},
  title = {Der Kommunismus und die Augsburger \enquote{Allgemeine Zeitung}},
  journaltitle = {Rheinische Zeitung},
  date = {1842-10-16},
  pages = {1-2}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\info{The above example as it appears in the \emph{Oxford Guide to Style} is both incomplete and wildly inaccurate.
  I have completed and corrected it as best I can ascertain.}

% No pages
\begin{bibexbox}<OGS \S15.19.2>
{who1983nsb}
WHO (World Health Organization) (1983), \enquote{Nutrition: Sex Bias of Nutritional Status of Children 0–4 Years}, \emph{Weekly Epidemiologial Record}, 20 May.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{who1983nsb,
  shortauthor = {WHO},
  author = {{World Health Organization}},
  date = {1983-05-20},
  title = {Nutrition},
  subtitle = {Sex Bias of Nutritional Status of Children 0--4 Years},
  journaltitle = {Weekly Epidemiologial Record}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

% Year as volume number
\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{boyce1957pgi}
%<n|m>M. Boyce, \enquote{The Parthian \emph{Gsn} and Iranian Minstrel Tradition}, \emph{Journal of the Royal Asiatic Society}, 1957, 10–45.
%<a|y>Boyce, M. (1957), \enquote{The Parthian \emph{Gsn} and Iranian Minstrel Tradition}, \emph{Journal of the Royal Asiatic Society}: 10–45.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{boyce1957pgi,
  author = {M. Boyce},
  title = {The Parthian \emph{Gsn} and Iranian Minstrel Tradition},
  journaltitle = {Journal of the Royal Asiatic Society},
  date = {1957},
  pages = {10-45}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Works published as an issue}

These examples illustrate where a book is also published as a whole
issue of a periodical, and show how you may reference both at once.
You can either add the periodical details to a book entry
or add the book details to a periodical entry.

%<n|m>\spec{Author, \emph{Title} = \emph{JournalTitle}, Vol/Number (Location: Publisher, Year), pages.}
%<a|y>\spec{Author (Year), \emph{Title} = \emph{JournalTitle}, Vol/Number (Location: Publisher), pages.}

\tip{Use \code{equals} as the \code{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{bec1976isc}
%<n|m>C. Bec (ed.), \emph{Italie 1500–1550: Une situation de crise?} = \emph{Annales de l'Université Jean Moulin}, 1975/2 (Langues étrangères, 2; Lyon, 1976), 99–109.
%<a|y>Bec, C. (1976) (ed.), \emph{Italie 1500–1550: Une situation de crise?} = \emph{Annales de l'Université Jean Moulin}, 1975/2 (Langues étrangères, 2; Lyon), 99–109.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@collection{bec1976isc,
  editor = {C. Bec},
  title = {Italie 1500--1550},
  subtitle = {Une situation de crise?},
  related = {aujm1975.2},
  relatedtype = {equals},
  series = {Langues étrangères},
  number = {2},
  location = {Lyon},
  date = {1976},
  pages = {99-109}}
@periodical{aujm1975.2,
  title = {Annales de l'Université Jean Moulin},
  volume = {1975},
  number = {2}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title} = \emph{JournalTitle}, Vol/Number (Year).}
%<a|y>\spec{Author (Year), \emph{Title} = \emph{JournalTitle}, Vol/Number.}

\tip{Use \code{issuetitle} instead of \code{title} to get the right formatting.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{trisoglio1973gnq}
%<n|m>F. Trisoglio, \emph{Gregorio di Nazianzo in un quarentennio di recherche (1925–1965)} = \emph{Rivista Iasalliana}, 40 (1973).
%<a|y>Trisoglio, F. (1973), \emph{Gregorio di Nazianzo in un quarentennio di recherche (1925–1965)} = \emph{Rivista Iasalliana}, 40.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{trisoglio1973gnq,
  author = {F. Trisoglio},
  issuetitle = {Gregorio di Nazianzo in un quarentennio di recherche (1925--1965)},
  journaltitle = {Rivista Iasalliana},
  volume = {40},
  date = {1973}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Articles in an issue that is a supplement to another issue}

\DeclareNumChars*{S}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Vol/Number (Year); \lit{Supplement to} \emph{MainJournalTitle} Vol/Number, Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Vol/Number; \lit{Supplement to} \emph{MainJournalTitle} Vol/Number: Pages.}

\tip{To get this format, use a separate entry for the parent issue, reference it in the \code{related} field, and use the key \code{suppto} as the \code{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{zhentao.etal1989ars}
%<n|m>X. Zhentao, K. K. C. Yau, and F. R. Stephenson, \enquote{Astronomical Records on the Shang Dynasty Oracle Bones}, \emph{Archaeoastronomy}, 14 (1989); Supplement to \emph{Journal for the History of Astronomy}, 20, pp. S61–S72.
%<a|y>Zhentao, X., Yau, K. K. C., and Stephenson, F. R. (1989), \enquote{Astronomical Records on the Shang Dynasty Oracle Bones}, \emph{Archaeoastronomy}, 14; Supplement to \emph{Journal for the History of Astronomy}, 20: pp. S61–S72.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{zhentao.etal1989ars,
  author = {X. Zhentao and K. K. C. Yau and F. R. Stephenson},
  title = {Astronomical Records on the Shang Dynasty Oracle Bones},
  journaltitle = {Archaeoastronomy},
  volume = {14},
  date = {1989},
  related = {jha1989},
  relatedtype = {suppto},
  pages = {S61-S72},
  bookpagination = {page}}
@periodical{jha1989,
  title = {Journal for the History of Astronomy},
  volume = {20}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \code{bookpagination} to force the display of \enquote{pp.} (since the number format is odd), and \cs{DeclareNumChars*}\brackets{S} to ensure that \code{S61} is recognized as a number.}%


\section{Articles that span multiple issues}

\tip{Use the key \code{serialarticle} as the \code{relatedtype}.}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<NHR \S 17.3*>
{stookey1974ssp}
Stookey, R. W. (1974), \enquote{Social Structure and Politics in the Yemen Arab Republic}, \emph{Middle East Journal}, 28/3: 248–60; 28/4: 409–19.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{stookey1974ssp,
  author = {R. W. Stookey},
  date = {1974},
  title = {Social Structure and Politics in the Yemen Arab Republic},
  journaltitle = {Middle East Journal},
  volume = {28},
  number = {3},
  pages = {248-260},
  related = {stookey1974ssp2},
  relatedtype = {serialarticle}}
@article{stookey1974ssp2,
  crossref = {stookey1974ssp},
  options = {dataonly},
  volume = {28},
  number = {4},
  pages = {409-419}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>

%<*n|m|a|y>

\section{Accepted journal articles, pre-publication}

%<n|m>\spec{Author, \enquote{Title}, \lit{to be published in} \emph{JournalTitle}, Year.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{to be published in} \emph{JournalTitle}.}

\begin{bibexbox}
{briscoe2008esp}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{briscoe2008esp,
  author = {Robert Briscoe},
  title = {Egocentric Spatial Representation in Action and Perception},
  journaltitle = {Philosophy and Phenomenological Research},
  url = {http://cogprints.org/5780/1/ECSRAP.F07.pdf},
  pubstate = {inpress}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Editorials and other regular features}

Strictly speaking, when a work is headed \enquote{Editorial} or \enquote{Letter to the Editor}
in a periodical, this is a descriptor rather than a title.

\tip{If a piece has a true title, the descriptor goes in the \code{note} field.
  If it doesn't, the descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to remove the quote marks.
  Alternatively, use the (non-standard) \code{descriptor} field for the descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
{ball2015ed}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppperiodical{ball2015ed,
  author = {Alexander Ball},
  title = {Editorial},
  title+an = {=descriptor},
  date = {2015},
  journaltitle = {International Journal of Digital Curation},
  volume = {10},
  number = {1},
  pages = {i-v},
  doi = {10.2218/ijdc.v10i1.376}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{jccm2006ed}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppperiodical{jccm2006ed,
  title = {\enquote{What a Disaster} and Why Does This Question Matter?},
  date = {2006},
  note = {Editorial},
  journaltitle   = {Journal of Contingencies and Crisis Management},
  volume = {14},
  pages = {1-2}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Reviews}

%<n|m>\spec{Author, \enquote{Title}, \lit{review of} ReviewedWork, \lit{in} \emph{JournalTitle}, Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{review of} ReviewedWork, \lit{in} \emph{JournalTitle}, Vol/Number: Pages.}

\tip{To get this format, use a separate entry for the reviewed item, reference it in the \enquote{related} field, and use the key \enquote{reviewof} as the \enquote{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.4>
%<a|y><OGS \S15.4.4\textdagger>
{dean1995rpb}
%<n|m>J. Dean, review of Philippe Basiron, \emph{My Early Life} (Bourges, 1994), in \emph{Res facta}, 17 (1995), 56–9.
%<a|y>Dean, J. (1995), review of P. Basiron (1994), \emph{My Early Life} (Bourges), in \emph{Res facta}, 17: 56–9.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@review{dean1995rpb,
  author = {J. Dean},
  related = {basiron1994mel},
  relatedtype = {reviewof},
  journaltitle = {Res facta},
  volume = {17},
  date = {1995},
  pages = {56-59}}
@book{basiron1994mel,
  author = {Philippe Basiron},
  title = {My Early Life},
  location = {Bourges},
  date = {1994}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.4.4>
%<a|y><OGS \S15.4.4\textdagger>
{jocelyn1989pav}
%<n|m>H. D. Jocelyn, \enquote{Probus and Virgil}, review of Maria Luisa Delvigo, \emph{Testo virgiliano e tradizione indiretta} (Pisa, 1987), in \emph{CR}, \textsc{ns} 39 (1989), 27–8.
%<a|y>Jocelyn, H. D. (1989), \enquote{Probus and Virgil}, review of M. L. Delvigo (1987), \emph{Testo virgiliano e tradizione indiretta} (Pisa), in \emph{CR}, \textsc{ns} 39: 27–8.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@review{jocelyn1989pav,
  author = {H. D. Jocelyn},
  title = {Probus and Virgil},
  related = {delvigo1987tvt},
  relatedtype = {reviewof},
  journaltitle = {CR},
  series = {newseries},
  volume = {39},
  date = {1989},
  pages = {27-28}}
@book{delvigo1987tvt,
  author = {Maria Luisa Delvigo},
  title = {Testo virgiliano e tradizione indiretta},
  location = {Pisa},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Books}\label{sec:book}
\chapterprecis{book, mvbook, collection, mvcollection, reference, mvreference}

\section{Monographs}

Biblatex defines \code{book} as a monograph, written either by a single author, or by several authors who have joint responsibility for the entire work. An editor in this context has a modest role selecting or annotating the content, and therefore in Oxford style is given after the title even if the author is not given.

\subsection{Basic form}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.1>
{eliot1977m}
George Eliot, \emph{Middlemarch} (New York: W. W. Norton, 1977).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{eliot1977m,
  author = {George Eliot},
  title = {Middlemarch},
  location = {New York},
  publisher = {W. W. Norton},
  date = {1977}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.2.2>
{benvenuti1986op}
Antonia Tissoni Benvenuti, \emph{L'\emph{Orfeo} del Poliziano} (Padua: Editrice Antenore, 1986).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{benvenuti1986op,
  author = {Antonia Tissoni Benvenuti},
  title = {L'\emph{Orfeo} del Poliziano},
  location = {Padua},
  publisher = {Editrice Antenore},
  date = {1986}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.2.2>
{oconor1977sjf}
Roderick O'Conor, \emph{A Sentimental Journal through \enquote{Finnegan's Wake}, with a Map of the Liffey} (Dublin: HCE Press, 1977).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{oconor1977sjf,
  author = {Roderick O'Conor},
  title = {A Sentimental Journal through \enquote{Finnegan's Wake}, with a Map of the {Liffey}},
  location = {Dublin},
  publisher = {HCE Press},
  date = {1977}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S18.5>
{lyons1981lli}
%<a>Lyons, J. (1981),
%<y>Lyons, J. (1981\emph{a}),
\emph{Language and Linguistics: An Introduction} (Cambridge: Cambridge University Press).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{lyons1981lli,
  author = {John Lyons},
  date = {1981},
  title = {Language and Linguistics},
  subtitle = {An Introduction},
  location = {Cambridge},
  publisher = {Cambridge University Press}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S18.5>
{lyons1981lmc}
%<a>Lyons, J. (1981),
%<y>Lyons, J. (1981\emph{b}),
\emph{Language, Meaning and Context} (London: Fontana Paperbacks).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{lyons1981lmc,
  author = {John Lyons},
  date = {1981},
  title = {Language, Meaning and Context},
  location = {London},
  publisher = {Fontana Paperbacks}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{No publisher}

%<n|m>\spec{Author, \emph{Title} (Location, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<NHR \S18.1.3>
{rogers1986tmp}
C.~D.~Rogers, \emph{Tracing Missing Persons} (Manchester, 1986).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{rogers1986tmp,
  author = {C. D. Rogers},
  title = {Tracing Missing Persons},
  location = {Manchester},
  date = {1986}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{smith1988fag}
Smith, T. (1988), \emph{Famine and Gender} (New Haven, Conn.).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{smith1988fag,
  author = {Smith, T.},
  title = {Famine and Gender},
  date = {1988},
  location = {New Haven, Conn.}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Edited book}

%<n|m>\spec{Author, \emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{ed.} Editor(s) (Location: Publisher).}

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{boas.botschuyver1952dc}
%<n|m>\emph{Distichia Catonis}, ed. Marcus Boas and Henricus Johannes Botschuyver (Amsterdam, 1952).
%<a|y>\emph{Distichia Catonis} (1952), ed. M. Boas and H. J. Botschuyver (Amsterdam).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{boas.botschuyver1952dc,
  title = {Distichia Catonis},
  editor = {Marcus Boas and Henricus Johannes Botschuyver},
  location = {Amsterdam},
  date = {1952}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Collections}

Biblatex defines \code{collection} as a book made up of multiple self-contained contributions from distinct authors. There is no overall author: use the regular \code{book} entry type for collections of a single author’s work. The editor in this case has a more active role and therefore comes before the title.

%<n|m>\spec{Editor (\lit{ed.}), \emph{Title} (Location: Publisher, Year).}
%<a|y>\spec{Editor (Year) (\lit{ed.}), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.1>
{stewart.etal1994mb}
Rosemary Stewart et al. (eds.), \emph{Managing in Britain} (London, 1994).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@collection{stewart.etal1994mb,
  editor = {Rosemary Stewart and Jean-Louis Barsoux and Alfred Kieser and Hans-Dieter Ganter
    and Peter Walgenbach},
  title = {Managing in {Britain}},
  location = {London},
  date = {1994}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{barnes.griffin1989pte}
Barnes, J., and Griffin, M. T. (1989) (eds.), \emph{Philosophia Togata: Essays on Philosophy and Roman Society} (Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@collection{barnes.griffin1989pte,
  editor = {Jonathan Barnes and Miriam T. Griffin},
  date = {1989},
  title = {Philosophia Togata},
  subtitle = {Essays on Philosophy and Roman Society},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>%

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{hankinson1988mmm}
Hankinson, R. J. (1988) (ed.), \emph{Method, Medicine, and Metaphysics} (Edmonton, Alta.).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@collection{hankinson1988mmm,
  editor = {R. J. Hankinson},
  date = {1988},
  title = {Method, Medicine, and Metaphysics},
  location = {Edmonton, Alta.}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Reference works}

Biblatex uses \code{reference} for encyclopaedias and dictionaries, which are typically made up of many small contributions by distinct authors and compiled by an editorial board whose membership might change between successive editions. From a database perspective, reference works are like collections in that they have no single author (a reference work written by a single author should use the \code{book} entry type instead).

\tip{The \emph{Oxford Guide to Style} considers the titles of reference works to be more important and memorable than those of the editor, and so lists the title first, but \emph{New Hart's Rules} doesn't. \pkg[biblatex]{Oxref} takes the former approach, but you can switch to the latter by setting the \key{useeditor} option back to true for this type.}

\begin{tcblisting}{listing only}
\ExecuteBibliographyOptions[reference,mvreference]{useeditor=true}
\end{tcblisting}

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{fortenbaugh.etal1991tes}
%<n|m>\emph{Theophrastus of Eresus: Sources for his Life, Writings, Thought, and Influence}, ed. William W. Fortenbaugh et al., 2 vols. (Philosophia Antiqua, 54; Leiden, 1991).
%<a|y>\emph{Theophrastus of Eresus: Sources for his Life, Writings, Thought, and Influence} (1991), ed. W. W. Fortenbaugh et al., 2 vols. (Philosophia Antiqua, 54; Leiden).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvreference{fortenbaugh.etal1991tes,
  title = {{Theophrastus} of {Eresus}},
  subtitle = {Sources for his Life, Writings, Thought, and Influence},
  editor = {William W. Fortenbaugh and Pamela M Huby and Robert W. Sharples and Dimitri Gutas
    and others},
  volumes = {2},
  series = {Philosophia Antiqua},
  number = {54},
  location = {Leiden},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Multi-volume works}

Biblatex provides additional entry types for multi-volume works: \code{mvbook}, \code{mvcollection} and \code{mvreference} respectively. These can be used to cite all the volumes at once, or just one volume from the set.

\subsection{All volumes}

Where all volumes were published consistently, the following form is used:

%<n|m>\spec{Author, \emph{Title}, n \lit{vols.} (Location: Publisher, Year), VolNo. Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, n \lit{vols.} (Location: Publisher), VolNo. Pages.}

%<*n>
\begin{egcite}{\dots(Brussels, 1867–88), ii. 367–8}
\cite[ii.~\mkcomprange{367-368}]%
  {straeten1867lmp}
\end{egcite}
%</n>
%<*m|a|y>
\begin{egcite}{}
\parencite[ii.~\mkcomprange{367-368}]%
{straeten1867lmp}
\end{egcite}
%</m|a|y>

\begin{bibexbox}
%<n|m><OGS \S15.2.6>
%<a|y><OGS \S15.2.6\textdagger>
{straeten1867lmp}%
%<n|m>Edmond Vander Straeten, \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, 8 vols. (Brussels, 1867–88).
%<a|y>Vander Straeten, E. (1867–88), \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, 8 vols. (Brussels).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{straeten1867lmp,
    author = {Edmond {Vander Straeten}},
    title = {La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle},
    volumes = {8},
    location = {Brussels},
    date = {1867/1888}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the publisher changed between volumes, the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo, n \lit{vols.} (Location: Publisher and Location: Publisher, Year–Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title}, VolNo, n \lit{vols.} (Location: Publisher and Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.6*>
%<a|y><OGS \S15.2.6*\textdagger>
{ritter1838hap}
%<n|m>Heinrich Ritter, \emph{The History of Ancient Philosophy}, trans. Alexander J. W. Morrison, 4~vols. (Oxford: Talboys and London: Bohn, 1838–46).
%<a|y>Ritter, H. (1838–46), \emph{The History of Ancient Philosophy}, trans. A. J. W. Morrison, 4~vols. (Oxford: Talboys and London: Bohn).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{ritter1838hap,
  author = {Heinrich Ritter},
  title = {The History of Ancient Philosophy},
  translator = {Alexander J. W. Morrison},
  volumes = {4},
  location = {Oxford and London},
  publisher = {Talboys and Bohn},
  date = {1838/1846}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Style Manual}, the translator in the above reference
  is in parentheses; this occurs in one other reference (\S15.2.2, Lawrence 1992),
  but in many more does not (\S15.2.15, Bischoff 1990; \S15.8, Auden 1990;
  all in \S13.11.1). I am therefore choosing to ignore this unnecessary
  complication.}

\tip{You can alternatively use the standard \textsf{biblatex} relation type \code{multivolume}.
%<n|m>Note that when you do so, the overall date is removed, so be sure that individual volume dates are provided.
}

\begin{bibexbox}
%<n|m><OGS \S15.2.6*>
%<a|y><OGS \S15.2.6*\textdagger>
{ritter1838hap:mv}
%<n|m>Heinrich Ritter, \emph{The History of Ancient Philosophy}, trans. Alexander J. W. Morrison, 4~vols., i–iii (Oxford: Talboys, 1838–9), iv (London: Bohn, 1846).
%<a|y>Ritter, H. (1838–46), \emph{The History of Ancient Philosophy}, trans. A. J. W. Morrison, 4~vols., i–iii (Oxford: Talboys, 1838–9), iv (London: Bohn, 1846).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{ritter1838hap:mv,
  author = {Heinrich Ritter},
  title = {The History of Ancient Philosophy},
  translator = {Alexander J. W. Morrison},
  volumes = {4},
  date = {1838/1846},
  related = {ritter1838hap1-3,ritter1838hap4},
  relatedtype = {multivolume}}
@book{ritter1838hap1-3,
  volume = {1-3},
  location = {Oxford},
  publisher = {Talboys},
  date = {1838/1839}}
@book{ritter1838hap4,
  volume = {4},
  location = {London},
  publisher = {Bohn},
  date = {1846}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{One volume from several}

Where the volumes are merely numbered, the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, VolNo (Location: Publisher), Pages.}

\tip{To get this format, do not use \code{maintitle}: put the title of the whole work in \code{title}.}

%</n|m|a|y>
%<*n>
\begin{egcite}{\dots ii (Brussels, 1867–88), 367–8}
\cite[367–368]{straeten1867lmp.ii}
\end{egcite}
%</n>
%<*m>
\begin{egcite}{}
\cite[367–368]{straeten1867lmp.ii}
\end{egcite}
%</m>
%<*n|m>

\begin{bibexbox}<OGS \S15.2.6>
{straeten1867lmp.ii}
Edmond Vander Straeten, \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, ii (Brussels, 1867–88).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@mvbook{straeten1867lmp.ii,
  author = {Edmond {Vander Straeten}},
  title = {La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle},
  volume = {2},
  location = {Brussels},
  date = {1867/1888}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}
%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{annas1983osa}
Annas, J. (1983) (ed.), \emph{Oxford Studies in Ancient Philosophy}, i (Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvcollection{annas1983osa,
  editor = {Annas, Julia},
  date = {1983},
  title = {Oxford Studies in Ancient Philosophy},
  volume = {1},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>

Where the volumes each have their own (sub)title,
and they were all published at once (more or less),
the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo: \emph{VolTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, VolNo: \emph{VolTitle} (Location: Publisher), Pages.}

\tip{To get this format, use \code{title} for the volume title and \code{maintitle} for the whole work.}

\begin{bibexbox}
%<n|m><OGS \S15.2.2>
%<a|y><OGS \S15.2.2\textdagger>
{brady.etal1994hehsa}
%<n|m>Thomas A. Brady, Jr., Heiko A. Oberman, and James D. Tracy (eds.), \emph{Handbook of European History, 1400–1600: Late Middle Ages, Renaissance and Reformation}, i: \emph{Structures and Assertions} (Leiden: E. J. Brill, 1994).
%<a|y>Brady, Jr., T. A., Oberman, H. A., and Tracy, J. D. (1994) (eds.), \emph{Handbook of European History, 1400–1600: Late Middle Ages, Renaissance and Reformation}, i: \emph{Structures and Assertions} (Leiden: E. J. Brill).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvcollection{brady.etal1994hehsa,
  editor = {Brady, Jr., Thomas A. and Heiko A. Oberman and James D. Tracy},
  maintitle = {Handbook of European History, 1400–1600},
  mainsubtitle = {{Late} {Middle} {Ages,} {Renaissance} and {Reformation}},
  volume = {1},
  title = {Structures and Assertions},
  location = {Leiden},
  publisher = {E. J. Brill},
  date = {1994}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{\dots (Cambridge: CUP, 1932), 42–56}
\cite[42-56]{ward.waller1932che}
\end{egcite}
%</n>
%<*m|a|y>
\begin{egcite}{}
\parencite[42-56]%
  {ward.waller1932che}
\end{egcite}
%</m|a|y>

\begin{bibexbox}
%<n|m><OGS \S15.2.6>
%<a|y><OGS \S15.2.6\textdagger>
{ward.waller1932che}
%<n|m>A. W. Ward and A. E. Waller (eds.), \emph{The Cambridge History of English Literature}, xii: \emph{The Nineteenth Century} (Cambridge: CUP, 1932).
%<a|y>Ward, A. W., and Waller, A. E. (1932) (eds.), \emph{The Cambridge History of English Literature}, xii: \emph{The Nineteenth Century} (Cambridge: CUP).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvcollection{ward.waller1932che,
  editor = {A. W. Ward and A. E. Waller},
  maintitle = {The Cambridge History of English Literature},
  volume = {12},
  title = {The Nineteenth Century},
  location = {Cambridge},
  publisher = {CUP},
  date = {1932}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the volumes each have their own (sub)title,
and there are many volumes spanning years and possibly publishers,
the following form is used:

%<n|m>\spec{Author, \emph{VolTitle}, [\lit{vol.} VolNo \lit{of} Title] (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{VolTitle}, [\lit{vol.} VolNo \lit{of} Title] (Location: Publisher), Pages.}

\tip{To get this format, use \code{book} instead of \code{mvbook}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.7>
%<a|y><NHR \S18.2.7\textdagger>
{fischer1989asf}
%<n|m>David Hackett Fischer, \emph{Albion's Seed: Four British Folkways in America}, [vol.\@ i of \emph{America: A Cultural History}] (New York: Oxford University Press, 1989).
%<a|y>Fischer, D. H. (1989), \emph{Albion's Seed: Four British Folkways in America}, [vol.\@ i of \emph{America: A Cultural History}] (New York: Oxford University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{fischer1989asf,
  author = {David Hackett Fischer},
  title = {Albion's Seed},
  subtitle = {Four British Folkways in America},
  volume = {1},
  maintitle = {America},
  mainsubtitle = {A Cultural History},
  location = {New York},
  publisher = {Oxford University Press},
  date = {1989}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Additions, translations, and revisions}

Where works have significant introductions, forewords, afterwords, illustrations, etc.\@ this may be noted as follows:

%<n|m>\spec{Author, \emph{Title}, \lit{with an} Addition \lit{by} Contributor (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{with an} Addition \lit{by} Contributor (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{twain1971cyk}
%<n|m>Mark Twain, \emph{A Connecticut Yankee at King Arthur's Court}, with an introduction by Justin Kaplan (Harmondsworth: Penguin, 1971).
%<a|y>Twain, M. (1971), \emph{A Connecticut Yankee at King Arthur's Court}, with an introduction by J. Kaplan (Harmondsworth: Penguin).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{twain1971cyk,
  author = {Mark Twain},
  title = {A {Connecticut} Yankee at {King} {Arthur's} Court},
  introduction = {Justin Kaplan},
  location = {Harmondsworth},
  publisher = {Penguin},
  date = {1971}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Translators are credited as follows:

%<n|m>\spec{Author, \emph{Title}, \lit{trans.} Translator(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{trans.} Translator(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{bischoff1990lpa}
%<n|m>Bernhard Bischoff, \emph{Latin Palaeography: Antiquity and the Middle Ages}, trans. Dáibhi Ó~Cróinín and David Ganz (Cambridge, 1990).
%<a|y>Bischoff, B. (1990), \emph{Latin Palaeography: Antiquity and the Middle Ages}, trans. D. Ó~Cróinín and D. Ganz (Cambridge).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{bischoff1990lpa,
  author = {Bernhard Bischoff},
  title = {Latin Palaeography},
  subtitle = {Antiquity and the Middle Ages},
  translator = {Dáibhi Ó~Cróinín and David Ganz},
  location = {Cambridge},
  date = {1990}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title}, \lit{trans.\@ with} Addition Translator(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{trans.\@ with} Addition Translator(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{martorell1984tlb}
%<n|m>Joanat Martorell, \emph{Tirant lo Blanc}, trans. with foreword David H. Rosenthal (London, 1984).
%<a|y>Martorell, J. (1984), \emph{Tirant lo Blanc}, trans. with foreword D. H. Rosenthal (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{martorell1984tlb,
  author = {Joanat Martorell},
  title = {Tirant lo Blanc},
  translator = {David H. Rosenthal},
  foreword = {David H. Rosenthal},
  location = {London},
  date = {1984}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Editions}

\subsection{Later edition only}

Where the author\slash editor is common to both, the following form is used:

%<n|m>\spec{Author, \emph{Title} (nth \lit{edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (nth \lit{edn.}, Location: Publisher).}

\tip{This is the format used by the entry type \code{book}}

%</n|m|a|y>
%<*n>
\begin{egcite}{\dots (3rd edn., 1990), 419–21}
\cite[419-421]{baker1990iel}
\end{egcite}
%</n>
%<*n|m>

\begin{bibexbox}<OGS \S15.2.3>
{baker1990iel}
J. H. Baker, \emph{An Introduction to English Legal History} (3rd edn., 1990).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{baker1990iel,
  author = {J. H. Baker},
  title = {An Introduction to {English} Legal History},
  edition = {3},
  date = {1990}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S17.3.2*>
{maitland2001mvr}
Maitland, G. (2001), \emph{Maitland's Vertebral Manipulation} (6th edn., Oxford: Butterworth–Heinemann).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{maitland2001mvr,
  author = {G. Maitland},
  title = {Maitland's Vertebral Manipulation},
  edition = {6},
  publisher = {Butterworth--Heinemann},
  location = {Oxford},
  date = {2001}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>
\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{beckford1823v}
%<n|m>William Beckford, \emph{Vathek} (4th edn., London, 1823) [online facsimile], \url{http://beckford.c18.net/wbvathek1823.html}, accessed 5 Nov. 2013.
%<a|y>Beckford, W. (1823), \emph{Vathek} (4th edn., London) [online facsimile], \url{http://beckford.c18.net/wbvathek1823.html}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{beckford1823v,
  author = {William Beckford},
  title = {Vathek},
  edition = {4},
  location = {London},
  date = {1823},
  howpublished = {online facsimile},
  url = {http://beckford.c18.net/wbvathek1823.html},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the editor has changed, the following form is used:

%<n|m>\spec{\emph{Title}, nth \lit{edn.}, \lit{ed.} Editor (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), nth \lit{edn.}, \lit{ed.} Editor (Location: Publisher).}

\tip{This format is used by entry type \code{reference}}

\begin{bibexbox}
%<n|m><OGS \S15.2.3>
%<a|y><OGS \S15.2.3\textdagger>
{knowles1999odq}
%<n|m>\emph{The Oxford Dictionary of Quotations}, 5th edn., ed. Elizabeth Knowles (Oxford, 1999).
%<a|y>\emph{The Oxford Dictionary of Quotations} (1999), 5th edn., ed. E. Knowles (Oxford).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@reference{knowles1999odq,
  title = {The {Oxford} Dictionary of Quotations},
  edition = {5},
  editor = {Elizabeth Knowles},
  publisher = {Oxford},
  date = {1999}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Both first and later edition}

%<n|m>\spec{Author, \emph{Title} (Year; nth \lit{edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Year; nth \lit{edn.}, Location: Publisher).}

\tip{Use the \code{orig} fields for the earlier edition.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.3>
{denniston1934gp}
J. D. Denniston, \emph{The Greek Particles} (1934; 2nd edn., Oxford, 1954).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{denniston1934gp,
  author = {J. D. Denniston},
  title = {The Greek Particles},
  origdate = {1934},
  edition = {2},
  location = {Oxford},
  date = {1954}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\tip{Use the localization key \code{revised} as the edition to get \enquote{revised edition}. Use the localization key \code{revisedenlarged} as the edition to get \enquote{revised and enlarged edition}}

\begin{bibexbox}<OGS \S15.2.1>
{gibbon1686dfs}[]
[John Gibbon], \emph{Day-Fatality: Or Some Observations on Days Lucky and Unlucky} (London, 1678; rev.~edn., 1686).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{gibbon1686dfs,
  author = {John Gibbon},
  author+an = {=inferred},
  title = {Day-Fatality},
  subtitle = {Or Some Observations on Days Lucky and Unlucky},
  edition = {revised},
  origlocation = {London},
  origdate = {1678},
  date = {1686}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Guide to Style}, there is no comma after \enquote{rev. edn.} in the above reference; this may be an error.}
%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{marx1867ccp}
Marx, K. (1867), \emph{Capital: A Critique of Political Economy}, i, trans. B. Fowkes (New York, 1977).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvbook{marx1867ccp,
  author = {K. Marx},
  origdate = {1867},
  title = {Capital},
  subtitle = {A Critique of Political Economy},
  volume = {1},
  translator = {B. Fowkes},
  location = {New York},
  date = {1977}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Republications}

If the publication has not been revised, but has been re-typeset by a different publisher,
the \emph{Oxford Guide to Style} suggests putting the original date in a note at the end,
after rather than within the publication block%
%<n|m>.
%<a|y>, but this does not affect the author–date style since the original date is at the head of the reference anyway.

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year) (\lit{originally pub.} Year).}
%<a|y>\spec{Author (OrigYear), \emph{Title} (Location: Publisher).}

%<*n|m>
\tip{This format is triggered if you specify an original date but do not specify the original publisher or location, nor the edition of the later publication.}
\info{In the \emph{Oxford Guide to Style}, the following example has the string \enquote{first pub.\@} in place of the more common \enquote{originally pub.\@};
to use this phrase in all entries, use the regular \pkg{biblatex} command to reset the string:}
\begin{tcblisting}{listing only,left skip=2em}
\DefineBibliographyStrings{english}{origpubin={first pub\adddot}}
\end{tcblisting}
%</n|m>

\begin{bibexbox}
%<n|m><OGS \S15.2.3*>
%<a|y><OGS \S15.2.3\textdagger>
{bettelheim1976uem}
%<n|m>Bruno Bettelheim, \emph{The Uses of Enchantment: The Meaning and Importance of Fairy Tales} (Harmondsworth: Penguin Books, 1988) (originally pub. 1976).
%<a|y>Bettelheim, B. (1976), \emph{The Uses of Enchantment: The Meaning and Importance of Fairy Tales} (Harmondsworth: Penguin Books, 1988).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{bettelheim1976uem,
  author = {Bruno Bettelheim},
  title = {The Uses of Enchantment},
  subtitle = {The Meaning and Importance of Fairy Tales},
  location = {Harmondsworth},
  publisher = {Penguin Books},
  date = {1988},
  origdate = {1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Reprints}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year; \lit{repr.} Location: Publisher, Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title} (Location: Publisher; \lit{repr.} Location: Publisher).}

\tip{Use localization key \code{reprint} as the edition. For a revised reprint, use \code{revisedreprint}.}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{adam.tannery1897odd}
%<n|m>C. Adam and D. Tannery (eds.), \emph{Œuvres de Descartes} (Paris: Cerf, 1897–1913; repr. Paris: J. Vrin, CNRS, 1964–76).
%<a|y>Adam, C., and Tannery, D. (1897–1913) (eds.), \emph{Œuvres de Descartes} (Paris: Cerf; repr. Paris: J. Vrin, CNRS, 1964–76).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@collection{adam.tannery1897odd,
  editor = {C. Adam and D. Tannery},
  title = {Œuvres de Descartes},
  origlocation = {Paris},
  origpublisher = {Cerf},
  origdate = {1897/1913},
  edition = {reprint},
  location = {Paris},
  publisher = {J. Vrin, CNRS},
  date = {1964/1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{southern1991sap}
%<n|m>R. W. Southern, \emph{Saint Anselm: A Portrait in a Landscape} (rev. repr., Cambridge: Cambridge University Press, 1991).
%<a|y>Southern, R. W. (1991), \emph{Saint Anselm: A Portrait in a Landscape} (rev. repr., Cambridge: Cambridge University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{southern1991sap,
  author = {R. W. Southern},
  title = {Saint Anselm},
  subtitle = {A Portrait in a Landscape},
  edition = {revisedreprint},
  location = {Cambridge},
  publisher = {Cambridge University Press},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year; \lit{facs. edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title} (Location: Publisher; \lit{facs. edn.}, Location: Publisher).}

\tip{Use localization key \code{facsimile} as the edition.}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{allen1594kkk}
%<n|m>E. Allen, \emph{A Knack to Know a Knave} (London, 1594; facs. edn., Oxford: Malone Society Reprints, 1963).
%<a|y>Allen, E. (1594), \emph{A Knack to Know a Knave} (London; facs. edn., Oxford: Malone Society Reprints, 1963).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{allen1594kkk,
  author = {E. Allen},
  title = {A Knack to Know a Knave},
  origlocation = {London},
  origdate = {1594},
  edition = {facsimile},
  location = {Oxford},
  publisher = {Malone Society Reprints},
  date = {1963}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Title changes}

\emph{New Hart's Rules} recommends giving the original publication details first,
then the new title and its details after a semicolon.

\tip{The standard \code{relatedtype} value \code{reprintas} is supported.}

\begin{bibexbox}
%<n|m><NHR \S18.2.13>
%<a|y><NHR \S18.2.13\textdagger>
{hare1949wwb}
%<n|m>Cyril Hare, \emph{When the Wind Blows} (London, 1949); repr. as \emph{The Wind Blows Death} (London, 1987).
%<a|y>Hare, C. (1949), \emph{When the Wind Blows} (London); repr. as \emph{The Wind Blows Death} (London, 1987).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{hare1949wwb,
  author = {Cyril Hare},
  title = {When the Wind Blows},
  location = {London},
  date = {1949},
  related = {hare1987wbd},
  relatedtype = {reprintas}}
@book{hare1987wbd,
  author = {Cyril Hare},
  title = {The Wind Blows Death},
  location = {London},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{A more generalized version of this relation is available.
  If you set the \code{relatedtype} to the \pkg[biblatex]{oxref}-specific keyword \code{editedas},
  the edition and any editorial contributions will be printed in the linking text.}

\begin{bibexbox}
%<n|m><NHR \S18.2.12*>
%<a|y><NHR \S18.2.128\textdagger>
{berkenhout1769onh}
%<n|m>John Berkenhout, \emph{Outlines of the Natural History of Great Britain}, 3 vols. (London, 1769–72); rev. edn., as \emph{A Synopsis of the Natural History of Great Britain}, 2 vols. (London, 1789).
%<a|y>Berkenhout, J. (1769–72), \emph{Outlines of the Natural History of Great Britain}, 3 vols. (London); rev. edn., as \emph{A Synopsis of the Natural History of Great Britain}, 2 vols. (London, 1789).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{berkenhout1769onh,
  author = {John Berkenhout},
  title = {Outlines of the Natural History of Great Britain},
  volumes = {3},
  location = {London},
  date = {1769/1772},
  related = {berkenhout1789snh},
  relatedtype = {editedas}}
@mvbook{berkenhout1789snh,
  author = {John Berkenhout},
  title = {A Synopsis of the Natural History of Great Britain},
  volumes = {2},
  edition = {revised},
  location = {London},
  date = {1789}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.2.13>
%<a|y><NHR \S18.2.13\textdagger>
{lower1665dtw}
%<n|m>Richard Lower, \emph{Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus Edmundum De Meara Ormoniensem Hibernum M.D.} (London, 1665); facs. edn. with introduction, ed. and trans. Kenneth Dewhurst, as \emph{Richard Lower's \enquote{Vindicatio}: A Defence of the Experimental Method} (Oxford, 1983).
%<a|y>Lower, R. (1665), \emph{Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus Edmundum De Meara Ormoniensem Hibernum M.D.} (London); facs. edn. with introduction, ed. and trans. K. Dewhurst, as \emph{Richard Lower's \enquote{Vindicatio}: A Defence of the Experimental Method} (Oxford, 1983).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{lower1665dtw,
  author = {Richard Lower},
  title = {Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus
    Edmundum De Meara Ormoniensem Hibernum M.D.},
  location = {London},
  date = {1665},
  related = {dewhurst1983rlv},
  relatedtype = {editedas}}
@book{dewhurst1983rlv,
  author = {Richard Lower},
  introduction = {Kenneth Dewhurst},
  editor = {Kenneth Dewhurst},
  translator = {Kenneth Dewhurst},
  title = {Richard Lower's \enquote{Vindicatio}},
  subtitle = {A Defence of the Experimental Method},
  edition = {facsimile},
  location = {Oxford},
  date = {1983}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\subsection{Co-publications\slash co-editions}

%</n|m|a|y>
%<*y>
The \emph{Oxford Guide to Style} provides a special format for expressing works that are co-published by several publishers at once. \textsf{Oxnotes} implements it using the \code{relatedtype} keyword \code{copub}. Since it is not suitable for author–year citation styles, no effort is made to make it work for \textsf{oxyear}; you should cite the edition you used, and either ignore the other or mention it in an \code{addendum}.

%</y>
%<*n>
If the same book has been co-published by multiple publishers at approximately the same time,
you can express this by putting multiple sets of details in the publication block.
You should not do this, however, if you might want to switch to using the \textsf{oxyear} style at some point,
since it does not really work for author–year styles.

\spec{Author, \emph{Title} (Location: Publisher, Year; Location: Publisher, Year).}

\tip{Put each publication in the bib file separately. In the one you plan to cite, put the keys of the others in \code{related} and give \code{copub} as the \code{relatedtype}.}

\begin{bibexbox}
<OGS \S15.2.5>{holfordstrevens1988ag1}
L. A. Holford-Strevens, \emph{Aulus Gellius} (London: Duckworth, 1988; Chapel Hill: University of North Carolina Press, 1989).
\tcblower
\begin{Verbatim}
%</n>
%<*n|bib>
@book{holfordstrevens1988ag1,
  author = {L. A. Holford-Strevens},
  title = {Aulus Gellius},
  location = {London},
  publisher = {Duckworth},
  date = {1988},
  related = {holfordstrevens1988ag2},
  relatedtype = {copub}}
@book{holfordstrevens1988ag2,
  location = {Chapel Hill},
  publisher = {University of North Carolina Press},
  date = {1989}}
%</n|bib>
%<*n>
\end{Verbatim}
\end{bibexbox}

%</n>
%<*n|m|a|y>
If the work is published under two different titles, it is a good idea to
provide both to make it easier to locate.

\tip{Use a generic relation and specify the country details in the \code{relatedstring}.}

\begin{bibexbox}
%<n|m><OGS \S15.2.5>
%<a|y><OGS \S15.2.5\textdagger>
{salinger1953ns}
%<n|m>J. D. Salinger, \emph{Nine Stories} (Boston: Little, Brown, 1953), published in the UK as \emph{For Esmé—With Love and Squalor, and Other Stories} (London: Hamish Hamilton, 1953).
%<a|y>Salinger, J. D. (1953), \emph{Nine Stories} (Boston: Little, Brown), published in the UK as \emph{For Esmé—With Love and Squalor, and Other Stories} (London: Hamish Hamilton, 1953).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{salinger1953ns,
  author = {J. D. Salinger},
  title = {Nine Stories},
  location = {Boston},
  publisher = {Little, Brown},
  date = {1953},
  related = {salinger1953few},
  relatedstring = {published in the UK as},
  options = {relationpunct=comma}}
@book{salinger1953few,
  title = {For {Esmé}---With Love and Squalor, and Other Stories},
  location = {London},
  publisher = {Hamish Hamilton},
  date = {1953}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Works from a series}

%<n|m>\spec{Author, \emph{Title} (Series; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Series; Location: Publisher).}
%<n|m>\spec{Author, \emph{Title} (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Series, Number; Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.7>
{garlandia1972dmm}
Johannes de Garlandia, \emph{De mensurabili musica}, ed. Erich Reimer, 2 vols. (Beihefte zum Archiv für Musikwissenschaft, 10–11; Wiesbaden, 1972).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@mvbook{garlandia1972dmm,
  author = {Johannes de Garlandia},
  title = {De mensurabili musica},
  editor = {Erich Reimer},
  volumes = {2},
  series = {Beihefte zum Archiv für Musikwissenschaft},
  number = {10--11},
  publisher = {Wiesbaden},
  date = {1972}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{barnes1982ari}
Barnes, J. (1982), \emph{Aristotle} (Past Masters; Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{barnes1982ari,
  author = {Jonathan Barnes},
  date = {1982},
  title = {Aristotle},
  series = {Past Masters},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

%<n|m>\spec{Author, \emph{Title} (nth \lit{ser.}, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (nth \lit{ser.}).}

\section{Pre-publication book}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, \lit{forthcoming}).}
%<a|y>\spec{Author (\lit{forthcoming}), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{smithFCgaf}
%<a>Smith, P. (forthcoming),
%<y>Smith, P. (forthcoming \emph{a}),
\emph{Gender and Famine}, 2 vols. (London).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvbook{smithFCgaf,
  author = {P. Smith},
  title = {Gender and Famine},
  volumes = {2},
  location = {London},
  pubstate = {forthcoming}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\chapter{Works within books}\label{sec:inbook}
\chapterprecis{inbook, bookinbook, suppbook, incollection, suppcollection, inreference}

\section{Works in collections of a single author's works}

The \code{inbook} entry type is intended for books that consist of several self-contained works by the same author, for citing one of these works.

%<n|m>\spec{Author, \enquote{Title}, \lit{in id.}, \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in id.}, \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher), Pages.}

\tip{If you provide \code{bookauthor}, and it is the same as the \code{author}, the second instance of the name will replaced by \enquote{id.}\slash \enquote{ead.}\slash \enquote{eid.}\slash \enquote{eaed.} Use the \code{gender} field to select which is used.}

\begin{bibexbox}
%<n|m><OGS \S15.2.11*>
%<a|y><OGS \S15.2.11*\textdagger>
{kristeller1979thm}
%<n|m>Paul Oskar Kristeller, \enquote{The Aristotelian Tradition}, in id., \emph{Renaissance Thought and Its Sources}, ed. Michael Mooney (New York: Columbia University Press, 1979).
%<a|y>Kristeller, P. O. (1979), \enquote{The Aristotelian Tradition}, in id., \emph{Renaissance Thought and Its Sources}, ed. M. Mooney (New York: Columbia University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inbook{kristeller1979thm,
  author = {Paul Oskar Kristeller},
  gender = {sm},
  title = {The Aristotelian Tradition},
  bookauthor = {Paul Oskar Kristeller},
  booktitle = {Renaissance Thought and Its Sources},
  editor = {Michael Mooney},
  location = {New York},
  publisher = {Columbia University Press},
  date = {1979}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher), Pages.}

\begin{bibexbox}
%<n|m><NHR \S18.2.6*>
%<a|y><NHR \S18.2.6*\textdagger>
{ashton1991d}
%<n|m>John Ashton, \enquote{Dualism}, in \emph{Understanding the Fourth Gospel} (Oxford, 1991), 205–37.
%<a|y>Ashton, J. (1991), \enquote{Dualism}, in \emph{Understanding the Fourth Gospel} (Oxford), 205–37.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inbook{ashton1991d,
  author = {John Ashton},
  title = {Dualism},
  booktitle = {Understanding the Fourth Gospel},
  location = {Oxford},
  date = {1991},
  pages = {205-237}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Works in collections}

The \code{incollection} entry type is intended for citing one of a collection of self-contained works by different authors.

\subsection{Works in a mixed collection}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} Editors (\lit{eds.}), \emph{BookTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} Editors (\lit{eds.}), \emph{BookTitle} (Location: Publisher), Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.3>
{shearman1993vsf}
John Shearman, \enquote{The Vatican Stanze: Functions and Decoration}, in George Holmes (ed.), \emph{Art and Politics in Renaissance Italy: British Academy Lectures} (Oxford: Clarendon Press, 1993), 185–240.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@incollection{shearman1993vsf,
  author = {John Shearman},
  title = {The Vatican Stanze},
  subtitle = {Functions and Decoration},
  editor = {George Holmes},
  booktitle = {Art and Politics in Renaissance Italy},
  booksubtitle = {British Academy Lectures},
  location = {Oxford},
  publisher = {Clarendon Press},
  date = {1993},
  pages = {185-240}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S17.3.2>
{magarey1988ect}
Magarey, M. E. (1988), \enquote{Examination of the Cervical and Thoracic Spine}, in R. Grant (ed.), \emph{Physical Therapy of the Cervical and Thoracic Spine} (New York: Churchill Livingstone), 81–109.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@incollection{magarey1988ect,
  author = {M. E. Magarey},
  date = {1988},
  title = {Examination of the Cervical and Thoracic Spine},
  editor = {R. Grant},
  booktitle = {Physical Therapy of the Cervical and Thoracic Spine},
  location = {New York},
  publisher = {Churchill Livingstone},
  pages = {81-109}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S17.3.2*>
{jessop1997gcc}
Jessop, B. (1997), \enquote{The Governance of Complexity and Complexity of Governance}, in A. Amin and J. Hausner (eds.), \emph{Beyond Markets and Hierarchy} (Aldershot: Edward Elgar).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@incollection{jessop1997gcc,
  author = {Bob Jessop},
  date = {1997},
  title = {The Governance of Complexity and Complexity of Governance},
  editor = {Ash Amin and Jerzy Hausner},
  booktitle = {Beyond Markets and Hierarchy},
  location = {Aldershot},
  publisher = {Edward Elgar}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Works by the editor in a mixed collection}

%<n|m>\spec{Author, \enquote{Title}, \lit{in id.} (\lit{ed.}), \emph{BookTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in id.} (\lit{ed.}), \emph{BookTitle} (Location: Publisher), Pages.}

\tip{If you provide the same values for \code{author} and \code{editor}, the editor name will replaced by \enquote{id.}\slash \enquote{ead.}\slash \enquote{eid.}\slash \enquote{eaed.} Use the \code{gender} field to select which is used.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{todd1974dhp}
%<n|m>W. B. Todd, \enquote{David Hume: A Preliminary Bibliography}, in id. (ed.), \emph{Hume and the Enlightenment: Essays Presented to Ernest Campbell Mossner} (Edinburgh: Edinburgh University Press, 1974).
%<a|y>Todd, W. B. (1974), \enquote{David Hume: A Preliminary Bibliography}, in id. (ed.), \emph{Hume and the Enlightenment: Essays Presented to Ernest Campbell Mossner} (Edinburgh: Edinburgh University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@incollection{todd1974dhp,
  author = {W. B. Todd},
  gender = {sm},
  title = {David Hume},
  subtitle = {A Preliminary Bibliography},
  editor = {W. B. Todd},
  booktitle = {Hume and the Enlightenment},
  booksubtitle = {Essays Presented to Ernest Campbell Mossner},
  location = {Edinburgh},
  publisher = {Edinburgh University Press},
  date = {1974}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Anthologies of independently published works}

Biblatex provides the \code{bookinbook} entry type for citing a part of an anthology that has previously been published as a book in its own right. The main difference from \code{inbook} is how the original publication information is handled.

\subsection{Later version more accessible}

\tip{Use \code{origdate} to give the date of original publication.}

\begin{bibexbox}
%<n|m><OGS \S15.3*>
%<a|y><OGS \S15.3*\textdagger>
{frege1892osr}
%<n|m>G. Frege, \enquote{On Sense and Reference}, in id., \emph{Philosophical Writings}, ed. and trans. P. T. Geach and M. Black (Oxford: Blackwell, 1952) (originally pub. 1892).
%<a|y>Frege, G. (1892), \enquote{On Sense and Reference}, in id., \emph{Philosophical Writings}, ed. and trans. P. T. Geach and M. Black (Oxford: Blackwell, 1952).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@bookinbook{frege1892osr,
  author = {G. Frege},
  gender = {sm},
  title = {On Sense and Reference},
  bookauthor = {G. Frege},
  booktitle = {Philosophical Writings},
  translator = {P. T. Geach and M. Black},
  editor = {P. T. Geach and M. Black},
  location = {Oxford},
  publisher = {Blackwell},
  date = {1952},
  origdate = {1892}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Guide to Style}, the above example has the string \enquote{trans.\@ and ed.\@} in place of \enquote{ed.\@ and trans.\@};
to use this phrase in all entries, use the regular \pkg{biblatex} command to reset the string:}
\begin{tcblisting}{listing only,left skip=2em}
\DefineBibliographyStrings{english}{byeditortr={trans\adddotspace and ed\adddot}}
\end{tcblisting}

\subsection{Both versions equally accessible}

\tip{Put the key of the original work in \code{related}, and in \code{relatedtype} use the keyword \code{reprintfrom}.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{owen1986pi}
%<n|m>G. E. L. Owen, \enquote{Philosophical Invective}, in id., \emph{Logic, Science and Dialectic}, ed. M. Nussbaum (Ithaca, NY: Cornell University Press, 1986), 347–64. From \emph{Oxford Studies in Ancient Philosophy}, 1 (1983), 1–25.
%<a|y>Owen, G. E. L. (1986), \enquote{Philosophical Invective}, in id., \emph{Logic, Science and Dialectic}, ed. M. Nussbaum (Ithaca, NY: Cornell University Press), 347–64. From \emph{Oxford Studies in Ancient Philosophy}, 1 (1983): 1–25.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@bookinbook{owen1986pi,
  author = {G. E. L. Owen},
  gender = {sm},
  title = {Philosophical Invective},
  booktitle = {Logic, Science and Dialectic},
  bookauthor = {G. E. L. Owen},
  editor = {M. Nussbaum},
  location = {Ithaca, NY},
  publisher = {Cornell University Press},
  date = {1986},
  pages = {347-364},
  related = {owen1983pi},
  relatedtype = {reprintfrom}}
@article{owen1983pi,
  author = {G. E. L. Owen},
  title = {Philosophical Invective},
  journaltitle = {Oxford Studies in Ancient Philosophy},
  volume = {1},
  date = {1983},
  pages = {1-25}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Articles in yearbooks and works of reference}

Yearbooks may be treated either as collections or periodicals; the distinction boils down to whether you want to print the location and publisher.

The \emph{Oxford Guide to Style} suggests citing entries in dictionaries and encyclopaedias using a postnote like \code{[s.v.\@ `Tawdry']}, but for online works gives a format rather similar to yearbooks, that is, without \enquote{in}.

\tip{To omit the \enquote{in} before the book title, either use the \code{inreference} entry type without specifying an editor, or use the \code{incollection} type with an \code{entrysubtype} of \code{yearbook}.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{dahlhaus1971mmf}
%<n|m>Carl Dahlhaus, \enquote{Miszellen zur Musiktheorie des 15.\@ Jahrhunderts}, \emph{Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz, 1970} (Berlin, 1971), 21–33.
%<a|y>Dahlhaus, C. (1971), \enquote{Miszellen zur Musiktheorie des 15.\@ Jahrhunderts}, \emph{Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz, 1970} (Berlin), 21–33.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inreference{dahlhaus1971mmf,
  author = {Carl Dahlhaus},
  title = {Miszellen zur Musiktheorie des 15.\@ Jahrhunderts},
  booktitle = {Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz,
    1970},
  location = {Berlin},
  date = {1971},
  pages = {21-33}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Supplementary works in books and collections}

If the work is headed \enquote{Introduction}, \enquote{Foreword}, \enquote{Afterword}, or similar,
this is technically a descriptor rather than a title.

\tip{If the work has a true title, the descriptor goes in the \code{note} field.
  If it doesn't, the descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to correct the formatting.
  Alternatively, use the (non-standard) \code{descriptor} field for the descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
%<n|m><NHR \S18.2.6*>
%<a|y><NHR \S18.2.6*\textdagger>
{gill1987intro}
%<n|m>Roma Gill, introduction in \emph{The Complete Works of Christopher Marlow}, i (Oxford, 1987; repr.\@ 2001).
%<a|y>Gill, R. (1987), introduction in \emph{The Complete Works of Christopher Marlow}, i (Oxford; repr.\@ 2001).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppbook{gill1987intro,
  author = {Roma Gill},
  title = {introduction},
  title+an = {=descriptor},
  booktitle = {The Complete Works of Christopher Marlow},
  volume = {1},
  origlocation = {Oxford},
  origdate = {1987},
  edition = {reprint},
  date = {2001}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{atwan2000fw}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppcollection{atwan2000fw,
  author = {Robert Atwan},
  title = {foreword},
  title+an = {=descriptor},
  address = {Boston},
  booktitle = {The Best American Essays of the Century},
  date = {2000},
  editor = {Joyce Carol Oates and Robert Atwan},
  publisher = {Houghton},
  pages = {x-xvi}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

It is quite rare for such items to have a true title in addition, so previous
versions of \pkg[biblatex]{oxref} treated all titles of \texttt{suppbook}
entries as descriptors.

\tip{To restore the previous behaviour, include the following code:}

\begin{tcblisting}{listing only}
\DeclareFieldFormat[suppbook]{title}{#1}
\end{tcblisting}

\chapter{Works presented at meetings}\label{sec:proceedings}
\chapterprecis{proceedings, mvproceedings, inproceedings, unpublished}

\section{Single volume proceedings}

The \code{proceedings} entry type is intended for a set of conference papers that have been collected together into a single volume.

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.12>
%<a|y><OGS \S15.2.12\textdagger>
{icp1975pic}
%<n|m>\emph{Proceedings of the XIV International Congress of Papyrologists: Oxford, 24–31 July 1974} (London, 1975).
%<a|y>\emph{Proceedings of the XIV International Congress of Papyrologists: Oxford, 24–31 July 1974} (1975) (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{icp1975pic,
  title = {Proceedings of the {XIV} {International} {Congress} of {Papyrologists}},
  subtitle = {{Oxford}, 24--31 {July} 1974},
  location = {London},
  date = {1975}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{The \code{organization} is automatically converted into an \code{author}.}

%<*n>
\begin{egcite}{\dots Imperial College Bookstall, 1922), 1.52–3}
\cite[1.52-3]{iau1922tia}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[1.52-3]{iau1922tia}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[1.52-3]{iau1922tia}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.2.13>
%<a|y><OGS \S15.2.13\textdagger>
{iau1922tia}
%<n|m>International Astronomical Union, \emph{Transactions of the International Astronomical Union, Rome}, 12–20 May 1922 (London: Imperial College Bookstall, 1922).
%<a|y>International Astronomical Union (1922), \emph{Transactions of the International Astronomical Union, Rome}, 12–20 May 1922 (London: Imperial College Bookstall).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{iau1922tia,
  organization = {{International Astronomical Union}},
  title = {Transactions of the {International} {Astronomical} {Union}, {Rome}},
  eventdate = {1922-05-12/1922-05-20},
  location = {London},
  publisher = {Imperial College Bookstall},
  date = {1922}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Sometimes the title of the proceedings does not relate to the conference; in which case the following form might be used:

%<n|m>\spec{\emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{ecdl2009}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{ecdl2009,
  editor = {Maristella Agosti and José Borbinha and Sarantos Kapidakis and Christos
    Papatheodorou and Giannis Tsakonas},
  title = {Research and Advanced Technology for Digital Libraries},
  eventtitle = {13th European Conference, ECDL 2009},
  venue = {Corfu, Greece},
  eventdate = {2009-09-27/2009-10-02},
  series = {Lecture Notes in Computer Science},
  number = {5714},
  location = {Berlin},
  publisher = {Springer},
  date = {2009}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Multi-volume proceedings}

\textsf{Biblatex} provides \code{mvproceedings} for multi-volume proceedings.
The examples here are a combination of Oxford style for proceedings and multi-volume books.

\subsection{All volumes}

%<n|m>\spec{\emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher).}

\begin{bibexbox}
{iced2009}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvproceedings{iced2009,
  title = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  volumes = {10},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  isbn = {978-1-904670-12-4}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{One volume}

%<n|m>\spec{\emph{Title}, VolNo: \emph{VolTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{VolTitle} (Year), VolNo \lit{of} \emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{iced2009dik}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvproceedings{iced2009dik,
  maintitle = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  title = {Design Information and Knowledge},
  volume = {8},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  isbn = {978-1-904670-12-4}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Published conference paper}

The \code{inproceedings} entry type is intended for a conference paper published as part of a proceedings volume. For papers that have not been collected into a proceedings volume, or presentation slide sets, use the \code{unpublished} entry type instead (see below).

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{tonkin.strelnikov2009iem}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inproceedings{tonkin.strelnikov2009iem,
  author = {Emma Tonkin and Alexey Strelnikov},
  title = {Information Environment Metadata Schema Registry},
  editor = {Maristella Agosti and José Borbinha and Sarantos Kapidakis and Christos Papatheodorou and Giannis Tsakonas},
  booktitle = {Research and Advanced Technology for Digital Libraries},
  eventtitle = {13th European Conference, ECDL 2009},
  venue = {Corfu, Greece},
  eventdate = {2009-09-27/2009-10-02},
  series = {Lecture Notes in Computer Science},
  number = {5714},
  location = {Berlin},
  publisher = {Springer},
  date = {2009},
  pages = {487-488},
  isbn = {978-3-642-04345-1},
  issn = {0302-9743}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher, Year), VolNo. Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher), VolNo. Pages.}

\begin{bibexbox}
{ding.etal2009sfc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inproceedings{ding.etal2009sfc,
  author = {Lian Ding and Alex Ball and Manjula Patel and Jason Matthews and Glen Mullineux},
  title = {Strategies for the Collaborative Use of CAD Product Models},
  maintitle = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  booktitle = {Design Information and Knowledge},
  volume = {8},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  pages = {123-134},
  isbn = {978-1-904670-12-4},
  url = {http://opus.bath.ac.uk/14285}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Published orations, addresses, lectures, and speeches}

%<n|m>\spec{Author, \emph{Title}, Type, Venue, Date (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, Type, Venue, Date (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.6>
%<a|y><OGS \S15.6\textdagger>
{gombrich1957as}
%<n|m>E. H. Gombrich, \emph{Art and Scholarship}, Inaugural Lecture, University College London, 14 Feb. 1957 (London: H. K. Lewis, 1957).
%<a|y>Gombrich, E. H. (1957), \emph{Art and Scholarship}, Inaugural Lecture, University College London, 14 Feb. 1957 (London: H. K. Lewis).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{gombrich1957as,
  author = {E. H. Gombrich},
  title = {Art and Scholarship},
  eventtitle = {Inaugural Lecture},
  venue = {University College London},
  eventdate = {1957-02-14},
  location = {London},
  publisher = {H. K. Lewis},
  date = {1957}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the \texttt{eventtitle} field to indicate the type of the oration.}

\section{Unpublished conference paper}

%<n|m>\spec{Author, \enquote{Title}, \lit{paper given at the} ConfTitle, Venue, EventDate.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{paper given at the} ConfTitle, Venue, EventDate.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.6>
{holfordstrevens1999hlm}
Leofranc Holford-Strevens, \enquote{Humanism and the Language of Music Theory Treatises}, paper given at the 65th Annual Meeting of the American Musicological Society, Kansas City, MO, 4–7 Nov. 1999.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@unpublished{holfordstrevens1999hlm,
  author = {Leofranc Holford-Strevens},
  title = {Humanism and the Language of Music Theory Treatises},
  howpublished = {paper given at the 65th Annual Meeting of the American Musicological Society},
  location = {Kansas City, MO},
  date = {1999-11-04/1999-11-07}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{mason.etal1984nns}
Mason, J. B., Habicht, J. P., and Tabatabai, H. (1984), \enquote{Notes on Nutritional Surveillance}, paper delivered to the WHO conference.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@unpublished{mason.etal1984nns,
  author = {J. B. Mason, and J. P. Habicht and H. Tabatabai},
  date = {1984},
  title = {Notes on Nutritional Surveillance},
  howpublished = {paper delivered to the WHO conference}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Unpublished orations, addresses, lectures, and speeches}

%<n|m>\spec{Author, \enquote{Title}, Description.}
%<a|y>\spec{Author (Year), \enquote{Title}, Description.}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{pritchard.pritchard1990ard}
Pritchard, E., and Pritchard, J. (1990), \enquote{A Reply to Drèze}, unpub.\@ paper.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@unpublished{pritchard.pritchard1990ard,
  author = {E. Pritchard and J. Pritchard},
  date = {1990},
  title = {A Reply to Drèze},
  howpublished = {unpub.\@ paper}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>


\chapter{Grey literature}\label{sec:report}
\chapterprecis{booklet, manual, patent, report, thesis, standard}

\section{One-off reports}

%<n|m>\spec{Author, \emph{Title} (Location: Institution, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location: Institution).}

\begin{bibexbox}
%<n|m><OGS \S15.2.13>
%<a|y><OGS \S15.2.13\textdagger>
{botswana1980hdr}
%<n|m>Government of Botswana, \emph{A Human Drought Relief Programme for Botswana} (Gabarone: Ministry of Local Government and Lands, 1980).
%<a|y>Government of Botswana (1980), \emph{A Human Drought Relief Programme for Botswana} (Gabarone: Ministry of Local Government and Lands).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@report{botswana1980hdr,
  author = {{Government of Botswana}},
  title = {A Human Drought Relief Programme for Botswana},
  location = {Gabarone},
  institution = {Ministry of Local Government and Lands},
  date = {1980}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the report does not specify an author, give the publishing institution in the \texttt{author} field.
  Some examples in the \emph{Oxford Guide to Style} repeat the institution in the publisher slot
  (i.e.\@ the \texttt{institution} field) and some do not.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.13>
{pac1988upt}
Penal Affairs Consortium, \emph{An Unsuitable Place for Treatment: Diverting Mentally Disordered Offenders from Custody} (London, 1988).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@report{pac1988upt,
  author = {{Penal Affairs Consortium}},
  title = {An Unsuitable Place for Treatment},
  subtitle = {Diverting Mentally Disordered Offenders from Custody},
  location = {London},
  date = {1988}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S18.8.5>
{unesco2012unw}
UNESCO, \emph{The United Nations World Water Development Report 4}, vol. 1: \emph{Managing Water under Uncertainty and Risk} (Paris: UNESCO, 2012), \url{http://unesdoc.unesco.org/images/0021/002156/215644e.pdf}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@report{unesco2012unw,
  author = {UNESCO},
  maintitle = {The United Nations World Water Development Report 4},
  volume = {1},
  title = {Managing Water under Uncertainty and Risk},
  location = {Paris},
  institution = {UNESCO},
  date = {2012},
  url = {http://unesdoc.unesco.org/images/0021/002156/215644e.pdf},
  urldate = {2013-11-09}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.9.1>
{who1986nde}
WHO (World Health Organization) (1986), \emph{Nutrition and Development in East Africa} (Geneva: WHO)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{who1986nde,
  author = {{World Health Organization}},
  shortauthor = {WHO},
  title = {Nutrition and Development in {East Africa}},
  date = {1986},
  location = {Geneva},
  institution = {WHO}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S17.3.2*>
{cnnr2008tut}
CNNR/GMH (Comisión Nacional de Reparación y Reconciliación y Grupo de Memoria Historica) (2008), \emph{Trujilla: Una Tragedia que no Cesa} [\emph{Trujilla: A Tragedy Without End}] (Bogotá, Columbia: CNRR).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{cnnr2008tut,
  shortauthor = {CNNR/GMH},
  author = {{Comisión Nacional de Reparación y Reconciliación y Grupo de Memoria Historica}},
  date = {2008},
  title = {Trujilla},
  subtitle = {Una Tragedia que no Cesa},
  titleaddon = {\printtext[title]{{Trujilla:} {A} Tragedy Without End}},
  location = {Bogotá, Columbia},
  institution = {CNRR}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Reports with a type or series}

\tip{The number of a report will only be printed if you also supply a type or
  series, or both. The difference between the two is that the series will be
  separated from the (type and) number by a comma, while only a space
  separates the type and number. In addition, if you supply a series but no
  type, the number will be prefixed by `No.\@' or the localized equivalent.}

%<n|m>\spec{Author, \emph{Title}, Series, Type Number (Location: Institution, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, Series, Type Number (Location: Institution).}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{opcs1979amt}
%<a>Office of Population Censuses and Surveys (1979),
%<y>Office of Population Censuses and Surveys (1979\emph{a}),
\emph{Area Mortality Tables: The Registrar-General's Decennial Supplement for England and Wales 1969–1973}, Series DS, No.~3 (London)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{opcs1979amt,
  author = {{Office of Population Censuses and Surveys}},
  date = {1979},
  title = {Area Mortality Tables},
  subtitle = {The Registrar-General's Decennial Supplement for England and Wales 1969–1973},
  series = {Series DS},
  number = {3},
  location = {London}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.19.2>
{opcs1979pnc}
%<a>Office of Population Censuses and Surveys (1979),
%<y>Office of Population Censuses and Surveys (1979\emph{b}),
\emph{Projections of the New Commonwealth and Pakistani Population}, OPCS Monitor PP2 79/1 (London)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{opcs1979pnc,
  author = {{Office of Population Censuses and Surveys}},
  date = {1979},
  title = {Projections of the {New Commonwealth} and {Pakistani} Population},
  type = {OPCS Monitor},
  number = {PP2 79/1},
  location = {London}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the name of the series consists of the institution name and a type, it may make more sense to give the institution name in \code{series} rather than \code{institution}.}

\begin{bibexbox}(hacked)<NHR \S17.3.2*>
{rosenblatt.etal1988cap}
Rosenblatt, J., et al. (1988), \emph{The Common Agricultural Policy of the European Community}, International Monetary Fund, occasional paper 62 (Nov.)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{rosenblatt.etal1988cap,
  author = {Julius Rosenblatt and others},
  title = {The {Common Agricultural Policy} of the {European Community}},
  date = {1988-11},
  series = {International Monetary Fund},
  type = {occasional paper},
  number = {62}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>%

\section{Jointly published reports}

It is more common with reports than with books for a work to be branded
jointly by several issuing organizations. Neither the \emph{Oxford Guide to
Style} nor \emph{New Hart's Rules} give explicit guidance on this, but I
suggest handling it by giving corresponding lists as the \code{location}
and \code{institution}:

\begin{tcblisting}{listing only}
  location = {Place 1 and Place 2 and Place 3},
  institution = {Organization 1 and Organization 2 and Organization 3},
\end{tcblisting}

This will be printed as follows:

\begin{tcolorbox}
(Place 1: Organization 1, Place 2: Organization 2, and Place 3: Organization 3)
\end{tcolorbox}

\section{Theses}

%<n|m>\spec{Author, \enquote{Title}, Type (Institution, Year).}
%<a|y>\spec{Author (Year), \enquote{Title}, Type (Institution).}

\begin{bibexbox}
%<n|m><OGS \S15.5.1>
%<a|y><OGS \S15.5.1\textdagger>
{blackburn1970tlp}
%<n|m>Bonnie J. Blackburn, \enquote{The Lupus Problem}, Ph.D. diss. (University of Chicago, 1970).
%<a|y>Blackburn, B. J. (1970), \enquote{The Lupus Problem}, Ph.D. diss. (University of Chicago).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@thesis{blackburn1970tlp,
  author = {Bonnie J. Blackburn},
  title = {The Lupus Problem},
  type = {Ph.D. diss.},
  institution = {University of Chicago},
  date = {1970}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

The following forms are also supported; to use them, pass the \key{thesis} option:

\begin{itemize}
  \item \key{thesis}\texttt{=}\val{in}\par
%<n|m>\spec{Author, \enquote{Title} (Type, Institution, Year).}
%<a|y>\spec{Author (Year), \enquote{Title} (Type, Institution).}
  \item \key{thesis}\texttt{=}\val{plain}\par
%<n|m>\spec{Author, \enquote{Title}, Type, Institution, Year.}
%<a|y>\spec{Author (Year), \enquote{Title}, Type, Institution.}
\end{itemize}

\section{Booklets, leaflets, and other formal but unpublished texts}

There are no obvious examples of this kind of material in the \emph{Oxford Guide
to Style} or \emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

\begin{bibexbox}
{msbh1921fvd}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@booklet{msbh1921fvd,
  title = {The Facts about Venereal Diseases},
  date = {1921},
  howpublished = {distributed by the Missouri State Board of Health, Division of Venereal Diseases},
  location = {Jefferson City, MO}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{lloyds2015m}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@booklet{lloyds2015m,
  author = {{Lloyds TSB Bank plc}},
  title = {Mortgages},
  date = {2015},
  howpublished = {obtained in Paisley branch}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Patents}

There are no examples of patents in the \emph{Oxford Guide to Style} or
\emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

Following the conventions from \pkg{biblatex-chicago}, use \texttt{origdate} for
the date the patent was filed (or the application was published), and
\texttt{date} for the date the patent was finally issued or published.

\tip{You can override the default date descriptions with the (non-standard)
\code{origdatetype} and \code{datetype} fields.}

\begin{bibexbox}
{petroff.stapelbroek1980bib}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{petroff.stapelbroek1980bib,
  author = {Petroff, M.~D. and Stapelbroek, M.~G.},
  title = {Blocked impurity band detectors},
  date = {1986-02-04},
  origdate = {1980-10-23},
  type = {patentus},
  number = {4,586,960},
  location = {Washington, DC},
  publisher = {U.S. Patent and Trademark Office}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{arduengo.etal2001pmi}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{arduengo.etal2001pmi,
  author = {Arduengo, III, Anthony J. and Gentry, Jr., Frederick P.
    and Taverkere,  Prakash~K. and Simmons, III, Howard E.},
  title = {Process for manufacture of imidazoles},
  year = {2001},
  type = {patentus},
  holder = {{E.~I. DuPont}},
  number = {6177575}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{pm1981opa}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{pm1981opa,
  author = {{Phillipp Morris Inc.}},
  title = {Optical perforating apparatus and system},
  origdate = {1981-01-07},
  date = {1985-05-15},
  type = {patenteu},
  number = {EP0021165}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{hideki1992qmc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{hideki1992qmc,
  author = {U. Hideki},
  title = {Quadrature Modulation Circuit},
  type = {patentjp},
  number = {152932/92},
  date = {1992-05-20}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Standards}

There are no examples of technical standards in the \emph{Oxford Guide
to Style} or \emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

The particular quirk with standards entries is that the number is promoted to
the head of the reference if an author is not specified (or \key{useauthor} is
\val{false}). If this happens, the number is copied to \code{sortkey} so the
entry appears in the right place in the reference list, unless you get there
first with your own value of \code{sortkey}. You may want to do this if, for
example, you want \enquote{ISO 1000} to come after \enquote{ISO 999}.

\tip{You are encouraged to put the standards body in \code{organization}, but
  you can use \code{publisher} instead.}

\tip{The examples don't demonstrate it, but you can use the \code{version} field
  for the version of the standard.}

\begin{bibexbox}
{bs5605:1990}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{bs5605:1990,
  sortyear = {1990},
  title = {Recommendations for citing and referencing published material},
  number = {BS~5605:1990},
%<!n&!m&!y>  shorthand = {BS5605},
  organization = {British Standards Institute}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\begin{egcite}{}
\cite{bs5605:1990}
\end{egcite}
%</y>

\begin{bibexbox}
{w3c2017html5.2}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{w3c2017html5.2,
  title = {{HTML} 5.2},
  editor = {Steve Faulkner and Arron Eicholz and Travis Leithead and
    Alex Danilo and Sangwhan Moon},
  date = {2017-12-14},
  type = {W3C Recommendation},
  organization = {World Wide Web Consortium},
  url = {https://www.w3.org/TR/html52/},
  urldate = {2018-02-17}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{ietf.rfc1155}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{ietf.rfc1155,
  author = {M. T. Rose and K. McCloghrie},
  title = {Structure and identification of management information for {TCP/IP}-based internets},
  date = {1990-05},
  organization = {Internet Engineering Task Force},
  series = {Request for Comments},
  type = {Internet Standard},
  number = {RFC~1155/STD~16},
  doi = {10.17487/RFC1155}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Audiovisual materials}\label{sec:audiovideo}
\chapterprecis{artwork, audio, inaudio, image, movie, music, inmusic, performance, video}

There are typically many contributors to an audiovisual work, and the priority given to each role is fluid. \pkg[biblatex]{Oxref} uses \code{author} for contributors that should go at the head of the reference, and \code{editor} for others. As well as the normal ones you can use the author\slash editor types \code{performer}, \code{conductor}, \code{director} and \code{reader}.

\section{Audio recordings}

The basic structure of audio recording entries is as follows:

%<n|m>\spec{Composer, \emph{Title}, Artist, RecordingDate (RecordingCompany Type Number, PublicationDate) [Medium].}
%<a|y>\spec{Composer (RecordingYear), \emph{Title}, Artist, RecordingDate (RecordingCompany Type Number, PublicationDate) [Medium].}

If the composer's name is not of interest, it may be omitted or replaced by the artist's name.
%<y>In the absence of examples to the contrary, \textsf{oxyear} uses the year of recording at the head of the reference if available, otherwise it uses the year of publication.

\tip{Use \code{origdate} to specify the date of recording. If you want it to be introduced by something other than the localized string \enquote{recorded}, use the (non-standard) \code{origdatetype} field%
%<y>, though this will be suppressed if only the year is given%
.}

The \emph{Oxford Guide to Style} offers several ways of expressing the recording company:

\begin{itemize}
\item
  a simple label name – e.g.\@ \enquote{Columbia}, \enquote{Hyperion}, \enquote{Archiv} – followed immediately by the type or number
\item
  a label name separated from the number by a comma, e.g.\@ \enquote{Valois,}
  \enquote{EMI Electrola,} \enquote{EMI Blues Series,}
\item
  a compiling organization, semicolon, publishing company, no comma, e.g.\@ \enquote{Smithsonian Institution; Columbia}
\item
  a publishing company, colon, label name, comma, e.g.\@ \enquote{Decca Record Company, Ltd.: Éditions de l'Oiseau-lyre,}
\item
  a publishing company, comma, location, comma, e.g.\@ \enquote{Christophorus-Verlag Herder, Freiburg im Breisgau,}
\end{itemize}

\emph{New Hart's Rules} sticks firmly with the first of these, so \pkg[biblatex]{oxref} makes this the easiest choice but provides workarounds to allow you to achieve most of the others if you really need to.

\tip{To get the normal format, put the label name in \code{publisher}, the type of release (e.g.\@ compact disc, audio cassette) in \code{type}, and the catalogue number in \code{number}. In the examples from \emph{New Hart's Rules}, the type is uniformly omitted.}

\tip{To put a comma between the label and the type\slash number, put the label name in \code{series} instead.}

\tip{If you provide both a \code{publisher} and a \code{series}, they will be separated by \cs{recordseriespunct}, which is initially set to \cs{addcomma}\cs{space}. You could set it to \cs{addcolon}\cs{space} instead to match the example.}

\tip{If the compiling organization is distinct from the publisher, put the former in \code{origpublisher}; it will be separated from the publisher by a semicolon.}

\tip{Contrary to the OGS example, but in common with other entry types, the location if provided will be printed before the publisher, separated from it by a colon. (This is why a comma is the default for \cs{recordseriespunct}.) In the absence of a publisher it will be followed by a comma.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{carter1991fsq}
%<n|m>Elliott Carter, \emph{The Four String Quartets}, Juilliard String Quartet (Sony S2K 47229, 1991).
%<a|y>Carter, E. (1991), \emph{The Four String Quartets}, Juilliard String Quartet (Sony S2K 47229).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{carter1991fsq,
  author = {Elliott Carter},
  title = {The Four String Quartets},
  editor = {{Juilliard String Quartet}},
  editortype = {performer},
  publisher = {Sony},
  number = {S2K 47229},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{hillier1989p}
%<n|m>Paul Hillier, \emph{Proensa} (ECM Records compact disc ECM 1368, 1989).
%<a|y>Hillier, P. (1989), \emph{Proensa} (ECM Records compact disc ECM 1368).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{hillier1989p,
  author = {Paul Hillier},
  title = {Proensa},
  publisher = {ECM Records},
  type = {compact disc},
  number = {ECM 1368},
  date = {1989}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{couperin1970pdc}
%<n|m>Francois Couperin, \emph{Pièces de clavecin: Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième ordres}, Huguette Dreyfus (Valois, MB 797, 1970).
%<a|y>Couperin, F. (1970), \emph{Pièces de clavecin: Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième ordres}, H. Dreyfus (Valois, MB 797).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{couperin1970pdc,
  author = {Francois Couperin},
  title = {Pièces de clavecin},
  subtitle = {Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième
    ordres},
  editor = {Huguette Dreyfus},
  editortype = {performer},
  series = {Valois},
  number = {MB 797},
  date = {1970}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{pageNDmn}
%<n|m>\emph{The Mirror of Narcissus: Songs by Guillaume de Machaut}, Gothic Voices, dir. Christopher Page (Hyperion compact disc CDA 66087).
%<a|y>\emph{The Mirror of Narcissus: Songs by Guillaume de Machaut} (n.d.), Gothic Voices, dir. C. Page (Hyperion compact disc CDA 66087).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{pageNDmn,
  title = {The Mirror of Narcissus},
  subtitle = {Songs by Guillaume de Machaut},
  editor = {{Gothic Voices}},
  editortype = {performer},
  editora = {Christopher Page},
  editoratype = {director},
  publisher = {Hyperion},
  type = {compact disc},
  number = {CDA 66087}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To describe the medium in a separate note, use the \texttt{howpublished} field.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2>
%<a|y><NHR \S18.7.2\textdagger>
{hopkinsNDcar}
%<n|m>Lightnin' Hopkins, \emph{The Complete Aladdin Recordings} (EMI Blues Series, CDP-7-96843-2) [2-vol.\@ CD set].
%<a|y>Lightnin' Hopkins (n.d.), \emph{The Complete Aladdin Recordings} (EMI Blues Series, CDP-7-96843-2) [2-vol.\@ CD set].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{hopkinsNDcar,
  author = {{Lightnin’ Hopkins}},
  title = {The Complete Aladdin Recordings},
  series = {EMI Blues Series},
  number = {CDP-7-96843-2},
  howpublished = {2-vol.\@ CD set}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To describe the medium as part of the publication statement, use the \texttt{type} field.}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{lewis1981lww}
%<n|m>C. S. Lewis, \emph{The Lion, the Witch, and the Wardrobe}, read by Sir Michael Hordern (2 audio cassettes, TO1611, 1981).
%<a|y>Lewis, C. S. (1981), \emph{The Lion, the Witch, and the Wardrobe}, read by Sir M. Hordern (2 audio cassettes, TO1611).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{lewis1981lww,
  author = {C. S. Lewis},
  title = {The Lion, the Witch, and the Wardrobe},
  editor = {title=Sir, given=Michael, family=Hordern},
  editortype = {reader},
  type = {2 audio cassettes},
  number = {TO1611},
  date = {1981}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Combination releases}

Sometimes publishers will put several works on a single release without giving it an overall title.

\tip{Put the subsequent composer\slash title combinations in new entries, and relate them with a \code{relatedtype} of \code{includes}.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{dutilleux1987as}
%<n|m>Henri Dutilleux, \emph{L'Arbre des songes}, and Peter Maxwell Davies, \emph{Concerto for Violin and Orchestra}, Royal Philharmonic Orchestra, cond. André Previn, violin Isaac Stern (CBS MK 42449, 1987).
%<a|y>Dutilleux, H. (1987), \emph{L'Arbre des songes}, and Maxwell Davies, P., \emph{Concerto for Violin and Orchestra}, Royal Philharmonic Orchestra, cond. A. Previn, violin I. Stern (CBS MK 42449).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{dutilleux1987as,
  author = {Henri Dutilleux},
  title = {L'Arbre des songes},
  related = {maxwelldavies1987},
  relatedtype = {includes},
  editor = {{Royal Philharmonic Orchestra}},
  editortype = {performer},
  editora = {André Previn},
  editoratype = {conductor},
  editorb = {Isaac Stern},
  editorbtype = {violin},
  publisher = {CBS},
  number = {MK 42449},
  date = {1987}}
@audio{maxwelldavies1987,
  author = {Maxwell Davies, Peter},
  title = {Concerto for Violin and Orchestra},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\hack{Only the primary work will show up in citations; the subsequent ones will not.
  If this is not what you want, you will need to use \code{shortauthor}\slash\code{shorttitle} or \code{shorthand}, or build up the citation manually with \cs{citeauthor} and the like.}

\info{Depending on the thrust of your document, you could remove the complication by shifting the composers into the title and putting the performers in the author position.}

\info{If you are only interested in one of the works in the release, you might be better off using the \code{inaudio} entry type instead (see below).}


\subsection{Tracks from an album}

\tip{Use the non-standard entry types \code{inaudio} or \code{inmusic} to reference a single work within an album. Use \code{booktitle} (somewhat loosely) for the album title.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{davis1997sw}
%<n|m>Miles Davis et al., \enquote{So What}, in \emph{Kind of Blue}, rec. 1959 (Columbia CK 64935, 1997) [CD].
%<a|y>Davis, M., et al. (1959), \enquote{So What}, in \emph{Kind of Blue} (Columbia CK 64935, 1997) [CD].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inaudio{davis1997sw,
  author = {Miles Davis and others},
  title = {So What},
  booktitle = {Kind of Blue},
  origdate = {1959},
  origdatetype = {rec\adddot},
  publisher = {Columbia},
  number = {CK 64935},
  date = {1997},
  howpublished = {CD}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{Note the use of \code{origdate} for the date of recording in this example.}


\section{Video recordings}

%<n|m>\spec{\emph{Title} (Publisher, Number, Year).}
%<a|y>\spec{\emph{Title} (Year) (Publisher, Number).}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{bbc1987ava}
%<n|m>\emph{The Ashes: Victory in Australia} (BBCV 4040, 1987).
%<a|y>\emph{The Ashes: Victory in Australia} (1987) (BBCV 4040).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{bbc1987ava,
  title = {The {Ashes}},
  subtitle = {Victory in {Australia}},
  publisher = {BBCV},
  number = {4040},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\enquote{EpisodeTitle}, \emph{SeriesTitle} \lit{series} (Publisher, Number, Year).}
%<a|y>\spec{\enquote{EpisodeTitle} (Year), \emph{SeriesTitle} \lit{series} (Publisher, Number).}

\tip{For an episode in a series, set the \code{entrysubtype} to \code{episode} and put the series name in \code{maintitle}.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{britt1986pho}
%<n|m>\enquote{Percy and Harold and Other Stories}, \emph{Thomas the Tank Engine and Friends \textup{series}} (Britt Allcroft 5-014861-100224, 1986).
%<a|y>\enquote{Percy and Harold and Other Stories} (1986), \emph{Thomas the Tank Engine and Friends \textup{series}} (Britt Allcroft 5-014861-100224).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{britt1986pho,
  entrysubtype = {episode},
  title = {{Percy} and {Harold} and Other Stories},
  maintitle = {Thomas the Tank Engine and Friends \textup{series}},
  publisher = {Britt Allcroft},
  number = {5-014861-100224},
  date = {1986}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Director (\lit{dir.}), \emph{Title} (Publisher, Number, Year).}
%<a|y>\spec{Director (Year) (\lit{dir.}), \emph{Title} (Publisher, Number).}

\tip{Use the \texttt{author} field to place a credit at the head of the reference.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{chaplin1936mt}
%<n|m>Charles Chaplin (dir.), \emph{Modern Times} (United Artists, 1936).
%<a|y>Chaplin, C. (1936) (dir.), \emph{Modern Times} (United Artists).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{chaplin1936mt,
  author = {Charles Chaplin},
  authortype = {director},
  title = {Modern Times},
  publisher = {United Artists},
  date = {1936}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\emph{Title}, \lit{dir.} Director (Publisher, Number, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{dir.} Director (Publisher, Number).}

\tip{Use the \texttt{editor} field to place a credit after the title.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{reiner1983tst}
%<n|m>\emph{This is Spinal Tap: A Rockumentary by Marti Di Bergi}, dir.\@ Rob Reiner (Embassy Pictures, 1983).
%<a|y>\emph{This is Spinal Tap: A Rockumentary by Marti Di Bergi} (1983), dir.\@ R. Reiner (Embassy Pictures).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{reiner1983tst,
  title = {This is {Spinal} {Tap}},
  subtitle = {A Rockumentary by {Marti} {Di} {Bergi}},
  editor = {Rob Reiner},
  editortype = {director},
  publisher = {Embassy Pictures},
  date = {1983}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\emph{Title} (Publisher, Number, Year), Credit.}
%<a|y>\spec{\emph{Title} (Year) (Publisher, Number), Credit.}

\tip{You can place up to four credits in the editor position, more if any of them correspond to the built-in editor types like \texttt{commentator} or \texttt{translator}.
  If you do supply a lot of credits, the \emph{Oxford Guide to Style} recommends you shift them to the end of the reference.
  You can do this with the \key{endeditor} option.}


\begin{bibexbox}
%<n|m><OGS \S15.14.2*>
%<a|y><OGS \S15.14.2*\textdagger>
{kaurismaki1989lcg}
%<n|m>\emph{Leningrad Cowboys Go America} (Villealfa Filmproductions, 1989), dir.\@ and screenplay by Aki Kaurismäki, story by Sakke Järvenpää, Aki Kaurismäki, and Mato Valtonen.
%<a|y>\emph{Leningrad Cowboys Go America} (1989) (Villealfa Filmproductions), dir.\@ and screenplay by A. Kaurismäki, story by S. Järvenpää, A. Kaurismäki, and M. Valtonen.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{kaurismaki1989lcg,
  title = {Leningrad Cowboys Go America},
  publisher = {Villealfa Filmproductions},
  date = {1989},
  editortype = {dir.\@ and screenplay by},
  editor = {Aki Kaurismäki},
  editoratype = {story by},
  editora = {Sakke Järvenpää and Aki Kaurismäki and Mato Valtonen},
  options = {endeditor}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For an online video, set the \code{entrysubtype} to \code{clip}.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{bbc2013iim}
%<n|m>BBC News, \enquote{Inside India's Mars Mission HQ} [video] (5 Nov. 2013), \url{http://www.bbc.co.uk/news/world-24826253}, accessed 5 Nov. 2013.
%<a|y>BBC News (2013), \enquote{Inside India's Mars Mission HQ} [video] (5 Nov.), \url{http://www.bbc.co.uk/news/world-24826253}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{bbc2013iim,
  entrysubtype = {clip},
  author = {{BBC News}},
  title = {Inside India's Mars Mission HQ},
  date = {2013-11-05},
  url = {http://www.bbc.co.uk/news/world-24826253},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{rubinstein1956rpc}
%<n|m>Arthur Rubinstein, \enquote{Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)} [video], YouTube (recorded 9 Jan. 1956, uploaded 8 Nov. 2011), \url{http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F}, accessed 9 Nov. 2013.
%<a|y>Rubinstein, A. (1956), \enquote{Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)} [video], YouTube (recorded 9 Jan., uploaded 8 Nov. 2011), \url{http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{rubinstein1956rpc,
  entrysubtype = {clip},
  author = {Arthur Rubinstein},
  title = {Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)},
  organization = {YouTube},
  origdate = {1956-01-09},
  date = {2011-11-08},
  datetype = {uploaded},
  url = {http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \texttt{origdate} and, if necessary, the (non-standard) \texttt{origdatetype} field to specify the date of recording or original broadcast. Use the (non-standard) \texttt{datetype} field to clarify the event represented by the publication date.}

\section{Broadcasts}\label{sec:broadcasts}

The \emph{Oxford Guide to Style} prints all information about the transmission, including the date, bare. \emph{New Hart's Rules} tends to put the transmittion date in parentheses, perhaps because (\emph{a}) broadcast is a type of publication, (\emph{b}) episodes in some very long-running series are identified by date alone, and (\emph{c}) it may be important to know which broadcast is referenced since the edits might be different. \pkg[biblatex]{Oxref} sides with the latter.

%<n|m>\spec{\emph{Title}, Channel (Location, Date, Time).}
%<a|y>\spec{\emph{Title} (Year), Channel (Location, Day Month, Time).}

\tip{Put the channel in the \code{organization} field.}

\begin{bibexbox}
%<n|m><OGS \S15.14.3*>
%<a|y><OGS \S15.14.3*\textdagger>
{canal2001ch}
%<n|m>\emph{Un Cœur in Hiver}, Canal+ (Paris, 15 May 2001, 11.40 p.m.).
%<a|y>\emph{Un Cœur in Hiver} (2001), Canal+ (Paris, 15 May, 11.40 p.m.).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{canal2001ch,
  title = {Un Cœur in Hiver},
  organization = {Canal+},
  location = {Paris},
  date = {2001-05-15T23:40:00+02:00}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\enquote{EpisodeTitle}, \emph{SeriesTitle}, \lit{Episode} EpisodeNumber, Channel, Date.}
%<a|y>\spec{\enquote{EpisodeTitle} (Year), \emph{SeriesTitle}, \lit{Episode} EpisodeNumber, Channel, Day Month.}

\tip{If the episode has a true title, the episide descriptor (e.g. \enquote{Episode 1}) goes in the \code{note} field.
  If it doesn't, the episode descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to remove the quote marks.
  Alternatively, use the (non-standard) \code{descriptor} field for the episode descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{berger1972ws}
%<n|m>John Berger, Episode 1, \emph{Ways of Seeing}, BBC (1972), \url{https://www.youtube.com/watch?v=0pDE4VX_9Kk}, accessed 9 Nov. 2013.
%<a|y>Berger, J. (1972), Episode 1, \emph{Ways of Seeing}, BBC, \url{https://www.youtube.com/watch?v=0pDE4VX_9Kk}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{berger1972ws,
  entrysubtype = {episode},
  author = {John Berger},
  title = {Episode 1},
  title+an = {=descriptor},
  maintitle = {Ways of Seeing},
  organization = {BBC},
  date = {1972},
  url = {https://www.youtube.com/watch?v=0pDE4VX_9Kk},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Podcasts, video podcasts and webcasts}

\tip{Set the \code{entrysubtype} to \code{podcast} for a podcast.}

\begin{bibexbox}
%<n|m><NHR \S18.7.3>
%<a|y><NHR \S18.7.3\textdagger>
{weldon2010did}
%<n|m>Fay Weldon, interview with Kirsty Young, \emph{Desert Island Discs Archive} [podcast], BBC Radio 4 (9 May 2010), \url{http://www.bbc.co.uk/podcasts/series/dida05/all}.
%<a|y>Weldon, F. (2010), interview with Kirsty Young, \emph{Desert Island Discs Archive} [podcast], BBC Radio 4 (9 May), \url{http://www.bbc.co.uk/podcasts/series/dida05/all}.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{weldon2010did,
  entrysubtype = {podcast},
  author = {Fay Weldon},
  descriptor = {interview with {Kirsty Young}},
  maintitle = {Desert Island Discs Archive},
  organization = {BBC Radio 4},
  date = {2010-05-09},
  url = {http://www.bbc.co.uk/podcasts/series/dida05/all}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{perry2013ifm}
%<n|m>Grayson Perry, \enquote{I Found Myself in the Art World} [podcast], Reith Lecture, BBC Radio 4 (5 Nov. 2013), \url{http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3}, accessed 5 Nov. 2013.
%<a|y>Perry, G. (2013), \enquote{I Found Myself in the Art World} [podcast], Reith Lecture, BBC Radio 4 (5 Nov.), \url{http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{perry2013ifm,
  entrysubtype = {podcast},
  author = {Grayson Perry},
  title = {I Found Myself in the Art World},
  note = {Reith Lecture},
  date = {2013-11-05},
  organization = {BBC Radio 4},
  url = {http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{I am not sure why \emph{New Hart's Rules} places the channel after the date in the above case; it is probably a mistake or an odd variation, so I have adjusted it for consistency.}

\tip{As for other online videos, set the \code{entrysubtype} to \code{clip} for a video podcast.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{nicholson2011qsm}
%<n|m>Christie Nicholson, \enquote{A Quirk of Speech May Become a New Vocal Style} [video], \emph{Scientific American} (17 Dec. 2011), \url{http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17}, accessed 4 Nov. 2013.
%<a|y>Nicholson, C. (2011), \enquote{A Quirk of Speech May Become a New Vocal Style} [video], \emph{Scientific American} (17 Dec.), \url{http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17}, accessed 4 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{nicholson2011qsm,
  entrysubtype = {clip},
  author = {Christie Nicholson},
  title = {A Quirk of Speech May Become a New Vocal Style},
  organization = {\emph{Scientific American}},
  date = {2011-12-17},
  url = {http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17},
  urldate = {2013-11-04}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{The above is actually an episode of the audio podcast \emph{60-Second Mind} (which would be the \code{maintitle}).
  \emph{Scientific American} is in this instance the \code{organization} that is hosting it, but because it is also the name of a journal, it has been manually formatted to match.}

\tip{Perhaps a better way of achieiving consistency in this case would be to treat it like an article, and clarify the medium (i.e.\@ video, erroneously) using the \texttt{titleaddon} field.}

\tip{Set the \code{entrysubtype} to \code{webcast} for a webcast.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{yousafzai2013mwa}
%<n|m>Malala Yousafzai, \enquote{Making a Wish for Action on Global Education: Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013} [webcast], UN Web TV (12 July 2013), \url{http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala}, accessed 15 Feb. 2015.
%<a|y>Yousafzai, M. (2013), \enquote{Making a Wish for Action on Global Education: Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013} [webcast], UN Web TV (12 July), \url{http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala}, accessed 15 Feb. 2015.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{yousafzai2013mwa,
  entrysubtype = {webcast},
  author = {Malala Yousafzai},
  title = {Making a Wish for Action on Global Education},
  subtitle = {Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013},
  organization = {UN Web TV},
  date = {2013-07-12},
  url = {http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala},
  urldate = {2015-02-15}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Images and works of art}

\tip{If you need the type of image or artwork to appear in square brackets,
  put it in \code{titleaddon}. Otherwise, put it in \code{type}.}

\tip{Use \code{institution} (a list) or \code{venue} (a literal) for the
  organization, museum, gallery or building physically hosting the image, and
  \code{location} for where it is.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{clarkeNDeci}
%<n|m>M. Clarke, \enquote{Exports of Coal to the IFS} [poster], Manchester Art Gallery, \url{http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128}, accessed 5 Nov. 2013.
%<a|y>Clarke, M. (n.d.), \enquote{Exports of Coal to the IFS} [poster], Manchester Art Gallery, \url{http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@image{clarkeNDeci,
  author = {M. Clarke},
  title = {Exports of Coal to the IFS},
  titleaddon = {poster},
  institution = {Manchester Art Gallery},
  url = {http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \code{organization} for the website or online location of the image.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{ibwNDcgs}
%<n|m>\enquote{Christ the Good Shepherd}, stained glass window, Church of St Erfyl, Llanerfyl, Powys, Imaging the Bible in Wales Database, \url{http://imagingthebible.llgc.org.uk/object/1884}, accessed 10 Nov. 2013.
%<a|y>\enquote{Christ the Good Shepherd} (n.d.), stained glass window, Church of St Erfyl, Llanerfyl, Powys, Imaging the Bible in Wales Database, \url{http://imagingthebible.llgc.org.uk/object/1884}, accessed 10 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@image{ibwNDcgs,
  title = {Christ the Good Shepherd},
  type = {stained glass window},
  venue = {Church of St Erfyl},
  location = {Llanerfyl, Powys},
  organization = {Imaging the Bible in Wales Database},
  url = {http://imagingthebible.llgc.org.uk/object/1884},
  urldate = {2013-11-10}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{davinci1480mr}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{davinci1480mr,
  author = {given=Leonardo, family=da Vinci},
  title = {Madonna of the Rocks},
  type = {oil on canvas},
  note = {78 x 48.5 in\adddot},
  year = {1480s},
  date+an = {=inferred},
  institution = {Louvre},
  location = {Paris}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{gormley1998an}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{gormley1998an,
  author = {Anthony Gormley},
  title = {Angel of the {North}},
  date = {1998},
  type = {sculpture},
  location = {Low Fell, Gateshead}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{rodin1882k}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{rodin1882k,
  author = {Auguste Rodin},
  title = {The Kiss},
  date = {1882},
  type = {marble},
  institution = {Musée Rodin},
  location = {Paris}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Performances}

\tip{Use \code{origdate} for the date when the play, ballet, opera, or whatever
  was written or premièred, and \code{date} for the date of the performance you
  are referencing. You can specify what these dates signify with the
  (non-standard) \code{origdatetype} and \code{datetype} fields. You can also
  use \code{eventdate} in place of \code{date}, but then you won't be able to
  specify the type.}

\tip{As for recordings, you can use the \code{author} and \code{editor} fields
  to provide various credits. As for artworks, use \code{venue} and
  \code{location} for where the performance occurred, and \code{organization}
  for a website or organization hosting a recording of the performance online.}

\begin{bibexbox}
{ashton1937wb}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{ashton1937wb,
  author = {Frederick Ashton},
  origdate = {1937},
  title = {A Wedding Bouquet},
  venue = {Royal Opera House},
  location = {London},
  date = {2004-10-22}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{lord2007dc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{lord2007dc,
  author = {Jon Lord},
  date = {2007-10-20},
  title = {Durham Concerto},
  editor = {{Liverpool Philharmonic Orchestra}},
  editortype = {performer},
  editora = {Mischa Damev},
  editoratype = {conductor},
  venue = {Durham Cathedral},
  location = {Durham}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{judge1995mnd}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{judge1995mnd,
  options = {useauthor=false,useeditor=false},
  author = {William Shakespeare},
  title = {A Midsummer Night's Dream},
  editor = {Ian Judge},
  editortype = {director},
  date = {1995-02-26},
  venue = {Theatre Royal},
  location = {Newcastle upon Tyne}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\chapter{Digital media}\label{sec:electronic}
\chapterprecis{online, software, dataset}

In Section 18.8.5 of \emph{New Hart's Rules}, some publication dates are printed in parentheses and some are left bare.
In theory, the difference should be that parentheses indicate \enquote{proper} publication (bare dates are when the resource was created or issued). In practice, it seems to be random. I have therefore decided to ignore the variation and leave all such dates in parentheses.

\section{Website articles}

Standard \textsf{biblatex} only provides for one title for online resources, which is fine for whole websites but not if you want to cite one page or article within a website.

\tip{If the piece is unsigned, put the site name in the \code{author} field.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{bbc2013cgh}
%<n|m>BBC News, \enquote{Colchester General Hospital: Police Probe Cancer Treatment} (5 Nov. 2013), \url{http://www.bbc.co.uk/news/uk-england-essex-24819973}, accessed 5 Nov. 2013.
%<a|y>BBC News (2013), \enquote{Colchester General Hospital: Police Probe Cancer Treatment} (5 Nov.), \url{http://www.bbc.co.uk/news/uk-england-essex-24819973}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{bbc2013cgh,
  author = {{BBC News}},
  title = {Colchester General Hospital},
  subtitle = {Police Probe Cancer Treatment},
  date = {2013-11-05},
  url = {http://www.bbc.co.uk/news/uk-england-essex-24819973},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the piece is signed, put the site name in the \code{organization} field.
  The rationale is that \textsf{biblatex} uses this for the organization hosting the site,
  and it can get a bit blurry between that and the name of the site itself.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{hooper2013lfs}
%<n|m>Richard Hooper, \enquote{Lebanon's Forgotten Space Programme}, BBC News Magazine (14 Nov. 2013), \url{http://www.bbc.co.uk/news/magazine-24735423}, accessed 14 Nov. 2013.
%<a|y>Hooper, R. (2013), \enquote{Lebanon's Forgotten Space Programme}, BBC News Magazine (14 Nov.), \url{http://www.bbc.co.uk/news/magazine-24735423}, accessed 14 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{hooper2013lfs,
  author = {Richard Hooper},
  title = {Lebanon's Forgotten Space Programme},
  organization = {BBC News Magazine},
  date = {2013-11-14},
  url = {http://www.bbc.co.uk/news/magazine-24735423},
  urldate = {2013-11-14}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{tan2013wdt}
%<n|m>Siu-Lan Tan, \enquote{Why does this Baby Cry when her Mother Sings?} [including video], OUPblog (5 Nov. 2013), \url{http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/}, accessed 9 Nov. 2013.
%<a|y>Tan, S.-L. (2013), \enquote{Why does this Baby Cry when her Mother Sings?} [including video], OUPblog (5 Nov.), \url{http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{tan2013wdt,
  author = {Siu-Lan Tan},
  title = {Why does this Baby Cry when her Mother Sings?},
  titleaddon = {including video},
  organization = {OUPblog},
  date = {2013-11-05},
  url = {http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{allaby2013fll}
%<n|m>Michael Allaby, \enquote{Feathers and Lava Lamps}, Oxford Reference (2013), \url{http://www.oxfordreference.com/page/featherslavalamps}, accessed 9 Nov. 2013.
%<a|y>Allaby, M. (2013), \enquote{Feathers and Lava Lamps}, Oxford Reference, \url{http://www.oxfordreference.com/page/featherslavalamps}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{allaby2013fll,
  author = {Michael Allaby},
  title = {Feathers and Lava Lamps},
  organization = {Oxford Reference},
  date = {2013},
  url = {http://www.oxfordreference.com/page/featherslavalamps},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the site looks more like a traditional journal (e.g.\@ with an ISSN), use the \code{article} entry type instead of \code{online}.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{mcewen2013tte}
%<n|m>Stephen McEwen, \enquote{Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}}, \emph{The Spectator} (20 May 2013), \url{http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/}, accessed 9 Nov. 2013.
%<a|y>McEwen, S. (2013), \enquote{Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}}, \emph{The Spectator} (20 May), \url{http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{mcewen2013tte,
  author = {Stephen McEwen},
  title = {Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}},
  journaltitle = {The Spectator},
  date = {2013-05-20},
  options = {varissuedate=false},
  url = {http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Online reference article}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{eb2013gp}
%<n|m>\enquote{Gunpowder Plot}, \emph{Encyclopaedia Britannica}, \url{http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot}, accessed 5 Nov. 2013.
%<a|y>\enquote{Gunpowder Plot} (n.d.), \emph{Encyclopaedia Britannica}, \url{http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{eb2013gp,
  title = {Gunpowder Plot},
  maintitle = {Encyclopaedia Britannica},
  url = {http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Unlike standard \textsf{biblatex}, \pkg[biblatex]{oxref} supports \code{maintitle} for online entries and prints the result in italics. For more portability, you could either hard-code the italics into the \code{organization} field or use the \code{article} entry type.}

\info{It is not made explicit why \emph{Encyclopaedia Britannica} is in italics and \emph{Wikipedia} is not.
  It might be historical or customary, because \emph{Encyclopaedia Britannica} was established as a print publication and \emph{Wikipedia} has only been online;
  it might be because \emph{Encyclopaedia Britannica} is a Latin title;
  it might reflect an opinion on the two resources;
  or it may just be illustrative of variant practice.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{wp2013oup}
%<n|m>\enquote{Oxford University Press}, Wikipedia (last modified 5 Nov. 2013), \url{http://en.wikipedia.org/wiki/Oxford_University_Press}, accessed 5 Nov. 2013.
%<a|y>\enquote{Oxford University Press} (2013), Wikipedia (last modified 5 Nov.), \url{http://en.wikipedia.org/wiki/Oxford_University_Press}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{wp2013oup,
  title = {Oxford University Press},
  organization = {Wikipedia},
  date = {2013-11-05},
  datetype = {modified},
  url = {http://en.wikipedia.org/wiki/Oxford_University_Press},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the (non-standard) \texttt{datetype} field to clarify the event represented by the main date.}


\section{Social media}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{obama2013tvd}
%<n|m>Barack Obama, \enquote{Tomorrow is Veterans Day} [Facebook post] (10 Nov. 2013), \url{https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/}, accessed 13 Nov. 2013.
%<a|y>Obama, B. (2013), \enquote{Tomorrow is Veterans Day} [Facebook post] (10 Nov.), \url{https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/}, accessed 13 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{obama2013tvd,
  entrysubtype = {facebook},
  author = {Barack Obama},
  title = {Tomorrow is Veterans Day},
  date = {2013-11-10},
  url = {https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/},
  urldate = {2013-11-13}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{harvey2013tfm}
%<n|m>John Harvey, \enquote{\enquote{These are a Few of My Favourite Things}, No.~28} [Facebook post] (13 Nov. 2013), \url{https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre}, accessed 13 Nov. 2013.
%<a|y>Harvey, J. (2013), \enquote{\enquote{These are a Few of My Favourite Things}, No.~28} [Facebook post] (13 Nov.), \url{https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre}, accessed 13 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{harvey2013tfm,
  entrysubtype = {facebook},
  author = {John Harvey},
  title = {\enquote{These are a Few of My Favourite Things}, No.~28},
  date = {2013-11-13},
  url = {https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre},
  urldate = {2013-11-13}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{globe2013otd}
%<n|m>Shakespeare's Globe, \enquote{On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I} [Twitter post] (5.48~a.m., 1~Nov. 2013), \url{https://twitter.com/The_Globe/status/396257422928400385}, accessed 5 Nov. 2013.
%<a|y>Shakespeare's Globe (2013), \enquote{On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I} [Twitter post] (5.48~a.m., 1~Nov.), \url{https://twitter.com/The_Globe/status/396257422928400385}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{globe2013otd,
  entrysubtype = {tweet},
  author = {{Shakespeare's Globe}},
  title = {On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I},
  date = {2013-11-01T05:48:00},
  options = {timefirst},
  url = {https://twitter.com/The_Globe/status/396257422928400385},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If it feels odd putting the entire content of a tweet in your reference, \emph{New Hart's Rules} suggests using a descriptor like \enquote{Twitter post} instead of the title. As described in \cref{sec:broadcasts}, you can do this either by annotating the title field with the keyword \code{descriptor} or by using the (non-standard) \code{descriptor} field in place of \code{title}.}

\begin{bibexbox}
{oup2015tweet}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{oup2015tweet,
  author = {{Oxford University Press}},
  shortauthor = {OUP},
  descriptor = {Twitter post},
  date = {2015-11-16T01:07:00},
  url = {https://twitter.com/OxUniPress/status/666180787251843072},
  urldate = {2015-12-25}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Software}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{simoga1.1d6}
%<n|m>Simoga, \emph{Device 6} (version 1.1) [mobile application for iPhone and iPad], downloaded 9 Nov. 2013.
%<a|y>Simoga (n.d.), \emph{Device 6} (version 1.1) [mobile application for iPhone and iPad], downloaded 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@software{simoga1.1d6,
  author = {Simoga},
  title = {Device 6},
  version = {1.1},
  titleaddon = {mobile application for iPhone and iPad},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{eliot1.1.1twl}
%<n|m>T. S. Eliot, \emph{The Waste Land} (version 1.1.1) [mobile application for iPad] (London: Touch Press, 2013), downloaded 9 Nov. 2013.
%<a|y>Eliot, T. S. (2013), \emph{The Waste Land} (version 1.1.1) [mobile application for iPad] (London: Touch Press), downloaded 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@software{eliot1.1.1twl,
  author = {T. S. Eliot},
  title = {The Waste Land},
  version = {1.1.1},
  titleaddon = {mobile application for iPad},
  location = {London},
  publisher = {Touch Press},
  date = {2013},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Database}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{un2011wpp}
%<n|m>United Nations, \emph{World Population Prospects: The 2010 Revision} [CD-ROM] (New York: United Nations Department of Economic and Social Affairs, Population Division, 2011).
%<a|y>United Nations (2011), \emph{World Population Prospects: The 2010 Revision} [CD-ROM] (New York: United Nations Department of Economic and Social Affairs, Population Division).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@dataset{un2011wpp,
  author = {{United Nations}},
  title = {World Population Prospects},
  subtitle = {The 2010 Revision},
  titleaddon = {CD-ROM},
  location = {New York},
  publisher = {{United Nations Department of Economic and Social Affairs, Population Division}},
  date = {2011}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Legal references}\label{sec:legal}
\chapterprecis{commentary, jurisdiction, legal, legislation}

\pkg[biblatex]{Oxref} provides only a basic level of support for legal references, in case you need to use some in a mainly non-legal text.
For a more thorough and robust treatment, intended for a specialist readership, I recommend you use the \pkg{oscola} style instead.

Since there is a family resemblence between the \emph{Oxford Guide to Style\slash New Hart's Rules}
and the \emph{Oxford Standard for the Citation of Legal Authorities},
\pkg[biblatex]{oxref} largely mimics \pkg{oscola} and its data model, though there are some small formatting differences.
What you should \emph{not} expect from \pkg[biblatex]{oxref} are facilities for compiling specialist indices of sources,
or anything special regarding the handling of postnotes.

\pkg[biblatex]{Oxref} follows \pkg{oscola} in stripping out abbreviation dots from most fields using regular expressions,
but if you want to retain a dot that it strips, you can do so by writing it \verb|{.}|, \cs{adddot} or \cs{addotspace}.

%<y>Since legal references are usually cited using footnotes, how \textsf{oxyear} should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with \textsf{oxnotes}, and citations will typically be title–year using parentheses in the usual way. I am open to suggestions for how to handle things better.

\section{Cases}

\subsection{Reported cases}

Use the \code{jurisdiction} entry type for citing cases.

\tip{Use the \code{keywords} field to specify the jurisdiction. The following are recognized:
  \begin{itemize}
  \item\val{gb}
    United Kingdom
  \item\val{en}:
    England (default)
  \item\val{cy}:
    Wales
  \item\val{sc}:
    Scotland
  \item\val{ni}:
    Northern Ireland
  \item\val{eu}:
    European Union (including the EEC, EC, ECSC and EURATOM)
  \item\val{echr}:
    Organs of the Council of Europe dealing with the European Convention on Human Rights
  \item\val{int}:
    (Public) international law cases and materials
  \item\val{us}:
    United States of America
  \item\val{ca}:
    Canada
  \item\val{aus}:
    Australia
  \item\val{nz}:
    New Zealand
  \end{itemize}
}

\tip{Scottish cases heard at the House of Lords or the Supreme Court should technically be given the keyword \val{gb}, therefore you can also identify them with the \key{scottish-style} option.}

\tip{Use either the (non-standard) \code{reporter} or \code{journaltitle} field for the (abbreviated) name of the report series. Use the \code{series} field for a numeric sub-series.}

\tip{Several additional pagination types are defined for use with legal citations:
  \val{article}, \val{clause}, \val{regulation}, and \val{rule} all work as normal.
  The default is a bare number (\val{none}), indicating a page reference, though EU and ECHR cases default to using the \enquote{para} (\val{paragraph}) prefix.
  There is also an alternative pagination type for paragraphs, \val{[]}, which prints the number in square brackets instead of giving it a prefix.
}

\tip{If you want to include a parallel citation, you can use the non-standard \code{pardate}, \code{parreporter}, \code{parseries}, \code{parvolume}, and \code{parpages} fields.}

\tip{If you need to, use either the (non-standard) \code{court} or \code{institution} field for the court that decided the case.}

\tip{Use the \code{location} field for the location of the court in American, Australian or Canadian cases.}

%<*n>
\begin{egcite}{\emph{Ridge v Baldwin} [1964] AC 40 at 78–9}
\cite[78-79]{ridge1964}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[78-79]{ridge1964}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{(\emph{Ridge v Baldwin} 1964: 78–9)}
\parencite[78-79]{ridge1964}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><NHR \S13.4.1>
%<a|y><NHR \S13.4.1\textdagger>
{ridge1964}
%<n|m>\emph{Ridge v Baldwin} [1964] AC 40
%<a|y>\emph{Ridge v Baldwin} [1964] AC 40
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{ridge1964,
  title = {Ridge v. Baldwin},
  keywords = {gb},
  date = {1964},
  journaltitle = {A.C.},
  pages = {40}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the \key{year-essential} Boolean entry option to specify whether the year is essential for locating the report, in cases where automatic detection (based on the presence or otherwise of a volume number) fails.
  There is a similar \key{paryear-essential} option for the parallel year.}

\begin{bibexbox}
<NHR \S13.4.1>
{lambert2001}
\emph{R v Lambert} [2001] 2 WLR 211 (QBD)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{lambert2001,
  title = {R v Lambert},
  keywords = {gb},
  date = {2001},
  volume = {2},
  journaltitle = {WLR},
  pages = {211},
  institution = {QBD},
  options = {year-essential=true}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{badische1897}
\emph{Badische v Soda-Fabrics} (1897) 14 RPC 919 (HL)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{badische1897,
  title = {Badische v. Soda-Fabrics},
  date = {1897},
  journaltitle = {RPC},
  volume = {14},
  pages = {919},
  institution = {HL}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the (non-standard) \code{neutralcite} or \code{number} field for the neutral citation or case number.}

\begin{bibexbox}
<OSCOLA \S2.1.1>
{corr08}
\emph{Corr v IBC Vehicles Ltd} [2008] UKHL 13, [2008] 1 AC 884
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corr08,
  title = {Corr v. I.B.C. Vehicles Ltd.},
  keywords = {gb},
  date = {2008},
  neutralcite = {[2008] UKHL 13},
  journaltitle = {A.C.},
  volume = {1},
  pages = {884},
  options = {year-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{rvg2004}
\emph{R v G} [2003] UKHL 50, [2004] 1 AC 1034
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{rvg2004,
  title = {R. v. G.},
  number = {[2003] UKHL 50},
  date = {2004},
  journaltitle = {A.C.},
  volume = {1},
  pages = {1034},
  options = {year-essential},
  pagination = {[]}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{}
Test\footcite[13]{rvg2004}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[13]{rvg2004}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[13]{rvg2004}
\end{egcite}
%</y>

%<y>\hack{Note that in the cases above and below, the head of the reference won't match the citation, which may cause confusion. You may wish to hack the in-text citation to fix this.}

\tip{If a report is published a long time after the decision, you can put the decision date in \code{origdate} to clarify the situation.}

\begin{bibexbox}
<NHR \S13.4.3>
{smith2001}
\emph{Smith v Jones} [2001] (1948) 2 All ER 431
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{smith2001,
  title = {Smith v Jones},
  date = {2001},
  origdate = {1948},
  journaltitle = {All ER},
  volume = {2},
  pages = {431},
  options = {year-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} are inconsistent on whether the court of decision should be printed plain or in parentheses at the end of a reference to a reported case. The default chosen by \pkg[biblatex]{oxref} is to use parentheses as per the \emph{Oxford Standard for the Citation of Legal Authorities}.

\tip{To print the court of decision plain, you can use the \key{court-plain} option. You can set this globally at the style level or on a per-entry basis.}

\begin{bibexbox}
<NHR \S13.4.3>
{bowman1978}
\emph{Bowman v Fussy} [1978] RPC 545, HL
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{bowman1978,
  title = {Bowman v Fussy},
  keywords = {gb},
  date = {1978},
  journaltitle = {RPC},
  pages = {545},
  institution = {HL},
  options = {court-plain}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{hughes1907}
\emph{Hughes v Stewart}, 1907 SC 791
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{hughes1907,
  title = {Hughes v. Stewart},
  date = {1907},
  reporter = {SC},
  pages = {791},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{corcoran1932}
\emph{Corcoran v HM Advocate}, 1932 JC 42
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corcoran1932,
  title = {Corcoran v. H.M. Advocate},
  date = {1932},
  reporter = {JC},
  pages = {42},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.2*>
{hislop42}
\emph{Hislop v Durham} (1842) 4 D 1168
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{hislop42,
  title = {Hislop v. Durham},
  date = {1842},
  volume = {4},
  reporter = {D},
  pages = {1168},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.2*>
{crofters02}
\emph{Crofters Commission v Scottish Ministers}, 2002 SLT (Land Ct) 19
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{crofters02,
  title = {Crofters Commission v. Scottish Ministers},
  date = {2002},
  reporter = {SLT},
  series = {(Land Ct)},
  pages = {19},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Unreported cases}

\tip{For cases reported in newspapers, set the \code{entrysubtype} to \code{newspaper}.}

\begin{bibexbox}
<NHR \S13.4.2*>
{powick1993}
\emph{Powick v Malvern Wells Water Co}, The Times, 28 Sept.\@ 1993
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{powick1993,
  entrysubtype = {newspaper},
  title = {Powick v. Malvern Wells Water Co},
  date = {1993-09-28},
  journaltitle = {The Times}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.2*>
{marianishi1965}
\emph{R v Marianishi, ex p London Borough of Camden} (CA, 13 Apr.\@ 1965)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{marianishi1965,
  title = {R v Marianishi, ex p London Borough of Camden},
  date = {1965-04-13},
  institution = {C.A.}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Unreported cases with a \code{neutralcite} or \code{number} do not show the date after the \code{institution}.}

\begin{bibexbox}
<OSCOLA \S2.1.4>
{calvert02}
\emph{Calvert v Gardiner} [2002] EWHC 1394 (QB)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{calvert02,
  title = {Calvert v. Gardiner},
  neutralcite = {[2002] EWHC 1394},
  institution = {QB},
  date = {2002-01-01}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{European cases}

\tip{You can record the European Case Law Identifier for a case using the \code{ecli} field.
  The \key{ecli} option determines under what circumstances the identifier is printed.}

\tip{European cases still get sorted by title, even if the entry begins with the case number.
  Use \code{sorttitle} if you would rather they were sorted under \enquote{Case} or \enquote{Joined Cases}.}

\tip{The number will be classed as \enquote{Joined Cases} if it contains a comma, a double hyphen (\code{--}),
  or the string \cs{oxrefand}, which defaults to \enquote{\code{\textvisiblespace and\textvisiblespace}}.}

\tip{For ECR cases, you can use either \code{number} or the non-standard \code{casenumber} field
  for the case number.}

\begin{bibexbox}
<OGS \S13.4.4>
{C118/07}
Case C–118/07 \emph{Commission of the European Communities v Finland} [2002] ECR I–10889
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{C118/07,
  keywords = {eu},
  title = {Commission of the European Communities v. Finland},
  sorttitle = {Case C0118/0007},
  number = {C\textendash118/07},
  journaltitle = {ECR},
  volume = {I},
  pages = {10889},
  date = {2002}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.6.2>
{C430/93}
Joined Cases C-430/93–C-431/93 \emph{Jereon van Schijndel v Stichting Pensioenfonds voor Fysiotherapeuten} [1998] ECR I–4705
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{C430/93,
  keywords = {eu},
  title = {Jereon van Schijndel v Stichting Pensioenfonds voor Fysiotherapeuten},
  shorttitle = {van Schijndel},
  number = {C-430/93--C-431/93},
  institution = {ECJ},
  journaltitle = {ECR},
  volume = {I},
  date = {1998},
  pages = {4705},
  hyphenation = {dutch}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Indicate Commission Decisions by putting \code{Commission} in the \code{institution} field.
  If a decision has a formal decision number, put this in the \code{number} field,
  and put the case number in the (non-standard) \code{casenumber} field;
  the \enquote{Case} prefix is added automatically in this case.
  Alternatively, you can put the case number (including the word \enquote{Case} if needed)
  in the \code{userb} field for compatibility with \pkg{oscola},
  or in the \code{titleaddon} field for wider portability.}

\begin{bibexbox}
<OGS \S13.2.6>
{alcatel}
\emph{Alcatel/Telettra} (Case IV/M042) [1991] OJ L122/48, [1991] 4 CLMR 391
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{alcatel,
  keywords = {eu},
  title = {Alcatel/Telettra},
  casenumber = {IV/M042},
  institution = {Commission},
  date = {1991},
  journaltitle = {OJ},
  series = {L},
  volume = {122},
  pages = {48},
  pardate = {1991},
  parreporter = {CLMR},
  parvolume = {4},
  parpages = {391},
  options = {paryear-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.6.3>
{verkehrsorgani}
\emph{Georg Verkehrsorgani v Ferrovie dello Stato} (Case COMP/37.685) Commission Decision 2004/33/EC [2004] OJ L11/17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{verkehrsorgani,
  keywords = {eu},
  title = {Georg Verkehrsorgani v Ferrovie dello Stato},
  userb = {Case COMP\slash 37.685},
  number = {2004\slash 33\slash EC},
  institution = {commission},
  year = {2004},
  journaltitle = {OJ},
  series = {L},
  issue = {11},
  pages = {17}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For ECHR cases, put the application number in the \code{number} field;
unlike \emph{OSCOLA}, \emph{New Hart's Rules} puts parentheses around it.}

\begin{bibexbox}
<NHR \S13.4.5>
{young1982}
\emph{Young, James and Webster v UK} (App no 7601/76) (1982) 4 EHRR 38
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{young1982,
  title = {Young, James and Webster v. UK},
  number = {7601/76},
  reporter = {EHRR},
  volume = {4},
  date = {1982},
  pages = {38},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.1>
{balogh04}
\emph{Balogh v Hungary} (App no 47940/99) (ECtHR, 20 July 2004)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{balogh04,
  title = {Balogh v. Hungary},
  number = {47940/99},
  date = {2004-07-20},
  institution = {ECtHR},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Special formatting is triggered if you specify \code{Series A} or \code{ECHR} as the \code{journaltitle} or \code{reporter}.}

\begin{bibexbox}
<NHR \S13.4.5>
{plattform1988}
\emph{Plattform \enquote{Artze für das Leben} v Austria} (App no 10126/82) (1988) Series A no 139
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{plattform1988,
  title = {Plattform \enquote{Artze für das Leben} v. Austria},
  number = {10126/82},
  reporter = {Series A},
  date = {1988},
  pages = {139},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.5>
{osman1998}
\emph{Osman v UK} (App no 23452/94) ECHR 1998–VIII 3124
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{osman1998,
  title = {Osman v UK},
  number = {23452/94},
  reporter = {ECHR},
  date = {1998},
  volume = {8},
  pages = {3124},
  institution = {ECtHR},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For the older European Commission of Human Rights, the \code{institution}
should be set to \code{Commission} but the information is effectively discarded
if you give the \code{journltitle} as \code{CD} or \code{DR}.}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{x71}
\emph{X v Netherlands} (1971) 38 CD 9
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{x71,
  title = {X v. Netherlands},
  date = {1971},
  volume = {38},
  journaltitle = {CD},
  pages = {9},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{ccsu87}
\emph{Council of Civil Service Unions v UK} (1987) 10 EHRR 269 (Commission Decision)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{ccsu87,
  title = {Council of Civil Service Unions v. UK},
  date = {1987},
  volume = {10},
  journaltitle = {EHRR},
  pages = {269},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{simpson86}
\emph{Simpson v UK} (1989) 64 DR 188
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{simpson86,
  title = {Simpson v. UK},
  date = {1989},
  volume = {64},
  journaltitle = {DR},
  pages = {188},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2*>
{p.uk88}
\emph{P v UK} (App no 13473/87) (Commission Decision, 11 July 1988)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{p.uk88,
  title = {P v. UK},
  date = {1988-07-11},
  number = {13473/87},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Cases from other jurisdictions}

The \emph{Oxford Guide to Style}, \emph{New Hart's Rules}, and \emph{OSCOLA}
provide only limited information on citing cases from other jurisdictions,
deferring to other authorities I can't effectively support in
\pkg[biblatex]{oxref}. The examples in this section demonstrate a few
formats that can nevertheless be achieved.

\subsubsection{Australia}

\begin{bibexbox}
<OSCOLA \S2.8.1>
{waltons88}
\emph{Waltons Stores (Interstate) Ltd v Maher} (1988) 164 CLR 387
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{waltons88,
  title = {Waltons Stores (Interstate) Ltd v Maher},
  date = {1988},
  volume = {164},
  reporter = {C.L.R.},
  pages = {387},
  keywords = {au}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{bakker}
\emph{Bakker v Stewart} [1980] VR 17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{bakker,
  title = {Bakker v. Stewart},
  date = {1980},
  reporter = {V.R.},
  pages = {17},
  keywords = {au}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{Canada}

\info{\emph{New Hart's Rules} prefers to put commas between case titles and bare
numbers, but you can suppress this for Canadian cases with the following command:}
\begin{tcblisting}{listing only,left skip=2em}
\renewcommand*{\cacasetitlepunct}{\addspace}
\end{tcblisting}

\begin{bibexbox}
{clearbrook}
\emph{Clearbrook Ironworks Ltd v Letorneau}, 2006 FCA 42, 46 CPR (4th) 241
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{clearbrook,
  title = {Clearbrook Ironworks Ltd. v. Letorneau},
  number = {2006 FCA 42},
  volume = {46},
  reporter = {C.P.R.},
  series = {4th},
  pages = {241},
  date = {2006},
  pagination = {paragraph},
  keywords = {ca}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{United States of America}

\info{\emph{New Hart's Rules} prefers to put commas between case titles and bare
numbers, but you can suppress this for American cases with the following command:}
\begin{tcblisting}{listing only,left skip=2em}
\renewcommand*{\uscasetitlepunct}{\addspace}
\end{tcblisting}

\begin{bibexbox}
<NHR \S13.4.1>
{michael1976}
\emph{Michael v Johnson}, 426 US 346 (1976)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{michael1976,
  title = {Michael v. Johnson},
  volume = {426},
  reporter = {U.S.},
  pages = {346},
  date = {1976},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}
  
\begin{bibexbox}
<OSCOLA \S2.8.1*>
{henningsen60}
\emph{Henningsen v Bloomfield Motors Inc}, 161 A 2d 69 (NJ 1960)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{henningsen60,
  title = {Henningsen v. Bloomfield Motors Inc.},
  volume = {161},
  reporter = {A.},
  series = {2},
  pages = {69},
  location = {NJ},
  date = {1960},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.8.1*>
{roe73}
\emph{Roe v Wade}, 410 US 113, 163–64 (1973)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{roe73,
  title = {Roe v. Wade},
  volume = {410},
  reporter = {U.S.},
  pages = {113, 163--64},
  date = {1973},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{operadora09}
\emph{Re Operadora DB Mexico SA}, 6:09-cv-383-Orl 022GJK, 2009 WL 2423138 (MD Fla 2009)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{operadora09,
  title = {Re Operadora D.B. Mexico S.A.},
  number = {6:09-cv-383-Orl 022GJK},
  eprint = {2009 WL 2423138},
  court = {M.D. Fla.},
  date = {2009},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{International}

\begin{bibexbox}
{corfu}
\emph{Corfu Channel Case (UK v Albania)} (Merits) [1949] ICJ Rep 4
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corfu,
  title = {Corfu Channel Case},
  subtitle = {UK v Albania},
  titleaddon = {Merits},
  date = {1949},
  journaltitle = {ICJ Rep},
  pages = {4},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{nicaragua}
\emph{Land, Island and Maritime Frontier Case (El Salvador/Honduras, Nicaragua intervening)} (Application for Intervention) [1994] ICJ Rep 92
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{nicaragua,
  title = {Land, Island and Maritime Frontier Case},
  subtitle = {El Salvador\slash Hon\-duras, Nicaragua intervening},
  titleaddon = {Application for Intervention},
  date = {1994},
  journaltitle = {ICJ Rep},
  pages = {92},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{wall}
\emph{Legal Consequences of the Construction of a Wall} (Advisory Opinion) (2004), \url{http://www.icj-cij.org/icjwww/imwp/imwpframe.htm}, accessed 21 July 2005
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{wall,
  title = {Legal Consequences of the Construction of a Wall},
  titleaddon = {Advisory Opinion},
  date = {2004},
  url = {http://www.icj-cij.org/icjwww/imwp/imwpframe.htm},
  urldate = {2005-07-21},
  pagination = {[]},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{chorzow}
\emph{Case Concerning the Factory at Chorzów (Germany v Poland)} (Merits) [1928] PCIJ Rep Series A No 17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{chorzow,
  title = {Case Concerning the Factory at Chorzów},
  indextitle = {Chorzów Factory Case},
  subtitle = {Germany v Poland},
  titleaddon = {Merits},
  journaltitle = {PCIJ Rep},
  series = {A},
  pages = {17},
  date = {1928},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Legislation}

Use the \code{legislation} entry type for citing Acts, Bills, Orders, Measures, and the like.

\subsection{UK legislation}

\tip{Specify an \code{entrysubtype} of \code{primary} for primary legislation.
  This ensures only the title and year are printed.}

\begin{bibexbox}
<OGS \S13.2.3>
{fwa1891}
Factory and Workshop Act 1891
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{fwa1891,
  entrysubtype = {primary},
  title = {Factory and Workshop Act},
  shorttitle = {FWA 91},
  date = {1891},
  pagination = {section},
  keywords = {en},
  number = {54 \& 55 Vict, c. 75}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.6>
{learner08}
Learner Travel (Wales) Measure 2008 (nawm 2)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{learner08,
  title = {Learner Travel (Wales) Measure},
  date = {2008},
  number = {nawm 2},
  keywords = {cy},
  entrysubtype = {primary},
  pagination = {section}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.5>
{confund}
  Consolidated Fund HC Bill (2008–09) [5]
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{confund,
  title = {Consolidated Fund Bill},
  date = {2008/2009},
  institution = {HC},
  number = {5},
  keywords = {gb, draft},
  entrysubtype = {primary},
  pagination = {clause}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.5>
{academies}
Academies HL Bill (2010–11) 1
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{academies,
  title = {Academies Bill},
  date = {2010/2011},
  institution = {HL},
  number = {1},
  keywords = {gb, draft},
  entrysubtype = {primary},
  pagination = {clause}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.4>
{charitiesnotes}
Explanatory Notes on the Charities Act 2006
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{charitiesnotes,
  title = {Explanatory Notes on the Charities Act 2006},
  indextitle = {Charities Act 2006, Explanatory Note},
  pagination = {paragraph},
  entrysubtype = {explanatory note}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Specify an \code{entrysubtype} of \code{secondary} for secondary legislation.
  The number is then printed as well.}

\begin{bibexbox}
<NHR \S13.5.1>
{lap1897}
Local Authority Precepts Order 1897, SR~\&~O 1897/201
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{lap1897,
  entrysubtype = {secondary},
  title = {Local Authority Precepts Order},
  date = {1897},
  number = {SR~\&~O 1897\slash 201},
  pagination = {rule}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.5.3>
{eggs}
Eggs and Chicks (England) Regulations 2009, SI 2009/2163
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{eggs,
  entrysubtype = {secondary},
  title = {Eggs and Chicks (England) Regulations},
  date = {2009},
  number = {SI 2009\slash 2163},
  pagination = {regulation}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{\emph{Eggs and Chicks (England) Regulations}, reg.~7(3)}
\cite[\pno~7(3)]{eggs}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~7(3)]{eggs}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~7(3)]{eggs}
\end{egcite}
%</y>

\subsection{European legislation}

As with European cases, European legislation should be given the \val{eu} keyword.
This is currently the only keyword that makes a difference to the formatting.

According to both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules},
you can provide an even sparser reference for primary European legislation.

%<*n>
\begin{egcite}{EC Treaty (Treaty of Rome, as amended), art.~3b}
\cite[\pno~3b]{ECT:Rome}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~3b]{ECT:Rome}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~3b]{ECT:Rome}
\end{egcite}
%</y>

\begin{bibexbox}
%<n><OGS \S13.2.7*>
%<y><OGS \S13.2.7*\textdagger>
{ECT:Rome}%
EC Treaty
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{ECT:Rome,
  entrysubtype = {eu-treaty},
  title = {EC Treaty},
%<!m|a|y>  shorthandintro = {Treaty of Rome, as amended},
%<!m|a>  shorthand = {EC Treaty},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

If this seems scandalously short, you may prefer to provide a full reference (including the relevant entry in the OJ or OJ Spec Ed) for the bibliography and use, say, \cs{citetitle} for citations.

\begin{bibexbox}
<OSCOLA \S2.6.1>
{teu}
Consolidated Version of the Treaty on European Union [2008] OJ C115/13
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{teu,
  entrysubtype = {eu-treaty},
  title = {Consolidated Version of the Treaty on European Union},
  indextitle = {Treaty on European Union},
  date = {2008},
  journaltitle = {OJ},
  series = {C},
  volume = {115},
  pages = {13},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Secondary legislation should always have a full reference.

\begin{bibexbox}
<NHR \S13.5.2>
{EC:97/1}
Council Directive (EC) 97/1 on banking practice [1997] OJ L234/3
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{EC:97/1,
  title = {Council Directive (EC) 97/1 on banking practice},
  date = {1997},
  journaltitle = {OJ},
  series = {L},
  issue = {234},
  pages = {3},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.5.2>
{EEC:1017/68}
Council Regulation (EEC) 1017/68 applying rules of competition to transport [1968] OJ Spec Ed 302
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{EEC:1017/68,
  title = {Council Regulation (EEC) 1017/68 applying rules of competition to transport},
  date = {1968},
  journaltitle = {OJ Spec Ed},
  pages = {302},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Add amendment notices to the \code{note} field; \pkg[biblatex]{oxref} does not, sadly, provide a clever way of constructing these from their component parts so you have to write them verbatim.}

\begin{bibexbox}
<NHR \S13.5.2>
{ECN:1986}
Commission Notice on agreements of minor importance [1986] OJ C231/2, as amended [1994] OJ C368/20
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{ECN:1986,
  title = {Commission Notice on agreements of minor importance},
  date = {1986},
  journaltitle = {OJ},
  series = {C},
  issue = {231},
  pages = {2},
  note = {as amended [1994] OJ C368/20},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Treaties}

Treaties use the \code{legal} entry type, with \code{piltreaty} as the \code{entrysubtype}.

\tip{Don't use the \code{date} field for treaties; instead, use the \code{execution} field to give a list of dates. Each date should be given in the form \meta{type}=\meta{year-month-day}, where \meta{type} is one of \key{opened}, \key{signed}, \key{adopted}, or \key{inforce}. The dates won't be sorted; they will be printed in the order given.}

\begin{bibexbox}
<NHR \S13.6*>
{refugees}
Convention Relating to the Status of Refugees (adopted 28 July 1951, entered into force 22 Apr.\@ 1954) 189 UNTS 137
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{refugees,
  entrysubtype = {piltreaty},
  title = {Convention Relating to the Status of Refugees},
%<!m&!a>  shorthand = {Refugee Convention},
  execution = {adopted=1951-07-28 and inforce=1954-04-22},
  pagination = {article},
  volume = {189},
  journaltitle = {UNTS},
  pages = {137}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\tip{Since the lack of a \code{date} field may cause an inaccurate \enquote{n.d.\@} label to be printed, use the \code{shorthand} field to provide a sensible citation label. You could use \cs{citetitle} the first time to ensure the reader can find it in the bibliography. You can also suppress the \enquote{n.d.\@} label by specifying \code{sortyear} or using the \key{nonodate} option.}

\begin{egcite}{(Refugee Convention: art.\@ 24)}
  \parencite[24]{refugees}
\end{egcite}

%</y>

\begin{bibexbox}
{echr:treaty}
Convention for the Protection of Human Rights and Fundamental Freedoms (opened for signature 4 Nov.\@ 1950, entered into force 3 Sept.\@ 1953) 213 UNTS 221, as amended by Protocol No 14bis to the Convention for the Protection of Human Rights and Fundamental Freedoms (opened for signature 27 May 2009, entered into force 1 Sept.\@ 2009) CETS No. 204
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{echr:treaty,
  entrysubtype = {piltreaty},
  title = {Convention for the Protection of Human Rights and Fundamental Freedoms},
  execution = {opened=1950-11-04 and inforce=1953-09-03},
  volume = {213},
  reporter = {UNTS},
  pages = {221},
  shorthand = {ECHR},
  related = {echr:protocol},
  relatedtype = {amendedby}}
@legal{echr:protocol,
  entrysubtype = {piltreaty},
  title = {Protocol No 14bis to the Convention for the Protection of Human Rights
    and Fundamental Freedoms},
  execution = {opened=2009-05-27 and inforce=2009-09-01},
  series = {CETS},
  number = {204}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Hansard}

References to Hansard use the \code{legal} entry type, with \code{parliamentary} as the \code{entrysubtype}.

\tip{For debates since 1909, give \code{Hansard} as the \code{title} and put either \code{HC} or \code{HL} in the \code{type} field.}

\tip{Put the column numbers in the \code{pages} field, and put \code{column} in the \code{bookpagination} field.}

\begin{bibexbox}
<NHR \S13.7.3*>
{hc357}
Hansard, HC vol.\@ 357, cols.\@ 234–45 (13 Apr.\@ 1965)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{hc357,
  entrysubtype = {parliamentary},
  title = {Hansard},
  type = {HC},
  volume = {357},
  pages = {234-245},
  date = {1965-04-13},
  bookpagination = {column}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For debates before 1909, give \code{Parl. Deb.} as the \code{title}.}

\begin{bibexbox}
<NHR \S13.7.3*>
{pd4/24}
Parl.\@ Deb.\@ (series 4) vol.\@ 24, col.\@ 234 (24 Mar.\@ 1895)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{pd4/24,
  entrysubtype = {parliamentary},
  title = {Parl\adddotspace Deb\adddot},
  series = {4},
  volume = {24},
  pages = {234},
  date = {1895-03-24},
  bookpagination = {column}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Legal reports}

Reports of Parliamentary select committees and the Law Commission should be entered using the \code{report} entry type, with the \code{entrysubtype} set to \code{legal}.

\tip{To print the identifying codes within the publication block, put them all in \code{number}; do not specify a \code{type} or \code{series}.}

\begin{bibexbox}
%<n|m><NHR \S13.7.2>
%<a|y><NHR \S13.7.2\textdagger>
{lc2009icl}
%<n|m>Law Commission, \emph{Intoxication and Criminal Liability} (Law Comm No 314, Cm 7526, 2009) para 1.15
%<a|y>Law Commission (2009), \emph{Intoxication and Criminal Liability} (Law Comm No 314, Cm 7526) para 1.15
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@report{lc2009icl,
  entrysubtype = {legal},
  author = {{Law Commission}},
  title = {Intoxication and Criminal Liability},
  number = {Law Comm No 314, Cm 7526},
  date = {2009},
  pages = {1.15},
  bookpagination = {paragraph}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Commentaries}

\pkg[biblatex]{Oxref} does not provide any special formatting for legal commentaries;
it provides the \code{commentary} entry type simply as an alias for \code{book}.


\chapter{Specialist materials}\label{sec:special}
\chapterprecis{misc, unpublished, letter, manuscript}

\section{Poems}\label{sec:poem}

\subsection{Short poems}

\tip{Use the \code{incollection} entry type for a poem in a collection.
  If it appears in an article or a work that is itself in a collection,
  use the \code{misc} entry type for the poem, with a relation of type \code{in} pointing to the containing work.}

\begin{bibexbox}
%<n|m><OGS \S15.8>
%<a|y><OGS \S15.8\textdagger>
{auden1990era}
%<n|m>W. H. Auden, \enquote{Es regnet auf mir in den Schottische Lände} [\emph{sic}], in \enquote{The German Auden: Six Early Poems}, trans. David Constantine, in Katherine Bucknell and Nicholas Jenkins (eds.), \emph{W. H. Auden, \enquote{The Map of All my Youth}: Early Works, Friends, and Influences} (Auden Studies, 1; Oxford, 1990), 1–15 at 6.
%<a|y>Auden, W. H. (n.d.), \enquote{Es regnet auf mir in den Schottische Lände} [\emph{sic}], in \enquote{The German Auden: Six Early Poems}, trans. D. Constantine, in K. Bucknell and N. Jenkins (eds.), \emph{W. H. Auden, \enquote{The Map of All my Youth}: Early Works, Friends, and Influences} (Auden Studies, 1; Oxford, 1990), 1–15 at 6.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@misc{auden1990era,
  author = {W. H. Auden},
  title = {Es regnet auf mir in den Schottische Lände},
  titleaddon = {\emph{sic}},
  related = {constantine1990gas},
  relatedtype = {in},
  pages = {6}}
@incollection{constantine1990gas,
  title = {The {German} {Auden}},
  subtitle = {Six Early Poems},
  author = {David Constantine},
  authortype = {translator},
  options = {useauthor=false},
  editor = {Katherine Bucknell and Nicholas Jenkins},
  booktitle = {W. H. Auden, \enquote{The Map of All my Youth}},
  booksubtitle = {Early Works, Friends, and Influences},
  series = {Auden Studies},
  number = {1},
  location = {Oxford},
  date = {1990},
  pages = {1-15}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\begin{bibexbox}
%<n|m><OGS \S15.8>
%<a|y><OGS \S15.8\textdagger>
{blois1993qff}
%<n|m>William of Blois, \enquote{The Quarrel of the Flea and the Fly} (\emph{Pulicis et musce iurgia}), trans. in Jan M. Ziolkowski, \emph{Talking Animals: Medieval Latin Beast Poetry, 750-1150} (Middle Ages Series, ed. Edward Peters; Philadelphia: University of Pennsylvania Press, 1993), 274–8.
%<a|y>William of Blois (n.d.), \enquote{The Quarrel of the Flea and the Fly} (\emph{Pulicis et musce iurgia}), trans. in Ziolkowski, J. M., \emph{Talking Animals: Medieval Latin Beast Poetry, 750-1150} (Middle Ages Series, ed. E. Peters; Philadelphia: University of Pennsylvania Press, 1993), 274–8.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@misc{blois1993qff,
  author = {{William of Blois}},
  title = {The Quarrel of the Flea and the Fly},
  origtitle = {Pulicis et musce iurgia},
  related = {ziolkowski1993tam},
  relatedtype = {in},
  relatedstring = {trans.\@ in},
  pages = {274-278}}
@book{ziolkowski1993tam,
  author = {Jan M. Ziolkowski},
  title = {Talking Animals},
  subtitle = {Medieval Latin Beast Poetry, 750-1150},
  series = {Middle Ages Series},
  serieseditor = {Edward Peters},
  location = {Philadelphia},
  publisher = {University of Pennsylvania Press},
  date = {1993}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Long poems}

If a poem is divided into cantos, the title is set in italics rather than quoted.

\tip{To achieve this, use the entry type \code{book} if the poem is published on its own,
  and \code{bookinbook} with entry subtype \code{poem} if the poem is published in an anthology.}

\tip{To assist with quoting passages, \pkg[biblatex]{oxref} provides the additional pagination types
  \code{book}, \code{canto}, and \code{stanza} (\code{line} is already defined),
  though in reality you are probably better off doing it by hand.}

%<*n>
\begin{egcite}{\dots 1590–6), bk. ii, canto vi, stanza iii}
\cite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.8*>
%<a|y><OGS \S15.8*\textdagger>
{spenser1965fq}%
%<n|m>Edmund Spenser, \emph{The Faerie Queene} (Everyman's Library, 443–4; London: Dent, 1965–6) (originally pub. 1590–6).
%<a|y>Spenser, E. (1590–6), \emph{The Faerie Queene} (Everyman's Library, 443–4; London: Dent, 1965–6).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{spenser1965fq,
  author = {Edmund Spenser},
  title = {The Faerie Queene},
  shorttitle = {Faerie Queene},
  series = {Everyman's Library},
  number = {443--4},
  location = {London},
  publisher = {Dent},
  date = {1965/1966},
  origdate = {1590/1596},
  pagination = {book}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Plays}\label{sec:play}

Play titles, like those of epic poems, are set in italics rather than quoted.

\tip{To achieve this, use the entry type \code{book} if the play is published on its own,
  and \code{bookinbook} with entry subtype \code{play} if the play is published in an anthology.}

\tip{To assist with quoting passages, \pkg[biblatex]{oxref} provides the additional pagination types
  \code{act} and \code{scene} (\code{line} is already defined),
  though in reality you are probably better off doing it by hand.}


\section{Manuscripts}\label{sec:ms}

%<*y>
An author–date system like \textsf{oxyear} does not really lend itself to manuscript references,
but support is provided anyway for the sake of completeness.

%</y>
%<n|m>\spec{Author, \enquote{Title}/Descriptor, Date, Archive, Location, Collection Series, Shelfmark, Folios.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor, Date, Archive, Location, Collection Series, Shelfmark, Folios.}

With \pkg[biblatex]{oxref}, you can enter manuscripts in either of two ways. The first uses the \code{unpublished} entry type.

\tip{If the manuscript has a descriptor but no title, put the descriptor in the \code{title} field and annotate the field with the term \enquote{\code{descriptor}}. If you want to supply both a title and a descriptor, put the descriptor in the \code{note} field. Alternatively, you can use the (\pkg[biblatex]{oxref}-specific) \code{descriptor} field, and \pkg[biblatex]{oxref} will handle all this for you.}

\tip{Use \code{author} and \code{date} as normal. Note that the \code{date} will not be printed if both the \code{author} and \code{title}\slash \code{descriptor} fields are left blank.}

\tip{Put the library or archive where the manuscript is kept in the \code{library} field, and the city or place name in the \code{location} field. Note that the \code{library} field is required to switch on the special support for manuscripts.}

\tip{Put the collection name in the \code{series} field and the shelfmark in the \code{number} field.}

\tip{Put the page range studied (or some other subdivision) in the \code{pages} field. You can use \cs{recto} and \cs{verso} for the respective sides of a folio, and you can also specify a \code{pagetotal}.}

\tip{You can use the \code{folio} key in the \code{pagination} and \code{bookpagination} fields.}

\begin{bibexbox}
%<n|m><NHR 18.6.3*>
%<a|y><NHR 18.6.3*\textdagger>
{smithMS23116}
%<n|m>Francis Smith, travel diaries, 1912–7, British Library, Add. MS 23116.
%<a|y>Smith, F. (1912–7), travel diaries, British Library, Add. MS 23116.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@unpublished{smithMS23116,
  author = {Francis Smith},
  descriptor = {travel diaries},
  date = {1912/1917},
  library = {British Library},
  series = {Add. MS},
  number = {23116}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

The second uses the dedicated \code{manuscript} entry type from \textsf{biblatex-manuscripts-philology}.
\pkg[biblatex]{Oxref} does not have all the bells and whistles of that style, but it understands a subset of its data model.

\tip{You can use \code{author}, \code{title}\slash \code{note}\slash \code{descriptor} and \code{date} as described above. (This is a departure from \textsf{biblatex-manuscripts-philology}.)}

\tip{Put the library or archive where the manuscript is kept in the \code{library} field, and the city or place name in the \code{location} field}

\tip{Put the collection name in the \code{collection} field and the shelfmark in the \code{shelfmark} field.}

\tip{If the date is vague (e.g. a century), you can put this in the \code{dating} field. Note that it will only be printed if the \code{date} is missing\slash not printed.}

\tip{Put the page range studied (or some other subdivision) in the \code{pages} field. You can use \cs{recto} and \cs{verso} for the respective sides of a folio, and you can also specify a \code{pagetotal}.}

\tip{You can specify the number of columns (either \code{1} or \code{2}) in the \code{columns} field.}

\tip{You can specify the layer of a palimpsest in the \code{layer} field. Use \code{inf} for the inferior layer and \code{sup} for the superior layer.}

\tip{You can specify the writing support material in the \code{support} field. Three special keys – \code{papyrus}, \code{paper}, and \code{parchment} – are recognized and (potentially) translated, but other values will be printed as-is.}

\begin{bibexbox}
%<n|m><NHR 18.6.2>
%<a|y><NHR 18.6.2\textdagger>
{chaundlerMS288}
%<n|m>Thomas Chaundler, \enquote{Collocutiones}, Balliol College, Oxford, MS288.
%<a|y>Chaundler, T. (n.d.), \enquote{Collocutiones}, Balliol College, Oxford, MS288.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{chaundlerMS288,
  author = {Thomas Chaundler},
  title = {Collocutiones},
  library = {Balliol College},
  location = {Oxford},
  shelfmark = {MS288}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.2>
%<a|y><NHR 18.6.2\textdagger>
{exchequerE311}
%<n|m>exchequer accounts, Dec. 1798, Cheshire Record Office, E311.
%<a|y>exchequer accounts (1798), Dec., Cheshire Record Office, E311.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{exchequerE311,
  descriptor = {exchequer accounts},
  date = {1798-12},
  library = {Cheshire Record Office},
  shelfmark = {E311}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.3>
%<a|y><NHR 18.6.3\textdagger>
{blcBOX19d}
%<n|m>Bearsden Ladies' Club minutes, 12 June 1949, Bearsden and Milngavie District Libraries, box 19/d.
%<a|y>Bearsden Ladies' Club minutes (1949), 12 June, Bearsden and Milngavie District Libraries, box 19/d.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{blcBOX19d,
  title = {Bearsden Ladies' Club minutes},
  title+an = {=descriptor},
  date = {1949-06-12},
  library = {Bearsden and Milngavie District Libraries},
  shelfmark = {box 19/d}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.5>
%<a|y><NHR 18.6.5\textdagger>
{bodMSrawl-d520}
%<n|m>Bodleian Library, Oxford, MS Rawlinson D. 520, fo. 7.
%<a|y>Bodleian Library (n.d.), Oxford, MS Rawlinson D. 520, fo. 7.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{bodMSrawl-d520,
  library = {Bodleian Library},
  location = {Oxford},
  collection = {MS Rawlinson D.},
  shelfmark = {520},
  pages = {7},
  bookpagination = {folio}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{cantabAGM4429}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{cantabAGM4429,
  library = {University Library},
  location = {Cambridge},
  collection = {Add. Greek MS},
  shelfmark = {4489},
  support = {parchment},
  dating = {8th--9th c.},
  pagetotal = {16},
  columns = {1},
  pages = {11\recto-11\verso},
  layer = {inf},
  bookpagination = {folio}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\begin{egcite}{(Bodleian Library, n.d.; Chaundler, n.d.; exchequer accounts 1798)}
\parencite{chaundlerMS288,%
  exchequerE311,%
  bodMSrawl-d520}
\end{egcite}
%</y>


\section{Letters}

These examples relate to letters held personally or online. For letters that
form part of archival collections, see the section on manuscripts above.

Note that it is usually acceptable to exclude personal communications from
the reference section, and simply cite them in the text (in which case you may
not need the \pkg{biblatex} machinery).

%<n|m>\spec{Author, \enquote{Title}/Descriptor, Date.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor, Date.}

\begin{bibexbox}
%<n|m><OGS \S15.11.1*>
%<a|y><OGS \S15.11.1*\textdagger>
{anon2001pl}
%<n|m>Personal letter to the author, 2 May 2001.
%<a|y>Personal letter to the author (2001), 2 May.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@letter{anon2001pl,
  title = {Personal letter to the author},
  title+an = {=descriptor},
  date = {2001-05-02}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

In the absence of any explicit rationale governing whether the date is
parenthetical, in \pkg[biblatex]{oxref} the presence of a URL
will trigger the use of parentheses.

%<n|m>\spec{Author, \enquote{Title}/Descriptor [HowPublished], (Date), OnlineAccess.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor [HowPublished], (Date), OnlineAccess.}

\begin{bibexbox}
%<n|m><OGS \S15.15.3*>
%<a|y><OGS \S15.15.3*\textdagger>
{ritter2001rp}%
%<n|m>R. M. Ritter, \enquote{Revised proofs} [email to H. E. Cox], (1 Aug.\@ 2001), \url{ogs@ritter.org.uk}, accessed 3 Aug.\@ 2001.
%<a|y>Ritter, R. M. (2001), \enquote{Revised proofs} [email to H. E. Cox], (1 Aug.\@), \url{ogs@ritter.org.uk}, accessed 3 Aug.\@ 2001.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@letter{ritter2001rp,
  author = {R. M. Ritter},
  title = {Revised proofs},
  howpublished = {email to H. E. Cox},
  date = {2001-08-01},
  url = {ogs@ritter.org.uk},
  urldate = {2001-08-03}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\defbibnote{preface}{This document uses the \pkg{biblatex} option \key{backref}
to demonstrate how entries can be marked with the page(s) on which they were
cited. The format of the back references comes from \pkg{biblatex} itself
rather than \pkg[biblatex]{oxref}.}

%<n|a|y>\printbibliography[notcategory=hidden]
%<m>\printbibliography[notcategory=hidden,prenote=preface]
%</n|m|a|y>
%</doc|bib>
%<*driver>
\fi
\DocInput{\jobname.dtx}
%</driver>
%<*driver|doc>
\end{document}
%</driver|doc>
%<*bbx>
% \fi
% \chapter{Bibliography styles}
%
% \settocdepth{subsection}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*o>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{Base style: oxref.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Loading dependencies, setting up languages, applying options}
% \label{sec:setup}
%
% Dependencies:
% \begin{itemize}
% \item
% For ease of maintenance, we will patch some definitions with \pkg{xpatch}
% instead of writing out our own in full.
% \item
% We will manipulate strings with \pkg{xstring}.
% \item
% We will use \pkg{graphicx} for stretching \cs{bibnamedash}es
% \end{itemize}
%
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\RequirePackage{xstring}
\RequirePackage{graphicx}
%    \end{macrocode}
%
% Language support may be widened in future, but for now we support British and
% American English. Adapted language files have the following suffix.
%
%    \begin{macrocode}
\DeclareLanguageMappingSuffix{-oxref}
%    \end{macrocode}
%
% We provide some additional bibliography strings:
%
% \begin{itemize}
%   \item roles expressed as functions;
% \end{itemize}
%
%    \begin{macrocode}
\NewBibliographyString{%
  director, performer, reader, conductor, serieseditor, holder, editorcm,
  directors, performers, readers, conductors, serieseditors, holders, editorcms,
%    \end{macrocode}
%
% \begin{itemize}
%   \item roles expressed as actions;
% \end{itemize}
%
%    \begin{macrocode}
  bydirector, byperformer, byreader, byconductor, byserieseditor, byholder, byeditorcm,
%    \end{macrocode}
%
% \begin{itemize}
%   \item publication details;
% \end{itemize}
%
%    \begin{macrocode}
  facsimile, revised, revisedenlarged, revisedreprint, suppto, equals, original, amendedby,
%    \end{macrocode}
%
% \begin{itemize}
%   \item publication state;
% \end{itemize}
%
%    \begin{macrocode}
  inpressin,
%    \end{macrocode}
%
% \begin{itemize}
%   \item pagination;
% \end{itemize}
%
%    \begin{macrocode}
  book, books, canto, cantos, stanza, stanzas, act, acts, scene, scenes, folio, folios,
  article, articles, clause, clauses, regulation, regulations, rule, rules,
  booktotal, booktotals, cantototal, cantototals, stanzatotal, stanzatotals,
  acttotal, acttotals, scenetotal, scenetotals, foliototal, foliototals,
  articletotal, articletotals, clausetotal, clausetotals, regulationtotal,
  regulationtotals, ruletotal, ruletotals,
%    \end{macrocode}
%
% \begin{itemize}
%   \item types;
% \end{itemize}
%
%    \begin{macrocode}
  facebook, tweet, podcast, clip, webcast, poster,
%    \end{macrocode}
%
% \begin{itemize}
%   \item miscellaneous;
% \end{itemize}
%
%    \begin{macrocode}
  nolocation, modified, recorded, uploaded, filed, issued,
%    \end{macrocode}
%
% \begin{itemize}
%   \item labels;
% \end{itemize}
%
%    \begin{macrocode}
  anon, pseudo, urldown,
%    \end{macrocode}
%
% \begin{itemize}
%   \item country names, patents, and patent requests;
% \end{itemize}
%
%    \begin{macrocode}
  countryjp, patentjp, patreqjp,
%    \end{macrocode}
%
% \begin{itemize}
%   \item borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column, 2column, inflayer, suplayer, paper, papyrus, parchment,
  eucase, eujoinedcases, commissiondecision, application,
  order, bill, draft, opened, signed, adopted, inforce,
}
%    \end{macrocode}
%
% The \cs{blx@ox@langbibstring} utility is used to prefix a bibstring with one
% or more language names, but since this only works in certain languages, by
% default it discards the language names (first argument) and just prints the
% bibstring (second argument). This is overridden in |english-oxref.lbx| and
% friends.
%
%    \begin{macrocode}
\def\blx@ox@langbibstring#1#2{\bibstring{#2}}
%    \end{macrocode}
%
% We base our styles on the standard on the principle of least surprise
% (and to aid with maintenance in the face of new \pkg{biblatex} versions).
% We set some defaults different to the standard ones, but the author can
% still override them.
%
%    \begin{macrocode}
\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{urldate=comp,pagetracker,timezeros=false,time=12h,isbn=false}
%    \end{macrocode}
%
% Here are the new default punctuation conventions. The new \cs{recordseriespunct}
% is used for audiovisual resources, while \cs{cacasetitlepunct} and
% \cs{uscasetitlepunct} are for punctuation following the case title in Canadian and
% American cases respectively.
%
%    \begin{macrocode}
\renewcommand*{\labelnamepunct}{\addcomma\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\subtitlepunct}{\addcolon\space}
\renewcommand*{\intitlepunct}{\nopunct\space}
\renewcommand*{\bibnamedash}{\resizebox{2em}{\height}{\textemdash}\addthinspace}
\newcommand*{\recordseriespunct}{\addcomma\space}
\newcommand*{\cacasetitlepunct}{\addcomma\space}
\newcommand*{\uscasetitlepunct}{\addcomma\space}
\renewcommand*{\relateddelim}{\addsemicolon\space}
\DeclareDelimFormat{revsdnamedelim}{\addcomma}
\DeclareDelimFormat[pair]{revsdnamedelim}{}
\DeclareDelimFormat{authortypedelim}{\addspace}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareDelimFormat{translatortypedelim}{\addspace}
%    \end{macrocode}
%
% \subsection{Names}
%
% We declare some new name formats so that authors/editors/others who appear
% mid-reference can be handled differently from those that appear at the
% head of the reference.
%
%    \begin{macrocode}
\DeclareNameAlias{bookauthor}{default}
\DeclareNameAlias{bookeditor}{default}
%    \end{macrocode}
%
% Traditionally, Oxford style (for the humanities) prints author names in
% small capitals in the bibliography, but in normal case in citations. This is
% falling out of fashion, so we introduce it as an option.
%
%    \begin{macrocode}
\newtoggle{blx@ox@scnames}
\DeclareBibliographyOption{scnames}[true]{%
  \settoggle{blx@ox@scnames}{#1}
}
%    \end{macrocode}
%
% The style manuals prefer to omit titles but accept they may need to be
% included in some circumstances. There are some titles that are only used
% with full names and some that may be used with initials, so we provide an
% option for manually switching them off.
%
%    \begin{macrocode}
\newtoggle{blx@ox@nametitle}\toggletrue{blx@ox@nametitle}%
\DeclareBiblatexOption{global,type,entry}{usenametitles}[true]{%
  \settoggle{blx@ox@nametitle}{#1}}
%    \end{macrocode}
%
% We provide some additional macros for formatting names with titles.
% Here is the one for natural name order.
%
%    \begin{macrocode}
\newbibmacro*{name:title-given-family}[5]{%
  \usebibmacro{name:delim}{#2#3#1}%
  \usebibmacro{name:hook}{#2#3#1}%
  \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\mkbibnametitle{#5}\isdot\bibnamedelimd}{}}%
  \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
  \ifdefvoid{#3}{}{%
    \mkbibnameprefix{#3}\isdot
    \ifprefchar
      {}
      {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
  \mkbibnamefamily{#1}\isdot
  \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
%    \end{macrocode}
%
% Here is the one for inverted name order.
%
%    \begin{macrocode}
\newbibmacro*{name:family-title-given}[5]{%
  \ifuseprefix{%
    \usebibmacro{name:delim}{#3#1}%
    \usebibmacro{name:hook}{#3#1}%
    \ifdefvoid{#3}{}{%
      \ifcapital{%
        \mkbibnameprefix{\MakeCapital{#3}}\isdot
      }{%
        \mkbibnameprefix{#3}\isdot}%
      \ifprefchar{}{\bibnamedelimc}}%
    \mkbibnamefamily{#1}\isdot
    \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
    \ifboolexpe{%
      (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle})
      and
      test {\ifdefvoid{#2}}%
    }{}{%
      \printdelim{revsdnamepunct}}%
    \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
    \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
  }{%
    \usebibmacro{name:delim}{#1}%
    \usebibmacro{name:hook}{#1}%
    \mkbibnamefamily{#1}\isdot
    \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
    \ifboolexpe{%
      (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle})
      and
      test {\ifdefvoid{#2}}
      and
      test {\ifdefvoid{#3}}%
    }{}{%
      \printdelim{revsdnamepunct}}%
    \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
    \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
    \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
%    \end{macrocode}
%
% Oxford style (for the humanities) is to write author names surname first in
% the bibliography, but in natural order in citations. We implement this, along
% with the case changing option, in the following name format. We also add a
% second hash for checking if names (e.g.\@ |author| and |authoraddon|) are the
% same. We only need |name:revsdelim| on the first item, and only if it will be
% followed by something else.
%
%    \begin{macrocode}
\renewbibmacro*{name:revsdelim}{%
  \ifboolexpr{
    (
      test {\ifnumequal{\value{liststop}}{1}}
      and
      test \ifmorenames
    )
    or
    test {\ifnumequal{\value{liststop}}{2}}
  }
    {\printdelim{revsdnamedelim}}
    {}}
\def\blx@ox@lasthash{}
\DeclareNameFormat{bib-family-given/cite-given-family}{%
  \iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}%
  \ifitemannotation{inferred}{\bibopenbracket}{}%
  \ifbibliography{%
    \iftoggle{blx@ox@scnames}{%
      \renewcommand*{\mkbibnamefamily}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnamegiven}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnameprefix}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnamesuffix}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnametitle}[1]{##1}%
    }{}%
    \ifgiveninits{%
      \usebibmacro{name:family-title-given}%
        {\namepartfamily}%
        {\namepartgiveni}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }{%
      \usebibmacro{name:family-title-given}%
        {\namepartfamily}%
        {\namepartgiven}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }%
    \savefield{hash}{\blx@ox@lasthash}%
    \ifitemannotation{pseudo}{%
      \addspace\printtext[parens]{%
        \iftoggle{blx@ox@scnames}{%
          \textsc{\bibsstring{pseudo}}%
        }{%
          \bibsstring{pseudo}%
        }}%
    }{}%
    \iftoggle{blx@ox@scnames}{%
      \renewcommand*{\mkbibnamefamily}[1]{##1}%
      \renewcommand*{\mkbibnamegiven}[1]{##1}%
      \renewcommand*{\mkbibnameprefix}[1]{##1}%
      \renewcommand*{\mkbibnamesuffix}[1]{##1}%
      \renewcommand*{\mkbibnametitle}[1]{##1}%
    }{}%
    \ifboolexpe{%
      test {\ifnumequal{\value{listcount}}{\@ne}}
      and
      (
        test {\ifnumless{\value{listcount}}{\value{liststop}}}
        or
        test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
        or
        test {\ifandothers{\currentname}}
      )
      and not
      (
        test {\ifdefvoid\namepartgiven}
        and
        test {\ifdefvoid\namepartprefix}
      )
    }{\usebibmacro{name:revsdelim}}{}%
  }{%
%    \end{macrocode}
%
% Some implementations of |\lbx@finalnamedelim| do not allow logical tests to
% be included in the argument, so we need to spell out all these alternatives
% longhand.
%
%    \begin{macrocode}
    \ifgiveninits{%
      \ifitemannotation{pseudo}{%
        \usebibmacro{name:title-given-family}%
          {\biblstring{pseudo}\namepartfamily}%
          {\namepartgiveni}%
          {\namepartprefix}%
          {\namepartsuffix}%
          {\nameparttitle}%
      }{%
        \usebibmacro{name:title-given-family}%
          {\namepartfamily}%
          {\namepartgiveni}%
          {\namepartprefix}%
          {\namepartsuffix}%
          {\nameparttitle}}%
    }{%
      \ifitemannotation{pseudo}{%
        \usebibmacro{name:title-given-family}%
          {\biblstring{pseudo}\namepartfamily}%
          {\namepartgiven}%
          {\namepartprefix}%
          {\namepartsuffix}%
          {\nameparttitle}%
      }{%
        \usebibmacro{name:title-given-family}%
          {\namepartfamily}%
          {\namepartgiven}%
          {\namepartprefix}%
          {\namepartsuffix}%
          {\nameparttitle}}%
    }%
    \savefield{hash}{\blx@ox@lasthash}%
  }%
  \ifitemannotation{inferred}{\bibclosebracket}{}%
  \ifitemannotation{variant}{%
    \global\settoggle{blx@ox@variantname}{true}%
  }{%
    \global\settoggle{blx@ox@variantname}{false}}%
  \usebibmacro{name:andothers}%
  \iffieldannotation{inferred}{%
    \ifboolexpr{
      test {\ifnumequal{\value{listcount}}{\value{maxnames}}}
      or
      test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
      or (
        test {\ifnumequal{\value{listcount}}{\value{minnames}}}
        and
        test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
      )
    }{\bibclosebracket}{}%
  }{}%
}
%    \end{macrocode}
%
% We change the regular |given-family| format to include the alternative-name
% hash and use the title-enhanced name format. We also add a toggle for
% triggering special formatting if |authoraddon| or |editoraddon| are annotated
% with |variant|.
%
%    \begin{macrocode}
\newtoggle{blx@ox@variantname}
\DeclareNameFormat{given-family}{%
  \ifgiveninits
    {\usebibmacro{name:title-given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}
    {\usebibmacro{name:title-given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}%
  \savefield{hash}{\blx@ox@lasthash}%
  \ifitemannotation{variant}{%
    \global\settoggle{blx@ox@variantname}{true}%
  }{%
    \global\settoggle{blx@ox@variantname}{false}}%
  \usebibmacro{name:andothers}}
%    \end{macrocode}
%
% We do likewise for the regular |family-given| format. Also, we only want to
% use the |name:revsdelim| on the last name in the list if it will be followed
% by \enquote{et al.}.
%
%    \begin{macrocode}
\DeclareNameFormat{family-given}{%
  \ifgiveninits
    {\usebibmacro{name:family-title-given}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}
    {\usebibmacro{name:family-title-given}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}%
  \savefield{hash}{\blx@ox@lasthash}%
  \ifitemannotation{variant}{%
    \global\settoggle{blx@ox@variantname}{true}%
  }{%
    \global\settoggle{blx@ox@variantname}{false}}%
  \ifboolexpe{%
    (
      test {\ifnumless{\value{listcount}}{\value{liststop}}}
      or
      test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
      or
      test {\ifandothers{\currentname}}
    )
    and not
    (
      test {\ifdefvoid\namepartgiven}
      and
      test {\ifdefvoid\namepartprefix}
    )
  }{\usebibmacro{name:revsdelim}}{}%
  \usebibmacro{name:andothers}}
%    \end{macrocode}
%
% There is no comma before numeric suffixes, but there is before textual
% ones (e.g. \enquote{junior}).
%
%    \begin{macrocode}
\xpatchbibmacro{name:given-family}%
  {\bibnamedelimd\mkbibnamesuffix{#4}}%
  {\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch name:given-family}}
\xpatchbibmacro{name:family-given}%
  {\bibnamedelimd\mkbibnamesuffix{#4}}%
  {\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch name:family-given}}
%    \end{macrocode}
%
% Pseudonyms are printed after the main name, enclosed in parentheses (OGS) or
% brackets (NHR). \pkg{Biblatex} provides the |nameaddon| field for this
% use case, but it is a literal field (it doesn't format the name provided).
%
%    \begin{macrocode}
\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1}}
\DeclareFieldFormat{namevariant}{\mkbibparens{\bibstring{equals}\space #1}}
%    \end{macrocode}
%
% We have two use cases for a bibmacro that reimplements the loopcode logic of
% \cs{printnames}, but operates on two name lists simultaneously. One is to
% support the new name fields |authoraddon| and |editoraddon|; the other is to
% pair up names with the short form used in references, as required by
% \textsf{oxyear} below.
%
% We need to do this in a way that doesn't break the patterns used for
% configuring and adapting the punctuation that delimits the list items, so the
% |namepair:delim| macro does the same as |name:delim| but instead of reading
% the current counters, takes two extra arguments (in addition to the current name):
% the number of the current name pair and the total number of name pairs.
% The regular |finallistdelim| delimiter format looks up the value of the
% |liststop| counter, so we need to give it the right value.
%
%    \begin{macrocode}
\newbibmacro*{namepair:delim}[3]{%
  \ifnumgreater{#2}{\@ne}{%
    \ifnumless{#2}{#3}{%
      \printdelim{multinamedelim}%
    }{%
      \ifnumgreater{#3}{\c@maxnames}{%
        \c@liststop\c@minnames
      }{%
        \c@liststop#3}%
      \lbx@finalnamedelim{#1}}%
  }{}}
%    \end{macrocode}
%
% The |namepairs| bibmacro takes two arguments: the data fields holding the main
% name and alternative name respectively. When rendering the names, we use
% saveboxes to extract the hashes, and only print the alternative name if it has
% a different hash. In this case, we also switch to the \enquote{pair}
% delimiter context, where the |revsdnamedelim| (if any) is suppressed.
%
%    \begin{macrocode}
\DeclareFieldFormat{expanded}{\mkbibparens{#1}}
\newcounter{namepairs}
\newsavebox{\blx@ox@namebox}
\newsavebox{\blx@ox@altnamebox}
\newtoggle{blx@ox@thispairvariant}%
\newbibmacro*{namepairs}[2]{%
  \setcounter{namepairs}{0}%
  \savebibmacro{name:andothers}%
  \renewbibmacro*{name:andothers}{}%
  \whileboolexpr{%
    test {\ifnumless{\value{namepairs}}{\value{#1}}}
    and (
      test {\ifdefvoid{\c@maxnames}}
      or
      test {\ifnumequal{\c@maxnames}{0}}
      or
      test {\ifnumless{\value{#1}}{\c@maxnames}}
      or
      test {\ifnumequal{\value{#1}}{\c@maxnames}}
      or
      test {\ifdefvoid{\c@minnames}}
      or
      test {\ifnumequal{\c@minnames}{0}}
      or
      test {\ifnumless{\value{namepairs}}{\c@minnames}}
    )
  }{%
    \stepcounter{namepairs}%
    \savebox{\blx@ox@namebox}{%
      \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
    }%
    \let\blx@ox@firsthash=\blx@ox@lasthash
    \savebox{\blx@ox@altnamebox}{%
      \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
    }%
    \let\blx@ox@secondhash=\blx@ox@lasthash
    \iftoggle{blx@ox@variantname}{%
      \toggletrue{blx@ox@thispairvariant}%
    }{%
      \togglefalse{blx@ox@thispairvariant}%
    }%
%    \end{macrocode}
%
% This is the part intended for |authoraddon| and |editoraddon|. Note that it
% contains an additional test for the variant name toggle.
%
%    \begin{macrocode}
    \IfEndWith{#2}{addon}{%
      \usebibmacro{namepair:delim}%
        {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}%
      \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
        \hbox{}\unhbox\blx@ox@namebox
      }{%
        \iftoggle{blx@ox@thispairvariant}{%
          \ifbibliography{%
            \delimcontext{pair}%
            \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
            \setunit{\addspace}%
            \printtext[namevariant]{%
              \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}%
          }{%
            \hbox{}\unhbox\blx@ox@namebox
          }%
        }{%
          \delimcontext{pair}%
          \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
          \setunit{\addspace}%
          \printtext[nameaddon]{%
            \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
          }%
        }%
      }%
%    \end{macrocode}
%
% This is the part intended for |shortauthor| and |shorteditor|. There are
% differences in the formatting, and the alternative name is actually printed
% before the main name.
%
%    \begin{macrocode}
    }{%
      \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
        \usebibmacro{namepair:delim}%
          {\unhbox\blx@ox@namebox}{\value{namepairs}}{\value{#1}}%
        \hbox{}\unhbox\blx@ox@namebox
      }{%
        \usebibmacro{namepair:delim}%
          {\unhbox\blx@ox@altnamebox}{\value{namepairs}}{\value{#1}}%
        \delimcontext{pair}%
        \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
        \setunit{\addspace}%
        \printtext[expanded]{%
          \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
        }%
      }%
    }%
  }%
%    \end{macrocode}
%
% Now we return to common code.
%
%    \begin{macrocode}
  \ifboolexpr{
    test {\ifnumequal{\value{namepairs}}{\c@minnames}}
    and
    test {\ifnumgreater{\value{#1}}{\c@maxnames}}
  }{%
    \ifnumgreater{\c@minnames}{1}{%
      \finalandcomma
    }{}%
    \printdelim{andothersdelim}\bibstring{andothers}%
  }{}%
  \restorebibmacro{name:andothers}%
}
%    \end{macrocode}
%
% We use this now for authors. We provide additional handling to support
% printing editors or translators promoted to joint authorship status.
%
%    \begin{macrocode}
\newbibmacro*{author+altauthor}{%
  \ifboolexpr{
    test {\ifnameundef{authoraddon}}
    and
    test {\ifnameundef{jointauthor}}
  }{%
    \printnames{author}%
  }{%
    \ifnumequal{\value{authoraddon}}{\value{author}}{%
      \usebibmacro{namepairs}{author}{authoraddon}%
    }{%
      \printnames{author}%
      \ifnameundef{authoraddon}{}{%
        \setunit*{\addspace}%
        \printtext[nameaddon]{\printnames[byauthor]{authoraddon}}}%
    }%
    \ifnameundef{jointauthor}{}{%
      \setunit{\addcomma\space}%
      \iffieldundef{jointauthortype}{%
        \bibstring{byeditor}%
      }{%
        \printfield{jointauthortype}}%
      \setunit{\addspace}%
      \printnames[author]{jointauthor}%
    }%
  }%
}
\DeclareFieldFormat{jointauthortype}{%
  \ifbibstring{by#1}{\bibstring{by#1}}{#1}}
%    \end{macrocode}
%
% This is the (simpler) implementation for editors.
%
%    \begin{macrocode}
\newbibmacro*{editor+alteditor}{%
  \ifnameundef{editoraddon}{%
    \printnames{editor}%
  }{
    \ifnumequal{\value{editoraddon}}{\value{editor}}{%
      \usebibmacro{namepairs}{editor}{editoraddon}%
    }{%
      \printnames{editor}%
      \setunit*{\addspace}%
      \printtext[nameaddon]{\printnames[byeditor]{editoraddon}}%
    }%
  }%
}
%    \end{macrocode}
%
% Traditional Oxford style is to use dashes instead of repeating author
% names, but NHR recommends abandoning the practice as it interferes
% with text mining. We therefore turn this feature off by default, but allow
% authors to switch it on with |dashed=true|.
%
%    \begin{macrocode}
\newbibmacro*{bbx:savehash}{}
\DeclareBibliographyOption{dashed}[true]{%
  \ifstrequal{#1}{true}{%
    \ExecuteBibliographyOptions{pagetracker}%
    \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}%
  }{%
    \renewbibmacro*{bbx:savehash}{}%
  }%
}
\InitializeBibliographyStyle{%
  \global\undef\bbx@lasthash}
\newbibmacro*{bbx:dashcheck}[2]{%
  \ifboolexpr{
    test {\iffieldequals{fullhash}{\bbx@lasthash}}
    and
    not test \iffirstonpage
    and
    (
      not bool {bbx@inset}
      or
      test {\iffieldequalstr{entrysetcount}{1}}
    )
  }{#1}{#2}%
}
%    \end{macrocode}
%
% The following is used in the |authortitle| and |authoryear| styles to
% switch off the dash check macro for reference sets.
%
%    \begin{macrocode}
\newbool{bbx@inset}
\DeclareBibliographyDriver{set}{%
  \booltrue{bbx@inset}%
  \entryset{}{}%
  \newunit\newblock
  \usebibmacro{setpageref}%
  \finentry}
%    \end{macrocode}
%
% We provide options for how to handle the author name \enquote{Anonymous}.
%
%    \begin{macrocode}
\newtoggle{blx@ox@autoanon}
\newtoggle{blx@ox@abbranon}
\DeclareBibliographyOption[string]{anon}[short]{%
  \ifcsdef{blx@ox@opt@anon@#1}{%
    \csuse{blx@ox@opt@anon@#1}%
  }{%
    \PackageError{biblatex-oxref}
    {Invalid option 'anon=#1'}
    {Valid values are 'long', 'short', and 'literal'.}}}
\csdef{blx@ox@opt@anon@literal}{\togglefalse{blx@ox@autoanon}}
\csdef{blx@ox@opt@anon@long}{\toggletrue{blx@ox@autoanon}\togglefalse{blx@ox@abbranon}}
\csdef{blx@ox@opt@anon@short}{\toggletrue{blx@ox@autoanon}\toggletrue{blx@ox@abbranon}}
%    \end{macrocode}
%
% We copy the |author| to |rawauthor| for easier testing.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{
  \maps[datatype=bibtex]{%
    \map{%
      \step[fieldsource=author]%
      \step[fieldset=rawauthor, origfieldval]%
    }
  }%
}
%    \end{macrocode}
%
% The |author| macro is enhanced from the standard version by
% \begin{itemize}
%   \item
%   checking if the author name is \enquote{Anonymous};
%   \item
%   including a dash check, to see if the name(s) should be replaced
%   with a dash (as in |authortitle| and |authoryear|);
%   \item
%   inserting the |nameaddon| field if provided;
%   \item
%   inserting the author type if provided (as in |authoryear|).
% \end{itemize}
%
%    \begin{macrocode}
\newcommand*{\oxrefanon}{Anonymous}
\newtoggle{blx@ox@isanon}
\renewbibmacro*{author}{%
  \iffieldequals{rawauthor}{\oxrefanon}{%
    \toggletrue{blx@ox@isanon}%
  }{%
    \togglefalse{blx@ox@isanon}}%
  \ifboolexpr{
    test \ifuseauthor
    and
    ( not test {\ifnameundef{author}} )
    and (
      ( not togl {blx@ox@isanon} )
      or
      ( not togl {blx@ox@autoanon} )
      or
      test {\ifbibliography}
    )
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\usebibmacro{bbx:savehash}%
      \ifboolexpr{
        togl {blx@ox@autoanon}
        and
        togl {blx@ox@isanon}
      }{%
        \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
      }{%
        \usebibmacro{author+altauthor}%
      }%
      \iffieldundef{nameaddon}
      {}
      {\setunit{\addspace}%
        \printfield{nameaddon}}%
      \setunit{\printdelim{authortypedelim}}}%
    \iffieldundef{authortype}
    {}
    {\usebibmacro{authorstrg}%
      \setunit{\addspace}}}%
  {\global\undef\bbx@lasthash}}
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}
%    \end{macrocode}
%
% We make the punctuation between a title and \enquote{by [author]} configurable.
%
%    \begin{macrocode}
\newcommand{\titlebyauthordelim}{\addcomma\space}
%    \end{macrocode}
%
% Following |authortitle| and |authoryear|, we redefine the |editor| and
% |editor+others| macros to use a common |bbx:editor| macro. The macro
% we use is the similar to the normal one except we delegate printing editor
% names to |editor+alteditor|, and we don't yet add the year label.
%
%    \begin{macrocode}
\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\newbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\usebibmacro{editor+alteditor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{bbx:savehash}}%
    \usebibmacro{#1}%
    \clearname{editor}}
  {\global\undef\bbx@lasthash}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
%    \end{macrocode}
%
% We do the same for |translator| as well.
%
%    \begin{macrocode}
\renewbibmacro*{translator}{%
  \usebibmacro{bbx:translator}{translatorstrg}}
\renewbibmacro*{translator+others}{%
  \usebibmacro{bbx:translator}{translator+othersstrg}}
\newbibmacro*{bbx:translator}[1]{%
  \ifboolexpr{
    test \ifusetranslator
    and
    not test {\ifnameundef{translator}}
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\printnames{translator}%
      \setunit{\printdelim{translatortypedelim}}%
      \usebibmacro{bbx:savehash}}%
    \usebibmacro{#1}%
    \clearname{translator}%
    \setunit{\addspace}}%
  {\global\undef\bbx@lasthash}}
\xpatchbibmacro{translatorstrg}%
  {\bibstring}%
  {\bibstring[\mkbibparens]}%
{}{\wlog{WARNING: biblatex-oxref failed to patch translatorstrg}}%
\xpatchbibmacro{translator+othersstrg}%
  {\bibstring}%
  {\bibstring[\mkbibparens]}%
{}{\wlog{WARNING: biblatex-oxref failed to patch translator+othersstrg}}%
%    \end{macrocode}
%
% When referencing one work from a collection by the same author,
% Oxford style traditionally puts \enquote{id.} in the |bookauthor|
% position (instead of omitting it as in standard \pkg{biblatex}).
%
%    \begin{macrocode}
\renewbibmacro*{bybookauthor}{%
  \ifnamesequal{author}{bookauthor}%
  {\bibstring{idem\thefield{gender}}}%
  {\printnames{bookauthor}}}
%    \end{macrocode}
%
% Similarly, with mixed collections, if referencing a work by the editor
% of the collection, the editor name is replaced with \enquote{id.}. We
% insert this logic into a copy of the |editor+others| macro, which will
% \emph{not} get a year inserted into it by \textsf{oxyear}.
%
%    \begin{macrocode}
\newbibmacro*{bookeditor}{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }{%
    \ifnamesequal{author}{editor}{%
      \bibstring{idem\thefield{gender}}%
      \setunit{\addspace}%
      \usebibmacro{editor+othersstrg}%
      \clearname{editor}%
    }{%
      \printnames[bookeditor]{editor}%
      \setunit*{\addspace}%
      \usebibmacro{editor+othersstrg}%
      \clearname{editor}%
    }%
  }{}}
%    \end{macrocode}
%
% We provide a macro for printing series editors.
%
%    \begin{macrocode}
\newbibmacro*{byserieseditor}{%
  \ifnameundef{serieseditor}
    {}
    {\usebibmacro{bytypestrg}{serieseditor}{serieseditor}%
     \setunit{\addspace}%
     \printnames[byeditor]{serieseditor}%
     \newunit}}

%    \end{macrocode}
%
% \subsection{Titles}
%
% Title handling is mostly as it is in the standard styles, except
% that the |titleaddon| is printed in square brackets; it is not
% preceeded by punctuation.
%
%    \begin{macrocode}
\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
  {}
  {\printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\subtitlepunct}%
      \printfield[titlecase]{subtitle}}%
    \setunit{\addspace}}%
  \usebibmacro{origtitle}%
  \setunit*{\addspace}%
  \printfield{titleaddon}%
  \iffieldequalstr{relatedtype}{equals}{%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% The |origtitle| field is used for translated works. If the cited work is a
% native language translation of a foreign work, the original title is given
% in parentheses. If the cited work is foreign translation of a native language
% work, the original title is printed in square brackets, preceded by the name
% of the foreign language (if appropriate) and \enquote{translation of}.
%
%    \begin{macrocode}
\DeclareFieldFormat{origtitle}{\mkbibemph{#1}}
\newbibmacro*{origtitle}{%
  \iffieldundef{origtitle}{}{%
    \iflistundef{language}{%
      \printtext[parens]{\printfield{origtitle}}%
    }{%
      \printtext[brackets]{%
        \blx@ox@langbibstring{\printlist{language}}{translationof}\addspace
        \printfield{origtitle}}}}}
%    \end{macrocode}
%
% \subsection{Dates and times}
%
% Year ranges are truncated (e.g.~2012–3). Therefore, we provide a command that
% compares two years, and outputs a full or truncated version of the second
% year, depending on how similar it is to the first. It is adapted from code by
% Marco Daniel.\footnote{\url{http://tex.stackexchange.com/questions/23483/}}
%
%    \begin{macrocode}
\newcommand{\blx@ox@compyear}[2]{%
  \def\num@one{#1}%
  \def\num@two{#2}%
  \StrLen{\num@one}[\num@one@len]%
  \StrLen{\num@two}[\num@two@len]%
%    \end{macrocode}
%
% The year is only trimmed if it is greater than, but has the same number of
% digits as, the comparison number.
%
%    \begin{macrocode}
  \ifboolexpr{
    test {\ifnumequal{\num@one@len}{\num@two@len}}
    and
    test {\ifnumless{\num@one}{\num@two}}
  }{%
%    \end{macrocode}
%
% For years since 1000, at least two digits must be the same before trimming
% occurs.
%
%    \begin{macrocode}
    \StrCompare{\num@one}{\num@two}[\Result]%
    \ifnum\num@two@len>3%
      \IfStrEq{\Result}{2}{\def\Result{1}}{}%
    \fi
%    \end{macrocode}
%
% In legal references, the truncated year is at least two digits.
%
%    \begin{macrocode}
    \ifboolexpr{
      (
        test {\ifentrytype{jurisdiction}}
        or
        test {\ifentrytype{legislation}}
      )
      and
      test {\IfStrEq{\Result}{4}}
    }{\def\Result{3}}{}%
%    \end{macrocode}
%
% Since \cs{Result} is the number of digits to trim from the left hand side of
% the year, plus one, we provide an extra sacrificial zero before trimming.
%
%    \begin{macrocode}
    \StrGobbleLeft{0\num@two}{\Result}%
  }{\num@two}}
%    \end{macrocode}
%
% We patch the date range formats from |biblatex.sty| to use the
% above function.
%
%    \begin{macrocode}
\patchcmd{\mkdaterangefull}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangefull}}
\patchcmd{\mkdaterangefullextra}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangefullextra}}
\patchcmd{\mkdaterangetrunc@i}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangetrunc@i}}
\patchcmd{\mkdaterangetruncextra@i}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangetruncextra@i}}
%    \end{macrocode}
%
% We provide a way of prefacing dates (and times) with a type. This is mainly
% intended for online resources.
%
%    \begin{macrocode}
\DeclareFieldFormat{datetype}{%
  \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
}
\newtoggle{blx@ox@timefirst}
\DeclareBiblatexOption{global,type,entry}{timefirst}[true]{%
  \settoggle{blx@ox@timefirst}{#1}}
\newbibmacro*{date+time}{%
  \ifboolexpr{
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
    and
    test {\iffieldundef{hour}}
  }{}{%
    \printfield{datetype}}%
  \setunit*{\addspace}%
  \iftoggle{blx@ox@timefirst}{%
    \printtime
    \setunit*{\addcomma\space}}{}%
  \printdate
  \iftoggle{blx@ox@timefirst}{}{%
    \setunit*{\addcomma\space}%
    \printtime}%
}
\renewbibmacro*{date}{\usebibmacro{date+time}}
%    \end{macrocode}
%
% We provide an equivalent for origdate. This is mainly intended for
% audiovisual resources (for the date of recording).
%
%    \begin{macrocode}
\DeclareFieldFormat{origdatetype}{%
  \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
}
\newbibmacro*{origdate+time}{%
  \ifboolexpr{
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origyeardivision}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{orighour}}
  }{}{%
    \printfield{origdatetype}}%
  \setunit*{\addspace}%
  \iftoggle{blx@ox@timefirst}{%
    \printorigtime
    \setunit*{\addcomma\space}}{}%
  \printorigdate
  \iftoggle{blx@ox@timefirst}{}{%
    \setunit*{\addcomma\space}%
    \printorigtime}%
}
%    \end{macrocode}
%
% If a date is inferred, it goes in square brackets.
%
%    \begin{macrocode}
\DeclareFieldFormat{date}{%
  \def\currentfield{date}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
\DeclareFieldFormat{origdate}{%
  \def\currentfield{origdate}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
\DeclareFieldFormat{eventdate}{%
  \def\currentfield{eventdate}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
%    \end{macrocode}
%
% \subsection{Editions, pages, and other number-like fields}
%
% We let |edition| take a localization key as well as a number.
%
%    \begin{macrocode}
\xpatchfieldformat{edition}%
  {#1\isdot}%
  {\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch edition}}
%    \end{macrocode}
%
% Page ranges are compressed, but are not usually marked with
% \enquote{pp.}. The exception is if the page numbers are not obviously
% numbers.
%
%    \begin{macrocode}
\DeclareFieldFormat{pages}{%
  \iffieldundef{bookpagination}%
    {\mkcomprange{#1}}%
    {\mkpageprefix[bookpagination][\mkcomprange]{#1}}%
}
%    \end{macrocode}
%
% The same is true in citations.
%
%    \begin{macrocode}
\DeclareFieldFormat{postnote}{%
  \iffieldundef{pagination}%
  {\mkcomprange{#1}}%
  {\mkpageprefix[pagination][\mkcomprange]{#1}}%
}

%    \end{macrocode}
%
% \subsection{Publishers}
%
% The \emph{Oxford Guide to Style} says it is fine to omit publisher
% names uniformly from bibliographic information. This is odd, but we
% can support it with a simple option.
%
%    \begin{macrocode}
\DeclareBibliographyOption{nopublisher}[true]{%
  \DeclareFieldInputHandler{publisher}{\def\NewValue{}}%
}
%    \end{macrocode}
%
% The style guides are less forgiving about omitting the place of publication.
% We provide a bibliography option that fills in such gaps with the |nolocation|
% localization string for selected entry types. It works using a source map,
% which is a clean solution but cannot easily be switched off again or used on a
% per-type basis.
%
%    \begin{macrocode}
\DeclareBibliographyOption{nolocation}[true]{%
  \DeclareStyleSourcemap{
    \maps[datatype=bibtex]{
      \map{
        \pertype{book}
        \pertype{mvbook}
        \pertype{bookinbook}
        \pertype{inbook}
        \pertype{suppbook}
        \pertype{collection}
        \pertype{mvcollection}
        \pertype{incollection}
        \pertype{suppcollection}
        \pertype{reference}
        \pertype{mvreference}
        \pertype{inreference}
        \pertype{proceedings}
        \pertype{mvproceedings}
        \pertype{inproceedings}
        \step[notfield=location, fieldset=location, fieldvalue={\noexpand\bibstring{nolocation}}]
      }
    }
  }%
}
%    \end{macrocode}
%
% We also provide an entry option that has the same effect; this works using
% the \cs{restorelist} mechanism instead.
%
%    \begin{macrocode}
\newtoggle{blx@ox@noloc}
\def\blx@ox@noloc{{\bibstring{nolocation}}}
\DeclareEntryOption{nolocation}[true]{%
  \settoggle{blx@ox@noloc}{#1}%
  \iflistundef{location}{%
    \iftoggle{blx@ox@noloc}{\restorelist{location}{\blx@ox@noloc}}{}%
  }{}}
%    \end{macrocode}
%
% \subsection{URLs}
%
% The OGS recommends the ISO convention of enclosing URLs in angle
% brackets, but NHR recommends leaving URLs bare so as not to interfere
% with text-mining. The latter is the default.
%
%    \begin{macrocode}
\DeclareBibliographyOption{isourls}[true]{%
  \ifstrequal{#1}{true}
    {\DeclareFieldFormat{url}{$\langle$\url{##1}$\rangle$}}
    {\DeclareFieldFormat{url}{\url{##1}}}%
}
\ExecuteBibliographyOptions{isourls=false}
%    \end{macrocode}
%
% NHR specifies that URLs should be broken across lines after slashes
% and percents, and before other punctuation. They should never break
% after hyphens.
%
%    \begin{macrocode}
\renewcommand*{\biburlsetup}{%
  \Urlmuskip=0mu plus 2mu\relax
  \mathchardef\UrlBigBreakPenalty=100\relax
  \mathchardef\UrlBreakPenalty=200\relax
  \def\UrlBigBreaks{\do\/\do\:}%
  \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}%
  \def\UrlBreaks{%
    \do\>\do\}\do\]\do\)\do\\\do\|%
    \do\'\do\$\do\*\do\^\do\"}%
  \appto\UrlSpecials{%
    \do\!{\mathbin{}\mskip-\Urlmuskip\mathchar`\!\mskip\Urlmuskip}%
    \do\&{\mathbin{}\mskip-\Urlmuskip\mathchar`\&\mskip\Urlmuskip}%
    \do\+{\mathbin{}\mskip-\Urlmuskip\mathchar`\+\mskip\Urlmuskip}%
    \do\,{\mathbin{}\mskip-\Urlmuskip\mathchar`\,\mskip\Urlmuskip}%
    \do\-{\mathbin{}\mskip-\Urlmuskip\mathchar`\-\mskip\Urlmuskip}%
    \do\.{\mathbin{}\mskip-\Urlmuskip\mathchar`\.\mskip\Urlmuskip}%
    \do\;{\mathbin{}\mskip-\Urlmuskip\mathchar`\;\mskip\Urlmuskip}%
    \do\={\mathbin{}\mskip-\Urlmuskip\mathchar`\=\mskip\Urlmuskip}%
    \do\?{\mathbin{}\mskip-\Urlmuskip\mathchar`\?\mskip\Urlmuskip}%
    \do\_{\mathbin{}\mskip-\Urlmuskip\_\mskip\Urlmuskip}%
    \do\#{\mathbin{}\mskip-\Urlmuskip\#\mskip\Urlmuskip}%
  }%
  \ifnumgreater{\value{biburlnumpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlnumpenalty}}}}%
     \do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
    {}%
  \ifnumgreater{\value{biburlucpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlucpenalty}}}}%
     \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
     \do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T
     \do\U\do\V\do\W\do\X\do\Y\do\Z}
    {}%
  \ifnumgreater{\value{biburllcpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburllcpenalty}}}}%
     \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j
     \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t
     \do\u\do\v\do\w\do\x\do\y\do\z}
    {}%
  \let\do=\noexpand}
%    \end{macrocode}
%
% URL dates are set off with a comma rather than parentheses.
%
%    \begin{macrocode}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\xpatchbibmacro{url+urldate}%
  {\setunit*{\addspace}}%
  {\setunit*{\addcomma\addspace}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch url+urldate}}
%    \end{macrocode}
%
% The DOI is introduced by \enquote{doi} in lowercase.
%
%    \begin{macrocode}
\xpatchfieldformat{doi}%
  {\mkbibacro{DOI}}%
  {\printtext{doi}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch doi}}
%    \end{macrocode}
%
% Unlike URLs, DOIs are preceded by a full stop.
%
%    \begin{macrocode}
\xpatchbibmacro{doi+eprint+url}%
  {\printfield{doi}}%
  {\setunit{\addperiod\space}\printfield{doi}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch doi+eprint+url}}

%    \end{macrocode}
%
% \subsection{Addenda}
%
% The publication state is given in parentheses. Other addenda are added
% plain.
%
%    \begin{macrocode}
\renewbibmacro*{addendum+pubstate}{%
  \ifboolexpr{
    test {\iffieldundef{pubstate}}
    or
    test {\iffieldequalstr{labeldatesource}{pubstate}}
  }{}{%
    \nopunct
    \ifbibstring{\thefield{pubstate}}{%
      \printtext[pubstate]{\bibstring{\thefield{pubstate}}}%
    }{%
      \printfield{pubstate}}}%
  \setunit{\addsemicolon\addspace}\newblock
  \printfield{addendum}}
\DeclareFieldFormat{pubstate}{\mkbibparens{#1}}
%    \end{macrocode}
%
% Publication descriptions are printed plain for unpublished works, and in
% brackets for other entry types.
%
%    \begin{macrocode}
\DeclareFieldFormat{howpublished}{\mkbibbrackets{#1}}
\DeclareFieldFormat[misc,unpublished]{howpublished}{#1}
%    \end{macrocode}
%
% \subsection{Articles and periodicals}
%
% Subtypes for articles and similar are in square brackets.
%
%    \begin{macrocode}
\DeclareFieldFormat[article,periodical,suppperiodical,review]{entrysubtype}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% We provide a configurable command for testing if a title is abbreviated. We
% test for ASCII capitals and a limited number of accented capitals by default,
% but users can extend or replace the list if it causes problems.
%
%    \begin{macrocode}
\global\let\blx@ox@abbrevstring\@empty
\newrobustcmd*{\DeclareAbbrEndChars}{%
  \@ifstar{%
    \blx@ox@apptoabbrevstring
  }{%
    \global\let\blx@ox@abbrevstring\@empty
    \blx@ox@apptoabbrevstring}}
\def\blx@ox@apptoabbrevstring#1{
  \xdef\blx@ox@abbrevstring{\blx@ox@abbrevstring#1}}
\DeclareAbbrEndChars{%
  A\^{A}BCDEFG\u{G}HI\^{I}JKLMNO\"{O}\^{O}PQRSTU\"{U}\^{U}VWXYZ.}%
\newcommand*{\ifabbrev}[3]{%
  \StrRight{#1}{1}[\blx@ox@lastchar]%
  \expandafter\IfSubStr*{\blx@ox@abbrevstring}{\blx@ox@lastchar}{#2}{#3}%
}
%    \end{macrocode}
%
% We renew the |journal+issuetitle| macro so that if a work takes up a
% whole issue (signified by using |issuetitle| \emph{instead} of
% |title|), the title and journal title are separated by \enquote{=}
% instead of the usual punctuation. It also inserts an appropriate localization
% string if the publication status demands it.
% We insert a comma after the journal title, regardless of what follows.
% There is also a comma after numeric (but not textual) series.
%
%    \begin{macrocode}
\renewbibmacro*{journal+issuetitle}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    not test {\iffieldundef{issuetitle}}
  }{%
    \usebibmacro{issue}%
    \setunit{\addspace =\addspace}%
  }{%
    \ifboolexpr{
      ( not test {\iffieldundef{pubstate}} )
      and
      test {\ifbibxstring{\thefield{pubstate}in}}
    }{%
      \printtext{\bibstring{\thefield{pubstate}in}\space}%
      \clearfield{pubstate}%
    }{}}%
  \usebibmacro{journal}%
  \iffieldundef{journalsubtitle}{%
    \ifabbrev{\strfield{journaltitle}}{\setunit{\addspace}}{\newunit}%
  }{%
    \ifabbrev{\strfield{journalsubtitle}}{\setunit{\addspace}}{\newunit}}%
  \iffieldundef{series}{}{%
    \newunit\newblock
    \printfield{series}%
    \ifbibxstring{\thefield{series}}{%
      \setunit{\addspace}%
    }{%
      \newunit}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \newunit}
%    \end{macrocode}
%
% We renew the |title+issuetitle| macro (for whole periodical issues) to apply
% the same punctuation changes after the periodical name and series. At the
% same time, we delegate handling of volume and issue numbers to the appropriate
% macro so we can customize it.
%
%    \begin{macrocode}
\renewbibmacro*{title+issuetitle}{%
  \usebibmacro{periodical}%
  \iffieldundef{subtitle}{%
    \ifabbrev{\strfield{title}}{\setunit{\addspace}}{\newunit}%
  }{%
    \ifabbrev{\strfield{subtitle}}{\setunit{\addspace}}{\newunit}}%
  \iffieldundef{series}{}{%
    \newunit\newblock
    \printfield{series}%
    \ifbibxstring{\thefield{series}}{%
      \setunit{\addspace}%
    }{%
      \newunit}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \newunit}
%    \end{macrocode}
%
% OGS and NHR provide plentiful options for formatting volume and issue
% numbers. We implement four of them here as options. The default is to
% use a slash between volume and issue number. Note that we prevent the
% |volume+number+eid| macro from actually printing the EID; this is printed
% by |issue+date| instead (see below).
%
%    \begin{macrocode}
\DeclareBibliographyOption[string]{issuestyle}[slash]{%
  \ifcsdef{blx@ox@issuestyle@#1}{%
    \csuse{blx@ox@issuestyle@#1}%
  }{%
    \PackageError{biblatex-oxref}
      {Invalid option 'issuestyle=#1'}
      {Valid values are 'slash', 'colon', 'comma', 'parens'}%
  }%
}
\csdef{blx@ox@issuestyle@slash}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addslash}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@colon}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addcolon\space}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@comma}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addcomma\space}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@parens}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addspace}%
    \printfield[parens]{number}%
  }%
}
\ExecuteBibliographyOptions{issuestyle=slash}
%    \end{macrocode}
%
% OGS consistently prints dates of newspapers and magazines bare, but those
% of academic journals in parentheses. NHR seems to favour printing dates in
% parentheses regardless, but notes that some publishing houses take the OGS
% approach.
%
% We provide an option for switching between the two approaches. If active
% and an issue has no volume or issue numbers (first block), the year division
% and date are printed bare. Otherwise (second block) they are printed
% in parentheses just as in the standard version of the macro.
%
%    \begin{macrocode}
\newtoggle{blx@ox@varissuedate}
\DeclareBiblatexOption{global,type,entry}{varissuedate}[true]{%
  \settoggle{blx@ox@varissuedate}{#1}}
\DeclareBiblatexOption{global,type,entry}{issuedate-plain}[true]{%
  \settoggle{blx@ox@varissuedate}{#1}}
\renewbibmacro*{issue+date}{%
  \ifboolexpr{
    test {\iffieldundef{issue}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \ifboolexpr{
      togl {blx@ox@varissuedate}
      and
      test {\iffieldundef{volume}}
      and
      test {\iffieldundef{number}}
    }{%
      \newunit
      \printtext{%
        \iffieldundef{issue}{%
          \usebibmacro{date}
        }{%
          \printfield{issue}%
          \setunit*{\addspace}%
          \usebibmacro{date}}}%
    }{%
      \printtext[parens]{%
        \iffieldundef{issue}{%
          \usebibmacro{date}%
        }{%
          \printfield{issue}%
          \setunit*{\addspace}%
          \usebibmacro{date}}}}}%
  \newunit
  \printfield{eid}%
}
%    \end{macrocode}
%
% Our |article| driver is like the standard one except
% \begin{itemize}
%   \item it has no \enquote{in} macro;
%   \item there is a handler for the suppto relation;
%   \item there is no language macro;
%   \item the punctuation before related items is configurable.
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldequalstr{relatedtype}{suppto}{%
    \setunit{\addsemicolon\space}%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \newunit
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Similar changes are made to the |periodical| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{periodical}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title+issuetitle}%
  \newunit\newblock
  \usebibmacro{byeditor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The |suppperiodical| driver is just like the |article| one, except the note
% comes sooner after the title. This is to allow it to be used as a descriptor.
% Since we're breaking the alias, we need to explicitly replicate the article
% formatting for the rest of the entry.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppperiodical]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[suppperiodical]{volume}{#1}% volume of a journal
\DeclareFieldFormat[suppperiodical]{number}{#1}% number of a journal
\DeclareFieldFormat[suppperiodical]{series}{% series of a journal
  \ifinteger{#1}
  {\mkbibordseries{#1}~\bibstring{jourser}}
  {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
\DeclareBibliographyDriver{suppperiodical}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{note}\clearfield{note}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldequalstr{relatedtype}{suppto}{%
    \setunit{\addsemicolon\space}%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \newunit
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Books and works in books}
%
% By default, editors do not appear before the title in book or reference
% entries.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions[book,mvbook,reference,mvreference]{useeditor=false,usetranslator=false}
%    \end{macrocode}
%
% The titles of books that have been collected into an anthology are
% treated like regular chapters and set in quotes. Poems and plays,
% however, are set in italics.
%
%    \begin{macrocode}
\DeclareFieldFormat[bookinbook]{title}{%
  \ifboolexpr{
    test {\iffieldequalstr{entrysubtype}{poem}}
    or
    test {\iffieldequalstr{entrysubtype}{play}}
  }{%
    \mkbibemph{#1}%
  }{%
    \mkbibquote{#1\isdot}}}
%    \end{macrocode}
%
% Unlike the standard styles, we have a separate driver for |inreference|,
% so we need to change the title style accordingly.
%
%    \begin{macrocode}
\DeclareFieldFormat[inreference]{title}{\mkbibquote{#1\isdot}}
%    \end{macrocode}
%
% Volume numbers in monograph-style entries are formatted as roman
% numerals (if they are indeed numbers). We take some care here to support
% simple ranges (e.g.\@ 1-3, 4--9). Support for more complex ranges may be
% considered on request.
%
%    \begin{macrocode}
\newcommand*{\mkvolroman}[1]{\Rn{#1}}
\DeclareFieldFormat[book,mvbook,bookinbook,inbook,suppbook,%
collection,mvcollection,incollection,suppcollection,%
proceedings,mvproceedings,inproceedings,%
reference,mvreference,inreference]{volume}{%
\IfSubStr{#1}{-}{%
  \StrCount{#1}{-}[\blx@ox@dashnum]%
  \StrBefore{#1}{-}[\blx@ox@volnum]%
  \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash
  \StrBehind[\blx@ox@dashnum]{#1}{-}[\blx@ox@volnum]%
  \expandafter\ifinteger\blx@ox@volnum{\mkvolroman{\blx@ox@volnum}}{\blx@ox@volnum}%
}{%
  \ifinteger{#1}{\mkvolroman{#1}}{#1}}}
%    \end{macrocode}
%
% Where a multi-volume work is more like a series, the volume number and
% main title are put in a bracketted block between the volume title
% and the usual publication block.
%
%    \begin{macrocode}
\newbibmacro*{maintitle+volume}{%
  \ifboolexpr{
    test {\iffieldundef{maintitle}}
    or
    test {\iffieldundef{volume}}
  }{}%
  {\printtext[maintitle+volume]{%
    \bibstring{volume}\addspace
    \printfield{volume}\printfield{part}\addspace
    \bibstring{ofseries}\addspace
    \usebibmacro{maintitle}}}
}
\DeclareFieldFormat{maintitle+volume}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% The |in| before the booktitle is suppressed for works in yearbooks.
%
%    \begin{macrocode}
\renewbibmacro*{in:}{%
  \iffieldequalstr{entrysubtype}{yearbook}{}{%
    \bibstring{in}%
    \printunit{\intitlepunct}}}
%    \end{macrocode}
%
% Oxford style signifies formal publication by putting the relevant
% details in parentheses.
%
%    \begin{macrocode}
\DeclareFieldFormat{publication}{\mkbibparens{#1}}
%    \end{macrocode}
%
% Standard \pkg{biblatex} puts a space between series name and number.
% OGS separates them with a comma. It also has an example with a series editor.
%
%    \begin{macrocode}
\renewbibmacro*{series+number}{%
    \printfield{series}%
    \setunit*{\addcomma\space}%
    \usebibmacro{byserieseditor}%
    \setunit*{\addcomma\space}%
    \printfield{number}}
%    \end{macrocode}
%
% We provide an option for displaying the series information before, instead of
% within, the publication block.
%
%    \begin{macrocode}
\newtoggle{blx@ox@altbookseries}
\DeclareBibliographyOption[string]{bookseries}[in]{%
  \ifstrequal{#1}{out}{%
    \toggletrue{blx@ox@altbookseries}%
  }{%
    \togglefalse{blx@ox@altbookseries}%
    \ifstrequal{#1}{in}{}{%
      \PackageError{biblatex-oxref}
      {Invalid option 'bookseries=#1'}
      {Valid values are 'in' and 'out'.}}}}
%    \end{macrocode}
%
% If there are the same number of locations and publishers, and there are more
% than one pair, we print them pairwaise rather than in two separate lists. In
% order to do this while retaining the normal mechanisms for punctuating the
% list, we need a |listpair:delim| macro similar to |namepair:delim| (above)
% that uses the generic list punctuation. Again, the three arguments are the
% item being printed, the number of the current item pair and the total number
% of item pairs.
%
%    \begin{macrocode}
\newbibmacro*{listpair:delim}[3]{%
  \ifnumgreater{#2}{\@ne}{%
    \ifnumless{#2}{#3}{%
      \printdelim{multilistdelim}%
    }{%
      \c@liststop#3%
      \lbx@finallistdelim{#1}}%
  }{}}
%    \end{macrocode}
%
% We use this as the basis of a list format that will be applied to the location
% element of a location--publisher pair.
%
%    \begin{macrocode}
\newcounter{locpubpairs}
\DeclareListFormat{locpub}{%
  \usebibmacro{listpair:delim}%
    {#1}{\value{locpubpairs}}{\value{location}}%
  #1\isdot
}
%    \end{macrocode}
%
% When citing both the first and a later edition, the first one comes
% first, and the later one comes after a semicolon. As per standard
% \pkg{biblatex}, the elements of a single edition are separated by commas
% except that the publisher is preceded by a colon. The origdate is only
% printed here if at least one of the edition, the origlocation or the
% origpublisher is also specified.
%
%    \begin{macrocode}
\newsavebox{\blx@ox@locbox}
\newbibmacro*{edition+publisher+location+date}{%
  \printlist{origlocation}%
  \iflistundef{origpublisher}%
    {\setunit*{\addcomma\space}}%
    {\setunit*{\addcolon\space}}%
  \printlist{origpublisher}%
  \setunit*{\addcomma\space}%
  \ifboolexpr{
    test {\iflistundef{origlocation}}
    and
    test {\iflistundef{origpublisher}}
    and
    test {\iffieldundef{edition}}
  }{}{%
    \printorigdate}%
  \setunit{\addsemicolon\space}%
  \printfield{edition}%
  \setunit*{\addcomma\space}%
%    \end{macrocode}
%
% As mentioned, if there are the same number of locations and publishers, and
% there are more than one pair, we print them pairwaise rather than in two
% separate lists. This uses the same principle as the |namepairs| bibmacro,
% but does not have the list truncation apparatus. This time we use a savebox
% just for efficiency.
%
%    \begin{macrocode}
  \ifboolexpr{%
    test {\ifnumcomp{\value{publisher}}{>}{1}}
    and
    test {\ifnumequal{\value{location}}{\value{publisher}}}
  }{%
    \setcounter{locpubpairs}{0}%
    \savebibmacro{list:andothers}%
    \renewbibmacro*{list:andothers}{}%
    \whileboolexpr{%
      test {\ifnumcomp{\value{locpubpairs}}{<}{\value{publisher}}}
    }{%
      \stepcounter{locpubpairs}%
      \printlist[locpub][\value{locpubpairs}-\value{locpubpairs}]{location}%
      \setunit{\addcolon\space}%
      \printlist[][\value{locpubpairs}-\value{locpubpairs}]{publisher}%
    }%
    \restorebibmacro{list:andothers}%
  }{%
    \printlist{location}%
    \iflistundef{publisher}%
    {\setunit*{\addcomma\space}}%
    {\setunit*{\addcolon\space}}%
    \printlist{publisher}%
  }%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
}
%    \end{macrocode}
%
% Oxford style is to provide publication details –
% series name and number, edition, publisher, location, date –
% in a parenthetical block after the title information.
%
%    \begin{macrocode}
\newbibmacro*{series+number+edition+publisher+location+date}{%
  \iftoggle{blx@ox@altbookseries}{%
    \usebibmacro{series+number}%
    \setunit{\addspace}\newblock}{}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{edition}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
    \iftoggle{blx@ox@altbookseries}{}{%
      \usebibmacro{series+number}%
      \setunit{\addsemicolon\addspace}}%
    \usebibmacro{edition+publisher+location+date}%
    \usebibmacro{copub}}}%
  \iffieldequalstr{relatedtype}{copub}{\clearfield{related}}%
  \setunit{\addspace}\newblock
  \usebibmacro{origpub}%
}
%    \end{macrocode}
%
% The edition information for reference works is recorded earlier in the
% reference, so we provide a variant that excludes it from the
% publication block.
%
%    \begin{macrocode}
\newbibmacro*{series+number+publisher+location+date}{%
  \iftoggle{blx@ox@altbookseries}{%
    \usebibmacro{series+number}%
    \setunit{\addspace}\newblock}{}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
    \iftoggle{blx@ox@altbookseries}{}{%
      \usebibmacro{series+number}%
      \setunit{\addsemicolon\addspace}}%
    \usebibmacro{publisher+location+date}%
    \usebibmacro{copub}}}%
  \iffieldequalstr{relatedtype}{copub}{\clearfield{related}}%
  \setunit{\addspace}\newblock
  \usebibmacro{origpub}%
}
%    \end{macrocode}
%
% The |copub| macro prints co-publication details.
%
%    \begin{macrocode}
\newbibmacro*{copub}{%
  \ifboolexpr{
    togl {bbx:related}
    and
    test {\iffieldequalstr{relatedtype}{copub}}
  }{%
    \setunit{\addsemicolon\space}%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
}
%    \end{macrocode}
%
% The |origpub| macro prints the origdate field if it has not yet been cleared.
%
%    \begin{macrocode}
\newbibmacro*{origpub}{%
  \ifboolexpr{
    test {\iflistundef{origlocation}}
    and
    test {\iflistundef{origpublisher}}
    and
    test {\iffieldundef{edition}}
    and
    ( not test {\iffieldundef{origyear}} )
  }{%
    \printtext[parens]{\bibstring{origpubin}\space\printorigdate}%
  }{}%
}
%    \end{macrocode}
%
% The changes to the |book| driver compared to the standard style are as
% follows:
% \begin{itemize}
%   \item
%   |maintitle| is processed with |volume| just before |series|, instead
%   of with |title|;
%   \item
%   |edition| is processed where the standard style processes |note|,
%   and vice versa;
%   \item
%   |volumes| is omitted;
%   \item
%   |series| to |date| information is delegated to a separate macro;
%   \item
%   support is added for |howpublished| field;
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+edition+publisher+location+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Unlike the standard styles, we have a separate driver for |mvbook|
% which behaves slightly differently. It is in fact closer to the
% standard |book| driver. The changes are as follows:
% \begin{itemize}
%   \item
%   |volume|/|part| is processed just after |maintitle+title|;
%   \item
%   |edition| is processed where the standard style processes |note|;
%   \item
%   |note| is processed after |volumes|;
%   \item
%   |series| to |date| information is delegated to a separate macro;
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inbook| driver modifies the standard one in just the same way as
% our |mvbook| driver modifies the standard |book|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |suppbook| driver is just like |inbook| except that the note is moved
% nearer the title so it can be used as a descriptor.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppbook]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibemph{#1}}%
  \undef\currentfield}
\DeclareBibliographyDriver{suppbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \setunit{\addspace}\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We also provide a |bookinbook| driver that handles \code{origdate}
% differently.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{bookinbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |collection| driver modifies the standard one in just the same way
% as our |book| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{collection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+edition+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |mvcollection| driver modifies the standard |collection| driver
% in just the same way as our |mvbook| driver modifies the standard
% |book|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvcollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |incollection| driver modifies the standard one in the same way as
% our |mvbook| driver modifies the standard |book|. In addition, the
% |bookeditor| macro precedes |maintitle| instead of |byeditor+others|
% following it.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bookeditor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |suppcollection| driver is just like |incollection| except that the note
% is moved nearer the title so it can be used as a descriptor.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppcollection]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibemph{#1}}%
  \undef\currentfield}
\DeclareBibliographyDriver{suppcollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \setunit{\addspace}\newblock
  \usebibmacro{in:}%
  \usebibmacro{bookeditor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock%
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Unlike the standard styles, we provide a separate driver for
% |reference|. It is just like |book| except that |edition| is given
% directly after the title.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{reference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \printfield{edition}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Similarly, |mvreference| is just like |mvbook| except that |edition|
% is given directly after the title.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvreference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \newunit\newblock
  \printfield{edition}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inreference| driver is just like |inbook| except |bookeditor|
% replaces |bybookauthor| and |edition| is given just before
% |byeditor+others|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inreference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \iffieldundef{editor}{}{%
    \usebibmacro{in:}%
    \usebibmacro{bookeditor}%
    \newunit\newblock}%
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \usebibmacro{series+number+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Works presented at meetings}
%
% By default, editors do not appear before the title in proceedings
% entries.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions[proceedings,mvproceedings]{useeditor=false,usetranslator=false}
%    \end{macrocode}
%
% In our version of the |event+venue+date| macro, the venue and date
% are set off with commas respectively instead of
% parentheses.
%
%    \begin{macrocode}
\renewbibmacro*{event+venue+date}{%
  \printfield{eventtitle}%
  \newunit
  \printfield{eventtitleaddon}%
  \newunit
  \printfield{venue}%
  \newunit%
  \printeventdate%
  \newunit}
%    \end{macrocode}
%
% The changes to the |proceedings| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   We support the concept of an |author| before the title,
%   which is usually the |organization|;
%   \item
%   |editor| comes after the title, not before;
%   \item
%   |volume|/|part| is processed just after |maintitle+title|;
%   \item
%   |note| is moved to before |series|;
%   \item
%   |series| to |date| information is delegated to a separate macro;
% \end{itemize}
%
% As in the (inherited) standard style, |mvproceedings| is an alias for this
% driver, since it is unlikely that the proceedings of a single meeting will
% be split into long series of independently published volumes!
%
%    \begin{macrocode}
\DeclareBibliographyDriver{proceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \newunit
  \usebibmacro{maintitle+title}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{series+number+edition+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inproceedings| driver modifies the standard one in the same way
% as our |proceedings| driver modifies the standard one.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{series+number+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Grey literature}
%
% We provide a macro for handling |type+number|. We provide some extra
% logic to insert \enquote{No.\@} before the number if there is no type.
%
%    \begin{macrocode}
\newbibmacro*{series+type+number}{%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{type}}
  }{}{%
    \printfield{series}%
    \newunit
    \ifboolexpr{%
        test {\iffieldundef{type}}
        and
        not test {\iffieldundef{number}}
    }{%
      \bibcpstring{number}
    }{%
      \printfield{type}%
    }%
    \setunit*{\addspace}%
    \printfield{number}}}
%    \end{macrocode}
%
% Our version of the |institution+location+date| macro is just like the
% standard one except it is wrapped in parentheses, and the preceding
% punctuation is therefore suppressed. This is used by the |report| driver.
%
%    \begin{macrocode}
\renewbibmacro*{institution+location+date}{%
  \ifboolexpr{
    ( test {\iffieldundef{number}}
      or
      not test {\iffieldundef{type}}
      or
      not test {\iffieldundef{series}}
    )
    and
    test {\iflistundef{institution}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \ifboolexpr{
        test {\iffieldundef{series}}
        and
        test {\iffieldundef{type}}
      }{%
        \printfield{number}%
        \setunit*{\addcomma\space}%
      }{}%
      \printlist{location}%
      \iflistundef{institution}%
      {\setunit*{\addcomma\space}}%
      {\setunit*{\addcolon\space}}%
      \printlist{institution}%
      \setunit*{\addcomma\space}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% We provide a slightly more complicated version with the type included
% at the beginning. It is used by the |thesis| driver. We provide two
% versions: one with the type outside and one with it inside the
% parentheses.
%
%    \begin{macrocode}
\newtoggle{blx@ox@altthesis}
\newtoggle{blx@ox@plainthesis}
\DeclareFieldAlias{thesis:publication}{publication}
\DeclareFieldFormat{plain}{#1}
\DeclareBibliographyOption{altthesis}[true]{%
  \settoggle{blx@ox@altthesis}{#1}
}
\DeclareBibliographyOption[string]{thesis}[out]{%
  \ifstrequal{#1}{plain}{%
    \toggletrue{blx@ox@altthesis}%
    \toggletrue{blx@ox@plainthesis}%
    \DeclareFieldAlias{thesis:publication}{plain}%
  }{%
    \togglefalse{blx@ox@plainthesis}%
    \DeclareFieldAlias{thesis:publication}{publication}%
    \ifstrequal{#1}{in}{%
      \toggletrue{blx@ox@altthesis}%
    }{%
      \togglefalse{blx@ox@altthesis}%
      \ifstrequal{#1}{out}{}{%
        \PackageError{biblatex-oxref}
        {Invalid option 'bookseries=#1'}
        {Valid values are 'in', 'out', and 'plain'.}}}}}
\newbibmacro*{type+institution+location+date}{%
  \iftoggle{blx@ox@altthesis}{%
    \ifboolexpr{
      test {\iffieldundef{type}}
      and
      test {\iflistundef{institution}}
      and
      test {\iflistundef{location}}
      and
      test {\iffieldundef{year}}
      and
      test {\iffieldundef{yeardivision}}
      and
      test {\iffieldundef{month}}
    }{}{%
      \iftoggle{blx@ox@plainthesis}{}{\nopunct}%
      \printtext[thesis:publication]{%
        \printfield{type}%
        \setunit*{\addcomma\space}%
        \printlist{location}%
        \iflistundef{institution}{%
          \setunit*{\addcomma\space}%
        }{%
          \setunit*{\addcolon\space}}%
        \printlist{institution}%
        \setunit*{\addcomma\space}%
        \usebibmacro{date}}}
  }{%
    \printfield{type}%
    \newunit
    \usebibmacro{institution+location+date}}}
%    \end{macrocode}
%
% We provide an even more convoluted version that also includes |series|,
% |title| and |number|, and uses the more common |publisher| in place of
% |institution|. We also include some logic that means |organization|
% is used instead of |publisher| if no |publisher| is provided;
% otherwise it is printed before |location|. This is used by the
% |manual| driver.
%
%    \begin{macrocode}
\newbibmacro*{type+series+number+edition+organization+publisher+location+date}{%
  \ifboolexpr{
    test {\iffieldundef{type}}
    and
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{edition}}
    and
    test {\iflistundef{organization}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \usebibmacro{series+type+number}%
      \setunit{\addsemicolon\space}%
      \printfield{edition}%
      \setunit*{\addcomma\space}%
      \iflistundef{publisher}{}{%
        \printlist{organization}%
        \setunit*{\addcomma\space}}%
      \printlist{location}%
      \iflistundef{publisher}{%
        \iflistundef{organization}{%
          \setunit*{\addcomma\space}%
        }{%
          \setunit*{\addcolon\space}%
          \printlist{organization}}%
      }{%
        \setunit*{\addcolon\space}%
        \printlist{publisher}}%
      \setunit*{\addcomma\space}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% The changes to the |report| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   support is added for |volume|, |maintitle| and |series|;
%   \item
%   |type| and |number| are moved to just before the publication
%   information block;
%   \item
%   the punctuation is slightly different for the |legal| entry subtype.
% \end{itemize}
%
%    \begin{macrocode}
\newcommand*{\legreport}{legal}
\DeclareBibliographyDriver{report}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+type+number}%
  \setunit{\addspace}%
  \usebibmacro{institution+location+date}%
  \iffieldequals{entrysubtype}{\legreport}{%
    \setunit{\addspace}\nopunct
    \let\origadddot\adddot
    \def\adddot{}%
    \usebibmacro{chapter+pages}%
    \let\adddot\origadddot
  }{%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
  }%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isrn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We patch the thesis driver to use our slightly more complex version.
%
%    \begin{macrocode}
\xpatchbibdriver{thesis}{%
  \printfield{type}%
  \newunit
  \usebibmacro{institution+location+date}%
}{%
  \usebibmacro{type+institution+location+date}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch thesis}}
%    \end{macrocode}
%
% We give booklet entries descriptor support.
%
%    \begin{macrocode}
\DeclareFieldFormat[booklet]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \mkbibquote{#1\isdot}}%
  \undef\currentfield}
%    \end{macrocode}
%
% With patents, the titles are italic and the patent type is not abbreviated.
%
%    \begin{macrocode}
\DeclareFieldFormat[patent]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[patent]{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}}
%    \end{macrocode}
%
% The |holder|, |origdate| and |date| fields have explicit signposting; the
% latter two use |origdatetype| and |datetype|, with some sensible defaults.
%
%    \begin{macrocode}
\DeclareNameAlias{byholder}{default}
\renewbibmacro*{byholder}{%
  \ifnameundef{holder}{}{%
    \bibstring{byholder}%
    \setunit{\addspace}%
    \printnames[byholder]{holder}}}
\newbibmacro*{location+dates}{%
  \ifboolexpr{
    test {\iffieldundef{location}}
    and
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \printlist[][-\value{listtotal}]{location}%
      \setunit*{\addcomma\space}%
      \ifboolexpr{
        test {\iffieldundef{origyear}}
        and
        test {\iffieldundef{origmonth}}
      }{}{%
        \iffieldundef{origdatetype}{%
          \bibstring{filed}
        }{
          \printfield{origdatetype}}%
        \setunit*{\addspace}}%
      \usebibmacro{origdate+time}%
      \setunit*{\addcomma\space}%
      \ifboolexpr{
        test {\iffieldundef{year}}
        and
        test {\iffieldundef{month}}
      }{}{%
        \iffieldundef{datetype}{%
          \bibstring{issued}%
        }{
          \printfield{datetype}}%
        \setunit*{\addspace}}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% The |patent| driver differs from the regular one by having |note| moved
% further forward, and having a publication block consisting of |location|,
% |origdate| and |date|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{patent}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printfield{type}%
  \setunit*{\addspace}%
  \printfield{number}%
  \newunit\newblock
  \usebibmacro{byholder}%
  \newunit\newblock
  \usebibmacro{location+dates}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Direct use of the |manual| entry type is not encouraged, but it serves as a
% basis for other entry types, notably standards, and software.
% The main change to the |manual| driver compared to the standard style is
% that |type|, |series|, |number|, |edition| and |organization| are moved into
% the publication information block with |publisher|, |location| and |date|.
% Note that standards will put the |number| field at the head of the reference
% if there is no author.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{manual}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \ifboolexpr{
    test {\ifentrytype{standard}}
    and
    ( test {\ifnameundef{author}}
      or
      not test \ifuseauthor )
    and
    not test {\iffieldundef{number}}
  }{%
    \printfield{number}\clearfield{number}%
    \newunit\newblock
  }{}%
  \usebibmacro{author/editor}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \ifentrytype{software}
    {\usebibmacro{title+version}}
    {\usebibmacro{title}}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor}%
  \newunit
  \ifentrytype{software}
    {}
    {\newunit\printfield{version}}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{type+series+number+edition+organization+publisher+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}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareBibliographyAlias{standard}{manual}
\ExecuteBibliographyOptions[standard]{useeditor=false}
%    \end{macrocode}
%
% \subsection{Audiovisual materials}
%
% The publication block for audiovisual resources is quite different
% from the normal, as the |type|, |series| and |number| come
% between the |publisher| and |date|. The punctuation or otherwise between
% elements depends on the combination present. The date and time of recording
% is given before the block if a |number| is provided (indicating a published
% recording) but within it otherwise.
%
%    \begin{macrocode}
\newbibmacro*{publisher+type+series+number+date}{%
  \iffieldundef{number}{}{%
    \setunit{\addcomma\space}%
    \usebibmacro{origdate+time}%
  }%
  \ifboolexpr{%
    test {\iflistundef{origpublisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iffieldundef{type}}
    and
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
    and
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origyeardivision}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{hour}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \printlist{origpublisher}%
      \setunit*{\addsemicolon\space}%
      \printlist{location}%
      \iflistundef{publisher}%
        {\setunit*{\addcomma\space}}%
        {\setunit*{\addcolon\space}}%
      \printlist{publisher}%
      \iffieldundef{series}%
        {\setunit*{\addspace}}%
        {\setunit*{\recordseriespunct}}%
      \printfield{series}%
      \setunit*{\addcomma\space}%
      \printfield{type}%
      \iflistundef{publisher}%
        {\setunit*{\addcomma\space}}%
        {\setunit*{\addspace}}%
      \printfield{number}%
      \iffieldundef{number}{%
        \setunit{\addcomma\space}%
        \usebibmacro{origdate+time}%
      }{}%
      \setunit{\addcomma\space}%
      \usebibmacro{date+time}}}}
%    \end{macrocode}
%
% We provide the \texttt{endeditor} option to determine if credits should be
% placed before or after the publication block.
%
%    \begin{macrocode}
\newtoggle{blx@ox@endeditor}
\DeclareEntryOption{endeditor}[true]{%
  \settoggle{blx@ox@endeditor}{#1}}
\newbibmacro*{pre-byeditor+others}{%
  \iftoggle{blx@ox@endeditor}{}{%
    \usebibmacro{byeditor+others}%
  }}
\newbibmacro*{post-byeditor+others}{%
  \iftoggle{blx@ox@endeditor}{%
    \usebibmacro{byeditor+others}%
  }{}}
%    \end{macrocode}
%
% We provide a specialist |audio| driver. It borrows elements from the |book|
% and |online| drivers, and incorporates the above variations.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{audio}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \printlist{organization}%
  \newunit\newblock%
  \usebibmacro{publisher+type+series+number+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The same driver will do very well for |music|, |video| and |movie|.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{music}{audio}
\DeclareBibliographyAlias{movie}{audio}
\DeclareBibliographyAlias{video}{audio}
%    \end{macrocode}
%
% In parallel with book-like entries, we provide an |inaudio| driver for citing
% tracks from an album.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inaudio}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \printlist{organization}%
  \newunit\newblock%
  \usebibmacro{publisher+type+series+number+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The same driver will do very well for |inmusic|, |invideo| and |inmovie|.
% The latter two are for completeness but probably not useful.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{inmusic}{inaudio}
\DeclareBibliographyAlias{inmovie}{inaudio}
\DeclareBibliographyAlias{invideo}{inaudio}
%    \end{macrocode}
%
% We set up appropriate inheritance rules.
%
%    \begin{macrocode}
\DeclareDataInheritance{audio,music,movie,video}{inaudio,inmusic,inmovie,invideo}{%
  \inherit{title}{booktitle}
  \inherit{subtitle}{booksubtitle}
  \inherit{titleaddon}{booktitleaddon}
  \noinherit{shorttitle}
  \noinherit{sorttitle}
  \noinherit{indextitle}
  \noinherit{indexsorttitle}
}
%    \end{macrocode}
%
% Titles for videos do not have a consistent format, so we define some
% |entrysubtype|-based variation. We also allow the use of descriptors;
% note that the title is transformed into a descriptor by means of
% an annotation, rather than using a dedicated field. This greatly
% simplifies the code used elsewhere.
%
%    \begin{macrocode}
\DeclareFieldFormat[audio,music]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[movie,video]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[inaudio,inmusic,inmovie,invideo]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \mkbibquote{#1\isdot}%
  }%
  \undef\currentfield}
\DeclareFieldFormat[inaudio,inmusic]{booktitle}{%
  \def\currentfield{booktitle}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[inmovie,invideo]{booktitle}{%
  \def\currentfield{booktitle}%
  \iffieldannotation{descriptor}{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}

%    \end{macrocode}
%
% The |performance| driver is similar to the |audio| driver, but instead of a
% publication block, it displays a set of event-related fields. With a bit of
% generosity, it can also work for artworks and images.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{performance}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \printfield{type}%
  \newunit\newblock
  \printfield{note}%
  \ifboolexpr{
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origmonth}}
  }{}{%
    \setunit{\addspace}\newblock
    \printtext[publication]{\usebibmacro{origdate+time}}}
  \newunit\newblock
  \usebibmacro{event+venue+location+date}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \printlist{organization}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareBibliographyAlias{image}{performance}
\DeclareBibliographyAlias{artwork}{performance}
%    \end{macrocode}
%
% Here is the macro used for printing the event location and date for
% performances and exhibitions.
%
%    \begin{macrocode}
\newbibmacro*{event+venue+location+date}{%
  \printfield{eventtitle}%
  \newunit
  \printfield{eventtitleaddon}%
  \newunit
  \printlist{institution}%
  \newunit
  \printfield{venue}%
  \newunit
  \printlist{location}%
  \newunit%
  \ifboolexpr{
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{month}}
  }{\printeventdate}{\usebibmacro{date+time}}}

%    \end{macrocode}
%
% \subsection{Digital media}
%
% \subsubsection{Website articles and social media}
%
% The titles of web pages and similar intrinsically online resources
% are written in roman text within quotes.
%
%    \begin{macrocode}
\DeclareFieldFormat[online,image]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}

%    \end{macrocode}
%
% We provide an |onlinetype| macro for clarifying the type of online
% material. It is triggered by appropriate values of |entrysubtype|.
%
%    \begin{macrocode}
\newbibmacro*{onlinetype}{%
  \ifboolexpr{
    test {\iffieldundef{url}}
    or
    test {\iffieldundef{entrysubtype}}
  }{}{%
    \ifbibxstring{\thefield{entrysubtype}}{%
      \printtext[brackets]{\bibstring{\thefield{entrysubtype}}}%
    }{}}}
%    \end{macrocode}
%
% The changes to the |online| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   We support the use of |maintitle| for, say, the title of the wesbite
%   in which the web page is located. This comes after |title|.
%   \item
%   We insert the aforementioned |onlinetype| macro after |maintitle|.
%   \item
%   The date is wrapped in parentheses if present.
%   \item
%   We support displaying a publisher after the date; this is a legacy feature
%   based on examples that are now deprecated.
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}
  \setunit{\addspace}%
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \iffieldundef{year}{}{%
    \setunit{\addspace}\newblock
    \printtext[parens]{\usebibmacro{date+time}}%
  }%
  \newunit\newblock
  \printlist{publisher}%
  \newunit\newblock
  \iftoggle{bbx:eprint}
    {\usebibmacro{eprint}}
    {}%
  \newunit\newblock
  \usebibmacro{url+urldate}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsubsection{Software}
%
% The version for software goes between the \texttt{title} and \texttt{titleaddon}.
%
%    \begin{macrocode}
\newbibmacro*{title+version}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
  {}
  {\printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\subtitlepunct}%
      \printfield[titlecase]{subtitle}}%
    \setunit{\addspace}}%
  \printfield{version}%
  \setunit{\addspace}%
  \printfield{titleaddon}%
}
\DeclareFieldFormat[software]{version}{\mkbibparens{\bibstring{version}~#1}}
%    \end{macrocode}
%
% The url date string is different for software: \enquote{downloaded} rather
% than \enquote{accessed}.
%
%    \begin{macrocode}
\DeclareFieldFormat[software]{urldate}{\bibstring{urldown}\space#1}
%    \end{macrocode}
%
% The software driver is a variant of the manual driver.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{software}{manual}
%    \end{macrocode}
%
% \subsubsection{Datasets}
%
% The main change to the |dataset| driver compared to the standard style is
% that |type|, |series|, |number|, |edition| and |organization| are moved into
% the publication information block with |publisher|, |location| and |date|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{dataset}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{type}%
  \newunit
  \printfield{version}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{type+series+number+edition+organization+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Legal references}
%
% Legal references are a law unto themselves, and thus require extensive
% fiddly coding. This entire section is adapted from \pkg{oscola} by
% Paul Stanley.
%
% \subsubsection{Entry options}
%
%    \begin{macrocode}
\newtoggle{bbx:scotstyle}
\DeclareEntryOption{scottish-style}[true]{%
  \settoggle{bbx:scotstyle}{#1}}
\newboolean{bbx@year-essential}\setboolean{bbx@year-essential}{false}
\DeclareEntryOption{year-essential}[true]{%
    \setboolean{bbx@year-essential}{#1}}
\newboolean{bbx@paryear-essential}\setboolean{bbx@paryear-essential}{false}
\DeclareEntryOption{paryear-essential}[true]{%
    \setboolean{bbx@paryear-essential}{#1}}
\newtoggle{blx@ox@nopostnotedelim}
\newtoggle{bbx:altcourt}
\DeclareBiblatexOption{global,type,entry}{court-plain}[true]{%
  \settoggle{bbx:altcourt}{#1}}
\newtoggle{bbx@ecliuse}
\newtoggle{bbx@eclionly}
\DeclareBibliographyOption[string]{ecli}[yes]{%
  \ifstrequal{#1}{no}{%
    \global\togglefalse{bbx@ecliuse}%
    \global\togglefalse{bbx@eclionly}%
  }{%
    \global\toggletrue{bbx@ecliuse}%
    \ifstrequal{#1}{only}{%
      \global\toggletrue{bbx@eclionly}%
    }{}}}
%    \end{macrocode}
%
% \subsubsection{Field formats}
%
%    \begin{macrocode}
\DeclareFieldFormat{casenotetitle}{\mkbibquote{\mkbibemph{#1}}}
\DeclareFieldFormat[jurisdiction,legislation,legal]{journaltitle}{#1}
\DeclareFieldFormat[jurisdiction]{volume}{#1}
\DeclareFieldFormat[jurisdiction]{titleaddon}{\mkbibparens{#1}}
\DeclareFieldFormat{romanvol}{\RN{#1}}
\DeclareListFormat[jurisdiction]{listb}{}
\protected\def\mkusbibordinal#1{%
  \begingroup
  \@tempcnta0#1\relax\number\@tempcnta
  \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
  \ifnum\@tempcnta>20
    \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
  \fi
  \ifcase\@tempcnta th\or st\or d\or d\else th\fi
  \endgroup}%
\DeclareFieldFormat{usseries}{\ifinteger{#1}{\mkusbibordinal{#1}}{#1}}
\DeclareFieldFormat{verba}{#1}

\DeclareListFormat{echrinst}{%
  \ifboolexpr{%
    test {\ifnumequal{\value{listtotal}}{1}}
    or
    test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
  }{%
    \ifboolexpr{
      test {\ifdefstring{\Commission}{#1}}
      or
      test {\ifdefstring{\commission}{#1}}%
    }{%
      \bibstring{commissiondecision}%
    }{#1}%
  }{%
    \setcounter{blx@tmpcnt}{\value{listcount}}%
    \addtocounter{blx@tmpcnt}{1}%
    \ifnumequal{\value{blx@tmpcnt}}{\value{listtotal}}{%
      \ifnumgreater{\value{listtotal}}{2}{%
        #1\finalandcomma\space\bibstring{and}\addspace
      }{%
        #1\space\bibstring{and}\addspace
      }
    }{%
      #1\addcomma\space}}}%

\newcommand*{\commission}{commission}
\newcommand*{\Commission}{Commission}
\DeclareListFormat{ecthr}{%
  \ifboolexpr{
    test {\ifdefstring{\Commission}{#1}}
    or
    test {\ifdefstring{\commission}{#1}}
  }{\bibstring[\mkbibparens]{commissiondecision}\toggletrue{blx@ox@nopostnotedelim}}{}}

\newcommand*{\pcijrep}{PCIJ Rep}
\DeclareFieldFormat{international}{%
  \iffieldequals{journaltitle}{\pcijrep}{%
    \bibcplstring{jourser}\space #1%
  }{#1}}

\DeclareListFormat{checkcontains}{%
  \bbx@check{#1}}
\newtoggle{bbx@institutiontoggle}
\newcommand\iflistcontains[2]{%
  \global\togglefalse{bbx@institutiontoggle}%
  \def\bbx@check##1{%
    \ifdefstring{#2}{##1}{\global\toggletrue{bbx@institutiontoggle}}{}}%
  \printlist[checkcontains]{#1}%
  \iftoggle{bbx@institutiontoggle}}

\DeclareFieldFormat{draftleg}{%
  \StrBefore{#1}{ Bill}}

\DeclareListFormat{billprinting}{%
  \ifstrequal{#1}{HC}{%
    \mkbibbrackets{\strfield{number}}%
    \toggletrue{blx@ox@nopostnotedelim}%
  }{%
    \strfield{number}%
    \togglefalse{blx@ox@nopostnotedelim}}}

\newcommand*{\treatypartysep}{\allowbreak ---\allowbreak}
\DeclareListFormat{treaty}{%
  \ifmoreitems{}{%
    \ifnumequal{\value{listcount}}{1}{%
      \bibopenparen
    }{}%
    \ifnumgreater{\value{liststop}}{\value{listcount}}{%
      #1\treatypartysep
    }{%
      #1\bibcloseparen}}}

\def\siganddate#1{%
  \def\bbx@tempa{#1}%
  \expandafter\bbx@signeddatei#1/relax}
\def\bbx@signeddatei#1=#2/relax{%
  \def\bbx@tempa{#2-}%
  \bibstring{#1}\space\expandafter\makebbx@datei\bbx@tempa}
\def\makebbx@datei#1-#2-#3-{%
  \makebbx@dateii{#1}{#2}{#3}}
\def\makebbx@dateii#1#2#3{%
  \blx@imc@stripzeros{#3}~\mkbibmonth{#2}%
  \space
  #1}
\DeclareListFormat{treatydates}{%
  \ifnumequal{\value{listcount}}{1}{%
    \siganddate{#1}%
  }{%
    \addcomma\space\siganddate{#1}}}

%    \end{macrocode}
%
% \subsubsection{Pagination formats}
%
% We define an alternative to \cs{mkpageprefix} that takes a pagination key
% directly.
%
%    \begin{macrocode}
\newrobustcmd*{\mkrawpageprefix}[1][none]{%
  \begingroup
  \def\blx@tempa{\blx@mkpageprefix@i}%
  \ifstrequal{#1}{none}{}{%
    \ifbibstring{#1}{%
      \def\blx@tempa{\blx@mkpageprefix{#1}}%
    }{%
      \blx@warning@entry{Unknown pagination type '#1'}}}%
  \@ifnextchar[%]
    {\blx@tempa}
    {\blx@tempa[\@firstofone]}}

\newcommand*\paragraphmarkings{[]}
\DeclareFieldFormat[jurisdiction,legislation,legal]{postnote}{%
  \iffieldundef{pagination}{%
    \ifboolexpr{
      test {\ifkeyword{eu}}
      or
      test {\ifkeyword{echr}}
    }{%
      \mkcomprange[{\mkrawpageprefix[paragraph]}]{#1}%
    }{%
      \mkcomprange{#1}}%
  }{%
    \iffieldequals{pagination}{\paragraphmarkings}{%
      \mkcomprange[\mkbibbrackets]{#1}%
    }{%
      \mkcomprange[{\mkpageprefix[pagination]}]{#1}}}}
%    \end{macrocode}
%
% \subsubsection{Shorthands}
%
% With legal references, the introduction of shorthands is less verbose.
%
%    \begin{macrocode}
\renewbibmacro*{shorthandintro}{%
  \iffieldundef{shorthandintro}
    {\iffieldundef{shorthand}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \ifboolexpr{
            test {\ifentrytype{jurisdiction}}
            or
            test {\ifentrytype{legal}}
            or
            test {\ifentrytype{legislation}}
          }{}{%
            \bibstring{citedas}\space}%
          \printfield{shorthand}}}}
    {\setunit{\addspace}%
     \printtext[parens]{\printfield{shorthandintro}}}}

%    \end{macrocode}
%
% \subsubsection{Common macros}
%
%    \begin{macrocode}
\newbibmacro*{issue/volume}{%
  \iffieldundef{volume}%
    {\iffieldundef{issue}%
     {}%
     {\printfield{issue}}}%
    {\printfield[default]{volume}}}
\newcommand*{\subtypenewsp}{newspaper}
\newbibmacro*{year+vol+report}[1][default]{%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
  }{%
    \usebibmacro{journaldate}%
    \setunit{\addspace}%
    \printfield[parens]{origyear}%
    \setunit{\addspace}%
    \printfield{volume}%
    \setunit{\addspace}}%
  \printfield{journaltitle}%
  \setunit*{\addspace}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printfield[#1]{series}%
    \setunit{\addspace}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
    \printdate%
  }{}}
\newbibmacro*{journaldate}[1][]{%
  \ifboolexpr{
    test {\iffieldundef{#1volume}}
    or
    bool {bbx@#1year-essential}
  }{%
    \ifboolexpr{
      test {\ifkeyword{sc}}
      or
      test {\iftoggle{bbx:scotstyle}}
    }{%
      \setunit{\addcomma\space}%
      \printfield{#1year}%
    }{%
      \printfield[brackets]{#1year}}%
  }{%
    \printfield[parens]{#1year}}}
\newcommand*{\casenote}{casenote}
\newcommand{\casenotetext}{\bibstring{casenote}}
\newbibmacro{journaltitle}{%
  \iffieldequals{entrysubtype}{\casenote}{%
    \iffieldundef{crossref}{%
      \usebibmacro{title}%
    }{%
      \iffieldundef{note}{%
        \restorefield{note}{\casenotetext}%
      }{}%
      \ifboolexpr{
        test {\iffootnote}
        and test {\iftoggle{bbx@samefootnote}}
        and test {\iffieldequals{crossref}{\blx@lastkey@foot}}%
      }{}{\printfield[casenotetitle]{title}}}%
  }{%
    \usebibmacro{title}}}
\newbibmacro*{unreported}[1][default]{%
  \iffieldundef{verba}{%
    \ifboolexpr{
      test {\iflistundef{institution}}
      and
      test {\iffieldundef{date}}
      and
      test {\iffieldundef{year}}
    }{}{%
      \ifboolexpr{
        test {\iffieldundef{date}}
        and
        test {\iffieldundef{year}}
      }{%
        \mkbibparens{\printlist[jurisdiction]{institution}}%
      }{%
        \toggletrue{blx@ox@nopostnotedelim}%
        \iflistundef{institution}{%
          \mkbibparens{\usebibmacro{date}}%
        }{%
          \printtext[parens]{%
            \printlist[#1]{institution}%
            \setunit{\addcomma\space}
            \usebibmacro{date}}}}}%
  }{%
    \iftoggle{bbx@ecliuse}{}{%
      \printfield{verba}}}}
\newbibmacro{court-note}{%
  \iffieldundef{note}%
    {}%
    {\printfield{note}%
     \toggletrue{blx@ox@nopostnotedelim}}}
\newbibmacro*{jurisdictionpages}{%
  \let\origadddot\adddot
  \def\adddot{}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{}{%
    \setunit{\addspace}%
    \printfield{pages}}%
  \let\adddot\origadddot
}
\newbibmacro{pcitenote}{%
  \iffieldundef{parreporter}{}{%
    \setunit{\addcomma\space}%
    \iffieldundef{postnote}{}{%
      \printfield{postnote}%
      \clearfield{postnote}%
      \setunit{\addsemicolon\space}}}}
\newbibmacro*{courtid}{%
  \iffieldundef{number}{%
    \ifboolexpr{
      test {\iflistundef{institution}}
      and
      test {\iffieldundef{location}}%
    }{%
      \togglefalse{blx@ox@nopostnotedelim}%
    }{%
      \ifboolexpr{%
        test {\iffieldundef{journaltitle}}
        or
        not togl {bbx:altcourt}
      }{%
        \printtext[parens]{%
          \printfield{location}%
          \setunit{\addspace}%
          \printlist{institution}%
          \usebibmacro{unrep:date}}%
        \toggletrue{blx@ox@nopostnotedelim}
      }{%
        \setunit{\addcomma\space}%
        \printfield{location}%
        \setunit*{\addspace}%
        \printlist{institution}}}%
  }{%
    \togglefalse{blx@ox@nopostnotedelim}}}
\newbibmacro*{unrep:date}{%
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}%
    and
    test {\iffieldundef{number}}%
    and
    test {\iffieldundef{neutralcite}}%
  }{%
    \setunit{\addcomma\space}%
    \usebibmacro{date}%
  }{}}

%    \end{macrocode}
%
% \subsubsection{Legal cases}
%
% There are different formats depending on the jurisdiction.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{jurisdiction}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{juriscitation}%
  \usebibmacro{doi+eprint+url}%
  \setunit{\addspace}%\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\addspace}%\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newtoggle{bbx@juriscitedone}
\newbibmacro{juriscitation}{%
  \togglefalse{bbx@juriscitedone}%
  \renewcommand{\do}[1]{%
    \ifkeyword{##1}{%
      \toggletrue{bbx@juriscitedone}\usebibmacro{##1juriscitation}%
      \listbreak
    }{}}%
  \docsvlist{eu,echr,int,ca,us}%
  \iftoggle{bbx@juriscitedone}{}{\usebibmacro{enjuriscitation}}%
}
%    \end{macrocode}
%
% Here is the format for EU cases.
%
%    \begin{macrocode}
\newtoggle{bbx@commissiondecision}
\newbibmacro*{eujuriscitation}{%
  \ifboolexpr{
    test {\iflistcontains{institution}{\commission}}
    or
    test {\iflistcontains{institution}{\Commission}}
  }{%
    \toggletrue{bbx@commissiondecision}%
  }{%
    \togglefalse{bbx@commissiondecision}}%
  \iftoggle{bbx@commissiondecision}{}{%
    \usebibmacro{eucasenumber}}%
  \usebibmacro{title}%
  \setunit{\addspace}%
  \iftoggle{bbx@commissiondecision}{%
    \usebibmacro{eucommissiondecision}}{}%
  \setunit{\addspace}%
  \usebibmacro{eu:reportinfo}%
  \iftoggle{bbx@commissiondecision}{%
    \setunit{\addcomma\space}%
  }{%
    \setunit{\addspace}}%
  \usebibmacro{altreportdetails}%
  \usebibmacro{court-note}%
}
\newcommand*\oxrefand{ and }
\newbibmacro{eucasetype}{%
  \iffieldundef{type}{%
    \ifboolexpr{
      test {\IfSubStr{\thefield{number}}{,}}
      or
      test {\IfSubStr{\thefield{number}}{--}}
      or
      test {\IfSubStr{\thefield{number}}{\oxrefand}}
    }{%
      \bibstring{eujoinedcases}%
    }{%
      \bibstring{eucase}}%
  }{%
    \printfield{type}}%
}
\newbibmacro{eucasenumber}{%
  \usebibmacro{eucasetype}%
  \setunit{\addnbspace}%
  \printfield{number}%
  \setunit{\addspace}}
\newbibmacro{eucommissiondecision}{%
  \iffieldundef{userb}{%
    \iffieldundef{number}{}{%
      \printtext[parens]{%
        \usebibmacro{eucasetype}%
        \setunit{\addnbspace}%
        \printfield{number}}}%
  }{%
    \printtext[parens]{%
      \printfield{userb}}%
    \setunit{\addspace}%
    \iffieldundef{number}{}{%
      \iffieldundef{type}{%
        \setunit{\addspace\bibstring{commissiondecision}\addspace}%
      }{%
        \setunit{\addspace\printfield{type}\addspace}}%
      \printfield{number}}%
  }%
}
\newbibmacro*{eu:reportinfo}{%
  \iftoggle{bbx@eclionly}{%
    \iffieldundef{verba}{%
      \usebibmacro{eu:osreport}
    }{%
      \printfield{verba}}%
  }{%
    \usebibmacro{eu:osreport}}}
\newbibmacro*{eu:osreport}{%
  \iftoggle{bbx@ecliuse}{%
    \iffieldundef{verba}{}{%
      \printfield{verba}%
      \setunit{\addcomma\space}}%
    }{}%
  \iffieldundef{journaltitle}{%
    \usebibmacro{unreported}%
  }{%
    \usebibmacro{eu:year+vol+report}}}
\newcommand*\officialjournaltitle{OJ}
\newcommand*\ecrreporttitle{ECR}
\newbibmacro*{eu:year+vol+report}{%
  \iffieldequals{journaltitle}{\ecrreporttitle}{%
    \printfield[brackets]{year}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit{\addspace}%
    \printfield{volume}%
    \setunit*{\printtext{--\allowbreak}}%
    \printfield{pages}%
  }{%
    \iffieldequals{journaltitle}{\officialjournaltitle}{%
      \printfield[brackets]{year}%
      \setunit{\addspace}%
      \printfield{journaltitle}%
      \setunit{\addspace}%
      \printfield[default]{series}%
      \usebibmacro{issue/volume}%
      \setunit{\printtext{\slash}}%
      \printfield{pages}%
    }{%
      \usebibmacro{year+vol+report}}}}

%    \end{macrocode}
%
% Here is the format for European Human Rights cases.
%
%    \begin{macrocode}
\newbibmacro*{echrjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\addspace}\newblock
  \iffieldundef{number}{}{%
    \printtext[parens]{%
      \def\adddot{}%
      \bibstring{application}\space
      \bibstring{number}\space
      \printfield{number}}%
    \setunit{\addspace}\newblock}%
  \iffieldundef{journaltitle}{%
    \usebibmacro{unreported}[echrinst]%
  }{%
    \usebibmacro{echr:year+vol+report}
    \setunit{\addspace}\newblock
    \usebibmacro{echr:courtid}}%
  \setunit{\addspace}%
  \usebibmacro{court-note}%
  \newblock
  \setunit{\addspace}}
\newcommand*{\seriesa}{Series A}
\newcommand*{\echrreports}{ECHR}
\newbibmacro*{echr:year+vol+report}{%
  \iffieldequals{journaltitle}{\seriesa}{%
    \usebibmacro{seriesareport}%
  }{%
    \iffieldequals{journaltitle}{\echrreports}{%
      \usebibmacro{echrreports}%
    }{%
      \usebibmacro{year+vol+report}
      \setunit{\addspace}%
  \printfield{pages}}}}
\newbibmacro*{seriesareport}{%
  \printfield[parens]{year}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \setunit{\addspace}%
  \printtext{\def\adddot{}\bibstring{number}\addspace}%
  \printfield{pages}}
\newbibmacro*{echrreports}{%
  \printfield{journaltitle}%
  \setunit{\addspace}%
  \printfield{year}%
  \iffieldundef{volume}{}{%
    \printtext{--}\printfield[romanvol]{volume}}
  \setunit{\addspace}%
  \printfield{pages}}
\newcommand*{\decisionsandreports}{DR}
\newcommand*{\collectionofdecisions}{CD}
\newbibmacro*{echr:courtid}{%
  \ifboolexpr{
    test {\iffieldequals{journaltitle}{\decisionsandreports}}
    or
    test {\iffieldequals{journaltitle}{\collectionofdecisions}}%
  }{}{%
    \printlist[ecthr]{institution}}}

%    \end{macrocode}
%
% Here is the format for international cases.
%
%    \begin{macrocode}
\newbibmacro*{intjuriscitation}{%
  \iflistundef{institution}{%
    \setunit{}\printtext{}%
  }{%
    \printlist{institution}%
    \setunit{\addcomma\space}}%
  \usebibmacro{int:title}%
  \setunit{\addspace}\newblock
  \iffieldundef{journaltitle}{%
    \printfield{number}%
    \setunit{\addspace}\newblock
    \printtext[parens]{\printdate}%
  }{%
    \usebibmacro{year+vol+report}[international]%
  }%
  \setunit{\addspace}%
  \usebibmacro{int:jurisdictionpages}%
  \setunit{\addspace}\newblock
  \usebibmacro{court-note}%
}
\newbibmacro*{int:title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }{}{%
    \printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\addspace}%
      \printfield[parens]{subtitle}}}%
  \setunit{\addspace}%
  \printfield{titleaddon}%
}
\newbibmacro*{int:jurisdictionpages}{%
  \let\origaddot\adddot
  \def\adddot{}%
  \iffieldequals{journaltitle}{\pcijrep}{%
    \printtext{\bibcpstring{number}\addspace}%
    \iffieldundef{pages}{%
      \printfield{number}%
    }{%
      \printfield{pages}}%
  }{%
    \printfield{pages}}%
  \let\addot\origadddot
}

%    \end{macrocode}
%
% Here is the format for Canadian cases.
%
%    \begin{macrocode}
\newbibmacro{cajuriscitation}{%
  \usebibmacro{title}%
  \setunit{\cacasetitlepunct}\newblock
  \printfield{number}%
  \setunit{\addcomma\space}%
  \iffieldundef{journaltitle}{}{%
    \usebibmacro{can:year+vol+report}}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{pcitenote}%
  \usebibmacro{altreportdetails}%
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}%
  \newunit\newblock
  \usebibmacro{courtid}%
  \newunit%
  \usebibmacro{court-note}%
  \newblock%
  \newunit}
\newbibmacro*{can:year+vol+report}{%
  \iffieldundef{number}{%
    \setunit{\addspace}%
  }{%
    \ifboolexpr{
      test {\iffieldundef{volume}}
      or
      bool {bbx@year-essential}%
    }{}{%
      \clearfield{year}}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{}{%
    \iffieldundef{year}{}{%
      \usebibmacro{journaldate}%
      \setunit{\addspace}}}
  \printfield{volume}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \setunit*{\addspace}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printtext[parens]{\printfield[usseries]{series}}%
    \setunit{\addspace}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
    \usebibmacro{newspaperdate}%
  }{}}
%    \end{macrocode}
%
% Here is the format for American cases.
%
%    \begin{macrocode}
\newbibmacro{usjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\uscasetitlepunct}\newblock%
  \iffieldundef{journaltitle}{%
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield[default]{eprint}%
    \clearfield{eprint}%
  }{
    \usebibmacro{us:vol+report}}%
  \setunit{\addspace}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{us:postnote}%
  \usebibmacro{altreportdetails}%
  \setunit{\addspace}\newblock
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}%
  \setunit{\addspace}%
  \usebibmacro{us:courtid+date}%
  \setunit{\addspace}%
  \usebibmacro{court-note}%
  \newblock
  \setunit{\addspace}}
\newbibmacro{us:vol+report}{%
  \printfield{volume}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printfield[usseries]{series}}}
\newbibmacro{us:postnote}{%
  \iffieldundef{postnote}{}{%
    \setunit{\addcomma\space}%
    \printfield{postnote}%
    \clearfield{postnote}%
  }}
\newbibmacro{us:courtid+date}{%
  \ifboolexpr{
    test {\iflistundef{institution}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
  }{}{%
    \printtext[parens]{%
      \printlist{location}%
      \setunit*{\addspace}%
      \printlist{institution}%
      \setunit{\addspace}%
      \printfield{year}%
      \nopunct}}}

%    \end{macrocode}
%
% Here is the format for English cases.
%
%    \begin{macrocode}
\newbibmacro{enjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\addspace}\newblock
  \printfield{neutralcite}%
  \setunit*{\addcomma\space}%
  \printfield{number}%
  \setunit*{\addcomma\space}%
  \iffieldundef{journaltitle}{}{%
    \usebibmacro{year+vol+report}}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{pcitenote}%
  \usebibmacro{altreportdetails}%
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}% additionalreports
  \setunit{\addspace}\newblock
  \usebibmacro{courtid}%
  \setunit{\addspace}%
  \usebibmacro{court-note}}
\newbibmacro{altreportdetails}{%
  \restorefield{prenote}{\postnotesecond}%
  \iffieldundef{parreporter}{}{%
    \usebibmacro{journaldate}[par]%
    \setunit{\addspace}\newblock
    \usebibmacro{altreportvolume}%
    \setunit{\addspace}\newblock
    \usebibmacro{altjournaltitle}%
    \setunit{\addspace}\newblock
    \usebibmacro{altseries}%
    \setunit{\addspace}\newblock
    \usebibmacro{altjurisdictionpages}%
    \iffieldundef{prenote}{}{%
      \setunit{\addcomma\space}%
      \printfield[postnote]{prenote}}}}
\newbibmacro*{altreportvolume}{%
  \iffieldundef{parvolume}{}{%
    \printfield{parvolume}}}
\newbibmacro*{altjournaltitle}{%
  \iffieldundef{parreporter}{}{
    \printfield{parreporter}}}
\newbibmacro*{altseries}{%
  \iffieldundef{parseries}{}{%
    \printfield{parseries}}}
\newbibmacro*{altjurisdictionpages}{%
  \iffieldundef{parpages}{}{%
    \printfield{parpages}}}%

%    \end{macrocode}
%
% \subsubsection{Legislation}
%
% Legislation tends to have a more consistent format, though European
% entries need special handling.
%
%    \begin{macrocode}
\newcommand*{\subtypecourtrules}{procedure-rule}
\DeclareBibliographyDriver{legislation}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldequals{entrysubtype}{\subtypecourtrules}{%
    \usebibmacro{courtrules}%
  }{%
    \ifkeyword{draft}{%
      \usebibmacro{legislation:bill}%
    }{%
      \ifkeyword{eu}{%
        \usebibmacro{eulegislation}%
      }{%
        \printfield[default]{title}%
        \setunit{\addspace}%
        \printfield[default]{year}%
        \setunit*{\addspace}%
        \usebibmacro{legnumber}%
        \setunit{\addspace}\newblock
        \usebibmacro{legsupp}}}}%
  \setunit{\addcomma\space}%
  \printfield{note}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newbibmacro*{courtrules}{%
  \restorefield{prenote}{\postnotesecond}%
  \iffieldequalstr{shorttitle}{PD}{%
    \printfield{postnote}%
    \clearfield{postnote}%
    \setunit{\addspace}%
  }{}%
  \iffieldundef{shorttitle}{%
    \printfield[default]{title}%
  }{%
    \printfield[default]{shorttitle}}%
  \setunit{\addspace}\newblock
  \iffieldundef{postnote}{%
    \toggletrue{blx@ox@nopostnotedelim}%
  }{%
    \iffieldequalstr{shorttitle}{CPR}{%
      \printfield{postnote}%
      \setunit{\addspace}%
    }{%
      \printtext{%
        \bibstring{order}\space
        \printfield{postnote}%
        \setunit{\addcomma\space}}}}%
  \restorefield{postnote}{\postnotesecond}%
  \usebibmacro{postnote}%
  \clearfield{postnote}%
  \setunit{\addspace}\newblock}
\newcommand*{\subtypeprimarylegislation}{primary}
\newbibmacro*{legislation:bill}{%
  \printfield[draftleg]{title}%
  \setunit{\addspace}%
  \printlist{institution}%
  \setunit*{\addspace}%
  \iffieldequals{entrysubtype}{\subtypeprimarylegislation}{%
    \bibcpstring{bill}%
    \setunit{\addspace}%
    \printtext[parens]{\usebibmacro{sessionyear}}%
    \setunit{\addspace}%
    \iffieldundef{number}{}{%
      \printlist[billprinting]{institution}}%
  }{%
    \printtext[parens]{%
      \bibstring{draft}\space
      \printdate}}
  \setunit{\addspace}}
\newbibmacro*{sessionyear}{%
  \iffieldundef{year}{}{%
    \printfield{year}%
    \iffieldundef{endyear}{}{%
      \bibdaterangesep
      \blx@ox@compyear{\thefield{year}}{\thefield{endyear}}}}}
\newbibmacro{eulegislation}{%
  \printfield[default]{title}%
  \setunit{\addspace}\newblock%
  \usebibmacro{eulegref}}
\newcommand*{\ojspecedtitle}{OJ Spec Ed}
\newbibmacro*{eulegref}{%
  \iffieldequals{journaltitle}{\officialjournaltitle}{%
    \printfield[brackets]{year}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit{\addspace}%
    \iffieldundef{series}{%
      \printtext{L}%
    }{%
      \printfield[default]{series}}%
    \usebibmacro{issue/volume}%
    \setunit*{\addslash}%
    \printfield{pages}%
    \togglefalse{blx@ox@nopostnotedelim}%
  }{%
    \usebibmacro{year+vol+report}%
    \setunit*{\addspace}%
    \printfield{pages}}}
\newbibmacro*{legnumber}{%
  \iffieldequals{entrysubtype}{\subtypeprimarylegislation}{%
    \ifboolexpr{(
        test {\iffieldundef{number}}
        or
        not test {\iffieldundef{title}} )
      and not (
        test {\ifkeyword{cy}}
        or
        test {\ifkeyword{sc}}
        or
        test {\ifkeyword{ni}} )
    }{}{%
      \printtext[parens]{\printfield{number}}%
      \toggletrue{blx@ox@nopostnotedelim}}%
  }{%
    \iffieldundef{number}{}{%
      \setunit{\addcomma\addspace}%
      \printfield{number}%
      \togglefalse{blx@ox@nopostnotedelim}}}}
%    \end{macrocode}
%
% This adds additional material for Welsh statutory instruments.
%
%    \begin{macrocode}
\newbibmacro*{legsupp}{%
  \ifkeyword{cy}
    {\iffieldundef{userb}
      {}
      {\printtext{\mkbibparens{\printfield{userb}}}\toggletrue{blx@ox@nopostnotedelim}}}
    {}}

%    \end{macrocode}
%
% \subsubsection{Treaties, explanatory notes and Hansard}
%
%    \begin{macrocode}
\newcommand*{\explanatorynote}{explanatory note}
\newcommand*{\parliamentarytype}{parliamentary}
\newcommand*{\treatysubtype}{piltreaty}
\DeclareBibliographyDriver{legal}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldequals{entrysubtype}{\explanatorynote}{%
    \printfield[default]{title}%
    \setunit{\addspace}\newblock
  }{%
    \iffieldequals{entrysubtype}{\parliamentarytype}{%
      \usebibmacro{legal:parliamentary}%
    }{%
      \usebibmacro{treatycitation}}}%
  \setunit{\addcomma\space}\newblock
  \printfield[default]{note}
  \setunit{\addspace}\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}%
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newbibmacro{legal:parliamentary}{%
  \printfield[default]{title}%
  \newunit\newblock
  \printfield{type}%
  \setunit{\addspace}%
  \iffieldundef{series}{}{%
    \printtext[parens]{%
      \biblstring{jourser}\space
      \printfield{series}}}%
  \setunit{\addspace}%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \usebibmacro{hansard-ref}%
  \setunit{\addspace}%
  \iffieldundef{year}{}{%
    \printtext[parens]{\usebibmacro{date}}}%
  \togglefalse{blx@ox@nopostnotedelim}}
\newbibmacro*{hansard-ref}{%
  \iffieldundef{postnote}{%
    \iffieldundef{pages}{}{%
      \printfield{pages}}%
  }{}}%
\newbibmacro{treatycitation}{%
  \printfield[default]{title}%
  \setunit{\addspace}\newblock%
  \printlist[treaty]{institution}
  \setunit{\addspace}\newblock
  \usebibmacro{treatyinfo}%
  \setunit{\addspace}\newblock
  \usebibmacro{treaty:year+vol+report}}
\newbibmacro{treatyinfo}{%
  \iflistundef{lista}{% execution
    \iffieldundef{year}{}{%
      \iffieldundef{volume}{}{%
        \printtext[parens]{\printdate}}}%
  }{%
    \printtext[parens]{\printlist[treatydates]{lista}}}}
\newbibmacro{treaty:year+vol+report}{%
  \iffieldequals{journaltitle}{\officialjournaltitle}{%
    \usebibmacro{eulegref}%
  }{%
    \usebibmacro{treaty:date}%
    \setunit{\addspace}%
    \printfield[default]{volume}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit*{\addspace}%
    \iffieldundef{series}{%
      \printfield{type}%
      \setunit*{\addspace}%
    }{%
      \printfield{series}%
      \iffieldundef{type}{%
        \setunit{\addspace}%
        \bibcpstring{number}
        \setunit{\addspace}%
      }{%
        \setunit{\addcomma\space}%
      }}
    \printfield{number}
    \setunit*{\addspace}%
    \printfield{pages}}}%
\newbibmacro*{treaty:date}{%
  \ifboolexpr{
    test {\iffieldundef{volume}}
    or
    bool {bbx@year-essential}
  }{%
    \ifboolexpr{
      test {\ifkeyword{sc}}
      or
      test {\iftoggle{bbx:scotstyle}}
    }{%
      \printfield{year}%
    }{%
      \printfield[brackets]{year}%
    }}{}}

%    \end{macrocode}
%
% We don't really deal with commentaries as distinct from books.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{commentary}{book}
%    \end{macrocode}
%
% \subsection{Manuscripts}
%
% In the spirit of compatibility, this code is adapted from
% \textsf{biblatex-manuscripts-philology} by Maïeul Rouquette.
%
% Here are the additional punctuation commands.
%
%    \begin{macrocode}
\newcommand{\locationlibrarypunct}{\addcomma\addspace}
\newcommand{\collectionshelfmarkpunct}{\addspace}
\newcommand{\datingpagespunct}{\addcomma\addspace}
\newcommand{\librarycollectionpunct}{\addcomma\addspace}
\newcommand{\pagetotalpagespunct}{\addcomma\addspace}
\newcommand{\columnslayerpunct}{\addsemicolon\addspace}%
%    \end{macrocode}
%
% Here are the configurable macros for the two sides of a folio.
%
%    \begin{macrocode}
\def\recto{r}
\def\verso{v}
\NumCheckSetup{\def\recto{}\def\verso{}}
%    \end{macrocode}
%
% Here are some special field formats for the |manuscript| driver.
% Note that the title is transformed into a descriptor by means of
% an annotation, rather than using a dedicated field. This greatly
% simplifies the code used elsewhere.
%
%    \begin{macrocode}
\DeclareFieldFormat[manuscript,unpublished]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat{columns+layer}{\mkbibparens{#1}}
\DeclareFieldFormat{columns}{\mkbibparens{#1}}
\DeclareFieldFormat{layer}{\mkbibparens{#1}}
\DeclareFieldFormat{dating}{#1\isdot}%
\DeclareFieldFormat{support}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
%    \end{macrocode}
%
% Here are the unique bibmacros used by the |manuscripts| driver.
% We hide the date if there is no author or title to prevent it
% appearing as the first element in the reference. Similarly, we
% hide the (vague) |dating| field if the (exact) |date| is displayed.
%
%    \begin{macrocode}
\newbibmacro{manuscript:date}{%
  \ifboolexpr{
    test {\ifnameundef{author}}
    and
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{label}}
  }{}{\usebibmacro{date}}}
\newbibmacro{dating}{%
  \ifboolexpr{(
      test {\ifnameundef{author}}
      and
      test {\iffieldundef{title}}
      and
      test {\iffieldundef{label}}
    ) or
    test {\iffieldundef{year}}
  }{%
    \printfield{dating}%
  }{}}
%    \end{macrocode}
%
% We follow the structure of the \textsf{biblatex-manuscripts-philology}
% approach to allow special formatting to be applied to the collection
% and shelfmark, but we do not actually apply any.
%
%    \begin{macrocode}
\newbibmacro{location+library+collection+shelfmark}{%
  \printfield{library}%
  \setunit{\locationlibrarypunct}%
  \printlist{location}%
  \setunit{\librarycollectionpunct}%
  \usebibmacro{collection+shelfmark}}
\newbibmacro{collection+shelfmark}{%
  \ifboolexpr{
    test {\iffieldundef{collection}}
    and
    test {\iffieldundef{shelfmark}}
  }{}{%
    \printtext[collection+shelfmark]{%
      \printfield{collection}%
      \setunit*{\collectionshelfmarkpunct}%
      \printfield{shelfmark}}}}
%    \end{macrocode}
%
% Again, following \textsf{biblatex-manuscripts-philology}, we allow
% different formatting to be applied to columns and layers according
% to whether they occur adjacently or not, as they might be separated
% by a page specification.
%
%    \begin{macrocode}
\newbibmacro{manuscript:pages}{%
  \printfield{pagetotal}%
  \setunit{\addspace}%
  \iffieldundef{pages}{%
    \usebibmacro{manuscript:columns+layer}%
  }{%
    \usebibmacro{manuscript:columns}%
    \setunit{\pagetotalpagespunct}%
    \printfield{pages}%
    \setunit{\addspace}%
    \usebibmacro{manuscript:layer}}}
\newbibmacro{manuscript:columns}{%
  \iffieldundef{columns}{}{%
    \printtext[columns]{\bibstring{\strfield{columns}column}}}%
}%
\newbibmacro{manuscript:layer}{%
  \iffieldundef{layer}{}{%
    \printtext[layer]{\bibstring{\strfield{layer}layer}}}%
}%
\newbibmacro{manuscript:columns+layer}{%
  \ifboolexpr{
    test {\iffieldundef{columns}}
    or
    test{\iffieldundef{layer}}
  }{%
    \usebibmacro{manuscript:columns}%
    \usebibmacro{manuscript:layer}%
  }{%
    \printtext[columns+layer]{%
      \bibstring{\strfield{columns}column}%
      \setunit*{\columnslayerpunct}%
      \bibstring{\strfield{layer}layer}}}}%
%    \end{macrocode}
%
% Putting it all together, here is the |manuscript| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{manuscript}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{howpublished}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{manuscript:date}%
  \newunit\newblock
  \usebibmacro{location+library+collection+shelfmark}%
  \newunit
  \printfield{support}%
  \newunit
  \usebibmacro{dating}%
  \setunit{\datingpagespunct}
  \usebibmacro{manuscript:pages}
  \newunit\newblock%
  \iftoggle{bbx:url}{%
    \usebibmacro{url+urldate}%
  }{}%
  \iftoggle{bbx:related}{%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We provide an alternative bibmacro for doing much the same but with
% the regular \textsf{biblatex} fields.
%
%    \begin{macrocode}
\newbibmacro*{library+location+series+number}{%
  \printfield{library}%
  \setunit{\locationlibrarypunct}%
  \printlist{location}%
  \setunit{\librarycollectionpunct}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
  }{}{%
    \printtext[collection+shelfmark]{%
      \printfield{series}%
      \setunit*{\collectionshelfmarkpunct}%
      \printfield{number}}}}
%    \end{macrocode}
%
% Lastly, we adapt the |unpublished| driver to allow it to do a similar
% thing but with the regular \textsf{biblatex} fields. The presence of
% the |library| field is what triggers `manuscript mode'.
%
%    \begin{macrocode}
\newtoggle{blx@ox@ms}
\DeclareBibliographyDriver{unpublished}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldundef{library}{\togglefalse{blx@ox@ms}}{\toggletrue{blx@ox@ms}}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printfield{howpublished}%
  \newunit\newblock
  \iftoggle{blx@ox@ms}{%
    \usebibmacro{manuscript:date}%
    \newunit\newblock
    \usebibmacro{library+location+series+number}%
    \newunit
    \printfield{support}%
    \newunit
    \usebibmacro{dating}%
    \setunit{\datingpagespunct}
    \usebibmacro{manuscript:pages}
  }{%
    \usebibmacro{location+date}%
  }%
  \newunit\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Letters}
%
% The driver for letters is similar to the one for other unpublished materials.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{letter}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldundef{library}{\togglefalse{blx@ox@ms}}{\toggletrue{blx@ox@ms}}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \iffieldundef{howpublished}{}{\nopunct\printfield{howpublished}}%
  \newunit\newblock
  \iftoggle{blx@ox@ms}{%
    \usebibmacro{manuscript:date}%
    \newunit\newblock
    \usebibmacro{library+location+series+number}%
    \newunit
    \printfield{support}%
    \newunit
    \usebibmacro{dating}%
    \setunit{\datingpagespunct}
    \usebibmacro{manuscript:pages}
  }{%
    \usebibmacro{location+date}%
  }%
  \newunit\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareFieldFormat[letter]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[letter]{date}{%
  \iffieldundef{url}{#1}{\mkbibparens{#1}}}
%    \end{macrocode}
%
% \subsection{Related entries}
%
% We make the punctuation before related items configurable in remaining drivers
% inherited from the standard style, and move the |pageref| macro to the end.
%
%    \begin{macrocode}
\xpatchbibdriver{booklet}{%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
}{%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch booklet}}
%    \end{macrocode}
%    \begin{macrocode}
\xpatchbibdriver{misc}{%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
}{%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch misc}}
%    \end{macrocode}
%
% We provide an option for setting the relatedtype punctuation.
%
%    \begin{macrocode}
\DeclareDelimFormat{begrelateddelimamendedby}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimequals}{\addspace}
\DeclareDelimFormat{begrelateddelimin}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimincludes}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimreprintfrom}{\addperiod\space}
\DeclareDelimFormat{begrelateddelimreviewof}{\newunitpunct}
\DeclareDelimFormat{begrelateddelimtranslationof}{\addspace}
\DeclareDelimFormat{begrelateddelimmultivolume}{\newunitpunct}
\DeclareDelimFormat{relateddelimmultivolume}{\newunitpunct}
\newtoggle{blx@ox@success}
\DeclareBiblatexOption{global,type}[string]{relationpunct}[semicolon]{%
  \bgroup\blx@blxinit
  \ifcsdef{add#1}{\global\toggletrue{blx@ox@success}}{%
    \global\togglefalse{blx@ox@success}%
    \PackageError{biblatex-oxref}{%
      Invalid option 'relationpunct=#1'%
    }{%
      Valid values are 'dot', 'comma', 'semicolon', 'colon',\MessageBreak
      'period', 'exclam', 'question', and 'space'.}}%
  \egroup
  \iftoggle{blx@ox@success}{\ifstrequal{#1}{space}{%
    \DeclareDelimFormat{begrelateddelim}{\addspace}%
  }{%
    \DeclareDelimFormat{begrelateddelim}{\csuse{add#1}\space}}%
  }{}}
\DeclareEntryOption[string]{relationpunct}[semicolon]{%
  \bgroup\blx@blxinit
  \ifcsdef{add#1}{\global\toggletrue{blx@ox@success}}{%
    \global\togglefalse{blx@ox@success}%
    \PackageError{biblatex-oxref}{%
      Invalid option 'relationpunct=#1'%
    }{%
      Valid values are 'dot', 'comma', 'semicolon', 'colon',\MessageBreak
      'period', 'exclam', 'question', and 'space'.}}%
  \egroup
  \iftoggle{blx@ox@success}{\ifstrequal{#1}{space}{%
    \DeclareDelimFormat{begrelateddelim}{\addspace}%
    \DeclareDelimFormat{begrelateddelimamendedby}{\addspace}
    \DeclareDelimFormat{begrelateddelimequals}{\addspace}%
    \DeclareDelimFormat{begrelateddelimin}{\addspace}%
    \DeclareDelimFormat{begrelateddelimincludes}{\addspace}%
    \DeclareDelimFormat{begrelateddelimreprintfrom}{\addspace}%
    \DeclareDelimFormat{begrelateddelimreviewof}{\addspace}%
    \DeclareDelimFormat{begrelateddelimtranslationof}{\addspace}%
    \DeclareDelimFormat{begrelateddelimmultivolume}{\addspace}%
  }{%
    \DeclareDelimFormat{begrelateddelim}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimamendedby}{\csuse{add#1}\space}
    \DeclareDelimFormat{begrelateddelimequals}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimin}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimincludes}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimreprintfrom}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimreviewof}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimtranslationof}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimmultivolume}{\csuse{add#1}\space}}%
  }{}}
\ExecuteBibliographyOptions{relationpunct}
\newcounter{blx@ox@relitem}
\xapptobibmacro{begrelated}{%
  \setcounter{blx@ox@relitem}{0}%
}{}{\wlog{WARNING: biblatex-oxref failed to append to begrelated}}
%    \end{macrocode}
%
% We provide an option to prevent a related item beginning with "in".
%
%    \begin{macrocode}
\newtoggle{blx@ox@norelin}
\DeclareBiblatexOption{global,type,entry}{norelatedin}[true]{%
  \settoggle{blx@ox@norelin}{#1}}
\xapptobibmacro{begrelatedloop}{%
  \iftoggle{blx@ox@norelin}{%
    \renewbibmacro*{in:}{%
      \ifboolexpr{
        test {\iffieldequalstr{entrysubtype}{yearbook}}
        or (
          test {\ifnameundef{author}}
          and
          test {\ifnameundef{translator}}
          and
          test {\iffieldundef{title}}
      )}{}{%
        \bibstring{in}%
        \printunit{\intitlepunct}%
      }}}{}%
}{}{\wlog{WARNING: biblatex-oxref failed to append to begrelatedloop}}

%    \end{macrocode}
%
% \subsubsection{Translations}
%
% Where the related item is the translation, the related string is (by default,
% in English at least) prefaced with the language.
%
%    \begin{macrocode}
\newbibmacro*{rellanguage}{%
  \def\do##1{%
    \entrydata{##1}{%
      \printlist{language}}}%
  \docsvfield{related}%
}
\DeclareFieldFormat{relatedstring:translationof}{%
  \iffieldundef{relatedstring}{%
    \blx@ox@langbibstring{\usebibmacro{rellanguage}}{original}%
    \printunit{\addcomma\space}
  }{%
    \thefield{relatedstring}\printunit{\relatedpunct}}}

\DeclareFieldFormat{related:translationof}{%
  \mkbibbrackets{#1}}
%    \end{macrocode}
%
% \subsubsection{Co-publications}
%
% This relation simply prints what would go in the publication block.
%
%    \begin{macrocode}
\newbibmacro*{related:copub}[1]{%
  \entrydata*{#1}{%
    \usebibmacro{publisher+location+date}%
    \setunit{\relateddelim}}}
%    \end{macrocode}
%
% \subsubsection{Reprints}
%
% The standard styles define a special driver for the |reprintfrom| relation.
% For \pkg[biblatex]{oxref}, the standard generic driver is sufficient, so this code
% reverts the specialization.
%
%    \begin{macrocode}
\renewbibmacro*{related:reprintfrom}[1]{%
  \entrydata*{#1}{%
    \nopunct
    \usedriver{%
      \ifnameundef{savedauthor}{%
        \ifnameundef{savededitor}{}{%
          \ifnamesequal{editor}{savededitor}{%
            \clearname{editor}%
          }{}}%
      }{%
        \ifnamesequal{author}{savedauthor}{%
          \clearname{author}%
        }{}}%
      \iffieldundef{savedtitle}{}{%
        \iffieldsequal{savedtitle}{title}{%
          \clearfield{title}%
        }{}}%
      \renewbibmacro*{related:init}{}%
      \DeclareNameAlias{sortname}{default}%
      \ifbibmacroundef{date+extradate}{}{%
        \renewbibmacro*{date+extradate}{}%
        \renewbibmacro*{date}{\printdate}}%
      \renewbibmacro*{pageref}{}%
    }{%
      \thefield{entrytype}}}}
%    \end{macrocode}
%
% \subsubsection{Articles that span issues}
%
% If an article spans several issues of a journal, we print the second
% reference after the first, omitting any information in common.
%
%    \begin{macrocode}
\newbibmacro*{related:serialarticle}[1]{%
  \entrydata*{#1}{%
    \iffieldundef{savedjournaltitle}{}{%
      \iffieldsequal{journaltitle}{savedjournaltitle}{%
        \clearfield{journaltitle}%
      }{}}%
    \iffieldundef{savedjournalsubtitle}{}{%
      \iffieldsequal{journalsubtitle}{savedjournalsubtitle}{%
        \clearfield{journalsubtitle}%
      }{}}%
    \iffieldundef{savedseries}{}{%
      \iffieldsequal{series}{savedseries}{%
        \clearfield{series}%
      }{}}%
    \iffieldundef{savedyear}{\clearfield{year}}{
      \iffieldsequal{year}{savedyear}{%
        \clearfield{year}%
      }{}}%
    \usebibmacro{journal+issuetitle}%
    \newunit
    \usebibmacro{note+pages}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}}}
%    \end{macrocode}
%
% \subsubsection{Reviews}
%
% We ensure that the field formatting for |review| entries matches that
% for |article| entries.
%
%    \begin{macrocode}
\DeclareFieldFormat[review]{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[review]{volume}{#1}% volume of a journal
\DeclareFieldFormat[review]{number}{#1}% number of a journal
\DeclareFieldFormat[review]{series}{% series of a journal
  \ifinteger{#1}
  {\mkbibordseries{#1}~\bibstring{jourser}}
  {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
%    \end{macrocode}
%
% We take advantage of the Biber-specific mechanism of relating items
% in order to handle reviews. Compared to the default code, this is
% simpler in that we don't check for repeated authors\slash editors (it
% would be a rather biased review!), we directly set the author format,
% and we don't nullify the \code{date+extradate} macro.
%
%    \begin{macrocode}
\newbibmacro*{related:reviewof}[1]{%
  \entrydata*{#1}{%
    \usedriver{%
      \renewbibmacro*{related:init}{}%
      \DeclareNameAlias{author}{given-family}%
      \renewbibmacro*{pageref}{}%
    }{\thefield{entrytype}}%
  }%
}
%    \end{macrocode}
%
% Since a review is a special kind of journal article, the |review|
% driver is based on the |article| one, the difference being that the
% |related| macro comes just before |journal+issuetitle|. Oxford style
% links the two with \enquote{in}.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{review}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \iftoggle{bbx:related}{%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
  \newunit\newblock
  \usebibmacro{in:}%
  \setunit{\addspace}%
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldundef{note}%
    {\newunit}%
    {\setunit{\addsemicolon\addspace}}%
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}

%    \end{macrocode}
%
% \subsubsection{Multiple volumes}
%
% Standard \textsf{biblatex} provides the \code{multivolume} relation for
% different volumes of the same work that have slightly different publication
% details, but it doesn't quite work for Oxford style. This works better.
%
%    \begin{macrocode}
\DeclareFieldFormat{related:multivolume}{#1}
\renewbibmacro*{related:multivolume}[1]{%
  \entrydata*{#1}{%
    \printtext{%
      \printfield{volume}%
      \printfield{part}%
      \iffieldsequal{savedtitle}{title}{}{%
        \setunit{\addcolon\space}%
        \usebibmacro{title}}%
    }%
    \setunit*{\addspace}%
    \iffieldsequal{savedseries}{series}{\clearfield{series}}{}%
    \iffieldsequal{savednumber}{number}{\clearfield{number}}{}%
    \iffieldsequal{savededition}{edition}{\clearfield{edition}}{}%
    \ifboolexpr{
      test {\iflistsequal{savedpublisher}{publisher}}
      and
      test {\iflistsequal{savedlocation}{location}}
    }{\clearlist{publisher}\clearlist{location}}{}%
      \iffieldsequal{saveddate}{date}{\clearfield{date}}{}%
      \usebibmacro{series+number+edition+publisher+location+date}%
    }}

%    \end{macrocode}
%
% \subsubsection{Related editions}
%
% This macro is based on the \enquote{bytranslator} one, but more general.
% Note that |\mkrelatedstringtext| was introduced in \pkg{biblatex} v3.16,
% so we backport it if an earlier version is used.
%
%    \begin{macrocode}
\providecommand*{\mkrelatedstringtext}[1]{{{\mainlang #1}}}
\newbibmacro*{related:editedas}[1]{%
  \entrydata{#1}{%
    \renewbibmacro*{name:hook}[1]{%
      \ifnumequal{\value{listcount}}{1}
        {\mkrelatedstringtext{\lbx@initnamehook{#1}}}
        {}}%
    \printfield{edition}%
    \setunit{\addspace}%
    \usebibmacro{byeditor+others}%
    \setunit*{\addcomma\space\bibstring[\mkrelatedstringtext]{astitle}\space}%
    \usebibmacro{maintitle+title}%
    \setunit{\addspace}%
    \printfield{note}%
    \newunit\newblock
    \printfield{volumes}%
    \newunit
    \usebibmacro{series+number+publisher+location+date}}}
\renewbibmacro*{related:bytranslator}[1]{%
  \entrydata{#1}{%
    \renewbibmacro*{name:hook}[1]{%
      \ifnumequal{\value{listcount}}{1}
        {\mkrelatedstringtext{\lbx@initnamehook{#1}}}
        {}}%
    \printnames[bytranslator]{translator}%
    \setunit*{\addspace\bibstring[\mkrelatedstringtext]{astitle}\space}%
    \usebibmacro{maintitle+title}%
    \setunit{\addspace}%
    \printfield{note}%
    \newunit\newblock
    \printfield{volumes}%
    \newunit
    \usebibmacro{series+number+publisher+location+date}}}

%    \end{macrocode}
%
% \subsubsection{Joint releases}
%
% We provide support for CDs (for example) which contain more than one work.
%
%    \begin{macrocode}
\newbibmacro*{related:includes}[1]{%
  \stepcounter{blx@ox@relitem}%
  \ifnumequal{\value{blx@ox@relitem}}{\value{bbx:relatedtotal}}%
    {\bibstring{and}\addspace}{}%
  \entrydata{#1}{%
    \ifbibmacroundef{date+extradate}{}{%
      \renewbibmacro*{date+extradate}{}}%
    \usebibmacro{author}%
    \setunit{\printdelim{nametitledelim}}\newblock
    \usebibmacro{title}}}
%    \end{macrocode}
%
% \subsubsection{Subitems}
%
% We provide support for items in items in items. The outer two layers should
% be taken care of with an |incollection| entry or equivalent. The innermost
% item should be a |misc| entry. While we're at it, we provide descriptor
% support for |misc| entries.
%
%    \begin{macrocode}
\DeclareFieldFormat[misc]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{relatedtype}{in}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}%
    }}%
  \undef\currentfield}
\newbibmacro*{related:in}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extradate}
         {}
         {\renewbibmacro*{date+extradate}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}%
    \ifboolexpr{
      test {\iffieldundef{pages}}
      or
      test {\iffieldundef{savedpages}}
    }{%
      \newunit\newblock
    }{%
      \setunit{\addspace}%
      \bibstring{thiscite}%
      \printunit{\addspace}%
    }%
  }%
  \usebibmacro{chapter+pages}%
}

%    \end{macrocode}
%
% \subsection{Source maps}
%
% We use the source mapping capabilities of Biber to fix the following issues.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Sort order}
%
% |proceedings| and |mvproceedings| entries allow an organization to be printed
% in the author position.
%
%    \begin{macrocode}
    \map{
      \pertype{proceedings}
      \pertype{mvproceedings}
      \step[notfield=author,
        fieldsource=organization,
        fieldtarget=author]
    }
%    \end{macrocode}
%
% \subsubsection{Descriptors}
%
% This map provides a helpful \code{descriptor} field that can simplify the
% provision of descriptors, being notes that can act as titles.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=descriptor, final]
      \step[notfield=title,
        fieldset=title+an,
        fieldvalue={=descriptor}]
      \step[notfield=title,
        fieldsource=descriptor,
        fieldtarget=title]
      \step[fieldsource=descriptor,
        fieldtarget=note]
    }
%    \end{macrocode}
%
% \subsubsection{Pseudonyms and inferred authorship}
%
% These help ensure compatibility with \textsf{biblatex-realauthor}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=realauthor, final]
      \step[notfield=author,
        fieldset=author+an,
        fieldvalue={=inferred}]
      \step[notfield=author,
        fieldsource=realauthor,
        fieldtarget=author]
      \step[fieldsource=realauthor,
        fieldtarget=authoraddon]
    }
    \map[overwrite=false]{
      \step[fieldsource=realeditor, final]
      \step[notfield=editor,
        fieldset=editor+an,
        fieldvalue={=inferred}]
      \step[notfield=editor,
        fieldsource=realeditor,
        fieldtarget=editor]
      \step[fieldsource=realeditor,
        fieldtarget=editoraddon]
    }
%    \end{macrocode}
%
% \subsubsection{Editors as joint authors}
%
% This map provides a more portable interface for declaring a translator
% or revisor to be a joint author.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=editor+an,
        match=\regexp{=jointauthor},
        final]
      \step[fieldsource=editor,
        fieldtarget=jointauthor]
      \step[fieldsource=editortype,
        fieldtarget=jointauthortype]
    }
    \map[overwrite=false]{
      \step[fieldsource=translator+an,
        match=\regexp{=jointauthor},
        final]
      \step[fieldsource=translator,
        fieldtarget=jointauthor]
      \step[fieldset=jointauthortype,
        fieldvalue={=translator}]
    }
%    \end{macrocode}
%
% \subsubsection{Standards}
%
% The purpose of this map is to move the number to the head of the reference
% in the absence of an author, and try to fix the sorting accordingly.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{standard}
      \step[notfield=author,
            fieldsource=number,
            final]
      \step[fieldset=sortkey,
            origfieldval]
    }
%    \end{macrocode}
%
% \subsubsection{Audiovisual materials}
%
% For audiovisual materials, |origdatetype| defaults to \enquote{recorded}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{audio}
      \pertype{music}
      \pertype{movie}
      \pertype{video}
      \pertype{inaudio}
      \pertype{inmusic}
      \pertype{inmovie}
      \pertype{invideo}
      \step[fieldset=origdatetype,fieldvalue={recorded}]
    }
%    \end{macrocode}
%
% \subsubsection{Legal references}
%
% These help ensure compatibility with \pkg{oscola}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{jurisdiction}
      \step[fieldsource=reporter,
            fieldtarget=journaltitle]
      \step[fieldsource=court,
            fieldtarget=institution]
      \step[fieldsource=additionalreports,
            fieldtarget=listb]
      \step[fieldsource=ecli,
            fieldtarget=verba]
     }%
    \map[overwrite=false]{
      \pertype{legal}
      \step[fieldsource=reporter,
            fieldtarget=journaltitle]
    }
    \map[overwrite=true]{
        \pertype{legal}
        \step[fieldsource=parties,
              fieldtarget=institution]
        \step[fieldsource=execution,
              fieldtarget=lista]
    }
%    \end{macrocode}
%
% This is how \pkg{oscola} removes dots from entries.
%
%    \begin{macrocode}
    \map[overwrite=true]{
     \pertype{jurisdiction}
     \pertype{legislation}
     \pertype{legal}
     \step[fieldsource=title,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=title,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=title,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=title,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=shorttitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=shorttitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=shorttitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=shorttitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=parreporter,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=parreporter,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=parreporter,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=parreporter,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=journaltitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=journaltitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=journaltitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=journaltitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=institution,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=institution,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=institution,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step[fieldsource=institution,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=publisher,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=publisher,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=publisher,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=publisher,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=location,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=location,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=location,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=location,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=series,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=series,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=series,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=series,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=indextitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=indextitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=indextitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=indextitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
    }
%    \end{macrocode}
%
% If |casenumber| is given, it is converted to |number| or, if the |number| is
% already set, |userb|.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=casenumber, final]
      \step[notfield=number, fieldsource=casenumber, fieldtarget=number]
      \step[fieldsource=casenumber, fieldtarget=userb]
    }
  }%
}

%    \end{macrocode}
%
% \subsection{Sorting schemes}
%
% We adjust the sort order to take into account some other fields that might
% end up at the front (library, collection, series). The `|nty|` scheme is used
% by \textsf{oxnotes}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The `|nyt|` scheme is used by \textsf{oxyear}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{nyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sortyear}
    \field{labelyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The `|anyt|` scheme is used by \textsf{oxalph}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{anyt}{
  \sort{
    \field{presort}
  }
  \sort{
    \field{labelalpha}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sortyear}
    \field{labelyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The following entry types never put editors first.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions
  [proceedings,report,artwork,audio,image,music,movie,performance,video,%
  manuscript,unpublished,review]{useeditor=false}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</o>
%<*n>
%<*default>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Notes style: oxnotes.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% \subsection{Names}
%
% We apply our special name format to names likely to appear at the start of
% an entry.
%
%    \begin{macrocode}
\DeclareNameAlias{author}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{author}{given-family}
\DeclareNameAlias{editor}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{editor}{given-family}
%    \end{macrocode}
%
% We ensure the printing of the |anon| localization string matches.
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
}{%
  \iftoggle{blx@ox@abbranon}{%
    \iftoggle{blx@ox@scnames}{\bibcpsstring[\textsc]{anon}}{\bibcpsstring{anon}}%
  }{%
    \iftoggle{blx@ox@scnames}{\bibcplstring[\textsc]{anon}}{\bibcplstring{anon}}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxnotes) failed to patch author}}
%    \end{macrocode}
%
% \subsection{Multivolume dates}
%
% For the very particular use case of breaking down multivolume works into
% their constituent volumes, we remove the overall date, assuming that the
% individual volume dates will be used instead.
%
%    \begin{macrocode}
\xpretobibmacro{series+number+edition+publisher+location+date}{%
  \iffieldequalstr{relatedtype}{multivolume}{%
    \clearfield{year}\clearfield{month}\clearfield{day}%
  }{}}{}{}
%    \end{macrocode}
%
% \subsection{Source maps}
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Sort order}
%
% For entry types that print the |maintitle| and |volume| before the |title|,
% we need to make sure this is reflected in the sort order.
%
%    \begin{macrocode}
    \map{
      \pertype{mvbook}
      \pertype{mvcollection}
      \pertype{mvreference}
      \pertype{proceedings}
      \pertype{mvproceedings}
      \pertype{report}
      \step[fieldsource=maintitle]%
      \step[fieldset=sorttitle, origfieldval]%
      \step[fieldsource=volume]%
      \step[fieldset=sorttitle, append, origfieldval]%
      \step[fieldsource=title]%
      \step[fieldset=sorttitle, append, origfieldval]%
    }%
  }%
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</default>
%<*ibid|note|inote|trad1|trad2|trad3>
\RequireBibliographyStyle{oxnotes}
%</ibid|note|inote|trad1|trad2|trad3>
%</n>
%<*m>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Numeric style: oxnum.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% \subsection{Names}
%
% We apply our special name format to names likely to appear at the start of
% an entry.
%
%    \begin{macrocode}
\DeclareNameAlias{author}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{author}{given-family}
\DeclareNameAlias{editor}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{editor}{given-family}
%    \end{macrocode}
%
% We ensure the printing of the |anon| localization string matches.
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
}{%
  \iftoggle{blx@ox@abbranon}{%
    \iftoggle{blx@ox@scnames}{\bibcpsstring[\textsc]{anon}}{\bibcpsstring{anon}}%
  }{%
    \iftoggle{blx@ox@scnames}{\bibcplstring[\textsc]{anon}}{\bibcplstring{anon}}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxnum) failed to patch author}}
%    \end{macrocode}
%
% \subsection{Multivolume dates}
%
% For the very particular use case of breaking down multivolume works into
% their constituent volumes, we remove the overall date, assuming that the
% individual volume dates will be used instead.
%
%    \begin{macrocode}
\xpretobibmacro{series+number+edition+publisher+location+date}{%
  \iffieldequalstr{relatedtype}{multivolume}{%
    \clearfield{year}\clearfield{month}\clearfield{day}%
  }{}}{}{}
%    \end{macrocode}
%
% \subsection{Label numbers}
%
% This next code is extracted from the standard |numeric| style.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{labelnumber}

\providebool{bbx:subentry}

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

\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

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

\DeclareBibliographyDriver{set}{%
  \entryset
    {\ifbool{bbx:subentry}
       {\printfield[bibentrysetcount]{entrysetcount}%
        \printunit*{\addnbspace}}
       {}}
    {}%
  \newunit\newblock
  \usebibmacro{setpageref}%
  \finentry}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</m>
%<*y>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Author–year style: oxyear.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% Here we set some defaults different to the standard ones. The author
% can still override them.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{giveninits,labeldateparts,sorting=nyt,pagetracker,maxcitenames=2}
%    \end{macrocode}
%
% \subsection{Date merging option}
%
% We provide the |mergedate| option from the |authoryear| style. In case it
% isn't clear from the standard documentation, the purpose of this option is
% twofold: it determines whether the date printed at the head of the reference
% is the same as or different from |labeldate| as used in the citations, and
% to what extent the date information at the head of the reference is repeated
% later on. The OGS and NHR consistently use a variant that is between the
% basic and compact options, in that the year is always moved to the head of
% the reference (matching |labeldate|) but the month and day are never moved;
% this is implemented as the |year| value.
%
%    \begin{macrocode}
\DeclareBiblatexOption{global,type,entry}{mergedate}[true]{%
  \ifcsdef{bbx@opt@mergedate@#1}
    {\csuse{bbx@opt@mergedate@#1}}
    {\PackageError{biblatex-oxref}
       {Invalid option 'mergedate=#1'}
       {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak
        'year', 'true' (=year), and 'false'.}}}
%    \end{macrocode}
%
% The various values affect the definition of the following macro, used at
% the head of the reference, for which we coin the |datelabel| field format.
%
%    \begin{macrocode}
\providebibmacro*{date+extradate}{}
\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}
\DeclareFieldFormat{labeldate}{%
  \iflabeldateisdate{%
    \def\currentfield{date}%
  }{%
    \iflabeldateisanydate{%
      \def\currentfield{\thefield{labeldatesource}date}%
    }{%
      \def\currentfield{\thefield{labeldatesource}}}}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
%    \end{macrocode}
%
% On a related note, the |labeldate| uses the |origdate| if provided in
% preference to |date|, and falls back to |pubstate| if provided.
%
%    \begin{macrocode}
\DeclareLabeldate{%
  \field{origdate}
  \field{date}
  \field{year}
  \field{eventdate}
  \field{pubstate}
  \literal{nodate}
}
%    \end{macrocode}
%
% The |extradate| string should be printed bare.
%
%    \begin{macrocode}
\DeclareFieldFormat{extradate}{%
  \iffieldundef{\thefield{labeldatesource}}{%
    \iffieldnums{\thefield{labeldatesource}year}{}{~}%
  }{%
    \iffieldnums{\thefield{labeldatesource}}{}{~}%
  }%
  \mkbibemph{\mknumalph{#1}}}%

%    \end{macrocode}
%
% We provide tests similar to \cs{labeldateisdate} to tell if the |labeldate|
% is (\emph{a}) any type of date, and (\emph{b}) neither a date nor |pubstate|.
%
%    \begin{macrocode}
\def\iflabeldateisanydate{%
  \ifboolexpr{%
    togl {blx@labeldateparts}
    and not test {\iffieldundef{labeldatesource}}
    and (
      test {\iffieldequalstr{labeldatesource}{year}}
      or not test {\iffieldundef{\thefield{labeldatesource}year}}
    )}}
\def\iflabeldateispubstate{%
  \ifboolexpr{%
    not test {\iffieldundef{labeldatesource}}
    and test {\iffieldequalstr{labeldatesource}{pubstate}}}}
%    \end{macrocode}
%
% We also provide a wrapper around \cs{printlabeldateextra} that does nothing
% if the label date is the `nodate' literal \emph{and} |sortyear| is defined.
% Sadly |sortyear| is consumed before we get to this point, so we need a proxy
% toggle.
%
%    \begin{macrocode}
\newtoggle{blx@ox@nonodate}
\DeclareBiblatexOption{global,type,entry}{nonodate}[true]{%
  \settoggle{blx@ox@nonodate}{#1}}
\newbibmacro*{labeldate}{%
  \ifboolexpr{
    test {\iffieldequalstr{labeldatesource}{nodate}}
    and
    togl {blx@ox@nonodate}
  }{}{\printtext[datelabel]{\printlabeldateextra}}}
%    \end{macrocode}
%
% Since v3.12, authoryear.bbx has had an |bbx:ifmergeddate| test. We don't use
% it, but if we define it too it suppresses redefinition warnings later.
%
%    \begin{macrocode}
\newbibmacro*{bbx:ifmergeddate}{\@secondoftwo}

%    \end{macrocode}
%
% Here we provide the various possible definitions. The |authoryear|
% implementation does it by clearing, changing or restoring the normal
% definitions of the |date| and |issue+date| macros. This is not so great for
% us as our versions of those macros are quite complex (too much to keep
% repeating). There are additional complications that arise from us using
% |origdate| in preference to |date| for the label year, and from our option
% that requires us to print some dates without years. Conceptually it is more
% straightforward to clear the data fields instead.
%
% \begin{itemize}
%   \item |true| is the same as |year| (see below).
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@true{\bbx@opt@mergedate@year}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |maximum| merges the |issue| and the whole |date| with the date label.
%   Therefore, we clear year, month, and day from the date used for the label,
%   as well as the |issue| field.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@maximum{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \iflabeldateisdate{%
        \printtext[datelabel]{%
          \printfield{issue}\clearfield{issue}%
          \setunit*{\addspace}%
          \printdateextra}%
        \clearfield{year}\clearfield{yeardivision}\clearfield{month}\clearfield{day}%
      }{%
        \iflabeldateisanydate{%
          \printtext[datelabel]{%
            \csuse{print\thefield{labeldatesource}dateextra}}%
          \clearfield{\thefield{labeldatesource}year}%
          \clearfield{\thefield{labeldatesource}yeardivision}%
          \clearfield{\thefield{labeldatesource}month}%
          \clearfield{\thefield{labeldatesource}day}%
        }{%
          \usebibmacro{labeldate}%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}}}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |compact| merges the whole |date| (but not |issue|) with date label.
%   Therefore, we clear year, month, and day from the date used for the label,
%   but leave the |issue| field alone.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@compact{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \iflabeldateisdate{%
        \printtext[datelabel]{\printdateextra}%
        \clearfield{year}\clearfield{yeardivision}\clearfield{month}\clearfield{day}%
      }{%
        \iflabeldateisanydate{%
          \printtext[datelabel]{%
            \csuse{print\thefield{labeldatesource}dateextra}}%
          \clearfield{\thefield{labeldatesource}year}%
          \clearfield{\thefield{labeldatesource}yeardivision}%
          \clearfield{\thefield{labeldatesource}month}%
          \clearfield{\thefield{labeldatesource}day}%
        }{%
          \usebibmacro{labeldate}%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}}}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |year| always merges the year, and only the year, with the label date.
%   Other date and time componenents are displayed later in the reference.
%   Therefore we clear the year from the date used for the label, but leave
%   the month and day alone.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@year{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \clearfield{year}
      }{%
        \iflabeldateisanydate{%
          \clearfield{\thefield{labeldatesource}year}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |basic| will merge a year-only date with the date label, but will
%   otherwise display the label year at the head of the reference and the full
%   date later. Therefore we clear the year if and only if there is no month
%   component \emph{and} (if this is the regular |date|) no |issue|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@basic{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \ifboolexpr{
          test {\ifdateshavedifferentprecision{label}{}}
          or
          not test {\iffieldundef{issue}}
        }{}{%
          \clearfield{year}}%
      }{%
        \iflabeldateisanydate{%
          \ifdateshavedifferentprecision{label}{\thefield{labeldatesource}}{}{%
            \clearfield{\thefield{labeldatesource}year}}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |minimum| will only merge the |date| with the label date if the two
%   are identical, that is, a bare year with no month or disambiguating suffix.
%   Therefore we clear the year if and only if there is no month component, no
%   |extradate|, \emph{and} (if this is the regular |date|) no |issue|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@minimum{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \ifboolexpr{
          test {\ifdateshavedifferentprecision{label}{}}
          or
          not test {\iffieldundef{extradate}}
          or
          not test {\iffieldundef{issue}}
        }{}{%
          \clearfield{year}}%
      }{%
        \iflabeldateisanydate{%
          \ifboolexpr{
            test {\ifdateshavedifferentprecision{label}{\thefield{labeldatesource}}}
            or
            not test {\iffieldundef{extradate}}
          }{}{%
            \clearfield{\thefield{labeldatesource}year}}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |false| suppresses any merging. We only clear the label date source
%   if it is a non-date field other than |pubstate|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@false{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisanydate{}{%
        \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
      }}}}
%    \end{macrocode}
%
% We set the default to be |true|/|year|.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{mergedate}
%    \end{macrocode}
%
% The problem with moving years but leaving months and days behind is that the
% regular date range macros in |biblatex.sty| do nothing at all if no year
% is printed. We therefore need to patch the macros with extra routines for
% printing year-free date ranges: the rather extravagently named
% \cs{mknoyeardaterangefull} and \cs{mknoyeardaterangetrunc}.
%
%    \begin{macrocode}
\newrobustcmd*{\mknoyeardaterangefull}[2]{%
  \iffieldundef{#2month}{}{%
    \printtext[{#2date}]{%
      \datecircaprint
      \iffieldundef{#2yeardivision}{%
        \csuse{mkbibdate#1}{}{#2month}{#2day}%
        \blx@printtime{#2}{}%
      }{%
        \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
      \dateuncertainprint
      \iffieldundef{#2endmonth}{}{%
        \iffieldequalstr{#2endmonth}{}{%
          \mbox{\bibdaterangesep}%
        }{%
          \bibdaterangesep
          \enddatecircaprint
          \iffieldundef{#2yeardivision}{%
            \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
            \blx@printtime{#2}{end}%
          }{%
            \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
          \enddateuncertainprint}}}}}
%    \end{macrocode}
%
% There is a potential problem for \cs{mknoyeardaterangetrunc}, in that if
% the year and endyear are missing, it cannot tell if they are the same, so
% if the months are the same but the years are different, the range would
% be erroneously compressed. However, the only reason the year should
% be missing is that it is in the label, so we test |labelyear| instead.
%
%    \begin{macrocode}
\newrobustcmd*{\mknoyeardaterangetrunc}[2]{%
  \iffieldundef{#2month}{}{%
    \printtext[{#2date}]{%
      \datecircaprint
      \iffieldundef{#2yeardivision}{%
        \ifboolexpr{
          test {\ifdateyearsequal{label}{labelend}}
          and
          test {\iffieldsequal{#2month}{#2endmonth}}
        }{%
          \csuse{mkbibdate#1}{}{}{#2day}%
        }{%
          \csuse{mkbibdate#1}{}{#2month}{#2day}}%
      }{%
        \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
      \dateuncertainprint
      \iffieldundef{#2endmonth}{}{%
        \iffieldequalstr{#2endmonth}{}{%
          \mbox{\bibdaterangesep}%
        }{%
          \bibdaterangesep
          \enddatecircaprint
          \iffieldundef{#2yeardivision}{%
            \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
          }{%
            \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
          \enddateuncertainprint}}}}}
%    \end{macrocode}
%
% Now we patch the four date range commands. The |extra| commands,
% which print disambiguating labels as well, should only print those
% labels if the year is present, so they can use the same non-year
% date range functions as the non-|extra| commands.
%
%    \begin{macrocode}
\xpatchcmd{\mkdaterangefull}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangefull}}
\xpatchcmd{\mkdaterangetrunc@i}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangetrunc@i}}
\xpatchcmd{\mkdaterangefullextra}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangefullextra}}
\xpatchcmd{\mkdaterangetruncextra@i}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangetruncextra@i}}

%    \end{macrocode}
%
% \subsection{Bibliography formatting}
%
% We let \pkg{biblatex} measure shorthands so we can use
% \cs{shorthandwidth} later.
%
%    \begin{macrocode}
\DeclareFieldFormat{shorthandwidth}{#1}
%    \end{macrocode}
%
% We enhance the |family-given| name format to handle the \texttt{pseudo}
% and \texttt{inferred} annotations.
%
%    \begin{macrocode}
\xpretonameformat{family-given}{%
  \iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}%
  \ifitemannotation{inferred}{\bibopenbracket}{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to prepend to family-given}}
\xpatchnameformat{family-given}{%
  \usebibmacro{name:andothers}%
}{%
  \ifitemannotation{pseudo}{%
    \addspace\printtext[parens]{\bibsstring{pseudo}}%
  }{}%
  \ifitemannotation{inferred}{\bibclosebracket}{}%
  \usebibmacro{name:andothers}%
  \iffieldannotation{inferred}{%
    \ifboolexpr{
      test {\ifnumequal{\value{listcount}}{\value{maxnames}}}
      or
      test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
      or (
        test {\ifnumequal{\value{listcount}}{\value{minnames}}}
        and
        test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}} )
    }{\bibclosebracket}{}%
  }{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch family-given}}
\DeclareNameAlias{shortauthor}{family-given}
\DeclareNameAlias{shorteditor}{family-given}
%    \end{macrocode}
%
% Names at the head of the reference are family-given, but names elsewhere
% are given-family.
%
%    \begin{macrocode}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{author}{family-given}
\DeclareNameAlias{editor}{family-given}
\DeclareNameAlias{translator}{family-given}
%    \end{macrocode}
%
% The bibliography formatting is just like |authoryear| except we do not
% eliminate item separation by default.
%
%    \begin{macrocode}
\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% The shorthand formatting is just like |authoryear|.
%
%    \begin{macrocode}
\defbibenvironment{shorthand}
  {\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]{##1\hss}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% \subsection{Name and date formatting}
%
% We set up hashing just as in |authoryear|.
%
%    \begin{macrocode}
\InitializeBibliographyStyle{\global\undef\bbx@lasthash}
%    \end{macrocode}
%
% We ensure related entries do not interfere with the hashing.
%
%    \begin{macrocode}
\xapptobibmacro{begrelated}{%
  \booltrue{bbx@inset}}%
{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to append to begrelated}}
\xapptobibmacro{endrelated}{%
  \usebibmacro*{bbx:savehash}}%
{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to append to endrelated}}
%    \end{macrocode}
%
% We patch the |author| macro so that the date label information appears
% at the end (as in |authoryear|).
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iffieldundef{authortype}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \iffieldundef{authortype}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author (authortype)}}%
\xpatchbibmacro{author}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author (lasthash)}}%
%    \end{macrocode}
%
% We patch it further so that, where an author name has a corresponding
% (different) short author name, the short name is given first and the long
% name given in parentheses. Note that this only affects cases where
% \code{authoraddon} has not been provided.
%
%    \begin{macrocode}
\xpatchbibmacro{author+altauthor}{%
  \printnames{author}%
}{%
  \ifboolexpr{%
    ( not test {\ifnameundef{shortauthor}} )
    and
    test {\ifnumequal{\value{shortauthor}}{\value{author}}}
  }{%
    \usebibmacro{namepairs}{author}{shortauthor}%
  }{%
    \printnames{author}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author+altauthor}}%
%    \end{macrocode}
%
% We apply the same patches to |bbx:editor|, but also move the editor
% string to after the date label.
%
%    \begin{macrocode}
\xpatchbibmacro{bbx:editor}{%
  \usebibmacro{#1}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \usebibmacro{#1}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:editor}}%
\xpatchbibmacro{bbx:editor}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:editor (lasthash)}}%
\xpatchbibmacro{editor+alteditor}{%
  \printnames[byeditor]%
}{%
  \printnames[editor]%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch editor+alteditor}}
\xpatchbibmacro{editor+alteditor}{%
  \printnames{editor}%
}{%
  \ifboolexpr{%
    ( not test {\ifnameundef{shorteditor}} )
    and
    test {\ifnumequal{\value{shorteditor}}{\value{editor}}}
  }{%
    \usebibmacro{namepairs}{editor}{shorteditor}%
  }{%
    \printnames{editor}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch editor+alteditor (shorteditor)}}%
%    \end{macrocode}
%
% We apply the same patches to |bbx:translator| as we do for
% |bbx:editor|, except for the shortening one.
%
%    \begin{macrocode}
\xpatchbibmacro{bbx:translator}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:translator (lasthash)}}%
\xpatchbibmacro{bbx:translator}{%
  \usebibmacro{#1}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \usebibmacro{#1}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:translator}}%
%    \end{macrocode}
%
% The |labeltitle| macro differs from the one from |authoryear| in that
% it also includes the subtitle. We record the fact that we have cleared
% the title.
%
%    \begin{macrocode}
\newtoggle{blx@ox@clearedtitle}
\newbibmacro*{labeltitle}{%
  \iffieldundef{label}{%
    \iffieldundef{shorttitle}{%
      \ifboolexpr{
        test {\iffieldundef{title}}
        and
        test {\iffieldundef{subtitle}}
      }{%
        \printfield{library}%
        \clearfield{library}%
      }{%
        \printtext[title]{%
          \printfield[titlecase]{title}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{subtitle}}%
        \clearfield{title}%
        \clearfield{subtitle}%
        \toggletrue{blx@ox@clearedtitle}%
        \setunit{\addspace}%
      }%
    }{%
      \printtext[title]{\printfield[titlecase]{shorttitle}}%
    }%
  }{%
    \printfield{label}%
  }%
}
%    \end{macrocode}
%
% If the labeltitle pulls the title from a maintitle+title macro,
% we flick a switch to make the driver use maintitle+volume instead.
%
%    \begin{macrocode}
\xpretobibmacro{maintitle+title}{%
  \iftoggle{blx@ox@clearedtitle}{%
    \usebibmacro{maintitle+volume}%
    \clearfield{maintitle}%
    \clearfield{volume}%
  }{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to prepend to maintitle+title}}
\DeclareFieldFormat[mvbook,mvcollection,mvreference,proceedings,mvproceedings]{maintitle+volume}{#1}
%    \end{macrocode}
%
% The date of |online| entries is printed in parentheses; as the year
% is moved after the author, this can lead to empty parentheses unless
% a month is printed, so we change the test accordingly.
%
%    \begin{macrocode}
\xpatchbibdriver{online}{%
  \iffieldundef{year}%
}{%
  \ifboolexpr{
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch online}}
%    \end{macrocode}
%
% We ensure the label title in citations matches the formatting used for
% the equivalent information in the bibliography entry.
%
%    \begin{macrocode}
\DeclareFieldFormat[bookinbook]{citetitle}{%
  \ifboolexpr{
    test {\iffieldequalstr{entrysubtype}{poem}}
    or
    test {\iffieldequalstr{entrysubtype}{play}}
  }{%
    \mkbibemph{#1}%
  }{%
    \mkbibquote{#1\isdot}}}
\DeclareFieldFormat[suppperiodical,inaudio,inmusic,inmovie,invideo,online,%
    image,manuscript,unpublished]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[suppperiodical,inaudio,inmusic,inmovie,invideo,online,%
    image,manuscript,unpublished]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[audio,music]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[movie,video]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[legislation,legal]{citetitle}{#1}
\DeclareFieldFormat[misc]%
    {citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \iffieldequalstr{relatedtype}{in}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}%
    }}%
  \undef\currentfield}

%    \end{macrocode}
%
% \subsection{Journal division formatting}
%
% \textsf{Oxyear} uses a colon to demarcate page numbers in journal articles.
%
%    \begin{macrocode}
\renewcommand*{\bibpagespunct}{%
  \ifboolexpr{
    test {\ifentrytype{article}}
    or
    test {\ifentrytype{suppperiodical}}
    or
    test {\ifentrytype{review}}
  }{%
    \addcolon\space
  }{%
    \addcomma\space
  }%
}
%    \end{macrocode}
%
% \subsection{Manuscripts}
%
% Since we clear the title, we need a more sophisticated test for whether to
% suppress the date.
%
%    \begin{macrocode}
\renewbibmacro{manuscript:date}{%
  \ifboolexpr{
    test {\ifnameundef{author}}
    and
    not togl {blx@ox@clearedtitle}
    and
    test {\iffieldundef{label}}
  }{}{\usebibmacro{date}}}
%    \end{macrocode}
%
% We include the |library| field as a fallback title.
%
%    \begin{macrocode}
\DeclareLabeltitle{%
  \field{shorttitle}
  \field{title}
  \field{maintitle}
  \field{library}
}
%    \end{macrocode}
%
% \subsection{Source maps}
%
% We use the source mapping capabilities of Biber to fix the following issues.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Suppressing a \enquote{nodate} label}
%
% Unless already set, the \key{nonodate} option is inserted if |sortyear| is
% used. We accomplish this with source maps; the first one works where options
% (not including |nonodate|) have been set, the second where no options have
% been set.
%
%    \begin{macrocode}
    \map[overwrite=true]{
      \step[notmatch=\regexp{nonodate}, fieldsource=options, final]
      \step[fieldsource=sortyear, final]
      \step[fieldset=options, append, fieldvalue={,nonodate}]
    }
    \map[overwrite=true]{
      \step[notfield=options, final]
      \step[fieldsource=sortyear, final]
      \step[fieldset=options, fieldvalue={nonodate}]
    }
%    \end{macrocode}
%
% \subsubsection{Standards}
%
% The purpose of this map is to change the number into a label in the absence
% of an author, so that the citations come out right and the date is positioned
% correctly.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{standard}
      \step[notfield=author,
            fieldsource=number,
            fieldtarget=label]
    }
}}

%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</y>
%<*a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Alphabetic style: oxalph.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% This style is based on |oxyear|.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxyear}
%    \end{macrocode}
%
% \subsection{Suppressing labelextra}
%
% Since the label codes do all the disambiguation, it is not necessary for
% the date at the head of the reference to have a disambiguation component.
%
%    \begin{macrocode}
\xpatchcmd{\bbx@opt@mergedate@maximum}{%
  \printdateextra
}{%
  \printdate
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (print)}}
\xpatchcmd{\bbx@opt@mergedate@maximum}{%
  \csuse{print\thefield{labeldatesource}dateextra}%
}{%
  \csuse{print\thefield{labeldatesource}date}%
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (label)}}
\xpatchcmd{\bbx@opt@mergedate@compact}{%
  \csuse{print\thefield{labeldatesource}dateextra}%
}{%
  \csuse{print\thefield{labeldatesource}date}%
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@compact}}
\xpatchbibmacro{labeldate}{%
  \printlabeldateextra
}{%
  \printlabeldate
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch labeldate}}
\ExecuteBibliographyOptions{mergedate}

%    \end{macrocode}
%
% \subsection{Label codes: printing}
%
% This next code is extracted from the standard |alphabetic| style, and among
% other things ensures the citation labels are printed in the bibliography.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{labelalpha,sorting=anyt}

\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelalphawidth]{%
        \printfield{labelprefix}%
	\printfield{labelalpha}%
        \printfield{extraalpha}}}
     {\setlength{\labelwidth}{\labelalphawidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1\hss}}
  {\endlist}
  {\item}

\defbibenvironment{shorthand}
  {\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]{##1\hss}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% \subsection{Label codes: generating}
%
% The standard labels are generated from the |labelname| and |year|. We widen
% the net a bit, so that if there is no |labelname|, we fall back to the
% |shortlabeltitle| or |labeltitle|; also we use |labelyear| in place of
% |year|. The |shortlabeltitle| is generated from all the capital letters in
% the title and subtitle, with the help of a source map.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite=false]{%
      \step[fieldsource=title, final]
      \step[fieldset=shortlabeltitle, origfieldval]
      \step[fieldsource=subtitle]
      \step[fieldset=shortlabeltitle, origfieldval, append=true]
      \step[fieldsource=shortlabeltitle,
            match=\regexp{[^\p{Lu}]},
            replace=\regexp{}]
}}}
\DeclareLabelalphaTemplate{%
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1]{labelname}
    \field[strwidth=1,strside=left]{labelname}
    \field[strwidth=3,strside=left]{shortlabeltitle}
    \field[strwidth=4,strside=left]{labeltitle}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{labelyear}
  }
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</a>
%</bbx>
%<*cbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Citation styles}
%
% \settocdepth{section}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*n>
%<*default>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Notes style: oxnotes.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |verbose| style is a close match for what we need.
%
%    \begin{macrocode}
\RequireCitationStyle{verbose}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</default>
%<*ibid>
%    \begin{macrocode}
\RequireCitationStyle{verbose-ibid}
%    \end{macrocode}
%</ibid>
%<*note>
%    \begin{macrocode}
\RequireCitationStyle{verbose-note}
%    \end{macrocode}
%</note>
%<*inote>
%    \begin{macrocode}
\RequireCitationStyle{verbose-inote}
%    \end{macrocode}
%</inote>
%<*trad1>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad1}
%    \end{macrocode}
%</trad1>
%<*trad2>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad2}
%    \end{macrocode}
%</trad2>
%<*trad3>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad3}
%    \end{macrocode}
%</trad3>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Variants are also provided that load the respective variant of |verbose|
% at this point.
%
% The main difference is that the \key{citepages} option from these styles
% needs to be \val{separate} by default, and the \cs{postnotedelim} before
% the bibliography string |thiscite| (\enquote{at}) is replaced by a simple
% space.
%
%    \begin{macrocode}
\newbibmacro*{cite:postnote:pages}{%
  \setunit{\addspace}%
  \bibstring{thiscite}%
  \setunit{\addspace}%
  \printfield{postnote}}
\ExecuteBibliographyOptions{citepages=separate}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</n>
%<*m>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Numeric style: oxnum.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |numeric| style works, needing only a little configuration.
%
%    \begin{macrocode}
\RequireCitationStyle{numeric-comp}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</m>
%<*y>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Author–year style: oxyear.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |authoryear-comp| style is a close match for what we need.
%
%    \begin{macrocode}
\RequireCitationStyle{authoryear-comp}
%    \end{macrocode}
%
% This sets \key{uniquename} to \val{full}, but that conflicts with
% \key{giveninits} set by the bibliography style, so we set it to \val{init}
% instead. If left alone, \pkg{biblatex} would do this anyway, but if we do it
% explicitly, we avoid the warning message.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{uniquename=init}
%    \end{macrocode}
%
% We provide a slightly different labeldate macro that obeys the \code{nonodate}
% option.
%
%    \begin{macrocode}
\renewbibmacro*{cite:labeldate+extradate}{%
  \ifboolexpr{
    test {\iffieldundef{labelyear}}
    or
    ( test {\iffieldequalstr{labeldatesource}{nodate}}
      and
      togl {blx@ox@nonodate} )
  }{}{\printtext[bibhyperref]{\printlabeldateextra}}}
%    \end{macrocode}
%
% We insert anonymous author handling into |cite|.
%
%    \begin{macrocode}
\xpatchbibmacro{cite}{%
  \printnames{labelname}%
}{%
  \ifboolexpr{
    test {\iffieldequalstr{labelnamesource}{author}}
    and
    togl {blx@ox@autoanon}
    and
    test {\iffieldequals{rawauthor}{\oxrefanon}}
  }{%
    \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
  }{%
    \printnames{labelname}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch cite}}
%    \end{macrocode}
%
% The name and year are usually separated by a space, but if the date is
% replaced by a word (e.g. \enquote{forthcoming}, \enquote{n.d.}), they are separated by
% a comma.
%
%    \begin{macrocode}
\DeclareDelimFormat{nameyeardelim}{%
  \iflabeldateisanydate
    {\addspace}%
    {\addcomma\space}}
\DeclareDelimFormat{nonameyeardelim}{%
  \iflabeldateisanydate
    {\addspace}%
    {\addcomma\space}}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</y>
%<*a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Alphabetic style: oxalph.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |alphabetic| style works, needing only a little configuration.
%
%    \begin{macrocode}
\RequireCitationStyle{alphabetic}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Common citation fixes}
%
% \setcounter{FancyVerbLine}{0}
%
% This code is appended to all the citation style files.
%
% Just in case someone loaded this without loading |oxref.bbx|, we ensure the
% necessary definitions are in place.
%
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\providetoggle{blx@ox@autoanon}
\providetoggle{blx@ox@abbranon}
%    \end{macrocode}
%
% We fix the |textcite| macro so if the \key{anon} option is set to \val{long}
% or \val{short}, a value of \enquote{Anonymous} is replaced by the bibliography
% string |anon|.
%
%    \begin{macrocode}
\xpatchbibmacro{textcite}{%
  \printnames{labelname}%
}{%
  \ifboolexpr{
    test {\iffieldequalstr{labelnamesource}{author}}
    and
    togl {blx@ox@autoanon}
    and
    test {\iffieldequals{rawauthor}{\oxrefanon}}
  }{%
    \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
  }{%
    \printnames{labelname}%
  }%
}{}{\wlog{WARNING: biblatex-oxref failed to patch textcite}}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</cbx>
%<*dbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Data model adjustments}
%
% \section{oxnotes.dbx, oxyear.dbx, oxnum.dbx, and oxalph.dbx}
%
% \setcounter{FancyVerbLine}{19}
%
% We provide an additional name part for handling titles.
%
%    \begin{macrocode}
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,title}
%    \end{macrocode}
%
% The |datetype| and |origdatetype| fields are used for prefixing the date with
% a description.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{datetype,origdatetype}
%    \end{macrocode}
%
% We add the |inaudio| entry type and friends.
%
%    \begin{macrocode}
\DeclareDatamodelEntrytypes{inaudio,inmusic,inmovie,invideo}
%    \end{macrocode}
%
% The |authoraddon| and |editoraddon| fields are used for handling
% pseudonyms. The |serieseditor| field is used for the editor of a book series,
% as opposed to the editor of the particular cited work.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=list,datatype=name]{authoraddon,editoraddon,serieseditor}
%    \end{macrocode}
%
% The |jointauthor| and |jointauthortype| fields are used for internally for
% handling editors/translators who can be considered joint authors.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=list,datatype=name]{jointauthor}
\DeclareDatamodelFields[type=field,datatype=literal]{jointauthortype}
%    \end{macrocode}
%
% The |rawauthor| field is used internally for checking whether an
% the name given in the |author| field is a keyword meaning \enquote{anonymous}.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{rawauthor}
\DeclareDatamodelEntryfields{datetype,origdatetype,authoraddon,editoraddon,%
  serieseditor,jointauthor,jointauthortype,rawauthor}
%    \end{macrocode}
%
% We provide a |shortlabeltitle| field to contain our custom reduction of the
% |labeltitle|.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{shortlabeltitle}
%    \end{macrocode}
%
% This data model is borrowed from \textsf{biblatex-manuscripts-philology}.
%
%    \begin{macrocode}
\DeclareDatamodelEntrytypes{manuscript}
\DeclareDatamodelFields[type=field,datatype=literal]{catalog,dating,%
  shortlibrary,columns, collection,shortcollection,usualtitle,shelfmark,%
  sortshelfmark,support,columns,layer}
\DeclareDatamodelFields[type=list,datatype=name]{scribe,owner}
\DeclareDatamodelFields[type=list,datatype=literal]{origin}
\DeclareDatamodelEntryfields[manuscript]{catalog,dating,shortlibrary,%
  shortcollection,columns,languages,collection,usualtitle,shelfmark,%
  sortshelfmark,support,columns,origin,scribe,owner}
%    \end{macrocode}
%
% This data model helps with legal citations.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=date]{pardate}
\DeclareDatamodelFields[type=field,datatype=literal]{%
  parreporter,parseries,neutralcite}
\DeclareDatamodelFields[type=field,datatype=integer]{parvolume}
\DeclareDatamodelFields[type=field,datatype=range]{parpages}
\DeclareDatamodelEntryfields[jurisdiction]{neutralcite,pardate,%
  parreporter,parseries,parvolume,parpages}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</dbx>
%<*lbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Localization modules}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*en>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{English: english-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Here we set some language-specific punctuation and date formatting.
% In particular, we set \cs{blx@ox@langbibstring} to use its first
% argument.
%
%    \begin{macrocode}
\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{%
  \def\finalandcomma{\addcomma}%
  \def\blx@ox@langbibstring#1#2{#1\setunit*{\addspace}\bibstring{#2}}%
}
\UndeclareBibliographyExtras{%
  \def\blx@ox@langbibstring#1#2{\bibstring{#2}}%
}
%    \end{macrocode}
%
% We load the standard set of localization strings, then add our
% adjustments.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {english},
%    \end{macrocode}
%
% These are new strings defined by \pkg[biblatex]{oxref}:
%
% \begin{itemize}
%   \item Roles expressed as functions
% \end{itemize}
%
%    \begin{macrocode}
  director         = {{director}{dir\adddot}},
  directors        = {{directors}{dirs\adddot}},
  performer        = {{}{}},
  performers       = {{}{}},
  reader           = {{reader}{reader}},
  readers          = {{readers}{readers}},
  conductor        = {{conductor}{cond\adddot}},
  conductors       = {{conductors}{cond\adddot}},
  serieseditor     = {{series editor}{ser\adddotspace ed\adddot}},
  serieseditors    = {{series editors}{ser\adddotspace eds\adddot}},
  holder           = {{holder}{holder}},
  holders          = {{holders}{holders}},
  editorcm         = {{editor and compiler}{ed\adddotspace and comp\adddot}},
  editorcms        = {{editors and compilers}{eds\adddotspace and comp\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Roles expressed as actions
% \end{itemize}
%
%    \begin{macrocode}
  byperformer      = {{}{}},
  bydirector       = {{directed by}{dir\adddot}},
  byreader         = {{read by}{read by}},
  byconductor      = {{conducted by}{cond\adddot}},
  byserieseditor   = {{edited by}{ed\adddot}},
  byholder         = {{held by}{held by}},
  byeditorcm       = {{edited and compiled by}{ed\adddotspace and comp\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication details
% \end{itemize}
%
%    \begin{macrocode}
  facsimile        = {{facsimile edition}{facs\adddotspace edn\adddot}},
  revised          = {{revised edition}{rev\adddotspace edn\adddot}},
  revisedenlarged  = {{revised and enlarged edition}{rev\adddotspace and enl\addotspace edn\adddot}},
  revisedreprint   = {{revised reprint}{rev\adddotspace repr\adddot}},
  suppto           = {{Supplement to}{Supplement to}},
  equals           = {{=}{=}},
  original         = {{original}{orig\adddot}},
  amendedby        = {{as amended by}{as amended by}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication state
% \end{itemize}
%
%    \begin{macrocode}
  inpressin        = {{to be published in}{to be published in}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Pagination
% \end{itemize}
%
%    \begin{macrocode}
  book             = {{book}{bk\adddot}},
  books            = {{books}{bks\adddot}},
  canto            = {{canto}{canto}},
  cantos           = {{cantos}{cantos}},
  stanza           = {{stanza}{stanza}},
  stanzas          = {{stanzas}{stanzas}},
  act              = {{Act}{Act}},
  acts             = {{Acts}{Acts}},
  scene            = {{Scene}{Scene}},
  scenes           = {{Scenes}{Scenes}},
  folio            = {{folio}{fo\adddot}},
  folios           = {{folios}{fos\adddot}},
  article          = {{article}{art\adddot}},
  articles         = {{articles}{arts\adddot}},
  clause           = {{clause}{cl\adddot}},
  clauses          = {{clauses}{cls\adddot}},
  regulation       = {{regulation}{reg\adddot}},
  regulations      = {{regulations}{regs\adddot}},
  rule             = {{rule}{r\adddot}},
  rules            = {{rules}{rr\adddot}},
  booktotal        = {{book}{bk\adddot}},
  booktotals       = {{books}{bks\adddot}},
  cantototal       = {{canto}{canto}},
  cantototals      = {{cantos}{cantos}},
  stanzatotal      = {{stanza}{stanza}},
  stanzatotals     = {{stanzas}{stanzas}},
  acttotal         = {{Act}{Act}},
  acttotals        = {{Acts}{Acts}},
  scenetotal       = {{Scene}{Scene}},
  scenetotals      = {{Scenes}{Scenes}},
  foliototal       = {{folio}{fo\adddot}},
  foliototals      = {{folios}{fos\adddot}},
  articletotal     = {{article}{art\adddot}},
  articletotals    = {{articles}{arts\adddot}},
  clausetotal      = {{clause}{cl\adddot}},
  clausetotals     = {{clauses}{cls\adddot}},
  regulationtotal  = {{regulation}{reg\adddot}},
  regulationtotals = {{regulations}{regs\adddot}},
  ruletotal        = {{rule}{r\adddot}},
  ruletotals       = {{rules}{rr\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Types
% \end{itemize}
%
%    \begin{macrocode}
  facebook         = {{Facebook post}{Facebook post}},
  tweet            = {{Twitter post}{Twitter post}},
  podcast          = {{podcast}{podcast}},
  clip             = {{video}{video}},
  webcast          = {{webcast}{webcast}},
  poster           = {{poster}{poster}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Miscellaneous
% \end{itemize}
%
%    \begin{macrocode}
  nolocation       = {{no place}{n\adddot p\adddot}},
  modified         = {{last modified}{last modified}},
  recorded         = {{recorded}{recorded}},
  uploaded         = {{uploaded}{uploaded}},
  filed            = {{filed}{filed}},
  issued           = {{issued}{issued}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Labels
% \end{itemize}
%
%    \begin{macrocode}
  anon             = {{Anonymous}{Anon\adddot}},
  pseudo           = {{Pseudo-}{Ps\adddot-}},
  urldown          = {{downloaded}{downloaded}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Country names, patents, and patent requests,
% \end{itemize}
%
%    \begin{macrocode}
  countryjp        = {{Japan}{JP}},
  patentjp         = {{Japanese patent}{Japanese pat.\adddot}},
  patreqjp         = {{Japanese patent request}{Japanese pat.\adddot req.\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item These are borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column          = {{one column}{1\addnbspace col\adddot}},
  2column          = {{two columns}{2\addnbspace col\adddot}},
  inflayer         = {{inferior layer}{inf\adddotspace lay\adddot}},
  suplayer         = {{superior layer}{sup\adddotspace lay\adddot}},
  paper            = {{paper}{pap\adddot}},
  papyrus          = {{papyrus}{papy\adddot}},
  parchment        = {{parchment}{parch\adddot}},
  eucase           = {{Case}{Case}},
  eujoinedcases    = {{Joined Cases}{Joined Cases}},
  commissiondecision = {{Commission Decision}{Commission Decision}},
  application      = {{Application}{App\adddot}},
  order            = {{Order}{Ord\adddot}},
  bill             = {{Bill}{Bill}},
  draft            = {{draft}{draft}},
  opened           = {{opened for signature}{opened for signature}},
  signed           = {{signed}{signed}},
  adopted          = {{adopted}{adopted}},
  inforce          = {{entered into force}{entered into force}},
%    \end{macrocode}
%
% The rest of these strings are the standard ones, overridden to match the
% examples in the \emph{Oxford Guide to Style} and \emph{New Hart's Rules}.
% Many of these are guesses extrapolated from what is given.
%
% The roles expressed as functions do not need adjusting. The roles
% expressed as actions do not typically end in \enquote{by} when abbreviated;
% the \enquote{with} parts go first when abbreviated if there is more than one
% editorial role (at least, that is one way of interpreting the examples).
%
%    \begin{macrocode}
  byeditor         = {{edited by}{ed\adddot}},
  bycompiler       = {{compiled by}{comp\adddot}},
  byfounder        = {{founded by}{found\adddot}},
  bycontinuator    = {{continued by}{cont\adddot}},
  byredactor       = {{redacted by}{red\adddot}},
  byreviser        = {{revised by}{rev\adddot}},
  byreviewer       = {{reviewed by}{rev\adddot}},
  bycollaborator   = {{in collaboration with}{in collab\adddotspace with}},
  bytranslator     = {{translated by}{trans\adddot}},
  bycommentator    = {{commented by}{comm\adddot}},
  byannotator      = {{annotated by}{annot\adddot}},
  byeditortr       = {{edited and translated by}%
                      {ed\adddotspace and trans\adddot}},
  byeditorco       = {{edited and commented by}%
                      {ed\adddotspace and comm\adddot}},
  byeditoran       = {{edited and annotated by}%
                      {ed\adddotspace and annot\adddot}},
  byeditorin       = {{edited, with an introduction, by}%
                      {ed.\adddotspace with introduction}},
  byeditorfo       = {{edited, with a foreword, by}%
                      {ed.\adddotspace with foreword}},
  byeditoraf       = {{edited, with an afterword, by}%
                      {ed.\adddotspace with afterword}},
  byeditortrco     = {{edited, translated\finalandcomma\ and commented by}%
                      {ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
  byeditortran     = {{edited, translated\finalandcomma\ and annotated by}%
                      {ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
  byeditortrin     = {{edited and translated, with an introduction, by}%
                      {with introduction, ed\adddotspace and trans\adddot}},
  byeditortrfo     = {{edited and translated, with a foreword, by}%
                      {with foreword, ed\adddotspace and trans\adddot}},
  byeditortraf     = {{edited and translated, with an afterword, by}%
                      {with afterword, ed\adddotspace and trans\adddot}},
  byeditorcoin     = {{edited and commented, with an introduction, by}%
                      {with introduction, ed\adddotspace and comm\adddot}},
  byeditorcofo     = {{edited and commented, with a foreword, by}%
                      {with foreword, ed\adddotspace and comm\adddot}},
  byeditorcoaf     = {{edited and commented, with an afterword, by}%
                      {with afterword, ed\adddotspace and comm\adddot}},
  byeditoranin     = {{edited and annotated, with an introduction, by}%
                      {with introduction, ed\adddotspace and annot\adddot}},
  byeditoranfo     = {{edited and annotated, with a foreword, by}%
                      {with foreword, ed\adddotspace and annot\adddot}},
  byeditoranaf     = {{edited and annotated, with an afterword, by}%
                      {with afterword, ed\adddotspace and annot\adddot}},
  byeditortrcoin   = {{edited, translated\finalandcomma\ and commented, with an introduction, by}%
                      {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
  byeditortrcofo   = {{edited, translated\finalandcomma\ and commented, with a foreword, by}%
                      {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
  byeditortrcoaf   = {{edited, translated\finalandcomma\ and commented, with an afterword, by}%
                      {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and comm\adddot}},
  byeditortranin   = {{edited, translated\finalandcomma\ and annotated, with an introduction, by}%
                      {with introduction, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
  byeditortranfo   = {{edited, translated\finalandcomma\ and annotated, with a foreword, by}%
                      {with foreword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
  byeditortranaf   = {{edited, translated\finalandcomma\ and annotated, with an afterword, by}%
                      {with afterword, ed.,\addabbrvspace trans\adddot\finalandcomma\ and annot\adddot}},
  bytranslatorco   = {{translated and commented by}%
                      {trans\adddotspace and comm\adddot}},
  bytranslatoran   = {{translated and annotated by}%
                      {trans\adddotspace and annot\adddot}},
  bytranslatorin   = {{translated, with an introduction, by}%
                      {trans\adddotspace with introduction}},
  bytranslatorfo   = {{translated, with a foreword, by}%
                      {trans\adddotspace with foreword}},
  bytranslatoraf   = {{translated, with an afterword, by}%
                      {trans\adddotspace with afterword}},
  bytranslatorcoin = {{translated and commented, with an introduction, by}%
                      {with introduction, trans\adddotspace and comm\adddot}},
  bytranslatorcofo = {{translated and commented, with a foreword, by}%
                      {with foreword, trans\adddotspace and comm\adddot}},
  bytranslatorcoaf = {{translated and commented, with an afterword, by}%
                      {with afterword, trans\adddotspace and comm\adddot}},
  bytranslatoranin = {{translated and annotated, with an introduction, by}%
                      {with introduction, trans\adddotspace and annot\adddot}},
  bytranslatoranfo = {{translated and annotated, with a foreword, by}%
                      {with foreword, trans\adddotspace and annot\adddot}},
  bytranslatoranaf = {{translated and annotated, with an afterword, by}%
                      {with afterword, trans\adddotspace and annot\adddot}},
%    \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
% are not abbreviated.
%
%    \begin{macrocode}
  withcommentator  = {{with a commentary by}{with a commentary by}},
  withannotator    = {{with annotations by}{with annotations by}},
  withintroduction = {{with an introduction by}{with an introduction by}},
  withforeword     = {{with a foreword by}{with a foreword by}},
  withafterword    = {{with an afterword by}{with an afterword by}},
  introduction     = {{introduction}{introduction}},
%    \end{macrocode}
%
% The abbreviations for some publication details are different.
%
%    \begin{macrocode}
  newseries        = {{new series}{\mkbibacro{NS}}},
  oldseries        = {{old series}{\mkbibacro{OS}}},
  edition          = {{edition}{edn\adddot}},
  reprint          = {{reprint\nopunct}{repr\adddot\nopunct}},
  reviewof         = {{review of}{review of}},
  reprintas        = {{reprinted as}{repr\adddotspace as}},
  reprintfrom      = {{from}{from}},
  translationas    = {{English translation as}{Eng\adddotspace trans\adddotspace as}},
  origpubin        = {{originally published in}{originally pub\adddot}},
%    \end{macrocode}
%
% There is also a different abbreviation for \enquote{paragraph}.
%
%    \begin{macrocode}
  paragraph        = {{paragraph}{para\adddot}},
  paragraphs       = {{paragraphs}{paras\adddot}},
%    \end{macrocode}
%
% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates.
%
%    \begin{macrocode}
  urlseen          = {{accessed}{accessed}},
%    \end{macrocode}
%
% Scholarly citation terms are abbreviated. Oxford style is to use \enquote{henceforth}
% for shorthands and \enquote{at} to cite a page within a range.
%
%    \begin{macrocode}
  idem             = {{idem}{id\adddot}},
  idemsm           = {{idem}{id\adddot}},
  idemsf           = {{eadem}{ead\adddot}},
  idemsn           = {{idem}{id\adddot}},
  idempm           = {{eidem}{eid\adddot}},
  idempf           = {{eaedem}{eaed\adddot}},
  idempn           = {{eadem}{ead\adddot}},
  idempp           = {{eidem}{eid\adddot}},
  citedas          = {{henceforth}{henceforth}},
  thiscite         = {{at}{at}},
%    \end{macrocode}
%
% Languages are abbreviated.
%
%    \begin{macrocode}
  langamerican     = {{American English}{Amer\adddotspace Eng\adddot}},
  langbasque       = {{Basque}{Basq\adddot}},
  langbrazilian    = {{Brazilian Portuguese}{Braz\adddotspace Port\adddot}},
  langbulgarian    = {{Bulgarian}{Bulg\adddot}},
  langcatalan      = {{Catalan}{Catal\adddot}},
  langcroatian     = {{Croatian}{Croat\adddot}},
  langczech        = {{Czech}{Czech}},
  langdanish       = {{Danish}{Dan\adddot}},
  langdutch        = {{Dutch}{Dutch}},
  langenglish      = {{English}{Eng\adddot}},
  langestonian     = {{Estonian}{Eston\adddot}},
  langfinnish      = {{Finnish}{Finn\adddot}},
  langfrench       = {{French}{Fr\adddot}},
  langgalician     = {{Galician}{Galic\adddot}},
  langgerman       = {{German}{Ger\adddot}},
  langgreek        = {{Greek}{Gr\adddot}},
  langhungarian    = {{Hungarian}{Hung\adddot}},
  langitalian      = {{Italian}{It\adddot}},
  langjapanese     = {{Japanese}{Jap\adddot}},
  langlatin        = {{Latin}{Lat\adddot}},
  langlatvian      = {{Latvian}{Latv\adddot}},
  langlithuanian   = {{Lithuanian}{Lith\adddot}},
  langmarathi      = {{Marathi}{Mar\adddot}},
  langnorwegian    = {{Norwegian}{Norw\adddot}},
  langpolish       = {{Polish}{Pol\adddot}},
  langportuguese   = {{Portuguese}{Port\adddot}},
  langromanian     = {{Romanian}{Rom\adddot}},
  langrussian      = {{Russian}{Russ\adddot}},
  langserbian      = {{Serbian}{Serb\adddot}},
  langslovak       = {{Slovak}{Slovak}},
  langslovene      = {{Slovene}{Slov\adddot}},
  langspanish      = {{Spanish}{Sp\adddot}},
  langswedish      = {{Swedish}{Swed\adddot}},
  langturkish      = {{Turkish}{Turk\adddot}},
  langukrainian    = {{Ukrainian}{Ukr\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</en>
%<*gb>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{British English: british-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Here we set some language-specific punctuation and date formatting.
%
%    \begin{macrocode}
\InheritBibliographyExtras{british}
\DeclareBibliographyExtras{%
%    \end{macrocode}
%
% The only difference from the standard British date format is that we print it
% \enquote{clean}, with a cardinal instead of an ordinal day.
%
%    \begin{macrocode}
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
%    \end{macrocode}
%
% As you'd expect from an Oxford style, we use the Oxford comma, and use a
% period as the time separator. The redefinition of \cs{blx@ox@langbibstring}
% is given here as well.
%
%    \begin{macrocode}
  \def\finalandcomma{\addcomma}%
  \def\bibtimesep{\addperiod}%
  \def\blx@ox@langbibstring#1#2{#1\addspace\bibstring{#2}}%
}
\UndeclareBibliographyExtras{%
  \def\blx@ox@langbibstring#1#2{\bibstring{#2}}%
}
%    \end{macrocode}
%
% We use the British abbreviations for 12-hour clock times.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {english},
  am               = {{a\adddot m\adddot}{a\adddot m\adddot}},
  pm               = {{p\adddot m\adddot}{p\adddot m\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</gb>
%<*us>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{American English: american-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
%    \begin{macrocode}
\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{\uspunctuation}
\InheritBibliographyStrings{english}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</us>
%<*es>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Spanish: spanish-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Thanks to Bruno Maltras for contributing these translations.
%
% We load the standard language-specific punctuation and date formatting.
%
%    \begin{macrocode}
\InheritBibliographyExtras{spanish}
%    \end{macrocode}
%
% We load the standard set of localization strings, then add our
% adjustments.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {spanish},
%    \end{macrocode}
%
% These are new strings defined by \pkg[biblatex]{oxref}:
%
% \begin{itemize}
%   \item Roles expressed as functions
% \end{itemize}
%
%    \begin{macrocode}
  director         = {{direcci\'on}{dir\adddot}},
  directors        = {{directores}{dirs\adddot}},
  performer        = {{int\'erprete}{int\adddot}},
  performers       = {{int\'erpretes}{ints\adddot}},
  reader           = {{narraci\'on}{narr\adddot}},
  readers          = {{narradores}{narrs\adddot}},
  conductor        = {{direcci\'on}{dir\adddot}},
  conductors       = {{directores}{dirs\adddot}},
  serieseditor     = {{editor de la serie}{ed\adddotspace ser\adddot}},
  serieseditors    = {{editores de la serie}{eds\adddotspace ser\adddot}},
  holder           = {{titular}{tit\adddot}},
  holders          = {{titulares}{tits\adddot}},
  editorcm         = {{editor y compilador}{ed\adddotspace y comp\adddot}},
  editorcms        = {{editores y compiladores}{eds\adddotspace y comps\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Roles expressed as actions
% \end{itemize}
%
%    \begin{macrocode}
  byperformer      = {{interpretado por}{int\adddot}},
  bydirector       = {{dirigido por}{dir\adddot}},
  byreader         = {{narrado por}{narr\adddotspace por}},
  byconductor      = {{dirigido por}{dir\adddot}},
  byserieseditor   = {{editado por}{ed\adddot}},
  byholder         = {{derechos de}{held by}},
  byeditorcm       = {{editado y compilado por}{ed\adddotspace y comp\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication details
% \end{itemize}
%
%    \begin{macrocode}
  facsimile        = {{edici\'on facs\'imil}{ed\adddotspace facs\adddot}},
  revised          = {{edici\'on revisada}{ed\adddotspace rev\adddot}},
  revisedenlarged  = {{edici\'on revisada y ampliada}{ed\adddotspace rev\adddotspace y amp\adddot}},
  revisedreprint   = {{reimpresi\'on revisada}{reimpr\adddotspace rev\adddot}},
  suppto           = {{Suplemento de}{Supl\adddot de}},
  equals           = {{=}{=}},
  original         = {{original}{orig\adddot}},
  amendedby        = {{enmendado por}{enmendado por}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication state
% \end{itemize}
%
%    \begin{macrocode}
  inpressin        = {{de pr\'oxima publicaci\'on en}{de pr\'ox\adddotspace publ\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Pagination
% \end{itemize}
%
%    \begin{macrocode}
  book             = {{libro}{lib\adddot}},
  books            = {{libros}{libs\adddot}},
  canto            = {{canto}{canto}},
  cantos           = {{cantos}{cantos}},
  stanza           = {{estrofa}{estr\adddot}},
  stanzas          = {{estrofas}{estrs\adddot}},
  act              = {{Acto}{Acto}},
  acts             = {{Actos}{Actos}},
  scene            = {{Escena}{Escena}},
  scenes           = {{Escenas}{Escenas}},
  folio            = {{folio}{fol\adddot}},
  folios           = {{folios}{fols\adddot}},
  article          = {{art\'iculo}{art\adddot}},
  articles         = {{art\'iculos}{arts\adddot}},
  clause           = {{cl\'ausula}{cl\adddot}},
  clauses          = {{cl\'ausulas}{cls\adddot}},
  regulation       = {{regulaci\'on}{reg\adddot}},
  regulations      = {{regulaciones}{regs\adddot}},
  rule             = {{norma}{nrm\adddot}},
  rules            = {{normas}{nrms\addot}},
  booktotal        = {{libro}{lib\adddot}},
  booktotals       = {{libros}{libs\adddot}},
  cantototal       = {{canto}{canto}},
  cantototals      = {{cantos}{cantos}},
  stanzatotal      = {{estrofa}{estr\adddot}},
  stanzatotals     = {{estrofas}{estrs\adddot}},
  acttotal         = {{Acto}{Acto}},
  acttotals        = {{Actos}{Actos}},
  scenetotal       = {{Escena}{Escena}},
  scenetotals      = {{Escenas}{Escenas}},
  foliototal       = {{folio}{fol\adddot}},
  foliototals      = {{folios}{fols\adddot}},
  articletotal     = {{art\'iculo}{art\adddot}},
  articletotals    = {{art\'iculos}{arts\adddot}},
  clausetotal      = {{cl\'ausula}{cl\adddot}},
  clausetotals     = {{cl\'ausulas}{cls\adddot}},
  regulationtotal  = {{regulaci\'on}{reg\adddot}},
  regulationtotals = {{regulaciones}{regs\adddot}},
  ruletotal        = {{norma}{nrm\adddot}},
  ruletotals       = {{normas}{nrms\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Types
% \end{itemize}
%
%    \begin{macrocode}
  facebook         = {{Facebook post}{Facebook post}},
  tweet            = {{tweet}{tweet}},
  podcast          = {{podcast}{podcast}},
  clip             = {{video}{video}},
  webcast          = {{webcast}{webcast}},
  poster           = {{poster}{poster}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Miscellaneous
% \end{itemize}
%
%    \begin{macrocode}
  nolocation       = {{sin lugar}{s\adddot l\adddot}},
  modified         = {{\'ultima modificaci\'on}{\'ult\adddotspace modif\adddot}},
  recorded         = {{registrado}{registrado}},
  uploaded         = {{subido}{subido}},
  filed            = {{archivado}{archivado}},
  issued           = {{publicado}{publicado}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Labels
% \end{itemize}
%
%    \begin{macrocode}
  anon             = {{An\'onimo}{An\'on\adddot}},
  pseudo           = {{Pseudo-}{Ps\adddot-}},
  urldown          = {{descargado}{descargado}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Country names, patents, and patent requests,
% \end{itemize}
%
%    \begin{macrocode}
  countryjp        = {{Jap\'on}{JP}},
  patentjp         = {{Patente japonesa}{Pat\adddotspace japonesa}},
  patreqjp         = {{Solicitud de patente japonesa}{Sol\adddotspace pat\adddotspace japonesa}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item These are borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column          = {{una columna}{1\addnbspace col\adddot}},
  2column          = {{dos columnas}{2\addnbspace col\adddot}},
  inflayer         = {{norma subordinada}{norm\adddotspace sub\adddot}},
  suplayer         = {{norma superior}{norm\adddotspace sup\adddot}},
  paper            = {{hoja}{h\adddot}},
  papyrus          = {{papiro}{papiro}},
  parchment        = {{pergamino}{pergam\adddot}},
  eucase           = {{Caso}{Caso}},
  eujoinedcases    = {{Casos agrupados}{Casos agrupados}},
  commissiondecision = {{Decisi/'on de la Comisi/'on}{Decisi/'on de la Comisi/'on}},
  application      = {{Solicitud}{Solic\adddot}},
  order            = {{Orden}{Ord\adddot}},
  bill             = {{Proyecto de ley}{Proy\adddotspace de ley}},
  draft            = {{anteproyecto}{anteproyecto}},
  opened           = {{abierto a la firma}{abierto a la firma}},
  signed           = {{aprobada}{aprobada}},
  adopted          = {{adoptada}{adoptada}},
  inforce          = {{en vigor}{en vigor}},
%    \end{macrocode}
%
% The rest of these strings are overrides for the standard ones.
%
% In parallel with the English versions, we remove the final \enquote{por} from
% the abbreviated versions of the roles expressed as actions.
%
%    \begin{macrocode}
  byeditor         = {{editado por}{ed\adddotspace}},
  byredactor       = {{redacci\'on de}{red\adddotspace de}},
  byreviser        = {{revisado por}{rev\adddotspace}},
  byreviewer       = {{rese\~nado por}{res\adddotspace}},
  byfounder        = {{fundado por}{fund\adddotspace}},
  bycontinuator    = {{continuado por}{cont\adddotspace}},
  bycollaborator   = {{colaboraci\'on de}{col\adddotspace de}},
  bytranslator     = {{traducido por}{trad\adddotspace}},
  bycommentator    = {{comentado por}{com\adddotspace}},
  byannotator      = {{anotado por}{anot\adddotspace}},
  byeditortr       = {{editado y traducido por}%
                      {ed\adddotspace y trad\adddotspace}},
  byeditorco       = {{editado y comentado por}%
                      {ed\adddotspace y com\adddotspace }},
  byeditoran       = {{edici\'on y notas de}%
                      {ed\adddotspace y not\adddotspace}},
  byeditorin       = {{edici\'on e introducci\'on de}%
                      {ed\adddotspace e intr\adddotspace}},
  byeditorfo       = {{edici\'on y pr\'ologo de}%
                      {ed\adddotspace y pr\'ol\adddotspace}},
  byeditoraf       = {{edici\'on y ep\'ilogo de}%
                      {ed\adddotspace y ep\'il\adddotspace}},
  byeditortrco     = {{editado, traducido y comentado por}%
                      {ed.,\addabbrvspace trad\adddotspace y com\adddotspace}},
  byeditortran     = {{edici\'on, traducci\'on y notas de}%
                      {ed.,\addabbrvspace trad\adddotspace y not\adddotspace}},
  byeditortrin     = {{edici\'on, traducci\'on e introducci\'on de}%
                      {ed.,\addabbrvspace trad\adddotspace e intr\adddotspace}},
  byeditortrfo     = {{edici\'on, traducci\'on y pr\'ologo de}%
                      {ed.,\addabbrvspace trad\adddotspace y pr\'ol\adddotspace}},
  byeditortraf     = {{editado, traducido y epilogado}%
                      {ed.,\addabbrvspace trad\adddotspace y ep\'il\adddotspace}},
  byeditorcoin     = {{editado, comentado e introducido}%
                      {ed.,\addabbrvspace com\adddotspace e intr\adddotspace}},
  byeditorcofo     = {{edici\'on, comentarios y pr\'ologo de}%
                      {ed.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}},
  byeditorcoaf     = {{edici\'on, comentarios y ep\'ilogo de}%
                      {ed.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}},
  byeditoranin     = {{edici\'on, notas e introducci\'on de}%
                      {ed.,\addabbrvspace anot\adddotspace e intr\adddotspace}},
  byeditoranfo     = {{edici\'on, notas y pr\'ologo de}%
                      {ed.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
  byeditoranaf     = {{edici\'on, notas y ep\'ilogo de}%
                      {ed.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
  byeditortrcoin   = {{edici\'on, traducci\'on, comentarios e introducci\'on de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace e intr\adddotspace}},
  byeditortrcofo   = {{edici\'on, traducci\'on, comentarios y pr\'ologo de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}},
  byeditortrcoaf   = {{edici\'on, traducci\'on, comentarios y ep\'ilogo de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}},
  byeditortranin   = {{edici\'on, traducci\'on, notas e introducci\'on de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}},
  byeditortranfo   = {{edici\'on, traducci\'on, notas y pr\'ologo de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
  byeditortranaf   = {{edici\'on, traducci\'on, notas y ep\'ilogo de}%
                      {ed.,\addabbrvspace trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
  bytranslatorco   = {{traducci\'on y comentarios de}%
                      {trad\adddotspace y com\adddotspace}},
  bytranslatoran   = {{traducci\'on y notas de}%
                      {trad\adddotspace y not\adddotspace}},
  bytranslatorin   = {{traducci\'on e introducci\'on de}%
                      {trad\adddotspace e introd\adddotspace}},
  bytranslatorfo   = {{traducci\'on y pr\'ologo de}%
                      {trad\adddotspace y pr\'ol\adddotspace}},
  bytranslatoraf   = {{traducci\'on y ep\'ilogo de}%
                      {trad\adddotspace y ep\'il\adddotspace}},
  bytranslatorcoin = {{traducci\'on, comentarios e introducci\'on de}%
                      {trad.,\addabbrvspace com\adddotspace e intr\adddotspace}},
  bytranslatorcofo = {{traducci\'on, comentarios y pr\'ologo de}%
                      {trad.,\addabbrvspace com\adddotspace y pr\'ol\adddotspace}},
  bytranslatorcoaf = {{traducci\'on, comentarios y ep\'ilogo de}%
                      {trad.,\addabbrvspace com\adddotspace y ep\'il\adddotspace}},
  bytranslatoranin = {{traducci\'on, notas e introducci\'on de}%
                      {trad.,\addabbrvspace anot\adddotspace e intr\adddotspace}},
  bytranslatoranfo = {{traducci\'on, notas y pr\'ologo}%
                      {trad.,\addabbrvspace anot\adddotspace y pr\'ol\adddotspace}},
  bytranslatoranaf = {{traducci\'on, notas y ep\'ilogo}%
                      {trad.,\addabbrvspace anot\adddotspace y ep\'il\adddotspace}},
%    \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
% are not abbreviated.
%
%    \begin{macrocode}
  withcommentator  = {{con comentario de}{con comentario de}},
  withannotator    = {{con notas de}{con notas de}},
  withintroduction = {{con introduci\'on de}{con introduci\'on de}},
  withforeword     = {{con pr\'ologo de}{con pr\'ologo de}},
  withafterword    = {{con ep\'ilogo de}{con ep\'ilogo de}},
  introduction     = {{introduci\'on}{introduci\'on}},
%    \end{macrocode}
%
% The abbreviations for some publication details are different.
%
%    \begin{macrocode}
  newseries        = {{nueva \'epoca}{\mkbibacro{N\'E}}},
  oldseries        = {{antigua \'epoca}{\mkbibacro{A\'E}}},
  edition          = {{edici\'on}{edn\adddot}},
  reprintfrom      = {{de}{de}},
  translationas    = {{traducido espa\~nol como}{trad\adddotspace espa\~nol como}},
  origpubin        = {{publicado originalmente en}{pub\adddot orig\adddotspace}},
%    \end{macrocode}
%
% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates.
%
%    \begin{macrocode}
  urlseen          = {{accedido}{accedido}},
%    \end{macrocode}
%
% Oxford style is to use \enquote{henceforth}
% for shorthands and \enquote{at} to cite a page within a range.
%
%    \begin{macrocode}
  idem             = {{idem}{id\adddot}},
  idemsm           = {{idem}{id\adddot}},
  idemsf           = {{eadem}{ead\adddot}},
  idemsn           = {{idem}{id\adddot}},
  idempm           = {{eidem}{eid\adddot}},
  idempf           = {{eaedem}{eaed\adddot}},
  idempn           = {{eadem}{ead\adddot}},
  idempp           = {{eidem}{eid\adddot}},
  citedas          = {{en adelante}{en adelante}},
  thiscite         = {{en}{en}},
%    \end{macrocode}
%
% Languages are abbreviated.
%
%    \begin{macrocode}
  langamerican     = {{ingl\'es americano}{ing\adddotspace amer\adddot}},
  langbasque       = {{vasco}{vasc\adddot}},
  langbrazilian    = {{portugu\'es brasile\~no}{por\adddotspace bras\adddot}},
  langbulgarian    = {{b\'ulgaro}{bul\adddot}},
  langcatalan      = {{catal\'an}{cat\adddot}},
  langcroatian     = {{croata}{hrv\adddot}},
  langczech        = {{checo}{ces\adddot}},
  langdanish       = {{dan\'es}{dan\adddot}},
  langdutch        = {{neerland\'es}{nld\adddot}},
  langenglish      = {{ingl\'es}{ing\adddot}},
  langestonian     = {{estonio}{est\adddot}},
  langfinnish      = {{fin\'es}{fin\adddot}},
  langfrench       = {{franc\'es}{fra\adddot}},
  langgalician     = {{gallego}{glg\adddot}},
  langgerman       = {{alem\'an}{ale\adddot}},
  langgreek        = {{griego}{gr\adddot}},
  langhungarian    = {{h\'ungaro}{hun\adddot}},
  langitalian      = {{italiano}{ita\adddot}},
  langjapanese     = {{japon\'es}{jap\adddot}},
  langlatin        = {{lat\'in}{lat\adddot}},
  langlatvian      = {{let\'on}{let\adddot}},
  langlithuanian   = {{lituano}{lit\adddot}},
  langmarathi      = {{marathi}{mar\adddot}},
  langnorwegian    = {{noruego}{nor\adddot}},
  langpolish       = {{polaco}{pol\adddot}},
  langportuguese   = {{portugu\'es}{port\adddot}},
  langrussian      = {{ruso}{rus\adddot}},
  langserbian      = {{serbio}{srp\adddot}},
  langslovak       = {{eslovaco}{slk\adddot}},
  langslovene      = {{esloveno}{slv\adddot}},
  langspanish      = {{espa\~nol}{esp\adddot}},
  langswedish      = {{sueco}{sueco}},
  langturkish      = {{turco}{turco}},
  langukrainian    = {{ucraniano}{ucr\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</es>
%<*pl>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Polish: polish-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Thanks to Sebastian Wasiuta for contributing these translations and extras.
%
% We load the standard language-specific punctuation and date formatting.
%
%    \begin{macrocode}
\InheritBibliographyExtras{polish}
%    \end{macrocode}
%
% Here are some additional specific settings we need.
%
% There is no comma after forenames in the inverted position.
%
%    \begin{macrocode}
\DeclareBibliographyExtras{%
  \DeclareDelimFormat{revsdnamedelim}{}%
%    \end{macrocode}
%
% We need to use the right case for month names in treaty execution dates.
%
%    \begin{macrocode}
  \savecommand\makebbx@dateii
  \def\makebbx@dateii#1#2#3{%
    \blx@imc@stripzeros{#3}~\lbx@pl@mkbibmonth{#2}%
    \space
    #1}%
%    \end{macrocode}
%
% Volume numbers are expressed in uppercase Roman numerals.
%
%    \begin{macrocode}
  \savecommand\mkvolroman
  \renewcommand*{\mkvolroman}[1]{\RN{#1}}%
%    \end{macrocode}
%
% There is no compression of years.
%
%    \begin{macrocode}
  \savecommand\blx@ox@compyear
  \renewcommand*{\blx@ox@compyear}[2]{#2}%
%    \end{macrocode}
%
% There is no compression of pagination ranges.
%
%    \begin{macrocode}
  \savefieldformat{pages}%
  \DeclareFieldFormat{pages}{%
    \iffieldundef{bookpagination}%
      {\mknormrange{#1}}%
      {\mkpageprefix[bookpagination][\mknormrange]{#1}}%
  }%
  \savefieldformat{postnote}%
  \DeclareFieldFormat{postnote}{%
    \iffieldundef{pagination}%
      {\mknormrange{#1}}%
      {\mkpageprefix[pagination][\mknormrange]{#1}}%
  }%
%    \end{macrocode}
%
% We flip the word order when specifying the edition.
%
%    \begin{macrocode}
  \savefieldformat{edition}%
  \DeclareFieldFormat{edition}{%
    \ifinteger{#1}
      {\bibstring{edition}~\mkbibordedition{#1}}
      {\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}}}%
}
%    \end{macrocode}
%
% Lastly we add code to undo these changes before switching to another language.
%
%    \begin{macrocode}
\UndeclareBibliographyExtras{%
  \DeclareDelimFormat{revsdnamedelim}{\addcomma}%
  \restorecommand\makebbx@dateii
  \restorecommand\mkvolroman
  \restorecommand\blx@ox@compyear
  \restorefieldformat{pages}%
  \restorefieldformat{postnote}%
  \restorefieldformat{edition}%
}
%    \end{macrocode}
%
% We load the standard set of localization strings, then add our
% adjustments.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {polish},
%    \end{macrocode}
%
% These are new strings defined by \pkg[biblatex]{oxref}:
%
% \begin{itemize}
%   \item Roles expressed as functions
% \end{itemize}
%
%    \begin{macrocode}
  director         = {{re\.{z}yser}{re\.{z}\adddot}},
  directors        = {{re\.{z}yserzy}{re\.{z}\adddot}},
  performer        = {{wykonawca}{wyk\adddot}},
  performers       = {{wykonawcy}{wyk\adddot}},
  reader           = {{czytelnik}{czytelnik}},
  readers          = {{czytelnicy}{czytelnicy}},
  conductor        = {{dyrygent}{dyr\adddot}},
  conductors       = {{dyrygenci}{dyr\adddot}},
  serieseditor     = {{redaktor serii}{red\adddotspace serii}},
  serieseditors    = {{redaktor serii}{red\adddotspace serii}},
  holder           = {{w\l a\'{s}ciciel}{w\l a\'{s}ciciel}},
  holders          = {{w\l a\'{s}ciciele}{w\l a\'{s}ciciele}},
  editorcm         = {{redaktor i~kompilator}{red\adddotspace i~kompilator}},
  editorcms        = {{redaktorzy i~kompilatorzy}{red\adddotspace i~kompilatorzy}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Roles expressed as actions
% \end{itemize}
%
%    \begin{macrocode}
  byperformer      = {{wykonawca}{wyk\adddot}},
  bydirector       = {{re\.{z}yseria}{re\.{z}\adddot}},
  byreader         = {{czyta}{czyta}},
  byconductor      = {{kieruje}{kier\adddot}},
  byserieseditor   = {{redakcja}{red\adddot}},
  byholder         = {{w~posiadaniu}{w~posiadaniu}},
  byeditorcm       = {{redakcja i~opracowanie}{red\adddotspace i~oprac\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication details
% \end{itemize}
%
%    \begin{macrocode}
  facsimile        = {{wydanie faksymile}{wyd\adddotspace faksymile}},
  revised          = {{wydanie poprawione}{wyd\adddotspace popr\adddot}},
  revisedenlarged  = {{wydanie poprawione i~rozszerzone}{wyd\adddotspace popr\addotspace i~rozszerz\adddot}},
  revisedreprint   = {{przedruk poprawiony}{przedr\adddotspace popr\adddot}},
  suppto           = {{dodatek do}{dod\adddotspace do}},
  equals           = {{=}{=}},
  original         = {{oryginalny}{oryg\adddot}},
  amendedby        = {{zmienione przez}{zmien\adddotspace przez}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication state
% \end{itemize}
%
%    \begin{macrocode}
  inpressin        = {{z\l o\.{z}one do}{z\l o\.{z}one do}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Pagination
% \end{itemize}
%
%    \begin{macrocode}
  book             = {{ksi\k{e}ga}{ks\adddot}},
  books            = {{ksi\k{e}gi}{ks\adddot}},
  canto            = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}},
  cantos           = {{pie\'{s}ni}{pie\'{s}ni}},
  stanza           = {{zwrotka}{zwr\adddot}},
  stanzas          = {{zwrotki}{zwr\adddot}},
  act              = {{akt}{a\adddot}},
  acts             = {{akty}{aa\adddot}},
  scene            = {{scena}{sc\adddot}},
  scenes           = {{sceny}{sc\adddot}},
  folio            = {{karta}{k\adddot}},
  folios           = {{karty}{kk\adddot}},
  article          = {{artyku\l }{art\adddot}},
  articles         = {{artyku\l y}{art\adddot}},
  clause           = {{klauzula}{klauz\adddot}},
  clauses          = {{klauzule}{klauz\adddot}},
  regulation       = {{rozporz\k{a}dzenie}{rozp\adddot}},
  regulations      = {{rozporz\k{a}dzenia}{rozp\adddot}},
  rule             = {{przepis}{przep\adddot}},
  rules            = {{przepisy}{przep\adddot}},
  booktotal        = {{ksi\k{e}ga}{ks\adddot}},
  booktotals       = {{ksi\k{e}gi}{ks\adddot}},
  cantototal       = {{pie\'{s}\'{n}}{pie\'{s}\'{n}}},
  cantototals      = {{pie\'{s}ni}{pie\'{s}ni}},
  stanzatotal      = {{zwrotka}{zwr\adddot}},
  stanzatotals     = {{zwrotki}{zwr\adddot}},
  acttotal         = {{akt}{a\adddot}},
  acttotals        = {{akty}{aa\adddot}},
  scenetotal       = {{scena}{sc\adddot}},
  scenetotals      = {{sceny}{sc\adddot}},
  foliototal       = {{karta}{k\adddot}},
  foliototals      = {{karty}{kk\adddot}},
  articletotal     = {{artyku\l }{art\adddot}},
  articletotals    = {{artyku\l y}{art\adddot}},
  clausetotal      = {{klauzula}{klauz\adddot}},
  clausetotals     = {{klauzule}{klauz\adddot}},
  regulationtotal  = {{rozporz\k{a}dzenie}{rozp\adddot}},
  regulationtotals = {{rozporz\k{a}dzenia}{rozp\adddot}},
  ruletotal        = {{przepis}{przep\adddot}},
  ruletotals       = {{przepisy}{przep\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Types
% \end{itemize}
%
%    \begin{macrocode}
  facebook         = {{wpis na Facebooku}{wpis na Facebooku}},
  tweet            = {{wpis na Twitterze}{wpis na Twitterze}},
  podcast          = {{podcast}{podcast}},
  clip             = {{wideo}{wideo}},
  webcast          = {{webcast}{webcast}},
  poster           = {{plakat}{plakat}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Miscellaneous
% \end{itemize}
%
%    \begin{macrocode}
  nolocation       = {{bez miejsca}{b\adddot m\adddot}},
  modified         = {{ostatnio zmodyfikowany}{ostatnio zmodyf\adddot}},
  recorded         = {{nagrane}{nagr\adddot}},
  uploaded         = {{za\l adowane}{za\l ad\adddot}},
  filed            = {{wniesione}{wniesione}},
  issued           = {{wydany}{wyd\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Labels
% \end{itemize}
%
%    \begin{macrocode}
  anon             = {{Anonim}{Anon\adddot}},
  pseudo           = {{Pseudo-}{Ps\adddot-}},
  urldown          = {{pobrane}{pobrane}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Country names, patents, and patent requests,
% \end{itemize}
%
%    \begin{macrocode}
  countryjp        = {{Japonia}{JP}},
  patentjp         = {{japo\'{n}ski patent}{jap\adddotspace pat\adddot}},
  patreqjp         = {{japo\'{n}ski wniosek patentowy}{jap\adddotspace wniosek pat\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item These are borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column          = {{jedna kolumna}{1\addnbspace kol\adddot}},
  2column          = {{dwie kolumny}{2\addnbspace kol\adddot}},
  inflayer         = {{warstwa ni\.{z}sza}{warstwa ni\.{z}sza}},
  suplayer         = {{warstwa wy\.{z}sza}{warstwa wy\.{z}sza}},
  paper            = {{gazeta}{gazeta}},
  papyrus          = {{papirus}{papirus}},
  parchment        = {{pergamin}{pergamin}},
  eucase           = {{sprawa}{sprawa}},
  eujoinedcases    = {{po\l \k{a}czone sprawy}{po\l \k{a}czone sprawy}},
  commissiondecision = {{decyzja komisji}{decyzja komisji}},
  application      = {{wniosek}{wniosek}},
  order            = {{polecenie}{polecenie}},
  bill             = {{rachunek}{rachunek}},
  draft            = {{projekt}{proj\adddot}},
  opened           = {{przed\l o\.{z}one do podpisu}{przed\l\adddotspace do podp\adddot}},
  signed           = {{podpisane}{podpisane}},
  adopted          = {{przyj\k{e}te}{przyj\k{e}te}},
  inforce          = {{wesz\l o w~\.{z}ycie}{wesz\l o w~\.{z}ycie}},
%    \end{macrocode}
%
% The rest of these strings are overrides for the standard ones.
%
%    \begin{macrocode}
  byeditor         = {{redakcja}{red\adddot}},
  bycompiler       = {{opracowanie}{oprac\adddot}},
  byfounder        = {{za\l o\.{z}one przez}{za\l o\.{z}\adddotspace przez}},
  bycontinuator    = {{kontynuowane przez}{kont\adddotspace przez}},
  byredactor       = {{redakcja}{red\adddot}},
  byreviser        = {{poprawki}{popr\adddot}},
  byreviewer       = {{recenzja}{rec\adddot}},
  bycollaborator   = {{we wsp\'{o}\l pracy z}{we wsp\'{o}\l pr\adddotspace z}},
  bytranslator     = {{t\l umaczenie}{t\l um\adddot}},
  bycommentator    = {{komentarz}{kom\adddot}},
  byannotator      = {{obja\'{s}nienia}{obja\'{s}n\adddot}},
  byeditortr       = {{redakcja i~t\l umaczenie}%
                      {red\adddotspace i~t\l um\adddot}},
  byeditorco       = {{redakcja i~komentarz}%
                      {red\adddotspace i~kom\adddot}},
  byeditoran       = {{redakcja i~obja\'{s}nienia}%
                      {red\adddotspace i~obja\'{s}n\adddot}},
  byeditorin       = {{redakcja i~wst\k{e}p}%
                      {red\adddotspace i~wst\k{e}p}},
  byeditorfo       = {{redakcja i~przedmowa}%
                      {red\adddotspace i~przedm\adddot}},
  byeditoraf       = {{redakcja i~pos\l owie}%
                      {red\adddotspace i~pos\l \adddot}},
  byeditortrco     = {{redakcja, t\l umaczenie i~komentarz}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace kom\adddot}},
  byeditortran     = {{redakcja, t\l umaczenie i~obja\'{s}nienia}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n\adddot}},
  byeditortrin     = {{redakcja, t\l umaczenie, wst\k{e}p}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace wst\k{e}p}},
  byeditortrfo     = {{redakcja, t\l umaczenie, przedmowa}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace przedm\adddot}},
  byeditortraf     = {{redakcja, t\l umaczenie, pos\l \adddot}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace pos\l \adddot}},
  byeditorcoin     = {{redakcja, komentarz, wst\k{e}p}%
                      {red.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
  byeditorcofo     = {{redakcja, komentarz i~przedmowa}%
                      {red.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
  byeditorcoaf     = {{redakcja, komentarz, pos\l owie}%
                      {red.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
  byeditoranin     = {{redakcja, obja\'{s}nienia, wst\k{e}p}%
                      {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
  byeditoranfo     = {{redakcja, obja\'{s}nienia, przedmowa}%
                      {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
  byeditoranaf     = {{redakcja, obja\'{s}nienia, pos\l owie}%
                      {red.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
  byeditortrcoin   = {{redakcja, t\l umaczenie, komentarz, wst\k{e}p}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
  byeditortrcofo   = {{redakcja, t\l umaczenie, komentarz, przedmowa}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
  byeditortrcoaf   = {{redakcja, t\l umaczenie, komentarz, pos\l owie}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
  byeditortranin   = {{redakcja, t\l umaczenie, obja\'{s}nienia, wst\k{e}p}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
  byeditortranfo   = {{redakcja, t\l umaczenie, obja\'{s}nienia, przedmowa}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
  byeditortranaf   = {{redakcja, t\l umaczenie, obja\'{s}nienia, pos\l owie}%
                      {red.,\addabbrvspace t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
  bytranslatorco   = {{t\l umaczenie i~komentarz}%
                      {t\l um\adddotspace i~kom\adddot}},
  bytranslatoran   = {{t\l umaczenie i~obja\'{s}nienia}%
                      {t\l um\adddotspace i~obja\'{s}n\adddot}},
  bytranslatorin   = {{t\l umaczenie i~wst\k{e}p}%
                      {t\l um.,\addabbrvspace wst\k{e}p}},
  bytranslatorfo   = {{t\l umaczenie i~przedmowa}%
                      {t\l um.,\addabbrvspace przedm\adddot}},
  bytranslatoraf   = {{t\l umaczenie i~pos\l owie}%
                      {t\l um.,\addabbrvspace pos\l \adddot}},
  bytranslatorcoin = {{t\l umaczenie, komentarz i~wst\k{e}p}%
                      {t\l um.,\addabbrvspace kom.,\addabbrvspace wst\k{e}p}},
  bytranslatorcofo = {{t\l umaczenie, komentarz i~przedmowa}%
                      {t\l um.,\addabbrvspace kom.,\addabbrvspace przedm\adddot}},
  bytranslatorcoaf = {{t\l umaczenie, komentarz i~pos\l owie}%
                      {t\l um.,\addabbrvspace kom.,\addabbrvspace pos\l \adddot}},
  bytranslatoranin = {{t\l umaczenie, obja\'{s}nienia i~wst\k{e}p}%
                      {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace wst\k{e}p}},
  bytranslatoranfo = {{t\l umaczenie, obja\'{s}nienia i~przedmowa}%
                      {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace przedm\adddot}},
  bytranslatoranaf = {{t\l umaczenie, obja\'{s}nienia i~pos\l owie}%
                      {t\l um.,\addabbrvspace obja\'{s}n.,\addabbrvspace pos\l \adddot}},
%    \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
% are not abbreviated.
%
%    \begin{macrocode}
  withcommentator  = {{komentarz}{komentarz}},
  withannotator    = {{obja\'{s}nienia}{obja\'{s}nienia}},
  withintroduction = {{wst\k{e}p}{wst\k{e}p}},
  withforeword     = {{przedmowa}{przedmowa}},
  withafterword    = {{pos\l owie}{pos\l owie}},
  introduction     = {{wst\k{e}p}{wst\k{e}p}},
%    \end{macrocode}
%
% The translations and abbreviations for some publication details are different.
%
%    \begin{macrocode}
  newseries        = {{nowa seria}{nowa seria}},
  oldseries        = {{dawna seria}{dawna seria}},
  edition          = {{wydanie}{wyd\adddot}},
  reviewof         = {{recenzja}{rec\adddot}},
  reprintfrom      = {{przedruk z}{przedr\adddotspace z}},
  translationas    = {{t\l umaczenie polskie}{t\l um\adddotspace pol\adddotspace}},
  origpubin        = {{pierwodruk w}{pierwodr\adddotspace w}},
%    \end{macrocode}
%
% We use a different translation for \enquote{paragraph}.
%
%    \begin{macrocode}
  paragraph        = {{ust\k{e}p}{ust\adddot}},
  paragraphs       = {{ust\k{e}py}{ust\adddot}},
%    \end{macrocode}
%
% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates.
%
%    \begin{macrocode}
  urlseen          = {{dost\k{e}p}{dost\k{e}p}},
%    \end{macrocode}
%
% Scholarly citation terms are abbreviated. Oxford style is to use \enquote{henceforth}
% for shorthands and \enquote{at} to cite a page within a range.
%
%    \begin{macrocode}
  idem             = {{idem}{id\adddot}},
  idemsm           = {{idem}{id\adddot}},
  idemsf           = {{eadem}{ead\adddot}},
  idemsn           = {{idem}{id\adddot}},
  idempm           = {{eidem}{eid\adddot}},
  idempf           = {{eaedem}{eaed\adddot}},
  idempn           = {{eadem}{ead\adddot}},
  idempp           = {{eidem}{eid\adddot}},
  citedas          = {{dalej}{dalej}},
  thiscite         = {{na}{na}},
%    \end{macrocode}
%
% Languages are abbreviated.
%
%    \begin{macrocode}
  langamerican     = {{ameryka\'{n}ski angielski}{amer\adddotspace ang\adddot}},
  langbasque       = {{baskijski}{bask\adddot}},
  langbrazilian    = {{brazylijski portugalski}{braz\adddot port\adddot}},
  langbulgarian    = {{bu\l garski}{bu\l g\adddot}},
  langcatalan      = {{katalo\'{n}ski}{katal\adddot}},
  langcroatian     = {{chorwacki}{chorw\adddot}},
  langczech        = {{czeski}{czeski}},
  langdanish       = {{du\'{n}ski}{du\'{n}\adddot}},
  langdutch        = {{holenderski}{holend\adddot}},
  langenglish      = {{angielski}{ang\adddot}},
  langestonian     = {{esto\'{n}ski}{est\adddot}},
  langfinnish      = {{fi\'{n}ski}{fi\'{n}\adddot}},
  langfrench       = {{francuski}{fr\adddot}},
  langgalician     = {{galicyjski}{galic\adddot}},
  langgerman       = {{niemiecki}{niem\adddot}},
  langgreek        = {{grecki}{gr\adddot}},
  langhungarian    = {{w\k{e}gierski}{w\k{e}g\adddot}},
  langitalian      = {{w\l oski}{w\l \adddot}},
  langjapanese     = {{japo\'{n}ski}{jap\adddot}},
  langlatin        = {{\l aci\'{n}ski}{\l ac\adddot}},
  langlatvian      = {{\l otewski}{\l ot\adddot}},
  langlithuanian   = {{litewski}{lit\adddot}},
  langmarathi      = {{marathi}{mar\adddot}},
  langnorwegian    = {{norweski}{norw\adddot}},
  langpolish       = {{polski}{pol\adddot}},
  langportuguese   = {{portugalski}{port\adddot}},
  langromanian     = {{rumu\'{n}ski}{rum\adddot}},
  langrussian      = {{rosyjski}{ros\adddot}},
  langserbian      = {{serbski}{serb\adddot}},
  langslovak       = {{s\l owacki}{s\l c\adddot}},
  langslovene      = {{s\l owe\'{n}ski}{s\l owe\'{n}\adddot}},
  langspanish      = {{hiszpa\'{n}ski}{hiszp\adddot}},
  langswedish      = {{szwedzki}{szw\adddot}},
  langturkish      = {{turecki}{tur\adddot}},
  langukrainian    = {{ukrai\'{n}ski}{ukr\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</pl>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Other languages}
%
% Currently \pkg[biblatex]{oxref} only supports English (British and American),
% Spanish, and Polish explicitly,
% but if there is demand more languages may be added. If you would like to
% contribute support for your language, a list of the non-standard bibliography
% strings requiring definition may be found in section~\ref{sec:setup}.
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</lbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
