Debian Codegraph @

texmf-dist/source/latex/biblatex-bath/biblatex-bath.dtx

raw
1 % \iffalse meta-comment
2 %<*internal|bbx|cbx|dbx|lbx|lbx-gb>
3 \def\Version{2026/01/29 v7.2}
4 %</internal|bbx|cbx|dbx|lbx|lbx-gb>
5 %<*internal>
6 \iffalse
7 %</internal>
8 %<*bbx|cbx|dbx|lbx|lbx-gb>
9 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
10 %</bbx|cbx|dbx|lbx|lbx-gb>
11 %<*bbx>
12 \ProvidesFile{bath.bbx}
13 [\Version\space Biblography style as recommended by the University of Bath Library]
14 %</bbx>
15 %<*cbx>
16 \ProvidesFile{bath.cbx}
17 [\Version\space Citation style as recommended by the University of Bath Library]
18 %</cbx>
19 %<*dbx>
20 \ProvidesFile{bath.dbx}
21 [\Version\space Data model required by the biblatex-bath style]
22 %</dbx>
23 %<*lbx>
24 \ProvidesFile{english-bath.lbx}
25 [\Version\space Generic English conventions required by the biblatex-bath style]
26 %</lbx>
27 %<*lbx-gb>
28 \ProvidesFile{british-bath.lbx}
29 [\Version\space British English conventions required by the biblatex-bath style]
30 %</lbx-gb>
31 %<*readme>
32 # biblatex-bath: Harvard referencing style as recommended by the University of Bath Library
33 %</readme>
34 %<*internal>
35 \fi
36 \def\nameofplainTeX{plain}
37 \ifx\fmtname\nameofplainTeX\else
38 \expandafter\begingroup
39 \fi
40 %</internal>
41 %<*install>
42 \input docstrip.tex
43 \keepsilent
44 \askforoverwritefalse
45
46 \nopreamble\nopostamble
47
48 \usedir{doc/latex/\jobname}
49 \generate{
50 \file{README.md}{\from{\jobname.dtx}{readme}}
51 \file{\jobname.bib}{\from{\jobname.dtx}{bib}}
52 }
53
54 \preamble
55 ----------------------------------------------------------------
56 biblatex-bath --- Harvard referencing style as recommended by the University of Bath Library
57 Author: Alex Ball
58 E-mail: [email protected]
59 License: Released under the LaTeX Project Public License v1.3c or later
60 See: http://www.latex-project.org/lppl.txt
61 ----------------------------------------------------------------
62
63 \endpreamble
64 \postamble
65
66 Copyright (C) 2016-2026 by University of Bath
67 \endpostamble
68
69 \usedir{tex/latex/\jobname}
70 \generate{
71 \file{bath.bbx}{\from{\jobname.dtx}{bbx}}
72 \file{bath.cbx}{\from{\jobname.dtx}{cbx}}
73 \file{bath.dbx}{\from{\jobname.dtx}{dbx}}
74 \file{english-bath.lbx}{\from{\jobname.dtx}{lbx}}
75 \file{british-bath.lbx}{\from{\jobname.dtx}{lbx-gb}}
76 }
77 %</install>
78 %<install>\endbatchfile
79 %<*internal>
80 \usedir{source/latex/\jobname}
81 \generate{
82 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
83 }
84 \ifx\fmtname\nameofplainTeX
85 \expandafter\endbatchfile
86 \else
87 \expandafter\endgroup
88 \fi
89 %</internal>
90 %<*driver>
91 \ProvidesFile{biblatex-bath.dtx}
92 [\Version\space Harvard referencing style as recommended by the University of Bath Library]
93
94 \documentclass[10pt,a4paper]{article}
95 \usepackage[british]{babel}
96 \usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
97 \frenchspacing
98
99 % For typesetting the CJK example
100
101 \usepackage{iftex}
102 \ifPDFTeX
103 \usepackage{CJKutf8}
104 \else
105 \ifLuaTeX
106 \usepackage{luatexja-fontspec}
107 \else
108 \ifXeTeX
109 \usepackage{ctex}
110 \fi
111 \fi
112 \fi
113
114 % For typesetting the examples
115
116 \newcounter{example}
117 \newcommand{\eg}[1]{\protect\hfill\normalfont\textit{#1}}
118
119 \usepackage{xpatch,csquotes,xcolor,multicol,fancyvrb}
120 \xdefinecolor{Green}{rgb}{0,.5,0}
121 \xdefinecolor{Slate}{RGB}{80,86,94}
122 \xdefinecolor{BathStone}{RGB}{213,211,185}
123 \colorlet{ok}{Green}
124 \colorlet{todo}{red}
125 \colorlet{hacked}{orange}
126 \colorlet{manual}{purple}
127 \RecustomVerbatimEnvironment
128 {Verbatim}{Verbatim}
129 {commentchar=\%}
130
131 \usepackage{enumitem}
132 \SetLabelAlign{left}{\strut #1\hfil}
133 \setlist[description]{style=nextline,leftmargin=1.4em}
134
135 \usepackage[tightLists=false,texComments=true]{markdown}
136 \markdownSetup{rendererPrototypes={%
137 link = {\href{#3}{#1}}%
138 }}
139
140 \usepackage{fontawesome}[2015/07/07]
141 \newcommand{\booksym}{\makebox[1em][c]{\faicon{book}}}
142 \newcommand{\cogsym}{\makebox[1em][c]{\faicon{cog}}}
143 \makeatletter
144 \newcommand{\hangfrom}[1]{%
145 \setbox\@tempboxa\hbox{{#1}}%
146 \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
147 \makeatother
148 \newenvironment{tips}{%
149 \begin{list}{\makebox[2em][c]{\faLightbulbO}}{%
150 \setlength{\leftmargin}{2em}
151 \setlength{\labelwidth}{2em}
152 \setlength{\labelsep}{0pt}}
153 }{\end{list}}
154 \newenvironment{info}{%
155 \begin{list}{\makebox[2em][c]{\faInfoCircle}}{%
156 \setlength{\leftmargin}{2em}
157 \setlength{\labelwidth}{2em}
158 \setlength{\labelsep}{0pt}}
159 }{\end{list}}
160 \newenvironment{hacks}{%
161 \begin{list}{\makebox[2em][c]{\faWrench}}{%
162 \setlength{\leftmargin}{2em}
163 \setlength{\labelwidth}{2em}
164 \setlength{\labelsep}{0pt}}
165 }{\end{list}}
166
167 \usepackage{tcolorbox}
168 \tcbuselibrary{listings,breakable,skins}
169 \colorlet{Option}{violet}
170 \newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}}
171 \lstloadlanguages{[LaTeX]TeX}
172 \lstdefinestyle{dtxlatex}%
173 { columns=fullflexible
174 , basicstyle=\ttfamily
175 , language={[LaTeX]TeX}
176 , texcsstyle=*\color{red!75!black}
177 , moretexcs=
178 { printbibliography
179 , textcite
180 , autocite
181 , noop
182 , addbibresource
183 , assignrefcontextentries
184 , newrefcontext
185 , bibhang
186 }
187 , moredelim=**[s][\color{violet}]{[}{]}
188 , moredelim=**[s][\color{blue!75!black}]{\{}{\}}
189 , mathescape=false
190 }
191 \lstset{style=dtxlatex}
192 \tcbset
193 { colframe = Slate
194 , colback = BathStone!25
195 , listing options =
196 { style = tcblatex
197 , style = dtxlatex
198 , basicstyle=\ttfamily\small
199 }
200 }
201 \NewTColorBox{bibexbox}{D(){ok}d<>m}%
202 {bicolor
203 ,colframe = #1
204 ,colback = #1!5!white
205 ,colbacklower = white
206 ,fontlower = \footnotesize
207 ,before upper = {\hangfrom{\booksym\space}\biburlsetup}
208 ,after upper = {\par\hangfrom{\cogsym\space}\fullcite{#3}}
209 ,IfNoValueTF={#2}{}%
210 {overlay = {
211 \node[anchor=south east,text=teal] at (frame.south east) {#2};
212 }
213 }
214 }
215
216 % For typesetting the implementation
217 \usepackage{doc}
218 \makeatletter
219 \newwrite\ydocwrite
220 \def\ydocfname{\jobname.listing}
221 \def\ydoc@catcodes{%
222 \let\do\@makeother
223 \dospecials
224 \catcode`\\=\active
225 \catcode`\^^M=\active
226 \catcode`\ =\active
227 }
228 \def\macrocode{%
229 \begingroup
230 \ydoc@catcodes
231 \macro@code
232 }
233 \def\endmacrocode{}
234 \begingroup
235 \endlinechar\m@ne
236 \@firstofone{%
237 \catcode`\|=0\relax
238 \catcode`\(=1\relax
239 \catcode`\)=2\relax
240 \catcode`\*=14\relax
241 \catcode`\{=12\relax
242 \catcode`\}=12\relax
243 \catcode`\ =12\relax
244 \catcode`\%=12\relax
245 \catcode`\\=\active
246 \catcode`\^^M=\active
247 \catcode`\ =\active
248 }*
249 |gdef|macro@code#1^^M% \end{macrocode}(*
250 |endgroup|expandafter|macro@@code|expandafter(|ydoc@removeline#1|noexpand|lastlinemacro)*
251 )*
252 |gdef|ydoc@removeline#1^^M(|noexpand|firstlinemacro)*
253 |gdef|ydoc@defspecialmacros(*
254 |def^^M(|noexpand|newlinemacro)*
255 |def (|noexpand|spacemacro)*
256 |def\(|noexpand|bslashmacro)*
257 )*
258 |gdef|ydoc@defrevspecialmacros(*
259 |def|newlinemacro(|noexpand^^M)*
260 |def|spacemacro(|noexpand )*
261 |def|bslashmacro(|noexpand\)*
262 )*
263 |endgroup
264 \def\macro@@code#1{%
265 {\ydoc@defspecialmacros
266 \xdef\themacrocode{#1}}%
267 \PrintMacroCode
268 \end{macrocode}%
269 }
270 \def\PrintMacroCode{%
271 \begingroup
272 \let\firstlinemacro\empty
273 \let\lastlinemacro\empty
274 \def\newlinemacro{^^J}%
275 \let\bslashmacro\bslash
276 \let\spacemacro\space
277 \immediate\openout\ydocwrite=\ydocfname\relax
278 \immediate\write\ydocwrite{\themacrocode}%
279 \immediate\closeout\ydocwrite
280 \let\input\@input
281 \tcbinputlisting{enhanced,breakable,size=small,listing only,listing file=\ydocfname}%
282 \endgroup
283 }
284 \makeatother
285
286 % Documentation
287
288 \usepackage[british,cleanlook]{isodate}
289
290 \usepackage[backend=biber,bibencoding=utf8,hyperref=false,isbn=false,style=bath,sorting=ynt]{biblatex}
291 \addbibresource{biblatex-bath.bib}
292 \assignrefcontextentries[]{*}
293 \makeatletter
294 \DeclareCiteCommand{\fullcite}
295 {\usebibmacro{prenote}}
296 {\usedriver
297 {\defcounter{maxnames}{\blx@maxbibnames}}
298 {\thefield{entrytype}}}
299 {\multicitedelim}
300 {\usebibmacro{postnote}}
301 \makeatother
302 \xpretobibmacro{finentry}{%
303 \ifboolexpr{ test {\ifcitation} and not test {\iffootnote} }{%
304 \finentrypunct
305 }{}%
306 }{}{}
307
308 \usepackage{readprov}
309
310 \usepackage[colorlinks,citecolor=black]{hyperref}
311
312 \sloppy
313
314 \title{biblatex-bath: Harvard referencing style as recommended by the University of Bath Library}
315 \author{%
316 Maintainer: Alex Ball\thanks{%
317 To contact the maintainer about this package, please visit the repository
318 where the code is hosted: \url{https://github.com/alex-ball/bathbib}.%
319 }%
320 }
321 \date{Package \UseVersionOf{biblatex-bath.dtx} --\printdateTeX{\UseDateOf{biblatex-bath.dtx}}}
322
323 \begin{document}
324 \maketitle
325
326 \section{Introduction}
327
328 \begin{markdown}
329 %</driver>
330 %<*driver|readme>
331
332 This package provides a [biblatex] style to format reference lists in the
333 [Harvard style][bath-harvard] recommended by the University of Bath Library.
334
335 ## Installation
336
337 The files you need are included in the zip archive available from [GitHub].
338 If you use the zip archive from [CTAN], you will need to run `luatex
339 biblatex-bath.dtx` to generate them.
340
341 You can use this style simply by copying all the `.bbx`, `.cbx`, `.dbx` and
342 `.lbx` files into your working directory, that is, the directory holding the
343 main `.tex` file for your document. If you want the style to be available for
344 all your documents without having to copy the files over each time, you can
345 install them using the instructions below.
346
347 ### Managed way
348
349 The latest stable release of biblatex-bath has been packaged for TeX Live and
350 MiKTeX. If you are running TeX Live and have `tlmgr` installed, you can install
351 the package simply by running `tlmgr install biblatex-bath`. If you are running
352 MiKTeX, you can install the package by running `mpm --install=biblatex-bath`.
353 Both `tlmgr` and `mpm` have GUI versions that you might find friendlier.
354
355 ### Automated way
356
357 A makefile is provided which you can use with the Make utility on
358 UNIX-like systems:
359
360 * Running `make source` generates the derived files
361 - `README.md`
362 - `bath.bbx`, `bath.cbx`, `bath.dbx`
363 - `english-bath.lbx`, `british-bath.lbx`
364 - `biblatex-bath.bib`
365 - `biblatex-bath.ins`
366 * Running `make` generates the above files and also `biblatex-bath.pdf`.
367 Ensure you have (at least) the [luatexja], [adobemapping] and [ipaex]
368 packages installed first.
369 * Running `make inst` installs the files in the user's TeX tree.
370 You can undo this with `make uninst`.
371 * Running `make install` installs the files in the local TeX tree.
372 You can undo this with `make uninstall`.
373
374 ### Manual way
375
376 You do not need to follow the first step if you downloaded the zip archive from
377 [GitHub]. You do not need to follow the second step if you already have the PDF
378 documentation.
379
380 1. Run `luatex biblatex-bath.dtx` to generate the source files.
381
382 2. Compile `biblatex-bath.dtx` with [LuaLaTeX] and [Biber] to generate the
383 documentation. You will need, among other things, the [luatexja],
384 [adobemapping] and [haranoaji] packages installed; this is just
385 for the documentation, not for the biblatex style itself.
386
387 3. If you are using TeX Live, find your home TeX tree using the following
388 command at the command prompt/terminal:
389
390 ```
391 kpsewhich -var-value=TEXMFHOME
392 ```
393
394 If you are using MikTeX, consult the MikTeX manual entry for [integrating
395 local additions](http://docs.miktex.org/manual/localadditions.html). You
396 can use one of the roots (TeX trees) already defined – preferably one of
397 the User roots – or set up a new one.
398
399 4. Move the files to your TeX tree as follows:
400 - `source/latex/biblatex-bath`:
401 `biblatex-bath.dtx`,
402 (`biblatex-bath.ins`)
403 - `tex/latex/biblatex-bath`:
404 `bath.bbx`,
405 `bath.cbx`,
406 `bath.dbx`,
407 `english-bath.lbx`,
408 `british-bath.lbx`
409 - `doc/latex/biblatex-bath`:
410 `biblatex-bath.pdf`,
411 `README.md`
412
413 5. You may then have to update your installation's file name database
414 before TeX and friends can see the files.
415
416 [bath-harvard]: https://library.bath.ac.uk/referencing/harvard-bath
417 [biblatex]: http://ctan.org/pkg/biblatex
418 [GitHub]: https://github.com/alex-ball/bathbib/releases
419 [CTAN]: http://ctan.org/pkg/biblatex-bath
420 [LuaLaTeX]: http://ctan.org/pkg/lualatex-doc
421 [Biber]: http://ctan.org/pkg/biber
422 [luatexja]: http://ctan.org/pkg/luatexja
423 [adobemapping]: http://ctan.org/pkg/adobemapping
424 [ipaex]: http://ctan.org/pkg/ipaex
425 [haranoaji]: http://ctan.org/pkg/haranoaji
426 %</driver|readme>
427 %<*driver>
428 \end{markdown}
429
430 \subsection{Compatibility}
431
432 The \textsf{biblatex} package is under active development, so this style may
433 not work with versions very much older or newer than the one current when this
434 version of the style was released. If you experience any breakages it may help
435 to know this document was compiled with \textsf{biblatex} version
436 \UseVersionOf{biblatex.sty}.
437
438 \section{Using the style}
439
440 To use the style, specify it when you load \textsf{biblatex}. To get the sorting
441 order of your \emph{citations} right, specify the \texttt{ynt} sorting scheme.
442 To avoid possible inconsistencies (e.g.~in how disambiguation letters are
443 assigned), force all entries to use the global reference context:
444
445 \begin{tcblisting}{listing only}
446 \usepackage[style=bath,sorting=ynt]{biblatex}
447 \assignrefcontextentries[]{*}
448 \end{tcblisting}
449
450 Remember also to specify your \texttt{.bib} file in the preamble:
451
452 \begin{tcblisting}{listing only}
453 \addbibresource{file.bib}
454 \end{tcblisting}
455
456 To get the sorting order of your \emph{references} right, create a new reference
457 context just before you print your bibliography, using the \texttt{nyt} sorting
458 scheme:
459
460 \begin{tcblisting}{listing only}
461 \newrefcontext[sorting=nyt]
462 \printbibliography
463 \end{tcblisting}
464
465 If you forget these extra steps, the \texttt{nyt} sorting scheme will be used
466 throughout.
467
468 It is strongly recommended to use Biber in place of BibTeX to process your
469 references, as the style relies on Biber functionality to deal with some of the
470 more exotic types of entry.
471
472
473 \subsection{Writing a citation}
474
475 To make a citation in the text, use the key that corresponds to the entry in your
476 \texttt{.bib} file. The following examples illustrate the principles laid out in
477 the Harvard (Bath) guide.
478
479 Please refer to the documentation for \href{http://www.ctan.org/pkg/biblatex}{\textsf{biblatex}}
480 for the full range of commands available for in-text citations.
481
482
483 \subsubsection{The essentials}
484
485 \begin{description}\tcbset{halign lower=flush left}
486 \item[Name occurring naturally]
487 \begin{tcblisting}{sidebyside}
488 \textcite{blockley2021evs} says\dots
489 \end{tcblisting}
490
491 \item[Name not occurring naturally]
492 \begin{tcblisting}{sidebyside}
493 \dots this \autocite{blockley2021evs}
494 \end{tcblisting}
495
496 \item[Page information]
497 \begin{tcblisting}{sidebyside}
498 \textcite[75]{burchard1965hhl}\\
499 \autocite[4]{manco2013va}\\
500 \autocite[00:28:41]{moran2016sol}
501 \end{tcblisting}
502 \begin{tips}
503 \item
504 Use the entry's \texttt{pagination} field to set the pinpointing prefix
505 to something other than \enquote{p.}
506 \item
507 Use \cs{nopp} at the start of the optional argument if you need to suppress
508 the prefix.
509 \end{tips}
510
511 \item[Multiple sources in a single citation]
512 \begin{tcblisting}{sidebyside}
513 \autocite{burrell1973ist, haurant2004bbh, soper1972rbc}\\
514 \autocite{adams2009tc1, adams2014tc2, adams2017tc3}
515 \end{tcblisting}
516
517 \item[Citing a document cited in another document]
518 \begin{tcblisting}{sidebyside}
519 \autocite[\mancite{Walters, 1883}; cited by][87]{burrell1973ist}\\
520 \end{tcblisting}
521 \end{description}
522
523 \subsubsection{General rules for authors}
524
525 \begin{description}\tcbset{halign lower=flush left}
526 \item[Corporate author]
527 \begin{tcblisting}{sidebyside}
528 \autocite{brbr1965gph}\\
529 \autocite{gb.hc2003/04-30}\\
530 \autocite{gb.pa2014}
531 \end{tcblisting}
532
533 \item[Corporate author acronyms]
534 \begin{tcblisting}{sidebyside}
535 World Health Organization \autocite{who1986nde}
536 \end{tcblisting}
537
538 \item[Multiple sources by same author(s) in same year]
539 \begin{tcblisting}{sidebyside}
540 \autocite{stieg1981cer} and \autocite{stieg1981inh}
541 \end{tcblisting}
542 \begin{tcblisting}{sidebyside}
543 \autocite{jonesNDa} and \autocite{jonesNDb}
544 \end{tcblisting}
545
546 \item[Different lead authors with the same surname]
547 \begin{tcblisting}{sidebyside}
548 \autocite{wang2018tc} and \autocite{wang2020tc}
549 \end{tcblisting}
550
551 \end{description}
552
553 \subsubsection{Multiple authors}
554 \begin{description}\tcbset{halign lower=flush left}
555 \item[Two authors]
556 \begin{tcblisting}{sidebyside}
557 \autocite{shah.corrick2016hsc}
558 \end{tcblisting}
559
560 \item[Three authors]
561 \begin{tcblisting}{sidebyside}
562 \autocite{devlin.etal2021ipp}
563 \end{tcblisting}
564
565 \item[Four or more authors]
566 \begin{tcblisting}{sidebyside}
567 \autocite{solomon.etal2019cbe}
568 \end{tcblisting}
569
570 \item[Groups of authors where different lead authors have the same surname]
571 \begin{tcblisting}{sidebyside}
572 \autocite{wang.etal2002tc6} and \autocite{wang.etal2002tc7}
573 \end{tcblisting}
574
575 \item[Different groups of authors with the same lead author]
576 \begin{tcblisting}{sidebyside}
577 \autocite{smith.etal2020tc8} and \autocite{smith.etal2020tc9}
578 \end{tcblisting}
579 \end{description}
580
581
582 \section{Breaking changes between versions}
583
584 The following sections list implementation changes that might affect the way
585 in which you write your bibliography database files.
586
587 In addition to the changes listed, when upgrading between major versions,
588 you should expect some changes in formatting relating to the evolution of the
589 Harvard (Bath) style itself. Some of the style's internal settings and
590 structures may also change without warning.
591
592 \subsection{Version 2}
593
594 \begin{itemize}
595 \item
596 The code for styling legal references has been completely overhauled, so you can
597 represent them more semantically in your bibliography file. The examples below
598 show the fields you should now use. As far as possible they have been made
599 consistent with the \href{http://ctan.org/pkg/oscola}{\textsf{biblatex-oscola}}
600 style, a specialist style implementing the \emph{Oxford Standard for the Citation
601 of Legal Authorities}, to enable the same entries to be used with both styles.
602
603 For the sake of backwards compatibility, the version 1 semantics still work,
604 but should be considered deprecated; support may be withdrawn in future (major)
605 versions of this style.
606
607 \item
608 In version 1, the \texttt{titleaddon} field was printed unadorned, so you had
609 to supply your own brackets. This was to allow greater freedom to `hack' entries.
610
611 With version 2, you should not need to resort to such dirty tricks, so the
612 style now applies the brackets for you, in common with styles such as
613 \href{http://ctan.org/pkg/biblatex-apa}{\textsf{biblatex-apa}}. Again, for the
614 sake of backwards compatibility, before it does this it strips off any brackets
615 you may have added by hand around your field value.
616 \end{itemize}
617
618 There is now a companion Bib\TeX\ style available (\texttt{bathx} in version 2+
619 of the \textsf{bath-bst} package) which is compatible with this style in the
620 sense that it will render the same \texttt{.bib} file the same way, so long as some
621 adjustments are made that won't affect the \textsf{biblatex} rendering (mainly
622 concerning the handling of dates).
623
624 \subsection{Version 3}
625
626 \begin{itemize}
627 \item
628 Journal titles are now coerced to sentence case, so any capital letters you
629 want to keep need to be protected with braces.
630 \item
631 Entries of type \texttt{unpublished} are now explicitly marked as unpublished.
632 \item
633 With entry types that usually expect an \texttt{institution} or
634 \texttt{organization} instead of a \texttt{publisher}, if you gave a
635 \texttt{publisher} in earlier versions the \texttt{institution}\slash
636 \texttt{organization} would be ignored. Now they are printed before the
637 publication block.
638 \item
639 Some changes to the Harvard (Bath) style cannot be applied automatically
640 (e.g.~the update to how standards are referenced), so you may need to update
641 your .bib file accordingly.
642 \end{itemize}
643
644 \subsection{Version 5}
645
646 \begin{itemize}
647 \item
648 Series names (except those in \texttt{legislation} and \texttt{jurisdiction}
649 entries) are now coerced to sentence case, so any capital letters you
650 want to keep need to be protected with braces.
651 \item
652 The `[Online]' tag is now also triggered by \texttt{urldate}\slash
653 \texttt{urlyear}.
654 \item
655 The style now sets \lstinline{\bibhang} to 0pt instead of
656 \lstinline{\parindent} (or 1em).
657 \end{itemize}
658
659 \subsection{Version 6}
660
661 \begin{itemize}
662 \item
663 Entry type clarifications such as `Photograph' and `Computer program' are now
664 handled differently from translated titles, in particular as regards their
665 position relative to the version, and how they interact with the `[Online]'
666 tag. As a result, they should now be placed in \texttt{entrysubtype} rather
667 than \texttt{titleaddon}.
668 \item
669 All elements of the title block (including \texttt{titleaddon},
670 \texttt{version}, and \texttt{entrysubtype}) now move to the head of the
671 reference in the absence of an author\slash editor.
672 \end{itemize}
673
674
675 \section{Examples}
676
677 The examples below are shown in three parts.
678 The first, marked with \faBook, shows an extract from the
679 \href{https://library.bath.ac.uk/referencing/harvard-bath}{\emph{Referencing guide: Harvard Bath}} or
680 \href{https://library.bath.ac.uk/images/referencing}{\emph{Referencing images}}.
681 The second, marked with \faCog, shows the reference as formatted by \textsf{biblatex}.
682 The last shows how the reference was entered in the \texttt{.bib} file.
683 The bottom right corner shows the source of the example:
684 `RX' indicates the `Reference examples (A-Z)' section of the Guide;
685 `WC' indicates the `Write a citation' section of the Guide;
686 `RL' indicates the `Organise a reference list' section of the Guide;
687 `RI' indicates \emph{Referencing images}.
688
689 You may notice that the examples tend to use BibTeX aliases and conventions for
690 fields (e.g.~\texttt{address}, \texttt{journal}, \texttt{year}) rather than the
691 native \textsf{biblatex} fields. This is simply to ease transitions to and from
692 BibTeX, and not a symptom of recalcitrance on the part of the author.
693
694
695 \subsection{Books and book chapters}
696
697 \subsubsection*{Book with author(s)}
698
699 \begin{bibexbox}<RX>{rang.etal2012rdp}
700 Rang, H.P., Dale, M.M., Ritter, J.M., Flower, R.J. and Henderson, G., 2012. \emph{Rang and Dale's pharmacology}. 7th ed. Edinburgh: Elsevier Churchill Livingstone.
701 \tcblower
702 \begin{Verbatim}
703 %</driver>
704 %<*driver|bib>
705 @book{rang.etal2012rdp,
706 author = {Rang, H. P. and Dale, M. M. and Ritter, J. M. and Flower, R. J. and Henderson, G.},
707 year = {2012},
708 title = {Rang and {Dale's} Pharmacology},
709 edition = {7},
710 address = {Edinburgh},
711 publisher = {Elsevier Churchill Livingstone}}
712 %</driver|bib>
713 %<*driver>
714 \end{Verbatim}
715 \end{bibexbox}
716
717 \begin{bibexbox}<RX>{ou1972em}
718 Open University, 1972. \emph{Electricity and magnetism}. Bletchley: Open University Press.
719 \tcblower
720 \begin{Verbatim}
721 %</driver>
722 %<*driver|bib>
723 @book{ou1972em,
724 author = {{Open University}},
725 year = {1972},
726 title = {Electricity and Magnetism},
727 address = {Bletchley},
728 publisher = {Open University Press}}
729 %</driver|bib>
730 %<*driver>
731 \end{Verbatim}
732 \end{bibexbox}
733
734 \begin{bibexbox}<RX>{solomon.etal2019cbe}
735 Solomon, M.R., Askegaard, S., Hogg, M. and Bamossy, G.J., 2019. \emph{Consumer behaviour: a European perspective}. 7th ed. Harlow: Pearson.
736 \tcblower
737 \begin{Verbatim}
738 %</driver>
739 %<*driver|bib>
740 @book{solomon.etal2019cbe,
741 author = {Solomon, M. R. and Askegaard, S. and Hogg, M. and Bamossy, G. J.},
742 year = {2019},
743 title = {Consumer Behaviour: a {European} Perspective},
744 edition = {7},
745 address = {Harlow},
746 publisher = {Pearson}}
747 %</driver|bib>
748 %<*driver>
749 \end{Verbatim}
750 \end{bibexbox}
751
752
753 \subsubsection*{Book with editor(s) instead of author(s)}
754
755 \begin{bibexbox}<RX>{rothman.etal2008me}
756 Rothman, K.J., Greenland, S. and Lash, T.L., eds, 2008. \emph{Modern epidemiology}. 3rd ed. Philadelphia, Pa.: Lippincott Williams \& Wilkins.
757 \tcblower
758 \begin{Verbatim}
759 %</driver>
760 %<*driver|bib>
761 @book{rothman.etal2008me,
762 editor = {Kenneth J. Rothman and Sander Greenland and Timothy L. Lash},
763 year = {2008},
764 title = {Modern Epidemiology},
765 edition = {3},
766 address = {Philadelphia, Pa.},
767 publisher = {Lippincott Williams \& Wilkins}}
768 %</driver|bib>
769 %<*driver>
770 \end{Verbatim}
771 \end{bibexbox}
772
773
774 \subsubsection*{Electronic book}
775
776 \begin{bibexbox}<RX>{haynes2014crc}
777 Haynes, W.M., ed., 2014. \emph{CRC handbook of chemistry and physics} [Online]. 94th ed. Boca Raton, Fla.: CRC Press/Taylor and Francis. Available from: \url{http://www.hbcpnetbase.com} [Accessed 16 June 2016].
778 \tcblower
779 \begin{Verbatim}
780 %</driver>
781 %<*driver|bib>
782 @book{haynes2014crc,
783 editor = {Haynes, W. M.},
784 year = {2014},
785 title = {{CRC} Handbook of Chemistry and Physics},
786 edition = {94},
787 address = {Boca Raton, Fla.},
788 publisher = {CRC Press/{Taylor and Francis}},
789 url = {http://www.hbcpnetbase.com},
790 urldate = {2016-06-16}}
791 %</driver|bib>
792 %<*driver>
793 \end{Verbatim}
794 \end{bibexbox}
795
796 \begin{bibexbox}<RX>{blockley2021evs}
797 Blockley, D., 2021. \emph{Engineering: a very short introduction} [Online]. Oxford: Oxford University Press. Available from: \url{https://www.amazon.co.uk/kindle} [Accessed 30 June 2021].
798 \tcblower
799 \begin{Verbatim}
800 %</driver>
801 %<*driver|bib>
802 @book{blockley2021evs,
803 author = {Blockley, D.},
804 year = {2021},
805 title = {Engineering: a Very Short Introduction},
806 address = {Oxford},
807 publisher = {Oxford University Press},
808 url = {https://www.amazon.co.uk/kindle},
809 urldate = {2021-06-30}}
810 %</driver|bib>
811 %<*driver>
812 \end{Verbatim}
813 \end{bibexbox}
814
815
816 \subsubsection*{Book known by its title}
817
818 \begin{tips}\item
819 Use the most appropriate \texttt{reference} entry type instead of, say,
820 \texttt{book} or \texttt{collection}.
821 \end{tips}
822
823 \begin{bibexbox}<RX>{bnf2020}
824 British National Formulary, 2020. 79th ed. London: Pharmaceutical Press.
825 \tcblower
826 \begin{Verbatim}
827 %</driver>
828 %<*driver|bib>
829 @reference{bnf2020,
830 year = {2020},
831 title = {{British National Formulary}},
832 edition = {79},
833 address = {London},
834 publisher = {Pharmaceutical Press}}
835 %</driver|bib>
836 %<*driver>
837 \end{Verbatim}
838 \end{bibexbox}
839
840 \begin{bibexbox}<RX>{aspirin2020bnf}
841 British National Formulary, 2020. 79th ed. \emph{Aspirin}. London: Pharmaceutical Press, pp.280--281.
842 \tcblower
843 \begin{Verbatim}
844 %</driver>
845 %<*driver|bib>
846 @inreference{aspirin2020bnf,
847 title = {Aspirin},
848 year = {2020},
849 booktitle = {{British National Formulary}},
850 edition = {79},
851 address = {London},
852 publisher = {Pharmaceutical Press},
853 pages = {280-281}}
854 %</driver|bib>
855 %<*driver>
856 \end{Verbatim}
857 \end{bibexbox}
858
859 \begin{bibexbox}<RX>{aspirin2019bnf}
860 British National Formulary, 2019. \emph{Aspirin} [Online]. London: Pharmaceutical Press. Available from: \url{https://www.medicinescomplete.com/#/content/bnf/_456850132} [Accessed 26 November 2019].
861 \tcblower
862 \begin{Verbatim}
863 %</driver>
864 %<*driver|bib>
865 @inreference{aspirin2019bnf,
866 title = {Aspirin},
867 year = {2019},
868 booktitle = {{British National Formulary}},
869 address = {London},
870 publisher = {Pharmaceutical Press},
871 url = {https://www.medicinescomplete.com/#/content/bnf/_456850132},
872 urldate = {2019-11-26}}
873 %</driver|bib>
874 %<*driver>
875 \end{Verbatim}
876 \end{bibexbox}
877
878 \begin{info}\item
879 If you use the Bib\TeX\ backend, you will have to repeat the contents of the
880 \texttt{booktitle} field in the \texttt{sorttitle} field yourself to ensure the
881 entry is placed correctly in the reference list. If you use Biber, this is done
882 automatically for you.
883 \end{info}
884
885
886 \subsubsection*{Chapter\slash paper from a collection (by different authors) in an edited book}
887
888 \begin{bibexbox}<RL>{burchard1965hhl}
889 Burchard, J.E., 1965. How humanists use a library. In: C.F.J. Overhage and J.R. Harman, eds. \emph{Intrex: report on a planning conference and information transfer experiments}. Cambridge, Mass.: MIT Press, pp.41--87.
890 \tcblower
891 \begin{Verbatim}
892 %</driver>
893 %<*driver|bib>
894 @incollection{burchard1965hhl,
895 author = {Burchard, J. E.},
896 year = {1965},
897 title = {How Humanists use a Library},
898 editor = {C. F. J. Overhage and J. R. Harman},
899 booktitle = {Intrex},
900 booksubtitle = {Report on a Planning Conference and Information Transfer Experiments},
901 address = {Cambridge, Mass.},
902 publisher = {MIT Press},
903 pages = {41-87}}
904 %</driver|bib>
905 %<*driver>
906 \end{Verbatim}
907 \end{bibexbox}
908
909 \begin{bibexbox}<RX>{reid1967ptp}
910 Reid, D.R., 1967. Physical testing of polymer films. In: S.H. Pinner, ed. \emph{Modern packaging films}. London: Butterworths, pp.143--183.
911 \tcblower
912 \begin{Verbatim}
913 %</driver>
914 %<*driver|bib>
915 @incollection{reid1967ptp,
916 author = {D. R. Reid},
917 year = {1967},
918 title = {Physical Testing of Polymer Films},
919 editor = {S. H. Pinner},
920 booktitle = {Modern Packaging Films},
921 address = {London},
922 publisher = {Butterworths},
923 pages = {143-183}}
924 %</driver|bib>
925 %<*driver>
926 \end{Verbatim}
927 \end{bibexbox}
928
929
930 \subsection{Articles and periodicals}
931
932 \subsubsection*{Journal article}
933
934 \begin{bibexbox}<RL>{stieg1981cer}
935 Stieg, M.F., 1981a. Continuing education and the reference librarian in the academic and research library. \emph{Library journal}, 105(22), pp.2547--2551.
936 \tcblower
937 \begin{Verbatim}
938 %</driver>
939 %<*driver|bib>
940 @article{stieg1981cer,
941 author = {Stieg, M. F.},
942 year = {1981},
943 title = {Continuing Education and the Reference Librarian in the Academic and Research Library},
944 journal = {Library Journal},
945 volume = {105},
946 number ={22},
947 pages = {2547-2551}}
948 %</driver|bib>
949 %<*driver>
950 \end{Verbatim}
951 \end{bibexbox}
952
953 \begin{bibexbox}<RL>{stieg1981inh}
954 Stieg, M.F., 1981b. The information needs of historians. \emph{College and research libraries}, 42(6), pp.549--560.
955 \tcblower
956 \begin{Verbatim}
957 %</driver>
958 %<*driver|bib>
959 @article{stieg1981inh,
960 author = {Stieg, M. F.},
961 year = {1981},
962 title = {The Information Needs of Historians},
963 journal = {College and Research Libraries},
964 volume = {42},
965 number ={6},
966 pages = {549-560}}
967 %</driver|bib>
968 %<*driver>
969 \end{Verbatim}
970 \end{bibexbox}
971
972 \begin{bibexbox}<RX>{newman2010mcb}
973 Newman, R., 2010. Malaria control beyond 2010. \emph{British medical journal}, 341(7765), pp.157--208.
974 \tcblower
975 \begin{Verbatim}
976 %</driver>
977 %<*driver|bib>
978 @article{newman2010mcb,
979 author = {Newman, R.},
980 year = {2010},
981 title = {Malaria control beyond 2010},
982 journal = {{British} Medical Journal},
983 volume = {341},
984 number = {7765},
985 pages = {157-208}}
986 %</driver|bib>
987 %<*driver>
988 \end{Verbatim}
989 \end{bibexbox}
990
991 \begin{bibexbox}<RX>{wetzstein.etal2020iai}
992 Wetzstein, G., Ozcan, A., Gigan, S., Fan, S., Englund, D., Soljacic, M., Denz, C., Miller, D.A.B. and Psaltis, D., 2020. Inference in artificial intelligence with deep optics and photonics. \emph{Nature}, 588(7836), pp.39--47.
993 \tcblower
994 \begin{Verbatim}
995 %</driver>
996 %<*driver|bib>
997 @article{wetzstein.etal2020iai,
998 author = {Wetzstein, G. and Ozcan, A. and Gigan, S. and Fan, S. and
999 Englund, D. and Soljacic, M. and Denz, C. and Miller, D. A. B. and
1000 Psaltis, D.},
1001 year = {2020},
1002 title = {Inference in Artificial Intelligence with Deep Optics and Photonics},
1003 journal = {Nature},
1004 volume = {588},
1005 number = {7836},
1006 pages = {39-47}}
1007 %</driver|bib>
1008 %<*driver>
1009 \end{Verbatim}
1010 \end{bibexbox}
1011
1012
1013 \subsubsection*{Electronic journal article}
1014
1015 \begin{bibexbox}<RX>{devlin.etal2021ipp}
1016 Devlin, S.M., Martin, A. and Ostrovnaya, I., 2021. Identifying prognostic pairwise relationships among bacterial species in microbiome studies. \emph{PLOS computational biology} [Online], 17(11). Available from: \url{https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009501} [Accessed 9 December 2021].
1017 \tcblower
1018 \begin{Verbatim}
1019 %</driver>
1020 %<*driver|bib>
1021 @article{devlin.etal2021ipp,
1022 author = {Devlin, S. M. and Martin, A. and Ostrovnaya, I.},
1023 year = {2021},
1024 title = {Identifying Prognostic Pairwise Relationships Among Bacterial
1025 Species in Microbiome Studies},
1026 journal = {{PLOS} Computational Biology},
1027 volume = {17},
1028 number = {11},
1029 url = {https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009501},
1030 urldate = {2021-12-09}}
1031 %</driver|bib>
1032 %<*driver>
1033 \end{Verbatim}
1034 \end{bibexbox}
1035
1036 \begin{bibexbox}<RX>{steward.etal2020eys}
1037 Steward, S., Connelly, D. and Robinson, J., 2020. Everything you should know about the coronavirus outbreak. \emph{The pharmaceutical journal} [Online]. Available from: \url{https://www.pharmaceutical-journal.com/news-and-analysis/features/everything-you-should-know-about-the-coronavirus-outbreak/20207629.article} [Accessed 30 April 2020].
1038 \tcblower
1039 \begin{Verbatim}
1040 %</driver>
1041 %<*driver|bib>
1042 @article{steward.etal2020eys,
1043 author = {Steward, S. and Connelly, D. and Robinson, J.},
1044 year = {2020},
1045 title = {Everything You Should Know About the Coronavirus Outbreak},
1046 journal = {The Pharmaceutical Journal},
1047 url = {https://www.pharmaceutical-journal.com/news-and-analysis/features/everything-you-should-know-about-the-coronavirus-outbreak/20207629.article},
1048 urldate = {2020-04-30}}
1049 %</driver|bib>
1050 %<*driver>
1051 \end{Verbatim}
1052 \end{bibexbox}
1053
1054 \begin{bibexbox}<RX>{liontou.etal2019dra}
1055 Liontou, C., Kontopodis, E., Oikonomidis, N., Maniotis, C., Tassopoulos, A., Tsiafoutis, I., Lazaris, E. and Koutouzis, M., 2019. Distal radial access: a review article. \emph{Cardiovascular revascularization medicine} [Online], in press. Available from: \url{https://www.sciencedirect.com/science/article/pii/S1553838919303367} [Accessed 19 June 2019].
1056 \tcblower
1057 \begin{Verbatim}
1058 %</driver>
1059 %<*driver|bib>
1060 @article{liontou.etal2019dra,
1061 author = {Liontou, C. and Kontopodis, E. and Oikonomidis, N. and Maniotis, C. and
1062 Tassopoulos, A. and Tsiafoutis, I. and Lazaris, E. and Koutouzis, M.},
1063 year = {2019},
1064 title = {Distal Radial Access: a Review Article},
1065 journal = {Cardiovascular Revascularization Medicine},
1066 pubstate = {inpress},
1067 url = {https://www.sciencedirect.com/science/article/pii/S1553838919303367},
1068 urldate = {2019-06-19}}
1069 %</driver|bib>
1070 %<*driver>
1071 \end{Verbatim}
1072 \end{bibexbox}
1073
1074 \begin{tips}\item
1075 If citing an article yet to be officially published, use the \texttt{pubstate}
1076 field with the keyword \texttt{inpress} for `in press' and
1077 \texttt{inpreparation} or \texttt{submitted} (whichever is more accurate)
1078 for `preprint'.
1079 \end{tips}
1080
1081
1082 \subsubsection*{Preprint or trial study in a digital repository}
1083
1084 \begin{bibexbox}<RX>{shah.corrick2016hsc}
1085 Shah, I. and Corrick, I., 2016. \emph{How should central banks respond to non-neutral inflation expectations?} Bath: University of Bath. \emph{OPUS} [Online]. Available from: \url{http://opus.bath.ac.uk} [Accessed 4 May 2016].
1086 \tcblower
1087 \begin{Verbatim}
1088 %</driver>
1089 %<*driver|bib>
1090 @report{shah.corrick2016hsc,
1091 author = {Shah, I. and Corrick, I.},
1092 year = {2016},
1093 title = {How should central banks respond to non-neutral inflation expectations?},
1094 address = {Bath},
1095 institution = {University of Bath},
1096 library = {OPUS},
1097 url = {http://opus.bath.ac.uk},
1098 urldate = {2016-05-04}}
1099 %</driver|bib>
1100 %<*driver>
1101 \end{Verbatim}
1102 \end{bibexbox}
1103
1104 \begin{bibexbox}<RX>{ganju2021sed}
1105 Ganju, V., 2021. \emph{A study of EnGeneIC Dream Vectors (EDV's) packaged with the chemotherapy, E-EDV-D682 given simultaneously as non-targeted EDVs carrying an immune enhancer called EDV-GC, in participants with advanced pancreatic and other cancers whose disease has progressed after one or two treatment regimes, or where other standard therapies are not appropriate}. Sydney: University of Sydney. \emph{Australian and New Zealand Clinical Trials Registry} [Online]. Available from: \url{http://www.anzctr.org.au/Trial/Registration/TrialReview.aspx?id=365258} [Accessed 29 April 2021].
1106 \tcblower
1107 \begin{Verbatim}
1108 %</driver>
1109 %<*driver|bib>
1110 @report{ganju2021sed,
1111 author = {Ganju, V.},
1112 year = {2021},
1113 title = {A study of {EnGeneIC} {Dream} {Vectors} {(EDV's)} packaged with the chemotherapy,
1114 {E-EDV-D682} given simultaneously as non-targeted {EDVs} carrying an immune enhancer
1115 called {EDV-GC}, in participants with advanced pancreatic and other cancers whose disease
1116 has progressed after one or two treatment regimes, or where other standard therapies are
1117 not appropriate},
1118 address = {Sydney},
1119 institution = {University of Sydney},
1120 library = {Australian and New Zealand Clinical Trials Registry},
1121 url = {http://www.anzctr.org.au/Trial/Registration/TrialReview.aspx?id=365258},
1122 urldate = {2021-04-29}}
1123 %</driver|bib>
1124 %<*driver>
1125 \end{Verbatim}
1126 \end{bibexbox}
1127
1128 \begin{tips}\item
1129 The Harvard (Bath) style treats preprints as grey literature, and so the
1130 \texttt{report} entry type is the best match semantically. Use \texttt{library}
1131 to specify the name of the preprint repository.
1132
1133 In standard \textsf{biblatex}, you would typically use the natural entry type
1134 for the work and provide preprint details using the \texttt{eprinttype},
1135 \texttt{eprintclass} and \texttt{eprint} fields.
1136 \end{tips}
1137
1138
1139 \subsubsection*{Newspaper article}
1140
1141 \begin{bibexbox}<RX>{haurant2004bbh}
1142 Haurant, S., 2004. Britain's borrowing hits £1 trillion. \emph{The Guardian}, 29 July, p.16c.
1143 \tcblower
1144 \begin{Verbatim}
1145 %</driver>
1146 %<*driver|bib>
1147 @article{haurant2004bbh,
1148 author = {Haurant, S.},
1149 date = {2004-07-29},
1150 title = {Britain's Borrowing Hits \pounds 1 Trillion},
1151 journal = {{The Guardian}},
1152 pages = {16c}}
1153 %</driver|bib>
1154 %<*driver>
1155 \end{Verbatim}
1156 \end{bibexbox}
1157
1158 \begin{bibexbox}<RX>{independent1992pub}
1159 The Independent, 1992. Picking up the bills. \emph{The Independent}, 4 June, p.28a.
1160 \tcblower
1161 \begin{Verbatim}
1162 %</driver>
1163 %<*driver|bib>
1164 @article{independent1992pub,
1165 author = {{The Independent}},
1166 date = {1992-06-04},
1167 title = {Picking Up the Bills},
1168 journal = {{The Independent}},
1169 pages = {28a}}
1170 %</driver|bib>
1171 %<*driver>
1172 \end{Verbatim}
1173 \end{bibexbox}
1174
1175 \begin{bibexbox}<RX>{cogley2020ccs}
1176 Cogley, M., 2020. Corporate confidence slumps to record low. \emph{The Telegraph} [Online], 4 May. Available from: \url{https://www.telegraph.co.uk/business/2020/05/03/corporate-confidence-slumps-all-time-low/} [Accessed 5 May 2020].
1177 \tcblower
1178 \begin{Verbatim}
1179 %</driver>
1180 %<*driver|bib>
1181 @article{cogley2020ccs,
1182 author = {Cogley, M.},
1183 date = {2020-05-04},
1184 title = {Corporate Confidence Slumps to Record Low},
1185 journal = {{The Telegraph}},
1186 url = {https://www.telegraph.co.uk/business/2020/05/03/corporate-confidence-slumps-all-time-low/},
1187 urldate = {2020-05-05}}
1188 %</driver|bib>
1189 %<*driver>
1190 \end{Verbatim}
1191 \end{bibexbox}
1192
1193
1194 \subsection{Conference papers}
1195
1196 \subsubsection*{Conference paper (when proceedings have a named editor)}
1197
1198 \begin{bibexbox}<RX>{crawford1965oim}
1199 Crawford, G.I., 1965. Oxygen in metals. In: J.M.A. Lenihan and S.J. Thompson, eds. \emph{Activation analysis: proceedings of a NATO Advanced Study Institute}, 2--4 August 1964, Glasgow. London: Academic Press, pp.113--118.
1200 \tcblower
1201 \begin{Verbatim}
1202 %</driver>
1203 %<*driver|bib>
1204 @inproceedings{crawford1965oim,
1205 author = {Crawford, G. I.},
1206 year = {1965},
1207 title = {Oxygen in Metals},
1208 editor = {J. M. A. Lenihan and S. J. Thompson},
1209 booktitle = {Activation Analysis},
1210 booksubtitle = {Proceedings of a {NATO} {Advanced} {Study} {Institute}},
1211 eventdate = {1964-08-02/1964-08-04},
1212 venue = {Glasgow},
1213 address = {London},
1214 publisher = {Academic Press},
1215 pages = {113-118}}
1216 %</driver|bib>
1217 %<*driver>
1218 \end{Verbatim}
1219 \end{bibexbox}
1220
1221
1222 \subsubsection*{Conference paper (when proceedings have no named editor or are part of a major series)}
1223
1224 \begin{bibexbox}<RX>{soper1972rbc}
1225 Soper, D., 1972. Review of bracken control experiments with asulam. \emph{Proceedings of the 11th British Weed Control Conference}, 15--17 November 1972, Brighton. Brighton: University of Sussex, pp.24--31.
1226 \tcblower
1227 \begin{Verbatim}
1228 %</driver>
1229 %<*driver|bib>
1230 @inproceedings{soper1972rbc,
1231 author = {Soper, D.},
1232 year = {1972},
1233 title = {Review of Bracken Control Experiments with Asulam},
1234 booktitle = {Proceedings of the 11th {British} {Weed} {Control} {Conference}},
1235 eventdate = {1972-11-15/1972-11-17},
1236 venue = {Brighton},
1237 address = {Brighton},
1238 publisher = {University of Sussex},
1239 pages = {24-31}}
1240 %</driver|bib>
1241 %<*driver>
1242 \end{Verbatim}
1243 \end{bibexbox}
1244
1245
1246 \subsection{Grey literature}
1247
1248 \subsubsection*{Thesis/dissertation}
1249
1250 \begin{bibexbox}<RX>{burrell1973ist}
1251 Burrell, J.G., 1973. \emph{The importance of school tours in education}. Thesis (M.A.). Queen's University, Belfast.
1252 \tcblower
1253 \begin{Verbatim}
1254 %</driver>
1255 %<*driver|bib>
1256 @thesis{burrell1973ist,
1257 author = {Burrell, J. G.},
1258 year = {1973},
1259 title = {The Importance of School Tours in Education},
1260 type = {Thesis \parentext{M.A.}},
1261 school = {Queen's University, Belfast}}
1262 %</driver|bib>
1263 %<*driver>
1264 \end{Verbatim}
1265 \end{bibexbox}
1266
1267
1268 \subsubsection*{Report, working paper, or research briefing}
1269
1270 \begin{bibexbox}<RX>{unesco1993gip}
1271 UNESCO, 1993. \emph{General information programme and UNISIST}. (PGI-93/WS/22). Paris: UNESCO.
1272 \tcblower
1273 \begin{Verbatim}
1274 %</driver>
1275 %<*driver|bib>
1276 @report{unesco1993gip,
1277 author = {{UNESCO}},
1278 year = {1993},
1279 title = {General Information Programme and {UNISIST}},
1280 address = {Paris},
1281 institution = {UNESCO},
1282 number = {PGI-93/WS/22}}
1283 %</driver|bib>
1284 %<*driver>
1285 \end{Verbatim}
1286 \end{bibexbox}
1287
1288 \begin{bibexbox}<RX>{bre2007dqb}
1289 BRE, 2007. \emph{Designing quality buildings: a BRE guide}. (Report 497). Bracknell: BRE.
1290 \tcblower
1291 \begin{Verbatim}
1292 %</driver>
1293 %<*driver|bib>
1294 @techreport{bre2007dqb,
1295 author = {{BRE}},
1296 year = {2007},
1297 title = {Designing Quality Buildings: a {BRE} Guide},
1298 address = {Bracknell},
1299 institution = {BRE},
1300 type = {Report},
1301 number = {497}}
1302 %</driver|bib>
1303 %<*driver>
1304 \end{Verbatim}
1305 \end{bibexbox}
1306
1307 \begin{bibexbox}<RX>{deneulin.dinerstein2010hms}
1308 Deneulin, S. and Dinerstein, A.C., 2010. \emph{Hope movements: social movements in the pursuit of human development}. (Bath papers in international development and wellbeing, no.~8). Bath: University of Bath.
1309 \tcblower
1310 \begin{Verbatim}
1311 %</driver>
1312 %<*driver|bib>
1313 @report{deneulin.dinerstein2010hms,
1314 author = {Deneulin, S. and Dinerstein, A. C.},
1315 year = {2010},
1316 title = {Hope Movements: Social Movements in the Pursuit of Human Development},
1317 address = {Bath},
1318 institution = {University of Bath},
1319 series = {Bath Papers in International Development and Wellbeing},
1320 number = {no.~8}}
1321 %</driver|bib>
1322 %<*driver>
1323 \end{Verbatim}
1324 \end{bibexbox}
1325
1326 \begin{info}\item
1327 The style inserts a comma between the \texttt{series} and \texttt{number}
1328 fields, but does not insert one between \texttt{type} and \texttt{number}.
1329 \end{info}
1330
1331 \begin{bibexbox}<WC>{who1986nde}
1332 WHO (World Health Organization), 1986. \emph{Nutrition and development in East Africa}. Geneva: WHO.
1333 \tcblower
1334 \begin{Verbatim}
1335 %</driver>
1336 %<*driver|bib>
1337 @report{who1986nde,
1338 author = {{World Health Organization}},
1339 shortauthor = {WHO},
1340 title = {Nutrition and Development in {East Africa}},
1341 year = {1986},
1342 address = {Geneva},
1343 institution = {WHO}}
1344 %</driver|bib>
1345 %<*driver>
1346 \end{Verbatim}
1347 \end{bibexbox}
1348
1349
1350 \subsubsection*{Standard}
1351
1352 \begin{bibexbox}<RX>{bs5605:1990}
1353 BSI, 1990. \emph{BS 5605:1990 Recommendations for citing and referencing
1354 published material}. London: BSI.
1355 \tcblower
1356 \begin{Verbatim}
1357 %</driver>
1358 %<*driver|bib>
1359 @standard{bs5605:1990,
1360 author = {{BSI}},
1361 year = {1990},
1362 title = {{BS}~5605:1990 {Recommendations} for Citing and Referencing Published Material},
1363 address = {London},
1364 organization = {BSI}}
1365 %</driver|bib>
1366 %<*driver>
1367 \end{Verbatim}
1368 \end{bibexbox}
1369
1370 \begin{bibexbox}<RX>{astm.d1655}
1371 ASTM, 2019. \emph{ASTM D1655 - 19 Standard specification for aviation
1372 turbine fuels}. West Conshohocken, Pa.: ASTM.
1373 \tcblower
1374 \begin{Verbatim}
1375 %</driver>
1376 %<*driver|bib>
1377 @standard{astm.d1655,
1378 author = {{ASTM}},
1379 year = {2019},
1380 title = {{ASTM~D1655} - 19 {Standard} Specification for Aviation Turbine Fuels},
1381 address = {West Conshohocken, Pa.},
1382 organization = {ASTM}}
1383 %</driver|bib>
1384 %<*driver>
1385 \end{Verbatim}
1386 \end{bibexbox}
1387
1388
1389 \subsubsection*{Patent}
1390
1391 \begin{bibexbox}<RX>{pm1981opa}
1392 Phillipp Morris Inc., 1981. \emph{Optical perforating apparatus and system}. European patent application 0021165A1. 1981-01-07.
1393 \tcblower
1394 \begin{Verbatim}
1395 %</driver>
1396 %<*driver|bib>
1397 @patent{pm1981opa,
1398 author = {{Phillipp Morris Inc.}},
1399 year = {1981},
1400 title = {Optical perforating apparatus and system},
1401 type = {European patent application},
1402 number = {0021165A1. 1981-01-07}}
1403 %</driver|bib>
1404 %<*driver>
1405 \end{Verbatim}
1406 \end{bibexbox}
1407
1408 \begin{info}\item
1409 Note that \textsf{biblatex} has special localisation keys for full patents and
1410 patent requests\slash applications.
1411 \end{info}
1412
1413
1414 \subsubsection*{Unpublished written material and personal communications}
1415
1416 \begin{bibexbox}<RX>{harris2013fgr}
1417 Harris, G., 2013. \emph{Focus group recommendations: internal task group
1418 report}. Unpublished.
1419 \tcblower
1420 \begin{Verbatim}
1421 %</driver>
1422 %<*driver|bib>
1423 @unpublished{harris2013fgr,
1424 author = {Harris, G.},
1425 year = {2013},
1426 title = {Focus group recommendations: internal task group report}}
1427 %</driver|bib>
1428 %<*driver>
1429 \end{Verbatim}
1430 \end{bibexbox}
1431
1432 \begin{bibexbox}<RX>{hadley2015bir}
1433 Hadley, S., 2015. \emph{Biomechanics: introductory reading, BM289: sport
1434 biomechanics}. University of Bath. Unpublished.
1435 \tcblower
1436 \begin{Verbatim}
1437 %</driver>
1438 %<*driver|bib>
1439 @unpublished{hadley2015bir,
1440 author = {Hadley, S.},
1441 year = {2015},
1442 title = {Biomechanics: introductory reading, {BM289}: sport biomechanics},
1443 howpublished = {University of Bath}}
1444 %</driver|bib>
1445 %<*driver>
1446 \end{Verbatim}
1447 \end{bibexbox}
1448
1449 \begin{bibexbox}<RX>{thomas2015wcr}
1450 Thomas, D., 2015. Word count and referencing style. \emph{Frequently
1451 asked questions discussion board: PHYS 2011: housing studies}.
1452 University of Bath. Unpublished.
1453 \tcblower
1454 \begin{Verbatim}
1455 %</driver>
1456 %<*driver|bib>
1457 @unpublished{thomas2015wcr,
1458 author = {Thomas, D.},
1459 year = {2015},
1460 title = {Word count and referencing style},
1461 booktitle = {Frequently asked questions discussion board: {PHYS} 2011: housing studies},
1462 howpublished = {University of Bath}}
1463 %</driver|bib>
1464 %<*driver>
1465 \end{Verbatim}
1466 \end{bibexbox}
1467
1468
1469 \subsection{Audiovisual materials}
1470
1471 \subsubsection*{Image}
1472
1473 \begin{bibexbox}<RI>{nasa2015nat}
1474 NASA, 2015. \emph{NASA astronaut Tim Kopra on Dec. 21 spacewalk} [Online]. Washington: NASA. Available from: \url{http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk} [Accessed 7 January 2015].
1475 \tcblower
1476 \begin{Verbatim}
1477 %</driver>
1478 %<*driver|bib>
1479 @image{nasa2015nat,
1480 author = {{NASA}},
1481 year = {2015},
1482 title = {{NASA} Astronaut {Tim} {Kopra} on {Dec.\@} 21 Spacewalk},
1483 address = {Washington},
1484 publisher = {NASA},
1485 url = {http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk},
1486 urldate = {2015-01-07}}
1487 %</driver|bib>
1488 %<*driver>
1489 \end{Verbatim}
1490 \end{bibexbox}
1491
1492 \begin{bibexbox}<RI>{iliff2006rcb}
1493 Iliff, D., 2006. \emph{Royal Crescent in Bath, England - July 2006} [Online]. San Francisco: Wikimedia Foundation. Available from: \url{https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg} [Accessed 7 January 2016].
1494 \tcblower
1495 \begin{Verbatim}
1496 %</driver>
1497 %<*driver|bib>
1498 @image{iliff2006rcb,
1499 author = {D. Iliff},
1500 year = {2006},
1501 title = {{Royal} {Crescent} in {Bath,} {England} - {July} 2006},
1502 address = {San Francisco},
1503 organization = {Wikimedia Foundation},
1504 url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
1505 urldate = {2016-01-07}}
1506 %</driver|bib>
1507 %<*driver>
1508 \end{Verbatim}
1509 \end{bibexbox}
1510
1511 \begin{tips}\item
1512 You can use either the \texttt{publisher} or the \texttt{organization} field to
1513 record the source of the image.
1514 \end{tips}
1515
1516
1517 \begin{bibexbox}<RI>{brbr1965gph}
1518 Bristol Region Building Record, 1965. \emph{Green Park House (since demolished), viewed from southwest} [Photograph]. BRBR, D/877/1. Archives \& Research Collections, University of Bath Library.
1519 \tcblower
1520 \begin{Verbatim}
1521 %</driver>
1522 %<*driver|bib>
1523 @image{brbr1965gph,
1524 author = {{Bristol Region Building Record}},
1525 year = {1965},
1526 title = {{Green} {Park} {House} (since demolished), viewed from southwest},
1527 entrysubtype = {Photograph},
1528 number = {BRBR, D/877/1},
1529 library = {Archives \& Research Collections, University of Bath Library}}
1530 %</driver|bib>
1531 %<*driver>
1532 \end{Verbatim}
1533 \end{bibexbox}
1534
1535 \begin{tips}\item
1536 Use the \texttt{library} field to record the name of the archive.
1537 If the image is on display rather than archived,
1538 use \texttt{institution} instead for the museum, gallery or building.
1539 If you also wish to provide the name of the organisation that published the image,
1540 use the \texttt{publisher} field if the location you provide relates to the publisher,
1541 but the \texttt{organization} field if the location relates to the archive.
1542 \item
1543 Put archival locator information (e.g.\@ box or shelf number) in the \texttt{number} field.
1544 Alternatively, you can split the information across the (non-standard)
1545 \texttt{collection} (\enquote{BRBR}) and \texttt{shelfmark} (\enquote{D/877/1}) fields.
1546 \item
1547 Put the clarification of the resource type in \texttt{entrysubtype}.
1548 In most cases, you can use \texttt{titleaddon} instead,
1549 but \texttt{entrysubtype} will correctly suppress \enquote{Online} being shown
1550 while \texttt{titleaddon} will not.
1551 \end{tips}
1552
1553
1554 \subsubsection*{Map}
1555
1556 \begin{bibexbox}<RX>{andrews.dury1773wilts}
1557 Andrews, J. and Dury, A., 1773. \emph{Map of Wiltshire}, 1 inch to 2 miles. Devizes: Wiltshire Record Society.
1558 \tcblower
1559 \begin{Verbatim}
1560 %</driver>
1561 %<*driver|bib>
1562 @manual{andrews.dury1773wilts,
1563 author = {Andrews, J. and Dury, A.},
1564 year = {1773},
1565 title = {Map of {Wiltshire}},
1566 series = {1 inch to 2 miles},
1567 address = {Devizes},
1568 publisher = {Wiltshire Record Society}}
1569 %</driver|bib>
1570 %<*driver>
1571 \end{Verbatim}
1572 \end{bibexbox}
1573
1574 \begin{info}\item
1575 The \texttt{book} entry type would also work for this reference.
1576 \end{info}
1577
1578 \begin{bibexbox}<RX>{os2020bath}
1579 Ordnance Survey, 2020. \emph{Street view map of University of Bath} [Online], 1:5000, OS VectorMap® Local. Available from: \url{https://digimap.edina.ac.uk/roam/map/os} [Accessed 30 April 2020].
1580 \tcblower
1581 \begin{Verbatim}
1582 %</driver>
1583 %<*driver|bib>
1584 @manual{os2020bath,
1585 author = {{Ordnance Survey}},
1586 year = {2020},
1587 title = {Street view map of {University of Bath}},
1588 series = {1:5000, {OS VectorMap® Local}},
1589 url = {https://digimap.edina.ac.uk/roam/map/os},
1590 urldate = {2020-04-30}}
1591 %</driver|bib>
1592 %<*driver>
1593 \end{Verbatim}
1594 \end{bibexbox}
1595
1596 \begin{bibexbox}<RX>{google2020harbourside}
1597 Google, 2020. \emph{Harbourside, Bristol} [Online], Google Maps. Available from: \url{https://www.google.co.uk/maps/place/Harbourside,+Bristol/} [Accessed 30 April 2020].
1598 \tcblower
1599 \begin{Verbatim}
1600 %</driver>
1601 %<*driver|bib>
1602 @manual{google2020harbourside,
1603 author = {{Google}},
1604 year = {2020},
1605 title = {{Harbourside, Bristol}},
1606 series = {{Google Maps}},
1607 url = {https://www.google.co.uk/maps/place/Harbourside,+Bristol/},
1608 urldate = {2020-04-30}}
1609 %</driver|bib>
1610 %<*driver>
1611 \end{Verbatim}
1612 \end{bibexbox}
1613
1614
1615 \subsubsection*{Film, video or DVD}
1616
1617 \begin{bibexbox}<RX>{macbeth1948}
1618 \emph{Macbeth}, 1948. Film. Directed by Orson Welles. USA: Republic Pictures.
1619 \tcblower
1620 \begin{Verbatim}
1621 %</driver>
1622 %<*driver|bib>
1623 @video{macbeth1948,
1624 year = {1948},
1625 title = {Macbeth},
1626 type = {Film},
1627 note = {Directed by Orson Welles},
1628 address = {USA},
1629 publisher = {Republic Pictures}}
1630 %</driver|bib>
1631 %<*driver>
1632 \end{Verbatim}
1633 \end{bibexbox}
1634
1635 \begin{info}\item
1636 In the above entry, the following would also work instead of using \texttt{note}:
1637
1638 \begin{tcolorbox}%
1639 [ colframe = Slate
1640 , colback = white
1641 , fontupper = \footnotesize
1642 ]
1643 \begin{Verbatim}
1644 editor = {Orson Welles},
1645 editortype = {director},
1646 \end{Verbatim}
1647 \end{tcolorbox}
1648
1649 \item
1650 You can also use \texttt{movie} as an alias for \texttt{video}.
1651 \end{info}
1652
1653 \begin{bibexbox}<RX>{elephant-man1980}
1654 \emph{The elephant man} [Online], 1980. Film. Directed by David Lynch. USA: Brooksfilms. Available from: BBC iPlayer [Accessed 4 May 2021].
1655 \tcblower
1656 \begin{Verbatim}
1657 %</driver>
1658 %<*driver|bib>
1659 @video{elephant-man1980,
1660 year = {1980},
1661 title = {The elephant man},
1662 type = {Film},
1663 note = {Directed by David Lynch},
1664 address = {USA},
1665 publisher = {Brooksfilms},
1666 library = {BBC iPlayer},
1667 urldate = {2021-05-04}}
1668 %</driver|bib>
1669 %<*driver>
1670 \end{Verbatim}
1671 \end{bibexbox}
1672
1673
1674 \subsubsection*{Online video\slash audio}
1675
1676 \begin{bibexbox}<RX>{moran2016sol}
1677 Moran, C., 2016. \emph{Save our libraries} [Online]. Available from: \url{https://youtu.be/gKTfCz4JtVE} [Accessed 29 April 2016].
1678 \tcblower
1679 \begin{Verbatim}
1680 %</driver>
1681 %<*driver|bib>
1682 @video{moran2016sol,
1683 author = {Moran, C.},
1684 year = {2016},
1685 title = {Save Our Libraries},
1686 url = {https://youtu.be/gKTfCz4JtVE},
1687 urldate = {2016-04-29}}
1688 %</driver|bib>
1689 %<*driver>
1690 \end{Verbatim}
1691 \end{bibexbox}
1692
1693 \begin{bibexbox}<RX>{chakrabarti2016hac}
1694 Chakrabarti, V., 2016. \emph{How architecture and city planning can combat social inequality} [Online]. Available from: \url{https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast} [Accessed 28 March 2019].
1695 \tcblower
1696 \begin{Verbatim}
1697 %</driver>
1698 %<*driver|bib>
1699 @audio{chakrabarti2016hac,
1700 author = {Chakrabarti, V.},
1701 year = {2016},
1702 title = {How Architecture and City Planning Can Combat Social Inequality},
1703 url = {https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast},
1704 urldate = {2019-03-28}}
1705 %</driver|bib>
1706 %<*driver>
1707 \end{Verbatim}
1708 \end{bibexbox}
1709
1710
1711 \subsubsection*{Television or radio broadcast}
1712
1713 \begin{bibexbox}<RX>{inn2021huw}
1714 Hurry up and wait, 2021. \emph{Inside no.9}, \emph{Episode 6:4}. TV. BBC2, 31 May. 21.30 hrs.
1715 \tcblower
1716 \begin{Verbatim}
1717 %</driver>
1718 %<*driver|bib>
1719 @video{inn2021huw,
1720 date = {2021-05-31T21:30:00},
1721 title = {Hurry up and wait},
1722 series = {Inside No.9},
1723 number = {{Episode} 6:4},
1724 type = {TV},
1725 publisher = {BBC2}}
1726 %</driver|bib>
1727 %<*driver>
1728 \end{Verbatim}
1729 \end{bibexbox}
1730
1731 \begin{tips}\item
1732 Use \texttt{type} for the medium and \texttt{publisher} for the channel.
1733 \item
1734 If the episode has an individual title, use \texttt{series} for the series and \texttt{number} for the episode number.
1735 Otherwise, give both series and episode number as the \texttt{title}.
1736 \end{tips}
1737
1738 \begin{bibexbox}<RX>{rsfo2006ep5}
1739 Rick Stein's French odyssey: Episode 5, 2006. TV. BBC2, 23 August. 20.30 hrs.
1740 \tcblower
1741 \begin{Verbatim}
1742 %</driver>
1743 %<*driver|bib>
1744 @video{rsfo2006ep5,
1745 date = {2006-08-23T20:30:00},
1746 title = {Rick {Stein's} {French} Odyssey},
1747 subtitle = {{Episode} 5},
1748 type = {TV},
1749 publisher = {BBC2}}
1750 %</driver|bib>
1751 %<*driver>
1752 \end{Verbatim}
1753 \end{bibexbox}
1754
1755 \begin{bibexbox}<RX>{archers20060823}
1756 The Archers, 2006. Radio. BBC Radio 4, 23 August. 19.02 hrs.
1757 \tcblower
1758 \begin{Verbatim}
1759 %</driver>
1760 %<*driver|bib>
1761 @audio{archers20060823,
1762 date = {2006-08-23T19:02:00},
1763 title = {The {Archers}},
1764 type = {Radio},
1765 publisher = {BBC Radio 4}}
1766 %</driver|bib>
1767 %<*driver>
1768 \end{Verbatim}
1769 \end{bibexbox}
1770
1771 \begin{info}\item
1772 You can also use \texttt{music} as an alias for \texttt{audio}.
1773 \end{info}
1774
1775 \begin{bibexbox}<RX>{tkmmm2020ts}
1776 The secret, 2020. \emph{Tiger king: murder, mayhem and madness}, \emph{Episode 3} [Online]. TV. Available from: Netflix [Accessed 4 May 2021].
1777 \tcblower
1778 \begin{Verbatim}
1779 %</driver>
1780 %<*driver|bib>
1781 @video{tkmmm2020ts,
1782 year = {2020},
1783 title = {The Secret},
1784 series = {Tiger King: Murder, Mayhem and Madness},
1785 number = {{Episode} 3},
1786 type = {TV},
1787 library = {Netflix},
1788 urldate = {2021-05-04}}
1789 %</driver|bib>
1790 %<*driver>
1791 \end{Verbatim}
1792 \end{bibexbox}
1793
1794
1795 \subsubsection*{Music score}
1796
1797 \begin{bibexbox}<RX>{beethoven1950symph1}
1798 Beethoven, L. van, 1950. \emph{Symphony no.1 in C, Op.21}. Harmondsworth: Penguin.
1799 \tcblower
1800 \begin{Verbatim}
1801 %</driver>
1802 %<*driver|bib>
1803 @book{beethoven1950symph1,
1804 author = {Ludwig van Beethoven},
1805 year = {1950},
1806 title = {Symphony no.1 in {C,} {Op.21}},
1807 address = {Harmondsworth},
1808 publisher = {Penguin}}
1809 %</driver|bib>
1810 %<*driver>
1811 \end{Verbatim}
1812 \end{bibexbox}
1813
1814
1815 \subsection{Digital media}
1816
1817 \subsubsection*{Website or webpage}
1818
1819 \begin{bibexbox}<RX>{who2018ttc}
1820 World Health Organization, 2018. \emph{The top 10 causes of death} [Online]. Geneva: World Health Organization. Available from: \url{https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death} [Accessed 29 June 2020].
1821 \tcblower
1822 \begin{Verbatim}
1823 %</driver>
1824 %<*driver|bib>
1825 @online{who2018ttc,
1826 author = {{World Health Organization}},
1827 year = {2018},
1828 title = {The Top 10 Causes of Death},
1829 address = {Geneva},
1830 organization = {World Health Organization},
1831 url = {https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death},
1832 urldate = {2020-06-29}}
1833 %</driver|bib>
1834 %<*driver>
1835 \end{Verbatim}
1836 \end{bibexbox}
1837
1838 \begin{bibexbox}<RX>{manco2013va}
1839 Manco, J., 2013. \emph{Vernacular architecture} [Online]. Available from: \url{https://www.buildinghistory.org/style/vernacular.shtml} [Accessed 20 February 2020].
1840 \tcblower
1841 \begin{Verbatim}
1842 %</driver>
1843 %<*driver|bib>
1844 @online{manco2013va,
1845 author = {Manco, J.},
1846 year = {2013},
1847 title = {Vernacular Architecture},
1848 url = {https://www.buildinghistory.org/style/vernacular.shtml},
1849 urldate = {2020-02-20},
1850 pagination = {paragraph}}
1851 %</driver|bib>
1852 %<*driver>
1853 \end{Verbatim}
1854 \end{bibexbox}
1855
1856 This template is also used for retrievable Generative AI content.
1857
1858 \begin{bibexbox}<RX>{copilot2026wcr}
1859 Copilot, 2026. \emph{Why is citing and referencing your sources important?} [Online]. Redmond, Washington: Microsoft. Available from: \url{https://copilot.microsoft.com/chats/wxaHkx69Qt4SDuNDAkbCT} [Accessed 19 January 2026].
1860 \tcblower
1861 \begin{Verbatim}
1862 %</driver>
1863 %<*driver|bib>
1864 @online{copilot2026wcr,
1865 author = {{Copilot}},
1866 year = {2026},
1867 title = {Why is Citing and Referencing Your Sources Important?},
1868 address = {Redmond, Washington},
1869 organization = {Microsoft},
1870 url = {https://copilot.microsoft.com/chats/wxaHkx69Qt4SDuNDAkbCT},
1871 urldate = {2026-01-19}}
1872 %</driver|bib>
1873 %<*driver>
1874 \end{Verbatim}
1875 \end{bibexbox}
1876
1877
1878 \subsubsection*{Social media}
1879
1880 \begin{bibexbox}<RX>{gaiman2021fbp}
1881 Gaiman, N., 2021. \emph{Facebook post} [Online], 21 April. Available from: \url{https://www.facebook.com/neilgaiman/posts/305187897642814} [Accessed 13 May 2021].
1882 \tcblower
1883 \begin{Verbatim}
1884 %</driver>
1885 %<*driver|bib>
1886 @online{gaiman2021fbp,
1887 author = {Gaiman, N.},
1888 date = {2021-04-21},
1889 title = {Facebook post},
1890 url = {https://www.facebook.com/neilgaiman/posts/305187897642814},
1891 urldate = {2021-05-13}}
1892 %</driver|bib>
1893 %<*driver>
1894 \end{Verbatim}
1895 \end{bibexbox}
1896
1897 \begin{bibexbox}<RX>{ublib2021tp}
1898 Library at University of Bath [@bathunilibrary], 2021. \emph{Twitter post} [Online], 10 May. Available from: \url{https://twitter.com/BathUniLibrary/status/1391774402618998795?s=20} [Accessed 12 May 2021].
1899 \tcblower
1900 \begin{Verbatim}
1901 %</driver>
1902 %<*driver|bib>
1903 @online{ublib2021tp,
1904 author = {{Library at University of Bath}},
1905 nameaddon = {@bathunilibrary},
1906 date = {2021-05-10},
1907 title = {Twitter post},
1908 url = {https://twitter.com/BathUniLibrary/status/1391774402618998795?s=20},
1909 urldate = {2021-05-12}}
1910 %</driver|bib>
1911 %<*driver>
1912 \end{Verbatim}
1913 \end{bibexbox}
1914
1915 \begin{bibexbox}<RX>{ublib2021ip}
1916 University of Bath Library [@unibathlib], 2021. \emph{Instagram post} [Online], 15 March. Available from: \url{https://www.instagram.com/p/CMb5GHjFv9A/?utm_source=ig_web_copy_link} [Accessed 7 May 2021].
1917 \tcblower
1918 \begin{Verbatim}
1919 %</driver>
1920 %<*driver|bib>
1921 @online{ublib2021ip,
1922 author = {{University of Bath Library}},
1923 nameaddon = {@unibathlib},
1924 date = {2021-03-15},
1925 title = {Instagram post},
1926 url = {https://www.instagram.com/p/CMb5GHjFv9A/?utm_source=ig_web_copy_link},
1927 urldate = {2021-05-07}}
1928 %</driver|bib>
1929 %<*driver>
1930 \end{Verbatim}
1931 \end{bibexbox}
1932
1933
1934 \subsubsection*{Email discussion list}
1935
1936 \begin{bibexbox}<RX>{clark2004euk}
1937 Clark, T., 5 July 2004. A European UK Libraries Plus? \emph{Lis-link} [Online]. Available from: \url{[email protected]} [Accessed 30 July 2004].
1938 \tcblower
1939 \begin{Verbatim}
1940 %</driver>
1941 %<*driver|bib>
1942 @letter{clark2004euk,
1943 author = {Clark, T.},
1944 date = {2004-07-05},
1945 title = {A {European} {UK} {Libraries} {Plus}?},
1946 journal = {Lis-link},
1947 url = {[email protected]},
1948 urldate = {2004-07-30}}
1949 %</driver|bib>
1950 %<*driver>
1951 \end{Verbatim}
1952 \end{bibexbox}
1953
1954 \begin{tips}\item
1955 Use the \texttt{journal} field to specify the mailing list. If you omit the
1956 \texttt{journal} field, the entry will be formatted as an unpublished work.
1957 \end{tips}
1958
1959
1960 \subsubsection*{Database}
1961
1962 \begin{bibexbox}<RX>{bvd2008bt}
1963 Bureau van Dijk, 2008. \emph{BT Group plc company report}. \emph{FAME} [Online]. London: Bureau van Dijk. Available from: \url{http://www.portal.euromonitor.com} [Accessed 6 November 2014].
1964 \tcblower
1965 \begin{Verbatim}
1966 %</driver>
1967 %<*driver|bib>
1968 @dataset{bvd2008bt,
1969 author = {{Bureau van Dijk}},
1970 year = {2008},
1971 title = {{BT} {Group} PLC Company Report},
1972 library = {FAME},
1973 address = {London},
1974 publisher = {Bureau van Dijk},
1975 url = {http://www.portal.euromonitor.com},
1976 urldate = {2014-11-06}}
1977 %</driver|bib>
1978 %<*driver>
1979 \end{Verbatim}
1980 \end{bibexbox}
1981
1982 \begin{tips}\item
1983 Use the \texttt{title} field for the entry title,
1984 and the \texttt{library} field for the name of the database itself.
1985 \end{tips}
1986
1987
1988 \subsubsection*{Dataset}
1989
1990 \begin{bibexbox}<RX>{wilson2013rgc}
1991 Wilson, D., 2013. \emph{Real geometry and connectedness via triangular description: CAD example bank} [Online]. Bath: University of Bath. Available from: \url{https://doi.org/10.15125/BATH-00069} [Accessed 20 April 2016].
1992 \tcblower
1993 \begin{Verbatim}
1994 %</driver>
1995 %<*driver|bib>
1996 @dataset{wilson2013rgc,
1997 author = {Wilson, D.},
1998 year = {2013},
1999 title = {Real Geometry and Connectedness via Triangular Description},
2000 subtitle = {{CAD} Example Bank},
2001 address = {Bath},
2002 publisher = {University of Bath},
2003 doi = {10.15125/BATH-00069},
2004 urldate = {2016-04-20}}
2005 %</driver|bib>
2006 %<*driver>
2007 \end{Verbatim}
2008 \end{bibexbox}
2009
2010
2011 \subsubsection*{Computer program}
2012
2013 \begin{bibexbox}<RX>{screencasto}
2014 @screencasto, n.d. \emph{Screencast-O-Matic} (v.2) [computer program]. Available from: \url{https://screencast-o-matic.com/} [Accessed 16 May 2016].
2015 \tcblower
2016 \begin{Verbatim}
2017 %</driver>
2018 %<*driver|bib>
2019 @software{screencasto,
2020 author = {@screencasto},
2021 title = {{Screencast-O-Matic}},
2022 version = {2},
2023 entrysubtype = {computer program},
2024 url = {https://screencast-o-matic.com/},
2025 urldate = {2016-05-16}}
2026 %</driver|bib>
2027 %<*driver>
2028 \end{Verbatim}
2029 \end{bibexbox}
2030
2031 \begin{tips}\item
2032 Put the clarification of the resource type in \texttt{entrysubtype}. In most
2033 cases, you can use \texttt{titleaddon} instead, but \texttt{titleaddon} is shown
2034 immediately after the title and may be shown alongside the \enquote{Online}
2035 label, whereas \texttt{entrysubtype} is printed after the \texttt{version} and
2036 supersedes the \enquote{Online} label.
2037 \end{tips}
2038
2039 \subsection{Works in languages other than English}
2040
2041 \subsubsection*{Work in translation}
2042
2043 \begin{bibexbox}<RX>{aristotle2007ne}
2044 Aristotle, 2007. \emph{Nicomachean ethics} (W.D. Ross, Trans.). South Dakota: NuVisions.
2045 \tcblower
2046 \begin{Verbatim}
2047 %</driver>
2048 %<*driver|bib>
2049 @book{aristotle2007ne,
2050 author = {Aristotle},
2051 year = {2007},
2052 title = {Nicomachean Ethics},
2053 translator = {W. D. Ross},
2054 address = {South Dakota},
2055 publisher = {NuVisions}}
2056 %</driver|bib>
2057 %<*driver>
2058 \end{Verbatim}
2059 \end{bibexbox}
2060
2061
2062 \subsubsection*{Work in the Roman alphabet}
2063
2064 \begin{bibexbox}<RX>{esquivel2003cap}
2065 Esquivel, L., 2003. \emph{Como agua para chocolate} [Like water for chocolate]. Barcelona: Debolsillo.
2066 \tcblower
2067 \begin{Verbatim}
2068 %</driver>
2069 %<*driver|bib>
2070 @book{esquivel2003cap,
2071 author = {Esquivel, L.},
2072 year = {2003},
2073 title = {Como Agua para Chocolate},
2074 titleaddon = {Like water for chocolate},
2075 address = {Barcelona},
2076 publisher = {Debolsillo}}
2077 %</driver|bib>
2078 %<*driver>
2079 \end{Verbatim}
2080 \end{bibexbox}
2081
2082 \begin{tips}\item
2083 Use the \texttt{titleaddon} field to supply the English translation of the title.
2084 \end{tips}
2085
2086 \begin{bibexbox}<RX>{thurfjell1975vhv}
2087 Thurfjell, W., 1975. Vart har våran doktor tagit vägen? [Where has our doctor gone?]. \emph{Läkartidningen}, 72, p.789.
2088 \tcblower
2089 \begin{Verbatim}
2090 %</driver>
2091 %<*driver|bib>
2092 @article{thurfjell1975vhv,
2093 author = {Thurfjell, W.},
2094 year = {1975},
2095 title = {Vart har våran doktor tagit vägen?},
2096 titleaddon = {Where has our doctor gone?},
2097 journal = {Läkartidningen},
2098 volume = {72},
2099 pages = {789}}
2100 %</driver|bib>
2101 %<*driver>
2102 \end{Verbatim}
2103 \end{bibexbox}
2104
2105
2106 \subsubsection*{Work in a non-Roman alphabet}
2107
2108 \begin{bibexbox}<RX>{hua1999qys1}
2109 Hua, L. 華林甫, 1999. Qingdai yilai Sanxia diqu shuihan zaihai de chubu yanjiu 清代以來三峽地區水旱災害的初步硏 [A preliminary study of floods and droughts in the Three Gorges region since the Qing dynasty]. \emph{Zhongguo shehui kexue \emph{中國社會科學}}, 1, pp.168--79.
2110 \tcblower
2111 \begin{Verbatim}
2112 %</driver>
2113 %<*driver|bib>
2114 @article{hua1999qys1,
2115 author = {given=Linfu, family=Hua, cjk=華林甫},
2116 year = {1999},
2117 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu
2118 {清代以來三峽地區水旱災害的初步硏}},
2119 titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
2120 the {Qing} dynasty},
2121 journal = {Zhongguo shehui kexue \emph{中國社會科學}},
2122 volume = {1},
2123 pages = {168-79}}
2124 %</driver|bib>
2125 %<*driver>
2126 \end{Verbatim}
2127 \end{bibexbox}
2128
2129 \begin{tips}\item
2130 To supply a transliterated version of an author name, specify the name using the
2131 name parts \texttt{family}, \texttt{given} and \texttt{cjk}. Please note that if
2132 you do supply a \texttt{cjk} component, any \texttt{prefix} or \texttt{suffix}
2133 component you may supply will be ignored.
2134 \end{tips}
2135
2136 \begin{bibexbox}<RX>{hua1999qys2}
2137 Hua, L., 1999. Qingdai yilai Sanxia diqu shuihan zaihai de chubu yanjiu [A preliminary study of floods and droughts in the Three Gorges region since the Qing dynasty]. \emph{Zhongguo shehui kexue}, 1, pp.168--79.
2138 \tcblower
2139 \begin{Verbatim}
2140 %</driver>
2141 %<*driver|bib>
2142 @article{hua1999qys2,
2143 author = {Hua, Linfu},
2144 year = {1999},
2145 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu},
2146 titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
2147 the {Qing} dynasty},
2148 journal = {Zhongguo shehui kexue},
2149 volume = {1},
2150 pages = {168-79}}
2151 %</driver|bib>
2152 %<*driver>
2153 \end{Verbatim}
2154 \end{bibexbox}
2155
2156 \begin{tips}\item
2157 Although not a feature of the Harvard (Bath) Style, if you want to suppress the
2158 punctuation between the family name and the initial (and thereby be more
2159 faithful to the original orthography), you can specify this using
2160 \textsf{biblatex}'s data annotations feature, using the keyword \texttt{cjk}:
2161 \end{tips}
2162
2163 \begin{bibexbox}{hua2001foo}
2164 Hua L. 華林甫, 2001. \emph{Lorem ipsum}.
2165 \tcblower
2166 \begin{Verbatim}
2167 %</driver>
2168 %<*driver|bib>
2169 @book{hua2001foo,
2170 author = {given=Linfu, family=Hua, cjk=華林甫},
2171 author+an = {1=cjk},
2172 year = {2001},
2173 title = {Lorem ipsum}}
2174 %</driver|bib>
2175 %<*driver>
2176 \end{Verbatim}
2177 \end{bibexbox}
2178
2179 \begin{bibexbox}<RX>{pamporov2006rvb}
2180 Pamporov, A., 2006. \emph{Romskoto vsekidnevie v Balgariya} [Roma everyday life in Bulgaria]. Veliko Tarnovo: Faber.
2181 \tcblower
2182 \begin{Verbatim}
2183 %</driver>
2184 %<*driver|bib>
2185 @book{pamporov2006rvb,
2186 author = {Pamporov, A.},
2187 year = {2006},
2188 title = {Romskoto vsekidnevie v {Balgariya}},
2189 titleaddon = {Roma everyday life in Bulgaria},
2190 address = {Veliko Tarnovo},
2191 publisher = {Faber}}
2192 %</driver|bib>
2193 %<*driver>
2194 \end{Verbatim}
2195 \end{bibexbox}
2196
2197
2198 \subsection{Government and parliamentary document}
2199
2200 % Parliamentary reports
2201
2202 \subsubsection*{House of Commons paper}
2203
2204 \begin{tips}\item
2205 Use this form for reports of House of Commons select committees.
2206 \end{tips}
2207
2208 \begin{bibexbox}<RX>{gb.hc2003/04-30}
2209 Great Britain. Parliament. House of Commons, 2004. \emph{National Savings investment deposits: account 2002--2003}. (HC 2003/04, 30). London: National Audit Office.
2210 \tcblower
2211 \begin{Verbatim}
2212 %</driver>
2213 %<*driver|bib>
2214 @report{gb.hc2003/04-30,
2215 author = {{Great Britain. Parliament. House of Commons}},
2216 year = {2004},
2217 title = {National {Savings} Investment Deposits},
2218 subtitle = {Account 2002--2003},
2219 address = {London},
2220 publisher = {National Audit Office},
2221 series = {{HC} 2003/04},
2222 number = {30}}
2223 %</driver|bib>
2224 %<*driver>
2225 \end{Verbatim}
2226 \end{bibexbox}
2227
2228
2229 \subsubsection*{House of Lords paper}
2230
2231 \begin{tips}\item
2232 Use this form for reports of House of Lords select committees.
2233 \end{tips}
2234
2235 \begin{bibexbox}<RX>{gb.hl1986/87-66}
2236 Great Britain. Parliament. House of Lords, 1987. \emph{Social fund (maternity and funeral expenses) bill}. (HL 1986/87, (66)). London: HMSO.
2237 \tcblower
2238 \begin{Verbatim}
2239 %</driver>
2240 %<*driver|bib>
2241 @report{gb.hl1986/87-66,
2242 author = {{Great Britain. Parliament. House of Lords}},
2243 year = {1987},
2244 title = {Social Fund (Maternity and Funeral Expenses) Bill},
2245 address = {London},
2246 publisher = {HMSO},
2247 series = {{HL} 1986/87},
2248 number = {66}}
2249 %</driver|bib>
2250 %<*driver>
2251 \end{Verbatim}
2252 \end{bibexbox}
2253
2254 \begin{hacks}\item
2255 For joint committees, you will have to hack this slightly, putting the session
2256 years in \texttt{series} and the HL and HC numbers in \texttt{number}.
2257 \end{hacks}
2258
2259
2260 \subsubsection*{Command paper}
2261
2262 \begin{bibexbox}<RX>{gb.cm6041}
2263 Great Britain. Ministry of Defence, 2004. \emph{Delivering security in a changing world: defence white paper}. (Cm. 6041). London: TSO.
2264 \tcblower
2265 \begin{Verbatim}
2266 %</driver>
2267 %<*driver|bib>
2268 @report{gb.cm6041,
2269 author = {{Great Britain. Ministry of Defence}},
2270 year = {2004},
2271 title = {Delivering Security in a Changing World},
2272 subtitle = {Defence White Paper},
2273 address = {London},
2274 publisher = {TSO},
2275 series = {Cm},
2276 number = {6041}}
2277 %</driver|bib>
2278 %<*driver>
2279 \end{Verbatim}
2280 \end{bibexbox}
2281
2282
2283 % UK Primary Legislation
2284
2285 \subsubsection*{House of Commons\slash House of Lords bill}
2286
2287 \begin{bibexbox}<RX>{gb.bill1987/88-66}
2288 Great Britain. Parliament. House of Commons, 1988. \emph{Local government finance bill}. (Bills | 1987/88, 66). London: HMSO.
2289 \tcblower
2290 \begin{Verbatim}
2291 %</driver>
2292 %<*driver|bib>
2293 @legislation{gb.bill1987/88-66,
2294 author = {{Great Britain. Parliament. House of Commons}},
2295 year = {1988},
2296 title = {Local Government Finance Bill},
2297 address = {London},
2298 publisher = {HMSO},
2299 series = {{Bills | 1987/88}},
2300 number = {66}}
2301 %</driver|bib>
2302 %<*driver>
2303 \end{Verbatim}
2304 \end{bibexbox}
2305
2306
2307 \subsubsection*{Act of Parliament (UK Statutes) before 1963}
2308
2309 \begin{bibexbox}<RX>{gb.wa1735}
2310 \emph{Witchcraft Act} \emph{1735} (9 Geo.2, c.5).
2311 \tcblower
2312 \begin{Verbatim}
2313 %</driver>
2314 %<*driver|bib>
2315 @legislation{gb.wa1735,
2316 title = {Witchcraft {Act}},
2317 year = {1735},
2318 series = {9 Geo.2},
2319 chapter = {5}}
2320 %</driver|bib>
2321 %<*driver>
2322 \end{Verbatim}
2323 \end{bibexbox}
2324
2325 \begin{info}\item
2326 You could instead combine the series and chapter in the \texttt{number} field:
2327
2328 \begin{tcolorbox}%
2329 [ colframe = Slate
2330 , colback = white
2331 , fontupper = \footnotesize
2332 ]
2333 \begin{Verbatim}
2334 number = {9 Geo.2, c.5}
2335 \end{Verbatim}
2336 \end{tcolorbox}
2337 \end{info}
2338
2339
2340 \subsubsection*{Act of Parliament (UK Statutes) 1963 onwards}
2341
2342 \begin{bibexbox}<RX>{gb.pa2014}
2343 \emph{Pensions Act} \emph{2014}, c.19. London: TSO.
2344 \tcblower
2345 \begin{Verbatim}
2346 %</driver>
2347 %<*driver|bib>
2348 @legislation{gb.pa2014,
2349 title = {Pensions {Act}},
2350 year = {2014},
2351 chapter = {19},
2352 address = {London},
2353 publisher = {TSO}}
2354 %</driver|bib>
2355 %<*driver>
2356 \end{Verbatim}
2357 \end{bibexbox}
2358
2359
2360 % UK secondary legislation
2361
2362 \subsubsection*{Statutory instrument}
2363
2364 \begin{bibexbox}<RX>{gb.hmr2012}
2365 \emph{The Human Medicines Regulations} \emph{2012} [Online], No.1916, United Kingdom: HMSO. Available from: \url{http://www.legislation.gov.uk/uksi/2012/1916/contents} [Accessed 22 April 2021].
2366 \tcblower
2367 \begin{Verbatim}
2368 %</driver>
2369 %<*driver|bib>
2370 @legislation{gb.hmr2012,
2371 entrysubtype = {secondary},
2372 title = {The {Human} {Medicines} {Regulations}},
2373 year = {2012},
2374 number = {No.1916},
2375 address = {United Kingdom},
2376 publisher = {HMSO},
2377 url = {http://www.legislation.gov.uk/uksi/2012/1916/contents},
2378 urldate = {2021-04-22}}
2379 %</driver|bib>
2380 %<*driver>
2381 \end{Verbatim}
2382 \end{bibexbox}
2383
2384 \begin{tips}\item
2385 Use the \texttt{entrysubtype} `secondary' to put the number in the right place.
2386 \end{tips}
2387
2388
2389 % UK parliamentary debates
2390
2391 \subsubsection*{Parliamentary debate}
2392
2393 \begin{bibexbox}<RX>{gb.hc2024rpc}
2394 Great Britain. Parliament. House of Commons, 2024. Rwanda Plan Cost and Asylum System. \emph{Hansard} [Online], 744, 9 January 2024. Available from: \url{https://hansard.parliament.uk/Commons/2024-01-09/debates/57105D77-72DE-4246-9F6E-ED87FCB9A088/RwandaPlanCostAndAsylumSystem} [Accessed 12 December 2024].
2395 \tcblower
2396 \begin{Verbatim}
2397 %</driver>
2398 %<*driver|bib>
2399 @legal{gb.hc2024rpc,
2400 entrysubtype = {parliamentary},
2401 author = {{Great Britain. Parliament. House of Commons}},
2402 year = {2024},
2403 title = {{Rwanda Plan Cost and Asylum System}},
2404 journal = {Hansard},
2405 volume = {744},
2406 eventdate = {2024-01-09},
2407 url = {https://hansard.parliament.uk/Commons/2024-01-09/debates/57105D77-72DE-4246-9F6E-ED87FCB9A088/RwandaPlanCostAndAsylumSystem},
2408 urldate = {2024-12-12}}
2409 %</driver|bib>
2410 %<*driver>
2411 \end{Verbatim}
2412 \end{bibexbox}
2413
2414 \begin{tips}\item
2415 Use the \texttt{legal} entry type.
2416 As that entry type is defined loosely by \textsf{biblatex},
2417 use the \texttt{entrysubtype} `parliamentary' to protect the entry
2418 against possible formatting changes in future versions of the style.
2419 \end{tips}
2420
2421
2422 \subsection{Legal document: EU reports\slash legislation}
2423
2424 % European reports
2425
2426 \subsubsection*{EU publication}
2427
2428 The following example has been removed.
2429
2430 \begin{bibexbox}<RX>{ec2015gra}
2431 European Commission, 2015. \emph{General report on the activities of the European Union 2014}. Luxembourg: Publications Office of the European Union.
2432 \tcblower
2433 \begin{Verbatim}
2434 %</driver>
2435 %<*driver|bib>
2436 @report{ec2015gra,
2437 author = {{European Commission}},
2438 year = {2015},
2439 title = {General Report on the Activities of the {European} {Union} 2014},
2440 address = {Luxembourg},
2441 publisher = {Publications Office of the European Union}}
2442 %</driver|bib>
2443 %<*driver>
2444 \end{Verbatim}
2445 \end{bibexbox}
2446
2447
2448 % European legislation
2449
2450 \subsubsection*{EU regulation or directive, decision, recommendation or opinion}
2451
2452 \begin{bibexbox}<RX>{eu.dir1984/2003}
2453 Council Regulation (EC) 1984/2003 of 8 April 2003 introducing a system for the statistical monitoring of trade in bluefin tuna, swordfish and big eye tuna within the Community [2003] \emph{OJ} L295.
2454 \tcblower
2455 \begin{Verbatim}
2456 %</driver>
2457 %<*driver|bib>
2458 @legislation{eu.dir1984/2003,
2459 title = {Council {Regulation} ({EC}) 1984/2003 of 8 {April} 2003 Introducing a System for
2460 the Statistical Monitoring of Trade in Bluefin Tuna, Swordfish and Big Eye Tuna within
2461 the {Community}},
2462 shorttitle = {Council {Regulation} \parentext{EC} 1984/2003},
2463 year = {2003},
2464 journal = {OJ},
2465 series = {L},
2466 volume = {295}}
2467 %</driver|bib>
2468 %<*driver>
2469 \end{Verbatim}
2470 \end{bibexbox}
2471
2472 \begin{info}\item
2473 The \texttt{shorttitle} will be used in citations instead of the full title.
2474 \end{info}
2475
2476
2477 \subsection{Legal document: case reports}
2478
2479 \subsubsection*{Judgment of the European Court of Justice}
2480
2481 \begin{bibexbox}<RX>{srl.etal-v-comm2005}
2482 \emph{Alessandrini Srl and others v.~Commission} (C-295/03 P) [2005] ECR I--5700.
2483 \tcblower
2484 \begin{Verbatim}
2485 %</driver>
2486 %<*driver|bib>
2487 @jurisdiction{srl.etal-v-comm2005,
2488 title = {Alessandrini {Srl} and others v. {Commission}},
2489 number = {C-295/03 P},
2490 year = {2005},
2491 journal = {ECR},
2492 volume = {I},
2493 pages = {5700}}
2494 %</driver|bib>
2495 %<*driver>
2496 \end{Verbatim}
2497 \end{bibexbox}
2498
2499 \begin{tips}\item
2500 Use the \texttt{number} field (or the non-standard \texttt{casenmuber} field)
2501 for the case number. For Commission Decisions, use the (non-standard)
2502 \texttt{casenumber} or (\textsf{biblatex-oscola}) \texttt{userb} field for the
2503 Commission case number, \texttt{number} for the formal decision number, and give
2504 `Commission' as the \texttt{institution}.
2505 \end{tips}
2506
2507
2508 \subsubsection*{Legal case study}
2509
2510 \begin{bibexbox}<RX>{seldon-v-c.w.j2009}
2511 \emph{Seldon v Clarkson Wright \& Jakes}, 2009. England and Wales Court of Appeal (Civil Division), 889. \emph{Bailii} [Online]. Available from: \url{http://www.bailii.org/ew/cases/EWCA/Civ/2009/889.html} [Accessed 23 April 2024].
2512 \tcblower
2513 \begin{Verbatim}
2514 %</driver>
2515 %<*driver|bib>
2516 @jurisdiction{seldon-v-c.w.j2009,
2517 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
2518 year = {2009},
2519 institution = {{England and Wales Court of Appeal (Civil Division)}},
2520 number = {889},
2521 journal = {Bailii},
2522 url = {http://www.bailii.org/ew/cases/EWCA/Civ/2009/889.html},
2523 urldate = {2024-04-23}}
2524 %</driver|bib>
2525 %<*driver>
2526 \end{Verbatim}
2527 \end{bibexbox}
2528
2529 \begin{bibexbox}<RX>{braceurself-v-nhs.england2013}
2530 \emph{Braceurself Ltd v~NHS England}, 2013. England and Wales Court of Appeal (Civil Division), 39. \emph{Construction law reports}, 212, pp.95--135.
2531 \tcblower
2532 \begin{Verbatim}
2533 %</driver>
2534 %<*driver|bib>
2535 @jurisdiction{braceurself-v-nhs.england2013,
2536 title = {{Braceurself} {Ltd} v~{NHS} {England}},
2537 year = {2013},
2538 institution = {{England and Wales Court of Appeal (Civil Division)}},
2539 number = {39},
2540 journal = {Construction law reports},
2541 volume = {212},
2542 pages = {95-135}}
2543 %</driver|bib>
2544 %<*driver>
2545 \end{Verbatim}
2546 \end{bibexbox}
2547
2548 \begin{tips}\item
2549 Give the court as the \texttt{institution} and the case number as \texttt{number}
2550 (or \texttt{casenumber}).
2551 \end{tips}
2552
2553 It is also possible to achieve a more traditional or
2554 \href{http://www.bailii.org/bailii/citation.html}{neutral citation} format,
2555 similar to Harvard (Bath)'s pre-2024 format:
2556
2557 \begin{bibexbox}<RX>{seldon-v-c.w.j2012}
2558 \emph{Seldon v~Clarkson Wright \& Jakes} [2012] UKSC 16.
2559 \tcblower
2560 \begin{Verbatim}
2561 %</driver>
2562 %<*driver|bib>
2563 @jurisdiction{seldon-v-c.w.j2012,
2564 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
2565 year = {2012},
2566 journal = {UKSC},
2567 pages = {16}}
2568 %</driver|bib>
2569 %<*driver>
2570 \end{Verbatim}
2571 \end{bibexbox}
2572
2573
2574 \begin{info}\item
2575 Generally speaking, in a neutral citation the year should be in square brackets
2576 if it is essential to the citation (unless it is a Scottish case, in which case
2577 it is printed bare), and in parentheses if it is not.
2578 \end{info}
2579 \begin{tips}\item
2580 By default, the style assumes the year is essential if and only if a volume number is
2581 \emph{not} provided; to override this, you can use the \key{year-essential} option:
2582
2583 \begin{tcolorbox}%
2584 [ colframe = Slate
2585 , colback = white
2586 , fontupper = \footnotesize
2587 ]
2588 \begin{Verbatim}
2589 options = {year-essential=true},
2590 \end{Verbatim}
2591 \end{tcolorbox}
2592
2593 To use Scottish style for a case, you can either use the \key{scottish-style} option or
2594 the keyword \texttt{sc}:
2595
2596 \begin{tcolorbox}%
2597 [ colframe = Slate
2598 , colback = white
2599 , fontupper = \footnotesize
2600 ]
2601 \begin{Verbatim}
2602 options = {scottish-style},
2603 keywords = {sc},
2604 \end{Verbatim}
2605 \end{tcolorbox}
2606 \end{tips}
2607
2608 \begin{hacks}\item
2609 This should cover most cases, but legal references tend to enforce their own conventions
2610 no matter what the rest of the reference list is doing,
2611 and it is out of scope for this style to cater for every variation.
2612 Therefore if you need a different format (e.g.~for an American case),
2613 you may prefer to format the reference more-or-less by hand:
2614
2615 \begin{tcolorbox}%
2616 [ colframe = Slate
2617 , colback = white
2618 , fontupper = \footnotesize
2619 ]
2620 \begin{Verbatim}
2621 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
2622 sortyear = {2009},
2623 note = {[2009] EWCA Civ 889}
2624 \end{Verbatim}
2625 \end{tcolorbox}
2626 \end{hacks}
2627
2628
2629 \newrefcontext[sorting=nyt]
2630 \printbibliography[heading=bibnumbered]
2631
2632
2633 \section{Licence}
2634
2635 \begin{markdown}[texComments]
2636 %</driver>
2637 %<readme>
2638 %<readme>## Licence
2639 %<readme>
2640 %<*driver|readme>
2641 Copyright 2016-2026 University of Bath.
2642
2643 This work consists of the documented LaTeX file biblatex-bath.dtx and a Makefile.
2644
2645 The text files contained in this work may be distributed and/or modified
2646 under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
2647 either version 1.3c of this license or (at your option) any later
2648 version.
2649
2650 This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].
2651
2652 [lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
2653 [me]: https://github.com/alex-ball/bathbib "Alex Ball"
2654 %</driver|readme>
2655 %<*driver>
2656 \end{markdown}
2657
2658 \newpage
2659 \lstset
2660 { aboveskip=0pt
2661 , belowskip=0pt
2662 , numbers=left
2663 , numberstyle=\color{gray}\footnotesize\itshape
2664 , firstnumber=last
2665 , basicstyle=\ttfamily\footnotesize
2666 , breaklines=true
2667 }%
2668 \MakeShortVerb{\|}%
2669 \DocInput{\jobname.dtx}
2670
2671 \end{document}
2672 %</driver>
2673 %<*bib>
2674 @book{adams2009tc1,
2675 author = {Adams, Gomez},
2676 year = {2009},
2677 title = {Test Citation One},
2678 address = {London},
2679 publisher = {Imperial College Press}}
2680 @book{adams2014tc2,
2681 author = {Adams, Gomez},
2682 year = {2014},
2683 title = {Test Citation Two},
2684 address = {Oxford},
2685 publisher = {Oxford University Press}}
2686 @book{adams2017tc3,
2687 author = {Adams, Gomez},
2688 year = {2017},
2689 title = {Test Citation Three},
2690 address = {Cambridge},
2691 publisher = {Cambridge University Press}}
2692 @book{jonesNDa,
2693 author = {Jones, John Walter},
2694 title = {Dyfyniad prawf},
2695 address = {Caernarfon},
2696 publisher = {Bwrdd yr Iaith Gymraeg}}
2697 @book{jonesNDb,
2698 author = {Jones, John Walter},
2699 title = {Test citation},
2700 address = {Cardiff},
2701 publisher = {Welsh Language Board}}
2702 @book{wang2018tc,
2703 author = {Wang, John},
2704 title = {Test Citation Four},
2705 year = {2018},
2706 address = {New York},
2707 publisher = {Random House}}
2708 @book{wang2020tc,
2709 author = {Wang, Kathy},
2710 title = {Test Citation Five},
2711 year = {2020},
2712 address = {New York},
2713 publisher = {Random House}}
2714 @book{wang.etal2002tc6,
2715 author = {Wang, John and Jones, John Walter and Stacey, D. and Rogers, T.},
2716 title = {Test Six},
2717 year = {2002},
2718 address = {Bath},
2719 publisher = {Really Decent Books}}
2720 @book{wang.etal2002tc7,
2721 author = {Wang, Kathy and Bloggs, C. and Reilly, T. and Luscott, M.},
2722 title = {Test Seven},
2723 year = {2002},
2724 address = {Bath},
2725 publisher = {Really Decent Books}}
2726 @book{smith.etal2020tc8,
2727 author = {Smith, R. and Taylor, C. and Rogers, T. and Wang, D.},
2728 title = {Test Eight},
2729 year = {2020},
2730 address = {Bath},
2731 publisher = {Bath Publishing}}
2732 @book{smith.etal2020tc9,
2733 author = {Smith, R. and Jones, John Walter and Stacey, D. and Lee, J.},
2734 title = {Test Nine},
2735 year = {2020},
2736 address = {Bath},
2737 publisher = {Bath Publishing}}
2738 %</bib>
2739 %<*bbx>
2740 % \fi
2741 %
2742 % \section{Implementation: bibliography style}
2743 %
2744 % \setcounter{lstnumber}{20}
2745 %
2746 % \subsection{Preliminaries}
2747 %
2748 % For ease of maintenance, we will patch some definitions with \textsf{xpatch}
2749 % instead of writing out our own in full.
2750 %
2751 % \begin{macrocode}
2752 \RequirePackage{etoolbox,xpatch}
2753 % \end{macrocode}
2754 %
2755 % Some string analysis is required.
2756 %
2757 % \begin{macrocode}
2758 \RequirePackage{xstring}
2759 % \end{macrocode}
2760 %
2761 % Language support may be widened in future, but for now we support British and
2762 % American English. Adapted language files have the following suffix:
2763 %
2764 % \begin{macrocode}
2765 \ifcsdef{DeclareLanguageMappingSuffix}{%
2766 \DeclareLanguageMappingSuffix{-bath}
2767 }{%
2768 \DeclareLanguageMapping{english}{english-bath}
2769 \DeclareLanguageMapping{british}{british-bath}
2770 }
2771 % \end{macrocode}
2772 %
2773 % We provide some additional bibliography strings.
2774 %
2775 % \begin{macrocode}
2776 \NewBibliographyString{%
2777 online, hours, at, unpublished, legalchapter,
2778 director, performer, reader, conductor,
2779 directors, performers, readers, conductors,
2780 bydirector, byperformer, byreader, byconductor,
2781 }
2782
2783 % \end{macrocode}
2784 %
2785 % To maintain compatibility with older versions of \textsf{biblatex},
2786 % we backport some newer features if necessary.
2787 %
2788 % \begin{macrocode}
2789 \ifcsdef{letbibmacro}{}{%
2790 \def\letbibmacro#1#2{%
2791 \ifcsundef{abx@macro@#2}
2792 {\blx@error
2793 {Bibliography macro '#2' undefined}
2794 {Use '\string\newbibmacro' to define this macro}}
2795 {\csletcs{abx@macro@#1}{abx@macro@#2}}}
2796 }
2797 \ifcsdef{iflabeldateisdate}{}{%
2798 \def\iflabeldateisdate{%
2799 \ifboolexpr{%
2800 togl {blx@labeldateparts}
2801 and not test {\iffieldundef{labeldatesource}}
2802 and
2803 (test {\iffieldequalstr{labeldatesource}{}}
2804 or test {\iffieldequalstr{labeldatesource}{year}})}}%
2805 }
2806 \ifcsdef{DeclareBiblatexOption}{}{%
2807 \def\DeclareBiblatexOption@II#1[#2]#3[#4]#5{
2808 \IfSubStr#1{global}{\DeclareBibliographyOption[#2]{#3}[#4]{#5}}{}%
2809 \IfSubStr#1{type}{\DeclareTypeOption[#2]{#3}[#4]{#5}}{}%
2810 \IfSubStr#1{entry}{\DeclareEntryOption[#2]{#3}[#4]{#5}}{}}%
2811 \def\DeclareBiblatexOption@I#1[#2]#3#4{\@ifnextchar[%
2812 {\DeclareBiblatexOption@II#1[#2]#3#4}%
2813 {\DeclareBiblatexOption@II#1[#2]#3[]#4}}%
2814 \def\DeclareBiblatexOption#1#2{\@ifnextchar[%
2815 {\DeclareBiblatexOption@I#1#2}%
2816 {\DeclareBiblatexOption@I#1[]#2}}%
2817 }
2818 % \end{macrocode}
2819 %
2820 % This makes \textsf{biblatex} take notice of parentheses, brackets
2821 % and angle brackets when deciding whether to suppress double punctuation.
2822 %
2823 % \begin{macrocode}
2824 \def\blx@setsfcodes{%
2825 \let\blx@setsfcodes\relax
2826 \let\frenchspacing\blx@setfrcodes
2827 \let\nonfrenchspacing\blx@setencodes
2828 \ifnum\sfcode`\.>2000
2829 \blx@setencodes
2830 \else
2831 \blx@setfrcodes
2832 \fi
2833 \@setquotesfcodes
2834 \sfcode`\(=\@m
2835 \sfcode`\)=\@m
2836 \sfcode`\[=\@m
2837 \sfcode`\]=\@m
2838 \sfcode`\<=\@m
2839 \sfcode`\>=\@m}
2840
2841 % \end{macrocode}
2842 %
2843 % \subsection{Standard common toggle options}
2844 %
2845 % These are options provided by all standard styles.
2846 %
2847 % \begin{macrocode}
2848 \newtoggle{bbx:isbn}
2849 \newtoggle{bbx:url}
2850 \newtoggle{bbx:doi}
2851 \newtoggle{bbx:eprint}
2852 \newtoggle{bbx:related}
2853
2854 \DeclareBiblatexOption{global,type,entry}[boolean]{isbn}[true]{%
2855 \settoggle{bbx:isbn}{#1}}
2856 \DeclareBiblatexOption{global,type,entry}[boolean]{url}[true]{%
2857 \settoggle{bbx:url}{#1}}
2858 \DeclareBiblatexOption{global,type,entry}[boolean]{doi}[true]{%
2859 \settoggle{bbx:doi}{#1}}
2860 \DeclareBiblatexOption{global,type,entry}[boolean]{eprint}[true]{%
2861 \settoggle{bbx:eprint}{#1}}
2862 \DeclareBiblatexOption{global,type,entry}[boolean]{related}[true]{%
2863 \settoggle{bbx:related}{#1}}
2864
2865 % \end{macrocode}
2866 %
2867 % \subsection{Author--year specific options}
2868 %
2869 % \subsubsection{Author (label) dashes}
2870 %
2871 % The |dashed| option from the standard author--year style controls whether
2872 % repeated author/editor names are replaced with a dash.
2873 %
2874 % \begin{macrocode}
2875 \newbibmacro*{bbx:savehash}{%
2876 \savefield{fullhash}{\bbx@lasthash}}
2877
2878 \DeclareBibliographyOption[boolean]{dashed}[true]{%
2879 \ifstrequal{#1}{true}
2880 {\ExecuteBibliographyOptions{pagetracker}%
2881 \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}}
2882 {\renewbibmacro*{bbx:savehash}{}}}
2883
2884 % \end{macrocode}
2885 %
2886 % \subsubsection{Date options}
2887 %
2888 % For some resources (ISO standards, Acts of Parliament), the date is part of
2889 % the label and should not be repeated in the date slot. So that this can be
2890 % achieved cleanly by omitting the date, we declare a |nonodate| option that can
2891 % suppress the substitution of the missing date by `n.d.'
2892 %
2893 % \begin{macrocode}
2894 \newtoggle{bbx:nonodate}
2895 \DeclareBiblatexOption{global,type,entry}[boolean]{nonodate}[true]{%
2896 \settoggle{bbx:nonodate}{#1}}
2897
2898 % \end{macrocode}
2899 %
2900 % We allow the date macro to print the time as well.
2901 %
2902 % \begin{macrocode}
2903 \newbibmacro*{bbx:ifmergeddate}{\@secondoftwo}
2904 \renewbibmacro*{date}{%
2905 \usebibmacro{bbx:ifmergeddate}{}{%
2906 \printdate
2907 \setunit*{\bibdatetimesep}%
2908 }%
2909 \printtime}%
2910
2911 % \end{macrocode}
2912 %
2913 % The |mergedate| option controls the format of the date at the head of the
2914 % reference in the |date+extradate| macro, and whether and how the same date is
2915 % displayed later in the |issue+date| macro.
2916 %
2917 % \begin{macrocode}
2918 \providebibmacro*{date+extradate}{}
2919 \newbibmacro*{issue+date}{%
2920 \printtext[parens]{%
2921 \printfield{issue}%
2922 \setunit*{\addspace}%
2923 \usebibmacro{date}}%
2924 \newunit}
2925
2926 % \end{macrocode}
2927 %
2928 % The following are similar to the standard author--year options except they
2929 % respect the |nonodate| option and allow the field format of the date text
2930 % to be configured.
2931 %
2932 % The |maximum| option merges date/issue with date label.
2933 %
2934 % \begin{macrocode}
2935 \def\bbx@opt@mergedate@maximum{%
2936 \renewbibmacro*{date+extradate}{%
2937 \iffieldundef{labelyear}
2938 {}
2939 {\printtext[datelabel]{%
2940 \iflabeldateisdate
2941 {\printfield{issue}%
2942 \setunit*{\addspace}%
2943 \printdateextra}
2944 {\printlabeldateextra}}}}%
2945 \renewbibmacro*{bbx:ifmergeddate}{\iflabeldateisdate}%
2946 \renewbibmacro*{issue+date}{%
2947 \usebibmacro{bbx:ifmergeddate}
2948 {}
2949 {\printtext[parens]{%
2950 \printfield{issue}%
2951 \setunit*{\addspace}%
2952 \printdate}}}}
2953
2954 % \end{macrocode}
2955 %
2956 % The |compact| option merges date with date label.
2957 %
2958 % \begin{macrocode}
2959 \def\bbx@opt@mergedate@compact{%
2960 \renewbibmacro*{date+extradate}{%
2961 \ifboolexpr{
2962 togl {bbx:nonodate}
2963 and not test {\iflabeldateisdate}}
2964 {}
2965 {\printtext[datelabel]{%
2966 \iflabeldateisdate
2967 {\printdateextra}
2968 {\printlabeldateextra}}}}%
2969 \renewbibmacro*{bbx:ifmergeddate}{\iflabeldateisdate}%
2970 \renewbibmacro*{issue+date}{%
2971 \ifboolexpr{test {\usebibmacro{bbx:ifmergeddate}}
2972 and
2973 test {\iffieldundef{issue}}}
2974 {}
2975 {\printtext[parens]{%
2976 \printfield{issue}%
2977 \setunit*{\addspace}%
2978 \usebibmacro{bbx:ifmergeddate}
2979 {}
2980 {\printdate}}}%
2981 \newunit}}
2982
2983 % \end{macrocode}
2984 %
2985 % The |basic| option merges year-only date with date label.
2986 %
2987 % \begin{macrocode}
2988 \def\bbx@opt@mergedate@basic{%
2989 \renewbibmacro*{date+extradate}{%
2990 \ifboolexpr{
2991 togl {bbx:nonodate}
2992 and not test {\iflabeldateisdate}}
2993 {}
2994 {\printtext[datelabel]{\printlabeldateextra}}}%
2995 \renewbibmacro*{bbx:ifmergeddate}{%
2996 \ifboolexpr{
2997 test {\iflabeldateisdate}
2998 and
2999 not test {\ifdateshavedifferentprecision{label}{}}
3000 }%
3001 }%
3002 \renewbibmacro*{issue+date}{%
3003 \ifboolexpr{
3004 test {\usebibmacro{bbx:ifmergeddate}}
3005 and
3006 test {\iffieldundef{issue}}
3007 }
3008 {}
3009 {\printtext[parens]{%
3010 \printfield{issue}%
3011 \setunit*{\addspace}%
3012 \printdate}}%
3013 \newunit}}
3014
3015 % \end{macrocode}
3016 %
3017 % The |minimum| option merges year-only date with year-only date label.
3018 %
3019 % \begin{macrocode}
3020 \def\bbx@opt@mergedate@minimum{%
3021 \renewbibmacro*{date+extradate}{%
3022 \ifboolexpr{
3023 togl {bbx:nonodate}
3024 and not test {\iflabeldateisdate}}
3025 {}
3026 {\printtext[datelabel]{\printlabeldateextra}}}%
3027 \renewbibmacro*{bbx:ifmergeddate}{%
3028 \ifboolexpr{
3029 test {\iflabeldateisdate}
3030 and
3031 not test {\ifdateshavedifferentprecision{label}{}}
3032 and
3033 test {\iffieldundef{extradate}}
3034 }%
3035 }%
3036 \renewbibmacro*{issue+date}{%
3037 \ifboolexpr{
3038 test {\usebibmacro{bbx:ifmergeddate}}
3039 and
3040 test {\iffieldundef{issue}}
3041 }
3042 {}
3043 {\printtext[parens]{%
3044 \printfield{issue}%
3045 \setunit*{\addspace}%
3046 \printdate}}%
3047 \newunit}}
3048
3049 % \end{macrocode}
3050 %
3051 % The |false| option doesn't merge date/issue with date label
3052 %
3053 % \begin{macrocode}
3054 \def\bbx@opt@mergedate@false{%
3055 \renewbibmacro*{date+extradate}{%
3056 \iffieldundef{labelyear}
3057 {}
3058 {\printtext[parens]{\printlabeldateextra}}}%
3059 \renewbibmacro*{bbx:ifmergeddate}{\@secondoftwo}%
3060 \renewbibmacro*{issue+date}{%
3061 \printtext[parens]{%
3062 \printfield{issue}%
3063 \setunit*{\addspace}%
3064 \usebibmacro{date}}%
3065 \newunit}}
3066
3067 % \end{macrocode}
3068 %
3069 % Lastly, here is our new (default) option, which always merges the year, and
3070 % only the year, with the label date. Other date and time componenents are
3071 % displayed later in the reference. Therefore we clear the year from the date
3072 % used for the label, but leave the month and day alone.
3073 %
3074 % \begin{macrocode}
3075 \def\bbx@opt@mergedate@year{%
3076 \renewbibmacro*{date+extradate}{%
3077 \iffieldundef{labelyear}{}{%
3078 \ifboolexpr{
3079 togl {bbx:nonodate}
3080 and
3081 not test {\iflabeldateisdate}
3082 }{}{%
3083 \printtext[datelabel]{\printlabeldateextra}%
3084 }%
3085 \iflabeldateisdate{%
3086 \clearfield{year}%
3087 }{}}}
3088 \ifcsundef{abx@macro@date+extrayear}{}{%
3089 \renewbibmacro*{date+extrayear}{\usebibmacro{date+extradate}}%
3090 }
3091 \renewbibmacro*{issue+date}{%
3092 \iffieldundef{issue}{}{%
3093 \ifboolexpr{(
3094 test {\iffieldundef{volume}}
3095 and
3096 test {\iffieldundef{number}}
3097 ) and
3098 test {\iffieldundef{eid}}
3099 }{%
3100 \newunit
3101 \printfield{issue}%
3102 }{%
3103 \printtext[parens]{%
3104 \printfield{issue}%
3105 }%
3106 }
3107 }%
3108 \setunit{\addcomma\space}%
3109 \printdate
3110 \newunit
3111 }%
3112 }%
3113
3114 \def\bbx@opt@mergedate@true{\bbx@opt@mergedate@year}
3115
3116 % \end{macrocode}
3117 %
3118 % We define the option in terms of the above.
3119 %
3120 % \begin{macrocode}
3121 \DeclareBiblatexOption{global,type,entry}[boolean]{mergedate}[true]{%
3122 \ifcsdef{bbx@opt@mergedate@#1}
3123 {\csuse{bbx@opt@mergedate@#1}}
3124 {\PackageError{biblatex}
3125 {Invalid option 'mergedate=#1'}
3126 {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak
3127 'year', 'true' (=year), and 'false'.}}}
3128
3129 % \end{macrocode}
3130 %
3131 % \subsubsection{Default settings}
3132 %
3133 % Things to note in particular:
3134 % \begin{itemize}
3135 % \item With |@online| entries, the URL is shown even if |url=false|, globally.
3136 % \item With |@letter| entries, the date is written complete at the start of the
3137 % reference.
3138 % \end{itemize}
3139 %
3140 % \begin{macrocode}
3141 \ExecuteBibliographyOptions{isbn,url,doi,eprint,related}
3142 \ExecuteBibliographyOptions{labeldateparts,sorting=nyt,pagetracker,mergedate}
3143 \ExecuteBibliographyOptions{%
3144 maxcitenames=3,maxbibnames=9999,isbn=false,giveninits=true,dashed=false,
3145 alldates=comp,labeldate=year,labelalpha=true}
3146 \ExecuteBibliographyOptions[online]{url=true}
3147 \ExecuteBibliographyOptions[reference,audio,video,music,movie]{%
3148 useeditor=false}
3149 \ExecuteBibliographyOptions[letter]{mergedate=maximum}
3150
3151 % \end{macrocode}
3152 %
3153 % \subsection{Drivers for formatting specific entry types}
3154 %
3155 % \begin{macrocode}
3156 \newbibmacro*{begentry}{}
3157 \newbibmacro*{finentry}{\finentry}
3158
3159 % \end{macrocode}
3160 %
3161 % \subsubsection{Articles}
3162 %
3163 % Compared with the standard styles, the main differences in the driver are the
3164 % omission of `in' and the position of the publication state (which is in the
3165 % |journal+issuetitle| macro).
3166 %
3167 % \begin{macrocode}
3168 \DeclareBibliographyDriver{article}{%
3169 \usebibmacro{bibindex}%
3170 \usebibmacro{begentry}%
3171 \usebibmacro{author/translator+others}%
3172 \setunit{\printdelim{nametitledelim}}\newblock
3173 \usebibmacro{title}%
3174 \newunit\newblock
3175 \usebibmacro{byauthor}%
3176 \newunit\newblock
3177 \usebibmacro{bytranslator+others}%
3178 \newunit
3179 \usebibmacro{byeditor+others}%
3180 \newunit\newblock
3181 \usebibmacro{journal+issuetitle}%
3182 \newunit
3183 \usebibmacro{note+pages}%
3184 \newunit\newblock
3185 \iftoggle{bbx:isbn}
3186 {\printfield{issn}}
3187 {}%
3188 \newunit\newblock
3189 \usebibmacro{doi+eprint+url}%
3190 \newunit\newblock
3191 \printfield{addendum}%
3192 \setunit{\bibpagerefpunct}\newblock
3193 \usebibmacro{pageref}%
3194 \newunit\newblock
3195 \iftoggle{bbx:related}
3196 {\usebibmacro{related:init}%
3197 \usebibmacro{related}}
3198 {}%
3199 \usebibmacro{finentry}}
3200
3201 \DeclareBibliographyDriver{periodical}{%
3202 \usebibmacro{bibindex}%
3203 \usebibmacro{begentry}%
3204 \usebibmacro{editor}%
3205 \setunit{\printdelim{nametitledelim}}\newblock
3206 \usebibmacro{title+issuetitle}%
3207 \newunit\newblock
3208 \usebibmacro{byeditor}%
3209 \newunit\newblock
3210 \printfield{note}%
3211 \newunit\newblock
3212 \iftoggle{bbx:isbn}
3213 {\printfield{issn}}
3214 {}%
3215 \newunit\newblock
3216 \usebibmacro{doi+eprint+url}%
3217 \newunit\newblock
3218 \printfield{addendum}%
3219 \setunit{\bibpagerefpunct}\newblock
3220 \usebibmacro{pageref}%
3221 \newunit\newblock
3222 \iftoggle{bbx:related}
3223 {\usebibmacro{related:init}%
3224 \usebibmacro{related}}
3225 {}%
3226 \usebibmacro{finentry}}
3227
3228 % \end{macrocode}
3229 %
3230 % \subsubsection{Books}
3231 %
3232 % Compared with the standard styles, the main difference is that the series is
3233 % separated by a comma rather than a period. This also affects proceedings and
3234 % certain forms of grey literature.
3235 %
3236 % \begin{macrocode}
3237 \DeclareBibliographyDriver{book}{%
3238 \usebibmacro{bibindex}%
3239 \usebibmacro{begentry}%
3240 \usebibmacro{author/editor+others/translator+others}%
3241 \setunit{\printdelim{nametitledelim}}\newblock
3242 \usebibmacro{maintitle+title}%
3243 \newunit\newblock
3244 \usebibmacro{byauthor}%
3245 \newunit\newblock
3246 \usebibmacro{byeditor+others}%
3247 \newunit\newblock
3248 \printfield{edition}%
3249 \newunit
3250 \iffieldundef{maintitle}
3251 {\printfield{volume}%
3252 \printfield{part}}
3253 {}%
3254 \newunit
3255 \printfield{volumes}%
3256 \setunit{\addcomma\space}%
3257 \usebibmacro{series+number}%
3258 \newunit\newblock
3259 \printfield{note}%
3260 \newunit\newblock
3261 \usebibmacro{publisher+location+date}%
3262 \newunit\newblock
3263 \usebibmacro{chapter+pages}%
3264 \newunit\newblock
3265 \printfield{pubstate}%
3266 \newunit\newblock
3267 \iftoggle{bbx:isbn}
3268 {\printfield{isbn}}
3269 {}%
3270 \newunit\newblock
3271 \usebibmacro{doi+eprint+url}%
3272 \newunit\newblock
3273 \printfield{addendum}%
3274 \setunit{\bibpagerefpunct}\newblock
3275 \usebibmacro{pageref}%
3276 \newunit\newblock
3277 \iftoggle{bbx:related}
3278 {\usebibmacro{related:init}%
3279 \usebibmacro{related}}
3280 {}%
3281 \usebibmacro{finentry}}
3282
3283 \DeclareBibliographyDriver{collection}{%
3284 \usebibmacro{bibindex}%
3285 \usebibmacro{begentry}%
3286 \usebibmacro{editor+others}%
3287 \setunit{\printdelim{nametitledelim}}\newblock
3288 \usebibmacro{maintitle+title}%
3289 \newunit\newblock
3290 \usebibmacro{byeditor+others}%
3291 \newunit\newblock
3292 \printfield{edition}%
3293 \newunit
3294 \iffieldundef{maintitle}
3295 {\printfield{volume}%
3296 \printfield{part}}
3297 {}%
3298 \newunit
3299 \printfield{volumes}%
3300 \setunit{\addcomma\space}%
3301 \usebibmacro{series+number}%
3302 \newunit\newblock
3303 \printfield{note}%
3304 \newunit\newblock
3305 \usebibmacro{publisher+location+date}%
3306 \newunit\newblock
3307 \usebibmacro{chapter+pages}%
3308 \newunit\newblock
3309 \printfield{pubstate}%
3310 \newunit\newblock
3311 \iftoggle{bbx:isbn}
3312 {\printfield{isbn}}
3313 {}%
3314 \newunit\newblock
3315 \usebibmacro{doi+eprint+url}%
3316 \newunit\newblock
3317 \printfield{addendum}%
3318 \setunit{\bibpagerefpunct}\newblock
3319 \usebibmacro{pageref}%
3320 \newunit\newblock
3321 \iftoggle{bbx:related}
3322 {\usebibmacro{related:init}%
3323 \usebibmacro{related}}
3324 {}%
3325 \usebibmacro{finentry}}
3326
3327 \DeclareBibliographyDriver{proceedings}{%
3328 \usebibmacro{bibindex}%
3329 \usebibmacro{begentry}%
3330 \usebibmacro{editor+others}%
3331 \setunit{\printdelim{nametitledelim}}\newblock
3332 \usebibmacro{maintitle+title}%
3333 \newunit\newblock
3334 \usebibmacro{byeditor+others}%
3335 \newunit\newblock
3336 \iffieldundef{maintitle}
3337 {\printfield{volume}%
3338 \printfield{part}}
3339 {}%
3340 \newunit
3341 \printfield{volumes}%
3342 \setunit{\addcomma\space}%
3343 \usebibmacro{series+number}%
3344 \newunit\newblock
3345 \usebibmacro{event+venue+date}%
3346 \newunit\newblock
3347 \printfield{note}%
3348 \newunit\newblock
3349 \printlist{organization}%
3350 \newunit
3351 \usebibmacro{publisher+location+date}%
3352 \newunit\newblock
3353 \usebibmacro{chapter+pages}%
3354 \newunit\newblock
3355 \printfield{pubstate}%
3356 \newunit\newblock
3357 \iftoggle{bbx:isbn}
3358 {\printfield{isbn}}
3359 {}%
3360 \newunit\newblock
3361 \usebibmacro{doi+eprint+url}%
3362 \newunit\newblock
3363 \printfield{addendum}%
3364 \setunit{\bibpagerefpunct}\newblock
3365 \usebibmacro{pageref}%
3366 \newunit\newblock
3367 \iftoggle{bbx:related}
3368 {\usebibmacro{related:init}%
3369 \usebibmacro{related}}
3370 {}%
3371 \usebibmacro{finentry}}
3372
3373 % \end{macrocode}
3374 %
3375 % \subsubsection{Works in collections}
3376 %
3377 % Compared with the standard styles, the main difference is that the editors
3378 % precede the book title.
3379 %
3380 % \begin{macrocode}
3381 \DeclareBibliographyDriver{inbook}{%
3382 \usebibmacro{bibindex}%
3383 \usebibmacro{begentry}%
3384 \usebibmacro{author/translator+others}%
3385 \setunit{\printdelim{nametitledelim}}\newblock
3386 \usebibmacro{title}%
3387 \newunit\newblock
3388 \usebibmacro{byauthor}%
3389 \newunit\newblock
3390 \usebibmacro{in:}%
3391 \usebibmacro{bybookauthor}%
3392 \newunit\newblock
3393 \usebibmacro{maintitle+booktitle}%
3394 \newunit\newblock
3395 \usebibmacro{byeditor+others}%
3396 \newunit\newblock
3397 \printfield{edition}%
3398 \newunit
3399 \iffieldundef{maintitle}
3400 {\printfield{volume}%
3401 \printfield{part}}
3402 {}%
3403 \newunit
3404 \printfield{volumes}%
3405 \setunit{\addcomma\space}%
3406 \usebibmacro{series+number}%
3407 \newunit\newblock
3408 \printfield{note}%
3409 \newunit\newblock
3410 \usebibmacro{publisher+location+date}%
3411 \newunit\newblock
3412 \usebibmacro{chapter+pages}%
3413 \newunit\newblock
3414 \printfield{pubstate}%
3415 \newunit\newblock
3416 \iftoggle{bbx:isbn}
3417 {\printfield{isbn}}
3418 {}%
3419 \newunit\newblock
3420 \usebibmacro{doi+eprint+url}%
3421 \newunit\newblock
3422 \printfield{addendum}%
3423 \setunit{\bibpagerefpunct}\newblock
3424 \usebibmacro{pageref}%
3425 \newunit\newblock
3426 \iftoggle{bbx:related}
3427 {\usebibmacro{related:init}%
3428 \usebibmacro{related}}
3429 {}%
3430 \usebibmacro{finentry}}
3431
3432 \DeclareBibliographyDriver{incollection}{%
3433 \usebibmacro{bibindex}%
3434 \usebibmacro{begentry}%
3435 \usebibmacro{author/translator+others}%
3436 \setunit{\printdelim{nametitledelim}}\newblock
3437 \usebibmacro{title}%
3438 \newunit\newblock
3439 \usebibmacro{byauthor}%
3440 \newunit\newblock
3441 \usebibmacro{in:}%
3442 \usebibmacro{bookeditor}%
3443 \newunit\newblock
3444 \usebibmacro{maintitle+booktitle}%
3445 \usebibmacro{byeditor+others}%
3446 \newunit\newblock
3447 \printfield{edition}%
3448 \newunit
3449 \iffieldundef{maintitle}
3450 {\printfield{volume}%
3451 \printfield{part}}
3452 {}%
3453 \newunit
3454 \printfield{volumes}%
3455 \setunit{\addcomma\space}%
3456 \usebibmacro{series+number}%
3457 \newunit\newblock
3458 \printfield{note}%
3459 \newunit\newblock
3460 \usebibmacro{publisher+location+date}%
3461 \newunit\newblock
3462 \usebibmacro{chapter+pages}%
3463 \newunit\newblock
3464 \printfield{pubstate}%
3465 \newunit\newblock
3466 \iftoggle{bbx:isbn}
3467 {\printfield{isbn}}
3468 {}%
3469 \newunit\newblock
3470 \usebibmacro{doi+eprint+url}%
3471 \newunit\newblock
3472 \printfield{addendum}%
3473 \setunit{\bibpagerefpunct}\newblock
3474 \usebibmacro{pageref}%
3475 \newunit\newblock
3476 \iftoggle{bbx:related}
3477 {\usebibmacro{related:init}%
3478 \usebibmacro{related}}
3479 {}%
3480 \usebibmacro{finentry}}
3481
3482 \DeclareBibliographyDriver{inproceedings}{%
3483 \usebibmacro{bibindex}%
3484 \usebibmacro{begentry}%
3485 \usebibmacro{author/translator+others}%
3486 \setunit{\printdelim{nametitledelim}}\newblock
3487 \usebibmacro{title}%
3488 \newunit\newblock
3489 \usebibmacro{byauthor}%
3490 \newunit\newblock
3491 \ifnameundef{editor}{}{\usebibmacro{in:}}%
3492 \usebibmacro{bookeditor}%
3493 \newunit\newblock
3494 \usebibmacro{maintitle+booktitle}%
3495 \usebibmacro{byeditor+others}%
3496 \newunit\newblock
3497 \iffieldundef{maintitle}
3498 {\printfield{volume}%
3499 \printfield{part}}
3500 {}%
3501 \newunit
3502 \printfield{volumes}%
3503 \setunit{\addcomma\space}%
3504 \usebibmacro{series+number}%
3505 \newunit\newblock
3506 \usebibmacro{event+venue+date}%
3507 \newunit\newblock
3508 \printfield{note}%
3509 \newunit\newblock
3510 \printlist{organization}%
3511 \newunit
3512 \usebibmacro{publisher+location+date}%
3513 \newunit\newblock
3514 \usebibmacro{chapter+pages}%
3515 \newunit\newblock
3516 \printfield{pubstate}%
3517 \newunit\newblock
3518 \iftoggle{bbx:isbn}
3519 {\printfield{isbn}}
3520 {}%
3521 \newunit\newblock
3522 \usebibmacro{doi+eprint+url}%
3523 \newunit\newblock
3524 \printfield{addendum}%
3525 \setunit{\bibpagerefpunct}\newblock
3526 \usebibmacro{pageref}%
3527 \newunit\newblock
3528 \iftoggle{bbx:related}
3529 {\usebibmacro{related:init}%
3530 \usebibmacro{related}}
3531 {}%
3532 \usebibmacro{finentry}}
3533
3534 % \end{macrocode}
3535 %
3536 % \subsubsection{Entries in reference works}
3537 %
3538 % In these cases, the title is moved after the edition information.
3539 %
3540 % \begin{macrocode}
3541 \DeclareBibliographyDriver{inreference}{%
3542 \usebibmacro{bibindex}%
3543 \usebibmacro{begentry}%
3544 \usebibmacro{author/translator+others}%
3545 \setunit{\printdelim{nametitledelim}}\newblock
3546 \ifnameundef{author}{}{%
3547 \usebibmacro{title}}%
3548 \newunit\newblock
3549 \usebibmacro{byauthor}%
3550 \newunit\newblock
3551 \ifboolexpr{
3552 test {\iffieldundef{maintitle}}
3553 and
3554 test {\iffieldundef{booktitle}}
3555 }{}{%
3556 \ifnameundef{editor}{}{\usebibmacro{in:}}%
3557 \usebibmacro{bookeditor}%
3558 \newunit\newblock
3559 \usebibmacro{maintitle+booktitle}}%
3560 \usebibmacro{byeditor+others}%
3561 \newunit\newblock
3562 \printfield{edition}%
3563 \newunit
3564 \iffieldundef{maintitle}
3565 {\printfield{volume}%
3566 \printfield{part}}
3567 {}%
3568 \newunit
3569 \ifnameundef{author}{\usebibmacro{title}%
3570 \newunit}{}%
3571 \printfield{volumes}%
3572 \setunit{\addcomma\space}%
3573 \usebibmacro{series+number}%
3574 \newunit\newblock
3575 \printfield{note}%
3576 \newunit\newblock
3577 \usebibmacro{publisher+location+date}%
3578 \newunit\newblock
3579 \usebibmacro{chapter+pages}%
3580 \newunit\newblock
3581 \printfield{pubstate}%
3582 \newunit\newblock
3583 \iftoggle{bbx:isbn}
3584 {\printfield{isbn}}
3585 {}%
3586 \newunit\newblock
3587 \usebibmacro{doi+eprint+url}%
3588 \newunit\newblock
3589 \printfield{addendum}%
3590 \setunit{\bibpagerefpunct}\newblock
3591 \usebibmacro{pageref}%
3592 \newunit\newblock
3593 \iftoggle{bbx:related}
3594 {\usebibmacro{related:init}%
3595 \usebibmacro{related}}
3596 {}%
3597 \usebibmacro{finentry}}
3598
3599 % \end{macrocode}
3600 %
3601 % \subsubsection{Datasets}
3602 %
3603 % The main difference from the standard driver is the use of the |library| macro.
3604 %
3605 % \begin{macrocode}
3606 \DeclareBibliographyDriver{dataset}{%
3607 \usebibmacro{bibindex}%
3608 \usebibmacro{begentry}%
3609 \usebibmacro{author/editor+others/translator+others}%
3610 \setunit{\printdelim{nametitledelim}}\newblock
3611 \usebibmacro{title}%
3612 \newunit\newblock
3613 \usebibmacro{byauthor}%
3614 \newunit\newblock
3615 \usebibmacro{byeditor+others}%
3616 \newunit\newblock
3617 \printfield{type}%
3618 \newunit
3619 \printfield{edition}%
3620 \setunit{\addcomma\space}%
3621 \usebibmacro{series+number}%
3622 \newunit\newblock
3623 \printfield{note}%
3624 \newunit\newblock
3625 \usebibmacro{library}%
3626 \newunit\newblock
3627 \usebibmacro{organization+location+date}%
3628 \newunit\newblock
3629 \printfield{pubstate}%
3630 \newunit\newblock
3631 \usebibmacro{doi+eprint+url}%
3632 \newunit\newblock
3633 \printfield{addendum}%
3634 \setunit{\bibpagerefpunct}\newblock
3635 \usebibmacro{pageref}%
3636 \newunit\newblock
3637 \iftoggle{bbx:related}
3638 {\usebibmacro{related:init}%
3639 \usebibmacro{related}}
3640 {}%
3641 \usebibmacro{finentry}}
3642
3643 % \end{macrocode}
3644 %
3645 % \subsubsection{Software}
3646 %
3647 % The driver for software entries is based on |misc|. The main difference is in
3648 % how the type is printed.
3649 %
3650 % \begin{macrocode}
3651 \DeclareBibliographyDriver{software}{%
3652 \usebibmacro{bibindex}%
3653 \usebibmacro{begentry}%
3654 \usebibmacro{author/editor+others/translator+others}%
3655 \setunit{\printdelim{nametitledelim}}\newblock
3656 \usebibmacro{title}%
3657 \setunit{\addspace}
3658 \printfield{type}%
3659 \newunit\newblock
3660 \usebibmacro{byauthor}%
3661 \newunit\newblock
3662 \usebibmacro{byeditor+others}%
3663 \newunit\newblock
3664 \printfield{howpublished}%
3665 \newunit\newblock
3666 \printfield{note}%
3667 \newunit\newblock
3668 \usebibmacro{organization+location+date}%
3669 \newunit\newblock
3670 \printfield{pubstate}%
3671 \newunit\newblock
3672 \usebibmacro{doi+eprint+url}%
3673 \newunit\newblock
3674 \printfield{addendum}%
3675 \setunit{\bibpagerefpunct}\newblock
3676 \usebibmacro{pageref}%
3677 \newunit\newblock
3678 \iftoggle{bbx:related}
3679 {\usebibmacro{related:init}%
3680 \usebibmacro{related}}
3681 {}%
3682 \usebibmacro{finentry}}
3683
3684 % \end{macrocode}
3685 %
3686 % \subsubsection{Manuals}
3687 %
3688 % The \texttt{manual} driver is useful for a variety of technical publications,
3689 % such as standards, patents and maps. (Patents have their own driver, in fact,
3690 % but we set things up so the \texttt{manual} driver can be used instead if
3691 % needed for compatibility.) We use specialist macros for the type/number and
3692 % publication block.
3693 %
3694 % \begin{macrocode}
3695 \DeclareBibliographyDriver{manual}{%
3696 \usebibmacro{bibindex}%
3697 \usebibmacro{begentry}%
3698 \usebibmacro{author/editor}%
3699 \setunit{\printdelim{nametitledelim}}\newblock
3700 \usebibmacro{title}%
3701 \newunit\newblock
3702 \usebibmacro{byauthor}%
3703 \newunit\newblock
3704 \usebibmacro{byeditor}%
3705 \newunit\newblock
3706 \printfield{edition}%
3707 \usebibmacro{manual:series+type+number}%
3708 \newunit
3709 \printfield{note}%
3710 \newunit\newblock
3711 \usebibmacro{organization+location+date}%
3712 \newunit\newblock
3713 \usebibmacro{chapter+pages}%
3714 \newunit\newblock
3715 \printfield{pubstate}%
3716 \newunit\newblock
3717 \iftoggle{bbx:isbn}
3718 {\printfield{isbn}}
3719 {}%
3720 \newunit\newblock
3721 \usebibmacro{doi+eprint+url}%
3722 \newunit\newblock
3723 \printfield{addendum}%
3724 \setunit{\bibpagerefpunct}\newblock
3725 \usebibmacro{pageref}%
3726 \newunit\newblock
3727 \iftoggle{bbx:related}
3728 {\usebibmacro{related:init}%
3729 \usebibmacro{related}}
3730 {}%
3731 \usebibmacro{finentry}}
3732
3733 % \end{macrocode}
3734 %
3735 % \subsubsection{Patents}
3736 %
3737 % \begin{macrocode}
3738 \DeclareBibliographyDriver{patent}{%
3739 \usebibmacro{bibindex}%
3740 \usebibmacro{begentry}%
3741 \usebibmacro{author}%
3742 \setunit{\printdelim{nametitledelim}}\newblock
3743 \usebibmacro{title}%
3744 \newunit\newblock
3745 \usebibmacro{byauthor}%
3746 \newunit\newblock
3747 \printfield{type}%
3748 \setunit*{\addspace}%
3749 \printfield{number}%
3750 \iflistundef{location}
3751 {}
3752 {\setunit*{\addspace}%
3753 \printtext[parens]{%
3754 \printlist[][-\value{listtotal}]{location}}}%
3755 \newunit\newblock
3756 \usebibmacro{byholder}%
3757 \newunit\newblock
3758 \printfield{note}%
3759 \newunit\newblock
3760 \usebibmacro{date}%
3761 \newunit\newblock
3762 \usebibmacro{doi+eprint+url}%
3763 \newunit\newblock
3764 \printfield{addendum}%
3765 \setunit{\bibpagerefpunct}\newblock
3766 \usebibmacro{pageref}%
3767 \newunit\newblock
3768 \iftoggle{bbx:related}
3769 {\usebibmacro{related:init}%
3770 \usebibmacro{related}}
3771 {}%
3772 \usebibmacro{finentry}}
3773
3774
3775 % \end{macrocode}
3776 %
3777 % \subsubsection{Online works}
3778 %
3779 % Compared with the standard styles, the main difference is that the
3780 % organization's address is printed and we support the |library| macro.
3781 %
3782 % \begin{macrocode}
3783 \DeclareBibliographyDriver{online}{%
3784 \usebibmacro{bibindex}%
3785 \usebibmacro{begentry}%
3786 \usebibmacro{author/editor+others/translator+others}%
3787 \setunit{\printdelim{nametitledelim}}\newblock
3788 \usebibmacro{title}%
3789 \newunit\newblock
3790 \usebibmacro{byauthor}%
3791 \newunit\newblock
3792 \usebibmacro{byeditor+others}%
3793 \newunit
3794 \printfield{note}%
3795 \newunit\newblock
3796 \usebibmacro{library}%
3797 \newunit\newblock
3798 \usebibmacro{organization+location+date}%
3799 \newunit\newblock
3800 \printfield{pubstate}%
3801 \newunit\newblock
3802 \usebibmacro{doi+eprint+url}%
3803 \newunit\newblock
3804 \printfield{addendum}%
3805 \setunit{\bibpagerefpunct}\newblock
3806 \usebibmacro{pageref}%
3807 \newunit\newblock
3808 \iftoggle{bbx:related}
3809 {\usebibmacro{related:init}%
3810 \usebibmacro{related}}
3811 {}%
3812 \usebibmacro{finentry}}
3813
3814 % \end{macrocode}
3815 %
3816 % \subsubsection{Reports}
3817 %
3818 % Compared with the standard styles, the main differences are that we use a
3819 % special macro for printing the |type|, |series| and |number| in parentheses,
3820 % and we support the |library| field.
3821 %
3822 % \begin{macrocode}
3823 %t
3824 \DeclareBibliographyDriver{report}{%
3825 \usebibmacro{bibindex}%
3826 \usebibmacro{begentry}%
3827 \usebibmacro{author}%
3828 \setunit{\printdelim{nametitledelim}}\newblock
3829 \usebibmacro{title}%
3830 \newunit\newblock
3831 \usebibmacro{byauthor}%
3832 \newunit\newblock
3833 \usebibmacro{series+type+number}%
3834 \newunit\newblock
3835 \printfield{note}%
3836 \newunit\newblock
3837 \usebibmacro{institution+location+date}%
3838 \newunit\newblock
3839 \usebibmacro{chapter+pages}%
3840 \newunit\newblock
3841 \printfield{pubstate}%
3842 \newunit\newblock
3843 \iftoggle{bbx:isbn}
3844 {\printfield{isrn}}
3845 {}%
3846 \newunit\newblock
3847 \usebibmacro{library}%
3848 \newunit\newblock
3849 \usebibmacro{doi+eprint+url}%
3850 \newunit\newblock
3851 \printfield{addendum}%
3852 \setunit{\bibpagerefpunct}\newblock
3853 \usebibmacro{pageref}%
3854 \newunit\newblock
3855 \iftoggle{bbx:related}
3856 {\usebibmacro{related:init}%
3857 \usebibmacro{related}}
3858 {}%
3859 \usebibmacro{finentry}}
3860
3861 % \end{macrocode}
3862 %
3863 % \subsubsection{Theses}
3864 %
3865 % \begin{macrocode}
3866 \DeclareBibliographyDriver{thesis}{%
3867 \usebibmacro{bibindex}%
3868 \usebibmacro{begentry}%
3869 \usebibmacro{author}%
3870 \setunit{\printdelim{nametitledelim}}\newblock
3871 \usebibmacro{title}%
3872 \newunit\newblock
3873 \usebibmacro{byauthor}%
3874 \newunit\newblock
3875 \printfield{note}%
3876 \newunit\newblock
3877 \printfield{type}%
3878 \newunit
3879 \usebibmacro{institution+location+date}%
3880 \newunit\newblock
3881 \usebibmacro{chapter+pages}%
3882 \newunit\newblock
3883 \printfield{pubstate}%
3884 \newunit\newblock
3885 \iftoggle{bbx:isbn}
3886 {\printfield{isbn}}
3887 {}%
3888 \newunit\newblock
3889 \usebibmacro{doi+eprint+url}%
3890 \newunit\newblock
3891 \printfield{addendum}%
3892 \setunit{\bibpagerefpunct}\newblock
3893 \usebibmacro{pageref}%
3894 \newunit\newblock
3895 \iftoggle{bbx:related}
3896 {\usebibmacro{related:init}%
3897 \usebibmacro{related}}
3898 {}%
3899 \usebibmacro{finentry}}
3900
3901 % \end{macrocode}
3902 %
3903 % \subsubsection{Audiovisual materials}
3904 %
3905 % The \texttt{audio} and \texttt{video} drivers are based on \texttt{misc}.
3906 %
3907 % \begin{macrocode}
3908 \DeclareBibliographyDriver{audio}{%
3909 \usebibmacro{bibindex}%
3910 \usebibmacro{begentry}%
3911 \usebibmacro{author/editor+others/translator+others}%
3912 \setunit{\printdelim{nametitledelim}}\newblock
3913 \usebibmacro{title}%
3914 \newunit\newblock
3915 \usebibmacro{series+number}%
3916 \ifboolexpr{
3917 test {\iffieldequalstr{type}{TV}}
3918 or
3919 test {\iffieldequalstr{type}{Radio}}
3920 }{%
3921 \setunit{\addspace}%
3922 \usebibmacro{isonline}}{}%
3923 \newunit\newblock
3924 \printfield{type}%
3925 \newunit\newblock
3926 \usebibmacro{byauthor}[given-family:full]%
3927 \newunit\newblock
3928 \usebibmacro{byeditor+others}[given-family:full]%
3929 \newunit\newblock
3930 \printfield{howpublished}%
3931 \newunit\newblock
3932 \printfield{note}%
3933 \newunit\newblock
3934 \usebibmacro{publisher+location+date}%
3935 \newunit\newblock
3936 \printfield{pubstate}%
3937 \newunit\newblock
3938 \usebibmacro{doi+eprint+url}%
3939 \newunit\newblock
3940 \printfield{addendum}%
3941 \setunit{\bibpagerefpunct}\newblock
3942 \usebibmacro{pageref}%
3943 \newunit\newblock
3944 \iftoggle{bbx:related}
3945 {\usebibmacro{related:init}%
3946 \usebibmacro{related}}
3947 {}%
3948 \usebibmacro{finentry}}
3949
3950 % \end{macrocode}
3951 %
3952 % \subsubsection{Images}
3953 %
3954 % The driver for image is based on misc. The main difference is the
3955 % support for the \texttt{library} field.
3956 %
3957 % \begin{macrocode}
3958 \DeclareBibliographyDriver{image}{%
3959 \usebibmacro{bibindex}%
3960 \usebibmacro{begentry}%
3961 \usebibmacro{author/editor+others/translator+others}%
3962 \setunit{\printdelim{nametitledelim}}\newblock
3963 \usebibmacro{title}%
3964 \newunit\newblock
3965 \usebibmacro{byauthor}%
3966 \newunit\newblock
3967 \usebibmacro{byeditor+others}%
3968 \newunit\newblock
3969 \printfield{howpublished}%
3970 \newunit\newblock
3971 \printfield{type}%
3972 \newunit
3973 \printfield{note}%
3974 \newunit\newblock
3975 \usebibmacro{collection+shelfmark}%
3976 \newunit\newblock
3977 \usebibmacro{organization+location+date+library}%
3978 \newunit\newblock
3979 \printfield{pubstate}%
3980 \newunit\newblock
3981 \usebibmacro{doi+eprint+url}%
3982 \newunit\newblock
3983 \printfield{addendum}%
3984 \setunit{\bibpagerefpunct}\newblock
3985 \usebibmacro{pageref}%
3986 \newunit\newblock
3987 \iftoggle{bbx:related}
3988 {\usebibmacro{related:init}%
3989 \usebibmacro{related}}
3990 {}%
3991 \usebibmacro{finentry}}
3992
3993 % \end{macrocode}
3994 %
3995 % \subsubsection{Case reports}
3996 %
3997 % \begin{macrocode}
3998 \DeclareBibliographyDriver{jurisdiction}{%
3999 \savebibmacro{title}%
4000 \xapptobibmacro{labeltitle}{%
4001 \setunit*{\addspace}%
4002 \usebibmacro{casenumber}%
4003 }{}{}%
4004 \usebibmacro{bibindex}%
4005 \usebibmacro{begentry}%
4006 \usebibmacro{eucheck}%
4007 \usebibmacro{author}%
4008 \setunit{\printdelim{nametitledelim}}\newblock
4009 \usebibmacro{title}%
4010 \newunit\newblock
4011 \usebibmacro{byauthor}%
4012 \newunit\newblock
4013 \printfield{note}%
4014 \setunit{\addspace}%
4015 \usebibmacro{reporter}%
4016 \newunit\newblock
4017 \iftoggle{bbx:isbn}
4018 {\printfield{isrn}}
4019 {}%
4020 \newunit\newblock
4021 \usebibmacro{doi+eprint+url}%
4022 \newunit\newblock
4023 \printfield{addendum}%
4024 \setunit{\bibpagerefpunct}\newblock
4025 \usebibmacro{pageref}%
4026 \newunit\newblock
4027 \iftoggle{bbx:related}
4028 {\usebibmacro{related:init}%
4029 \usebibmacro{related}}
4030 {}%
4031 \usebibmacro{finentry}%
4032 \restorebibmacro{title}}
4033
4034 % \end{macrocode}
4035 %
4036 % \subsubsection{Legislation}
4037 %
4038 % \begin{macrocode}
4039 \DeclareBibliographyDriver{legislation}{%
4040 \usebibmacro{bibindex}%
4041 \usebibmacro{begentry}%
4042 \usebibmacro{eucheck}%
4043 \usebibmacro{author}%
4044 \setunit{\printdelim{nametitledelim}}\newblock
4045 \usebibmacro{title}%
4046 \newunit\newblock
4047 \usebibmacro{byauthor}%
4048 \newunit\newblock
4049 \usebibmacro{journal+series+volume+number+chapter+pages}
4050 \newunit\newblock
4051 \printfield{note}%
4052 \newunit\newblock
4053 \usebibmacro{institution+location+date}%
4054 \newunit\newblock
4055 \printfield{pubstate}%
4056 \newunit\newblock
4057 \iftoggle{bbx:isbn}
4058 {\printfield{isrn}}
4059 {}%
4060 \newunit\newblock
4061 \usebibmacro{doi+eprint+url}%
4062 \newunit\newblock
4063 \printfield{addendum}%
4064 \setunit{\bibpagerefpunct}\newblock
4065 \usebibmacro{pageref}%
4066 \newunit\newblock
4067 \iftoggle{bbx:related}
4068 {\usebibmacro{related:init}%
4069 \usebibmacro{related}}
4070 {}%
4071 \usebibmacro{finentry}}
4072 % \end{macrocode}
4073 %
4074 % \subsubsection{Parliamentary debates}
4075 %
4076 % This entry type is currently only used for parliamentary debates, but will be
4077 % used for treaties and explanatory notes on legislation should these ever be
4078 % included in the Harvard (Bath) specification, with treaties being the default
4079 % (since that's what upstream \textsf{biblatex} gives as an example). The test
4080 % for subtype is therefore future-proofing.
4081 %
4082 % \begin{macrocode}
4083 \newcommand*{\explanatorynote}{explanatory note}
4084 \newcommand*{\parliamentarytype}{parliamentary}
4085 \DeclareBibliographyDriver{legal}{%
4086 \usebibmacro{bibindex}%
4087 \usebibmacro{begentry}%
4088 \iffieldequals{entrysubtype}{\explanatorynote}{%
4089 \printfield[default]{title}%
4090 \setunit{\addspace}\newblock
4091 }{%
4092 \usebibmacro{legal:parliamentary}%
4093 \setunit{\addcomma\space}\newblock
4094 }%
4095 \usebibmacro{byauthor}%
4096 \newunit\newblock
4097 \printfield[default]{note}%
4098 \setunit{\addspace}\newblock
4099 \newunit\newblock
4100 \usebibmacro{doi+eprint+url}%
4101 \newunit\newblock
4102 \printfield{addendum}%
4103 \setunit{\bibpagerefpunct}\newblock
4104 \usebibmacro{pageref}%
4105 \newunit\newblock
4106 \iftoggle{bbx:related}
4107 {\usebibmacro{related:init}%
4108 \usebibmacro{related}}
4109 {}%
4110 \usebibmacro{finentry}}
4111 \newbibmacro{legal:parliamentary}{%
4112 \usebibmacro{author}%
4113 \setunit{\printdelim{nametitledelim}}\newblock
4114 \usebibmacro{title}%
4115 \newunit\newblock
4116 \usebibmacro{journal+issuetitle}%
4117 \setunit{\addcomma\space}%
4118 \printeventdate}
4119
4120 % \end{macrocode}
4121 %
4122 % \subsubsection{Unpublished and miscellaneous works}
4123 %
4124 % \begin{macrocode}
4125 \DeclareBibliographyDriver{booklet}{%
4126 \usebibmacro{bibindex}%
4127 \usebibmacro{begentry}%
4128 \usebibmacro{author/editor+others/translator+others}%
4129 \setunit{\printdelim{nametitledelim}}\newblock
4130 \usebibmacro{title}%
4131 \newunit\newblock
4132 \usebibmacro{byauthor}%
4133 \newunit\newblock
4134 \usebibmacro{byeditor+others}%
4135 \newunit\newblock
4136 \printfield{howpublished}%
4137 \newunit\newblock
4138 \printfield{type}%
4139 \newunit\newblock
4140 \printfield{note}%
4141 \usebibmacro{collection+shelfmark}%
4142 \newunit\newblock
4143 \usebibmacro{organization+location+date+library}%
4144 \newunit\newblock
4145 \usebibmacro{chapter+pages}%
4146 \newunit\newblock
4147 \printfield{pubstate}%
4148 \newunit\newblock
4149 \usebibmacro{doi+eprint+url}%
4150 \newunit\newblock
4151 \printfield{addendum}%
4152 \setunit{\bibpagerefpunct}\newblock
4153 \usebibmacro{pageref}%
4154 \newunit\newblock
4155 \iftoggle{bbx:related}
4156 {\usebibmacro{related:init}%
4157 \usebibmacro{related}}
4158 {}%
4159 \usebibmacro{finentry}}
4160
4161 % \end{macrocode}
4162 %
4163 % The letter driver is used for emails. It is based loosely on the one for
4164 % articles. The particular foible with this type is that the date must be
4165 % printed complete at the start.
4166 %
4167 % \begin{macrocode}
4168 \DeclareBibliographyDriver{letter}{%
4169 \usebibmacro{bibindex}%
4170 \usebibmacro{begentry}%
4171 \usebibmacro{author/translator+others}%
4172 \setunit{\printdelim{nametitledelim}}\newblock
4173 \usebibmacro{title}%
4174 \newunit\newblock
4175 \usebibmacro{byauthor}%
4176 \newunit\newblock
4177 \usebibmacro{bytranslator+others}%
4178 \newunit\newblock
4179 \usebibmacro{journal+issuetitle}%
4180 \newunit\newblock
4181 \printfield{howpublished}%
4182 \newunit
4183 \printfield{note}%
4184 \newunit\newblock
4185 \usebibmacro{collection+shelfmark}%
4186 \newunit\newblock
4187 \usebibmacro{organization+location+date+library}%
4188 \newunit\newblock
4189 \printfield{pubstate}%
4190 \newunit\newblock
4191 \usebibmacro{doi+eprint+url}%
4192 \newunit\newblock
4193 \printfield{addendum}%
4194 \setunit{\bibpagerefpunct}\newblock
4195 \usebibmacro{pageref}%
4196 \newunit\newblock
4197 \iftoggle{bbx:related}
4198 {\usebibmacro{related:init}%
4199 \usebibmacro{related}}
4200 {}%
4201 \usebibmacro{finentry}}
4202
4203 \DeclareBibliographyDriver{misc}{%
4204 \usebibmacro{bibindex}%
4205 \usebibmacro{begentry}%
4206 \usebibmacro{author/editor+others/translator+others}%
4207 \setunit{\printdelim{nametitledelim}}\newblock
4208 \usebibmacro{title}%
4209 \newunit\newblock
4210 \usebibmacro{byauthor}%
4211 \newunit\newblock
4212 \usebibmacro{byeditor+others}%
4213 \newunit\newblock
4214 \printfield{howpublished}%
4215 \newunit\newblock
4216 \printfield{type}%
4217 \newunit
4218 \printfield{note}%
4219 \newunit\newblock
4220 \usebibmacro{collection+shelfmark}%
4221 \newunit\newblock
4222 \usebibmacro{organization+location+date+library}%
4223 \newunit\newblock
4224 \printfield{pubstate}%
4225 \newunit\newblock
4226 \usebibmacro{doi+eprint+url}%
4227 \newunit\newblock
4228 \printfield{addendum}%
4229 \setunit{\bibpagerefpunct}\newblock
4230 \usebibmacro{pageref}%
4231 \newunit\newblock
4232 \iftoggle{bbx:related}
4233 {\usebibmacro{related:init}%
4234 \usebibmacro{related}}
4235 {}%
4236 \usebibmacro{finentry}}
4237
4238 % \end{macrocode}
4239 %
4240 % The unpublished driver is used for miscellaneous unpublished written
4241 % material. It differs from the standard version by supporting |maintitle| and
4242 % |booktitle|, and including a label at the end. The unpublished label is
4243 % delegated to a macro in case future versions of the style place conditions on
4244 % whether it is displayed.
4245 %
4246 % \begin{macrocode}
4247 \DeclareBibliographyDriver{unpublished}{%
4248 \usebibmacro{bibindex}%
4249 \usebibmacro{begentry}%
4250 \usebibmacro{author}%
4251 \setunit{\printdelim{nametitledelim}}\newblock
4252 \usebibmacro{title}%
4253 \newunit\newblock
4254 \usebibmacro{byauthor}%
4255 \newunit\newblock
4256 \ifnameundef{editor}{}{\usebibmacro{in:}}%
4257 \usebibmacro{bookeditor}%
4258 \newunit\newblock
4259 \usebibmacro{maintitle+booktitle}%
4260 \usebibmacro{byeditor+others}%
4261 \newunit\newblock
4262 \printfield{howpublished}%
4263 \newunit\newblock
4264 \printfield{type}%
4265 \newunit\newblock
4266 \usebibmacro{event+venue+date}%
4267 \newunit\newblock
4268 \printfield{note}%
4269 \newunit\newblock
4270 \usebibmacro{collection+shelfmark}%
4271 \newunit\newblock
4272 \usebibmacro{organization+location+date+library}%
4273 \newunit\newblock
4274 \usebibmacro{isunpublished}%
4275 \newunit\newblock
4276 \printfield{pubstate}%
4277 \newunit\newblock
4278 \usebibmacro{doi+eprint+url}%
4279 \newunit\newblock
4280 \printfield{addendum}%
4281 \setunit{\bibpagerefpunct}\newblock
4282 \usebibmacro{pageref}%
4283 \newunit\newblock
4284 \iftoggle{bbx:related}
4285 {\usebibmacro{related:init}%
4286 \usebibmacro{related}}
4287 {}%
4288 \usebibmacro{finentry}}
4289
4290 % \end{macrocode}
4291 %
4292 % \subsubsection{Special drivers}
4293 %
4294 % \begin{macrocode}
4295 \DeclareBibliographyDriver{shorthand}{%
4296 \usedriver
4297 {\DeclareNameAlias{sortname}{default}}
4298 {\thefield{entrytype}}%
4299 \finentry}
4300
4301 \newbool{bbx@inset}
4302 \DeclareBibliographyDriver{set}{%
4303 \booltrue{bbx@inset}%
4304 \entryset{}{}%
4305 \newunit\newblock
4306 \usebibmacro{setpageref}%
4307 \finentry}
4308
4309 % \end{macrocode}
4310 %
4311 % \subsubsection{Aliases}
4312 %
4313 % We define some handy semantic aliases.
4314 %
4315 % \begin{macrocode}
4316 \DeclareBibliographyAlias{mvbook}{book}
4317 \DeclareBibliographyAlias{bookinbook}{inbook}
4318 \DeclareBibliographyAlias{suppbook}{inbook}
4319 \DeclareBibliographyAlias{mvcollection}{collection}
4320 \DeclareBibliographyAlias{suppcollection}{incollection}
4321 \DeclareBibliographyAlias{movie}{audio}
4322 \DeclareBibliographyAlias{music}{audio}
4323 \DeclareBibliographyAlias{mvproceedings}{proceedings}
4324 \DeclareBibliographyAlias{reference}{collection}
4325 \DeclareBibliographyAlias{mvreference}{reference}
4326 \DeclareBibliographyAlias{suppperiodical}{article}
4327 \DeclareBibliographyAlias{review}{article}
4328 \DeclareBibliographyAlias{standard}{manual}
4329 \DeclareBibliographyAlias{software}{misc}
4330 \DeclareBibliographyAlias{video}{audio}
4331 \DeclareBibliographyAlias{*}{misc}
4332
4333 % \end{macrocode}
4334 %
4335 % \subsection{Name handling}
4336 %
4337 % The handling of CJK names is based on code supplied to TeX.sx by Moritz
4338 % Wemheuer in answer to
4339 % \href{http://tex.stackexchange.com/a/320738/16293}{question 320738}.
4340 %
4341 % The CJK part is printed after the anglicized name. If the name is also
4342 % annotated as `cjk' (see `Data Annotations' in the \textsf{biblatex} manual),
4343 % it is always printed in family-given order with no intermediate punctuation.
4344 %
4345 % \begin{macrocode}
4346 \newbibmacro*{name:cjk-given-family}[3]{%
4347 \ifitemannotation{cjk}{%
4348 \usebibmacro{name:delim}{#2#1#3}%
4349 \usebibmacro{name:hook}{#2#1#3}%
4350 \mkbibnamefamily{#1}\isdot
4351 \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}}%
4352 \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}%
4353 }{%
4354 \usebibmacro{name:delim}{#2#1#3}%
4355 \usebibmacro{name:hook}{#2#1#3}%
4356 \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
4357 \mkbibnamefamily{#1}\isdot
4358 \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}%
4359 }%
4360 }
4361 \newbibmacro*{name:cjk-family-given}[3]{%
4362 \ifitemannotation{cjk}{%
4363 \usebibmacro{name:delim}{#2#1#3}%
4364 \usebibmacro{name:hook}{#2#1#3}%
4365 \mkbibnamefamily{#1}\isdot
4366 \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}}%
4367 \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}%
4368 }{%
4369 \usebibmacro{name:delim}{#1}%
4370 \usebibmacro{name:hook}{#1}%
4371 \mkbibnamefamily{#1}\isdot
4372 \ifboolexpe{%
4373 test {\ifdefvoid{#2}}
4374 and
4375 test {\ifdefvoid{#3}}}
4376 {}
4377 {\revsdnamepunct}%
4378 \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
4379 \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnamecjk{#3}}%
4380 }%
4381 }
4382
4383 % \end{macrocode}
4384 %
4385 % We update the |given-family| and |family-given| name formats to support the
4386 % above CJK macros.
4387 %
4388 % \begin{macrocode}
4389 \DeclareNameFormat{given-family}{%
4390 \ifdefvoid{\namepartcjk}{%
4391 \ifgiveninits{%
4392 \usebibmacro{name:given-family}
4393 {\namepartfamily}
4394 {\namepartgiveni}
4395 {\namepartprefix}
4396 {\namepartsuffix}%
4397 }{%
4398 \usebibmacro{name:given-family}
4399 {\namepartfamily}
4400 {\namepartgiven}
4401 {\namepartprefix}
4402 {\namepartsuffix}%
4403 }%
4404 }{%
4405 \ifgiveninits{%
4406 \usebibmacro{name:cjk-given-family}
4407 {\namepartfamily}
4408 {\namepartgiveni}
4409 {\namepartcjk}%
4410 }{%
4411 \usebibmacro{name:cjk-given-family}
4412 {\namepartfamily}
4413 {\namepartgiven}
4414 {\namepartcjk}%
4415 }%
4416 }%
4417 \usebibmacro{name:andothers}%
4418 }
4419
4420 \DeclareNameFormat{family-given}{%
4421 \ifdefvoid{\namepartcjk}{%
4422 \ifgiveninits{%
4423 \usebibmacro{name:family-given}
4424 {\namepartfamily}
4425 {\namepartgiveni}
4426 {\namepartprefix}
4427 {\namepartsuffix}%
4428 }{%
4429 \usebibmacro{name:family-given}
4430 {\namepartfamily}
4431 {\namepartgiven}
4432 {\namepartprefix}
4433 {\namepartsuffix}%
4434 }%
4435 }{%
4436 \ifgiveninits{%
4437 \usebibmacro{name:cjk-family-given}
4438 {\namepartfamily}
4439 {\namepartgiveni}
4440 {\namepartcjk}%
4441 }{%
4442 \usebibmacro{name:cjk-family-given}
4443 {\namepartfamily}
4444 {\namepartgiven}
4445 {\namepartcjk}%
4446 }%
4447 }%
4448 \usebibmacro{name:andothers}%
4449 }
4450
4451 % \end{macrocode}
4452 %
4453 % With videos, names in credits are printed in full.
4454 %
4455 % \begin{macrocode}
4456 \DeclareNameFormat{given-family:full}{%
4457 \ifdefvoid{\namepartcjk}{%
4458 \usebibmacro{name:given-family}
4459 {\namepartfamily}
4460 {\namepartgiven}
4461 {\namepartprefix}
4462 {\namepartsuffix}%
4463 }{%
4464 \usebibmacro{name:cjk-given-family}
4465 {\namepartfamily}
4466 {\namepartgiven}
4467 {\namepartcjk}%
4468 }%
4469 \usebibmacro{name:andothers}%
4470 }
4471
4472 % \end{macrocode}
4473 %
4474 % Names are usually reversed, but not in the |bookeditor| position.
4475 %
4476 % \begin{macrocode}
4477 \DeclareNameAlias{author}{family-given}
4478 \DeclareNameAlias{editor}{family-given}
4479 \DeclareNameAlias{translator}{family-given}
4480
4481 \DeclareNameWrapperAlias{author}{family-given}
4482 \DeclareNameWrapperAlias{editor}{family-given}
4483 \DeclareNameWrapperAlias{translator}{family-given}
4484
4485 \DeclareNameAlias{bookeditor}{given-family}
4486
4487 % \end{macrocode}
4488 %
4489 % There are no spaces between initials.
4490 %
4491 % \begin{macrocode}
4492 \renewcommand*{\bibinitdelim}{}
4493
4494 % \end{macrocode}
4495 %
4496 % We add support for the standard author--year dash check.
4497 %
4498 % \begin{macrocode}
4499 \newbibmacro*{bbx:dashcheck}[2]{%
4500 \ifboolexpr{
4501 test {\iffieldequals{fullhash}{\bbx@lasthash}}
4502 and
4503 not test \iffirstonpage
4504 and
4505 (
4506 not bool {bbx@inset}
4507 or
4508 test {\iffieldequalstr{entrysetcount}{1}}
4509 )
4510 }
4511 {#1}
4512 {#2}}
4513
4514 % \end{macrocode}
4515 %
4516 % We need a bibmacro that reimplements the loopcode logic of \cs{printnames},
4517 % but operates on two name lists simultaneously. This allows us to use
4518 % abbreviated corporate author names (|shortauthor|, |shorteditor|) as primary,
4519 % annotated by the full version.
4520 %
4521 % We need to do this in a way that doesn't break the patterns used for
4522 % configuring and adapting the punctuation that delimits the list items, so the
4523 % |namepair:delim| macro does the same as |name:delim| but instead of reading
4524 % the current counters, takes two extra arguments (in addition to the current name):
4525 % the number of the current name pair and the total number of name pairs.
4526 % The regular |finallistdelim| delimiter format looks up the value of the
4527 % |liststop| counter, so we need to give it the right value.
4528 %
4529 % \begin{macrocode}
4530 \newbibmacro*{namepair:delim}[3]{%
4531 \ifnumgreater{#2}{\@ne}{%
4532 \ifnumless{#2}{#3}{%
4533 \printdelim{multinamedelim}%
4534 }{%
4535 \ifnumgreater{#3}{\c@maxnames}{%
4536 \c@liststop\c@minnames
4537 }{%
4538 \c@liststop#3}%
4539 \lbx@finalnamedelim{#1}}%
4540 }{}}
4541 % \end{macrocode}
4542 %
4543 % The |namepairs| bibmacro takes two arguments: the data fields holding the main
4544 % name and alternative name respectively. When rendering the names, we use
4545 % saveboxes to extract the hashes, and only print the alternative name if it has
4546 % a different hash.
4547 %
4548 % \begin{macrocode}
4549 \DeclareFieldFormat{expanded}{\mkbibparens{#1}}
4550 \newcounter{namepairs}
4551 \newsavebox{\blx@bath@namebox}
4552 \newsavebox{\blx@bath@altnamebox}
4553 \newbibmacro*{namepairs}[2]{%
4554 \setcounter{namepairs}{0}%
4555 \savebibmacro{name:andothers}%
4556 \renewbibmacro*{name:andothers}{}%
4557 \whileboolexpr{%
4558 test {\ifnumless{\value{namepairs}}{\value{#1}}}
4559 and (
4560 test {\ifdefvoid{\c@maxnames}}
4561 or
4562 test {\ifnumequal{\c@maxnames}{0}}
4563 or
4564 test {\ifnumless{\value{#1}}{\c@maxnames}}
4565 or
4566 test {\ifnumequal{\value{#1}}{\c@maxnames}}
4567 or
4568 test {\ifdefvoid{\c@minnames}}
4569 or
4570 test {\ifnumequal{\c@minnames}{0}}
4571 or
4572 test {\ifnumless{\value{namepairs}}{\c@minnames}}
4573 )
4574 }{%
4575 \stepcounter{namepairs}%
4576 \savebox{\blx@bath@namebox}{%
4577 \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
4578 }%
4579 \let\blx@bath@firsthash=\blx@bath@lasthash
4580 \savebox{\blx@bath@altnamebox}{%
4581 \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
4582 }%
4583 \let\blx@bath@secondhash=\blx@bath@lasthash
4584 % \end{macrocode}
4585 %
4586 % With |shortauthor| and |shorteditor|, the alternative name is printed first,
4587 % and the main name afterwards in parentheses.
4588 %
4589 % \begin{macrocode}
4590 \ifdefstrequal{\blx@bath@firsthash}{\blx@bath@secondhash}{%
4591 \usebibmacro{namepair:delim}%
4592 {\unhbox\blx@bath@namebox}{\value{namepairs}}{\value{#1}}%
4593 \hbox{}\unhbox\blx@bath@namebox
4594 }{%
4595 \usebibmacro{namepair:delim}%
4596 {\unhbox\blx@bath@altnamebox}{\value{namepairs}}{\value{#1}}%
4597 \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
4598 \setunit{\addspace}%
4599 \printtext[expanded]{%
4600 \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
4601 }%
4602 }%
4603 }%
4604 % \end{macrocode}
4605 %
4606 % Lastly, we handle linking punctuation.
4607 %
4608 % \begin{macrocode}
4609 \ifboolexpr{
4610 test {\ifnumequal{\value{namepairs}}{\c@minnames}}
4611 and
4612 test {\ifnumgreater{\value{#1}}{\c@maxnames}}
4613 }{%
4614 \ifnumgreater{\c@minnames}{1}{%
4615 \finalandcomma
4616 }{}%
4617 \printdelim{andothersdelim}\bibstring{andothers}%
4618 }{}%
4619 \restorebibmacro{name:andothers}%
4620 }
4621
4622 % \end{macrocode}
4623 %
4624 % The |author|, |editor| and |translator| macros are mostly the same as the
4625 % standard author--year definitions, with the exception that we add support for
4626 % the |nameaddon| field for authors and use the above handler for |shortauthor|
4627 % and |shorteditor|.
4628 %
4629 % \begin{macrocode}
4630 \DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1}}
4631 \renewbibmacro*{author}{%
4632 \ifboolexpr{
4633 test \ifuseauthor
4634 and
4635 not test {\ifnameundef{author}}
4636 }
4637 {\usebibmacro{bbx:dashcheck}
4638 {\bibnamedash}
4639 {\usebibmacro{bbx:savehash}%
4640 \ifboolexpr{%
4641 ( not test {\ifnameundef{shortauthor}} )
4642 and
4643 test {\ifnumequal{\value{shortauthor}}{\value{author}}}}%
4644 {\usebibmacro{namepairs}{author}{shortauthor}}%
4645 {\printnames{author}}%
4646 \iffieldundef{nameaddon}
4647 {}
4648 {\setunit{\addspace}%
4649 \printfield{nameaddon}}%
4650 \iffieldundef{authortype}
4651 {\setunit{\printdelim{nameyeardelim}}}
4652 {\setunit{\printdelim{authortypedelim}}}}%
4653 \iffieldundef{authortype}
4654 {}
4655 {\usebibmacro{authorstrg}%
4656 \setunit{\printdelim{nameyeardelim}}}}%
4657 {\global\undef\bbx@lasthash
4658 \usebibmacro{labeltitle}%
4659 \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}%
4660 \usebibmacro{date+extradate}}
4661
4662 \renewbibmacro*{editor}{%
4663 \usebibmacro{bbx:editor}{editorstrg}}
4664 \renewbibmacro*{editor+others}{%
4665 \usebibmacro{bbx:editor}{editor+othersstrg}}
4666 \newbibmacro*{bbx:editor}[1]{%
4667 \ifboolexpr{
4668 test \ifuseeditor
4669 and
4670 not test {\ifnameundef{editor}}
4671 }
4672 {\usebibmacro{bbx:dashcheck}
4673 {\bibnamedash}
4674 {\ifboolexpr{%
4675 ( not test {\ifnameundef{shorteditor}} )
4676 and
4677 test {\ifnumequal{\value{shorteditor}}{\value{editor}}}}%
4678 {\usebibmacro{namepairs}{editor}{shorteditor}}%
4679 {\printnames{editor}}%
4680 \setunit{\printdelim{editortypedelim}}%
4681 \usebibmacro{bbx:savehash}}%
4682 \usebibmacro{#1}%
4683 \clearname{editor}%
4684 \setunit{\printdelim{nameyeardelim}}}%
4685 {\global\undef\bbx@lasthash
4686 \usebibmacro{labeltitle}%
4687 \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}%
4688 \usebibmacro{date+extradate}}
4689
4690 \renewbibmacro*{translator}{%
4691 \usebibmacro{bbx:translator}{translatorstrg}}
4692 \renewbibmacro*{translator+others}{%
4693 \usebibmacro{bbx:translator}{translator+othersstrg}}
4694 \newbibmacro*{bbx:translator}[1]{%
4695 \ifboolexpr{
4696 test \ifusetranslator
4697 and
4698 not test {\ifnameundef{translator}}
4699 }
4700 {\usebibmacro{bbx:dashcheck}
4701 {\bibnamedash}
4702 {\printnames{translator}%
4703 \setunit{\printdelim{translatortypedelim}}%
4704 \usebibmacro{bbx:savehash}}%
4705 \usebibmacro{#1}%
4706 \clearname{translator}%
4707 \setunit{\printdelim{nameyeardelim}}}%
4708 {\global\undef\bbx@lasthash
4709 \usebibmacro{labeltitle}%
4710 \iftoggle{bbx:labelistitle}{\setunit{\printdelim{nonameyeardelim}}}{}}%
4711 \usebibmacro{date+extradate}}
4712
4713 % \end{macrocode}
4714 %
4715 % With collections, editors appear in natural order between `In' and the title,
4716 % followed by `ed.'
4717 %
4718 % \begin{macrocode}
4719 \newbibmacro*{bookeditor}{%
4720 \ifnameundef{editor}{}{%
4721 \printnames[bookeditor]{editor}%
4722 \setunit*{\addcomma\space}%
4723 \usebibmacro{editor+othersstrg}%
4724 \clearname{editor}%
4725 }}
4726
4727 % \end{macrocode}
4728 %
4729 % We change the |by|* macros so that the format can be changed with an option.
4730 %
4731 % \begin{macrocode}
4732 \renewbibmacro*{byauthor}[1][byauthor]{%
4733 \ifboolexpr{
4734 test \ifuseauthor
4735 or
4736 test {\ifnameundef{author}}
4737 }{}
4738 {\usebibmacro{bytypestrg}{author}{author}%
4739 \setunit{\addspace}%
4740 \printnames[#1]{author}}}
4741
4742 \renewbibmacro*{byeditor}[1][byeditor]{%
4743 \ifnameundef{editor}
4744 {}
4745 {\usebibmacro{bytypestrg}{editor}{editor}%
4746 \setunit{\addspace}%
4747 \printnames[#1]{editor}%
4748 \newunit}%
4749 \ifstrequal{#1}{byeditor}{%
4750 \usebibmacro{byeditora}%
4751 \usebibmacro{byeditorb}%
4752 \usebibmacro{byeditorc}
4753 }{%
4754 \usebibmacro{byeditora}[#1]%
4755 \usebibmacro{byeditorb}[#1]%
4756 \usebibmacro{byeditorc}[#1]}}
4757
4758 \newbibmacro*{byeditora}[1][byeditora]{%
4759 \ifnameundef{editora}
4760 {}
4761 {\usebibmacro{bytypestrg}{editora}{editor}%
4762 \setunit{\addspace}%
4763 \printnames[#1]{editora}%
4764 \newunit}}
4765 \newbibmacro*{byeditorb}[1][byeditorb]{%
4766 \ifnameundef{editorb}
4767 {}
4768 {\usebibmacro{bytypestrg}{editorb}{editor}%
4769 \setunit{\addspace}%
4770 \printnames[#1]{editorb}%
4771 \newunit}}
4772 \newbibmacro*{byeditorc}[1][byeditorc]{%
4773 \ifnameundef{editorc}
4774 {}
4775 {\usebibmacro{bytypestrg}{editorc}{editor}%
4776 \setunit{\addspace}%
4777 \printnames[#1]{editorc}%
4778 \newunit}}
4779
4780 % \end{macrocode}
4781 %
4782 % The style prints translator names (uniquely) in parentheses.
4783 %
4784 % \begin{macrocode}
4785 \renewbibmacro*{bytranslator}[1][bytranslator]{%
4786 \ifnameundef{translator}
4787 {}
4788 {\setunit{\addspace}%
4789 \printtext[parens]{%
4790 \printnames[#1]{translator}%
4791 \setunit{\addcomma\space}%
4792 \bibcpstring{translator}%
4793 \clearname{translator}}}}
4794
4795 \renewbibmacro*{byeditor+others}[1][byeditor]{%
4796 \ifnameundef{editor}
4797 {}
4798 {\usebibmacro{byeditor+othersstrg}%
4799 \setunit{\addspace}%
4800 \printnames[#1]{editor}%
4801 \clearname{editor}%
4802 \newunit}%
4803 \ifstrequal{#1}{byeditor}{%
4804 \usebibmacro{byeditorx}%
4805 \usebibmacro{bytranslator+others}%
4806 }{%
4807 \usebibmacro{byeditora}[#1]%
4808 \usebibmacro{byeditorb}[#1]%
4809 \usebibmacro{byeditorc}[#1]%
4810 \usebibmacro{bytranslator+others}[#1]}}
4811
4812 \renewbibmacro*{bytranslator+others}[1][bytranslator]{%
4813 \ifnameundef{translator}
4814 {\usebibmacro{withothers}}
4815 {\setunit{\addspace}%
4816 \printtext[parens]{%
4817 \printnames[bytranslator]{translator}%
4818 \setunit{\addcomma\space}%
4819 \bibcpstring{translator}%
4820 \clearname{translator}%
4821 \newunit
4822 \usebibmacro{withothers}}}}
4823
4824 % \end{macrocode}
4825 %
4826 % \subsection{Dates}
4827 %
4828 % If the main publication date is missing, we fall back immediately to `n.d.\@'
4829 % rather than use the access date or anything like that.
4830 %
4831 % \begin{macrocode}
4832 \DeclareLabeldate{%
4833 \field{date}
4834 \field{year}
4835 \literal{nodate}
4836 }
4837
4838 % \end{macrocode}
4839 %
4840 % Unless already set, the \key{nonodate} option is inserted if |sortyear| is
4841 % used. We accomplish this with source maps; the first one works where options
4842 % (not including |nonodate|) have been set, the second where no options have
4843 % been set.
4844 %
4845 % \begin{macrocode}
4846 \DeclareStyleSourcemap{
4847 \maps[datatype=bibtex]{
4848 \map[overwrite=true]{
4849 \step[notmatch=\regexp{nonodate}, fieldsource=options, final]
4850 \step[fieldsource=sortyear, final]
4851 \step[fieldset=options, append, fieldvalue={,nonodate}]
4852 }
4853 \map[overwrite=true]{
4854 \step[notfield=options, final]
4855 \step[fieldsource=sortyear, final]
4856 \step[fieldset=options, fieldvalue={nonodate}]
4857 }
4858 }
4859 }
4860
4861 % \end{macrocode}
4862 %
4863 % Dates are usually given bare. Times, when printed, are followed by the
4864 % |hours| bibstring.
4865 %
4866 % \begin{macrocode}
4867 \DeclareFieldFormat{datelabel}{#1}
4868 \DeclareFieldFormat{time}{#1~\bibstring{hours}}
4869
4870 % \end{macrocode}
4871 %
4872 % The punctuation before the label year is controlled by the following
4873 % commands, and should be a comma. The exceptions to this are |legislation|
4874 % entries and English/Welsh legal case reports (traditional style), where
4875 % there should just be a space.
4876 %
4877 % \begin{macrocode}
4878 \DeclareDelimFormat{nameyeardelim}{\addcomma\space}
4879 \DeclareDelimFormat[parencite,bib,biblist]{nameyeardelim}{\addcomma\space}
4880 \newcommand{\dononameyeardelim}{%
4881 \ifentrytype{legislation}{%
4882 \addspace
4883 }{%
4884 \ifentrytype{jurisdiction}{%
4885 \ifboolexpr{
4886 togl {bbx:eu-oj}
4887 or
4888 test {\iffieldequalstr{journaltitle}{ECR}}
4889 or
4890 test {\iffieldequalstr{type}{ECR}}
4891 }{%
4892 \addspace
4893 }{%
4894 \ifboolexpr{
4895 test {\ifkeyword{sc}}
4896 or
4897 togl {bbx:scotstyle}
4898 or
4899 not test {\iflistundef{institution}}
4900 }{%
4901 \addcomma\space
4902 }{%
4903 \addspace}}%
4904 }{%
4905 \addcomma\space}}}
4906 \DeclareDelimFormat{nonameyeardelim}{\dononameyeardelim}
4907 \DeclareDelimFormat*[bib,biblist]{nonameyeardelim}{\dononameyeardelim}
4908 \DeclareDelimFormat[parencite]{nonameyeardelim}{%
4909 \ifboolexpr{
4910 test {\ifentrytype{jurisdiction}}
4911 or
4912 test {\ifentrytype{legislation}}
4913 }{\addspace}{\addcomma\space}}
4914
4915 % \end{macrocode}
4916 %
4917 % The punctuation after the label year is controlled by the following
4918 % commands, and should be a comma. The exceptions to this are |legislation|
4919 % and |jurisdiction| entries, where there should just be a space if the label
4920 % is the title.
4921 %
4922 % \begin{macrocode}
4923 \DeclareDelimFormat{nametitledelim}{%
4924 \ifboolexpr{
4925 (
4926 test {\ifentrytype{jurisdiction}}
4927 or
4928 test {\ifentrytype{legislation}}
4929 ) and
4930 togl {bbx:labelistitle}
4931 }{\addspace}{\addcomma\space}}
4932 \DeclareDelimFormat[bib,biblist]{nametitledelim}{%
4933 \ifboolexpr{
4934 (
4935 test {\ifentrytype{jurisdiction}}
4936 or
4937 test {\ifentrytype{legislation}}
4938 ) and
4939 togl {bbx:labelistitle}
4940 }{\addspace}{\labelnamepunct}}
4941
4942 % \end{macrocode}
4943 %
4944 % The problem with moving years but leaving months and days behind is that the
4945 % regular date range macros in |biblatex.sty| do nothing at all if no year
4946 % is printed. We therefore need to patch the macros with extra routines for
4947 % printing year-free date ranges: the rather extravagently named
4948 % |\mknoyeardaterangefull| and |\mknoyeardaterangetrunc|.
4949 %
4950 % \begin{macrocode}
4951 \newrobustcmd*{\mknoyeardaterangefull}[2]{%
4952 \iffieldundef{#2month}{}{%
4953 \printtext[{#2date}]{%
4954 \datecircaprint
4955 \iffieldundef{#2yeardivision}{%
4956 \csuse{mkbibdate#1}{}{#2month}{#2day}%
4957 \blx@printtime{#2}{}%
4958 }{%
4959 \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
4960 \dateuncertainprint
4961 \iffieldundef{#2endmonth}{}{%
4962 \iffieldequalstr{#2endmonth}{}{%
4963 \mbox{\bibdaterangesep}%
4964 }{%
4965 \bibdaterangesep
4966 \enddatecircaprint
4967 \iffieldundef{#2yeardivision}{%
4968 \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
4969 \blx@printtime{#2}{end}%
4970 }{%
4971 \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
4972 \enddateuncertainprint}}}}}
4973 % \end{macrocode}
4974 %
4975 % There is a potential problem for |\mknoyeardaterangetrunc|, in that if
4976 % the year and endyear are missing, it cannot tell if they are the same, so
4977 % if the months are the same but the years are different, the range would
4978 % be erroneously compressed. However, the only reason the year should
4979 % be missing is that it is in the label, so we test |labelyear| instead.
4980 %
4981 % \begin{macrocode}
4982 \newrobustcmd*{\mknoyeardaterangetrunc}[2]{%
4983 \iffieldundef{#2month}{}{%
4984 \printtext[{#2date}]{%
4985 \datecircaprint
4986 \iffieldundef{#2yeardivision}{%
4987 \ifboolexpr{
4988 test {\ifdateyearsequal{label}{labelend}}
4989 and
4990 test {\iffieldsequal{#2month}{#2endmonth}}
4991 }{%
4992 \csuse{mkbibdate#1}{}{}{#2day}%
4993 }{%
4994 \csuse{mkbibdate#1}{}{#2month}{#2day}}%
4995 }{%
4996 \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
4997 \dateuncertainprint
4998 \iffieldundef{#2endmonth}{}{%
4999 \iffieldequalstr{#2endmonth}{}{%
5000 \mbox{\bibdaterangesep}%
5001 }{%
5002 \bibdaterangesep
5003 \enddatecircaprint
5004 \iffieldundef{#2yeardivision}{%
5005 \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
5006 }{%
5007 \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
5008 \enddateuncertainprint}}}}}
5009 % \end{macrocode}
5010 %
5011 % Now we patch the four date range commands. The |extra| commands,
5012 % which print disambiguating labels as well, should only print those
5013 % labels if the year is present, so they can use the same non-year
5014 % date range functions as the non-|extra| commands.
5015 %
5016 % \begin{macrocode}
5017 \xpatchcmd{\mkdaterangefull}{%
5018 \iffieldundef{#2year} {\blx@nounit}%
5019 }{%
5020 \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
5021 }{\@tempswafalse}{\@tempswatrue}%
5022 \if@tempswa
5023 \xpatchcmd{\mkdaterangefull}{%
5024 \iffieldundef{#2year} {}%
5025 }{%
5026 \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
5027 }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefull}}%
5028 \fi
5029 \xpatchcmd{\mkdaterangetrunc@i}{%
5030 \iffieldundef{#2year} {\blx@nounit}%
5031 }{%
5032 \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
5033 }{\@tempswafalse}{\@tempswatrue}%
5034 \if@tempswa
5035 \xpatchcmd{\mkdaterangetrunc}{%
5036 \iffieldundef{#2year} {}%
5037 }{%
5038 \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
5039 }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetrunc@i}}%
5040 \fi
5041 \xpatchcmd{\mkdaterangefullextra}{%
5042 \iffieldundef{#2year} {\blx@nounit}%
5043 }{%
5044 \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
5045 }{\@tempswafalse}{\@tempswatrue}%
5046 \if@tempswa
5047 \xpatchcmd{\mkdaterangefullextra}{%
5048 \iffieldundef{#2year} {}%
5049 }{%
5050 \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
5051 }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangefullextra}}%
5052 \fi
5053 \xpatchcmd{\mkdaterangetruncextra@i}{%
5054 \iffieldundef{#2year} {\blx@nounit}%
5055 }{%
5056 \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
5057 }{\@tempswafalse}{\@tempswatrue}%
5058 \if@tempswa
5059 \xpatchcmd{\mkdaterangetruncextra}{%
5060 \iffieldundef{#2year} {}%
5061 }{%
5062 \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
5063 }{}{\wlog{WARNING: biblatex-bath failed to patch mkdaterangetruncextra@i}}%
5064 \fi
5065 % \end{macrocode}
5066 %
5067 % The |extradate| string should be printed bare, and separated by a space if
5068 % the label date is a string such as \enquote{n.d.}.
5069 %
5070 % \begin{macrocode}
5071 \DeclareFieldFormat{extradate}{%
5072 \iffieldundef{\thefield{labeldatesource}}{%
5073 \iffieldnums{\thefield{labeldatesource}year}{}{\addnbspace}%
5074 }{%
5075 \iffieldnums{\thefield{labeldatesource}}{}{\addnbspace}%
5076 }%
5077 \mknumalph{#1}}%
5078
5079 % \end{macrocode}
5080 %
5081 % \subsection{Title block}
5082 %
5083 % Most titles are set in italics, but some are set roman and unquoted.
5084 %
5085 % \begin{macrocode}
5086 \DeclareFieldFormat{sentencecase}{\MakeSentenceCase*{#1}}
5087 \DeclareFieldFormat{midsentencecase}{\MakeSentenceCase*{{}#1}}
5088 \DeclareFieldFormat{title}{\mkbibemph{#1}}
5089 \DeclareFieldFormat
5090 [article,inbook,incollection,inproceedings,legal]%
5091 {title}{#1}
5092 \DeclareFieldFormat
5093 [reference,mvreference]%
5094 {title}{\iftoggle{bbx:labelistitle}{#1}{\mkbibemph{#1}}}
5095 \DeclareFieldFormat
5096 [inreference]%
5097 {title}{\iftoggle{bbx:labelistitle}{\mkbibemph{#1}}{#1}}
5098 \DeclareFieldFormat
5099 [inreference]%
5100 {booktitle}{\iftoggle{bbx:labelistitle}{#1}{\mkbibemph{#1}}}
5101 \DeclareFieldFormat
5102 [patent,thesis]%
5103 {title}{\mkbibemph{#1}}
5104 \DeclareFieldFormat
5105 [audio,video,music,video]%
5106 {title}{\ifboolexpr{
5107 test {\iffieldequalstr{type}{TV}}
5108 or
5109 test {\iffieldequalstr{type}{Radio}}
5110 }{#1}{\mkbibemph{#1}}}
5111 \DeclareFieldFormat
5112 [unpublished]%
5113 {title}{\iffieldundef{booktitle}{\mkbibemph{#1}}{#1}}
5114 \DeclareFieldFormat
5115 [letter]%
5116 {title}{\iffieldundef{journaltitle}{\emph{#1}}{#1}}
5117
5118 % \end{macrocode}
5119 %
5120 % Versions are printed with `v.\@' in parentheses.
5121 %
5122 % \begin{macrocode}
5123 \DeclareFieldFormat{version}{\mkbibparens{\biblcsstring{version}#1}}
5124
5125 % \end{macrocode}
5126 %
5127 % The |titleaddon| field follows the title after a space and wrapped in
5128 % brackets. Version 1 of this style encouraged people to supply the brackets
5129 % manually, so we strip them off if they have been supplied.
5130 %
5131 % \begin{macrocode}
5132 \DeclareFieldFormat{titleaddon}{\mkbibbrackets{%
5133 \IfBeginWith{#1}{[}{%
5134 \IfEndWith{#1}{]}{%
5135 \StrBetween{#1}{[}{]}%
5136 }{#1}%
5137 }{#1}%
5138 }}
5139
5140 % \end{macrocode}
5141 %
5142 % Subtitles are set off with a colon
5143 %
5144 % \begin{macrocode}
5145 \renewcommand*{\subtitlepunct}{\addcolon\space}
5146
5147 % \end{macrocode}
5148 %
5149 % The |maintitle+title| and |title+issuetitle| are intended to be unchanged from
5150 % the standard definitions.
5151 %
5152 % \begin{macrocode}
5153 \newbibmacro*{maintitle+title}{%
5154 \iffieldsequal{maintitle}{title}
5155 {\clearfield{maintitle}%
5156 \clearfield{mainsubtitle}%
5157 \clearfield{maintitleaddon}}
5158 {\iffieldundef{maintitle}
5159 {}
5160 {\usebibmacro{maintitle}%
5161 \newunit\newblock
5162 \iffieldundef{volume}
5163 {}
5164 {\printfield{volume}%
5165 \printfield{part}%
5166 \setunit{\addcolon\space}}}}%
5167 \usebibmacro{title}%
5168 \newunit}
5169
5170 \newbibmacro*{title+issuetitle}{%
5171 \usebibmacro{periodical}%
5172 \setunit*{\addspace}%
5173 \iffieldundef{series}
5174 {}
5175 {\newunit
5176 \printfield{series}%
5177 \setunit{\addspace}}%
5178 \usebibmacro{volume+number+eid}%
5179 \setunit{\addspace}%
5180 \usebibmacro{issue+date}%
5181 \newunit}
5182
5183 % \end{macrocode}
5184 %
5185 % We need to supply a new |title| macro. The standard version puts default unit
5186 % punctuation between the |title| and |titleaddon| fields, but we need a space.
5187 % We also need to add conditional code for printing the automatic `[Online]'
5188 % label.
5189 %
5190 % \begin{macrocode}
5191 \renewbibmacro*{title}{%
5192 \ifboolexpr{
5193 test {\iffieldundef{title}}
5194 and
5195 test {\iffieldundef{subtitle}}
5196 }{%
5197 \ifboolexpr{
5198 test {\ifentrytype{legislation}}
5199 and
5200 test {\iffieldundef{journaltitle}}
5201 }{%
5202 \setunit*{\addspace}%
5203 \usebibmacro{isonline}%
5204 }{}%
5205 }{%
5206 \printtext[title]{%
5207 \printfield[sentencecase]{title}%
5208 \setunit{\subtitlepunct}%
5209 \printfield[midsentencecase]{subtitle}%
5210 \setunit{\addspace}}%
5211 \printfield{titleaddon}%
5212 \setunit*{\addspace}%
5213 \printfield{version}\clearfield{version}%
5214 \ifboolexpr{
5215 test {\iffieldundef{entrysubtype}}
5216 or
5217 test {\ifentrytype{legal}}
5218 or
5219 test {\ifentrytype{legislation}}
5220 or
5221 test {\ifentrytype{jurisdiction}}
5222 }{%
5223 \ifboolexpr{
5224 test {\iffieldundef{journaltitle}}
5225 and
5226 test {\iffieldundef{booktitle}}
5227 and (
5228 test {\iffieldundef{library}}
5229 or
5230 test {\ifentrytype{image}}
5231 or
5232 test {\ifentrytype{audio}}
5233 or
5234 test {\ifentrytype{video}}
5235 or
5236 test {\ifentrytype{music}}
5237 or
5238 test {\ifentrytype{movie}}
5239 )
5240 and (
5241 not (
5242 test {\iffieldequalstr{type}{TV}}
5243 or
5244 test {\iffieldequalstr{type}{Radio}}
5245 )
5246 or
5247 test {\iffieldundef{series}}
5248 )
5249 }{%
5250 \setunit*{\addspace}%
5251 \usebibmacro{isonline}%
5252 }{}%
5253 }{%
5254 \setunit*{\addspace}%
5255 \printfield{entrysubtype}}
5256 }%
5257 }
5258
5259 % \end{macrocode}
5260 %
5261 % Similar changes are needed for the |booktitle| and |maintitle| macros.
5262 %
5263 % \begin{macrocode}
5264 \renewbibmacro*{booktitle}{%
5265 \ifboolexpr{
5266 test {\iffieldundef{booktitle}}
5267 and
5268 test {\iffieldundef{booksubtitle}}
5269 }{}{%
5270 \printtext[booktitle]{%
5271 \printfield[sentencecase]{booktitle}%
5272 \setunit{\subtitlepunct}%
5273 \printfield[midsentencecase]{booksubtitle}%
5274 \setunit{\addspace}%
5275 }%
5276 \printfield{booktitleaddon}
5277 \setunit*{\addspace}%
5278 \usebibmacro{isonline}%
5279 }%
5280 }
5281
5282 \renewbibmacro*{maintitle}{%
5283 \ifboolexpr{
5284 test {\iffieldundef{maintitle}}
5285 and
5286 test {\iffieldundef{mainsubtitle}}
5287 }{}{
5288 \printtext[maintitle]{%
5289 \printfield[sentencecase]{maintitle}%
5290 \setunit{\subtitlepunct}%
5291 \printfield[midsentencecase]{mainsubtitle}%
5292 \setunit{\addspace}%
5293 }%
5294 \printfield{maintitleaddon}%
5295 }%
5296 }
5297
5298 % \end{macrocode}
5299 %
5300 % In the standard author--year styles, if a title is promoted to the head of
5301 % a reference (due to missing authors/editors), the subtitle and titleaddon
5302 % fields are discarded. In Harvard (Bath), the whole block is moved (with some
5303 % cosmetic differences).
5304 %
5305 % \begin{macrocode}
5306 \DeclareLabeltitle[inreference]{%
5307 \field{shorttitle}
5308 \field{booktitle}
5309 \field{title}
5310 }
5311 \DeclareFieldFormat{entrysubtype}{\mkbibbrackets{#1}}
5312 \providetoggle{bbx:labelistitle}
5313 \newbibmacro*{labeltitle}{%
5314 \iffieldundef{label}{%
5315 \ifboolexpr{
5316 test {\ifentrytype{inreference}}
5317 and
5318 not test {\iffieldundef{booktitle}}
5319 }{%
5320 \toggletrue{bbx:labelistitle}%
5321 \printtext[booktitle]{%
5322 \printfield[sentencecase]{booktitle}%
5323 \setunit{\booksubtitlepunct}%
5324 \printfield[midsentencecase]{booksubtitle}}%
5325 \clearfield{booktitle}\clearfield{booksubtitle}%
5326 }{%
5327 \ifboolexpr{
5328 test {\iffieldundef{title}}
5329 and
5330 test {\iffieldundef{subtitle}}
5331 }{}{%
5332 \toggletrue{bbx:labelistitle}%
5333 \printtext[title]{%
5334 \printfield[sentencecase]{title}%
5335 \setunit{\subtitlepunct}%
5336 \printfield[midsentencecase]{subtitle}%
5337 \setunit{\addspace}}%
5338 \clearfield{title}\clearfield{subtitle}}%
5339 \printfield{titleaddon}%
5340 \ifboolexpr{
5341 test {\ifentrytype{legislation}}
5342 or
5343 test {\ifentrytype{jurisdiction}}
5344 }{}{%
5345 \setunit*{\addspace}%
5346 \printfield{version}\clearfield{version}%
5347 \iffieldundef{entrysubtype}{%
5348 \ifboolexpr{
5349 test {\iffieldundef{journaltitle}}
5350 and
5351 test {\iffieldundef{booktitle}}
5352 and (
5353 test {\iffieldundef{library}}
5354 or
5355 test {\ifentrytype{image}}
5356 or
5357 test {\ifentrytype{audio}}
5358 or
5359 test {\ifentrytype{video}}
5360 or
5361 test {\ifentrytype{music}}
5362 or
5363 test {\ifentrytype{movie}}
5364 )
5365 and (
5366 not (
5367 test {\iffieldequalstr{type}{TV}}
5368 or
5369 test {\iffieldequalstr{type}{Radio}}
5370 )
5371 or
5372 test {\iffieldundef{series}}
5373 )
5374 }{%
5375 \setunit*{\addspace}%
5376 \usebibmacro{isonline}%
5377 }{}%
5378 }{%
5379 \setunit*{\addspace}%
5380 \printfield{entrysubtype}}}}%
5381 }{%
5382 \printfield{label}%
5383 }}
5384
5385 % \end{macrocode}
5386 %
5387 % Online resources are clearly tarred and feathered with an `[Online]' label.
5388 % The \texttt{isonline} macro prints this label if the resource has a URL and
5389 % does nothing otherwise. We add a safeguard to stop it being used repeatedly.
5390 %
5391 % \begin{macrocode}
5392 \newtoggle{bbx:onlineshown}
5393 \newbibmacro*{isonline}{%
5394 \ifboolexpr{(
5395 test {\iffieldundef{doi}}
5396 and
5397 test {\iffieldundef{url}}
5398 and
5399 test {\iffieldundef{urlyear}}
5400 and
5401 not test {\ifentrytype{online}}
5402 ) or
5403 togl {bbx:onlineshown}
5404 }{}{%
5405 \bibstring[\mkbibbrackets]{online}%
5406 \toggletrue{bbx:onlineshown}}}
5407
5408 % \end{macrocode}
5409 %
5410 % \subsection{Events}
5411 %
5412 % Events are printed as date then venue with no intermediate punctuation.
5413 %
5414 % \begin{macrocode}
5415 \newbibmacro*{event+venue+date}{%
5416 \printfield{eventtitle}%
5417 \setunit*{\addspace}%
5418 \printfield{eventtitleaddon}%
5419 \ifboolexpr{
5420 test {\iffieldundef{venue}}
5421 and
5422 test {\iffieldundef{eventyear}}
5423 }
5424 {}
5425 {\setunit{\addcomma\space}%
5426 \printeventdate
5427 \setunit*{\addcomma\space}%
5428 \printfield{venue}%
5429 \newunit}}
5430
5431 % \end{macrocode}
5432 %
5433 % \subsection{Journals}
5434 %
5435 % The journal title is in sentence case rather than title case.
5436 %
5437 % \begin{macrocode}
5438 \xpatchbibmacro{journal}{%
5439 \printfield[titlecase]{journaltitle}%
5440 }{%
5441 \printfield[sentencecase]{journaltitle}%
5442 }{}{\wlog{WARNING: biblatex-bath failed to patch journal macro}}
5443 \xpatchbibmacro{journal}{%
5444 \printfield[titlecase]{journalsubtitle}%
5445 }{%
5446 \printfield[sentencecase]{journalsubtitle}%
5447 }{}{\wlog{WARNING: biblatex-bath failed to patch journal macro}}
5448
5449 % \end{macrocode}
5450 %
5451 % The journal title is followed by a comma. The issue number is separated from
5452 % the volume by parentheses rather than a dot. The pubstate is in the volume
5453 % position.
5454 %
5455 % \begin{macrocode}
5456 \newbibmacro*{journal+issuetitle}{%
5457 \usebibmacro{journal}%
5458 \setunit*{\addspace}%
5459 \usebibmacro{isonline}%
5460 \setunit*{\addcomma\space}%
5461 \iffieldundef{series}
5462 {}
5463 {\newunit
5464 \printfield{series}%
5465 \setunit{\addcomma\space}}%
5466 \usebibmacro{volume+number+eid}%
5467 \setunit{\addspace}%
5468 \usebibmacro{issue+date}%
5469 \setunit{\addcomma\space}%
5470 \printfield{pubstate}%
5471 \newunit}
5472
5473 \newbibmacro*{volume+number+eid}{%
5474 \printfield{volume}%
5475 \printfield[parens]{number}%
5476 \setunit{\addcomma\space}%
5477 \printfield{eid}}
5478
5479 % \end{macrocode}
5480 %
5481 % \subsection{Monograph containers and entry titles}
5482 %
5483 % \begin{macrocode}
5484 \newbibmacro*{maintitle+booktitle}{%
5485 \iffieldundef{maintitle}
5486 {}
5487 {\usebibmacro{maintitle}%
5488 \newunit\newblock
5489 \iffieldundef{volume}
5490 {}
5491 {\printfield{volume}%
5492 \printfield{part}%
5493 \setunit{\addcolon\space}}}%
5494 \usebibmacro{booktitle}%
5495 \newunit}
5496
5497 % \end{macrocode}
5498 %
5499 % \subsection{Series, types and numbering}
5500 %
5501 % Types are always printed longhand.
5502 %
5503 % \begin{macrocode}
5504 \DeclareFieldFormat{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}}
5505 \DeclareFieldFormat[software]{type}{\mkbibbrackets{#1}}
5506 \DeclareFieldFormat{series}{\MakeSentenceCase*{#1}}
5507 \DeclareFieldFormat
5508 [audio,video,music,video]%
5509 {series}{\ifboolexpr{
5510 test {\iffieldequalstr{type}{TV}}
5511 or
5512 test {\iffieldequalstr{type}{Radio}}
5513 }{\mkbibemph{\MakeSentenceCase*{#1}}}{\MakeSentenceCase*{#1}}}
5514 \DeclareFieldFormat
5515 [audio,video,music,video]%
5516 {number}{\ifboolexpr{
5517 test {\iffieldequalstr{type}{TV}}
5518 or
5519 test {\iffieldequalstr{type}{Radio}}
5520 }{\mkbibemph{#1}}{#1}}
5521 \DeclareFieldFormat[legislation,jurisdiction]{series}{#1}
5522 % \end{macrocode}
5523 %
5524 % The |forceparens| format ensures the punctuation tracker doesn't override
5525 % semantically important parentheses.
5526 %
5527 % \begin{macrocode}
5528 \DeclareFieldFormat{forceparens}{(#1)}
5529
5530 % \end{macrocode}
5531 %
5532 % Unlike the standard styles, we print a comma between series and number.
5533 %
5534 % \begin{macrocode}
5535 \newbibmacro*{series+number}{%
5536 \printfield{series}%
5537 \setunit*{\addcomma\space}%
5538 \printfield{number}%
5539 \newunit}
5540
5541 % \end{macrocode}
5542 %
5543 % We also supply a version that incorporates the |type| field. The format
5544 % for when all three elements are provided is for compatibility with previous
5545 % versions and may change in future.
5546 %
5547 % \begin{macrocode}
5548 \newbibmacro{manual:series+type+number}{%
5549 \iffieldundef{series}{%
5550 \newunit\newblock
5551 \printfield{type}%
5552 \setunit{\addspace}%
5553 \printfield{number}%
5554 }{%
5555 \setunit{\addcomma\space}%
5556 \usebibmacro{series+number}%
5557 \newunit\newblock
5558 \printfield{type}%
5559 }%
5560 }
5561
5562 % \end{macrocode}
5563 %
5564 % We provide a wrapper macro for printing archival collections and locators.
5565 %
5566 % \begin{macrocode}
5567 \newbibmacro*{collection+shelfmark}{%
5568 \ifboolexpr{
5569 test {\iffieldundef{library}}
5570 or (
5571 test {\iffieldundef{collection}}
5572 and
5573 test {\iffieldundef{shelfmark}}
5574 )
5575 }{
5576 \usebibmacro{series+number}%
5577 }{
5578 \printfield{collection}%
5579 \setunit*{\addcomma\space}%
5580 \printfield{shelfmark}%
5581 \newunit}}
5582
5583 % \end{macrocode}
5584 %
5585 % Reports use a special macro for printing the |type|, |series| and |number| in
5586 % parentheses.
5587 %
5588 % \begin{macrocode}
5589 \newbibmacro{series+type+number}{%
5590 \ifboolexpr{
5591 test {\iffieldundef{series}}
5592 and
5593 test {\iffieldundef{type}}
5594 and
5595 test {\iffieldundef{number}}
5596 }{}{%
5597 \printtext[parens]{%
5598 \printfield{series}%
5599 \IfStrEqCase{\thefield{series}}{%
5600 {C}{\printunit*{\adddot\space}}%
5601 {Cd}{\printunit*{\adddot\space}}%
5602 {Cmd}{\printunit*{\adddot\space}}%
5603 {Cmnd}{\printunit*{\adddot\space}}%
5604 {Cm}{\printunit*{\adddot\space}}%
5605 }{%
5606 \setunit*{\addcomma\space}}%
5607 \printfield{type}%
5608 \setunit*{\addspace}%
5609 \IfBeginWith{\thefield{series}}{{HL}}{%
5610 \printfield[forceparens]{number}%
5611 }{%
5612 \printfield{number}%
5613 }}}}
5614
5615 % \end{macrocode}
5616 %
5617 % \subsection{Publication block}
5618 %
5619 % The standard publisher macro is fine.
5620 %
5621 % \begin{macrocode}
5622 \newbibmacro*{publisher+location+date}{%
5623 \printlist{location}%
5624 \iflistundef{publisher}
5625 {\setunit*{\addcomma\space}}
5626 {\setunit*{\addcolon\space}}%
5627 \printlist{publisher}%
5628 \setunit*{\addcomma\space}%
5629 \usebibmacro{date}%
5630 \newunit}
5631
5632 % \end{macrocode}
5633 %
5634 % We put a wrapper around the standard insitution macro so that it prints the
5635 % publisher field instead if present, and preprends the institution.
5636 %
5637 % \begin{macrocode}
5638 \newbibmacro*{plain:institution+location+date}{%
5639 \printlist{location}%
5640 \iflistundef{institution}
5641 {\setunit*{\addcomma\space}}
5642 {\setunit*{\addcolon\space}}%
5643 \printlist{institution}%
5644 \setunit*{\addcomma\space}%
5645 \usebibmacro{date}%
5646 \newunit}
5647 \newbibmacro*{institution+location+date}{%
5648 \iflistundef{publisher}{%
5649 \usebibmacro{plain:institution+location+date}%
5650 }{%
5651 \printlist{institution}%
5652 \newunit
5653 \usebibmacro{publisher+location+date}}}
5654
5655 % \end{macrocode}
5656 %
5657 % As an additional hack for social media entries where the date is preceded by a
5658 % comma, we tweak the punctuation logic for |organization+location+date|.
5659 %
5660 % \begin{macrocode}
5661 \newbibmacro*{organization+location+date}{%
5662 \iflistundef{publisher}{%
5663 \printlist{location}%
5664 \iflistundef{organization}
5665 {\setunit*{\addcomma\space}}
5666 {\setunit*{\addcolon\space}}%
5667 \printlist{organization}%
5668 \iflistundef{location}
5669 {\setunit{\addcomma\space}}%
5670 {\setunit*{\addcomma\space}}%
5671 \usebibmacro{date}%
5672 \newunit
5673 }{%
5674 \printlist{organization}%
5675 \newunit
5676 \usebibmacro{publisher+location+date}}}
5677
5678 % \end{macrocode}
5679 %
5680 % We use the \texttt{library} field for databases and preprint repositories,
5681 % as well as streaming services and physical archives for the visual arts.
5682 %
5683 % \begin{macrocode}
5684 \DeclareFieldFormat{library}{\mkbibemph{#1}}
5685 \DeclareFieldFormat[image]{library}{#1}
5686 \newbibmacro*{library}{%
5687 \iffieldundef{library}{}{%
5688 \printfield{library}\clearfield{library}%
5689 \setunit*{\addspace}%
5690 \usebibmacro{isonline}}}
5691 \newbibmacro*{location+library}{%
5692 \iffieldundef{library}{%
5693 \iffieldundef{institution}{}{%
5694 \printlist{institution}%
5695 \setunit{\addcomma\space}%
5696 \printlist{location}%
5697 }%
5698 }{%
5699 \printfield{library}\clearfield{library}%
5700 \setunit*{\addcomma\space}%
5701 \printlist{location}}}
5702
5703
5704 % \end{macrocode}
5705 %
5706 % The following macro includes availability from a physical archive.
5707 %
5708 % \begin{macrocode}
5709 \newbibmacro*{organization+location+date+library}{%
5710 \ifboolexpr{
5711 test {\iffieldundef{library}}
5712 or
5713 not test {\iflistundef{publisher}}
5714 }{%
5715 \printlist{location}\clearfield{location}%
5716 \setunit*{\addcolon\space}%
5717 }{}%
5718 \iflistundef{publisher}{%
5719 \iflistundef{organization}{
5720 \printlist{location}%
5721 }{%
5722 \printlist{organization}}
5723 }{%
5724 \printlist{publisher}%
5725 }%
5726 \setunit{\addcomma\space}%
5727 \usebibmacro{date}%
5728 \newunit
5729 \usebibmacro{location+library}}
5730
5731 % \end{macrocode}
5732 %
5733 % Here is the |isunpublished| macro used by the |unpublished| driver. It can be
5734 % renewed if displaying the string needs to be suppressed or made conditional.
5735 %
5736 % \begin{macrocode}
5737 \newbibmacro*{isunpublished}{%
5738 \bibstring{unpublished}}
5739
5740 % \end{macrocode}
5741 %
5742 % \subsection{Pinpointing}
5743 %
5744 % We remove the space between \enquote{p.\@} and the page numbers, and allow
5745 % a couple of letters for representing newspaper columns.
5746 %
5747 % \begin{macrocode}
5748 \renewcommand*{\ppspace}{}
5749 \DeclareNumChars{ab}
5750
5751 \newbibmacro*{chapter+pages}{%
5752 \printfield{chapter}%
5753 \setunit{\bibpagespunct}%
5754 \printfield{eid}%
5755 \setunit{\bibpagespunct}%
5756 \printfield{pages}%
5757 \newunit}
5758
5759 \newbibmacro*{note+pages}{%
5760 \printfield{note}%
5761 \setunit{\bibpagespunct}%
5762 \printfield{pages}%
5763 \newunit}
5764
5765 % \end{macrocode}
5766 %
5767 % \subsection{Access and URLs}
5768 %
5769 % URLs are prefaced by a `from' statement, and the URL date is enclosed in
5770 % brackets rather than parentheses.
5771 %
5772 % \begin{macrocode}
5773 \DeclareFieldFormat{url}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{#1}}
5774 \DeclareFieldFormat{doi}{\bibsentence\bibstring{urlfrom}\addcolon\space\url{https://doi.org/#1}}
5775 \DeclareFieldFormat{pseudourl}{\bibsentence\bibstring{urlfrom}\addcolon\space#1}
5776 \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}
5777
5778 % \end{macrocode}
5779 %
5780 % Since URLs and DOIs are presented in exactly the same way, we combine them
5781 % such that the DOI overrides the URL. We also allow the \texttt{library} field
5782 % to be used as a fallback URL.
5783 %
5784 % \begin{macrocode}
5785 \renewbibmacro*{url}{%
5786 \iffieldundef{doi}{%
5787 \ifboolexpr{
5788 test {\iffieldundef{url}}
5789 and not
5790 test {\iffieldundef{urlyear}}
5791 }{\printfield[pseudourl]{library}}{\printfield{url}}%
5792 }{%
5793 \printfield{doi}%
5794 }}
5795 \newbibmacro*{doi+eprint+url}{%
5796 \iftoggle{bbx:eprint}
5797 {\usebibmacro{eprint}}
5798 {}%
5799 \newunit\newblock
5800 \iftoggle{bbx:url}
5801 {\usebibmacro{url+urldate}}
5802 {}}
5803
5804 % \end{macrocode}
5805 %
5806 % \subsection{Standards}
5807 %
5808 % A special quirk with standards is that they are often best known by their
5809 % number, so it comes at the head of the reference if no authors are specified.
5810 %
5811 % To achieve this cleanly with correct sorting, we copy the number into
5812 % |sortkey| as a simple fix (providing neither |author| nor |sortkey| are
5813 % already specified). We then move the number to |label| so that citations
5814 % come out correctly and the date (if given) is put in the right place.
5815 %
5816 % \begin{macrocode}
5817 \DeclareStyleSourcemap{%
5818 \maps[datatype=bibtex]{%
5819 \map[overwrite=false]{
5820 \pertype{standard}
5821 \step[notfield=author,
5822 fieldsource=number,
5823 final]
5824 \step[fieldset=sortkey,
5825 origfieldval]
5826 }
5827 \map[overwrite=false]{
5828 \pertype{standard}
5829 \step[notfield=author,
5830 fieldsource=number,
5831 fieldtarget=label]
5832 }
5833 }}
5834 \ExecuteBibliographyOptions[standard]{useeditor=false}
5835
5836 % \end{macrocode}
5837 %
5838 % \subsection{Case reports}
5839 %
5840 % We provide a test to see if a work was published in the Official Journal of
5841 % the EU; if so, the title is not italic (unless reporting a decision of the
5842 % European Commission).
5843 %
5844 % \begin{macrocode}
5845 \newtoggle{bbx:eu-oj}
5846 \newbibmacro*{eucheck}{%
5847 \IfBeginWith{\thefield{journaltitle}}{OJ}{%
5848 \toggletrue{bbx:eu-oj}%
5849 }{}}
5850 \DeclareFieldFormat[jurisdiction,legislation]{title}{%
5851 \ifboolexpr{
5852 togl{bbx:eu-oj}
5853 and
5854 not test {\iffieldequalstr{type}{Commission Decision}}
5855 }{#1}{\mkbibemph{#1}}}
5856
5857 % \end{macrocode}
5858 %
5859 % In the 2024 style, the year is printed as normal.
5860 %
5861 % In the European and neutral citation style, the year is printed in square
5862 % brackets, unless the case is Scottish, in which case the year is printed bare,
5863 % or a volume number is present, in which case the year is printed in
5864 % parentheses. With ECR and OJ cases, however, the year is always printed in
5865 % square brackets despite the presence of a volume number. We provide a
5866 % \key{year-essential} option for forcing the brackets/parentheses
5867 % choice, and \key{scottish-style} for activating Scottish style.
5868 %
5869 % \begin{macrocode}
5870 \newtoggle{bbx:scotstyle}
5871 \DeclareEntryOption[boolean]{scottish-style}[true]{%
5872 \settoggle{bbx:scotstyle}{#1}}
5873 \newtoggle{bbx:year-essential}
5874 \DeclareEntryOption[boolean]{year-essential}[true]{%
5875 \settoggle{bbx:year-essential}{#1}}
5876 \DeclareFieldFormat[jurisdiction]{datelabel}{%
5877 \ifboolexpr{
5878 test {\iflistundef{institution}}
5879 or
5880 test {\iffieldundef{number}}
5881 }{%
5882 \ifboolexpr{
5883 test {\iffieldundef{volume}}
5884 or
5885 togl {bbx:year-essential}
5886 or
5887 togl {bbx:eu-oj}
5888 or
5889 test {\iffieldequalstr{journaltitle}{ECR}}
5890 }{%
5891 \ifboolexpr{
5892 test {\ifkeyword{sc}}
5893 or
5894 togl {bbx:scotstyle}
5895 }{%
5896 #1%
5897 }{%
5898 \mkbibbrackets{#1}}%
5899 }{%
5900 \mkbibparens{#1}}%
5901 }{#1}%
5902 }
5903 % \end{macrocode}
5904 %
5905 % We define a |casenumber| macro for printing the case number just before the
5906 % year. This is for use with EU cases specifically, since in other circumstances
5907 % the case number goes after the court name (with or without punctuation).
5908 %
5909 % This macro is triggered specifically by the use of |issue| for the case number
5910 % (from Version 1 of the style, deprecated); or the use of |number| (case
5911 % number) alongside |pages| (always used in EU case citations) but without
5912 % |institution| (court).
5913 %
5914 % For now, we support the \textsf{oscola} semantics for numbering European
5915 % Commission cases. We have to be a bit careful to ensure the last print
5916 % command prints something otherwise |(no)nameyeardelim| will not be triggered.
5917 %
5918 % \begin{macrocode}
5919 \DeclareFieldFormat[jurisdiction]{issue}{\mkbibparens{#1}}
5920 \newbibmacro*{casenumber}{%
5921 \iffieldundef{issue}{%
5922 \ifboolexpr{
5923 test {\iffieldundef{pages}}
5924 or
5925 test {\iffieldundef{number}}
5926 or
5927 not test {\iflistundef{institution}}
5928 }{}{%
5929 \iffieldundef{userb}{%
5930 \printfield[parens]{number}%
5931 \clearfield{number}%
5932 }{%
5933 \printfield[parens]{userb}%
5934 \setunit{\addspace}%
5935 \printfield{type}%
5936 \setunit*{\addspace}%
5937 \printfield{number}%
5938 \clearfield{type}\clearfield{number}}}%
5939 }{%
5940 \printfield{issue}}}
5941 % \end{macrocode}
5942 %
5943 % For ease, if `Commission' is given as the |institution|, this is deleted but
5944 % the |type| is set to `Commission Decision'.The |casenumber| is moved to
5945 % |number| if this is empty, and to |userb| otherwise.
5946 %
5947 % \begin{macrocode}
5948 \DeclareStyleSourcemap{
5949 \maps[datatype=bibtex]{
5950 \map[overwrite=false]{
5951 \step[match=\regexp{Commission}, fieldsource=institution, final]
5952 \step[fieldset=type, fieldvalue={Commission Decision}]
5953 \step[fieldset=institution, null]
5954 }
5955 \map[overwrite=false]{
5956 \step[fieldsource=casenumber, final]
5957 \step[notfield=number, fieldsource=casenumber, fieldtarget=number]
5958 \step[fieldsource=casenumber, fieldtarget=userb]
5959 }
5960 }
5961 }
5962
5963 % \end{macrocode}
5964 %
5965 % Law reports have a special way of printing journals, volume and page numbers.
5966 % Here are several macros implementing this: a deprecated one using
5967 % |type|/|number| and proper ones using |journaltitle|, for UK journals,
5968 % ECR and OJ. The |reporter| macro chooses between them (again,
5969 % this is a little messy for backwards compatibility).
5970 %
5971 % \begin{macrocode}
5972 \newbibmacro{jurisdiction:type+number}{%
5973 \usebibmacro{journal}%
5974 \setunit*{\addspace}%
5975 \ifboolexpr{
5976 test {\iffieldundef{type}}
5977 and
5978 test {\iffieldundef{number}}
5979 }{}{%
5980 \printfield{volume}%
5981 \setunit*{\addperiod\space}%
5982 \printfield{type}%
5983 \setunit*{\addspace}%
5984 \printfield{number}}}
5985 \DeclareFieldFormat[jurisdiction]{journaltitle}{%
5986 \ifboolexpr{
5987 test {\iflistundef{institution}}
5988 and
5989 not togl {bbx:eu-oj}
5990 }{#1}{\mkbibemph{#1}}}
5991 \DeclareFieldFormat[jurisdiction,legislation,legal]{volume}{#1}
5992 \DeclareFieldFormat[jurisdiction,legislation]{pages}{%
5993 \iflistundef{institution}{#1}{\mkpageprefix[bookpagination]{#1}}}
5994 \newbibmacro{institution+number+journal+issuetitle}{%
5995 \setunit{\addperiod\space}%
5996 \printlist{institution}%
5997 \setunit{\addcomma\space}%
5998 \printfield{number}%
5999 \newunit\newblock
6000 \usebibmacro{journal}%
6001 \setunit*{\addspace}%
6002 \usebibmacro{isonline}%
6003 \setunit*{\addcomma\space}%
6004 \iffieldundef{series}
6005 {}
6006 {\newunit
6007 \printfield{series}%
6008 \setunit{\addcomma\space}}%
6009 \printfield{volume}%
6010 \setunit{\bibpagespunct}%
6011 \printfield{eid}%
6012 \setunit{\bibpagespunct}%
6013 \printfield{pages}%
6014 \setunit{\bibpagespunct}%
6015 \printfield{pubstate}%
6016 \newunit}
6017 \newbibmacro{journal+volume+pages}{%
6018 \printfield{volume}%
6019 \setunit{\addspace}%
6020 \printfield{journaltitle}%
6021 \setunit*{\addspace}%
6022 \printfield{pages}%
6023 }
6024 \newbibmacro{eu:journal+volume+pages}{%
6025 \printfield{journaltitle}%
6026 \setunit{\addspace}%
6027 \printfield{volume}%
6028 \setunit*{\printtext{--\allowbreak}}%
6029 \printfield{pages}%
6030 }
6031 \newbibmacro{eu:journal+series+volume+pages}{%
6032 \printfield{journaltitle}%
6033 \setunit{\addspace}%
6034 \printfield{series}%
6035 \clearfield{series}%
6036 \printfield{volume}%
6037 \setunit*{\printtext{/}}%
6038 \printfield{pages}%
6039 }
6040 \newbibmacro{reporter}{%
6041 \iflistundef{institution}{%
6042 \iffieldundef{journaltitle}{%
6043 \usebibmacro{jurisdiction:type+number}%
6044 }{%
6045 \iffieldequalstr{journaltitle}{ECR}{%
6046 \usebibmacro{eu:journal+volume+pages}%
6047 }{%
6048 \iffieldequalstr{journaltitle}{OJ}{%
6049 \iffieldundef{series}{%
6050 \usebibmacro{jurisdiction:type+number}%
6051 }{%
6052 \usebibmacro{eu:journal+series+volume+pages}%
6053 }%
6054 }{%
6055 \usebibmacro{journal+volume+pages}%
6056 }}}%
6057 }{\usebibmacro{institution+number+journal+issuetitle}}}
6058
6059 % \end{macrocode}
6060 %
6061 % \subsection{Legislation}
6062 %
6063 % Legislation is mostly formatted like a report, except there is no
6064 % |nametitledelim| there is no |date+extradate|. There is also some variation
6065 % in how the series\slash number\slash chapter information is punctuated.
6066 %
6067 % \begin{macrocode}
6068 \DeclareFieldFormat[legislation]{datelabel}{%
6069 \iftoggle{bbx:eu-oj}{%
6070 \mkbibbrackets{#1}%
6071 }{#1}}
6072 \DeclareFieldFormat[legislation]{labeldate}{%
6073 \iftoggle{bbx:labelistitle}{\printtext[title]{#1}}{#1}}
6074 \DeclareFieldFormat[legislation]{chapter}{\biblcsstring{legalchapter}#1}
6075 \newbibmacro*{journal+series+volume+number+chapter+pages}{%
6076 \iftoggle{bbx:eu-oj}{%
6077 \setunit{\addspace}%
6078 \usebibmacro{eu:journal+series+volume+pages}%
6079 }{%
6080 \iffieldequalstr{entrysubtype}{secondary}{%
6081 \setunit{\addcomma\space}%
6082 \printfield{number}%
6083 \clearfield{number}%
6084 \printunit{\addcomma\space}%
6085 }{%
6086 \ifboolexpr{
6087 test {\iffieldundef{series}}
6088 and
6089 test {\iffieldundef{type}}
6090 }{%
6091 \iffieldundef{number}{%
6092 \setunit{\addcomma\space}%
6093 \printfield{chapter}%
6094 }{%
6095 \setunit{\addspace}%
6096 \printtext[parens]{%
6097 \printfield{number}%
6098 \setunit*{\addcomma\space}%
6099 \printfield{chapter}}}%
6100 }{%
6101 \iffieldundef{chapter}{}{\setunit{\addspace}}%
6102 \printtext[parens]{%
6103 \printfield{series}%
6104 \setunit{\addcomma\space}%
6105 \printfield{type}%
6106 \setunit*{\addspace}%
6107 \printfield{number}%
6108 \setunit*{\addcomma\space}%
6109 \printfield{chapter}}}}}}
6110
6111 % \end{macrocode}
6112 %
6113 % \subsection{Related items}
6114 %
6115 % This is intended to be unchanged from the standard (author--year) definition.
6116 %
6117 % \begin{macrocode}
6118 \newcounter{bbx:relatedcount}
6119 \newcounter{bbx:relatedtotal}
6120
6121 \newbibmacro*{related:init}{%
6122 \csundef{bbx:relatedloop}}
6123
6124 \newbibmacro*{begrelated}{%
6125 \booltrue{bbx@inset}}
6126
6127 \newbibmacro*{endrelated}{%
6128 \usebibmacro*{bbx:savehash}}
6129
6130 \newbibmacro*{begrelatedloop}{}
6131 \newbibmacro*{endrelatedloop}{}
6132
6133 \def\ifrelatedloop{%
6134 \ifboolexpr{ test {\xifinlistcs{\strfield{entrykey}}{bbx:relatedloop}}
6135 or test {\xifinlistcs{\strfield{clonesourcekey}}{bbx:relatedloop}} }}
6136
6137 \newbibmacro*{related}{%
6138 \ifboolexpr{ test {\iffieldundef{related}} or test {\ifrelatedloop} }
6139 {}
6140 {\ifcsundef{begrelateddelim\strfield{relatedtype}}
6141 {\printunit{\begrelateddelim}}
6142 {\printunit{\csuse{begrelateddelim\strfield{relatedtype}}}}%
6143 \usebibmacro{begrelated}%
6144 \def\bbx@tempa{}%
6145 \setcounter{bbx:relatedtotal}{0}%
6146 \def\do##1{%
6147 \entrydata{##1}{%
6148 \ifrelatedloop
6149 {}
6150 {\stepcounter{bbx:relatedtotal}%
6151 \gappto{\bbx@tempa}{##1,}}}}%
6152 \docsvfield{related}%
6153 \restorefield{related}{\bbx@tempa}%
6154 \ifnumgreater{\value{bbx:relatedtotal}}{0}
6155 {\listcsxadd{bbx:relatedloop}{\strfield{entrykey}}%
6156 \iffieldundef{clonesourcekey}
6157 {}
6158 {\listcsxadd{bbx:relatedloop}{\strfield{clonesourcekey}}}%
6159 \setcounter{bbx:relatedcount}{0}%
6160 \def\do{%
6161 \stepcounter{bbx:relatedcount}%
6162 \ifnumgreater{\value{bbx:relatedcount}}{1}
6163 {\ifcsundef{relateddelim\strfield{relatedtype}}
6164 {\printunit{\relateddelim}}
6165 {\expandafter\expandafter\expandafter\expandafter\expandafter
6166 \expandafter\expandafter\printunit
6167 \expandafter\expandafter\expandafter\expandafter\expandafter
6168 \expandafter\expandafter{%
6169 \csuse{relateddelim\strfield{relatedtype}}}}}
6170 {}}%
6171 \ifbibmacroundef{related:\strfield{relatedtype}}
6172 {\appto{\do}{\usebibmacro{related:default}}}
6173 {\appto{\do}{\usebibmacro*{related:\strfield{relatedtype}}}}%
6174 \iffieldformatundef{related:\strfield{relatedtype}}
6175 {\def\bbx@tempa{related}}
6176 {\def\bbx@tempa{related:\strfield{relatedtype}}}%
6177 \iffieldformatundef{relatedstring:\strfield{relatedtype}}
6178 {\def\bbx@tempb{relatedstring:default}}
6179 {\def\bbx@tempb{relatedstring:\strfield{relatedtype}}}%
6180 \printtext[\bbx@tempa]{%
6181 \usebibmacro{begrelatedloop}%
6182 \iffieldundef{relatedstring}
6183 {\ifboolexpr{
6184 test {\ifnumgreater{\value{bbx:relatedtotal}}{1}}
6185 and
6186 test {\ifbibxstring{\thefield{relatedtype}s}}
6187 }
6188 {\printtext[\bbx@tempb]{%
6189 \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}s}}}
6190 {\iffieldbibstring{relatedtype}
6191 {\printtext[\bbx@tempb]{%
6192 \bibstring[\mkrelatedstringtext]{\thefield{relatedtype}}}}
6193 {}}}
6194 {\iffieldbibstring{relatedstring}
6195 {\printtext[\bbx@tempb]{%
6196 \bibstring[\mkrelatedstringtext]{\thefield{relatedstring}}}}
6197 {\printfield[\bbx@tempb]{relatedstring}}}%
6198 \docsvfield{related}%
6199 \usebibmacro{endrelatedloop}}}%
6200 {}%
6201 \usebibmacro{endrelated}}}
6202
6203 % \end{macrocode}
6204 %
6205 % \subsection{Bibliography formatting}
6206 %
6207 % We allow the bibliography look more like the Bib\TeX\ default.
6208 %
6209 % \begin{macrocode}
6210 \DeclareFieldFormat{shorthandwidth}{#1}
6211 \setlength{\bibhang}{0pt}
6212 \setlength{\bibitemsep}{1em plus 0.2em minus 0.2em}
6213 \renewcommand*{\bibfont}{\normalfont\normalsize}
6214
6215 \defbibenvironment{bibliography}
6216 {\list
6217 {}
6218 {\setlength{\leftmargin}{\bibhang}%
6219 \setlength{\itemindent}{-\leftmargin}%
6220 \setlength{\itemsep}{\bibitemsep}%
6221 \setlength{\parsep}{\bibparsep}}}
6222 {\endlist}
6223 {\item}
6224
6225 \defbibenvironment{shorthand}
6226 {\list
6227 {\printfield[shorthandwidth]{shorthand}}
6228 {\setlength{\labelwidth}{\shorthandwidth}%
6229 \setlength{\leftmargin}{\labelwidth}%
6230 \setlength{\labelsep}{\biblabelsep}%
6231 \addtolength{\leftmargin}{\labelsep}%
6232 \setlength{\itemsep}{\bibitemsep}%
6233 \setlength{\parsep}{\bibparsep}%
6234 \renewcommand*{\makelabel}[1]{##1\hss}}}
6235 {\endlist}
6236 {\item}
6237
6238 \InitializeBibliographyStyle{\global\undef\bbx@lasthash}
6239
6240 % \end{macrocode}
6241 %
6242 % \subsection{Sorting}
6243 %
6244 % This source map helps with correct sorting of anonymous |inreference| entries.
6245 %
6246 % \begin{macrocode}
6247 \DeclareStyleSourcemap{%
6248 \maps[datatype=bibtex]{%
6249 \map{%
6250 \pertype{inreference}
6251 \step[notfield=author, final]
6252 \step[fieldsource=booktitle]
6253 \step[fieldset=sorttitle, origfieldval]
6254 }%
6255 }%
6256 }%
6257 % \end{macrocode}
6258 %
6259 % \iffalse
6260 %</bbx>
6261 %<*dbx>
6262 % \fi
6263 %
6264 % \section{Implementation: data model}
6265 %
6266 % \setcounter{lstnumber}{20}
6267 %
6268 % We add support for a CJK component of names.
6269 %
6270 % \begin{macrocode}
6271 \DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,cjk}
6272 % \end{macrocode}
6273 %
6274 % We add some fields for compatibility with \textsf{biblatex-manuscripts-philology}
6275 % and \textsf{biblatex-oxref}.
6276 %
6277 % \begin{macrocode}
6278 \DeclareDatamodelFields[type=field,datatype=literal]{collection,shelfmark}
6279 \DeclareDatamodelEntryfields[booklet,image,map,unpublished]{collection,shelfmark}
6280 % \end{macrocode}
6281 %
6282 % \iffalse
6283 %</dbx>
6284 %<*lbx>
6285 % \fi
6286 %
6287 % \section{Implementation: General English language localization}
6288 %
6289 % \setcounter{lstnumber}{20}
6290 %
6291 % The strings are mostly the same except for the following changes. Note that
6292 % month names are never abbreviated.
6293 %
6294 % \begin{macrocode}
6295 \InheritBibliographyExtras{english}
6296 \DeclareBibliographyStrings
6297 {inherit = {english}
6298 ,editors = {{editors}{eds}}
6299 ,version = {{version~}{v\adddot}}
6300 ,inpreparation = {{preprint}{preprint}}
6301 ,submitted = {{preprint}{preprint}}
6302 ,paragraph = {{paragraph}{para\adddot}}
6303 ,paragraphs = {{paragraphs}{paras\adddot}}
6304 ,urlseen = {{Accessed}{Accessed}}
6305 ,january = {{January}{January}}
6306 ,february = {{February}{February}}
6307 ,march = {{March}{March}}
6308 ,april = {{April}{April}}
6309 ,may = {{May}{May}}
6310 ,june = {{June}{June}}
6311 ,july = {{July}{July}}
6312 ,august = {{August}{August}}
6313 ,september = {{September}{September}}
6314 ,october = {{October}{October}}
6315 ,november = {{November}{November}}
6316 ,december = {{December}{December}}
6317 ,patreq = {{patent application}{pat\adddot\ appl\adddot}}
6318 ,patreqde = {{German patent application}{German pat\adddot\ appl\adddot}}
6319 ,patreqeu = {{European patent application}{European pat\adddot\ appl\adddot}}
6320 ,patreqfr = {{French patent application}{French pat\adddot\ appl\adddot}}
6321 ,patrequk = {{British patent application}{British pat\adddot\ appl\adddot}}
6322 ,patrequs = {{U.S\adddotspace patent application}{U.S\adddotspace pat\adddot\ appl\adddot}}
6323 % \end{macrocode}
6324 %
6325 % These are the new strings we define in this style.
6326 %
6327 % \begin{macrocode}
6328 ,online = {{Online}{Online}}
6329 ,hours = {{hours}{hrs\adddot}}
6330 ,at = {{at}{at}}
6331 ,unpublished = {{unpublished}{unpublished}}
6332 ,legalchapter = {{chapter}{c\adddot}}
6333 ,director = {{director}{dir\adddot}}
6334 ,directors = {{directors}{dir\adddot}}
6335 ,bydirector = {{directed by}{directed by}}
6336 ,performer = {{}{}}
6337 ,performers = {{}{}}
6338 ,byperformer = {{}{}}
6339 ,reader = {{reader}{reader}}
6340 ,readers = {{readers}{readers}}
6341 ,byreader = {{read by}{read by}}
6342 ,conductor = {{conductor}{cond\adddot}}
6343 ,conductors = {{conductors}{cond\adddot}}
6344 ,byconductor = {{conducted by}{conducted by}}
6345 }
6346 % \end{macrocode}
6347 % \iffalse
6348 %</lbx>
6349 %<*lbx-gb>
6350 % \fi
6351 %
6352 % \section{Implementation: British English language localization}
6353 %
6354 % \setcounter{lstnumber}{20}
6355 %
6356 % We use the standard version with a few changes. We display the day as a
6357 % cardinal number instead of an ordinal. The date is separated from the time
6358 % by a period, not just a space, and the time separator is a period instead of a
6359 % colon.
6360 %
6361 % \begin{macrocode}
6362 \InheritBibliographyExtras{british}
6363 \DeclareBibliographyExtras{%
6364 \protected\def\mkbibdatelong#1#2#3{%
6365 \iffieldundef{#3}
6366 {}
6367 {\thefield{#3}%
6368 \iffieldundef{#2}{}{\nobreakspace}}%
6369 \iffieldundef{#2}
6370 {}
6371 {\mkbibmonth{\thefield{#2}}%
6372 \iffieldundef{#1}{}{\space}}%
6373 \iffieldbibstring{#1}
6374 {\bibstring{\thefield{#1}}}
6375 {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
6376 \renewrobustcmd*{\bibdatetimesep}{\addperiod\space}%
6377 \renewrobustcmd*{\bibtimesep}{\addperiod}%
6378 }
6379
6380 \DeclareBibliographyStrings
6381 {inherit = {english}
6382 }
6383 % \end{macrocode}
6384 % \iffalse
6385 %</lbx-gb>
6386 %<*cbx>
6387 % \fi
6388 %
6389 % \section{Implementation: citation style}
6390 %
6391 % \setcounter{lstnumber}{20}
6392 %
6393 % The standard |authoryear-comp| style is a close match for what we need.
6394 %
6395 % \begin{macrocode}
6396 \RequireCitationStyle{authoryear-comp}
6397 % \end{macrocode}
6398 %
6399 % This sets \key{uniquename} to |full|, but that conflicts with
6400 % \key{giveninits} set by the bibliography style, so we set it to |init|
6401 % instead. If left alone, \textsf{biblatex} would do this anyway, but if we do
6402 % it explicitly, we avoid the warning message.
6403 %
6404 % \begin{macrocode}
6405 \ExecuteBibliographyOptions{uniquename=init}
6406 % \end{macrocode}
6407 %
6408 % Compressed citations are delimited with a semicolon, just like
6409 % non-compressed citations.
6410 %
6411 % \begin{macrocode}
6412 \renewcommand*{\compcitedelim}{\addsemicolon\space}
6413 % \end{macrocode}
6414 %
6415 % Name order is inverted in citations as well, if it comes up.
6416 %
6417 % \begin{macrocode}
6418 \DeclareNameFormat{labelname}{%
6419 \ifcase\value{uniquename}%
6420 \usebibmacro{name:family}
6421 {\namepartfamily}
6422 {\namepartgiven}
6423 {\namepartprefix}
6424 {\namepartsuffix}%
6425 \or
6426 \ifuseprefix
6427 {\usebibmacro{name:family-given}
6428 {\namepartfamily}
6429 {\namepartgiveni}
6430 {\namepartprefix}
6431 {\namepartsuffixi}}
6432 {\usebibmacro{name:family-given}
6433 {\namepartfamily}
6434 {\namepartgiveni}
6435 {\namepartprefixi}
6436 {\namepartsuffixi}}%
6437 \or
6438 \usebibmacro{name:family-given}
6439 {\namepartfamily}
6440 {\namepartgiven}
6441 {\namepartprefix}
6442 {\namepartsuffix}%
6443 \fi
6444 \usebibmacro{name:andothers}}
6445 % \end{macrocode}
6446 %
6447 % We need to suppress the display of `n.d.' in citations if the \key{nonodate}
6448 % toggle is true.
6449 %
6450 % \begin{macrocode}
6451 \xpatchbibmacro{cite:labeldate+extradate}{%
6452 \iffieldundef{labelyear}%
6453 }{%
6454 \ifboolexpr{
6455 togl {bbx:nonodate}
6456 and
6457 not test {\iflabeldateisdate}}%
6458 }{}{\wlog{WARNING: biblatex-bath failed to patch cite:labeldate+extradate}}
6459 % \end{macrocode}
6460 %
6461 % We activate the label-is-title toggle if the |labeltitle| is printed.
6462 %
6463 % \begin{macrocode}
6464 \providetoggle{bbx:labelistitle}
6465 \xpatchbibmacro{cite:label}{%
6466 \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}%
6467 }{%
6468 \toggletrue{bbx:labelistitle}%
6469 \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}%
6470 }{}{\wlog{WARNING: biblatex-bath failed to patch cite:label}}
6471 % \end{macrocode}
6472 % \iffalse
6473 %</cbx>
6474 % \fi
6475