Debian Codegraph @

texmf-dist/source/bibtex/bath-bst/bath-bst.dtx

raw
1 % \iffalse meta-comment
2 %<*internal>
3 \iffalse
4 %</internal>
5 %<*bst1|bst2>
6 %</bst1|bst2>
7 %<*readme>
8 # bath-bst: Harvard referencing style as recommended by the University of Bath Library
9 %</readme>
10 %<*internal>
11 \fi
12 \def\nameofplainTeX{plain}
13 \ifx\fmtname\nameofplainTeX\else
14 \expandafter\begingroup
15 \fi
16 %</internal>
17 %<*install>
18 \input docstrip.tex
19 \keepsilent
20 \askforoverwritefalse
21
22 \nopreamble\nopostamble
23
24 \usedir{doc/bibtex/\jobname}
25 \generate{
26 \file{README.md}{\from{\jobname.dtx}{readme}}
27 \file{\jobname.bib}{\from{\jobname.dtx}{bib}}
28 }
29
30 \preamble
31 ----------------------------------------------------------------
32 bath-bst --- Harvard referencing style as recommended by the University of Bath Library
33 Author: Alex Ball
34 E-mail: [email protected]
35 License: Released under the LaTeX Project Public License v1.3c or later
36 See: http://www.latex-project.org/lppl.txt
37 ----------------------------------------------------------------
38
39 \endpreamble
40 \postamble
41
42 Copyright (C) 2016-2026 by University of Bath
43 \endpostamble
44
45 \usedir{bibtex/bst/\jobname}
46 \generate{
47 \file{bath.bst}{\from{\jobname.dtx}{bst1}}
48 \file{bathx.bst}{\from{\jobname.dtx}{bst2}}
49 }
50 %</install>
51 %<install>\endbatchfile
52 %<*internal>
53 \usedir{source/bibtex/\jobname}
54 \generate{
55 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
56 }
57 \usedir{doc/bibtex/\jobname}
58 \generate{
59 \file{bath-bst-v1.tex}{\from{\jobname.dtx}{tex1}}
60 }
61 \nopreamble\nopostamble
62 \generate{
63 \file{bath-bst.bib}{\from{\jobname.dtx}{bib}}
64 \file{bath-bst-v1.bib}{\from{\jobname.dtx}{bib1}}
65 }
66 \ifx\fmtname\nameofplainTeX
67 \expandafter\endbatchfile
68 \else
69 \expandafter\endgroup
70 \fi
71 %</internal>
72 %<tex1>\ProvidesFile{bath-bst-v1.tex}
73 %<*driver>
74 \ProvidesFile{bath-bst.dtx}
75 %</driver>
76 %<*driver|tex1>
77 [2026/01/29 v7.2 Harvard referencing style as recommended by the University of Bath Library]
78 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
79
80 \documentclass[10pt,a4paper]{article}
81 \usepackage[british]{babel}
82 \usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
83 \frenchspacing
84
85 % For typesetting the CJK example
86
87 \usepackage{iftex}
88 \ifPDFTeX
89 \usepackage{CJKutf8}
90 \else
91 \ifLuaTeX
92 \usepackage{luatexja-fontspec}
93 \setmainjfont{IPAexGothic}
94 \else
95 \ifXeTeX
96 \usepackage{ctex}
97 \fi
98 \fi
99 \fi
100
101 % For typesetting the examples
102
103 \usepackage{xpatch,csquotes,xcolor,multicol,fancyvrb}
104 \xdefinecolor{Green}{rgb}{0,.5,0}
105 \xdefinecolor{Slate}{RGB}{80,86,94}
106 \xdefinecolor{BathStone}{RGB}{213,211,185}
107 \xdefinecolor{SlushPuppy}{RGB}{177,215,237}
108 \colorlet{ok}{Green}
109 \colorlet{todo}{red}
110 \colorlet{hacked}{orange}
111 \colorlet{manual}{purple}
112 \RecustomVerbatimEnvironment
113 {Verbatim}{Verbatim}
114 {commentchar=\%}
115
116 \usepackage{enumitem}
117 \SetLabelAlign{left}{\strut #1\hfil}
118 \setlist[description]{style=nextline,leftmargin=1.4em}
119
120 \usepackage[tightLists=false]{markdown}
121 \markdownSetup{rendererPrototypes={%
122 link = {\href{#3}{#1}}%
123 }}
124
125 \usepackage{fontawesome}[2015/07/07]
126 \newcommand{\booksym}{\makebox[1em][c]{\faicon{book}}}
127 \newcommand{\cogsym}{\makebox[1em][c]{\faicon{cog}}}
128 \makeatletter
129 \newcommand{\hangfrom}[1]{%
130 \setbox\@tempboxa\hbox{{#1}}%
131 \hangindent \wd\@tempboxa\noindent\box\@tempboxa}
132 \makeatother
133 \newenvironment{tips}{%
134 \begin{list}{\makebox[2em][c]{\faLightbulbO}}{%
135 \setlength{\leftmargin}{2em}
136 \setlength{\labelwidth}{2em}
137 \setlength{\labelsep}{0pt}}
138 }{\end{list}}
139 \newenvironment{info}{%
140 \begin{list}{\makebox[2em][c]{\faInfoCircle}}{%
141 \setlength{\leftmargin}{2em}
142 \setlength{\labelwidth}{2em}
143 \setlength{\labelsep}{0pt}}
144 }{\end{list}}
145 \newenvironment{hacks}{%
146 \begin{list}{\makebox[2em][c]{\faWrench}}{%
147 \setlength{\leftmargin}{2em}
148 \setlength{\labelwidth}{2em}
149 \setlength{\labelsep}{0pt}}
150 }{\end{list}}
151
152 \usepackage{tcolorbox}
153 \tcbuselibrary{listings,breakable,skins}
154 \colorlet{Option}{violet}
155 \newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}}
156 \lstdefinelanguage{bafll}%
157 { alsoletter={.}
158 , morekeywords=[2]%
159 { add.period$
160 , call.type$
161 , change.case$
162 , chr.to.int$
163 , cite$
164 , duplicate$
165 , empty$
166 , format.name$
167 , global.max$
168 , if$
169 , int.to.chr$
170 , int.to.str$
171 , missing$
172 , newline$
173 , num.names$
174 , pop$
175 , preamble$
176 , purify$
177 , quote$
178 , skip$
179 , sort.key$
180 , stack$
181 , substring$
182 , swap$
183 , text.length$
184 , text.prefix$
185 , top$
186 , type$
187 , warning$
188 , while$
189 , width$
190 , write$
191 }
192 , morekeywords=[3]%
193 { ENTRY
194 , INTEGERS
195 , STRINGS
196 , MACRO
197 , FUNCTION
198 , READ
199 , EXECUTE
200 , ITERATE
201 , SORT
202 , REVERSE
203 }
204 , morekeywords=[1]{}
205 , otherkeywords=%
206 { +
207 , -
208 , >
209 , <
210 , =
211 , *
212 , :=
213 }
214 , sensitive=true
215 , morestring=[b]"
216 , morecomment=[l]\%
217 }[keywords,strings,comments]
218 \lstloadlanguages{[LaTeX]TeX,bafll}
219 \lstdefinestyle{dtxlatex}%
220 { columns=fullflexible
221 , basicstyle=\ttfamily
222 , language={[LaTeX]TeX}
223 , texcsstyle=*\color{red!75!black}
224 , commentstyle=\color{gray}\itshape
225 , moretexcs=
226 { bibhang
227 , citet
228 , citep
229 , defcitealias
230 , citepalias
231 , citetalias
232 , noop
233 , setcitestyle
234 , setlength
235 , urlprefix
236 , urldateprefix
237 }
238 , moredelim=**[s][\color{violet}]{[}{]}
239 , moredelim=**[s][\color{blue!75!black}]{\{}{\}}
240 }
241 \lstdefinestyle{dtxbst}%
242 { columns=fullflexible
243 , basicstyle=\ttfamily
244 , language=bafll
245 , keywordstyle=[1]\color{orange!75!black}
246 , keywordstyle=[2]\color{red!75!black}
247 , keywordstyle=[3]\color{green!50!black}
248 , commentstyle=\color{gray}\itshape
249 , stringstyle=\color{violet}
250 , mathescape=false
251 , showstringspaces=false
252 }
253 \lstset{style=dtxlatex}
254 \tcbset
255 { colframe = Slate
256 , colback = BathStone!25
257 , listing options =
258 { style = tcblatex
259 , style = dtxlatex
260 , basicstyle=\ttfamily\small
261 }
262 }
263 \NewTColorBox{bibexbox}{D(){ok}d<>m}%
264 {bicolor
265 ,colframe = #1
266 ,colback = #1!5!white
267 ,colbacklower = white
268 ,fontlower = \footnotesize
269 ,before upper = {\hangfrom{\booksym\space}}
270 ,after upper = {\par\hangfrom{\cogsym\space}\bibentry{#3}.}
271 ,IfNoValueTF={#2}{}%
272 {overlay = {
273 \node[anchor=south east,text=teal] at (frame.south east) {#2};
274 }
275 }
276 }
277 \def\bstIonly{\tcbset{colback=hacked!10}}
278 \def\bstIIonly{\tcbset{colback=SlushPuppy!25}}
279 \def\bstboth{\tcbset{colback=BathStone!25}}
280 %</driver|tex1>
281 %<*driver>
282 % For typesetting the implementation
283 \usepackage{doc}
284 \makeatletter
285 \newwrite\ydocwrite
286 \def\ydocfname{\jobname.listing}
287 \def\ydoc@catcodes{%
288 \let\do\@makeother
289 \dospecials
290 \catcode`\\=\active
291 \catcode`\^^M=\active
292 \catcode`\ =\active
293 }
294 \def\macrocode{%
295 \begingroup
296 \ydoc@catcodes
297 \macro@code
298 }
299 \def\endmacrocode{}
300 \begingroup
301 \endlinechar\m@ne
302 \@firstofone{%
303 \catcode`\|=0\relax
304 \catcode`\(=1\relax
305 \catcode`\)=2\relax
306 \catcode`\*=14\relax
307 \catcode`\{=12\relax
308 \catcode`\}=12\relax
309 \catcode`\ =12\relax
310 \catcode`\%=12\relax
311 \catcode`\\=\active
312 \catcode`\^^M=\active
313 \catcode`\ =\active
314 }*
315 |gdef|macro@code#1^^M% \end{macrocode}(*
316 |endgroup|expandafter|macro@@code|expandafter(|ydoc@removeline#1|noexpand|lastlinemacro)*
317 )*
318 |gdef|ydoc@removeline#1^^M(|noexpand|firstlinemacro)*
319 |gdef|ydoc@defspecialmacros(*
320 |def^^M(|noexpand|newlinemacro)*
321 |def (|noexpand|spacemacro)*
322 |def\(|noexpand|bslashmacro)*
323 )*
324 |gdef|ydoc@defrevspecialmacros(*
325 |def|newlinemacro(|noexpand^^M)*
326 |def|spacemacro(|noexpand )*
327 |def|bslashmacro(|noexpand\)*
328 )*
329 |endgroup
330 \def\macro@@code#1{%
331 {\ydoc@defspecialmacros
332 \xdef\themacrocode{#1}}%
333 \PrintMacroCode
334 \end{macrocode}%
335 }
336 \def\PrintMacroCode{%
337 \begingroup
338 \let\firstlinemacro\empty
339 \let\lastlinemacro\empty
340 \def\newlinemacro{^^J}%
341 \let\bslashmacro\bslash
342 \let\spacemacro\space
343 \immediate\openout\ydocwrite=\ydocfname\relax
344 \immediate\write\ydocwrite{\themacrocode}%
345 \immediate\closeout\ydocwrite
346 \let\input\@input
347 \tcbinputlisting{enhanced,breakable,size=small,listing only,listing file=\ydocfname}%
348 \endgroup
349 }
350 \makeatother
351 %</driver>
352 %<*driver|tex1>
353
354 % Documentation
355
356 \usepackage{natbib}
357 \setcitestyle{yysep={;}}
358 \setlength{\bibhang}{0pt}
359 \newcommand*{\urlprefix}{Available from: }
360 \newcommand*{\urldateprefix}{Accessed }
361 \newcommand*{\noop}[1]{}
362
363 \usepackage{bibentry}
364 %<*driver>
365 \bibliographystyle{bathx}
366 %</driver>
367 %<tex1>\bibliographystyle{bath}
368 \nobibliography*
369
370 \usepackage{readprov}
371 \usepackage[british,cleanlook]{isodate}
372
373 \usepackage[colorlinks,citecolor=black]{hyperref}
374 \makeatletter
375 \Urlmuskip=0mu plus 3mu\relax
376 \mathchardef\UrlBigBreakPenalty=100\relax
377 \mathchardef\UrlBreakPenalty=200\relax
378 \def\UrlBigBreaks{\do\:\do\-}%
379 \def\UrlBreaks{%
380 \do\.\do\@\do\/\do\\\do\!\do\_\do\|\do\;\do\>\do\]\do\)\do\}%
381 \do\,\do\?\do\'\do\+\do\=\do\#\do\$\do\&\do\*\do\^\do\"}%
382 \let\do=\noexpand
383 \makeatother
384
385 \sloppy
386
387 \title{bath-bst: Harvard referencing style as recommended by the University of Bath Library}
388 \author{%
389 Maintainer: Alex Ball\thanks{%
390 To contact the maintainer about this package, please visit the repository
391 where the code is hosted: \url{https://github.com/alex-ball/bathbib}.%
392 }%
393 }
394 %<*driver>
395 \date{Package \UseVersionOf{bath-bst.dtx} --\printdateTeX{\UseDateOf{bath-bst.dtx}}}
396 %</driver>
397 %<tex1>\date{Package \UseVersionOf{\jobname.tex} --\printdateTeX{\UseDateOf{\jobname.tex}}}
398
399 \begin{document}
400 \maketitle
401
402 \section{Introduction}
403
404 %</driver|tex1>
405 %<*driver>
406 \begin{markdown}[texComments]
407 %</driver>
408 %<*driver|readme>
409
410 This package provides a [BibTeX] style to format reference lists in the
411 [Harvard style][bath-harvard] recommended by the University of Bath Library.
412 It should be used in conjunction with [natbib] for citations.
413
414 ## Installation
415
416 The files you need are included in the zip archive available from [GitHub].
417 If you use the zip archive from [CTAN], you will need to run `luatex
418 bath-bst.dtx` to generate them.
419
420 You can use this style simply by copying the `bath.bst`/`bathx.bst` files into
421 your working directory, that is, the directory holding the main `.tex` file for
422 your document. If you want the style to be available for all your documents
423 without having to copy it over each time, you can install it using the
424 instructions below.
425
426 ### Managed way
427
428 The latest stable release of bath-bst has been packaged for TeX Live and
429 MiKTeX. If you are running TeX Live and have `tlmgr` installed, you can install
430 the package simply by running `tlmgr install bath-bst`. If you are running
431 MiKTeX, you can install the package by running `mpm --install=bath-bst`.
432 Both `tlmgr` and `mpm` have GUI versions that you might find friendlier.
433
434 ### Automated way
435
436 A makefile is provided which you can use with the Make utility on
437 UNIX-like systems:
438
439 * Running `make source` generates the derived files
440 - `README.md`
441 - `bath.bst` and `bathx.bst`
442 - `bath-bst-v1.tex`
443 - `bath-bst.bib` and `bath-bst-v1.bib`
444 - `bath-bst.ins`
445 * Running `make` generates the above files and also `bath-bst.pdf` and
446 `bath-bst-v1.pdf`. Ensure you have (at least) the [luatexja], [adobemapping]
447 and [ipaex] packages installed first.
448 * Running `make inst` installs the files in the user's TeX tree.
449 You can undo this with `make uninst`.
450 * Running `make install` installs the files in the local TeX tree.
451 You can undo this with `make uninstall`.
452
453 ### Manual way
454
455 You do not need to follow the first step if you downloaded the zip archive from
456 [GitHub]. You do not need to follow the second step if you already have the PDF
457 documentation.
458
459 1. Run `luatex bath-bst.dtx` to generate the source files.
460
461 2. Compile `bath-bst.dtx` with [LuaLaTeX] and BibTeX to generate the
462 documentation. You will need, among other things, the [luatexja],
463 [adobemapping], [ipaex] and [haranoaji] packages installed; this is just for
464 the documentation, not for the BibTeX style itself. To generate the version
465 1 tests and documentation, compile `bath-bst-v1.tex` with LuaLaTeX and
466 BibTeX.
467
468 3. If you are using TeX Live, find your home TeX tree using the following
469 command at the command prompt/terminal:
470
471 ```
472 kpsewhich -var-value=TEXMFHOME
473 ```
474
475 If you are using MikTeX, consult the MikTeX manual entry for [integrating
476 local additions](http://docs.miktex.org/manual/localadditions.html). You
477 can use one of the roots (TeX trees) already defined – preferably one of
478 the User roots – or set up a new one.
479
480 4. Move the files to your TeX tree as follows:
481 - `source/bibtex/bath-bst`:
482 `bath-bst.dtx`,
483 (`bath-bst.ins`)
484 - `bibtex/bst/bath-bst`:
485 `bath.bst`,
486 `bathx.bst`
487 - `doc/bibtex/bath-bst`:
488 `bath-bst.pdf`,
489 `bath-bst-v1.pdf`,
490 `README.md`
491
492 5. You may then have to update your installation's file name database
493 before TeX and friends can see the files.
494
495 [bath-harvard]: https://library.bath.ac.uk/referencing/harvard-bath
496 [BibTeX]: http://ctan.org/pkg/bibtex
497 [GitHub]: https://github.com/alex-ball/bathbib/releases
498 [CTAN]: http://ctan.org/pkg/bath-bst
499 [natbib]: http://www.ctan.org/pkg/natbib
500 [LuaLaTeX]: http://ctan.org/pkg/lualatex-doc
501 [luatexja]: http://ctan.org/pkg/luatexja
502 [adobemapping]: http://ctan.org/pkg/adobemapping
503 [ipaex]: http://ctan.org/pkg/ipaex
504 [haranoaji]: http://ctan.org/pkg/haranoaji
505 %</driver|readme>
506 %<*driver>
507 \end{markdown}
508
509 \section{Choosing which variant to use}
510 %</driver>
511 %<*driver|tex1>
512
513 The data model offered by the standard Bib\TeX\ styles, and even the extended
514 \textsf{natbib} variants, is not really rich enough to support the nuances of
515 the Harvard (Bath) style. This means design decisions have to be made about
516 whether to attempt some level of compatibility with other styles or craft
517 something utterly unique.
518
519 In the first version of \textsf{bath-bst}, the intention was to set things up
520 so that, if the same \texttt{.bib} file was used with a different style, the features
521 peculiar to the Harvard (Bath) style would be ignored and the remaining
522 information would come out in a sensible arrangement. The recommendations of
523 the style's documentation were to use the standard entry types as much as
524 possible (though more semantic aliases were provided), and minimal new fields
525 were introduced. For the more exotic (in Bib\TeX\ terms) demands of the style,
526 extensive use was made of the (standard) \texttt{note} and (non-standard)
527 \texttt{titleaddon} fields to place information properly. If you have written
528 a \texttt{.bib} file according the principles in that first version, the \texttt{bath}
529 style will still work as advertised for you.
530
531 The second version introduced a new variant, \texttt{bathx} (`Bath extended'),
532 which has a different aim. The idea with this one is that \texttt{.bib} files written
533 for this style will be rendered just the same by the companion
534 \textsf{biblatex-bath} style. Where possible, features from the latter have
535 been emulated for Bib\TeX; otherwise, the `cheats' used in this style will
536 also work under \textsf{biblatex}.
537
538 Happily, it has been possible to do this while keeping most of the code in
539 common. The main differences between two versions are as follows:
540
541 \begin{itemize}
542 \item
543 In \texttt{bath}, the \texttt{titleaddon} field is printed bare, while
544 in \texttt{bathx} it is wrapped in square brackets.
545 \item
546 In \texttt{bathx} online items are marked with `[Online]' automatically,
547 while in \texttt{bath} you have to mark them thus yourself.
548 \item
549 In \texttt{bathx} undated items are marked with `n.d.' automatically,
550 while in \texttt{bath} you have to give `n.d.' as the value of \texttt{year}
551 yourself.
552 \end{itemize}
553
554 One other change worth noting regards URL access dates. In version 1, the
555 advice was to put them in \texttt{urldate}. From version 2, the advice is
556 to put them, perhaps counter-intuitively, in \texttt{urlyear}. The reason is that
557 \textsf{biblatex} will complain if the value of \texttt{urldate} is in the wrong
558 format, but will happily print the contents of \texttt{urlyear} literally. If
559 you don't care about \textsf{biblatex} compatibility, you can continue to use
560 \texttt{urldate}.
561
562 %<*driver>
563 \iffalse
564 %</driver>
565 %<*tex1>
566 This document provides a suite of examples that demonstrate and test the
567 \texttt{bath} bibliography style with mostly standard Bib\TeX\ entry types
568 and fields.
569 %</tex1>
570 %<*driver>
571 \fi
572 %</driver>
573
574
575 \section{Using the style}
576
577 To use the style, add these lines to your preamble:
578
579 %<*driver>
580 \begin{tcblisting}{listing only}
581 \usepackage{natbib}
582 \setcitestyle{yysep={;}}
583 \setlength{\bibhang}{0pt}
584 \bibliographystyle{bathx}
585 \end{tcblisting}
586 \iffalse
587 %</driver>
588 %<*tex1>
589 \begin{tcblisting}{listing only}
590 \usepackage{natbib}
591 \setcitestyle{yysep={;}}
592 \setlength{\bibhang}{0pt}
593 \bibliographystyle{bath}
594 \end{tcblisting}
595 %</tex1>
596 %<*driver>
597 \fi
598 %</driver>
599
600 In the unlikely event that you end up printing full references outside the
601 reference list, you may need some extra command definitions:
602
603 \begin{tcblisting}{listing only}
604 \newcommand*{\urlprefix}{Available from: }
605 \newcommand*{\urldateprefix}{Accessed }
606 \end{tcblisting}
607
608 Remember also to specify your \texttt{.bib} file at the end of the document:
609
610 \begin{tcblisting}{listing only}
611 \bibliography{file}
612 \end{tcblisting}
613
614
615 \subsection{Writing a citation}
616
617 To make a citation in the text, use the key that corresponds to the entry in your
618 \texttt{.bib} file. The following examples illustrate the principles laid out in
619 the Harvard (Bath) guide.
620
621 Please refer to the documentation for \href{http://www.ctan.org/pkg/natbib}{\textsf{natbib}}
622 for the full range of commands available for in-text citations. Be aware that the
623 \textsf{natbib} option \texttt{sort} will sort citations in bibliography order,
624 rather than the chronological order demanded by Harvard (Bath) -- so don't use it!
625
626 % \begin{tcblisting}{}
627 % While collections can be supplemented by other means \citep{devlin.etal2021ipp},
628 % the absence of an invisible collection amongst historians is noted by
629 % \citet[p.556]{stieg1981inh}. It may be, as \citet{burchard1965hhl} points out,
630 % that they have no assistants or are reluctant to delegate, or it may be
631 % down to economic factors \citep{adams2009tc1, adams2014tc2, gb.pa2014,
632 % adams2017tc3}\dots
633 % \end{tcblisting}
634
635 \subsubsection{The essentials}
636
637 \begin{description}\tcbset{halign lower=flush left}
638 \item[Name occurring naturally]
639 \begin{tcblisting}{sidebyside}
640 \citet{blockley2021evs} says\dots
641 \end{tcblisting}
642
643 \item[Name not occurring naturally]
644 \begin{tcblisting}{sidebyside}
645 \dots this \citep{blockley2021evs}
646 \end{tcblisting}
647
648 \item[Page information]
649 \begin{tcblisting}{sidebyside}
650 \citet[p.75]{burchard1965hhl}\\
651 \citep[para.4]{manco2013va}\\
652 \citep[00:28:41]{moran2016sol}
653 \end{tcblisting}
654
655 \item[Multiple sources in a single citation]
656 \begin{tcblisting}{sidebyside}
657 \citep{soper1972rbc, burrell1973ist, haurant2004bbh}\\
658 \citep{adams2009tc1, adams2014tc2, adams2017tc3}
659 \end{tcblisting}
660
661 \item[Citing a document cited in another document]
662 \begin{tcblisting}{sidebyside}
663 \citep[Walters, 1883; cited by][p.87]{burrell1973ist}\\
664 \end{tcblisting}
665 \end{description}
666
667 \subsubsection{General rules for authors}
668
669 \begin{description}\tcbset{halign lower=flush left}
670 \item[Corporate author]
671 \begin{tcblisting}{sidebyside}
672 \citep{brbr1965gph}\\
673 \citep{gb.hc2003/04-30}\\
674 \citep{gb.pa2014}
675 \end{tcblisting}
676
677 \item[Corporate author acronyms]
678 \begin{tcblisting}{sidebyside}
679 World Health Organization \citep{who1986nde}
680 \end{tcblisting}
681
682 \item[Multiple sources by same author(s) in same year]
683 \begin{tcblisting}{sidebyside}
684 \citep{stieg1981cer} and \citep{stieg1981inh}
685 \end{tcblisting}
686 \begin{tcblisting}{sidebyside}
687 \citep{jonesNDa} and \citep{jonesNDb}
688 \end{tcblisting}
689
690 \item[Different lead authors with the same surname]
691 \begin{tcblisting}{sidebyside}
692 \citep{wang2018tc} and \citep{wang2020tc}
693 \end{tcblisting}
694
695 \end{description}
696
697 \subsubsection{Multiple authors}
698 \begin{description}\tcbset{halign lower=flush left}
699 \item[Two authors]
700 \begin{tcblisting}{sidebyside}
701 \citep{shah.corrick2016hsc}
702 \end{tcblisting}
703
704 \item[Three authors]
705 \begin{tcblisting}{sidebyside}
706 \citep{devlin.etal2021ipp}
707 \end{tcblisting}
708
709 \item[Four or more authors]
710 \begin{tcblisting}{sidebyside}
711 \citep{solomon.etal2019cbe}
712 \end{tcblisting}
713
714 \item[Groups of authors where different lead authors have the same surname]
715 \begin{tcblisting}{sidebyside}
716 \citep{wang.etal2002tc6} and \citep{wang.etal2002tc7}
717 \end{tcblisting}
718
719 \item[Different groups of authors with the same lead author]
720 \begin{tcblisting}{sidebyside}
721 \citep{smith.etal2020tc8} and \citep{smith.etal2020tc9}
722 \end{tcblisting}
723 \end{description}
724
725 \section{Breaking changes between versions}
726
727 The following sections list implementation changes that might affect the way
728 in which you write your bibliography database files.
729
730 In addition to the changes listed, when upgrading between major versions,
731 you should expect some changes in formatting relating to the evolution of the
732 Harvard (Bath) style itself. Some of the style's internal settings and
733 structures may also change without warning.
734
735 \subsection{Version 3}
736
737 \begin{itemize}
738 \item
739 Journal titles are now coerced to sentence case, so any capital letters you
740 want to keep need to be protected with braces.
741 \item
742 Entries of type \texttt{unpublished} are now marked as unpublished. If you
743 have been using this for an item that should not be marked as unpublished
744 (e.g.~archive photographs, law reports), you can use \texttt{booklet} instead:
745 this is the other entry type (along with \texttt{misc}) that has a
746 \texttt{howpublished} field instead of a \texttt{publisher}.
747 %<tex1> Other entry types may work as well; indeed, some examples below have been updated to use \texttt{manual} or \texttt{report} instead.
748 \item
749 Some changes to the Harvard (Bath) style cannot be applied automatically
750 (e.g.~the update to how standards are referenced), so you may need to update
751 your .bib file accordingly.
752 \end{itemize}
753
754 \subsection{Version 5}
755
756 \begin{itemize}
757 \item
758 In the 2021 revision of the style, the titles of broadcast media (TV, radio)
759 became upright, with series information for titled episodes being italic.
760 %<*driver>
761 To get this new formatting, you must use the \texttt{type} field as shown.
762 %</driver>
763 %<tex1> If you have been using \texttt{booklet} for such entries, you should now use \texttt{misc} instead.
764 \item
765 Series names (except those in \texttt{legislation} and \texttt{jurisdiction}
766 entries) are now coerced to sentence case, so any capital letters you
767 want to keep need to be protected with braces.
768 %<*driver>
769 \item
770 The `[Online]' tag is now also triggered by \texttt{urldate}\slash
771 \texttt{urlyear}. In cases where it occurs directly after the title, it is no longer
772 left behind (after the year) if the title is moved to the head of the reference.
773 \item
774 The \texttt{nameaddon} field is now supported for annotating author lists with,
775 say, a social media handle.
776 \iffalse
777 %</driver>
778 %<*tex1>
779 \item
780 If the title is moved to the head of the reference (before the year),
781 the \texttt{titleaddon} field is now printed directly after it instead of after the year.
782 This supports cases where `[Online]' needs to be printed before the year,
783 but may mean different workarounds are needed for other entries such as anonymous works with translated titles.
784 %</tex1>
785 %<*driver>
786 \fi
787 %</driver>
788 \item
789 The \texttt{article} and \texttt{manual} entry types now support the \texttt{month} field.
790 \item
791 Maps need to be given the \texttt{book} entry type; previously \texttt{manual} was recommended.
792 \end{itemize}
793
794 \subsection{Version 6}
795
796 \begin{itemize}
797 %<*driver>
798 \item
799 Entry type clarifications such as `Photograph' and `Computer program' are now
800 handled differently from translated titles, in particular as regards their
801 position relative to the version, and how they interact with the `[Online]'
802 tag. As a result, they should now be placed in \texttt{entrysubtype} rather
803 than \texttt{titleaddon}.
804 %</driver>
805 \item
806 All elements of the title block (including \texttt{titleaddon},
807 \texttt{version}, and \texttt{entrysubtype}) now move to the head of the
808 reference in the absence of an author\slash editor.
809 \end{itemize}
810
811
812 \section{Examples}
813
814 The examples below are shown in three parts.
815 The first, marked with \faBook, shows an extract from the
816 \href{https://library.bath.ac.uk/referencing/harvard-bath}{\emph{Referencing guide: Harvard Bath}} or
817 \href{https://library.bath.ac.uk/images/referencing}{\emph{Referencing images}}.
818 The second, marked with \faCog, shows the reference as formatted by Bib\TeX.
819 The last shows how the reference was entered in the \texttt{.bib} file.
820 The bottom right corner shows the source of the example:
821 `RX' indicates the `Reference examples (A-Z)' section of the Guide;
822 `WC' indicates the `Write a citation' section of the Guide;
823 `RL' indicates the `Organise a reference list' section of the Guide;
824 `RI' indicates \emph{Referencing images}.
825
826 Some examples are highlighted in
827 \tcbox[colframe=hacked,colback=hacked!5!white,nobeforeafter,size=fbox,tcbox raise base]{orange}.
828 This indicates that some fields have been `abused' to achieve the right effect;
829 in other words, they contain information that does not conform with their intended use.
830 Some others make use of the \texttt{note} and \texttt{titleaddon} fields to achieve
831 the right effect, where other styles might need the information placed differently.
832 Particular care should be taken with such items when switching between different styles,
833 though of course any item might need adjustment to take account of differing conventions.
834
835
836 \subsection{Books and book chapters}
837
838 \subsubsection*{Book with author(s)}
839
840 \begin{bibexbox}<RX>{rang.etal2012rdp}
841 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.
842 \tcblower
843 \begin{Verbatim}
844 %</driver|tex1>
845 %<*driver|bib|tex1|bib1>
846 @book{rang.etal2012rdp,
847 author = {Rang, H. P. and Dale, M. M. and Ritter, J. M. and Flower, R. J. and Henderson, G.},
848 year = {2012},
849 title = {Rang and {Dale's} Pharmacology},
850 edition = {7},
851 address = {Edinburgh},
852 publisher = {Elsevier Churchill Livingstone}}
853 %</driver|bib|tex1|bib1>
854 %<*driver|tex1>
855 \end{Verbatim}
856 \end{bibexbox}
857
858 \begin{bibexbox}<RX>{ou1972em}
859 Open University, 1972. \emph{Electricity and magnetism}. Bletchley: Open University Press.
860 \tcblower
861 \begin{Verbatim}
862 %</driver|tex1>
863 %<*driver|bib|tex1|bib1>
864 @book{ou1972em,
865 author = {{Open University}},
866 year = {1972},
867 title = {Electricity and Magnetism},
868 address = {Bletchley},
869 publisher = {Open University Press}}
870 %</driver|bib|tex1|bib1>
871 %<*driver|tex1>
872 \end{Verbatim}
873 \end{bibexbox}
874
875 \begin{bibexbox}<RX>{solomon.etal2019cbe}
876 Solomon, M.R., Askegaard, S., Hogg, M. and Bamossy, G.J., 2019. \emph{Consumer behaviour: a European perspective}. 7th ed. Harlow: Pearson.
877 \tcblower
878 \begin{Verbatim}
879 %</driver|tex1>
880 %<*driver|bib|tex1|bib1>
881 @book{solomon.etal2019cbe,
882 author = {Solomon, M. R. and Askegaard, S. and Hogg, M. and Bamossy, G. J.},
883 year = {2019},
884 title = {Consumer Behaviour: a {European} Perspective},
885 edition = {7},
886 address = {Harlow},
887 publisher = {Pearson}}
888 %</driver|bib|tex1|bib1>
889 %<*driver|tex1>
890 \end{Verbatim}
891 \end{bibexbox}
892
893
894 \subsubsection*{Book with editor(s) instead of author(s)}
895
896 \begin{bibexbox}<RX>{rothman.etal2008me}
897 Rothman, K.J., Greenland, S. and Lash, T.L., eds, 2008. \emph{Modern epidemiology}. 3rd ed. Philadelphia, Pa.: Lippincott Williams \& Wilkins.
898 \tcblower
899 \begin{Verbatim}
900 %</driver|tex1>
901 %<*driver|bib|tex1|bib1>
902 @book{rothman.etal2008me,
903 editor = {Kenneth J. Rothman and Sander Greenland and Timothy L. Lash},
904 year = {2008},
905 title = {Modern Epidemiology},
906 edition = {3},
907 address = {Philadelphia, Pa.},
908 publisher = {Lippincott Williams \& Wilkins}}
909 %</driver|bib|tex1|bib1>
910 %<*driver|tex1>
911 \end{Verbatim}
912 \end{bibexbox}
913
914 \begin{info}\item
915 Internally, \texttt{collection} is an alias for \texttt{book}.
916 \end{info}
917
918
919 \subsubsection*{Electronic book}
920
921 \begin{bibexbox}<RX>{haynes2014crc}
922 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].
923 \tcblower
924 \begin{Verbatim}
925 %</driver|tex1>
926 %<*driver|bib>
927 @book{haynes2014crc,
928 editor = {Haynes, W. M.},
929 year = {2014},
930 title = {{CRC} Handbook of Chemistry and Physics},
931 edition = {94},
932 address = {Boca Raton, Fla.},
933 publisher = {CRC Press/Taylor and Francis},
934 url = {http://www.hbcpnetbase.com},
935 urlyear = {16 June 2016}}
936 %</driver|bib>
937 %<*driver>
938 \end{Verbatim}
939 \iffalse
940 %</driver>
941 %<*tex1|bib1>
942 @book{haynes2014crc,
943 editor = {Haynes, W. M.},
944 year = {2014},
945 title = {{CRC} Handbook of Chemistry and Physics},
946 titleaddon = {[Online]},
947 edition = {94},
948 address = {Boca Raton, Fla.},
949 publisher = {CRC Press/Taylor and Francis},
950 url = {http://www.hbcpnetbase.com},
951 urldate = {16 June 2016}}
952 %</tex1|bib1>
953 %<*driver|tex1>
954 \end{Verbatim}
955 %<*driver>
956 \fi
957 %</driver>
958 \end{bibexbox}
959
960 \begin{bibexbox}<RX>{blockley2021evs}
961 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].
962 \tcblower
963 \begin{Verbatim}
964 %</driver|tex1>
965 %<*driver|bib>
966 @book{blockley2021evs,
967 author = {Blockley, D.},
968 year = {2021},
969 title = {Engineering: a Very Short Introduction},
970 address = {Oxford},
971 publisher = {Oxford University Press},
972 url = {https://www.amazon.co.uk/kindle},
973 urlyear = {30 June 2021}}
974 %</driver|bib>
975 %<*driver>
976 \end{Verbatim}
977 \iffalse
978 %</driver>
979 %<*tex1|bib1>
980 @book{blockley2021evs,
981 author = {Blockley, D.},
982 year = {2021},
983 title = {Engineering: a Very Short Introduction},
984 titleaddon = {[Online]},
985 address = {Oxford},
986 publisher = {Oxford University Press},
987 url = {https://www.amazon.co.uk/kindle},
988 urldate = {30 June 2021}}
989 %</tex1|bib1>
990 %<*driver|tex1>
991 \end{Verbatim}
992 %<*driver>
993 \fi
994 %</driver>
995 \end{bibexbox}
996
997
998 \subsubsection*{Book known by its title}
999
1000 \begin{info}\item
1001 Unfortunately, to avoid breaking other use cases for the \texttt{book} entry
1002 type, to achieve the following format you must use the non-standard
1003 \texttt{reference} entry type.
1004 \end{info}
1005
1006 \begin{bibexbox}<RX>{bnf2020}
1007 British National Formulary, 2020. 79th ed. London: Pharmaceutical Press.
1008 \tcblower
1009 \begin{Verbatim}
1010 %</driver|tex1>
1011 %<*driver|bib|tex1|bib1>
1012 @reference{bnf2020,
1013 year = {2020},
1014 title = {{British National Formulary}},
1015 edition = {79},
1016 address = {London},
1017 publisher = {Pharmaceutical Press}}
1018 %</driver|bib|tex1|bib1>
1019 %<*driver|tex1>
1020 \end{Verbatim}
1021 \end{bibexbox}
1022
1023 \begin{info}\item
1024 Similarly, to achieve the following formats you must use the non-standard
1025 \texttt{inreference} entry type.
1026 \end{info}
1027
1028 \begin{bibexbox}<RX>{aspirin2020bnf}
1029 British National Formulary, 2020. 79th ed. \emph{Aspirin}. London: Pharmaceutical Press, pp.280--281.
1030 \tcblower
1031 \begin{Verbatim}
1032 %</driver|tex1>
1033 %<*driver|bib|tex1|bib1>
1034 @inreference{aspirin2020bnf,
1035 title = {Aspirin},
1036 year = {2020},
1037 booktitle = {{British National Formulary}},
1038 edition = {79},
1039 address = {London},
1040 publisher = {Pharmaceutical Press},
1041 pages = {280-281}}
1042 %</driver|bib|tex1|bib1>
1043 %<*driver|tex1>
1044 \end{Verbatim}
1045 \end{bibexbox}
1046
1047 \begin{bibexbox}<RX>{aspirin2019bnf}
1048 British National Formulary, 2019. \emph{Aspirin} [Online]. London: Pharmaceutical Press. Available from: \url{https://www.medicinescomplete.com/#/content/bnf/_456850132} [Accessed 26 November 2019].
1049 \tcblower
1050 \begin{Verbatim}
1051 %</driver|tex1>
1052 %<*driver|bib>
1053 @inreference{aspirin2019bnf,
1054 title = {Aspirin},
1055 year = {2019},
1056 booktitle = {{British National Formulary}},
1057 address = {London},
1058 publisher = {Pharmaceutical Press},
1059 url = {https://www.medicinescomplete.com/\#/content/bnf/_456850132},
1060 urlyear = {26 November 2019}}
1061 %</driver|bib>
1062 %<*driver>
1063 \end{Verbatim}
1064 \iffalse
1065 %</driver>
1066 %<*tex1|bib1>
1067 @inreference{aspirin2019bnf,
1068 title = {Aspirin},
1069 titleaddon = {[Online]},
1070 year = {2019},
1071 booktitle = {{British National Formulary}},
1072 address = {London},
1073 publisher = {Pharmaceutical Press},
1074 url = {https://www.medicinescomplete.com/\#/content/bnf/_456850132},
1075 urldate = {26 November 2019}}
1076 %</tex1|bib1>
1077 %<*driver|tex1>
1078 \end{Verbatim}
1079 %<*driver>
1080 \fi
1081 %</driver>
1082 \end{bibexbox}
1083
1084 \begin{info}
1085 %<*driver>
1086 \item
1087 If you are using the same .bib file with Bib\TeX\ and \textsf{biblatex},
1088 one unfortunate difference is that you must escape the hash symbol inside
1089 URLs with Bib\TeX\, but you must not escape it inside a URL with
1090 \textsf{biblatex}.
1091 %</driver>
1092 \item
1093 Internally, \texttt{inreference} is an alias for \texttt{incollection}.
1094 %<*driver>
1095 Use \texttt{inreference} if you need compatibility with \textsf{biblatex-bath}.
1096 %</driver>
1097 \item
1098 The style ensures the \texttt{booktitle} is used in title citation commands.
1099 \end{info}
1100
1101 \begin{tcblisting}{}
1102 \cite{aspirin2019bnf}, \citet{bnf2020}, \citet{aspirin2020bnf}.
1103 \end{tcblisting}
1104
1105 \subsubsection*{Chapter\slash paper from a collection (by different authors) in an edited book}
1106
1107 \begin{bibexbox}<RL>{burchard1965hhl}
1108 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.
1109 \tcblower
1110 \begin{Verbatim}
1111 %</driver|tex1>
1112 %<*driver|bib|tex1|bib1>
1113 @incollection{burchard1965hhl,
1114 author = {Burchard, J. E.},
1115 year = {1965},
1116 title = {How Humanists use a Library},
1117 editor = {C. F. J. Overhage and J. R. Harman},
1118 booktitle = {Intrex: report on a planning conference and information transfer experiments},
1119 address = {Cambridge, Mass.},
1120 publisher = {MIT Press},
1121 pages = {41-87}}
1122 %</driver|bib|tex1|bib1>
1123 %<*driver|tex1>
1124 \end{Verbatim}
1125 \end{bibexbox}
1126
1127 \begin{bibexbox}<RX>{reid1967ptp}
1128 Reid, D.R., 1967. Physical testing of polymer films. In: S.H. Pinner, ed. \emph{Modern packaging films}. London: Butterworths, pp.143--183.
1129 \tcblower
1130 \begin{Verbatim}
1131 %</driver|tex1>
1132 %<*driver|bib|tex1|bib1>
1133 @incollection{reid1967ptp,
1134 author = {D. R. Reid},
1135 year = {1967},
1136 title = {Physical Testing of Polymer Films},
1137 editor = {S. H. Pinner},
1138 booktitle = {Modern Packaging Films},
1139 address = {London},
1140 publisher = {Butterworths},
1141 pages = {143-183}}
1142 %</driver|bib|tex1|bib1>
1143 %<*driver|tex1>
1144 \end{Verbatim}
1145 \end{bibexbox}
1146
1147
1148 \subsection{Articles and periodicals}
1149
1150 \subsubsection*{Journal article}
1151
1152 \begin{bibexbox}<RL>{stieg1981cer}
1153 Stieg, M.F., 1981a. Continuing education and the reference librarian in the academic and research library. \emph{Library journal}, 105(22), pp.2547--2551.
1154 \tcblower
1155 \begin{Verbatim}
1156 %</driver|tex1>
1157 %<*driver|bib|tex1|bib1>
1158 @article{stieg1981cer,
1159 author = {Stieg, M. F.},
1160 year = {1981},
1161 title = {Continuing Education and the Reference Librarian in the Academic and Research Library},
1162 journal = {Library Journal},
1163 volume = {105},
1164 number ={22},
1165 pages = {2547-2551}}
1166 %</driver|bib|tex1|bib1>
1167 %<*driver|tex1>
1168 \end{Verbatim}
1169 \end{bibexbox}
1170
1171 \begin{bibexbox}<RL>{stieg1981inh}
1172 Stieg, M.F., 1981b. The information needs of historians. \emph{College and research libraries}, 42(6), pp.549--560.
1173 \tcblower
1174 \begin{Verbatim}
1175 %</driver|tex1>
1176 %<*driver|bib|tex1|bib1>
1177 @article{stieg1981inh,
1178 author = {Stieg, M. F.},
1179 year = {1981},
1180 title = {The Information Needs of Historians},
1181 journal = {College and Research Libraries},
1182 volume = {42},
1183 number ={6},
1184 pages = {549-560}}
1185 %</driver|bib|tex1|bib1>
1186 %<*driver|tex1>
1187 \end{Verbatim}
1188 \end{bibexbox}
1189
1190 \begin{bibexbox}<RX>{newman2010mcb}
1191 Newman, R., 2010. Malaria control beyond 2010. \emph{British medical journal}, 341(7765), pp.157--208.
1192 \tcblower
1193 \begin{Verbatim}
1194 %</driver|tex1>
1195 %<*driver|bib|tex1|bib1>
1196 @article{newman2010mcb,
1197 author = {Newman, R.},
1198 year = {2010},
1199 title = {Malaria control beyond 2010},
1200 journal = {{British} Medical Journal},
1201 volume = {341},
1202 number = {7765},
1203 pages = {157-208}}
1204 %</driver|bib|tex1|bib1>
1205 %<*driver|tex1>
1206 \end{Verbatim}
1207 \end{bibexbox}
1208
1209 \begin{bibexbox}<RX>{wetzstein.etal2020iai}
1210 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.
1211 \tcblower
1212 \begin{Verbatim}
1213 %</driver|tex1>
1214 %<*driver|bib|tex1|bib1>
1215 @article{wetzstein.etal2020iai,
1216 author = {Wetzstein, G. and Ozcan, A. and Gigan, S. and Fan, S. and
1217 Englund, D. and Soljacic, M. and Denz, C. and Miller, D. A. B. and
1218 Psaltis, D.},
1219 year = {2020},
1220 title = {Inference in Artificial Intelligence with Deep Optics and Photonics},
1221 journal = {Nature},
1222 volume = {588},
1223 number = {7836},
1224 pages = {39-47}}
1225 %</driver|bib|tex1|bib1>
1226 %<*driver|tex1>
1227 \end{Verbatim}
1228 \end{bibexbox}
1229
1230
1231
1232 \subsubsection*{Electronic journal article}
1233
1234 \begin{bibexbox}<RX>{devlin.etal2021ipp}
1235 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].
1236 \tcblower
1237 \begin{Verbatim}
1238 %</driver|tex1>
1239 %<*driver|bib>
1240 @article{devlin.etal2021ipp,
1241 author = {Devlin, S. M. and Martin, A. and Ostrovnaya, I.},
1242 year = {2021},
1243 title = {Identifying Prognostic Pairwise Relationships Among Bacterial
1244 Species in Microbiome Studies},
1245 journal = {{PLOS} Computational Biology},
1246 volume = {17},
1247 number = {11},
1248 url = {https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009501},
1249 urlyear = {9 December 2021}}
1250 %</driver|bib>
1251 %<*driver>
1252 \end{Verbatim}
1253 \iffalse
1254 %</driver>
1255 %<*tex1|bib1>
1256 @article{devlin.etal2021ipp,
1257 author = {Devlin, S. M. and Martin, A. and Ostrovnaya, I.},
1258 year = {2021},
1259 title = {Identifying Prognostic Pairwise Relationships Among Bacterial
1260 Species in Microbiome Studies},
1261 journal = {{PLOS} Computational Biology \textup{[Online]}},
1262 volume = {17},
1263 number = {11},
1264 url = {https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1009501},
1265 urldate = {9 December 2021}}
1266 %</tex1|bib1>
1267 %<*driver|tex1>
1268 \end{Verbatim}
1269 %<*driver>
1270 \fi
1271 %</driver>
1272 \end{bibexbox}
1273
1274 \begin{bibexbox}<RX>{steward.etal2020eys}
1275 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].
1276 \tcblower
1277 \begin{Verbatim}
1278 %</driver|tex1>
1279 %<*driver|bib>
1280 @article{steward.etal2020eys,
1281 author = {Steward, S. and Connelly, D. and Robinson, J.},
1282 year = {2020},
1283 title = {Everything You Should Know About the Coronavirus Outbreak},
1284 journal = {The Pharmaceutical Journal},
1285 url = {https://www.pharmaceutical-journal.com/news-and-analysis/features/everything-you-should-know-about-the-coronavirus-outbreak/20207629.article},
1286 urlyear = {30 April 2020}}
1287 %</driver|bib>
1288 %<*driver>
1289 \end{Verbatim}
1290 \iffalse
1291 %</driver>
1292 %<*tex1|bib1>
1293 @article{steward.etal2020eys,
1294 author = {Steward, S. and Connelly, D. and Robinson, J.},
1295 year = {2020},
1296 title = {Everything You Should Know About the Coronavirus Outbreak},
1297 journal = {The Pharmaceutical Journal \textup{[Online]}},
1298 url = {https://www.pharmaceutical-journal.com/news-and-analysis/features/everything-you-should-know-about-the-coronavirus-outbreak/20207629.article},
1299 urldate = {30 April 2020}}
1300 %</tex1|bib1>
1301 %<*driver|tex1>
1302 \end{Verbatim}
1303 %<*driver>
1304 \fi
1305 %</driver>
1306 \end{bibexbox}
1307
1308 %<*driver>
1309 \iffalse
1310 %</driver>
1311 %<*tex1>
1312 \begin{hacks}\item
1313 With most styles, you would put `in press' or `preprint' as the
1314 \texttt{year} for articles that have yet to be officially published, but for
1315 this style you need to put it in \texttt{volume}. If you would rather lose
1316 this information when switching to a different style than have it incorrectly
1317 placed, you can use the \texttt{pubstate} field from \textsf{biblatex}
1318 instead. Use the keyword \texttt{inpress} for `in press' and
1319 \texttt{inpreparation} or \texttt{submitted} (whichever is more accurate) for
1320 `preprint'.
1321
1322 \begin{tcolorbox}%
1323 [ colframe = Slate
1324 , colback = white
1325 , fontupper = \footnotesize
1326 ]
1327 \begin{Verbatim}
1328 pubstate = {inpress},
1329 \end{Verbatim}
1330 \end{tcolorbox}
1331 \end{hacks}
1332
1333 %</tex1>
1334 %<*driver>
1335 \fi
1336 \begin{tips}\item
1337 If citing an article yet to be officially published, use the \texttt{pubstate}
1338 field (from \textsf{biblatex}) with the keyword \texttt{inpress} for `in press'
1339 and \texttt{inpreparation} or \texttt{submitted} (whichever is more accurate)
1340 for `preprint'.
1341 \end{tips}
1342
1343 \begin{bibexbox}<RX>{liontou.etal2019dra}
1344 %</driver>
1345 %<tex1>\begin{bibexbox}(hacked)<RX>{liontou.etal2019dra}
1346 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].
1347 \tcblower
1348 \begin{Verbatim}
1349 %</driver|tex1>
1350 %<*driver|bib>
1351 @article{liontou.etal2019dra,
1352 author = {Liontou, C. and Kontopodis, E. and Oikonomidis, N. and Maniotis, C. and
1353 Tassopoulos, A. and Tsiafoutis, I. and Lazaris, E. and Koutouzis, M.},
1354 year = {2019},
1355 title = {Distal Radial Access: a Review Article},
1356 journal = {Cardiovascular Revascularization Medicine},
1357 pubstate = {inpress},
1358 url = {https://www.sciencedirect.com/science/article/pii/S1553838919303367},
1359 urlyear = {19 June 2019}}
1360 %</driver|bib>
1361 %<*driver>
1362 \end{Verbatim}
1363 \iffalse
1364 %</driver>
1365 %<*tex1|bib1>
1366 @article{liontou.etal2019dra,
1367 author = {Liontou, C. and Kontopodis, E. and Oikonomidis, N. and Maniotis, C. and
1368 Tassopoulos, A. and Tsiafoutis, I. and Lazaris, E. and Koutouzis, M.},
1369 year = {2019},
1370 title = {Distal Radial Access: a Review Article},
1371 journal = {Cardiovascular revascularization medicine \textup{[Online]}},
1372 volume = {in press},
1373 url = {https://www.sciencedirect.com/science/article/pii/S1553838919303367},
1374 urldate = {19 June 2019}}
1375 %</tex1|bib1>
1376 %<*driver|tex1>
1377 \end{Verbatim}
1378 %<*driver>
1379 \fi
1380 %</driver>
1381 \end{bibexbox}
1382
1383
1384 \subsubsection*{Preprint or trial study in a digital repository}
1385
1386 \begin{bibexbox}<RX>{shah.corrick2016hsc}
1387 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].
1388 \tcblower
1389 \begin{Verbatim}
1390 %</driver|tex1>
1391 %<*driver|bib>
1392 @report{shah.corrick2016hsc,
1393 author = {Shah, I. and Corrick, I.},
1394 year = {2016},
1395 title = {How should central banks respond to non-neutral inflation expectations?},
1396 address = {Bath},
1397 institution = {University of Bath},
1398 library = {OPUS},
1399 url = {http://opus.bath.ac.uk},
1400 urlyear = {4 May 2016}}
1401 %</driver|bib>
1402 %<*driver>
1403 \end{Verbatim}
1404 \iffalse
1405 %</driver>
1406 %<*tex1|bib1>
1407 @techreport{shah.corrick2016hsc,
1408 author = {Shah, I. and Corrick, I.},
1409 year = {2016},
1410 title = {How should central banks respond to non-neutral inflation expectations?},
1411 address = {Bath},
1412 institution = {University of Bath},
1413 note = {\emph{OPUS} [Online]},
1414 url = {http://opus.bath.ac.uk},
1415 urldate = {4 May 2016}}
1416 %</tex1|bib1>
1417 %<*driver|tex1>
1418 \end{Verbatim}
1419 %<*driver>
1420 \fi
1421 %</driver>
1422 \end{bibexbox}
1423
1424 \begin{tips}\item
1425 The Harvard (Bath) style treats preprints as grey literature, and so the
1426 \texttt{techreport} entry type (or its alias \texttt{report}) is the best match
1427 semantically.
1428 \item
1429 %<*driver>
1430 Use \texttt{library} to specify the name of the preprint repository.
1431 Note that the workaround in \texttt{bath.bst} of using \texttt{note} instead
1432 does not work in \texttt{bathx.bst}.
1433 \iffalse
1434 %</driver>
1435 %<*tex1>
1436 Use \texttt{note} to specify the name of the preprint repository.
1437 If you don't want this information showing up in other Bib\TeX\ styles,
1438 or you think you might want to switch to using \texttt{bathx.bst} later,
1439 use the \texttt{library} field instead.
1440 %</tex1>
1441 %<*driver>
1442 \fi
1443 %</driver>
1444 \end{tips}
1445
1446 \begin{bibexbox}<RX>{ganju2021sed}
1447 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].
1448 \tcblower
1449 \begin{Verbatim}
1450 %</driver|tex1>
1451 %<*driver|bib>
1452 @report{ganju2021sed,
1453 author = {Ganju, V.},
1454 year = {2021},
1455 title = {A study of {EnGeneIC} {Dream} {Vectors} {(EDV's)} packaged with the chemotherapy,
1456 {E-EDV-D682} given simultaneously as non-targeted {EDVs} carrying an immune enhancer
1457 called {EDV-GC}, in participants with advanced pancreatic and other cancers whose disease
1458 has progressed after one or two treatment regimes, or where other standard therapies are
1459 not appropriate},
1460 address = {Sydney},
1461 institution = {University of Sydney},
1462 library = {Australian and New Zealand Clinical Trials Registry},
1463 url = {http://www.anzctr.org.au/Trial/Registration/TrialReview.aspx?id=365258},
1464 urlyear = {29 April 2021}}
1465 %</driver|bib>
1466 %<*driver>
1467 \end{Verbatim}
1468 \iffalse
1469 %</driver>
1470 %<*tex1|bib1>
1471 @techreport{ganju2021sed,
1472 author = {Ganju, V.},
1473 year = {2021},
1474 title = {A study of {EnGeneIC} {Dream} {Vectors} {(EDV's)} packaged with the chemotherapy,
1475 {E-EDV-D682} given simultaneously as non-targeted {EDVs} carrying an immune enhancer
1476 called {EDV-GC}, in participants with advanced pancreatic and other cancers whose disease
1477 has progressed after one or two treatment regimes, or where other standard therapies are
1478 not appropriate},
1479 address = {Sydney},
1480 institution = {University of Sydney},
1481 note = {\emph{Australian and New Zealand Clinical Trials Registry} [Online]},
1482 url = {http://www.anzctr.org.au/Trial/Registration/TrialReview.aspx?id=365258},
1483 urldate = {29 April 2021}}
1484 %</tex1|bib1>
1485 %<*driver|tex1>
1486 \end{Verbatim}
1487 %<*driver>
1488 \fi
1489 %</driver>
1490 \end{bibexbox}
1491
1492
1493 \subsubsection*{Newspaper article}
1494
1495 \begin{hacks}\item
1496 Give the issue's day and month as the \texttt{month} or \texttt{volume}.
1497 \end{hacks}
1498
1499 \begin{bibexbox}(hacked)<RX>{haurant2004bbh}
1500 Haurant, S., 2004. Britain's borrowing hits £1 trillion. \emph{The Guardian}, 29 July, p.16c.
1501 \tcblower
1502 \begin{Verbatim}
1503 %</driver|tex1>
1504 %<*driver|bib|tex1|bib1>
1505 @article{haurant2004bbh,
1506 author = {Haurant, S.},
1507 year = {2004},
1508 title = {Britain's Borrowing Hits \pounds 1 Trillion},
1509 journal = {The {Guardian}},
1510 month = {{29 July}},
1511 pages = {16c}}
1512 %</driver|bib|tex1|bib1>
1513 %<*driver|tex1>
1514 \end{Verbatim}
1515 \end{bibexbox}
1516
1517 %<*driver>
1518 \begin{info}\item
1519 The extra braces around the \texttt{month} field aren't necessary with Bib\TeX,
1520 but are needed if you want compatibility with \textsf{biblatex}.
1521 \end{info}
1522 %</driver>
1523
1524
1525 \begin{bibexbox}(hacked)<RX>{independent1992pub}
1526 The Independent, 1992. Picking up the bills. \emph{The Independent}, 4 June, p.28a.
1527 \tcblower
1528 \begin{Verbatim}
1529 %</driver|tex1>
1530 %<*driver|bib|tex1|bib1>
1531 @article{independent1992pub,
1532 author = {{The Independent}},
1533 year = {1992},
1534 title = {Picking Up the Bills},
1535 journal = {The {Independent}},
1536 month = {{4 June}},
1537 pages = {28a}}
1538 %</driver|bib|tex1|bib1>
1539 %<*driver|tex1>
1540 \end{Verbatim}
1541 \end{bibexbox}
1542
1543 \begin{bibexbox}(hacked)<RX>{cogley2020ccs}
1544 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].
1545 \tcblower
1546 \begin{Verbatim}
1547 %</driver|tex1>
1548 %<*driver|bib>
1549 @article{cogley2020ccs,
1550 author = {Cogley, M.},
1551 year = {2020},
1552 title = {Corporate Confidence Slumps to Record Low},
1553 journal = {{The Telegraph}},
1554 volume = {4 May},
1555 url = {https://www.telegraph.co.uk/business/2020/05/03/corporate-confidence-slumps-all-time-low/},
1556 urlyear = {5 May 2020}}
1557 %</driver|bib>
1558 %<*driver>
1559 \end{Verbatim}
1560 \iffalse
1561 %</driver>
1562 %<*tex1|bib1>
1563 @article{cogley2020ccs,
1564 author = {Cogley, M.},
1565 year = {2020},
1566 title = {Corporate Confidence Slumps to Record Low},
1567 journal = {{The Telegraph} \textup{[Online]}},
1568 volume = {4 May},
1569 url = {https://www.telegraph.co.uk/business/2020/05/03/corporate-confidence-slumps-all-time-low/},
1570 urldate = {5 May 2020}}
1571 %</tex1|bib1>
1572 %<*driver|tex1>
1573 \end{Verbatim}
1574 %<*driver>
1575 \fi
1576 %</driver>
1577 \end{bibexbox}
1578
1579
1580 \subsection{Conference papers}
1581
1582 \begin{info}\item
1583 As in the standard Bib\TeX\ styles, \texttt{conference} is a legacy (and highly deprecated) alias for \texttt{inproceedings}.
1584 \end{info}
1585
1586 \subsubsection*{Conference paper (when proceedings have a named editor)}
1587
1588 \begin{bibexbox}<RX>{crawford1965oim}
1589 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.
1590 \tcblower
1591 \begin{Verbatim}
1592 %</driver|tex1>
1593 %<*driver|bib>
1594 @inproceedings{crawford1965oim,
1595 author = {Crawford, G. I.},
1596 year = {1965},
1597 title = {Oxygen in Metals},
1598 editor = {J. M. A. Lenihan and S. J. Thompson},
1599 booktitle = {Activation Analysis: Proceedings of a {NATO} {Advanced} {Study} {Institute}},
1600 eventyear = {2--4 August 1964},
1601 venue = {Glasgow},
1602 address = {London},
1603 publisher = {Academic Press},
1604 pages = {113-118}}
1605 %</driver|bib>
1606 %<*driver>
1607 \end{Verbatim}
1608 \iffalse
1609 %</driver>
1610 %<*tex1|bib1>
1611 @inproceedings{crawford1965oim,
1612 author = {Crawford, G. I.},
1613 year = {1965},
1614 title = {Oxygen in Metals},
1615 editor = {J. M. A. Lenihan and S. J. Thompson},
1616 booktitle = {Activation Analysis: Proceedings of a {NATO} {Advanced} {Study} {Institute}},
1617 venue = {2--4 August 1964, Glasgow},
1618 address = {London},
1619 publisher = {Academic Press},
1620 pages = {113-118}}
1621 %</tex1|bib1>
1622 %<*driver|tex1>
1623 \end{Verbatim}
1624 %<*driver>
1625 \fi
1626 %</driver>
1627 \end{bibexbox}
1628
1629
1630 \subsubsection*{Conference paper (when proceedings have no named editor or are part of a major series)}
1631
1632 \begin{bibexbox}<RX>{soper1972rbc}
1633 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.
1634 \tcblower
1635 \begin{Verbatim}
1636 %</driver|tex1>
1637 %<*driver|bib>
1638 @inproceedings{soper1972rbc,
1639 author = {Soper, D.},
1640 year = {1972},
1641 title = {Review of Bracken Control Experiments with Asulam},
1642 booktitle = {Proceedings of the 11th {British} {Weed} {Control} {Conference}},
1643 eventyear = {15--17 November 1972},
1644 venue = {Brighton},
1645 address = {Brighton},
1646 publisher = {University of Sussex},
1647 pages = {24-31}}
1648 %</driver|bib>
1649 %<*driver>
1650 \end{Verbatim}
1651 \iffalse
1652 %</driver>
1653 %<*tex1|bib1>
1654 @inproceedings{soper1972rbc,
1655 author = {Soper, D.},
1656 year = {1972},
1657 title = {Review of Bracken Control Experiments with Asulam},
1658 booktitle = {Proceedings of the 11th {British} {Weed} {Control} {Conference}},
1659 venue = {15--17 November 1972, Brighton},
1660 address = {Brighton},
1661 publisher = {University of Sussex},
1662 pages = {24-31}}
1663 %</tex1|bib1>
1664 %<*driver|tex1>
1665 \end{Verbatim}
1666 %<*driver>
1667 \fi
1668 %</driver>
1669 \end{bibexbox}
1670
1671
1672 \subsection{Grey literature}
1673
1674 \subsubsection*{Thesis/dissertation}
1675
1676 \begin{bibexbox}<RX>{burrell1973ist}
1677 Burrell, J.G., 1973. \emph{The importance of school tours in education}. Thesis (M.A.). Queen's University, Belfast.
1678 \tcblower
1679 \begin{Verbatim}
1680 %</driver|tex1>
1681 %<*driver|bib|tex1|bib1>
1682 @mastersthesis{burrell1973ist,
1683 author = {Burrell, J. G.},
1684 year = {1973},
1685 title = {The Importance of School Tours in Education},
1686 type = {Thesis ({M.A.})},
1687 school = {Queen's University, Belfast}}
1688 %</driver|bib|tex1|bib1>
1689 %<*driver|tex1>
1690 \end{Verbatim}
1691 \end{bibexbox}
1692
1693 \begin{info}\item
1694 Internally, \texttt{thesis} is an alias for \texttt{phdthesis}.
1695 %<*driver>
1696 If you need compatibility with \textsf{biblatex-bath} and don't want to display a thesis type, use \texttt{thesis}.
1697 %</driver>
1698 \end{info}
1699
1700 \subsubsection*{Report, working paper, or research briefing}
1701
1702 \begin{bibexbox}<RX>{unesco1993gip}
1703 UNESCO, 1993. \emph{General information programme and UNISIST}\@. (PGI-93/WS/22). Paris: UNESCO.
1704 \tcblower
1705 \begin{Verbatim}
1706 %</driver|tex1>
1707 %<*driver|bib>
1708 @report{unesco1993gip,
1709 author = {{UNESCO}},
1710 year = {1993},
1711 title = {General Information Programme and {UNISIST}},
1712 address = {Paris},
1713 institution = {UNESCO},
1714 number = {PGI-93/WS/22}}
1715 %</driver|bib>
1716 %<*driver>
1717 \end{Verbatim}
1718 \iffalse
1719 %</driver>
1720 %<*tex1|bib1>
1721 @techreport{unesco1993gip,
1722 author = {{UNESCO}},
1723 year = {1993},
1724 title = {General Information Programme and {UNISIST}},
1725 address = {Paris},
1726 institution = {UNESCO},
1727 number = {PGI-93/WS/22}}
1728 %</tex1|bib1>
1729 %<*driver|tex1>
1730 \end{Verbatim}
1731 %<*driver>
1732 \fi
1733 %</driver>
1734 \end{bibexbox}
1735
1736 \begin{bibexbox}<RX>{bre2007dqb}
1737 BRE, 2007. \emph{Designing quality buildings: a BRE guide}. (Report 497). Bracknell: BRE.
1738 \tcblower
1739 \begin{Verbatim}
1740 %</driver|tex1>
1741 %<*driver|bib|tex1|bib1>
1742 @techreport{bre2007dqb,
1743 author = {{BRE}},
1744 year = {2007},
1745 title = {Designing Quality Buildings: a {BRE} Guide},
1746 address = {Bracknell},
1747 institution = {BRE},
1748 type = {Report},
1749 number = {497}}
1750 %</driver|bib|tex1|bib1>
1751 %<*driver|tex1>
1752 \end{Verbatim}
1753 \end{bibexbox}
1754
1755 \begin{bibexbox}<RX>{deneulin.dinerstein2010hms}
1756 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.
1757 \tcblower
1758 \begin{Verbatim}
1759 %</driver|tex1>
1760 %<*driver|bib>
1761 @report{deneulin.dinerstein2010hms,
1762 author = {Deneulin, S. and Dinerstein, A. C.},
1763 year = {2010},
1764 title = {Hope Movements: Social Movements in the Pursuit of Human Development},
1765 address = {Bath},
1766 institution = {University of Bath},
1767 series = {Bath Papers in International Development and Wellbeing},
1768 number = {no.~8}}
1769 %</driver|bib>
1770 %<*driver>
1771 \end{Verbatim}
1772 \iffalse
1773 %</driver>
1774 %<*tex1|bib1>
1775 @techreport{deneulin.dinerstein2010hms,
1776 author = {Deneulin, S. and Dinerstein, A. C.},
1777 year = {2010},
1778 title = {Hope Movements: Social Movements in the Pursuit of Human Development},
1779 address = {Bath},
1780 institution = {University of Bath},
1781 number = {Bath papers in international development and wellbeing, no.~8}}
1782 %</tex1|bib1>
1783 %<*driver|tex1>
1784 \end{Verbatim}
1785 %<*driver>
1786 \fi
1787 %</driver>
1788 \end{bibexbox}
1789
1790 \begin{info}\item
1791 Internally, \texttt{report} is an alias for \texttt{techreport}.
1792 %<*driver>
1793 If you need compatibility with \textsf{biblatex-bath} and don't want to display a report type, use \texttt{report}.
1794 \item
1795 The style inserts a comma between the \texttt{series} and \texttt{number}
1796 fields, but does not insert one between \texttt{type} and \texttt{number}.
1797 %</driver>
1798 \end{info}
1799
1800 %<*driver>
1801 \begin{bibexbox}<WC>{who1986nde}
1802 %</driver>
1803 %<tex1>\begin{bibexbox}(hacked)<WC>{who1986nde}
1804 WHO (World Health Organization), 1986. \emph{Nutrition and development in East Africa}. Geneva: WHO.
1805 \tcblower
1806 \begin{Verbatim}
1807 %</driver|tex1>
1808 %<*driver|bib>
1809 @report{who1986nde,
1810 author = {{World Health Organization}},
1811 shortauthor = {WHO},
1812 title = {Nutrition and Development in {East Africa}},
1813 year = {1986},
1814 address = {Geneva},
1815 institution = {WHO}}
1816 %</driver|bib>
1817 %<*driver>
1818 \end{Verbatim}
1819 \iffalse
1820 %</driver>
1821 %<*tex1|bib1>
1822 @report{who1986nde,
1823 author = {\noop{w}{(World Health Organization)} WHO},
1824 title = {Nutrition and Development in {East Africa}},
1825 year = {1986},
1826 address = {Geneva},
1827 institution = {WHO}}
1828 %</tex1|bib1>
1829 %<*driver|tex1>
1830 \end{Verbatim}
1831 %<*driver>
1832 \fi
1833 %</driver>
1834 \end{bibexbox}
1835
1836 %</driver|tex1>
1837 %<*driver>
1838 \begin{tips}\item
1839 To abbreviate any of the names in the \texttt{author} field
1840 (or \texttt{editor}, if that appears at the head of the reference),
1841 provide a \texttt{shortauthor} (\texttt{shorteditor}) field.
1842 This should contain the same set of names as the \texttt{author}
1843 (\texttt{editor}) field: replace long names with their
1844 abbreviations and leave the others as they are.
1845 \end{tips}
1846 \iffalse
1847 %</driver>
1848 %<*tex1>
1849 \begin{tips}\item
1850 The above example tricks Bib\TeX\ into treating the expansion of
1851 the abbreviation as its `von' part. This requires the use of a command that
1852 simply gobbles its argument, which you have to define yourself:
1853
1854 \begin{tcblisting}{listing only}
1855 \newcommand*{\noop}[1]{}
1856 \end{tcblisting}
1857
1858 For the trick to work, the argument you give to \lstinline[style=dtxlatex]|\noop|
1859 must be lowercase, but otherwise it can be anything you like.
1860 \end{tips}
1861 %</tex1>
1862 %<*driver>
1863 \fi
1864 %</driver>
1865 %<*driver|tex1>
1866
1867 \subsubsection*{Standard}
1868
1869 \begin{bibexbox}<RX>{bs5605:1990}
1870 BSI, 1990. \emph{BS 5605:1990 Recommendations for citing and referencing
1871 published material}. London: BSI.
1872 \tcblower
1873 \begin{Verbatim}
1874 %</driver|tex1>
1875 %<*driver|bib>
1876 @standard{bs5605:1990,
1877 author = {{BSI}},
1878 year = {1990},
1879 title = {{BS}~5605:1990 {Recommendations} for Citing and Referencing Published Material},
1880 address = {London},
1881 organization = {BSI}}
1882 %</driver|bib>
1883 %<*driver>
1884 \end{Verbatim}
1885 \iffalse
1886 %</driver>
1887 %<*tex1|bib1>
1888 @manual{bs5605:1990,
1889 author = {{BSI}},
1890 year = {1990},
1891 title = {{BS}~5605:1990 {Recommendations} for Citing and Referencing Published Material},
1892 address = {London},
1893 organization = {BSI}}
1894 %</tex1|bib1>
1895 %<*driver|tex1>
1896 \end{Verbatim}
1897 %<*driver>
1898 \fi
1899 %</driver>
1900 \end{bibexbox}
1901
1902 \begin{bibexbox}<RX>{astm.d1655}
1903 ASTM, 2019. \emph{ASTM D1655 - 19 Standard specification for aviation
1904 turbine fuels}. West Conshohocken, Pa.: ASTM.
1905 \tcblower
1906 \begin{Verbatim}
1907 %</driver|tex1>
1908 %<*driver|bib>
1909 @standard{astm.d1655,
1910 author = {{ASTM}},
1911 year = {2019},
1912 title = {{ASTM~D1655} - 19 {Standard} Specification for Aviation Turbine Fuels},
1913 address = {West Conshohocken, Pa.},
1914 organization = {ASTM}}
1915 %</driver|bib>
1916 %<*driver>
1917 \end{Verbatim}
1918 \iffalse
1919 %</driver>
1920 %<*tex1|bib1>
1921 @manual{astm.d1655,
1922 author = {{ASTM}},
1923 year = {2019},
1924 title = {{ASTM~D1655} - 19 {Standard} Specification for Aviation Turbine Fuels},
1925 address = {West Conshohocken, Pa.},
1926 organization = {ASTM}}
1927 %</tex1|bib1>
1928 %<*driver|tex1>
1929 \end{Verbatim}
1930 %<*driver>
1931 \fi
1932 %</driver>
1933 \end{bibexbox}
1934
1935 \begin{info}\item Internally, \texttt{standard} is an alias for \texttt{manual}.\end{info}
1936
1937
1938 \subsubsection*{Patent}
1939
1940 \begin{bibexbox}<RX>{pm1981opa}
1941 Phillipp Morris Inc., 1981. \emph{Optical perforating apparatus and system}. European patent application 0021165A1. 1981-01-07.
1942 \tcblower
1943 \begin{Verbatim}
1944 %</driver|tex1>
1945 %<*driver|bib>
1946 @patent{pm1981opa,
1947 author = {{Phillipp Morris Inc.}},
1948 year = {1981},
1949 title = {Optical perforating apparatus and system},
1950 type = {European patent application},
1951 number = {0021165A1. 1981-01-07}}
1952 %</driver|bib>
1953 %<*driver>
1954 \end{Verbatim}
1955 \iffalse
1956 %</driver>
1957 %<*tex1|bib1>
1958 @manual{pm1981opa,
1959 author = {{Phillipp Morris Inc.}},
1960 year = {1981},
1961 title = {Optical perforating apparatus and system},
1962 type = {European patent application},
1963 number = {0021165A1. 1981-01-07}}
1964 %</tex1|bib1>
1965 %<*driver|tex1>
1966 \end{Verbatim}
1967 %<*driver>
1968 \fi
1969 %</driver>
1970 \end{bibexbox}
1971
1972 \begin{info}\item
1973 Internally, \texttt{patent} is an alias for \texttt{manual}.
1974 \end{info}
1975
1976
1977 \subsubsection*{Unpublished written material and personal communications}
1978
1979 \begin{bibexbox}<RX>{harris2013fgr}
1980 Harris, G., 2013. \emph{Focus group recommendations: internal task group
1981 report}. Unpublished.
1982 \tcblower
1983 \begin{Verbatim}
1984 %</driver|tex1>
1985 %<*driver|bib|tex1|bib1>
1986 @unpublished{harris2013fgr,
1987 author = {Harris, G.},
1988 year = {2013},
1989 title = {Focus group recommendations: internal task group report}}
1990 %</driver|bib|tex1|bib1>
1991 %<*driver|tex1>
1992 \end{Verbatim}
1993 \end{bibexbox}
1994
1995 \begin{bibexbox}<RX>{hadley2015bir}
1996 Hadley, S., 2015. \emph{Biomechanics: introductory reading, BM289: sport
1997 biomechanics}. University of Bath. Unpublished.
1998 \tcblower
1999 \begin{Verbatim}
2000 %</driver|tex1>
2001 %<*driver|bib|tex1|bib1>
2002 @unpublished{hadley2015bir,
2003 author = {Hadley, S.},
2004 year = {2015},
2005 title = {Biomechanics: introductory reading, {BM289}: sport biomechanics},
2006 howpublished = {University of Bath}}
2007 %</driver|bib|tex1|bib1>
2008 %<*driver|tex1>
2009 \end{Verbatim}
2010 \end{bibexbox}
2011
2012 \begin{bibexbox}<RX>{thomas2015wcr}
2013 Thomas, D., 2015. Word count and referencing style. \emph{Frequently
2014 asked questions discussion board: PHYS 2011: housing studies}.
2015 University of Bath. Unpublished.
2016 \tcblower
2017 \begin{Verbatim}
2018 %</driver|tex1>
2019 %<*driver|bib|tex1|bib1>
2020 @unpublished{thomas2015wcr,
2021 author = {Thomas, D.},
2022 year = {2015},
2023 title = {Word count and referencing style},
2024 booktitle = {Frequently asked questions discussion board: {PHYS} 2011: housing studies},
2025 howpublished = {University of Bath}}
2026 %</driver|bib|tex1|bib1>
2027 %<*driver|tex1>
2028 \end{Verbatim}
2029 \end{bibexbox}
2030
2031
2032 \subsection{Audiovisual materials}
2033
2034 \subsubsection*{Image}
2035
2036 %<tex1>\begin{tips}\item You would normally class images as \texttt{misc} or \texttt{unpublished}, but those entry types have particular formatting quirks in this style that don't work for images. Use \texttt{manual} or \texttt{booklet} instead. You can use \texttt{online} (an alias for \texttt{manual}) for online images.\end{tips}
2037
2038 \begin{bibexbox}<RI>{nasa2015nat}
2039 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].
2040 \tcblower
2041 \begin{Verbatim}
2042 %</driver|tex1>
2043 %<*driver|bib>
2044 @image{nasa2015nat,
2045 author = {{NASA}},
2046 year = {2015},
2047 title = {{NASA} Astronaut {Tim} {Kopra} on {Dec.\@} 21 Spacewalk},
2048 address = {Washington},
2049 publisher = {NASA},
2050 url = {http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk},
2051 urlyear = {7 January 2015}}
2052 %</driver|bib>
2053 %<*driver>
2054 \end{Verbatim}
2055 \iffalse
2056 %</driver>
2057 %<*tex1|bib1>
2058 @manual{nasa2015nat,
2059 author = {{NASA}},
2060 year = {2015},
2061 title = {{NASA} Astronaut {Tim} {Kopra} on {Dec.\@} 21 Spacewalk},
2062 titleaddon = {[Online]},
2063 address = {Washington},
2064 organization = {NASA},
2065 url = {http://www.nasa.gov/image-feature/nasa-astronaut-tim-kopra-on-dec-21-spacewalk},
2066 urldate = {7 January 2015}}
2067 %</tex1|bib1>
2068 %<*driver|tex1>
2069 \end{Verbatim}
2070 %<*driver>
2071 \fi
2072 %</driver>
2073 \end{bibexbox}
2074
2075 \begin{tips}\item
2076 You can use either the \texttt{publisher} or the \texttt{organization} field to
2077 record the source of the image.
2078 \end{tips}
2079
2080 \begin{bibexbox}<RI>{iliff2006rcb}
2081 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].
2082 \tcblower
2083 \begin{Verbatim}
2084 %</driver|tex1>
2085 %<*driver|bib>
2086 @image{iliff2006rcb,
2087 author = {D. Iliff},
2088 year = {2006},
2089 title = {{Royal} {Crescent} in {Bath,} {England} - {July} 2006},
2090 address = {San Francisco},
2091 organization = {Wikimedia Foundation},
2092 url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
2093 urlyear = {7 January 2016}}
2094 %</driver|bib>
2095 %<*driver>
2096 \end{Verbatim}
2097 \iffalse
2098 %</driver>
2099 %<*tex1|bib1>
2100 @manual{iliff2006rcb,
2101 author = {D. Iliff},
2102 year = {2006},
2103 title = {{Royal} {Crescent} in {Bath,} {England} - {July} 2006},
2104 titleaddon = {[Online]},
2105 address = {San Francisco},
2106 organization = {Wikimedia Foundation},
2107 url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
2108 urldate = {7 January 2016}}
2109 %</tex1|bib1>
2110 %<*driver|tex1>
2111 \end{Verbatim}
2112 %<*driver>
2113 \fi
2114 %</driver>
2115 \end{bibexbox}
2116
2117 \begin{bibexbox}<RI>{brbr1965gph}
2118 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.
2119 \tcblower
2120 \begin{Verbatim}
2121 %</driver|tex1>
2122 %<*driver|bib>
2123 @image{brbr1965gph,
2124 author = {{Bristol Region Building Record}},
2125 year = {1965},
2126 title = {{Green} {Park} {House} (since demolished), viewed from southwest},
2127 titleaddon = {Photograph},
2128 number = {BRBR, D/877/1},
2129 library = {Archives \& Research Collections, University of Bath Library}}
2130 %</driver|bib>
2131 %<*driver>
2132 \end{Verbatim}
2133 \iffalse
2134 %</driver>
2135 %<*tex1|bib1>
2136 @manual{brbr1965gph,
2137 author = {{Bristol Region Building Record}},
2138 year = {1965},
2139 title = {{Green} {Park} {House} (since demolished), viewed from southwest},
2140 titleaddon = {[Photograph]},
2141 note = {BRBR, D/877/1},
2142 organization = {Archives \& Research Collections, University of Bath Library}}
2143 %</tex1|bib1>
2144 %<*driver|tex1>
2145 \end{Verbatim}
2146 %<*driver>
2147 \fi
2148 %</driver>
2149 \end{bibexbox}
2150
2151 \begin{tips}\item
2152 %<*driver>
2153 Use the \texttt{library} field to record the archive.
2154 If the image is on display rather than archived,
2155 use \texttt{institution} instead for the museum, gallery or building.
2156 If you also wish to provide the name of the organisation that published the image,
2157 use the \texttt{publisher} field if the location you provide relates to the publisher,
2158 but the \texttt{organization} field if the location relates to the archive.
2159 \item
2160 Put archival locator information (e.g.\@ box or shelf number) in the \texttt{number} field.
2161 \item
2162 Put the clarification of the resource type in \texttt{entrysubtype}.
2163 In most cases, you can use \texttt{titleaddon} instead,
2164 but \texttt{entrysubtype} will correctly suppress \enquote{Online} being shown
2165 while \texttt{titleaddon} will not.
2166 \iffalse
2167 %</driver>
2168 %<*tex1>
2169 If the \texttt{organization} is a publisher, put the location in \texttt{address} as normal;
2170 if it is an archive or where the image is displayed, include the location within the \texttt{organization} field,
2171 after the archive name and a comma.
2172 \item
2173 Put archival locator information (e.g.\@ box or shelf number) in the \texttt{note} field.
2174 %</tex1>
2175 %<*driver>
2176 \fi
2177 %</driver>
2178 \end{tips}
2179
2180 \begin{info}\item
2181 The \texttt{@image} entry type can be used for any visual artistic work,
2182 including sculptures and interactive exhibits.
2183 \end{info}
2184
2185 \subsubsection*{Map}
2186
2187 \begin{bibexbox}<RX>{andrews.dury1773wilts}
2188 Andrews, J. and Dury, A., 1773. \emph{Map of Wiltshire}, 1 inch to 2 miles. Devizes: Wiltshire Record Society.
2189 \tcblower
2190 \begin{Verbatim}
2191 %</driver|tex1>
2192 %<*driver|bib|tex1|bib1>
2193 @book{andrews.dury1773wilts,
2194 author = {Andrews, J. and Dury, A.},
2195 year = {1773},
2196 title = {Map of {Wiltshire}},
2197 series = {1 inch to 2 miles},
2198 address = {Devizes},
2199 publisher = {Wiltshire Record Society}}
2200 %</driver|bib|tex1|bib1>
2201 %<*driver|tex1>
2202 \end{Verbatim}
2203 \end{bibexbox}
2204
2205 \begin{bibexbox}<RX>{os2020bath}
2206 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].
2207 \tcblower
2208 \begin{Verbatim}
2209 %</driver|tex1>
2210 %<*driver|bib>
2211 @book{os2020bath,
2212 author = {{Ordnance Survey}},
2213 year = {2020},
2214 title = {Street view map of {University of Bath}},
2215 series = {1:5000, {OS VectorMap® Local}},
2216 url = {https://digimap.edina.ac.uk/roam/map/os},
2217 urlyear = {30 April 2020}}
2218 %</driver|bib>
2219 %<*driver>
2220 \end{Verbatim}
2221 \iffalse
2222 %</driver>
2223 %<*tex1|bib1>
2224 @book{os2020bath,
2225 author = {{Ordnance Survey}},
2226 year = {2020},
2227 title = {Street view map of {University of Bath}},
2228 titleaddon = {[Online]},
2229 series = {1:5000, {OS VectorMap® Local}},
2230 url = {https://digimap.edina.ac.uk/roam/map/os},
2231 urldate = {30 April 2020}}
2232 %</tex1|bib1>
2233 %<*driver|tex1>
2234 \end{Verbatim}
2235 %<*driver>
2236 \fi
2237 %</driver>
2238 \end{bibexbox}
2239
2240 \begin{bibexbox}<RX>{google2020harbourside}
2241 Google, 2020. \emph{Harbourside, Bristol} [Online], Google Maps. Available from: \url{https://www.google.co.uk/maps/place/Harbourside,+Bristol/} [Accessed 30 April 2020].
2242 \tcblower
2243 \begin{Verbatim}
2244 %</driver|tex1>
2245 %<*driver|bib>
2246 @book{google2020harbourside,
2247 author = {{Google}},
2248 year = {2020},
2249 title = {{Harbourside, Bristol}},
2250 series = {{Google Maps}},
2251 url = {https://www.google.co.uk/maps/place/Harbourside,+Bristol/},
2252 urlyear = {30 April 2020}}
2253 %</driver|bib>
2254 %<*driver>
2255 \end{Verbatim}
2256 \iffalse
2257 %</driver>
2258 %<*tex1|bib1>
2259 @book{google2020harbourside,
2260 author = {{Google}},
2261 year = {2020},
2262 title = {{Harbourside, Bristol}},
2263 titleaddon = {[Online]},
2264 series = {{Google Maps}},
2265 url = {https://www.google.co.uk/maps/place/Harbourside,+Bristol/},
2266 urldate = {30 April 2020}}
2267 %</tex1|bib1>
2268 %<*driver|tex1>
2269 \end{Verbatim}
2270 %<*driver>
2271 \fi
2272 %</driver>
2273 \end{bibexbox}
2274
2275
2276 \subsubsection*{Film, video or DVD}
2277
2278 \begin{bibexbox}<RX>{macbeth1948}
2279 \emph{Macbeth}, 1948. Film. Directed by Orson Welles. USA: Republic Pictures.
2280 \tcblower
2281 \begin{Verbatim}
2282 %</driver|tex1>
2283 %<*driver|bib>
2284 @video{macbeth1948,
2285 year = {1948},
2286 title = {Macbeth},
2287 type = {Film},
2288 note = {Directed by Orson Welles},
2289 address = {USA},
2290 publisher = {Republic Pictures}}
2291 %</driver|bib>
2292 %<*driver>
2293 \end{Verbatim}
2294 \iffalse
2295 %</driver>
2296 %<*tex1|bib1>
2297 @booklet{macbeth1948,
2298 year = {1948},
2299 title = {Macbeth},
2300 howpublished = {Film. Directed by Orson Welles. USA: Republic Pictures}}
2301 %</tex1|bib1>
2302 %<*driver|tex1>
2303 \end{Verbatim}
2304 %<*driver>
2305 \fi
2306 %</driver>
2307 \end{bibexbox}
2308
2309 \begin{info}\item
2310 Internally, \texttt{movie} and \texttt{video} are aliases for \texttt{booklet}.
2311 \end{info}
2312
2313 \begin{bibexbox}<RX>{elephant-man1980}
2314 \emph{The elephant man} [Online], 1980. Film. Directed by David Lynch. USA: Brooksfilms. Available from: BBC iPlayer [Accessed 4 May 2021].
2315 \tcblower
2316 \begin{Verbatim}
2317 %</driver|tex1>
2318 %<*driver|bib>
2319 @video{elephant-man1980,
2320 year = {1980},
2321 title = {The elephant man},
2322 type = {Film},
2323 note = {Directed by David Lynch},
2324 address = {USA},
2325 publisher = {Brooksfilms},
2326 library = {BBC iPlayer},
2327 urlyear = {4 May 2021}}
2328 %</driver|bib>
2329 %<*driver>
2330 \end{Verbatim}
2331 \iffalse
2332 %</driver>
2333 %<*tex1|bib1>
2334 @booklet{elephant-man1980,
2335 year = {1980},
2336 title = {The elephant man},
2337 titleaddon = {[Online]},
2338 howpublished = {Film. Directed by David Lynch. USA: Brooksfilms},
2339 note = {Available from: BBC iPlayer [Accessed 4 May 2021]}}
2340 %</tex1|bib1>
2341 %<*driver|tex1>
2342 \end{Verbatim}
2343 %<*driver>
2344 \fi
2345 %</driver>
2346 \end{bibexbox}
2347
2348 %<*driver>
2349 \iffalse
2350 %</driver>
2351 %<*tex1>
2352 \begin{hacks}\item
2353 There's no standardised way to provide a descriptor instead of a URL,
2354 so to get exactly the right formatting you need to put the whole
2355 availability statement as a \texttt{note}. If you don't mind an extra
2356 full stop, you could used \texttt{urldate} (or \texttt{urlyear}) as normal.
2357 \end{hacks}
2358 %</tex1>
2359 %<*driver>
2360 \fi
2361 %</driver>
2362
2363
2364 \subsubsection*{Online video\slash audio}
2365
2366 \begin{bibexbox}<RX>{moran2016sol}
2367 Moran, C., 2016. \emph{Save our libraries} [Online]. Available from: \url{https://youtu.be/gKTfCz4JtVE} [Accessed 29 April 2016].
2368 \tcblower
2369 \begin{Verbatim}
2370 %</driver|tex1>
2371 %<*driver|bib>
2372 @video{moran2016sol,
2373 author = {Moran, C.},
2374 year = {2016},
2375 title = {Save Our Libraries},
2376 url = {https://youtu.be/gKTfCz4JtVE},
2377 urlyear = {29 April 2016}}
2378 %</driver|bib>
2379 %<*driver>
2380 \end{Verbatim}
2381 \iffalse
2382 %</driver>
2383 %<*tex1|bib1>
2384 @manual{moran2016sol,
2385 author = {Moran, C.},
2386 year = {2016},
2387 title = {Save Our Libraries},
2388 titleaddon = {[Online]},
2389 url = {https://youtu.be/gKTfCz4JtVE},
2390 urldate = {29 April 2016}}
2391 %</tex1|bib1>
2392 %<*driver|tex1>
2393 \end{Verbatim}
2394 %<*driver>
2395 \fi
2396 %</driver>
2397 \end{bibexbox}
2398
2399 \begin{bibexbox}<RI>{chakrabarti2016hac}
2400 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].
2401 \tcblower
2402 \begin{Verbatim}
2403 %</driver|tex1>
2404 %<*driver|bib>
2405 @audio{chakrabarti2016hac,
2406 author = {Chakrabarti, V.},
2407 year = {2016},
2408 title = {How Architecture and City Planning Can Combat Social Inequality},
2409 url = {https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast},
2410 urlyear = {28 March 2019}}
2411 %</driver|bib>
2412 %<*driver>
2413 \end{Verbatim}
2414 \iffalse
2415 %</driver>
2416 %<*tex1|bib1>
2417 @manual{chakrabarti2016hac,
2418 author = {Chakrabarti, V.},
2419 year = {2016},
2420 title = {How Architecture and City Planning Can Combat Social Inequality},
2421 titleaddon = {[Online]},
2422 url = {https://www.curbed.com/2016/5/5/11593058/vishaan-chakrabarti-pau-curbed-appeal-podcast},
2423 urlyear = {28 March 2019}}
2424 %</tex1|bib1>
2425 %<*driver|tex1>
2426 \end{Verbatim}
2427 %<*driver>
2428 \fi
2429 %</driver>
2430 \end{bibexbox}
2431
2432
2433 \subsubsection*{Television or radio broadcast}
2434
2435 %<*driver>
2436 \begin{tips}\item
2437 Use \texttt{type} for the medium and \texttt{note} for the channel, date and time.
2438 \item
2439 If the episode has an individual title, use \texttt{series} for the series and \texttt{number} for the episode number.
2440 Otherwise, give both series and episode number as the \texttt{title}.
2441 \end{tips}
2442 %</driver>
2443
2444 \begin{bibexbox}<RX>{inn2021huw}
2445 Hurry up and wait, 2021. \emph{Inside no.9}, \emph{Episode 6:4}. TV. BBC2, 31 May. 21.30 hrs.
2446 \tcblower
2447 \begin{Verbatim}
2448 %</driver|tex1>
2449 %<*driver|bib>
2450 @video{inn2021huw,
2451 year = {2021},
2452 title = {Hurry up and wait},
2453 series = {Inside No.9},
2454 number = {{Episode} 6:4},
2455 type = {TV},
2456 note = {BBC2, 31 May. 21.30 hrs}}
2457 %</driver|bib>
2458 %<*driver>
2459 \end{Verbatim}
2460 \iffalse
2461 %</driver>
2462 %<*tex1|bib1>
2463 @misc{inn2021huw,
2464 year = {2021},
2465 title = {Hurry up and wait},
2466 howpublished = {\emph{Inside no.9}, \emph{Episode 6:4}. TV. BBC2, 31 May.
2467 21.30 hrs}}
2468 %</tex1|bib1>
2469 %<*driver|tex1>
2470 \end{Verbatim}
2471 %<*driver>
2472 \fi
2473 %</driver>
2474 \end{bibexbox}
2475
2476 \begin{bibexbox}<RX>{rsfo2006ep5}
2477 Rick Stein's French odyssey: Episode 5, 2006. TV. BBC2, 23 August. 20.30 hrs.
2478 \tcblower
2479 \begin{Verbatim}
2480 %</driver|tex1>
2481 %<*driver|bib>
2482 @video{rsfo2006ep5,
2483 year = {2006},
2484 title = {Rick {Stein's} {French} Odyssey: {Episode} 5},
2485 type = {TV},
2486 note = {BBC2, 23 August. 20.30 hrs}}
2487 %</driver|bib>
2488 %<*driver>
2489 \end{Verbatim}
2490 \iffalse
2491 %</driver>
2492 %<*tex1|bib1>
2493 @misc{rsfo2006ep5,
2494 year = {2006},
2495 title = {Rick {Stein's} {French} Odyssey: {Episode} 5},
2496 howpublished = {TV. BBC2, 23 August. 20.30 hrs}}
2497 %</tex1|bib1>
2498 %<*driver|tex1>
2499 \end{Verbatim}
2500 %<*driver>
2501 \fi
2502 %</driver>
2503 \end{bibexbox}
2504
2505 \begin{bibexbox}<RX>{archers20060823}
2506 The Archers, 2006. Radio. BBC Radio 4, 23 August. 19.02 hrs.
2507 \tcblower
2508 \begin{Verbatim}
2509 %</driver|tex1>
2510 %<*driver|bib>
2511 @audio{archers20060823,
2512 year = {2006},
2513 title = {The {Archers}},
2514 type = {Radio},
2515 note = {BBC Radio 4, 23 August. 19.02 hrs}}
2516 %</driver|bib>
2517 %<*driver>
2518 \end{Verbatim}
2519 \iffalse
2520 %</driver>
2521 %<*tex1|bib1>
2522 @misc{archers20060823,
2523 year = {2006},
2524 title = {The {Archers}},
2525 howpublished = {Radio. BBC Radio 4, 23 August. 19.02 hrs}}
2526 %</tex1|bib1>
2527 %<*driver|tex1>
2528 \end{Verbatim}
2529 %<*driver>
2530 \fi
2531 %</driver>
2532 \end{bibexbox}
2533
2534 \begin{info}\item
2535 Internally, \texttt{audio} and \texttt{music} are aliases for \texttt{booklet}.
2536 \end{info}
2537
2538 \begin{bibexbox}<RX>{tkmmm2020ts}
2539 The secret, 2020. \emph{Tiger king: murder, mayhem and madness}, \emph{Episode 3} [Online]. TV. Available from: Netflix [Accessed 4 May 2021].
2540 \tcblower
2541 \begin{Verbatim}
2542 %</driver|tex1>
2543 %<*driver|bib>
2544 @video{tkmmm2020ts,
2545 year = {2020},
2546 title = {The Secret},
2547 series = {Tiger King: Murder, Mayhem and Madness},
2548 number = {{Episode} 3},
2549 type = {TV},
2550 library = {Netflix},
2551 urlyear = {4 May 2021}}
2552 %</driver|bib>
2553 %<*driver>
2554 \end{Verbatim}
2555 \iffalse
2556 %</driver>
2557 %<*tex1|bib1>
2558 @misc{tkmmm2020ts,
2559 year = {2020},
2560 title = {The Secret},
2561 howpublished = {\emph{Tiger king: murder, mayhem and madness}, \emph{Episode 3}
2562 [Online]. TV},
2563 note = {Available from: Netflix [Accessed 4 May 2021]}}
2564 %</tex1|bib1>
2565 %<*driver|tex1>
2566 \end{Verbatim}
2567 %<*driver>
2568 \fi
2569 %</driver>
2570 \end{bibexbox}
2571
2572
2573 \subsubsection*{Music score}
2574
2575 \begin{bibexbox}<RX>{beethoven1950symph1}
2576 Beethoven, L. van, 1950. \emph{Symphony no.1 in C, Op.21}. Harmondsworth: Penguin.
2577 \tcblower
2578 \begin{Verbatim}
2579 %</driver|tex1>
2580 %<*driver|bib|tex1|bib1>
2581 @book{beethoven1950symph1,
2582 author = {Ludwig van Beethoven},
2583 year = {1950},
2584 title = {Symphony no.1 in {C,} {Op.21}},
2585 address = {Harmondsworth},
2586 publisher = {Penguin}}
2587 %</driver|bib|tex1|bib1>
2588 %<*driver|tex1>
2589 \end{Verbatim}
2590 \end{bibexbox}
2591
2592
2593 \subsection{Digital media}
2594
2595 \subsubsection*{Website or webpage}
2596
2597 While it is normal when using Bib\TeX\ to use \texttt{misc} for websites,
2598 with this style you should use \texttt{online} (or \texttt{electronic} or \texttt{www}) instead.
2599 Internally these are all aliases for \texttt{manual}.
2600
2601 \begin{bibexbox}<RX>{who2018ttc}
2602 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].
2603 \tcblower
2604 \begin{Verbatim}
2605 %</driver|tex1>
2606 %<*driver|bib>
2607 @online{who2018ttc,
2608 author = {{World Health Organization}},
2609 year = {2018},
2610 title = {The Top 10 Causes of Death},
2611 address = {Geneva},
2612 organization = {World Health Organization},
2613 url = {https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death},
2614 urlyear = {29 June 2020}}
2615 %</driver|bib>
2616 %<*driver>
2617 \end{Verbatim}
2618 \iffalse
2619 %</driver>
2620 %<*tex1|bib1>
2621 @manual{who2018ttc,
2622 author = {{World Health Organization}},
2623 year = {2018},
2624 title = {The Top 10 Causes of Death},
2625 titleaddon = {[Online]},
2626 address = {Geneva},
2627 organization = {World Health Organization},
2628 url = {https://www.who.int/news-room/fact-sheets/detail/the-top-10-causes-of-death},
2629 urldate = {29 June 2020}}
2630 %</tex1|bib1>
2631 %<*driver|tex1>
2632 \end{Verbatim}
2633 %<*driver>
2634 \fi
2635 %</driver>
2636 \end{bibexbox}
2637
2638 \begin{bibexbox}<RX>{manco2013va}
2639 Manco, J., 2013. \emph{Vernacular architecture} [Online]. Available from: \url{https://www.buildinghistory.org/style/vernacular.shtml} [Accessed 20 February 2020].
2640 \tcblower
2641 \begin{Verbatim}
2642 %</driver|tex1>
2643 %<*driver|bib>
2644 @online{manco2013va,
2645 author = {Manco, J.},
2646 year = {2013},
2647 title = {Vernacular Architecture},
2648 url = {https://www.buildinghistory.org/style/vernacular.shtml},
2649 urlyear = {20 February 2020}}
2650 %</driver|bib>
2651 %<*driver>
2652 \end{Verbatim}
2653 \iffalse
2654 %</driver>
2655 %<*tex1|bib1>
2656 @manual{manco2013va,
2657 author = {Manco, J.},
2658 year = {2013},
2659 title = {Vernacular Architecture},
2660 titleaddon = {[Online]},
2661 url = {https://www.buildinghistory.org/style/vernacular.shtml},
2662 urldate = {20 February 2020}}
2663 %</tex1|bib1>
2664 %<*driver|tex1>
2665 \end{Verbatim}
2666 %<*driver>
2667 \fi
2668 %</driver>
2669 \end{bibexbox}
2670
2671 This template is also used for retrievable Generative AI content.
2672
2673 \begin{bibexbox}<RX>{copilot2026wcr}
2674 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].
2675 \tcblower
2676 \begin{Verbatim}
2677 %</driver|tex1>
2678 %<*driver|bib>
2679 @online{copilot2026wcr,
2680 author = {{Copilot}},
2681 year = {2026},
2682 title = {Why is Citing and Referencing Your Sources Important?},
2683 address = {Redmond, Washington},
2684 organization = {Microsoft},
2685 url = {https://copilot.microsoft.com/chats/wxaHkx69Qt4SDuNDAkbCT},
2686 urlyear = {19 January 2026}}
2687 %</driver|bib>
2688 %<*driver>
2689 \end{Verbatim}
2690 \iffalse
2691 %</driver>
2692 %<*tex1|bib1>
2693 @manual{copilot2026wcr,
2694 author = {{Copilot}},
2695 year = {2026},
2696 title = {Why is Citing and Referencing Your Sources Important?},
2697 titleaddon = {[Online]},
2698 address = {Redmond, Washington},
2699 organization = {Microsoft},
2700 url = {https://copilot.microsoft.com/chats/wxaHkx69Qt4SDuNDAkbCT},
2701 urldate = {19 January 2026}}
2702 %</tex1|bib1>
2703 %<*driver|tex1>
2704 \end{Verbatim}
2705 %<*driver>
2706 \fi
2707 %</driver>
2708 \end{bibexbox}
2709
2710
2711 \subsubsection*{Social media}
2712
2713 \begin{bibexbox}<RX>{gaiman2021fbp}
2714 Gaiman, N., 2021. \emph{Facebook post} [Online], 21 April. Available from: \url{https://www.facebook.com/neilgaiman/posts/305187897642814} [Accessed 13 May 2021].
2715 \tcblower
2716 \begin{Verbatim}
2717 %</driver|tex1>
2718 %<*driver|bib>
2719 @online{gaiman2021fbp,
2720 author = {Gaiman, N.},
2721 year = {2021},
2722 title = {Facebook post},
2723 month = {{21 April}},
2724 url = {https://www.facebook.com/neilgaiman/posts/305187897642814},
2725 urlyear = {13 May 2021}}
2726 %</driver|bib>
2727 %<*driver>
2728 \end{Verbatim}
2729 \iffalse
2730 %</driver>
2731 %<*tex1|bib1>
2732 @manual{gaiman2021fbp,
2733 author = {Gaiman, N.},
2734 year = {2021},
2735 title = {Facebook post},
2736 titleaddon = {[Online]},
2737 month = {21 April},
2738 url = {https://www.facebook.com/neilgaiman/posts/305187897642814},
2739 urldate = {13 May 2021}}
2740 %</tex1|bib1>
2741 %<*driver|tex1>
2742 \end{Verbatim}
2743 %<*driver>
2744 \fi
2745 %</driver>
2746 \end{bibexbox}
2747
2748 \begin{bibexbox}<RX>{ublib2021tp}
2749 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].
2750 \tcblower
2751 \begin{Verbatim}
2752 %</driver|tex1>
2753 %<*driver|bib>
2754 @online{ublib2021tp,
2755 author = {{Library at University of Bath}},
2756 nameaddon = {@bathunilibrary},
2757 year = {2021},
2758 title = {Twitter post},
2759 month = {{10 May}},
2760 url = {https://twitter.com/BathUniLibrary/status/1391774402618998795?s=20},
2761 urlyear = {12 May 2021}}
2762 %</driver|bib>
2763 %<*driver>
2764 \end{Verbatim}
2765 \iffalse
2766 %</driver>
2767 %<*tex1|bib1>
2768 @manual{ublib2021tp,
2769 author = {{Library at University of Bath [@bathunilibrary]}},
2770 year = {2021},
2771 title = {Twitter post},
2772 titleaddon = {[Online]},
2773 month = {10 May},
2774 url = {https://twitter.com/BathUniLibrary/status/1391774402618998795?s=20},
2775 urldate = {12 May 2021}}
2776 %</tex1|bib1>
2777 %<*driver|tex1>
2778 \end{Verbatim}
2779 %<*driver>
2780 \fi
2781 %</driver>
2782 \end{bibexbox}
2783
2784 \begin{bibexbox}<RX>{ublib2021ip}
2785 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].
2786 \tcblower
2787 \begin{Verbatim}
2788 %</driver|tex1>
2789 %<*driver|bib>
2790 @online{ublib2021ip,
2791 author = {{University of Bath Library}},
2792 nameaddon = {@unibathlib},
2793 year = {2021},
2794 title = {Instagram post},
2795 month = {{15 March}},
2796 url = {https://www.instagram.com/p/CMb5GHjFv9A/?utm_source=ig_web_copy_link},
2797 urlyear = {7 May 2021}}
2798 %</driver|bib>
2799 %<*driver>
2800 \end{Verbatim}
2801 \iffalse
2802 %</driver>
2803 %<*tex1|bib1>
2804 @manual{ublib2021ip,
2805 author = {{University of Bath Library [@unibathlib]}},
2806 year = {2021},
2807 title = {Instagram post},
2808 titleaddon = {[Online]},
2809 month = {15 March},
2810 url = {https://www.instagram.com/p/CMb5GHjFv9A/?utm_source=ig_web_copy_link},
2811 urlyear = {7 May 2021}}
2812 %</tex1|bib1>
2813 %<*driver|tex1>
2814 \end{Verbatim}
2815 %<*driver>
2816 \fi
2817 %</driver>
2818 \end{bibexbox}
2819
2820 %<*driver>
2821 \iffalse
2822 %</driver>
2823 %<*tex1>
2824 \begin{hacks}\item
2825 Unfortunately, the handle will also show up in your citations, e.g.\@
2826 \cite{ublib2021ip}. To avoid this, you could use alternative citation commands:
2827 \begin{tcblisting}{listing side text, lefthand width=.46\linewidth}
2828 University of Bath Library \citeyearpar{ublib2021ip}
2829 \end{tcblisting}
2830 \end{hacks}
2831 %</tex1>
2832 %<*driver>
2833 \fi
2834 %</driver>
2835
2836 \subsubsection*{Email discussion lists (jiscmail\slash listserv etc.)}
2837
2838 \begin{bibexbox}(hacked)<RX>{clark2004euk}
2839 Clark, T., 5 July 2004. A European UK Libraries Plus? \emph{Lis-link} [Online]. Available from: \url{[email protected]} [Accessed 30 July 2004].
2840 \tcblower
2841 \begin{Verbatim}
2842 %</driver|tex1>
2843 %<*driver|bib>
2844 @letter{clark2004euk,
2845 author = {Clark, T.},
2846 year = {5 July 2004},
2847 title = {A {European} {UK} {Libraries} {Plus}?},
2848 journal = {Lis-link},
2849 url = {[email protected]},
2850 urlyear = {30 July 2004}}
2851 %</driver|bib>
2852 %<*driver>
2853 \end{Verbatim}
2854 \iffalse
2855 %</driver>
2856 %<*tex1|bib1>
2857 @article{clark2004euk,
2858 author = {Clark, T.},
2859 year = {5 July 2004},
2860 title = {A {European} {UK} {Libraries} {Plus}?},
2861 journal = {Lis-link \textup{[Online]}},
2862 url = {[email protected]},
2863 urldate = {30 July 2004}}
2864 %</tex1|bib1>
2865 %<*driver|tex1>
2866 \end{Verbatim}
2867 %<*driver>
2868 \fi
2869 %</driver>
2870 \end{bibexbox}
2871
2872 \begin{tips}\item
2873 Use the \texttt{journal} field to specify the mailing list.
2874 %<*driver>
2875 Internally, a \texttt{letter} entry with a \texttt{journal} field is treated
2876 like an \texttt{article} entry, while one without is treated like an
2877 \texttt{unpublished} entry.
2878 %</driver>
2879 \end{tips}
2880
2881 \begin{hacks}\item
2882 You will need to put the full date in the \texttt{year} field;
2883 unfortunately this means you have to put in extra work to show only the year in citations:
2884 \end{hacks}
2885
2886 \begin{tcblisting}{listing side text, lefthand width=.5\linewidth}
2887 \citetext{\citeauthor[2004]{clark2004euk}}
2888 \end{tcblisting}
2889
2890
2891 \subsubsection*{Database}
2892
2893 \begin{bibexbox}<RX>{bvd2008bt}
2894 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].
2895 \tcblower
2896 \begin{Verbatim}
2897 %</driver|tex1>
2898 %<*driver|bib>
2899 @dataset{bvd2008bt,
2900 author = {{Bureau van Dijk}},
2901 year = {2008},
2902 title = {{BT} {Group} PLC Company Report},
2903 library = {FAME},
2904 address = {London},
2905 publisher = {Bureau van Dijk},
2906 url = {http://www.portal.euromonitor.com},
2907 urlyear = {6 November 2014}}
2908 %</driver|bib>
2909 %<*driver>
2910 \end{Verbatim}
2911 \iffalse
2912 %</driver>
2913 %<*tex1|bib1>
2914 @manual{bvd2008bt,
2915 author = {{Bureau van Dijk}},
2916 year = {2008},
2917 title = {{BT} {Group} PLC Company Report},
2918 series = {\emph{FAME} {[Online]}},
2919 address = {London},
2920 organization = {Bureau van Dijk},
2921 url = {http://www.portal.euromonitor.com},
2922 urldate = {6 November 2014}}
2923 %</tex1|bib1>
2924 %<*driver|tex1>
2925 \end{Verbatim}
2926 %<*driver>
2927 \fi
2928 %</driver>
2929 \end{bibexbox}
2930
2931 %<*driver>
2932 \begin{tips}\item
2933 Use the \texttt{title} field for the entry title,
2934 and the \texttt{library} field for the name of the database itself.
2935 \end{tips}
2936 %</driver>
2937
2938
2939 \subsubsection*{Dataset}
2940
2941 \begin{bibexbox}<RX>{wilson2013rgc}
2942 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].
2943 \tcblower
2944 \begin{Verbatim}
2945 %</driver|tex1>
2946 %<*driver|bib>
2947 @dataset{wilson2013rgc,
2948 author = {Wilson, D.},
2949 year = {2013},
2950 title = {Real Geometry and Connectedness via Triangular Description: {CAD} Example Bank},
2951 address = {Bath},
2952 publisher = {University of Bath},
2953 doi = {10.15125/BATH-00069},
2954 urlyear = {20 April 2016}}
2955 %</driver|bib>
2956 %<*driver>
2957 \end{Verbatim}
2958 \iffalse
2959 %</driver>
2960 %<*tex1|bib1>
2961 @manual{wilson2013rgc,
2962 author = {Wilson, D.},
2963 year = {2013},
2964 title = {Real Geometry and Connectedness via Triangular Description: {CAD} Example Bank},
2965 titleaddon = {[Online]},
2966 address = {Bath},
2967 organization = {University of Bath},
2968 doi = {10.15125/BATH-00069},
2969 urldate = {20 April 2016}}
2970 %</tex1|bib1>
2971 %<*driver|tex1>
2972 \end{Verbatim}
2973 %<*driver>
2974 \fi
2975 %</driver>
2976 \end{bibexbox}
2977
2978 \begin{info}\item
2979 You can use \texttt{dataset} instead of \texttt{online} as an alias for \texttt{manual}.
2980 \end{info}
2981
2982
2983 \subsubsection*{Computer program}
2984
2985 \begin{bibexbox}<RX>{screencasto}
2986 @screencasto, n.d. \emph{Screencast-O-Matic} (v.2) [computer program]. Available from: \url{https://screencast-o-matic.com/} [Accessed 16 May 2016].
2987 \tcblower
2988 \begin{Verbatim}
2989 %</driver|tex1>
2990 %<*driver|bib>
2991 @software{screencasto,
2992 author = {@screencasto},
2993 title = {{Screencast-O-Matic}},
2994 version = {2},
2995 entrysubtype = {computer program},
2996 url = {https://screencast-o-matic.com/},
2997 urlyear = {16 May 2016}}
2998 %</driver|bib>
2999 %<*driver>
3000 \end{Verbatim}
3001 \iffalse
3002 %</driver>
3003 %<*tex1|bib1>
3004 @manual{screencasto,
3005 author = {@screencasto},
3006 year = {n.d.},
3007 title = {{Screencast-O-Matic}},
3008 titleaddon = {(v.2) [computer program]},
3009 url = {https://screencast-o-matic.com/},
3010 urldate = {16 May 2016}}
3011 %</tex1|bib1>
3012 %<*driver|tex1>
3013 \end{Verbatim}
3014 %<*driver>
3015 \fi
3016 %</driver>
3017 \end{bibexbox}
3018
3019 \begin{info}\item
3020 Internally, \texttt{software} is an alias for \texttt{manual}.
3021 \end{info}
3022 %<*driver>
3023 \begin{tips}\item
3024 Put the clarification of the resource type in \texttt{entrysubtype}. In most
3025 cases, you can use \texttt{titleaddon} instead, but \texttt{titleaddon} is shown
3026 immediately after the title and may be shown alongside the \enquote{Online}
3027 label, whereas \texttt{entrysubtype} is printed after the \texttt{version} and
3028 supersedes the \enquote{Online} label.
3029 \end{tips}
3030 %</driver>
3031
3032
3033 \subsection{Works in languages other than English}
3034
3035 \subsubsection*{Work in translation}
3036
3037 \begin{bibexbox}<RX>{aristotle2007ne}
3038 Aristotle, 2007. \emph{Nicomachean ethics} (W.D. Ross, Trans.). South Dakota: NuVisions.
3039 \tcblower
3040 \begin{Verbatim}
3041 %</driver|tex1>
3042 %<*driver|bib>
3043 @book{aristotle2007ne,
3044 author = {Aristotle},
3045 year = {2007},
3046 title = {Nicomachean Ethics},
3047 translator = {W. D. Ross},
3048 address = {South Dakota},
3049 publisher = {NuVisions}}
3050 %</driver|bib>
3051 %<*driver>
3052 \end{Verbatim}
3053 \iffalse
3054 %</driver>
3055 %<*tex1|bib1>
3056 @book{aristotle2007ne,
3057 author = {Aristotle},
3058 year = {2007},
3059 title = {Nicomachean Ethics},
3060 titleaddon = {(W.D. Ross, Trans.)},
3061 address = {South Dakota},
3062 publisher = {NuVisions}}
3063 %</tex1|bib1>
3064 %<*driver|tex1>
3065 \end{Verbatim}
3066 %<*driver>
3067 \fi
3068 %</driver>
3069 \end{bibexbox}
3070
3071
3072 \subsubsection*{Work in the Roman alphabet}
3073
3074 \begin{bibexbox}<RX>{esquivel2003cap}
3075 Esquivel, L., 2003. \emph{Como agua para chocolate} [Like water for chocolate]. Barcelona: Debolsillo.
3076 \tcblower
3077 \begin{Verbatim}
3078 %</driver|tex1>
3079 %<*driver|bib>
3080 @book{esquivel2003cap,
3081 author = {Esquivel, L.},
3082 year = {2003},
3083 title = {Como Agua para Chocolate},
3084 titleaddon = {Like water for chocolate},
3085 address = {Barcelona},
3086 publisher = {Debolsillo}}
3087 %</driver|bib>
3088 %<*driver>
3089 \end{Verbatim}
3090 \iffalse
3091 %</driver>
3092 %<*tex1|bib1>
3093 @book{esquivel2003cap,
3094 author = {Esquivel, L.},
3095 year = {2003},
3096 title = {Como Agua para Chocolate},
3097 titleaddon = {[Like water for chocolate]},
3098 address = {Barcelona},
3099 publisher = {Debolsillo}}
3100 %</tex1|bib1>
3101 %<*driver|tex1>
3102 \end{Verbatim}
3103 %<*driver>
3104 \fi
3105 %</driver>
3106 \end{bibexbox}
3107
3108 \begin{tips}\item
3109 Use the \texttt{titleaddon} field to supply the English translation of the title.
3110 \end{tips}
3111
3112 \begin{bibexbox}<RX>{thurfjell1975vhv}
3113 Thurfjell, W., 1975. Vart har våran doktor tagit vägen? [Where has our doctor gone?]. \emph{Läkartidningen}, 72, p.789.
3114 \tcblower
3115 \begin{Verbatim}
3116 %</driver|tex1>
3117 %<*driver|bib>
3118 @article{thurfjell1975vhv,
3119 author = {Thurfjell, W.},
3120 year = {1975},
3121 title = {Vart har våran doktor tagit vägen?},
3122 titleaddon = {Where has our doctor gone?},
3123 journal = {Läkartidningen},
3124 volume = {72},
3125 pages = {789}}
3126 %</driver|bib>
3127 %<*driver>
3128 \end{Verbatim}
3129 \iffalse
3130 %</driver>
3131 %<*tex1|bib1>
3132 @article{thurfjell1975vhv,
3133 author = {Thurfjell, W.},
3134 year = {1975},
3135 title = {Vart har våran doktor tagit vägen?},
3136 titleaddon = {[Where has our doctor gone?]},
3137 journal = {Läkartidningen},
3138 volume = {72},
3139 pages = {789}}
3140 %</tex1|bib1>
3141 %<*driver|tex1>
3142 \end{Verbatim}
3143 %<*driver>
3144 \fi
3145 %</driver>
3146 \end{bibexbox}
3147
3148
3149 \subsubsection*{Work in a non-Roman alphabet}
3150
3151 \begin{bibexbox}(hacked)<RX>{hua1999qys1}
3152 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.
3153 \tcblower
3154 \begin{Verbatim}
3155 %</driver|tex1>
3156 %<*driver|bib>
3157 @article{hua1999qys1,
3158 author = {Linfu \noop{h}華林甫 Hua},
3159 year = {1999},
3160 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu
3161 {清代以來三峽地區水旱災害的初步硏}},
3162 titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
3163 the {Qing} dynasty},
3164 journal = {Zhongguo shehui kexue \emph{中國社會科學}},
3165 volume = {1},
3166 pages = {168-79}}
3167 %</driver|bib>
3168 %<*driver>
3169 \end{Verbatim}
3170 \iffalse
3171 %</driver>
3172 %<*tex1|bib1>
3173 @article{hua1999qys1,
3174 author = {Linfu \noop{h}華林甫 Hua},
3175 year = {1999},
3176 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu
3177 {清代以來三峽地區水旱災害的初步硏}},
3178 titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
3179 the {Qing} dynasty]},
3180 journal = {Zhongguo shehui kexue \emph{中國社會科學}},
3181 volume = {1},
3182 pages = {168-79}}
3183 %</tex1|bib1>
3184 %<*driver|tex1>
3185 \end{Verbatim}
3186 %<*driver>
3187 \fi
3188 %</driver>
3189 \end{bibexbox}
3190
3191 \begin{tips}\item
3192 The above example tricks Bib\TeX\ into treating the original rendering of
3193 the author's name as the `von' part of a Roman-alphabet name. This requires the
3194 use of a command that simply gobbles its argument, which you have to define
3195 yourself:
3196
3197 \begin{tcblisting}{listing only}
3198 \newcommand*{\noop}[1]{}
3199 \end{tcblisting}
3200
3201 For the trick to work, the argument you give to \lstinline[style=dtxlatex]|\noop|
3202 must be lowercase, but otherwise it can be anything you like.
3203 %<*driver>
3204 The trick is not portable to \textsf{biblatex-bath}.
3205 %</driver>
3206 \item
3207 If the name is due to appear initial first (e.g.~after `In:'), you can append
3208 the non-Roman characters to the author's surname; to do this, use inverted name
3209 order as you would for English double-barrelled names without hyphens, e.g.\@
3210 \texttt{Hua 華林甫, Linfu}.
3211 \end{tips}
3212
3213 \begin{bibexbox}<RX>{hua1999qys2}
3214 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.
3215 \tcblower
3216 \begin{Verbatim}
3217 %</driver|tex1>
3218 %<*driver|bib>
3219 @article{hua1999qys2,
3220 author = {Hua, Linfu},
3221 year = {1999},
3222 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu},
3223 titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
3224 the {Qing} dynasty},
3225 journal = {Zhongguo shehui kexue},
3226 volume = {1},
3227 pages = {168-79}}
3228 %</driver|bib>
3229 %<*driver>
3230 \end{Verbatim}
3231 \iffalse
3232 %</driver>
3233 %<*tex1|bib1>
3234 @article{hua1999qys2,
3235 author = {Hua, Linfu},
3236 year = {1999},
3237 title = {Qingdai yilai {Sanxia} diqu shuihan zaihai de chubu yanjiu},
3238 titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
3239 the {Qing} dynasty]},
3240 journal = {Zhongguo shehui kexue},
3241 volume = {1},
3242 pages = {168-79}}
3243 %</tex1|bib1>
3244 %<*driver|tex1>
3245 \end{Verbatim}
3246 %<*driver>
3247 \fi
3248 %</driver>
3249 \end{bibexbox}
3250
3251 \begin{bibexbox}<RX>{pamporov2006rvb}
3252 Pamporov, A., 2006. \emph{Romskoto vsekidnevie v Balgariya} [Roma everyday life in Bulgaria]. Veliko Tarnovo: Faber.
3253 \tcblower
3254 \begin{Verbatim}
3255 %</driver|tex1>
3256 %<*driver|bib>
3257 @book{pamporov2006rvb,
3258 author = {Pamporov, A.},
3259 year = {2006},
3260 title = {Romskoto vsekidnevie v {Balgariya}},
3261 titleaddon = {Roma everyday life in Bulgaria},
3262 address = {Veliko Tarnovo},
3263 publisher = {Faber}}
3264 %</driver|bib>
3265 %<*driver>
3266 \end{Verbatim}
3267 \iffalse
3268 %</driver>
3269 %<*tex1|bib1>
3270 @book{pamporov2006rvb,
3271 author = {Pamporov, A.},
3272 year = {2006},
3273 title = {Romskoto vsekidnevie v {Balgariya}},
3274 titleaddon = {[Roma everyday life in Bulgaria]},
3275 address = {Veliko Tarnovo},
3276 publisher = {Faber}}
3277 %</tex1|bib1>
3278 %<*driver|tex1>
3279 \end{Verbatim}
3280 %<*driver>
3281 \fi
3282 %</driver>
3283 \end{bibexbox}
3284
3285
3286 \subsection{Government and parliamentary document}
3287
3288 % Parliamentary reports
3289
3290 \subsubsection*{House of Commons paper}
3291
3292 \begin{tips}\item
3293 Use this form for reports of House of Commons select committees.
3294 \end{tips}
3295
3296 \begin{bibexbox}<RX>{gb.hc2003/04-30}
3297 Great Britain. Parliament. House of Commons, 2004. \emph{National Savings investment deposits: account 2002--2003}. (HC 2003/04, 30). London: National Audit Office.
3298 \tcblower
3299 \begin{Verbatim}
3300 %</driver|tex1>
3301 %<*driver|bib>
3302 @report{gb.hc2003/04-30,
3303 author = {{Great Britain. Parliament. House of Commons}},
3304 year = {2004},
3305 title = {National {Savings} Investment Deposits: account 2002--2003},
3306 address = {London},
3307 publisher = {National Audit Office},
3308 series = {{HC} 2003/04},
3309 number = {30}}
3310 %</driver|bib>
3311 %<*driver>
3312 \end{Verbatim}
3313 \iffalse
3314 %</driver>
3315 %<*tex1|bib1>
3316 @techreport{gb.hc2003/04-30,
3317 author = {{Great Britain. Parliament. House of Commons}},
3318 year = {2004},
3319 title = {National {Savings} Investment Deposits: account 2002--2003},
3320 address = {London},
3321 publisher = {National Audit Office},
3322 type = {{HC}},
3323 number = {2003/04, 30}}
3324 %</tex1|bib1>
3325 %<*driver|tex1>
3326 \end{Verbatim}
3327 %<*driver>
3328 \fi
3329 %</driver>
3330 \end{bibexbox}
3331
3332 %<*driver>
3333 \begin{tips}\item
3334 To achieve compatibility with \textsf{biblatex-bath}, you can either set the
3335 \texttt{type} field to the empty string or use the \texttt{report} entry type,
3336 which is an alias for \texttt{techreport}.
3337 \end{tips}
3338 %</driver>
3339
3340 \subsubsection*{House of Lords paper}
3341
3342 \begin{tips}\item
3343 Use this form for reports of House of Lords select committees.
3344 \end{tips}
3345
3346 \begin{bibexbox}<RX>{gb.hl1986/87-66}
3347 Great Britain. Parliament. House of Lords, 1987. \emph{Social fund (maternity and funeral expenses) bill}. (HL 1986/87, (66)). London: HMSO.
3348 \tcblower
3349 \begin{Verbatim}
3350 %</driver|tex1>
3351 %<*driver|bib>
3352 @report{gb.hl1986/87-66,
3353 author = {{Great Britain. Parliament. House of Lords}},
3354 year = {1987},
3355 title = {Social Fund (Maternity and Funeral Expenses) Bill},
3356 address = {London},
3357 publisher = {HMSO},
3358 series = {{HL} 1986/87},
3359 number = {66}}
3360 %</driver|bib>
3361 %<*driver>
3362 \end{Verbatim}
3363 \iffalse
3364 %</driver>
3365 %<*tex1|bib1>
3366 @techreport{gb.hl1986/87-66,
3367 author = {{Great Britain. Parliament. House of Lords}},
3368 year = {1987},
3369 title = {Social Fund (Maternity and Funeral Expenses) Bill},
3370 address = {London},
3371 publisher = {HMSO},
3372 type = {{HL}},
3373 number = {1986/87, (66)}}
3374 %</tex1|bib1>
3375 %<*driver|tex1>
3376 \end{Verbatim}
3377 %<*driver>
3378 \fi
3379 %</driver>
3380 \end{bibexbox}
3381
3382 %<*driver>
3383 \begin{hacks}\item
3384 For joint committees, you will have to hack this slightly, putting the session
3385 years in \texttt{series} and the HL and HC numbers in \texttt{number}.
3386 \end{hacks}
3387 %</driver>
3388
3389
3390 \subsubsection*{Command paper}
3391
3392 \begin{bibexbox}<RX>{gb.cm6041}
3393 Great Britain. Ministry of Defence, 2004. \emph{Delivering security in a changing world: defence white paper}. (Cm. 6041). London: TSO.
3394 \tcblower
3395 \begin{Verbatim}
3396 %</driver|tex1>
3397 %<*driver|bib>
3398 @report{gb.cm6041,
3399 author = {{Great Britain. Ministry of Defence}},
3400 year = {2004},
3401 title = {Delivering Security in a Changing World{:} Defence White Paper},
3402 address = {London},
3403 publisher = {TSO},
3404 series = {Cm},
3405 number = {6041}}
3406 %</driver|bib>
3407 %<*driver>
3408 \end{Verbatim}
3409 \iffalse
3410 %</driver>
3411 %<*tex1|bib1>
3412 @techreport{gb.cm6041,
3413 author = {{Great Britain. Ministry of Defence}},
3414 year = {2004},
3415 title = {Delivering Security in a Changing World{:} Defence White Paper},
3416 address = {London},
3417 publisher = {TSO},
3418 type = {{Cm.}},
3419 number = {6041}}
3420 %</tex1|bib1>
3421 %<*driver|tex1>
3422 \end{Verbatim}
3423 %<*driver>
3424 \fi
3425 %</driver>
3426 \end{bibexbox}
3427
3428 \begin{tips}\item
3429 To support the Command Paper template, if you give a report the \texttt{series}
3430 `C', `Cd', `Cmd', `Cmnd' or `Cm', it is followed by a dot rather than a comma.
3431 (If you need the comma as normal, wrap the value in an extra pair of braces.)
3432
3433 If you prefer, you can give the Command Paper abbreviation in \texttt{type} and
3434 supply the dot yourself.
3435 \end{tips}
3436
3437
3438 % UK Primary Legislation
3439
3440 \subsubsection*{House of Commons\slash House of Lords bill}
3441
3442 \begin{bibexbox}<RX>{gb.bill1987/88-66}
3443 Great Britain. Parliament. House of Commons, 1988. \emph{Local government finance bill}. (Bills | 1987/88, 66). London: HMSO.
3444 \tcblower
3445 \begin{Verbatim}
3446 %</driver|tex1>
3447 %<*driver|bib>
3448 @legislation{gb.bill1987/88-66,
3449 author = {{Great Britain. Parliament. House of Commons}},
3450 year = {1988},
3451 title = {Local Government Finance Bill},
3452 address = {London},
3453 publisher = {HMSO},
3454 series = {{Bills | 1987/88}},
3455 number = {66}}
3456 %</driver|bib>
3457 %<*driver>
3458 \end{Verbatim}
3459 \iffalse
3460 %</driver>
3461 %<*tex1|bib1>
3462 @techreport{gb.bill1987/88-66,
3463 author = {{Great Britain. Parliament. House of Commons}},
3464 year = {1988},
3465 title = {Local Government Finance Bill},
3466 address = {London},
3467 publisher = {HMSO},
3468 type = {{Bills |}},
3469 number = {1987/88, 66}}
3470 %</tex1|bib1>
3471 %<*driver|tex1>
3472 \end{Verbatim}
3473 %<*driver>
3474 \fi
3475 %</driver>
3476 \end{bibexbox}
3477
3478
3479 \subsubsection*{Act of Parliament (UK Statutes) before 1963}
3480
3481 \begin{bibexbox}<RX>{gb.wa1735}
3482 \emph{Witchcraft Act} \emph{1735} (9 Geo.2, c.5).
3483 \tcblower
3484 \begin{Verbatim}
3485 %</driver|tex1>
3486 %<*driver|bib>
3487 @legislation{gb.wa1735,
3488 title = {Witchcraft {Act}},
3489 year = {1735},
3490 series = {9 Geo.2},
3491 chapter = {5}}
3492 %</driver|bib>
3493 %<*driver>
3494 \end{Verbatim}
3495 \iffalse
3496 %</driver>
3497 %<*tex1|bib1>
3498 @book{gb.wa1735,
3499 key = {Witchcraft Act 1735},
3500 title = {Witchcraft {Act} 1735},
3501 titleaddon = {(9 Geo.2, c.5)}}
3502 %</tex1|bib1>
3503 %<*driver|tex1>
3504 \end{Verbatim}
3505 %<*driver>
3506 \fi
3507 %</driver>
3508 \end{bibexbox}
3509
3510
3511 \subsubsection*{Act of Parliament (UK Statutes) 1963 onwards}
3512
3513 \begin{bibexbox}<RX>{gb.pa2014}
3514 \emph{Pensions Act} \emph{2014}, c.19. London: TSO.
3515 \tcblower
3516 \begin{Verbatim}
3517 %</driver|tex1>
3518 %<*driver|bib>
3519 @legislation{gb.pa2014,
3520 title = {Pensions {Act}},
3521 year = {2014},
3522 chapter = {19},
3523 address = {London},
3524 publisher = {TSO}}
3525 %</driver|bib>
3526 %<*driver>
3527 \end{Verbatim}
3528 \iffalse
3529 %</driver>
3530 %<*tex1|bib1>
3531 @book{gb.pa2014,
3532 key = {Pensions Act 2014},
3533 title = {Pensions {Act} 2014},
3534 number = {c.19},
3535 address = {London},
3536 publisher = {TSO}}
3537 %</tex1|bib1>
3538 %<*driver|tex1>
3539 \end{Verbatim}
3540 %<*driver>
3541 \fi
3542 %</driver>
3543 \end{bibexbox}
3544
3545
3546 % UK secondary legislation
3547
3548 \subsubsection*{Statutory instrument}
3549
3550 \begin{bibexbox}<RX>{gb.hmr2012}
3551 \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].
3552 \tcblower
3553 \begin{Verbatim}
3554 %</driver|tex1>
3555 %<*driver|bib>
3556 @legislation{gb.hmr2012,
3557 entrysubtype = {secondary},
3558 title = {The {Human} {Medicines} {Regulations}},
3559 year = {2012},
3560 number = {No.1916},
3561 address = {United Kingdom},
3562 publisher = {HMSO},
3563 url = {http://www.legislation.gov.uk/uksi/2012/1916/contents},
3564 urlyear = {22 April 2021}}
3565 %</driver|bib>
3566 %<*driver>
3567 \end{Verbatim}
3568 \iffalse
3569 %</driver>
3570 %<*tex1|bib1>
3571 @book{gb.hmr2012,
3572 title = {The {Human} {Medicines} {Regulations} 2012},
3573 titleaddon = {[Online]},
3574 number = {No.1916},
3575 address = {United Kingdom},
3576 publisher = {HMSO},
3577 url = {http://www.legislation.gov.uk/uksi/2012/1916/contents},
3578 urldate = {22 April 2021},
3579 keywords = {uksi}}
3580 %</tex1|bib1>
3581 %<*driver|tex1>
3582 \end{Verbatim}
3583 %<*driver>
3584 \fi
3585 %</driver>
3586 \end{bibexbox}
3587
3588 \begin{tips}\item
3589 %<*driver>
3590 Use the \texttt{entrysubtype} `secondary' to put the number in the right place.
3591 \iffalse
3592 %</driver>
3593 %<*tex1>
3594 Use the \texttt{uksi} keyword to trigger the comma before the publisher.
3595 It should be ignored harmlessly by other styles.
3596 %</tex1>
3597 %<*driver>
3598 \fi
3599 %</driver>
3600 \end{tips}
3601
3602
3603 % UK parliamentary debates
3604
3605 \subsubsection*{Parliamentary debate}
3606
3607 \begin{bibexbox}<RX>{gb.hc2024rpc}
3608 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].
3609 \tcblower
3610 \begin{Verbatim}
3611 %</driver|tex1>
3612 %<*driver|bib>
3613 @legal{gb.hc2024rpc,
3614 entrysubtype = {parliamentary},
3615 author = {{Great Britain. Parliament. House of Commons}},
3616 year = {2024},
3617 title = {{Rwanda Plan Cost and Asylum System}},
3618 journal = {Hansard},
3619 volume = {744},
3620 eventyear = {9 January 2024},
3621 url = {https://hansard.parliament.uk/Commons/2024-01-09/debates/57105D77-72DE-4246-9F6E-ED87FCB9A088/RwandaPlanCostAndAsylumSystem},
3622 urlyear = {12 December 2024}}
3623 %</driver|bib>
3624 %<*driver>
3625 \end{Verbatim}
3626 \iffalse
3627 %</driver>
3628 %<*tex1|bib1>
3629 @article{gb.hc2024rpc,
3630 author = {{Great Britain. Parliament. House of Commons}},
3631 year = {2024},
3632 title = {{Rwanda Plan Cost and Asylum System}},
3633 journal = {Hansard \textup{[Online]}},
3634 volume = {744},
3635 month = {9 January 2024},
3636 url = {https://hansard.parliament.uk/Commons/2024-01-09/debates/57105D77-72DE-4246-9F6E-ED87FCB9A088/RwandaPlanCostAndAsylumSystem},
3637 urldate = {12 December 2024}}
3638 %</tex1|bib1>
3639 %<*driver|tex1>
3640 \end{Verbatim}
3641 %<*driver>
3642 \fi
3643 %</driver>
3644 \end{bibexbox}
3645
3646
3647 \subsection{Legal document: EU reports\slash legislation}
3648
3649 % European reports
3650
3651 \subsubsection*{EU publication}
3652
3653 The following example has been removed.
3654
3655 \begin{bibexbox}<RX>{ec2015gra}
3656 European Commission, 2015. \emph{General report on the activities of the European Union 2014}. Luxembourg: Publications Office of the European Union.
3657 \tcblower
3658 \begin{Verbatim}
3659 %</driver|tex1>
3660 %<*driver|bib>
3661 @report{ec2015gra,
3662 author = {{European Commission}},
3663 year = {2015},
3664 title = {General Report on the Activities of the {European} {Union} 2014},
3665 address = {Luxembourg},
3666 publisher = {Publications Office of the European Union}}
3667 %</driver|bib>
3668 %<*driver>
3669 \end{Verbatim}
3670 \iffalse
3671 %</driver>
3672 %<*tex1|bib1>
3673 @techreport{ec2015gra,
3674 author = {{European Commission}},
3675 year = {2015},
3676 title = {General Report on the Activities of the {European} {Union} 2014},
3677 address = {Luxembourg},
3678 publisher = {Publications Office of the European Union}}
3679 %</tex1|bib1>
3680 %<*driver|tex1>
3681 \end{Verbatim}
3682 %<*driver>
3683 \fi
3684 %</driver>
3685 \end{bibexbox}
3686
3687
3688 % European legislation
3689
3690 \subsubsection*{EU regulation or directive, decision, recommendation or opinion}
3691
3692 \begin{bibexbox}<RX>{eu.dir1984/2003}
3693 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.
3694 \tcblower
3695 \begin{Verbatim}
3696 %</driver|tex1>
3697 %<*driver|bib>
3698 @legislation{eu.dir1984/2003,
3699 title = {Council {Regulation} ({EC}) 1984/2003 of 8 {April} 2003 Introducing a System for
3700 the Statistical Monitoring of Trade in Bluefin Tuna, Swordfish and Big Eye Tuna within
3701 the {Community}},
3702 year = {2003},
3703 journal = {OJ},
3704 series = {L},
3705 volume = {295}}
3706 %</driver|bib>
3707 %<*driver>
3708 \end{Verbatim}
3709 \iffalse
3710 %</driver>
3711 %<*tex1|bib1>
3712 @misc{eu.dir1984/2003,
3713 title = {Council {Regulation} ({EC}) 1984/2003 of 8 {April} 2003 Introducing a System for
3714 the Statistical Monitoring of Trade in Bluefin Tuna, Swordfish and Big Eye Tuna within
3715 the {Community}},
3716 titleaddon = {[2003] \emph{OJ} L295}}
3717 %</tex1|bib1>
3718 %<*driver|tex1>
3719 \end{Verbatim}
3720 %<*driver>
3721 \fi
3722 %</driver>
3723 \end{bibexbox}
3724
3725 \begin{hacks}\item
3726 Use \lstinline[style=dtxlatex]|\defcitealias| to provide a suitable citation string:
3727 \begin{tcblisting}{listing side text, lefthand width=.46\linewidth}
3728 \defcitealias{eu.dir1984/2003}{%
3729 Council Regulation [EC] 1984/2003}
3730 \citepalias{eu.dir1984/2003}
3731 \end{tcblisting}
3732 \end{hacks}
3733
3734
3735 \subsection{Legal document: case reports}
3736
3737 \subsubsection*{Judgment of the European Court of Justice}
3738
3739 \begin{bibexbox}<RX>{srl.etal-v-comm2005}
3740 \emph{Alessandrini Srl and others v.~Commission} (C-295/03 P) [2005] ECR I--5700.
3741 \tcblower
3742 \begin{Verbatim}
3743 %</driver|tex1>
3744 %<*driver|bib>
3745 @jurisdiction{srl.etal-v-comm2005,
3746 title = {Alessandrini {Srl} and others v.~{Commission}},
3747 number = {C-295/03 P},
3748 year = {2005},
3749 journal = {ECR},
3750 volume = {I},
3751 pages = {5700}}
3752 %</driver|bib>
3753 %<*driver>
3754 \end{Verbatim}
3755 \iffalse
3756 %</driver>
3757 %<*tex1|bib1>
3758 @report{srl.etal-v-comm2005,
3759 title = {Alessandrini {Srl} and others v.~{Commission}},
3760 titleaddon = {(C-295/03 P) [2005] ECR I--5700}}
3761 %</tex1|bib1>
3762 %<*driver|tex1>
3763 \end{Verbatim}
3764 %<*driver>
3765 \fi
3766 %</driver>
3767 \end{bibexbox}
3768
3769 %<*driver>
3770 \begin{tips}\item
3771 Use the \texttt{number} field (or the non-standard \texttt{casenumber} field)
3772 for the case number. For Commission Decisions, use the (non-standard)
3773 \texttt{casenumber} or (\textsf{biblatex-oscola}) \texttt{userb} field for the
3774 Commission case number, \texttt{number} for the formal decision number, and give
3775 `Commission' as the \texttt{institution}.
3776 \end{tips}
3777 %</driver>
3778
3779 \subsubsection*{Legal case study}
3780
3781 \begin{bibexbox}<RX>{seldon-v-c.w.j2009}
3782 \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].
3783 \tcblower
3784 \begin{Verbatim}
3785 %</driver|tex1>
3786 %<*driver|bib>
3787 @jurisdiction{seldon-v-c.w.j2009,
3788 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
3789 year = {2009},
3790 institution = {England and Wales Court of Appeal (Civil Division)},
3791 number = {889},
3792 journal = {Bailii},
3793 url = {http://www.bailii.org/ew/cases/EWCA/Civ/2009/889.html},
3794 urlyear = {23 April 2024}}
3795 %</driver|bib>
3796 %<*driver>
3797 \end{Verbatim}
3798 \iffalse
3799 %</driver>
3800 %<*tex1|bib1>
3801 @manual{seldon-v-c.w.j2009,
3802 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
3803 year = {2009},
3804 series = {{England and Wales Court of Appeal (Civil Division)}},
3805 number = {889},
3806 note = {\emph{Bailii} [Online]},
3807 url = {http://www.bailii.org/ew/cases/EWCA/Civ/2009/889.html},
3808 urldate = {23 April 2024}}
3809 %</tex1|bib1>
3810 %<*driver|tex1>
3811 \end{Verbatim}
3812 %<*driver>
3813 \fi
3814 %</driver>
3815 \end{bibexbox}
3816
3817 \begin{bibexbox}<RX>{braceurself-v-nhs.england2013}
3818 \emph{Braceurself Ltd v~NHS England}, 2013. England and Wales Court of Appeal (Civil Division), 39. \emph{Construction law reports}, 212, pp.95--135.
3819 \tcblower
3820 \begin{Verbatim}
3821 %</driver|tex1>
3822 %<*driver|bib>
3823 @jurisdiction{braceurself-v-nhs.england2013,
3824 title = {{Braceurself} {Ltd} v~{NHS} {England}},
3825 year = {2013},
3826 institution = {England and Wales Court of Appeal (Civil Division)},
3827 number = {39},
3828 journal = {Construction law reports},
3829 volume = {212},
3830 pages = {95-135}}
3831 %</driver|bib>
3832 %<*driver>
3833 \end{Verbatim}
3834 \iffalse
3835 %</driver>
3836 %<*tex1|bib1>
3837 @manual{braceurself-v-nhs.england2013,
3838 title = {{Braceurself} {Ltd} v~{NHS} {England}},
3839 year = {2013},
3840 series = {{England and Wales Court of Appeal (Civil Division)}},
3841 number = {39},
3842 note = {\emph{Construction law reports}, {212}},
3843 pages = {95-135}}
3844 %</tex1|bib1>
3845 %<*driver|tex1>
3846 \end{Verbatim}
3847 %<*driver>
3848 \fi
3849 %</driver>
3850 \end{bibexbox}
3851
3852 It is also possible to achieve a more traditional or
3853 \href{http://www.bailii.org/bailii/citation.html}{neutral citation} format,
3854 similar to Harvard (Bath)'s pre-2024 format:
3855
3856 \begin{bibexbox}<RX>{seldon-v-c.w.j2012}
3857 \emph{Seldon v~Clarkson Wright \& Jakes} [2012] UKSC 16.
3858 \tcblower
3859 \begin{Verbatim}
3860 %</driver|tex1>
3861 %<*driver|bib>
3862 @jurisdiction{seldon-v-c.w.j2012,
3863 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
3864 year = {2012},
3865 journal = {UKSC},
3866 pages = {16}}
3867 %</driver|bib>
3868 %<*driver>
3869 \end{Verbatim}
3870 \iffalse
3871 %</driver>
3872 %<*tex1|bib1>
3873 @report{seldon-v-c.w.j2012,
3874 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
3875 titleaddon = {[2012] UKSC 16}}
3876 %</tex1|bib1>
3877 %<*driver|tex1>
3878 \end{Verbatim}
3879 %<*driver>
3880 \fi
3881 %</driver>
3882 \end{bibexbox}
3883
3884
3885 \begin{info}\item
3886 Generally speaking, in a neutral citation the year should be in square brackets
3887 if it is essential to the citation (unless it is a Scottish case,
3888 in which case it is printed bare), and in parentheses if it is not.
3889 \end{info}
3890 %<*driver>
3891
3892 \begin{tips}\item
3893 By default, the style assumes the year is essential if and only if a volume number is
3894 \emph{not} provided; to override this, you can use the \key{year-essential} option:
3895
3896 \begin{tcolorbox}%
3897 [ colframe = Slate
3898 , colback = white
3899 , fontupper = \footnotesize
3900 ]
3901 \begin{Verbatim}
3902 options = {year-essential=true},
3903 \end{Verbatim}
3904 \end{tcolorbox}
3905
3906 To use Scottish style for a case, you can either use the \key{scottish-style} option or
3907 the keyword \texttt{sc}:
3908
3909 \begin{tcolorbox}%
3910 [ colframe = Slate
3911 , colback = white
3912 , fontupper = \footnotesize
3913 ]
3914 \begin{Verbatim}
3915 options = {scottish-style},
3916 keywords = {sc},
3917 \end{Verbatim}
3918 \end{tcolorbox}
3919 \end{tips}
3920
3921 \begin{info}\item
3922 Please bear in mind that the \texttt{options} and \texttt{keywords}
3923 fields from \textsf{biblatex} have been emulated rather crudely. You can only
3924 supply one of each and the text must match exactly (so don't add spaces
3925 or anything like that).
3926 \end{info}
3927
3928 \begin{hacks}\item
3929 This should cover most cases, but legal references tend to enforce their own conventions
3930 no matter what the rest of the reference list is doing,
3931 and it is out of scope for this style to cater for every variation.
3932 Therefore if you need a different format (e.g.~for an American case),
3933 you may prefer to format the reference more-or-less by hand:
3934
3935 \begin{tcolorbox}%
3936 [ colframe = Slate
3937 , colback = white
3938 , fontupper = \footnotesize
3939 ]
3940 \begin{Verbatim}
3941 title = {Seldon v~{Clarkson} {Wright} \& {Jakes}},
3942 sortyear = {2009},
3943 note = {[2009] EWCA Civ 889}
3944 \end{Verbatim}
3945 \end{tcolorbox}
3946 \end{hacks}
3947 %</driver>
3948
3949 %</driver|tex1>
3950 %<tex1>\bibliography{bath-bst-v1}
3951 %<*driver>
3952 \bibliography{bath-bst}
3953
3954 \section{Licence}
3955
3956 \begin{markdown}[texComments]
3957 %</driver>
3958 %<readme>
3959 %<readme>## Licence
3960 %<readme>
3961 %<*driver|readme>
3962 Copyright 2016-2026 University of Bath.
3963
3964 This work consists of the documented LaTeX file bath-bst.dtx and a Makefile.
3965
3966 The text files contained in this work may be distributed and/or modified
3967 under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
3968 either version 1.3c of this license or (at your option) any later
3969 version.
3970
3971 This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].
3972
3973 [lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
3974 [me]: https://github.com/alex-ball/bathbib "Alex Ball"
3975 %</driver|readme>
3976 %<*driver>
3977 \end{markdown}
3978
3979 \newpage
3980 \lstset
3981 { style=dtxbst
3982 , aboveskip=0pt
3983 , belowskip=0pt
3984 , numbers=left
3985 , numberstyle=\color{gray}\footnotesize\itshape
3986 , firstnumber=last
3987 , basicstyle=\ttfamily\footnotesize
3988 , breaklines=true
3989 }%
3990 \tcbset
3991 { listing options =
3992 { style = tcblatex
3993 , style = dtxbst
3994 , basicstyle=\ttfamily\footnotesize
3995 }
3996 }%
3997 \MakeShortVerb{\|}%
3998 \DocInput{\jobname.dtx}
3999
4000 %</driver>
4001 %<*driver|tex1>
4002 \end{document}
4003 %</driver|tex1>
4004 %<*bib|bib1>
4005 @book{adams2009tc1,
4006 author = {Adams, Gomez},
4007 year = {2009},
4008 title = {Test Citation One},
4009 address = {London},
4010 publisher = {Imperial College Press}}
4011 @book{adams2014tc2,
4012 author = {Adams, Gomez},
4013 year = {2014},
4014 title = {Test Citation Two},
4015 address = {Oxford},
4016 publisher = {Oxford University Press}}
4017 @book{adams2017tc3,
4018 author = {Adams, Gomez},
4019 year = {2017},
4020 title = {Test Citation Three},
4021 address = {Cambridge},
4022 publisher = {Cambridge University Press}}
4023 @book{jonesNDa,
4024 author = {Jones, John Walter},
4025 %<bib1> year = {n.d.},
4026 title = {Dyfyniad prawf},
4027 address = {Caernarfon},
4028 publisher = {Bwrdd yr Iaith Gymraeg}}
4029 @book{jonesNDb,
4030 author = {Jones, John Walter},
4031 %<bib1> year = {n.d.},
4032 title = {Test citation},
4033 address = {Cardiff},
4034 publisher = {Welsh Language Board}}
4035 @book{wang2018tc,
4036 author = {Wang, John},
4037 title = {Test Citation Four},
4038 year = {2018},
4039 address = {New York},
4040 publisher = {Random House}}
4041 @book{wang2020tc,
4042 author = {Wang, Kathy},
4043 title = {Test Citation Five},
4044 year = {2020},
4045 address = {New York},
4046 publisher = {Random House}}
4047 @book{wang.etal2002tc6,
4048 author = {Wang, John and Jones, John Walter and Stacey, D. and Rogers, T.},
4049 title = {Test Six},
4050 year = {2002},
4051 address = {Bath},
4052 publisher = {Really Decent Books}}
4053 @book{wang.etal2002tc7,
4054 author = {Wang, Kathy and Bloggs, C. and Reilly, T. and Luscott, M.},
4055 title = {Test Seven},
4056 year = {2002},
4057 address = {Bath},
4058 publisher = {Really Decent Books}}
4059 @book{smith.etal2020tc8,
4060 author = {Smith, R. and Taylor, C. and Rogers, T. and Wang, D.},
4061 title = {Test Eight},
4062 year = {2020},
4063 address = {Bath},
4064 publisher = {Bath Publishing}}
4065 @book{smith.etal2020tc9,
4066 author = {Smith, R. and Jones, John Walter and Stacey, D. and Lee, J.},
4067 title = {Test Nine},
4068 year = {2020},
4069 address = {Bath},
4070 publisher = {Bath Publishing}}
4071 %</bib|bib1>
4072 %<*bst1|bst2>
4073 % \fi
4074 %
4075 % \section{Implementation}
4076 %
4077 % The line numbers for the listings below match |bathx.bst|.
4078 % \setcounter{lstnumber}{16}
4079 % \newcounter{mismatch}
4080 %
4081 % Everything in this implementation is building towards section
4082 % \ref{sec:processing}. That is where the .bib file is read, the entries are
4083 % sorted, and the citation labels are generated. Once that is done, the
4084 % code writes the .bbl bibliography file.
4085 %
4086 % It starts by opening the |thebibliography| environment and providing
4087 % various \LaTeX\ commands. It then uses the entry drivers in section
4088 % \ref{sec:drivers} to write a |\bibitem| block for each entry. This block
4089 % starts with natbib-flavoured citation data, followed by the formatted text to
4090 % appear in the reference list. Lastly the environment is closed.
4091 %
4092 % All the entry drivers start by calling the |output.bibitem| function, which
4093 % is defined in section \ref{sec:writing2}. This writes the |\bibitem| command,
4094 % incorporating the generated label and adding some extra information. They
4095 % then process the data using the name formats defined in section
4096 % \ref{sec:nameformats}, the field formats defined in section
4097 % \ref{sec:fieldformats} and the punctuation tracking and output functions
4098 % defined in section \ref{sec:writing1}.
4099 %
4100 % \subsection{Data model}
4101 %
4102 % We begin by listing the entry fields that we will recognize. These are the
4103 % standard Bib\TeX\ ones plus |archive|, |doi|, |eid|, |eprint|, |entrysubtype|,
4104 % |eventyear|, |keywords|, |language|, |library|, |options|, |pubstate|,
4105 % |shortauthor|, |shorteditor|, |sortyear|, |titleaddon|, |translator|, |url|,
4106 % |urldate|, |urlyear|, |userb|, |venue|, and |version|,
4107 % all of which have been backported from \textsf{natbib} and \textsf{biblatex}.
4108 % |casenumber| is specific to this style.
4109 %
4110 % \begin{macrocode}
4111 ENTRY
4112 { address
4113 archive
4114 author
4115 booktitle
4116 casenumber
4117 chapter
4118 doi
4119 edition
4120 editor
4121 eid
4122 entrysubtype
4123 eprint
4124 eventyear
4125 howpublished
4126 institution
4127 journal
4128 key
4129 keywords
4130 language
4131 library
4132 month
4133 nameaddon
4134 note
4135 number
4136 options
4137 organization
4138 pages
4139 publisher
4140 pubstate
4141 school
4142 series
4143 shortauthor
4144 shorteditor
4145 sortyear
4146 title
4147 titleaddon
4148 translator
4149 type
4150 url
4151 urldate
4152 urlyear
4153 userb
4154 venue
4155 version
4156 volume
4157 year
4158 }
4159 % \end{macrocode}
4160 %
4161 % The second and third arguments to |ENTRY| are integer and string fields
4162 % (respectively) for which the style will generate its own values.
4163 %
4164 % \begin{macrocode}
4165 { cite.initials disamb.names }
4166 { label label.source extra.label sort.label short.list }
4167 % \end{macrocode}
4168 %
4169 % \subsection{Utilities for writing reference entries to the file}
4170 % \label{sec:writing1}
4171 %
4172 % This section contains generic functions for writing out the formatted
4173 % reference.
4174 %
4175 % We define a set of integers for saving an output state. We will use them to
4176 % to implement the mechanism for stringing the elements of the reference
4177 % together. Whenever an element is printed, it is separated from any previous
4178 % previous text by a delimiter, and the delimiter chosen depends on the state.
4179 % We define five states which trigger increasingly strong delimiters.
4180 %
4181 % \begin{macrocode}
4182 INTEGERS {
4183 output.state before.all mid.clause mid.sentence after.sentence after.block
4184 online.shown
4185 }
4186 FUNCTION {init.state.consts}
4187 { #0 'before.all :=
4188 #1 'mid.clause :=
4189 #2 'mid.sentence :=
4190 #3 'after.sentence :=
4191 #4 'after.block :=
4192 }
4193 % \end{macrocode}
4194 %
4195 % We also define some variables to store strings in.
4196 %
4197 % \begin{macrocode}
4198 STRINGS { s t field abbrev }
4199 % \end{macrocode}
4200 %
4201 % The |output.nonnull| function takes the top two tokens (strings) from the
4202 % stack. It appends the appropriate delimiter to the earlier token and writes
4203 % it to the .bbl file. It then returns the later (topmost) token to the top of
4204 % the stack ready for the next occurrence of the function. These are the
4205 % delimiters used in each state:
4206 %
4207 % \begin{itemize}
4208 % \item |before.all| = nothing is written.
4209 % \item |mid.clause| = a space is written.
4210 % \item |mid.sentence| = a comma is written.
4211 % \item |after.sentence| = a period is written.
4212 % \item |after.block| = a period, line break and |\newblock| are written.
4213 % \end{itemize}
4214 %
4215 % Afterwards, the output state is set to |mid.sentence|.
4216 %
4217 % \begin{macrocode}
4218 FUNCTION {output.nonnull}
4219 { 's :=
4220 output.state mid.sentence =
4221 { ", " * write$ }
4222 { output.state after.sentence =
4223 { add.period$ " " * write$ }
4224 { output.state before.all =
4225 'write$
4226 { output.state mid.clause =
4227 { " " * write$ }
4228 { add.period$ write$
4229 newline$
4230 "\newblock " write$
4231 }
4232 if$
4233 }
4234 if$
4235 }
4236 if$
4237 mid.sentence 'output.state :=
4238 }
4239 if$
4240 s
4241 }
4242 % \end{macrocode}
4243 %
4244 % The `after' output states persist if nothing is printed. The `mid.clause'
4245 % state shouldn't, so we provide a macro for reverting to `mid.sentence'.
4246 %
4247 % \begin{macrocode}
4248 FUNCTION {end.clause}
4249 { output.state mid.clause =
4250 { mid.sentence 'output.state := }
4251 'skip$
4252 if$
4253 }
4254 % \end{macrocode}
4255 %
4256 % We provide two wrappers around |output.nonull| to avoid passing it empty
4257 % strings: |output| is silent, while |output.check| will write a warning to the
4258 % log that the field is empty. The latter consumes an additional string (at the
4259 % top of the stack) for printing in the warning message.
4260 %
4261 % \begin{macrocode}
4262 FUNCTION {output}
4263 { duplicate$ empty$
4264 { pop$ end.clause }
4265 'output.nonnull
4266 if$
4267 }
4268 FUNCTION {output.check}
4269 { 't :=
4270 duplicate$ empty$
4271 { pop$ "empty " t * " in " * cite$ * warning$
4272 end.clause
4273 }
4274 'output.nonnull
4275 if$
4276 }
4277 % \end{macrocode}
4278 %
4279 % We provide some convenience functions for changing the state from
4280 % |mid.sentence|. The order of precedence is before.all, after.block,
4281 % after.sentence, mid.clause/mid.sentence.
4282 %
4283 % \begin{macrocode}
4284 FUNCTION {new.block}
4285 { output.state before.all =
4286 'skip$
4287 { after.block 'output.state := }
4288 if$
4289 }
4290 FUNCTION {new.sentence}
4291 { output.state after.block =
4292 'skip$
4293 { output.state before.all =
4294 'skip$
4295 { after.sentence 'output.state := }
4296 if$
4297 }
4298 if$
4299 }
4300 FUNCTION {continue.clause}
4301 { output.state after.sentence =
4302 'skip$
4303 { output.state after.block =
4304 'skip$
4305 { output.state before.all =
4306 'skip$
4307 { mid.clause 'output.state := }
4308 if$
4309 }
4310 if$
4311 }
4312 if$
4313 }
4314 % \end{macrocode}
4315 %
4316 % The |date.block| function is a handy alias.
4317 %
4318 % \begin{macrocode}
4319 FUNCTION {date.block}
4320 { new.block
4321 }
4322 % \end{macrocode}
4323 %
4324 % The |bibinfo| functions consume two tokens -- the value and name of a
4325 % field respectively -- and return a single string. If the value is non-null,
4326 % the tokens are concatenated in the form |\bibinfo{field name}{field value}|,
4327 % otherwise an empty string is returned.
4328 %
4329 % The |check| version does this silently, while the |warn| version issues a
4330 % warning in the log file if the value is missing or empty.
4331 %
4332 % \begin{macrocode}
4333 FUNCTION {bibinfo.check}
4334 { swap$
4335 duplicate$ missing$
4336 { pop$ pop$
4337 ""
4338 }
4339 { duplicate$ empty$
4340 { swap$ pop$
4341 }
4342 { swap$
4343 "\bibinfo{" swap$ * "}{" * swap$ * "}" *
4344 }
4345 if$
4346 }
4347 if$
4348 }
4349 FUNCTION {bibinfo.warn}
4350 { swap$
4351 duplicate$ missing$
4352 { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
4353 ""
4354 }
4355 { duplicate$ empty$
4356 { swap$ "empty " swap$ * " in " * cite$ * warning$
4357 }
4358 { swap$
4359 "\bibinfo{" swap$ * "}{" * swap$ * "}" *
4360 }
4361 if$
4362 }
4363 if$
4364 }
4365 % \end{macrocode}
4366 %
4367 % At the end of the reference, |fin.entry| writes out a final period and line
4368 % break. We will handle the start of the reference a bit later.
4369 %
4370 % \begin{macrocode}
4371 FUNCTION {fin.entry}
4372 { add.period$
4373 write$
4374 newline$
4375 }
4376
4377 % \end{macrocode}
4378 %
4379 % \subsection{Convenience functions}
4380 %
4381 % We define some useful logical operations for use with |if$|.
4382 %
4383 % \begin{macrocode}
4384 FUNCTION {not}
4385 { { #0 }
4386 { #1 }
4387 if$
4388 }
4389 FUNCTION {and}
4390 { 'skip$
4391 { pop$ #0 }
4392 if$
4393 }
4394 FUNCTION {or}
4395 { { pop$ #1 }
4396 'skip$
4397 if$
4398 }
4399 % \end{macrocode}
4400 %
4401 % |new.block.checkb| consumes two tokens and starts a new block if at least one
4402 % is non-empty.
4403 %
4404 % \begin{macrocode}
4405 FUNCTION {new.block.checkb}
4406 { empty$
4407 swap$ empty$
4408 and
4409 'skip$
4410 'new.block
4411 if$
4412 }
4413 % \end{macrocode}
4414 %
4415 % |field.or.null| replaces an empty (null) field value with an empty string.
4416 %
4417 % \begin{macrocode}
4418 FUNCTION {field.or.null}
4419 { duplicate$ empty$
4420 { pop$ "" }
4421 'skip$
4422 if$
4423 }
4424 % \end{macrocode}
4425 %
4426 % The \texttt{emphasize} function applies emphasis to the topmest token.
4427 %
4428 % \begin{macrocode}
4429 FUNCTION {emphasize}
4430 { duplicate$ empty$
4431 { pop$ "" }
4432 { "\emph{" swap$ * "}" * }
4433 if$
4434 }
4435 % \end{macrocode}
4436 %
4437 % The \texttt{tie.or.space.prefix} function prefixes a string with a non-breaking
4438 % space if it is up to three characters long, or a normal space otherwise.
4439 %
4440 % \begin{macrocode}
4441 FUNCTION {tie.or.space.prefix}
4442 { duplicate$ text.length$ #3 <
4443 { "~" }
4444 { " " }
4445 if$
4446 swap$
4447 }
4448 % \end{macrocode}
4449 %
4450 % The \texttt{capitalize} function makes putting strings into sentence case a
4451 % little more robust.
4452 %
4453 % \begin{macrocode}
4454 FUNCTION {capitalize}
4455 { "u" change.case$ "t" change.case$ }
4456 % \end{macrocode}
4457 %
4458 % The \texttt{space.word} function adds a space to either side of a string.
4459 %
4460 % \begin{macrocode}
4461 FUNCTION {space.word}
4462 { " " swap$ * " " * }
4463 % \end{macrocode}
4464 %
4465 % |either.or.check| takes a string and a field, and if the field is not empty,
4466 % writes a warning to the log file.
4467 %
4468 % \begin{macrocode}
4469 FUNCTION {either.or.check}
4470 { empty$
4471 'pop$
4472 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
4473 if$
4474 }
4475 % \end{macrocode}
4476 %
4477 % |is.online| checks whether the entry should have `[Online]' in it somewhere.
4478 %
4479 % \begin{macrocode}
4480 FUNCTION {is.online}
4481 { online.shown
4482 { #0 }
4483 { url empty$
4484 doi empty$ and
4485 urldate empty$ and
4486 urlyear empty$ and
4487 { type$ "online" =
4488 { #1 }
4489 { #0 }
4490 if$
4491 }
4492 { #1 }
4493 if$
4494 }
4495 if$
4496 }
4497 % \end{macrocode}
4498 %
4499 % \subsection{Bibliography strings}
4500 %
4501 % Instead of dropping literal English words into the text of references, we
4502 % will use these functions instead. This makes it easier to translate the style
4503 % into other languages.
4504 %
4505 % \begin{macrocode}
4506 FUNCTION {bbl.and}
4507 { "and"}
4508
4509 FUNCTION {bbl.byeditor}
4510 { "Ed. by" }
4511
4512 FUNCTION {bbl.etal}
4513 { "et~al." }
4514
4515 FUNCTION {bbl.editors}
4516 { "eds" }
4517
4518 FUNCTION {bbl.editor}
4519 { "ed." }
4520
4521 FUNCTION {bbl.edby}
4522 { "edited by" }
4523
4524 FUNCTION {bbl.translator}
4525 { "Trans." }
4526
4527 FUNCTION {bbl.edition}
4528 { "ed." }
4529
4530 FUNCTION {bbl.volume}
4531 { "vol." }
4532
4533 FUNCTION {bbl.of}
4534 { "of" }
4535
4536 FUNCTION {bbl.number}
4537 { "no." }
4538
4539 FUNCTION {bbl.nr}
4540 { "no." }
4541
4542 FUNCTION {bbl.in}
4543 { "in" }
4544
4545 FUNCTION {bbl.pages}
4546 { "pp." }
4547
4548 FUNCTION {bbl.page}
4549 { "p." }
4550
4551 FUNCTION {bbl.chapter}
4552 { "chap." }
4553
4554 FUNCTION {bbl.techrep}
4555 { "Tech. Rep." }
4556
4557 FUNCTION {bbl.mthesis}
4558 { "Master's thesis" }
4559
4560 FUNCTION {bbl.phdthesis}
4561 { "Ph.D. thesis" }
4562
4563 FUNCTION {bbl.first}
4564 { "1st" }
4565
4566 FUNCTION {bbl.second}
4567 { "2nd" }
4568
4569 FUNCTION {bbl.third}
4570 { "3rd" }
4571
4572 FUNCTION {bbl.fourth}
4573 { "4th" }
4574
4575 FUNCTION {bbl.fifth}
4576 { "5th" }
4577
4578 FUNCTION {bbl.st}
4579 { "st" }
4580
4581 FUNCTION {bbl.nd}
4582 { "nd" }
4583
4584 FUNCTION {bbl.rd}
4585 { "rd" }
4586
4587 FUNCTION {bbl.th}
4588 { "th" }
4589
4590 FUNCTION {bbl.commission}
4591 { "Commission Decision" }
4592
4593 FUNCTION {bbl.online}
4594 { "[Online]" }
4595
4596 FUNCTION {bbl.nodate}
4597 { "n.d." }
4598
4599 FUNCTION {bbl.inpreparation}
4600 { "preprint" }
4601
4602 FUNCTION {bbl.submitted}
4603 { "preprint" }
4604
4605 FUNCTION {bbl.inpress}
4606 { "in press" }
4607
4608 FUNCTION {bbl.unpublished}
4609 { "Unpublished" }
4610
4611 % \end{macrocode}
4612 %
4613 % These macros are codes that users can put in their \texttt{.bib} file instead of
4614 % literal strings.
4615 %
4616 % \begin{macrocode}
4617 MACRO {jan} {"January"}
4618
4619 MACRO {feb} {"February"}
4620
4621 MACRO {mar} {"March"}
4622
4623 MACRO {apr} {"April"}
4624
4625 MACRO {may} {"May"}
4626
4627 MACRO {jun} {"June"}
4628
4629 MACRO {jul} {"July"}
4630
4631 MACRO {aug} {"August"}
4632
4633 MACRO {sep} {"September"}
4634
4635 MACRO {oct} {"October"}
4636
4637 MACRO {nov} {"November"}
4638
4639 MACRO {dec} {"December"}
4640
4641 % \end{macrocode}
4642 %
4643 % This function takes a cardinal number and replaces it with the corresponding
4644 % English ordinal.
4645 %
4646 % \begin{macrocode}
4647 FUNCTION {eng.ord}
4648 { duplicate$ "1" swap$ *
4649 #-2 #1 substring$ "1" =
4650 { bbl.th * }
4651 { duplicate$ #-1 #1 substring$
4652 duplicate$ "1" =
4653 { pop$ bbl.st * }
4654 { duplicate$ "2" =
4655 { pop$ bbl.nd * }
4656 { "3" =
4657 { bbl.rd * }
4658 { bbl.th * }
4659 if$
4660 }
4661 if$
4662 }
4663 if$
4664 }
4665 if$
4666 }
4667 % \end{macrocode}
4668 %
4669 % |word.in| provides the `In:' before book titles.
4670 %
4671 % \begin{macrocode}
4672 FUNCTION {word.in}
4673 { bbl.in capitalize
4674 ":" *
4675 " " * }
4676
4677 % \end{macrocode}
4678 %
4679 % \subsection{Name formats}
4680 % \label{sec:nameformats}
4681 %
4682 % These variables will help with iterating through the names.
4683 %
4684 % \begin{macrocode}
4685 INTEGERS { nameptr namesleft numnames }
4686 % \end{macrocode}
4687 %
4688 % \subsubsection{Names in verbose citations}
4689 %
4690 % These name formats support natbib's |\citet*| and |\citep*| commands, which
4691 % suppress the normal `et al.\@' truncation so all author surnames are shown.
4692 %
4693 % |format.full.names| consumes one token (a name field) and returns a list of
4694 % surnames. The `full' bit refers to the list, rather than the individual
4695 % names included in it. The first name may appear as it does in the
4696 % reference list (that is, followed by the initial) to distinguish it from a
4697 % different lead author with the same surname.
4698 %
4699 % \begin{macrocode}
4700 FUNCTION {format.full.names}
4701 { 's :=
4702 "" 't :=
4703 #1 'nameptr :=
4704 s num.names$ 'numnames :=
4705 numnames 'namesleft :=
4706 { namesleft #0 > }
4707 { s nameptr
4708 duplicate$ #1 =
4709 cite.initials
4710 and
4711 { "{ll}{, jj}{, f{.}.}{~vv}" }
4712 { "{ll}" }
4713 if$
4714 format.name$
4715 't :=
4716 nameptr #1 >
4717 { namesleft #1 >
4718 { ", " * t * }
4719 { s nameptr "{ll}" format.name$ duplicate$ "others" =
4720 { 't := }
4721 { pop$ }
4722 if$
4723 t "others" =
4724 { " " * bbl.etal *
4725 }
4726 { bbl.and
4727 space.word * t *
4728 }
4729 if$
4730 }
4731 if$
4732 }
4733 't
4734 if$
4735 nameptr #1 + 'nameptr :=
4736 namesleft #1 - 'namesleft :=
4737 }
4738 while$
4739 }
4740 % \end{macrocode}
4741 %
4742 % |author.editor.key.full| returns the author part of an author--year citation.
4743 % In order of preference, it outputs the author surnames, editor surnames, the
4744 % |key| field, or the first three characters of the entry key. It is used in
4745 % |book| and |inbook| entry types.
4746 %
4747 % \begin{macrocode}
4748 FUNCTION {author.editor.key.full}
4749 { shortauthor empty$
4750 { author empty$
4751 { shorteditor empty$
4752 { editor empty$
4753 { key empty$
4754 { cite$ #1 #3 substring$ }
4755 'key
4756 if$
4757 }
4758 { editor format.full.names }
4759 if$
4760 }
4761 { shorteditor format.full.names }
4762 if$
4763 }
4764 { author format.full.names }
4765 if$
4766 }
4767 { shortauthor format.full.names }
4768 if$
4769 }
4770 % \end{macrocode}
4771 %
4772 % |editor.key.full| does similar but skips the author names. It is used for the
4773 % |proceedings| entry type.
4774 %
4775 % \begin{macrocode}
4776 FUNCTION {editor.key.full}
4777 { shorteditor empty$
4778 { editor empty$
4779 { key empty$
4780 { cite$ #1 #3 substring$ }
4781 'key
4782 if$
4783 }
4784 { editor format.full.names }
4785 if$
4786 }
4787 { shorteditor format.full.names }
4788 if$
4789 }
4790 % \end{macrocode}
4791 %
4792 % |author.key.full| does similar but skips the editor names. It is used for all
4793 % other entry types.
4794 %
4795 % \begin{macrocode}
4796 FUNCTION {author.key.full}
4797 { shortauthor empty$
4798 { author empty$
4799 { key empty$
4800 { cite$ #1 #3 substring$ }
4801 'key
4802 if$
4803 }
4804 { author format.full.names }
4805 if$
4806 }
4807 { shortauthor format.full.names }
4808 if$
4809 }
4810 % \end{macrocode}
4811 %
4812 % |make.full.names| chooses between the above.
4813 %
4814 % \begin{macrocode}
4815 FUNCTION {make.full.names}
4816 { type$ "book" =
4817 type$ "inbook" =
4818 or
4819 'author.editor.key.full
4820 { type$ "proceedings" =
4821 'editor.key.full
4822 'author.key.full
4823 if$
4824 }
4825 if$
4826 }
4827 % \end{macrocode}
4828 %
4829 % \subsubsection{Names in normal citations}
4830 %
4831 % |format.lab.names| is similar to |format.full.names|, the main difference
4832 % being that if there are more than 3 names in the list, the later names are
4833 % replaced with `et al.' The number of names remaining equals the entry's
4834 % |disamb.names| value (default 0) plus 1; this gets set by the functions in
4835 % section \ref{sec:disamb}.
4836 %
4837 % \begin{macrocode}
4838 FUNCTION {format.lab.names}
4839 { 's :=
4840 "" 't :=
4841 #1 'nameptr :=
4842 s num.names$ 'numnames :=
4843 numnames 'namesleft :=
4844 { namesleft #0 > }
4845 { s nameptr
4846 duplicate$ #1 =
4847 cite.initials
4848 and
4849 { "{ll}{, jj}{, f{.}.}{~vv}" }
4850 { "{ll}" }
4851 if$
4852 format.name$
4853 't :=
4854 nameptr #1 >
4855 { nameptr #2 disamb.names + =
4856 numnames #3 > and
4857 { "others" 't :=
4858 #1 'namesleft := }
4859 'skip$
4860 if$
4861 namesleft #1 >
4862 { ", " * t * }
4863 { s nameptr "{ll}" format.name$ duplicate$ "others" =
4864 { 't := }
4865 { pop$ }
4866 if$
4867 t "others" =
4868 { " " * bbl.etal *
4869 }
4870 { bbl.and
4871 space.word * t *
4872 }
4873 if$
4874 }
4875 if$
4876 }
4877 't
4878 if$
4879 nameptr #1 + 'nameptr :=
4880 namesleft #1 - 'namesleft :=
4881 }
4882 while$
4883 }
4884 % \end{macrocode}
4885 %
4886 % |title.label| gives the title with the correct font shape, for use as a
4887 % fallback label. This needs to be kept in sync with the logic used in the
4888 % various drivers and title formatting functions.
4889 %
4890 % \begin{macrocode}
4891 FUNCTION {title.label}
4892 { title
4893 duplicate$ 'label.source :=
4894 "t" change.case$
4895 type$ duplicate$
4896 "book" = swap$
4897 "collection" =
4898 or
4899 'emphasize
4900 {
4901 type$ duplicate$
4902 "techreport" = swap$
4903 "report" =
4904 or
4905 'emphasize
4906 {
4907 type$ duplicate$ duplicate$ duplicate$
4908 duplicate$ duplicate$ duplicate$ duplicate$
4909 "manual" = swap$
4910 "dataset" =
4911 or swap$
4912 "electronic" =
4913 or swap$
4914 "online" =
4915 or swap$
4916 "patent" =
4917 or swap$
4918 "software" =
4919 or swap$
4920 "standard" =
4921 or swap$
4922 "www" =
4923 or
4924 'emphasize
4925 {
4926 type$ duplicate$ duplicate$ duplicate$ duplicate$
4927 "booklet" = swap$
4928 "audio" =
4929 or swap$
4930 "movie" =
4931 or swap$
4932 "music" =
4933 or swap$
4934 "video" =
4935 or
4936 { type duplicate$ empty$
4937 { pop$ emphasize }
4938 { duplicate$ "TV" = swap$ "Radio" = or
4939 'skip$
4940 'emphasize
4941 if$
4942 }
4943 if$
4944 }
4945 {
4946 type$ "image" =
4947 'emphasize
4948 {
4949 type$ "jurisdiction" =
4950 'emphasize
4951 {
4952 type$ "legislation" =
4953 { journal empty$
4954 'emphasize
4955 'skip$
4956 if$
4957 }
4958 {
4959 type$ "proceedings" =
4960 'emphasize
4961 {
4962 type$ "unpublished" =
4963 booktitle empty$
4964 and
4965 'emphasize
4966 {}
4967 if$
4968 } if$
4969 } if$
4970 } if$
4971 } if$
4972 } if$
4973 } if$
4974 } if$
4975 } if$
4976 }
4977 % \end{macrocode}
4978 %
4979 % The following three functions enable the label to be chosen from several
4980 % fields. In each case the raw data used is saved in the entry's |label.source|
4981 % field, so the we can tell by comparison whether it is a name list or not
4982 % later on.
4983 %
4984 % |author.editor.key.label| is the analogue of |author.editor.key.full| but with
4985 % a truncated list of author\slash editor names.
4986 %
4987 % \begin{macrocode}
4988 FUNCTION {author.editor.key.label}
4989 { shortauthor empty$
4990 { author empty$
4991 { shorteditor empty$
4992 { editor empty$
4993 { key empty$
4994 { title empty$
4995 { cite$
4996 duplicate$ 'label.source :=
4997 #1 #3 substring$
4998 }
4999 'title.label
5000 if$
5001 }
5002 { key
5003 duplicate$ 'label.source :=
5004 }
5005 if$
5006 }
5007 { editor
5008 duplicate$ 'label.source :=
5009 format.lab.names
5010 }
5011 if$
5012 }
5013 { shorteditor
5014 duplicate$ 'label.source :=
5015 format.lab.names
5016 }
5017 if$
5018 }
5019 { author
5020 duplicate$ 'label.source :=
5021 format.lab.names
5022 }
5023 if$
5024 }
5025 { shortauthor
5026 duplicate$ 'label.source :=
5027 format.lab.names
5028 }
5029 if$
5030 }
5031 % \end{macrocode}
5032 %
5033 % |editor.key.label| is the analogue of |editor.key.full| but with
5034 % a truncated list of editor names.
5035 %
5036 % \begin{macrocode}
5037 FUNCTION {editor.key.label}
5038 { shorteditor empty$
5039 { editor empty$
5040 { key empty$
5041 { title empty$
5042 { cite$
5043 duplicate$ 'label.source :=
5044 #1 #3 substring$
5045 }
5046 'title.label
5047 if$
5048 }
5049 { key
5050 duplicate$ 'label.source :=
5051 }
5052 if$
5053 }
5054 { editor
5055 duplicate$ 'label.source :=
5056 format.lab.names
5057 }
5058 if$
5059 }
5060 { shorteditor
5061 duplicate$ 'label.source :=
5062 format.lab.names
5063 }
5064 if$
5065 }
5066 % \end{macrocode}
5067 %
5068 % |author.key.label| is the analogue of |author.key.full| but with
5069 % a truncated list of author names.
5070 %
5071 % \begin{macrocode}
5072 FUNCTION {author.key.label}
5073 { shortauthor empty$
5074 { author empty$
5075 { key empty$
5076 { type$ "inreference" =
5077 booktitle empty$ not
5078 and
5079 { booktitle
5080 duplicate$ 'label.source :=
5081 }
5082 { title empty$
5083 { cite$
5084 duplicate$ 'label.source :=
5085 #1 #3 substring$
5086 }
5087 'title.label
5088 if$
5089 }
5090 if$
5091 }
5092 { key
5093 duplicate$ 'label.source :=
5094 }
5095 if$
5096 }
5097 { author
5098 duplicate$ 'label.source :=
5099 format.lab.names
5100 }
5101 if$
5102 }
5103 { shortauthor
5104 duplicate$ 'label.source :=
5105 format.lab.names
5106 }
5107 if$
5108 }
5109 % \end{macrocode}
5110 %
5111 % |calc.short.authors| chooses between the above.
5112 %
5113 % \begin{macrocode}
5114 FUNCTION {calc.short.authors}
5115 { type$ "book" =
5116 type$ "inbook" =
5117 or
5118 'author.editor.key.label
5119 { type$ "proceedings" =
5120 'editor.key.label
5121 'author.key.label
5122 if$
5123 }
5124 if$
5125 'short.list :=
5126 }
5127 % \end{macrocode}
5128 %
5129 % \subsubsection{Names at the head of the reference}
5130 %
5131 % |format.names| consumes two tokens (field, string field name) and returns a
5132 % list of names in the form `Surname, Suffix, Initials Prefix'. To help with this,
5133 % we define some additional integers and strings.
5134 %
5135 % \begin{macrocode}
5136 FUNCTION {format.names}
5137 { 'field :=
5138 duplicate$ empty$
5139 'skip$
5140 { 's :=
5141 "" 't :=
5142 #1 'nameptr :=
5143 s num.names$ 'numnames :=
5144 numnames 'namesleft :=
5145 { namesleft #0 > }
5146 { s nameptr
5147 "{ll}{, jj}{, f{.}.}{~vv}"
5148 format.name$
5149 field bibinfo.check
5150 't :=
5151 nameptr #1 >
5152 { namesleft #1 >
5153 { ", " * t * }
5154 { s nameptr "{ll}" format.name$ duplicate$ "others" =
5155 { 't := }
5156 { pop$ }
5157 if$
5158 t "others" =
5159 { " " * bbl.etal *
5160 }
5161 { bbl.and
5162 space.word * t *
5163 }
5164 if$
5165 }
5166 if$
5167 }
5168 't
5169 if$
5170 nameptr #1 + 'nameptr :=
5171 namesleft #1 - 'namesleft :=
5172 }
5173 while$
5174 }
5175 if$
5176 }
5177 % \end{macrocode}
5178 %
5179 % |format.names.short| consumes three tokens (field, short field, string
5180 % field name) and operates much like |format.names|, except that the field
5181 % (e.g.\@ |author|) and its short counterpart (e.g.\@ |shortauthor|) are
5182 % iterated in parallel. If the values differ, the short version is printed plain
5183 % and the regular version is printed after in parentheses. If the short field
5184 % is empty or does not have the same number of names as the regular field, the
5185 % regular field is processed with |format.names| instead.
5186 %
5187 % \begin{macrocode}
5188 FUNCTION {format.names.short}
5189 { 'field :=
5190 duplicate$ empty$
5191 { pop$ field format.names }
5192 { 'abbrev :=
5193 duplicate$ empty$
5194 'skip$
5195 { 's :=
5196 "" 't :=
5197 #1 'nameptr :=
5198 s num.names$ duplicate$ 'numnames :=
5199 abbrev num.names$ =
5200 { numnames 'namesleft :=
5201 { namesleft #0 > }
5202 { abbrev nameptr "{ll}{, jj}{, f{.}.}{~vv}" format.name$
5203 't :=
5204 s nameptr "{ll}{, jj}{, f{.}.}{~vv}" format.name$
5205 duplicate$ t =
5206 { field bibinfo.check 't := }
5207 { " (" swap$ * ")" *
5208 t field bibinfo.check swap$ *
5209 't :=
5210 }
5211 if$
5212 nameptr #1 >
5213 { namesleft #1 >
5214 { ", " * t * }
5215 { s nameptr "{ll}" format.name$ duplicate$ "others" =
5216 { 't := }
5217 { pop$ }
5218 if$
5219 t "others" =
5220 { " " * bbl.etal *
5221 }
5222 { bbl.and
5223 space.word * t *
5224 }
5225 if$
5226 }
5227 if$
5228 }
5229 't
5230 if$
5231 nameptr #1 + 'nameptr :=
5232 namesleft #1 - 'namesleft :=
5233 }
5234 while$
5235 }
5236 { s field format.names }
5237 if$
5238 }
5239 if$
5240 }
5241 if$
5242 }
5243 % \end{macrocode}
5244 %
5245 % |format.names.ed| consumes two tokens (field, string field name) and writes
5246 % out a list of names in the form `Initials Prefix Surname Suffix'.
5247 %
5248 % \begin{macrocode}
5249 FUNCTION {format.names.ed}
5250 { 'field :=
5251 duplicate$ empty$
5252 'skip$
5253 { 's :=
5254 "" 't :=
5255 #1 'nameptr :=
5256 s num.names$ 'numnames :=
5257 numnames 'namesleft :=
5258 { namesleft #0 > }
5259 { s nameptr
5260 "{f{.}.~}{vv~}{ll}{ jj}"
5261 format.name$
5262 field bibinfo.check
5263 't :=
5264 nameptr #1 >
5265 { namesleft #1 >
5266 { ", " * t * }
5267 { s nameptr "{ll}" format.name$ duplicate$ "others" =
5268 { 't := }
5269 { pop$ }
5270 if$
5271 t "others" =
5272 { " " * bbl.etal *
5273 }
5274 { bbl.and
5275 space.word * t *
5276 }
5277 if$
5278 }
5279 if$
5280 }
5281 't
5282 if$
5283 nameptr #1 + 'nameptr :=
5284 namesleft #1 - 'namesleft :=
5285 }
5286 while$
5287 }
5288 if$
5289 }
5290 % \end{macrocode}
5291 %
5292 % |format.authors| returns author names.
5293 %
5294 % \begin{macrocode}
5295 FUNCTION {format.authors}
5296 { author shortauthor "author" format.names.short
5297 }
5298 % \end{macrocode}
5299 %
5300 % |format.byeditors| returns editor names, and prepended by `Ed. by'.
5301 %
5302 % \begin{macrocode}
5303 FUNCTION {format.byeditors}
5304 { editor "editor" format.names.ed duplicate$ empty$ 'skip$
5305 { bbl.byeditor
5306 " " *
5307 swap$ *
5308 }
5309 if$
5310 }
5311 % \end{macrocode}
5312 %
5313 % |format.editors| returns editor names, and appends `ed.' or `eds' as
5314 % appropriate.
5315 %
5316 % \begin{macrocode}
5317 FUNCTION {get.bbl.editor}
5318 { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
5319 FUNCTION {format.editors}
5320 { editor shorteditor "editor" format.names.short duplicate$ empty$ 'skip$
5321 { "," *
5322 " " *
5323 get.bbl.editor
5324 *
5325 }
5326 if$
5327 }
5328 % \end{macrocode}
5329 %
5330 % |format.translators| does likewise for translators, in the form
5331 % `(name, Trans.)'.
5332 %
5333 % \begin{macrocode}
5334 FUNCTION {format.translators}
5335 { translator "translator" format.names.ed duplicate$ empty$ 'skip$
5336 { "," *
5337 " " *
5338 bbl.translator *
5339 "(" swap$ *
5340 ")" *
5341 }
5342 if$
5343 }
5344 % \end{macrocode}
5345 %
5346 % \subsection{Field formats}
5347 % \label{sec:fieldformats}
5348 %
5349 % Each of the |format.*| functions below (and above) add a single string
5350 % (possibly empty) to the stack, based on the value of one or more fields.
5351 %
5352 % \subsubsection{Head block}
5353 %
5354 % |format.key| takes a field (author or editor). If the field is empty, it
5355 % replaces it with the key field (if not non-null). Otherwise, replaces it with
5356 % an empty string. It is used as an extra defence against an entry beginning
5357 % with the date.
5358 %
5359 % \begin{macrocode}
5360 FUNCTION {format.key}
5361 { empty$
5362 { key field.or.null }
5363 { "" }
5364 if$
5365 nameaddon duplicate$ empty$
5366 'pop$
5367 { swap$ duplicate$ empty$
5368 'skip$
5369 { " " * }
5370 if$
5371 swap$ "[" swap$ * * "]" *
5372 continue.clause
5373 }
5374 if$
5375 }
5376 % \end{macrocode}
5377 %
5378 % \subsubsection{Title block}
5379 %
5380 % |select.language| checks if the string at the top of the stack is empty, and
5381 % if not, wraps |{\selectlanguage{language}|\dots|}| around it.
5382 %
5383 % \begin{macrocode}
5384 FUNCTION {select.language}
5385 { duplicate$ empty$
5386 'pop$
5387 { language empty$
5388 'skip$
5389 { "{\selectlanguage{" language * "}" * swap$ * "}" * }
5390 if$
5391 }
5392 if$
5393 }
5394 % \end{macrocode}
5395 %
5396 % |format.title| returns the title and language fields, where the title
5397 % should be in the upright shape.
5398 %
5399 % \begin{macrocode}
5400 FUNCTION {format.title}
5401 { title
5402 duplicate$ empty$ 'skip$
5403 { "t" change.case$ }
5404 if$
5405 "title" bibinfo.check
5406 duplicate$ empty$
5407 'skip$
5408 { select.language }
5409 if$
5410 }
5411 % \end{macrocode}
5412 %
5413 % |format.btitle| returns the title and language fields, where the title
5414 % should be in the italic shape.
5415 %
5416 % \begin{macrocode}
5417 FUNCTION {format.btitle}
5418 { title
5419 duplicate$ empty$ 'skip$
5420 { "t" change.case$ }
5421 if$
5422 "title" bibinfo.check
5423 duplicate$ empty$
5424 'skip$
5425 { emphasize select.language }
5426 if$
5427 }
5428 % \end{macrocode}
5429 %
5430 % |format.avtitle| returns the title and language fields, where the shape
5431 % of the title (upright or italic) depends on the type.
5432 %
5433 % \begin{macrocode}
5434 FUNCTION {format.avtitle}
5435 { title
5436 duplicate$ empty$ 'skip$
5437 { "t" change.case$ }
5438 if$
5439 "title" bibinfo.check
5440 duplicate$ empty$
5441 'skip$
5442 { type duplicate$ empty$
5443 { pop$ emphasize }
5444 { duplicate$ "TV" = swap$ "Radio" = or
5445 'skip$
5446 'emphasize
5447 if$
5448 }
5449 if$
5450 select.language
5451 }
5452 if$
5453 }
5454 % \end{macrocode}
5455 % \iffalse
5456 %<*bst1>
5457 % \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
5458 %
5459 % |format.titleaddon| returns the titleaddon field. This is the |bath.bst|
5460 % version:
5461 %
5462 % \begin{macrocode}
5463 FUNCTION {format.titleaddon}
5464 { titleaddon
5465 duplicate$ empty$ 'skip$
5466 { "titleaddon" bibinfo.check }
5467 if$
5468 }
5469 % \end{macrocode}
5470 % \iffalse
5471 %</bst1>
5472 %<*bst2>
5473 % \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-6\relax}\bstIIonly
5474 %
5475 % This is the |bathx.bst| version:
5476 %
5477 % \begin{macrocode}
5478 FUNCTION {format.titleaddon}
5479 { titleaddon
5480 duplicate$ empty$ 'skip$
5481 { "[" swap$ "titleaddon" bibinfo.check * "]" * }
5482 if$
5483 }
5484 % \end{macrocode}
5485 % \iffalse
5486 %</bst2>
5487 % \fi\bstboth
5488 %
5489 % |format.version| returns the version field.
5490 %
5491 % \begin{macrocode}
5492 FUNCTION {format.version}
5493 { version
5494 duplicate$ empty$ 'skip$
5495 { "(v." swap$ *
5496 "version" bibinfo.check
5497 ")" *
5498 }
5499 if$
5500 }
5501 % \end{macrocode}
5502 %
5503 % |print.labeltitle.addenda| is a convenience for writing out the elements that
5504 % normally follow the title when it appears at the head of the reference.
5505 %
5506 % \begin{macrocode}
5507 FUNCTION {print.labeltitle.addenda}
5508 { continue.clause
5509 % \end{macrocode}
5510 % \iffalse
5511 %<*bst1>
5512 % \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
5513 %
5514 % In \texttt{bath.bst} it prints the version and then |titleaddon| field:
5515 %
5516 % \begin{macrocode}
5517 online.shown
5518 'skip$
5519 { format.version output
5520 continue.clause
5521 format.titleaddon output
5522 #1 'online.shown :=
5523 }
5524 if$
5525 % \end{macrocode}
5526 % \iffalse
5527 %</bst1>
5528 %<*bst2>
5529 % \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-8\relax}\bstIIonly
5530 %
5531 % In \texttt{bathx.bst} it prints the |titleaddon| field, then the version,
5532 % then either the |entrysubtype| or the |bbl.online| string as appropriate:
5533 %
5534 % \begin{macrocode}
5535 format.titleaddon output
5536 continue.clause
5537 type$ duplicate$ "legislation" = not
5538 swap$ "jurisdiction" = not
5539 and
5540 { format.version output
5541 is.online
5542 { entrysubtype duplicate$ empty$
5543 { pop$
5544 journal empty$
5545 booktitle empty$
5546 type$ "inreference" =
5547 author empty$
5548 and
5549 or
5550 and
5551 library empty$
5552 type$ duplicate$ "image" =
5553 swap$ duplicate$ "audio" =
5554 swap$ duplicate$ "video" =
5555 swap$ duplicate$ "music" =
5556 swap$ "movie" =
5557 or
5558 or
5559 or
5560 or
5561 or
5562 and
5563 series empty$
5564 type field.or.null
5565 duplicate$ "TV" =
5566 swap$ "Radio" =
5567 or not
5568 or
5569 and
5570 { continue.clause
5571 bbl.online output
5572 #1 'online.shown :=
5573 }
5574 'skip$
5575 if$
5576 }
5577 { "entrysubtype" bibinfo.check
5578 "[" swap$ * "]" *
5579 continue.clause output
5580 }
5581 if$
5582 }
5583 'skip$
5584 if$
5585 }
5586 'skip$
5587 if$
5588 % \end{macrocode}
5589 % \iffalse
5590 %</bst2>
5591 % \fi\addtocounter{mismatch}{45}\bstboth
5592 %
5593 % |print.title.addenda| is a convenience for writing out the elements that
5594 % normally follow the title in its regular position. It is similar to
5595 % |print.labeltitle.addenda| but has somewhate different logic.
5596 %
5597 % \begin{macrocode}
5598 }
5599 FUNCTION {print.title.addenda}
5600 { continue.clause
5601 % \end{macrocode}
5602 % \iffalse
5603 %<*bst1>
5604 % \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
5605 %
5606 % In \texttt{bath.bst} it prints the version and then |titleaddon| field:
5607 %
5608 % \begin{macrocode}
5609 online.shown
5610 'skip$
5611 { format.version output
5612 continue.clause
5613 format.titleaddon output
5614 #1 'online.shown :=
5615 }
5616 if$
5617 % \end{macrocode}
5618 % \iffalse
5619 %</bst1>
5620 %<*bst2>
5621 % \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-8\relax}\bstIIonly
5622 %
5623 % In \texttt{bathx.bst} it prints the |titleaddon| field, then the version,
5624 % then either the |entrysubtype| or the |bbl.online| string as appropriate:
5625 %
5626 % \begin{macrocode}
5627 type$ duplicate$ "legislation" = not
5628 swap$ "jurisdiction" = not
5629 and
5630 { format.titleaddon output
5631 continue.clause
5632 }
5633 'skip$
5634 if$
5635 format.version output
5636 is.online
5637 { entrysubtype duplicate$ empty$
5638 type$ duplicate$ "legislation" =
5639 swap$ duplicate$ "jurisdiction" =
5640 swap$ "legal" =
5641 or
5642 or
5643 or
5644 { pop$
5645 journal empty$
5646 booktitle empty$
5647 type$ "inreference" =
5648 author empty$
5649 and
5650 or
5651 and
5652 library empty$
5653 type$ duplicate$ "image" =
5654 swap$ duplicate$ "audio" =
5655 swap$ duplicate$ "video" =
5656 swap$ duplicate$ "music" =
5657 swap$ "movie" =
5658 or
5659 or
5660 or
5661 or
5662 or
5663 and
5664 series empty$
5665 type field.or.null
5666 duplicate$ "TV" =
5667 swap$ "Radio" =
5668 or not
5669 or
5670 and
5671 { continue.clause
5672 bbl.online output
5673 #1 'online.shown :=
5674 }
5675 'skip$
5676 if$
5677 }
5678 { "entrysubtype" bibinfo.check
5679 "[" swap$ * "]" *
5680 continue.clause output
5681 }
5682 if$
5683 }
5684 'skip$
5685 if$
5686 % \end{macrocode}
5687 % \iffalse
5688 %</bst2>
5689 % \fi\addtocounter{mismatch}{49}\bstboth
5690 %
5691 % We finish off with editor\slash translator information.
5692 %
5693 % \begin{macrocode}
5694 continue.clause
5695 type$ "reference" =
5696 { format.byeditors output }
5697 'skip$
5698 if$
5699 format.translators output
5700 }
5701 % \end{macrocode}
5702 %
5703 % |format.label.booktitle| returns the booktitle field upright
5704 %
5705 % \begin{macrocode}
5706 FUNCTION {format.label.booktitle}
5707 { booktitle
5708 duplicate$ empty$ 'skip$
5709 { "t" change.case$ }
5710 if$
5711 "booktitle" bibinfo.check
5712 }
5713 % \end{macrocode}
5714 %
5715 % |format.booktitle| returns the booktitle field in italics.
5716 %
5717 % \begin{macrocode}
5718 FUNCTION {format.booktitle}
5719 { format.label.booktitle
5720 emphasize
5721 }
5722 % \end{macrocode}
5723 %
5724 % |format.in.ed.booktitle| returns the booktitle, prepended by `In: editors,
5725 % eds.'
5726 %
5727 % \begin{macrocode}
5728 FUNCTION {format.in.ed.booktitle}
5729 { format.booktitle
5730 duplicate$ empty$
5731 'skip$
5732 {
5733 % \end{macrocode}
5734 % \iffalse
5735 %<*bst2>
5736 % \fi\bstIIonly
5737 %
5738 % In |bathx.bst|, we conditionally include the |bbl.online| string:
5739 %
5740 % \begin{macrocode}
5741 is.online
5742 { " " *
5743 bbl.online *
5744 #1 'online.shown :=
5745 }
5746 'skip$
5747 if$
5748 % \end{macrocode}
5749 % \iffalse
5750 %</bst2>
5751 % \fi\addtocounter{mismatch}{7}\bstboth
5752 % \begin{macrocode}
5753 editor "editor" format.names.ed duplicate$ empty$ 'pop$
5754 { "," *
5755 " " *
5756 get.bbl.editor add.period$
5757 " " *
5758 * swap$
5759 *
5760 word.in swap$ *
5761 }
5762 if$
5763 }
5764 if$
5765 }
5766 % \end{macrocode}
5767 %
5768 % |legal.journal.shape| emphasizes the preceding string if it matches `OJ' but
5769 % otherwise does nothing.
5770 %
5771 % \begin{macrocode}
5772 FUNCTION {legal.journal.shape}
5773 { duplicate$ "OJ" =
5774 'emphasize
5775 'skip$
5776 if$
5777 }
5778 % \end{macrocode}
5779 % \iffalse
5780 %<*bst1>
5781 % \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
5782 %
5783 % \subsubsection{Dates}
5784 %
5785 % In |bath.bst|, |nodate.check| doesn't do anything:
5786 %
5787 % \begin{macrocode}
5788 FUNCTION {nodate.check}
5789 {
5790 skip$
5791 }
5792 % \end{macrocode}
5793 % \iffalse
5794 %</bst1>
5795 %<*bst2>
5796 % \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-4\relax}\bstIIonly
5797 %
5798 % In |bathx.bst|, it looks at the most recent token. If it is empty, replaces
5799 % it with `n.d.' unless either |sortyear| or the |nonodate| option is present.
5800 %
5801 % \begin{macrocode}
5802 FUNCTION {nodate.check}
5803 {
5804 duplicate$ empty$
5805 sortyear empty$
5806 and
5807 { options field.or.null "nonodate" =
5808 'skip$
5809 { pop$ bbl.nodate }
5810 if$
5811 }
5812 'skip$
5813 if$
5814 }
5815 % \end{macrocode}
5816 % \iffalse
5817 %</bst2>
5818 % \fi\addtocounter{mismatch}{9}\bstboth
5819 %
5820 % |format.date| returns the year and any disambiguation label.
5821 %
5822 % \begin{macrocode}
5823 FUNCTION {format.date}
5824 { year "year" bibinfo.check nodate.check
5825 extra.label *
5826 }
5827 % \end{macrocode}
5828 %
5829 % |format.jur.date| wraps the year and any disambiguation label in parentheses
5830 % if a volume number is provided or if |year-essential=false| has been given
5831 % as the |options|. If there is no volume number, or if |year-essential=true|
5832 % has been given as the |options|, then the year will be wrapped in square
5833 % brackets or, if |scottish-style| has been given as the |options| or |sc| as
5834 % the |keywords|, left bare. But if the journal is `OJ' or `ECR', the date is
5835 % wrapped in brackets regardless. Not complicated at all, really.
5836 %
5837 % \begin{macrocode}
5838 FUNCTION {format.date.brackets}
5839 { format.date
5840 "[" swap$ * "]" *
5841 }
5842 FUNCTION {format.date.parens}
5843 { format.date
5844 "(" swap$ * ")" *
5845 }
5846 FUNCTION {format.jur.date.essential}
5847 { options field.or.null "scottish-style" =
5848 keywords field.or.null "sc" =
5849 or
5850 { end.clause format.date }
5851 'format.date.brackets
5852 if$
5853 }
5854 FUNCTION {format.jur.date}
5855 { institution empty$
5856 number empty$
5857 or
5858 { journal field.or.null 's :=
5859 s "OJ" =
5860 s "ECR" =
5861 or
5862 'format.date.brackets
5863 { options field.or.null "year-essential=false" =
5864 'format.date.parens
5865 { volume empty$
5866 'format.jur.date.essential
5867 { options field.or.null "year-essential=true" =
5868 'format.jur.date.essential
5869 'format.date.parens
5870 if$
5871 }
5872 if$
5873 }
5874 if$
5875 }
5876 if$
5877 }
5878 { end.clause format.date }
5879 if$
5880 }
5881 % \end{macrocode}
5882 %
5883 % |format.eu.date| wraps the year and any disambiguation label in square
5884 % brackets if (and only if) the journal title is `OJ' or `ECR'.
5885 %
5886 % \begin{macrocode}
5887 FUNCTION {format.eu.date}
5888 { journal field.or.null 's :=
5889 s "OJ" =
5890 s "ECR" =
5891 or
5892 'format.date.brackets
5893 'format.date
5894 if$
5895 }
5896 % \end{macrocode}
5897 %
5898 % \subsubsection{Series, types and numbering}
5899 %
5900 % |format.series| returns the case-altered series field.
5901 %
5902 % \begin{macrocode}
5903 FUNCTION {format.series}
5904 { series
5905 duplicate$ empty$ 'skip$
5906 { "t" change.case$ }
5907 if$
5908 "series" bibinfo.check
5909 }
5910 % \end{macrocode}
5911 %
5912 % |format.bvolume| returns the volume and series information (in italics),
5913 % with a comma between. A warning is given if |number| is also given.
5914 %
5915 % \begin{macrocode}
5916 FUNCTION {format.bvolume}
5917 { volume empty$
5918 { "" }
5919 { bbl.volume volume tie.or.space.prefix
5920 "volume" bibinfo.check * *
5921 format.series
5922 duplicate$ empty$ 'pop$
5923 { emphasize ", " * swap$ * }
5924 if$
5925 "volume and number" number either.or.check
5926 }
5927 if$
5928 }
5929 % \end{macrocode}
5930 %
5931 % |format.number.series| returns an empty string if a volume has been specified.
5932 % Otherwise, it returns the series and the number separated by a space.
5933 %
5934 % \begin{macrocode}
5935 FUNCTION {format.number.series}
5936 { volume empty$
5937 { number empty$
5938 { series field.or.null }
5939 { series empty$
5940 { number "number" bibinfo.check }
5941 { format.series
5942 number tie.or.space.prefix "number" bibinfo.check * *
5943 }
5944 if$
5945 }
5946 if$
5947 }
5948 { "" }
5949 if$
5950 }
5951 % \end{macrocode}
5952 %
5953 % |format.series.episode| returns the case-altered series and the number,
5954 % separated by a space and both emphasised.
5955 %
5956 % \begin{macrocode}
5957 FUNCTION {format.series.episode}
5958 { series
5959 duplicate$ empty$
5960 'skip$
5961 { "t" change.case$ }
5962 if$
5963 "series" bibinfo.check emphasize
5964 number "number" bibinfo.check emphasize
5965 duplicate$ empty$
5966 { * }
5967 { swap$
5968 duplicate$ empty$
5969 { * }
5970 { ", " * swap$ * }
5971 if$
5972 }
5973 if$
5974 }
5975 % \end{macrocode}
5976 %
5977 % |is.num| converts a string to an integer and ensures it is in the range 0--9.
5978 %
5979 % \begin{macrocode}
5980 FUNCTION {is.num}
5981 { chr.to.int$
5982 duplicate$ "0" chr.to.int$ < not
5983 swap$ "9" chr.to.int$ > not and
5984 }
5985 % \end{macrocode}
5986 %
5987 % |extract.num| takes a string. If it begins with an integer, it returns just
5988 % that integer. Otherwise it returns the whole string.
5989 %
5990 % \begin{macrocode}
5991 FUNCTION {extract.num}
5992 { duplicate$ 't :=
5993 "" 's :=
5994 { t empty$ not }
5995 { t #1 #1 substring$
5996 t #2 global.max$ substring$ 't :=
5997 duplicate$ is.num
5998 { s swap$ * 's := }
5999 { pop$ "" 't := }
6000 if$
6001 }
6002 while$
6003 s empty$
6004 'skip$
6005 { pop$ s }
6006 if$
6007 }
6008 % \end{macrocode}
6009 %
6010 % |convert.edition| should operate on the edition field. If the value begins
6011 % with a number (or is an English ordinal word from `first' to `fifth'), then it
6012 % returns the bibliography string version of the ordinal number (1st, 2nd,
6013 % 3rd\dots). Otherwise, returns the edition field verbatim.
6014 %
6015 % \begin{macrocode}
6016 FUNCTION {convert.edition}
6017 { extract.num "l" change.case$ 's :=
6018 s "first" = s "1" = or
6019 { bbl.first 't := }
6020 { s "second" = s "2" = or
6021 { bbl.second 't := }
6022 { s "third" = s "3" = or
6023 { bbl.third 't := }
6024 { s "fourth" = s "4" = or
6025 { bbl.fourth 't := }
6026 { s "fifth" = s "5" = or
6027 { bbl.fifth 't := }
6028 { s #1 #1 substring$ is.num
6029 { s eng.ord 't := }
6030 { edition 't := }
6031 if$
6032 }
6033 if$
6034 }
6035 if$
6036 }
6037 if$
6038 }
6039 if$
6040 }
6041 if$
6042 t
6043 }
6044 % \end{macrocode}
6045 %
6046 % |format.edition| returns the converted edition field and `ed.'
6047 %
6048 % \begin{macrocode}
6049 FUNCTION {format.edition}
6050 { edition duplicate$ empty$ 'skip$
6051 { convert.edition
6052 output.state mid.sentence =
6053 { "l" }
6054 { "t" }
6055 if$ change.case$
6056 "edition" bibinfo.check
6057 " " * bbl.edition *
6058 }
6059 if$
6060 }
6061 % \end{macrocode}
6062 %
6063 % If the type is provided, |format.thesis.type| deletes the preceding string
6064 % (the default value) and writes the type field with an initial capital.
6065 % Otherwise it does nothing.
6066 %
6067 % \begin{macrocode}
6068 FUNCTION {format.thesis.type}
6069 { type duplicate$ empty$
6070 'pop$
6071 { swap$ pop$
6072 "t" change.case$ "type" bibinfo.check
6073 }
6074 if$
6075 }
6076 % \end{macrocode}
6077 %
6078 % |format.tr.number| returns the series, type and number fields as one of
6079 % `(number)', `(type number)', `(series, number)', or `(series, type number)'.
6080 % If a series is given, a |continue.clause| is inserted to remove the preceeding
6081 % comma.
6082 %
6083 % If the series begins `HL\textvisiblespace' (with or without braces, but it
6084 % should be with), it is assumed to be a House of Lords paper, thus the number
6085 % acquires additional parentheses. If it equals `C', `Cd', `Cmd', `Cmnd' or
6086 % `Cm', it is followed by a dot rather than a comma (implemented as
6087 % |add.cmd.number|). To help with this, |format.legr.number| consumes one token
6088 % (the number) and returns the series and number as one token.
6089 %
6090 % \begin{macrocode}
6091 FUNCTION {add.cmd.number}
6092 { ". " swap$ "number" bibinfo.check *
6093 }
6094 FUNCTION {format.legr.number}
6095 { series field.or.null 's :=
6096 s "C" =
6097 'add.cmd.number
6098 { s "Cd" =
6099 'add.cmd.number
6100 { s "Cmd" =
6101 'add.cmd.number
6102 { s "Cmnd" =
6103 'add.cmd.number
6104 { s "Cm" =
6105 'add.cmd.number
6106 { s purify$ #1 #3 substring$ 't :=
6107 t "HL " =
6108 { ", (" swap$
6109 "number" bibinfo.check *
6110 ")" *
6111 }
6112 { ", " swap$
6113 "number" bibinfo.check *
6114 }
6115 if$
6116 }
6117 if$
6118 }
6119 if$
6120 }
6121 if$
6122 }
6123 if$
6124 }
6125 if$
6126 }
6127 FUNCTION {format.tr.number}
6128 { series duplicate$ empty$
6129 { pop$
6130 type duplicate$ empty$
6131 { pop$
6132 number duplicate$ empty$
6133 { pop$ ""
6134 }
6135 { "(" swap$
6136 "number" bibinfo.check
6137 * ")" *
6138 }
6139 if$
6140 }
6141 { "(" swap$
6142 "t" change.case$ "type" bibinfo.check
6143 *
6144 number duplicate$ empty$
6145 'pop$
6146 { tie.or.space.prefix
6147 "number" bibinfo.check
6148 * *
6149 }
6150 if$
6151 ")" *
6152 }
6153 if$
6154 }
6155 { "t" change.case$ "(" swap$ *
6156 type duplicate$ empty$
6157 { pop$
6158 number duplicate$ empty$
6159 'pop$
6160 { format.legr.number * }
6161 if$
6162 }
6163 { "t" change.case$ "type" bibinfo.check
6164 *
6165 number duplicate$ empty$
6166 'pop$
6167 { tie.or.space.prefix
6168 "number" bibinfo.check
6169 * *
6170 }
6171 if$
6172 }
6173 if$
6174 ")" *
6175 continue.clause
6176 }
6177 if$
6178 }
6179 % \end{macrocode}
6180 %
6181 % |format.manual.number| returns the series, type and number fields as one of
6182 % `number', `type number' `series, number', or `series, number. type'. The last
6183 % of these formulations is for compatibility with previous versions, but may
6184 % change in future.
6185 %
6186 % \begin{macrocode}
6187 FUNCTION {format.manual.number}
6188 { series duplicate$ empty$
6189 { pop$
6190 type duplicate$ empty$
6191 { pop$
6192 number duplicate$ empty$
6193 { pop$ ""
6194 }
6195 { "number" bibinfo.check
6196 }
6197 if$
6198 }
6199 { "t" change.case$ "type" bibinfo.check
6200 number duplicate$ empty$
6201 'pop$
6202 { tie.or.space.prefix
6203 "number" bibinfo.check
6204 * *
6205 }
6206 if$
6207 }
6208 if$
6209 }
6210 { "t" change.case$
6211 number duplicate$ empty$
6212 'pop$
6213 { "number" bibinfo.check
6214 ", " swap$ * *
6215 }
6216 if$
6217 type duplicate$ empty$
6218 'pop$
6219 { ". " swap$ *
6220 "t" change.case$ "type" bibinfo.check
6221 *
6222 }
6223 if$
6224 }
6225 if$
6226 }
6227 % \end{macrocode}
6228 %
6229 % |format.chapter| returns the chapter field in the form `c.1', for use with
6230 % UK primary legislation.
6231 %
6232 % \begin{macrocode}
6233 FUNCTION {format.chapter}
6234 { chapter duplicate$ empty$
6235 { pop$ "" }
6236 { "chapter" bibinfo.check
6237 "c." swap$ *
6238 }
6239 if$
6240 }
6241 % \end{macrocode}
6242 %
6243 % |format.series.number.chapter| returns the series and chapter/number fields
6244 % in the form `(series, c.1)' or `(series, number)', for use with UK legislation.
6245 %
6246 % \begin{macrocode}
6247 FUNCTION {format.series.number.chapter}
6248 { series duplicate$ empty$
6249 { pop$ "(" }
6250 { "series" bibinfo.check
6251 "(" swap$ *
6252 }
6253 if$
6254 type duplicate$ empty$
6255 { pop$
6256 number duplicate$ empty$
6257 'pop$
6258 { "number" bibinfo.check
6259 swap$ duplicate$ "(" =
6260 { swap$ * }
6261 { ", " * swap$ * }
6262 if$
6263 }
6264 if$
6265 chapter duplicate$ empty$
6266 'pop$
6267 { "chapter" bibinfo.check
6268 swap$ duplicate$ "(" =
6269 { swap$ * }
6270 { ", c." * swap$ * }
6271 if$
6272 }
6273 if$
6274 }
6275 { "type" bibinfo.check
6276 swap$ duplicate$ "(" =
6277 { swap$ * }
6278 { ", " * swap$ * }
6279 if$
6280 number duplicate$ empty$
6281 { pop$
6282 chapter duplicate$ empty$
6283 'pop$
6284 { "chapter" bibinfo.check
6285 " c." swap$ * *
6286 }
6287 if$
6288 }
6289 { "number" bibinfo.check
6290 " " swap$ * *
6291 chapter duplicate$ empty$
6292 'pop$
6293 { "chapter" bibinfo.check
6294 ", c." swap$ * *
6295 }
6296 if$
6297 }
6298 if$
6299 }
6300 if$
6301 ")" *
6302 duplicate$ "()" =
6303 { pop$ "" }
6304 'skip$
6305 if$
6306 }
6307 % \end{macrocode}
6308 %
6309 % |format.case.number| adds to the stack `(number or casenumber)' if either
6310 % of those fields is provided with no |institution|; or `(userb or casenumber)
6311 % Commission Decision number' if |institution| is `Commission'; otherwise
6312 % adds an empty string.
6313 %
6314 % \begin{macrocode}
6315 FUNCTION {format.case.number}
6316 { number field.or.null 's :=
6317 s empty$
6318 { casenumber field.or.null 's := }
6319 'skip$
6320 if$
6321 s empty$
6322 { "" }
6323 { institution field.or.null duplicate$ empty$
6324 { pop$
6325 s "number" bibinfo.check
6326 "(" swap$ * ")" *
6327 }
6328 { "Commission" =
6329 { userb field.or.null 's :=
6330 s empty$
6331 { casenumber field.or.null 's := }
6332 'skip$
6333 if$
6334 s duplicate$ empty$
6335 { "" }
6336 { "(" swap$ * ")" * " " }
6337 if$
6338 number duplicate$ empty$
6339 { pop$ pop$ }
6340 { bbl.commission " " *
6341 swap$ * * *
6342 }
6343 if$
6344 }
6345 { "" }
6346 if$
6347 }
6348 if$
6349 }
6350 if$
6351 }
6352 % \end{macrocode}
6353 %
6354 % |case.check| checks if the entry should be puncuation with a full stop.
6355 %
6356 %
6357 % \begin{macrocode}
6358 FUNCTION {case.check}
6359 { institution duplicate$ empty$
6360 { pop$ continue.clause }
6361 { "Commission" =
6362 'continue.clause
6363 'new.block
6364 if$
6365 }
6366 if$
6367 }
6368 % \end{macrocode}
6369 %
6370 % |eu.case.check| checks if the case is in OJ or has a number, in which case
6371 % punctuation is suppressed.
6372 %
6373 % \begin{macrocode}
6374 FUNCTION {eu.case.check}
6375 { journal field.or.null "OJ" =
6376 number empty$ not
6377 or
6378 casenumber empty$ not
6379 or
6380 'continue.clause
6381 'new.block
6382 if$
6383 }
6384 % \end{macrocode}
6385 %
6386 % \subsubsection{Notes}
6387 %
6388 % |format.note| returns the note field, but changes the case of the first
6389 % letter according to the output state (unless protected by braces).
6390 %
6391 % \begin{macrocode}
6392 FUNCTION {format.note}
6393 { note empty$
6394 { "" }
6395 { note #1 #1 substring$
6396 duplicate$ "{" =
6397 'skip$
6398 { output.state mid.sentence =
6399 output.state mid.clause =
6400 or
6401 { "l" }
6402 { "u" }
6403 if$
6404 change.case$
6405 }
6406 if$
6407 note #2 global.max$ substring$ * "note" bibinfo.check
6408 }
6409 if$
6410 }
6411 % \end{macrocode}
6412 %
6413 % \subsubsection{Publication block}
6414 %
6415 % |prepend.address| prepends the address field to the string at the top of the
6416 % stack, which should be a publisher (or equivalent) bibinfo string. If both
6417 % the input string and address field are non-empty, a colon and space are
6418 % interposed between them.
6419 %
6420 % \begin{macrocode}
6421 FUNCTION {prepend.address}
6422 { 't :=
6423 ""
6424 address empty$ t empty$ and
6425 'skip$
6426 { address "address" bibinfo.check *
6427 t empty$
6428 'skip$
6429 { address empty$
6430 'skip$
6431 { ": " * }
6432 if$
6433 t *
6434 }
6435 if$
6436 }
6437 if$
6438 }
6439 % \end{macrocode}
6440 %
6441 % The next three functions return the address plus the publisher,
6442 % organization and institution respectively.
6443 %
6444 % \begin{macrocode}
6445 FUNCTION {format.publisher.address}
6446 { publisher "publisher" bibinfo.warn prepend.address
6447 }
6448 FUNCTION {format.organization.address}
6449 { publisher empty$
6450 { organization "organization" bibinfo.check prepend.address }
6451 { publisher "publisher" bibinfo.warn prepend.address
6452 organization duplicate$ empty$
6453 'pop$
6454 { "organization" bibinfo.check ". " * swap$ * }
6455 if$
6456 }
6457 if$
6458 }
6459 FUNCTION {format.institution.address}
6460 { publisher empty$
6461 { institution "institution" bibinfo.check prepend.address }
6462 { publisher "publisher" bibinfo.warn prepend.address
6463 institution duplicate$ empty$
6464 'pop$
6465 { "institution" bibinfo.check ". " * swap$ * }
6466 if$
6467 }
6468 if$
6469 }
6470 % \end{macrocode}
6471 %
6472 % We add a macro for printing the library (repository) holding an eprint.
6473 %
6474 % \begin{macrocode}
6475 FUNCTION {format.library}
6476 { library "library" bibinfo.check
6477 emphasize
6478 % \end{macrocode}
6479 % \iffalse
6480 %<*bst2>
6481 % \fi\bstIIonly
6482 %
6483 % In |bathx.bst|, we conditionally include the |bbl.online| string:
6484 %
6485 % \begin{macrocode}
6486 duplicate$ empty$ not
6487 is.online
6488 and
6489 journal empty$
6490 and
6491 { " " * bbl.online *
6492 #1 'online.shown :=
6493 }
6494 'skip$
6495 if$
6496 % \end{macrocode}
6497 % \iffalse
6498 %</bst2>
6499 % \fi\addtocounter{mismatch}{10}\bstboth
6500 %
6501 % The |library| (or |institution|) field is also used for where a physical
6502 % image is kept. As we have only one address field, it will attach to whichever
6503 % is present out of organization, publisher and library. In case there is more
6504 % than one, it will attach to |publisher| in preference to |library| and
6505 % |library| in preference to |organization|.
6506 %
6507 % \begin{macrocode}
6508 }
6509 FUNCTION {format.img.library}
6510 { library "library" bibinfo.check
6511 }
6512 FUNCTION {format.img.library.address}
6513 { library duplicate$ empty$
6514 { pop$
6515 institution duplicate$ empty$
6516 'skip$
6517 { "institution" bibinfo.check }
6518 if$
6519 }
6520 { "library" bibinfo.check }
6521 if$
6522 duplicate$ empty$
6523 { address "address" bibinfo.check * }
6524 { address duplicate$ empty$
6525 'pop$
6526 { "address" bibinfo.check
6527 swap$ ", " * swap$ *
6528 }
6529 if$
6530 }
6531 if$
6532 }
6533 FUNCTION {format.pub.org.lib.address}
6534 { publisher duplicate$ empty$
6535 { pop$
6536 organization duplicate$ empty$
6537 { pop$
6538 format.img.library.address }
6539 { "organization" bibinfo.check
6540 library empty$
6541 { prepend.address }
6542 { ". " *
6543 format.img.library.address *
6544 }
6545 if$
6546 }
6547 if$
6548 }
6549 { "publisher" bibinfo.warn prepend.address
6550 library empty$
6551 'skip$
6552 { ". " *
6553 format.img.library *
6554 }
6555 if$
6556 }
6557 if$
6558 }
6559
6560 % \end{macrocode}
6561 %
6562 % \subsubsection{Pinpointing}
6563 %
6564 % |multi.page.check| should operate on the pages field. If the value is a range,
6565 % that is, contains `-', `,' or `+', returns 1, otherwise returns 0.
6566 %
6567 % \begin{macrocode}
6568 INTEGERS { multiresult }
6569 FUNCTION {multi.page.check}
6570 { 't :=
6571 #0 'multiresult :=
6572 { multiresult not
6573 t empty$ not
6574 and
6575 }
6576 { t #1 #1 substring$
6577 duplicate$ "-" =
6578 swap$ duplicate$ "," =
6579 swap$ "+" =
6580 or or
6581 { #1 'multiresult := }
6582 { t #2 global.max$ substring$ 't := }
6583 if$
6584 }
6585 while$
6586 multiresult
6587 }
6588 % \end{macrocode}
6589 %
6590 % |n.dashify| converts hyphens in page ranges into en dashes.
6591 %
6592 % \begin{macrocode}
6593 FUNCTION {n.dashify}
6594 { 't :=
6595 ""
6596 { t empty$ not }
6597 { t #1 #1 substring$ "-" =
6598 { t #1 #2 substring$ "--" = not
6599 { "--" *
6600 t #2 global.max$ substring$ 't :=
6601 }
6602 { { t #1 #1 substring$ "-" = }
6603 { "-" *
6604 t #2 global.max$ substring$ 't :=
6605 }
6606 while$
6607 }
6608 if$
6609 }
6610 { t #1 #1 substring$ *
6611 t #2 global.max$ substring$ 't :=
6612 }
6613 if$
6614 }
6615 while$
6616 }
6617 % \end{macrocode}
6618 %
6619 % |format.pages| returns the pages fields, prefixed by `p.' or `pp.' as
6620 % appropriate.
6621 %
6622 % \begin{macrocode}
6623 FUNCTION {format.pages}
6624 { pages duplicate$ empty$ 'skip$
6625 { duplicate$ multi.page.check
6626 { bbl.pages swap$
6627 n.dashify
6628 }
6629 { bbl.page swap$
6630 }
6631 if$
6632 "pages" bibinfo.check
6633 *
6634 }
6635 if$
6636 }
6637 % \end{macrocode}
6638 %
6639 % |format.journal.pages| does similar, but it looks at the preceding string and,
6640 % if both are non-empty, inserts a comma between it and the pages string.
6641 %
6642 % \begin{macrocode}
6643 FUNCTION {format.journal.pages}
6644 { pages duplicate$ empty$ 'pop$
6645 { swap$ duplicate$ empty$
6646 { pop$ pop$ format.pages }
6647 { ", " *
6648 swap$
6649 n.dashify
6650 pages multi.page.check
6651 'bbl.pages
6652 'bbl.page
6653 if$
6654 swap$
6655 "pages" bibinfo.check
6656 * *
6657 }
6658 if$
6659 }
6660 if$
6661 }
6662 % \end{macrocode}
6663 %
6664 % |format.journal.eid| returns the EID, but it looks at the preceding string
6665 % and, if both are non-empty, inserts a comma between it and the EID string.
6666 % The EID is a code used by some online-only journals to identify an article
6667 % within a volume or issue instead of a page range (since the page numbering
6668 % resets for each article, not each volume\slash issue).
6669 %
6670 % \begin{macrocode}
6671 FUNCTION {format.journal.eid}
6672 { eid "eid" bibinfo.check
6673 duplicate$ empty$ 'pop$
6674 { swap$ duplicate$ empty$ 'skip$
6675 { ", " *
6676 }
6677 if$
6678 swap$ *
6679 }
6680 if$
6681 }
6682 % \end{macrocode}
6683 %
6684 % |format.vol.num| returns volume and number in the form `volume(number)'. It
6685 % writes a warning to the log if |number| is given instead of |volume|: if a
6686 % journal does not organize itself into volumes, treat every issue as its own
6687 % volume!
6688 %
6689 % \begin{macrocode}
6690 FUNCTION {format.vol.num}
6691 { volume field.or.null duplicate$ empty$
6692 'skip$
6693 { "volume" bibinfo.check
6694 }
6695 if$
6696 number "number" bibinfo.check duplicate$ empty$
6697 'skip$
6698 { swap$ duplicate$ empty$
6699 { "there's a number but no volume in " cite$ * warning$ }
6700 'skip$
6701 if$
6702 swap$
6703 "(" swap$ * ")" *
6704 }
6705 if$
6706 }
6707 % \end{macrocode}
6708 %
6709 % |format.vol.num.pages| returns the journal pinpointing in the form
6710 % `volume(number), eid\slash pages'. Since the Harvard (Bath) style
6711 % places publication state information in the volume position, the |pubstate|
6712 % field from \textsf{biblatex} is emulated here. The |eventyear| if present
6713 % is used instead of month, in order to support parliamentary debates.
6714 %
6715 % \begin{macrocode}
6716 FUNCTION {format.vol.num.pages}
6717 { pubstate field.or.null
6718 duplicate$ "inpress" =
6719 { pop$ bbl.inpress }
6720 { duplicate$ "submitted" =
6721 { pop$ bbl.submitted }
6722 { duplicate$ "inpreparation" =
6723 { pop$ bbl.inpreparation }
6724 { pop$ "" }
6725 if$
6726 }
6727 if$
6728 }
6729 if$
6730 duplicate$ empty$
6731 { pop$
6732 format.vol.num *
6733 eventyear field.or.null duplicate$ empty$
6734 { pop$
6735 month "month" bibinfo.check duplicate$ empty$
6736 'pop$
6737 { swap$ duplicate$ empty$
6738 'pop$
6739 { ", " * swap$ * }
6740 if$
6741 }
6742 if$
6743 }
6744 { swap$ duplicate$ empty$
6745 'pop$
6746 { ", " * swap$ * }
6747 if$
6748 }
6749 if$
6750 eid empty$
6751 { format.journal.pages }
6752 { format.journal.eid }
6753 if$
6754 }
6755 'skip$
6756 if$
6757 }
6758 % \end{macrocode}
6759 %
6760 % |format.chapter.pages| returns pinpointing information for books, in the
6761 % form `chap.\@ chapter, p.pages'.
6762 %
6763 % \begin{macrocode}
6764 FUNCTION {format.chapter.pages}
6765 { chapter empty$
6766 'format.pages
6767 { type empty$
6768 { bbl.chapter }
6769 { type "l" change.case$
6770 "type" bibinfo.check
6771 }
6772 if$
6773 chapter tie.or.space.prefix
6774 "chapter" bibinfo.check
6775 * *
6776 pages empty$
6777 'skip$
6778 { ", " * format.pages * }
6779 if$
6780 }
6781 if$
6782 }
6783
6784 % \end{macrocode}
6785 %
6786 % |format.journal.series.vol.pages| returns the journal title and pinpointing
6787 % in the form `volume journal pages', `journal volume-pages' or `journal
6788 % series\,volume/pages', depending on the journal.
6789 %
6790 % \begin{macrocode}
6791 FUNCTION {format.journal.series.vol.pages}
6792 { journal field.or.null
6793 duplicate$ "OJ" =
6794 { "journal" bibinfo.check
6795 emphasize
6796 series empty$
6797 volume empty$
6798 and
6799 pages empty$
6800 and
6801 'skip$
6802 { " " * }
6803 if$
6804 format.series
6805 volume "volume" bibinfo.check *
6806 duplicate$ empty$
6807 'skip$
6808 { pages field.or.null duplicate$ empty$
6809 'skip$
6810 { "/" swap$ *
6811 }
6812 if$ *
6813 }
6814 if$ *
6815 }
6816 { duplicate$ "ECR" =
6817 { "journal" bibinfo.check
6818 volume "volume" bibinfo.check
6819 duplicate$ empty$
6820 'skip$
6821 { " " swap$ * "--" * * }
6822 if$
6823 }
6824 { "journal" bibinfo.check
6825 % \end{macrocode}
6826 % \iffalse
6827 %<*bst2>
6828 % \fi\bstIIonly
6829 %
6830 % In |bathx.bst|, we conditionally include the |bbl.online| string:
6831 %
6832 % \begin{macrocode}
6833 is.online
6834 { " " * bbl.online *
6835 #1 'online.shown :=
6836 }
6837 'skip$
6838 if$
6839 % \end{macrocode}
6840 % \iffalse
6841 %</bst2>
6842 % \fi\addtocounter{mismatch}{6}\bstboth
6843 % \begin{macrocode}
6844 volume "volume" bibinfo.check
6845 duplicate$ empty$
6846 'pop$
6847 { " " * swap$ * }
6848 if$
6849 pages empty$
6850 eid empty$
6851 and
6852 'skip$
6853 { " " * }
6854 if$
6855 }
6856 if$
6857 }
6858 if$
6859 eid empty$
6860 { pages "pages" bibinfo.check * }
6861 { eid "eid" bibinfo.check * }
6862 if$
6863 }
6864 % \end{macrocode}
6865 %
6866 % If |institution| is given (not `Commission'), |format.inst.journal.series.vol.pages|
6867 % adds the |institution|, |number| and regular journal information to the stack.
6868 % otherwise, it calls |format.journal.series.vol.pages| instead.
6869 %
6870 % \begin{macrocode}
6871 FUNCTION {format.inst.journal.series.vol.pages}
6872 { institution duplicate$ empty$
6873 { pop$ format.journal.series.vol.pages }
6874 { duplicate$ "Commission" =
6875 { pop$ format.journal.series.vol.pages }
6876 { number duplicate$ empty$
6877 { pop$ casenumber duplicate$ empty$
6878 'skip$
6879 { "casenumber" bibinfo.check
6880 ", " swap$ * *
6881 }
6882 if$
6883 }
6884 { "number" bibinfo.check
6885 ", " swap$ * *
6886 }
6887 if$
6888 output new.sentence
6889 journal "t" change.case$
6890 "journal" bibinfo.check
6891 emphasize output
6892 % \end{macrocode}
6893 % \iffalse
6894 %<*bst2>
6895 % \fi\bstIIonly
6896 %
6897 % In |bathx.bst|, we conditionally include the |bbl.online| string:
6898 %
6899 % \begin{macrocode}
6900 is.online
6901 { continue.clause
6902 bbl.online output
6903 #1 'online.shown :=
6904 }
6905 'skip$
6906 if$
6907 % \end{macrocode}
6908 % \iffalse
6909 %</bst2>
6910 % \fi\addtocounter{mismatch}{7}\bstboth
6911 % \begin{macrocode}
6912 volume field.or.null
6913 duplicate$ empty$ 'skip$
6914 { "volume" bibinfo.check
6915 }
6916 if$
6917 eventyear field.or.null duplicate$ empty$
6918 { pop$
6919 month "month" bibinfo.check duplicate$ empty$
6920 'pop$
6921 { swap$ duplicate$ empty$
6922 'pop$
6923 { ", " * swap$ * }
6924 if$
6925 }
6926 if$
6927 }
6928 { swap$ duplicate$ empty$
6929 'pop$
6930 { ", " * swap$ * }
6931 if$
6932 }
6933 if$
6934 eid empty$
6935 { format.journal.pages }
6936 { format.journal.eid }
6937 if$
6938 }
6939 if$
6940 }
6941 if$
6942 }
6943 % \end{macrocode}
6944 %
6945 % \subsubsection{Access and URLs}
6946 %
6947 % |format.eprint| returns a string |\eprint[archive]{eprint}|.
6948 %
6949 % \begin{macrocode}
6950 FUNCTION {format.eprint}
6951 { eprint duplicate$ empty$
6952 'skip$
6953 { "\eprint"
6954 archive empty$
6955 'skip$
6956 { "[" * archive * "]" * }
6957 if$
6958 "{" * swap$ * "}" *
6959 }
6960 if$
6961 }
6962 % \end{macrocode}
6963 %
6964 % |format.url| returns a string |Available from: \url{url} [Accessed urldate]|.
6965 % We also allow the \texttt{library} field to be used as a fallback URL.
6966 %
6967 % \begin{macrocode}
6968 FUNCTION {format.url}
6969 { doi empty$
6970 { url }
6971 { "https://doi.org/" doi * }
6972 if$
6973 duplicate$ empty$
6974 { pop$ "" }
6975 { "\urlprefix\url{" swap$ * "}" * }
6976 if$
6977 duplicate$ empty$
6978 urlyear empty$ not
6979 urldate empty$ not
6980 or
6981 and
6982 { library duplicate$ empty$
6983 'pop$
6984 { "\urlprefix{}" swap$ * * }
6985 if$
6986 }
6987 'skip$
6988 if$
6989 urlyear empty$
6990 { urldate empty$
6991 'skip$
6992 { " [\urldateprefix{}" * urldate * "]" * }
6993 if$
6994 }
6995 { " [\urldateprefix{}" * urlyear * "]" * }
6996 if$
6997 }
6998 % \end{macrocode}
6999 %
7000 % \subsubsection{Related items}
7001 %
7002 % The following functions are used for entries that look like `Author, (Year).
7003 % Title. In: Author (Year).' In practice, they should never be used with Harvard
7004 % (Bath).
7005 %
7006 % \begin{macrocode}
7007 FUNCTION {format.article.crossref}
7008 { word.in
7009 " \cite{" * crossref * "}" *
7010 }
7011 FUNCTION {format.incoll.inproc.crossref}
7012 { word.in
7013 " \cite{" * crossref * "}" *
7014 }
7015 % \end{macrocode}
7016 %
7017 % |format.book.crossref| is a bit different as it is intended for cases where
7018 % the given book is volume X of a larger work: `Author, (Year). Title. Vol.\@
7019 % volume of Author (Year).' In the absence of a volume, writes a warning to the
7020 % log and behaves like the above.
7021 %
7022 % \begin{macrocode}
7023 FUNCTION {format.book.crossref}
7024 { volume duplicate$ empty$
7025 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
7026 pop$ word.in
7027 }
7028 { bbl.volume
7029 capitalize
7030 swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
7031 }
7032 if$
7033 " \cite{" * crossref * "}" *
7034 }
7035
7036 % \end{macrocode}
7037 %
7038 % \subsection{Utilities for writing citation data to the file}
7039 % \label{sec:writing2}
7040 %
7041 % The start of each entry in the bibliography looks like
7042 % |\bibitem[{|author--year elements|}]{|entry key|}|. The author--year part uses
7043 % special \textsf{natbib} syntax: either `Author(Year)' or `Truncated author
7044 % list(Year)Full author list'.
7045 %
7046 % |calc.label| creates the author--year part up to the year, and saves it to the
7047 % entry's |label| variable. Note that the closing parenthesis is not included;
7048 % this is to allow for the |extra.label| to be added if necessary.
7049 %
7050 % \begin{macrocode}
7051 FUNCTION {calc.label}
7052 { calc.short.authors
7053 short.list
7054 "("
7055 *
7056 year nodate.check duplicate$ empty$
7057 { pop$ "" }
7058 'skip$
7059 if$
7060 *
7061 'label :=
7062 }
7063 % \end{macrocode}
7064 %
7065 % |output.bibitem| writes out the whole |\bibitem| line, incorporating the label
7066 % generated by |calc.label|; it supplies the closing parenthesis and conditional
7067 % inclusion of the full list. The function then starts a new line, puts the entry
7068 % driver into the |before.all| output state, and puts an empty string at the top
7069 % of the stack.
7070 %
7071 % \begin{macrocode}
7072 FUNCTION {output.bibitem}
7073 { newline$
7074 "\bibitem[{" write$
7075 label write$
7076 ")" make.full.names duplicate$ short.list =
7077 { pop$ }
7078 { * }
7079 if$
7080 "}]{" * write$
7081 cite$ write$
7082 "}" write$
7083 newline$
7084 ""
7085 #0 'online.shown :=
7086 before.all 'output.state :=
7087 }
7088 % \end{macrocode}
7089 %
7090 % \subsection{Drivers for formatting specific entry types}
7091 % \label{sec:drivers}
7092 %
7093 % These functions are called when an entry of the given type is being
7094 % processed.
7095 %
7096 % \subsubsection{Article}
7097 %
7098 % \begin{macrocode}
7099 FUNCTION {article}
7100 { output.bibitem
7101 format.authors "author" output.check
7102 author format.key output
7103 format.date "year" output.check
7104 date.block
7105 format.title "title" output.check
7106 print.title.addenda
7107 new.block
7108 crossref missing$
7109 { journal "t" change.case$
7110 "journal" bibinfo.check
7111 emphasize
7112 "journal" output.check
7113 % \end{macrocode}
7114 % \iffalse
7115 %<*bst2>
7116 % \fi\bstIIonly
7117 %
7118 % In |bathx.bst|, we conditionally include the |bbl.online| string:
7119 %
7120 % \begin{macrocode}
7121 is.online
7122 { continue.clause
7123 bbl.online output
7124 #1 'online.shown :=
7125 }
7126 'skip$
7127 if$
7128 % \end{macrocode}
7129 % \iffalse
7130 %</bst2>
7131 % \fi\addtocounter{mismatch}{7}\bstboth
7132 % \begin{macrocode}
7133 format.vol.num.pages output
7134 }
7135 { format.article.crossref output.nonnull
7136 format.pages output
7137 }
7138 if$
7139 new.block
7140 format.note output
7141 new.block
7142 format.eprint output
7143 format.url output
7144 fin.entry
7145 }
7146 % \end{macrocode}
7147 %
7148 % \subsubsection{Book}
7149 %
7150 % \begin{macrocode}
7151 FUNCTION {book}
7152 { output.bibitem
7153 author empty$
7154 { editor empty$
7155 type$ "reference" =
7156 or
7157 { type$ "reference" =
7158 { format.title "title" output.check }
7159 { format.btitle "title" output.check }
7160 if$
7161 print.labeltitle.addenda
7162 format.date "year" output.check
7163 year empty$ 'skip$ { date.block } if$
7164 print.title.addenda
7165 }
7166 { format.editors "author and editor" output.check
7167 format.date "year" output.check
7168 date.block
7169 format.btitle "title" output.check
7170 print.title.addenda
7171 }
7172 if$
7173 }
7174 { format.authors output.nonnull
7175 crossref missing$
7176 { "author and editor" editor either.or.check }
7177 'skip$
7178 if$
7179 format.date "year" output.check
7180 date.block
7181 format.btitle "title" output.check
7182 print.title.addenda
7183 }
7184 if$
7185 new.block
7186 format.edition output
7187 edition empty$
7188 { mid.sentence 'output.state := }
7189 'new.block
7190 if$
7191 format.bvolume output
7192 format.number.series output
7193 new.block
7194 format.note output
7195 crossref missing$
7196 { keywords field.or.null "uksi" =
7197 { mid.sentence 'output.state := }
7198 { new.sentence }
7199 if$
7200 format.publisher.address output
7201 }
7202 { new.block
7203 format.book.crossref output.nonnull
7204 }
7205 if$
7206 new.block
7207 format.eprint output
7208 format.url output
7209 fin.entry
7210 }
7211 % \end{macrocode}
7212 %
7213 % \subsubsection{Unpublished or self-published monograph}
7214 %
7215 % \begin{macrocode}
7216 FUNCTION {booklet}
7217 { output.bibitem
7218 author empty$
7219 { format.avtitle "title" output.check
7220 print.labeltitle.addenda
7221 format.date "year" output.check
7222 year empty$ 'skip$ { date.block } if$
7223 print.title.addenda
7224 }
7225 { format.authors output
7226 author format.key output
7227 format.date "year" output.check
7228 date.block
7229 format.avtitle "title" output.check
7230 print.title.addenda
7231 }
7232 if$
7233 new.block
7234 format.series.episode output
7235 % \end{macrocode}
7236 % \iffalse
7237 %<*bst2>
7238 % \fi\bstIIonly
7239 %
7240 % In |bathx.bst|, we conditionally include the |bbl.online| string:
7241 %
7242 % \begin{macrocode}
7243 is.online
7244 { continue.clause
7245 bbl.online output
7246 #1 'online.shown :=
7247 }
7248 'skip$
7249 if$
7250 % \end{macrocode}
7251 % \iffalse
7252 %</bst2>
7253 % \fi\addtocounter{mismatch}{7}\bstboth
7254 % \begin{macrocode}
7255 new.block
7256 type "type" bibinfo.check output
7257 new.block
7258 howpublished "howpublished" bibinfo.check output
7259 new.block
7260 format.note output
7261 publisher empty$ 'skip$
7262 { new.block}
7263 if$
7264 format.publisher.address output
7265 new.block
7266 format.eprint output
7267 format.url output
7268 fin.entry
7269 }
7270 % \end{macrocode}
7271 %
7272 % \subsubsection{Work in book}
7273 %
7274 % \begin{macrocode}
7275 FUNCTION {inbook}
7276 { output.bibitem
7277 author empty$
7278 { format.title "title" output.check
7279 print.labeltitle.addenda
7280 format.date "year" output.check
7281 year empty$ 'skip$ { date.block } if$
7282 print.title.addenda
7283 }
7284 { format.authors output.nonnull
7285 format.date "year" output.check
7286 date.block
7287 format.title "title" output.check
7288 print.title.addenda
7289 }
7290 if$
7291 new.block
7292 crossref missing$
7293 { format.in.ed.booktitle "booktitle" output.check
7294 new.block
7295 format.edition output
7296 edition empty$
7297 { mid.sentence 'output.state := }
7298 'new.block
7299 if$
7300 format.bvolume output
7301 format.number.series output
7302 new.block
7303 format.note output
7304 new.block
7305 format.publisher.address output
7306 format.chapter.pages output
7307 }
7308 { format.note output
7309 new.block
7310 format.incoll.inproc.crossref output.nonnull
7311 format.chapter.pages output
7312 }
7313 if$
7314 new.block
7315 format.eprint output
7316 format.url output
7317 fin.entry
7318 }
7319 % \end{macrocode}
7320 %
7321 % \subsubsection{Work in collection}
7322 %
7323 % \begin{macrocode}
7324 FUNCTION {incollection}
7325 { output.bibitem
7326 author empty$
7327 { type$ "inreference" =
7328 { format.label.booktitle output}
7329 { format.title "title" output.check
7330 print.labeltitle.addenda
7331 }
7332 if$
7333 format.date "year" output.check
7334 year empty$ 'skip$ { date.block } if$
7335 type$ "inreference" =
7336 'skip$
7337 { print.title.addenda }
7338 if$
7339 }
7340 { format.authors output.nonnull
7341 format.date "year" output.check
7342 date.block
7343 format.title "title" output.check
7344 print.title.addenda
7345 }
7346 if$
7347 new.block
7348 crossref missing$
7349 { type$ "inreference" =
7350 author empty$
7351 and
7352 { format.byeditors output }
7353 { format.in.ed.booktitle "booktitle" output.check }
7354 if$
7355 new.block
7356 format.edition output
7357 type$ "inreference" =
7358 author empty$
7359 and
7360 { new.block
7361 format.btitle "title" output.check
7362 print.title.addenda
7363 new.block
7364 }
7365 { edition empty$
7366 { mid.sentence 'output.state := }
7367 'new.block
7368 if$
7369 }
7370 if$
7371 format.bvolume output
7372 format.number.series output
7373 new.block
7374 format.note output
7375 new.block
7376 format.publisher.address output
7377 format.chapter.pages output
7378 }
7379 { format.note output
7380 new.block
7381 format.incoll.inproc.crossref output.nonnull
7382 format.chapter.pages output
7383 }
7384 if$
7385 new.block
7386 format.eprint output
7387 format.url output
7388 fin.entry
7389 }
7390 % \end{macrocode}
7391 %
7392 % \subsubsection{Conference paper}
7393 %
7394 % \begin{macrocode}
7395 FUNCTION {inproceedings}
7396 { output.bibitem
7397 format.authors "author" output.check
7398 author format.key output
7399 format.date "year" output.check
7400 date.block
7401 format.title "title" output.check
7402 print.title.addenda
7403 new.block
7404 crossref missing$
7405 { format.in.ed.booktitle "booktitle" output.check
7406 format.bvolume output
7407 format.number.series output
7408 eventyear output
7409 venue output
7410 format.note output
7411 new.sentence
7412 publisher empty$
7413 { format.organization.address output }
7414 { organization "organization" bibinfo.check output
7415 format.publisher.address output
7416 }
7417 if$
7418 format.pages output
7419 }
7420 { format.note output
7421 new.block
7422 format.incoll.inproc.crossref output.nonnull
7423 format.pages output
7424 }
7425 if$
7426 new.block
7427 format.eprint output
7428 format.url output
7429 fin.entry
7430 }
7431 FUNCTION {conference} { inproceedings }
7432 % \end{macrocode}
7433 %
7434 % \subsubsection{Legal case studies}
7435 %
7436 % \begin{macrocode}
7437 FUNCTION {jurisdiction}
7438 { output.bibitem
7439 author empty$
7440 { format.btitle "title" output.check
7441 continue.clause
7442 format.case.number output
7443 continue.clause
7444 print.labeltitle.addenda
7445 continue.clause
7446 format.jur.date "year" output.check
7447 year empty$ 'skip$ { case.check } if$
7448 print.title.addenda
7449 }
7450 { format.authors output
7451 author format.key output
7452 format.jur.date "year" output.check
7453 date.block
7454 continue.clause
7455 format.btitle "title" output.check
7456 print.labeltitle.addenda
7457 print.title.addenda
7458 }
7459 if$
7460 case.check
7461 format.note output
7462 note empty$
7463 'case.check
7464 'new.block
7465 if$
7466 crossref missing$
7467 { continue.clause
7468 format.inst.journal.series.vol.pages output
7469 }
7470 { format.article.crossref output.nonnull
7471 format.pages output
7472 }
7473 if$
7474 new.block
7475 format.eprint output
7476 format.url output
7477 fin.entry
7478 }
7479 % \end{macrocode}
7480 %
7481 % \subsubsection{Legislation}
7482 %
7483 % \begin{macrocode}
7484 FUNCTION {uklegislation}
7485 { output.bibitem
7486 author empty$
7487 { format.btitle "title" output.check
7488 print.labeltitle.addenda
7489 continue.clause
7490 format.date emphasize "year" output.check
7491 print.title.addenda
7492 }
7493 { format.authors output
7494 author format.key output
7495 format.date "year" output.check
7496 date.block
7497 continue.clause
7498 format.btitle "title" output.check
7499 print.labeltitle.addenda
7500 print.title.addenda
7501 }
7502 if$
7503 entrysubtype field.or.null "secondary" =
7504 { number "number" bibinfo.check output }
7505 { series empty$ type empty$ and
7506 { number empty$
7507 { format.chapter output }
7508 { continue.clause
7509 format.series.number.chapter output
7510 }
7511 if$
7512 }
7513 { chapter empty$
7514 { new.block }
7515 { continue.clause }
7516 if$
7517 format.series.number.chapter output
7518 }
7519 if$
7520 }
7521 if$
7522 note empty$
7523 'skip$
7524 { new.block
7525 format.note output
7526 new.block
7527 }
7528 if$
7529 publisher empty$ 'skip$
7530 { entrysubtype field.or.null "secondary" =
7531 'skip$
7532 { new.block }
7533 if$
7534 format.publisher.address output
7535 }
7536 if$
7537 new.block
7538 format.eprint output
7539 format.url output
7540 fin.entry
7541 }
7542 FUNCTION {eulegislation}
7543 { output.bibitem
7544 author empty$
7545 { format.title "title" output.check
7546 print.labeltitle.addenda
7547 continue.clause
7548 format.eu.date "year" output.check
7549 print.title.addenda
7550 }
7551 { format.authors output
7552 author format.key output
7553 format.eu.date "year" output.check
7554 date.block
7555 continue.clause
7556 format.title "title" output.check
7557 print.labeltitle.addenda
7558 print.title.addenda
7559 }
7560 if$
7561 eu.case.check
7562 format.note output
7563 note empty$
7564 'eu.case.check
7565 'new.block
7566 if$
7567 crossref missing$
7568 { continue.clause
7569 format.journal.series.vol.pages output
7570 }
7571 { format.article.crossref output.nonnull
7572 format.pages output
7573 }
7574 if$
7575 new.block
7576 format.eprint output
7577 format.url output
7578 fin.entry
7579 }
7580 FUNCTION {legislation}
7581 { journal empty$
7582 'uklegislation
7583 'eulegislation
7584 if$
7585 }
7586 % \end{macrocode}
7587 %
7588 % \subsubsection{Parliamentary debate}
7589 %
7590 % It would be more efficient to use a straight alias here, but we anticipate
7591 % using this driver for other templates in future. When that happens, the two
7592 % sides of the test will be different.
7593 %
7594 % \begin{macrocode}
7595 FUNCTION {legal}
7596 { entrysubtype field.or.null
7597 "parliamentary" =
7598 'article
7599 'article
7600 if$
7601 }
7602 % \end{macrocode}
7603 %
7604 % \subsubsection{Manual}
7605 %
7606 % \begin{macrocode}
7607 FUNCTION {manual}
7608 { output.bibitem
7609 author empty$
7610 { format.btitle "title" output.check
7611 print.labeltitle.addenda
7612 format.date "year" output.check
7613 year empty$ 'skip$ { date.block } if$
7614 print.title.addenda
7615 }
7616 { format.authors output
7617 author format.key output
7618 format.date "year" output.check
7619 date.block
7620 format.btitle "title" output.check
7621 print.title.addenda
7622 }
7623 if$
7624 month "month" bibinfo.check output
7625 format.edition output
7626 new.block
7627 format.manual.number output
7628 new.block
7629 format.note format.journal.pages output
7630 new.block
7631 format.library output
7632 organization address new.block.checkb
7633 format.organization.address output
7634 new.block
7635 format.eprint output
7636 format.url output
7637 fin.entry
7638 }
7639 % \end{macrocode}
7640 %
7641 % \subsubsection{Image}
7642 %
7643 % \begin{macrocode}
7644 FUNCTION {image}
7645 { output.bibitem
7646 author empty$
7647 { format.btitle "title" output.check
7648 print.labeltitle.addenda
7649 format.date "year" output.check
7650 year empty$ 'skip$ { date.block } if$
7651 print.title.addenda
7652 }
7653 { format.authors output
7654 author format.key output
7655 format.date "year" output.check
7656 date.block
7657 format.btitle "title" output.check
7658 print.title.addenda
7659 }
7660 if$
7661 format.edition output
7662 new.block
7663 format.note output
7664 new.block
7665 format.manual.number output
7666 new.block
7667 format.pub.org.lib.address output
7668 new.block
7669 format.eprint output
7670 format.url output
7671 fin.entry
7672 }
7673 % \end{macrocode}
7674 %
7675 % \subsubsection{Master's thesis}
7676 %
7677 % \begin{macrocode}
7678 FUNCTION {mastersthesis}
7679 { output.bibitem
7680 format.authors "author" output.check
7681 author format.key output
7682 format.date "year" output.check
7683 date.block
7684 format.btitle "title" output.check
7685 print.title.addenda
7686 new.block
7687 format.note output
7688 new.block
7689 bbl.mthesis format.thesis.type output.nonnull
7690 new.block
7691 school "school" bibinfo.warn output
7692 address "address" bibinfo.check output
7693 new.block
7694 format.eprint output
7695 format.url output
7696 fin.entry
7697 }
7698 % \end{macrocode}
7699 %
7700 % \subsubsection{Miscellaneous}
7701 %
7702 % \begin{macrocode}
7703 FUNCTION {misc}
7704 { output.bibitem
7705 author empty$
7706 { format.title "title" output.check
7707 print.labeltitle.addenda
7708 format.date "year" output.check
7709 year empty$ 'skip$ { date.block } if$
7710 print.title.addenda
7711 }
7712 { format.authors output
7713 author format.key output
7714 format.date "year" output.check
7715 date.block
7716 format.title "title" output.check
7717 print.title.addenda
7718 }
7719 if$
7720 new.block
7721 howpublished "howpublished" bibinfo.check output
7722 new.block
7723 format.note output
7724 new.block
7725 format.eprint output
7726 format.url output
7727 fin.entry
7728 }
7729 % \end{macrocode}
7730 %
7731 % \subsubsection{Doctoral thesis}
7732 %
7733 % \begin{macrocode}
7734 FUNCTION {phdthesis}
7735 { output.bibitem
7736 format.authors "author" output.check
7737 author format.key output
7738 format.date "year" output.check
7739 date.block
7740 format.btitle "title" output.check
7741 print.title.addenda
7742 new.block
7743 format.note output
7744 new.block
7745 bbl.phdthesis format.thesis.type output.nonnull
7746 new.block
7747 school "school" bibinfo.warn output
7748 address "address" bibinfo.check output
7749 new.block
7750 format.eprint output
7751 format.url output
7752 fin.entry
7753 }
7754 % \end{macrocode}
7755 %
7756 % \subsubsection{Conference proceedings}
7757 %
7758 % \begin{macrocode}
7759 FUNCTION {proceedings}
7760 { output.bibitem
7761 editor empty$
7762 { format.btitle "title" output.check
7763 print.labeltitle.addenda
7764 format.date "year" output.check
7765 year empty$ 'skip$ { date.block } if$
7766 print.title.addenda
7767 }
7768 { format.editors output
7769 editor format.key output
7770 format.date "year" output.check
7771 date.block
7772 format.btitle "title" output.check
7773 print.title.addenda
7774 }
7775 if$
7776 format.bvolume output
7777 format.number.series output
7778 eventyear output
7779 venue output
7780 format.note output
7781 new.sentence
7782 publisher empty$
7783 { format.organization.address output }
7784 { organization "organization" bibinfo.check output
7785 format.publisher.address output
7786 }
7787 if$
7788 new.block
7789 format.eprint output
7790 format.url output
7791 fin.entry
7792 }
7793 % \end{macrocode}
7794 %
7795 % \subsubsection{Report}
7796 %
7797 % \begin{macrocode}
7798 FUNCTION {techreport}
7799 { output.bibitem
7800 author empty$
7801 { format.btitle "title" output.check
7802 print.labeltitle.addenda
7803 format.date "year" output.check
7804 year empty$ 'skip$ { date.block } if$
7805 print.title.addenda
7806 }
7807 { format.authors output
7808 author format.key output
7809 format.date "year" output.check
7810 date.block
7811 format.btitle "title" output.check
7812 print.title.addenda
7813 }
7814 if$
7815 new.block
7816 format.tr.number output
7817 new.block
7818 % \end{macrocode}
7819 % \iffalse
7820 %<*bst2>
7821 % \fi\bstIIonly
7822 %
7823 % In |bathx.bst|, the |library| field is used for the repository,
7824 % so the note can go in the same position as in \textsf{biblatex-bath}:
7825 %
7826 % \begin{macrocode}
7827 format.note output
7828 new.block
7829 % \end{macrocode}
7830 % \iffalse
7831 %</bst2>
7832 %<*bst1>
7833 % \fi\addtocounter{mismatch}{2}\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
7834 %
7835 % In |bath.bst|, the |note| field is recommended for the repository,
7836 % therefore has to go after the publisher (unless the |library| field
7837 % has been used):
7838 %
7839 % \begin{macrocode}
7840 library empty$
7841 'skip$
7842 { format.note output
7843 new.block
7844 }
7845 if$
7846 % \end{macrocode}
7847 % \iffalse
7848 %</bst1>
7849 % \fi\addtocounter{mismatch}{-6}\addtocounter{lstnumber}{\numexpr\value{mismatch}\relax}\bstboth
7850 %
7851 % This bit is the same.
7852 %
7853 % \begin{macrocode}
7854 publisher empty$
7855 { format.institution.address output }
7856 { institution "institution" bibinfo.check output
7857 format.publisher.address output
7858 }
7859 if$
7860 new.block
7861 % \end{macrocode}
7862 % \iffalse
7863 %<*bst2>
7864 % \fi\bstIIonly
7865 %
7866 % In |bathx.bst|, the |library| field always comes after the publisher:
7867 %
7868 % \begin{macrocode}
7869 format.library output
7870 % \end{macrocode}
7871 % \iffalse
7872 %</bst2>
7873 %<*bst1>
7874 % \fi\addtocounter{mismatch}{1}\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
7875 %
7876 % In |bath.bst|, we fall back to |note| if |library| is not provided:
7877 %
7878 % \begin{macrocode}
7879 library empty$
7880 { format.note output }
7881 { format.library output }
7882 if$
7883 % \end{macrocode}
7884 % \iffalse
7885 %</bst1>
7886 % \fi\addtocounter{mismatch}{-4}\addtocounter{lstnumber}{\numexpr\value{mismatch}\relax}\bstboth
7887 %
7888 % The rest is the same.
7889 %
7890 % \begin{macrocode}
7891 new.block
7892 format.eprint output
7893 format.url output
7894 fin.entry
7895 }
7896 % \end{macrocode}
7897 %
7898 % \subsubsection{Unpublished works}
7899 %
7900 % \begin{macrocode}
7901 FUNCTION {unpublished}
7902 { output.bibitem
7903 author empty$
7904 { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
7905 print.labeltitle.addenda
7906 format.date "year" output.check
7907 year empty$ 'skip$ { date.block } if$
7908 print.title.addenda
7909 }
7910 { format.authors output
7911 author format.key output
7912 format.date "year" output.check
7913 date.block
7914 booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
7915 print.title.addenda
7916 }
7917 if$
7918 new.block
7919 format.in.ed.booktitle output
7920 new.block
7921 howpublished "howpublished" bibinfo.check output
7922 new.block
7923 format.note output
7924 new.block
7925 bbl.unpublished output
7926 new.block
7927 format.eprint output
7928 format.url output
7929 fin.entry
7930 }
7931
7932 % \end{macrocode}
7933 %
7934 % \subsubsection{Aliases and fallbacks}
7935 %
7936 % Here are a list of aliases supported by this style.
7937 %
7938 % \begin{macrocode}
7939 FUNCTION {letter}
7940 { journal empty$
7941 'unpublished
7942 'article
7943 if$
7944 }
7945 FUNCTION {collection} { book }
7946 FUNCTION {reference} { book }
7947 FUNCTION {inreference} { incollection }
7948 FUNCTION {audio} { booklet }
7949 FUNCTION {movie} { booklet }
7950 FUNCTION {music} { booklet }
7951 FUNCTION {video} { booklet }
7952 FUNCTION {dataset} { manual }
7953 FUNCTION {electronic} { manual }
7954 FUNCTION {online} { manual }
7955 FUNCTION {patent} { manual }
7956 FUNCTION {software} { manual }
7957 FUNCTION {standard} { manual }
7958 FUNCTION {www} { manual }
7959 FUNCTION {thesis} { phdthesis }
7960 FUNCTION {report} { techreport }
7961 % \end{macrocode}
7962 %
7963 % The fallback driver is \texttt{misc}, as with most styles.
7964 %
7965 % \begin{macrocode}
7966 FUNCTION {default.type} { misc }
7967
7968 % \end{macrocode}
7969 %
7970 % \subsection{Processing the database}
7971 % \label{sec:processing}
7972 %
7973 % We are now ready for Bib\TeX\ to read in the \texttt{.bib} file.
7974 %
7975 % \begin{macrocode}
7976 READ
7977 % \end{macrocode}
7978 %
7979 % \subsubsection{Utilities for sorting}
7980 %
7981 % These functions are used to generate a sort key for each entry in the \texttt{.bib}
7982 % file.
7983 %
7984 % |sortify| strips out \LaTeX\ commands, spaces and ASCII symbols, and converts
7985 % to lowercase.
7986 %
7987 % \begin{macrocode}
7988 FUNCTION {sortify}
7989 { purify$
7990 "l" change.case$
7991 }
7992 % \end{macrocode}
7993 %
7994 % |chop.word| takes a prefix (stop) string, an integer \emph{len}, and a string
7995 % \emph{s}. If the first \emph{len} characters of \emph{s} match the prefix,
7996 % those characters are stripped off \emph{s}. We'll use this to strip stop words
7997 % from the start of titles, for sorting purposes.
7998 %
7999 % \begin{macrocode}
8000 INTEGERS { len }
8001 FUNCTION {chop.word}
8002 { 's :=
8003 'len :=
8004 s #1 len substring$ =
8005 { s len #1 + global.max$ substring$ }
8006 's
8007 if$
8008 }
8009 % \end{macrocode}
8010 %
8011 % |sort.format.names| consumes one token (a field) and constructs a list of
8012 % names in the form `Surname Forename Prefix Suffix', with just spaces between
8013 % adjacent names and `zzzzz' used in place of `et al.'
8014 %
8015 % \begin{macrocode}
8016 FUNCTION {sort.format.names}
8017 { 's :=
8018 #1 'nameptr :=
8019 ""
8020 s num.names$ 'numnames :=
8021 numnames 'namesleft :=
8022 { namesleft #0 > }
8023 { s nameptr
8024 "{ll{ }}{ f{ }}{ jj{ }}{ vv{}}"
8025 format.name$ 't :=
8026 nameptr #1 >
8027 { " " *
8028 namesleft #1 =
8029 t "others" =
8030 and
8031 { "zzzzz" 't := }
8032 'skip$
8033 if$
8034 t sortify *
8035 }
8036 { t sortify * }
8037 if$
8038 nameptr #1 + 'nameptr :=
8039 namesleft #1 - 'namesleft :=
8040 }
8041 while$
8042 }
8043 % \end{macrocode}
8044 %
8045 % |sort.format.title| strips off initial articles from the preceding field
8046 % and normalizes what remains using |sortify| (see above).
8047 %
8048 % \begin{macrocode}
8049 FUNCTION {sort.format.title}
8050 { 't :=
8051 "A " #2
8052 "An " #3
8053 "The " #4 t chop.word
8054 chop.word
8055 chop.word
8056 sortify
8057 #1 global.max$ substring$
8058 }
8059 % \end{macrocode}
8060 %
8061 % |author.editor.sort| creates a string for use when sorting the entry in the
8062 % bibliography. In order of preference, the string is based on author, editor,
8063 % title or the |key| field.
8064 %
8065 % \begin{macrocode}
8066 FUNCTION {author.editor.sort}
8067 { shortauthor empty$
8068 { author empty$
8069 { shorteditor empty$
8070 { editor empty$
8071 { title empty$
8072 { key empty$
8073 { "to sort, need author, editor, title, or key in "
8074 cite$ * warning$
8075 ""
8076 }
8077 { key sortify }
8078 if$
8079 }
8080 { title sort.format.title }
8081 if$
8082 }
8083 { editor sort.format.names }
8084 if$
8085 }
8086 { shorteditor num.names$ editor num.names$ =
8087 { shorteditor sort.format.names }
8088 { editor sort.format.names }
8089 if$
8090 }
8091 if$
8092 }
8093 { author sort.format.names }
8094 if$
8095 }
8096 { shortauthor num.names$ author num.names$ =
8097 { shortauthor sort.format.names }
8098 { author sort.format.names }
8099 if$
8100 }
8101 if$
8102 }
8103 % \end{macrocode}
8104 %
8105 % |editor.sort| does similar but skips the author names.
8106 %
8107 % \begin{macrocode}
8108 FUNCTION {editor.sort}
8109 { shorteditor empty$
8110 { editor empty$
8111 { title empty$
8112 { key empty$
8113 { "to sort, need editor, title, or key in " cite$ * warning$
8114 ""
8115 }
8116 { key sortify }
8117 if$
8118 }
8119 { title sort.format.title }
8120 if$
8121 }
8122 { editor sort.format.names }
8123 if$
8124 }
8125 { shorteditor num.names$ editor num.names$ =
8126 { shorteditor sort.format.names }
8127 { editor sort.format.names }
8128 if$
8129 }
8130 if$
8131 }
8132 % \end{macrocode}
8133 %
8134 % |author.sort| does similar but skips the editor names.
8135 %
8136 % \begin{macrocode}
8137 FUNCTION {author.sort}
8138 { shortauthor empty$
8139 { author empty$
8140 { type$ "inreference" =
8141 booktitle empty$ not
8142 and
8143 { booktitle sort.format.title }
8144 { title empty$
8145 { key empty$
8146 { "to sort, need author, title, or key in " cite$ * warning$
8147 ""
8148 }
8149 { key sortify }
8150 if$
8151 }
8152 { title sort.format.title }
8153 if$
8154 }
8155 if$
8156 }
8157 { author sort.format.names }
8158 if$
8159 }
8160 { shortauthor num.names$ author num.names$ =
8161 { shortauthor sort.format.names }
8162 { author sort.format.names }
8163 if$
8164 }
8165 if$
8166 }
8167 % \end{macrocode}
8168 %
8169 % |presort| constructs a |sort.key$| (used by |SORT|) based on the sort
8170 % label (full list of authors\slash editors, or a fallback), the citation
8171 % label (a simpler version of the sort label, plus the year), and the title.
8172 %
8173 % \begin{macrocode}
8174 FUNCTION {presort}
8175 { type$ "book" =
8176 type$ "inbook" =
8177 or
8178 'author.editor.sort
8179 { type$ "proceedings" =
8180 'editor.sort
8181 'author.sort
8182 if$
8183 }
8184 if$
8185 #1 entry.max$ substring$
8186 duplicate$ 'sort.label :=
8187 " "
8188 *
8189 calc.label
8190 label sortify
8191 *
8192 " "
8193 *
8194 title field.or.null
8195 sort.format.title
8196 *
8197 #1 entry.max$ substring$
8198 'sort.key$ :=
8199 }
8200
8201 % \end{macrocode}
8202 %
8203 % \subsubsection{Sorting and disambiguating entries}
8204 % \label{sec:disamb}
8205 %
8206 % We now tell Bib\TeX\ to go through each entry in turn and apply the
8207 % \texttt{presort} function, then use the resultant sort keys to put the entries
8208 % in order.
8209 %
8210 % \begin{macrocode}
8211 ITERATE {presort}
8212 SORT
8213 % \end{macrocode}
8214 %
8215 % We now check to see if the labels we've generated so far are sufficiently
8216 % distinct.
8217 %
8218 % First of all, we detect if there are several different lead authors (or
8219 % editors) that share a surname, and if so disambiguate them with an initial.
8220 % Then we check to see if several different author\slash editor groups have
8221 % been truncated to the same lead author\slash editor (with `et al.\@') and if
8222 % so, try to make the truncated lists more distinct by including more names.
8223 %
8224 % We need a few helper variables for this.
8225 %
8226 % \begin{macrocode}
8227 INTEGERS { cite.initials.old disamb.names.old }
8228 STRINGS { name1f name1f.old name1g name1g.old name name.old }
8229 % \end{macrocode}
8230 %
8231 % The |is.label.source| function takes a field, and returns true if it matches
8232 % the entry's |label.source| field.
8233 %
8234 % \begin{macrocode}
8235 FUNCTION {is.label.source}
8236 { duplicate$ empty$
8237 { pop$ #0 }
8238 { label.source =
8239 { #1 }
8240 { #0 }
8241 if$
8242 }
8243 if$
8244 }
8245 % \end{macrocode}
8246 %
8247 % The following three functions are conveniences for managing the loop.
8248 %
8249 % \begin{macrocode}
8250 FUNCTION {initialize.init.stuff}
8251 { "yyyy" 'name1f.old :=
8252 "yyyy" 'name1g.old :=
8253 "yyyy" 'name.old :=
8254 #0 'cite.initials.old :=
8255 #0 'disamb.names.old :=
8256 }
8257 FUNCTION {end.loop.init}
8258 { name1f 'name1f.old :=
8259 name1g 'name1g.old :=
8260 cite.initials 'cite.initials.old :=
8261 disamb.names 'disamb.names.old :=
8262 }
8263 FUNCTION {has.no.init}
8264 { duplicate$ duplicate$
8265 'name1f.old :=
8266 'name1g.old :=
8267 'name.old :=
8268 #0 'cite.initials.old :=
8269 #0 'disamb.names.old :=
8270 }
8271 % \end{macrocode}
8272 %
8273 % The |cmp.names| function takes the name field used to generate the label, and
8274 % contrasts it against the value used to generate the previous (or subsequent)
8275 % entry's label, which should also come from a name field.
8276 % It determines the 0-based index of the first name that differs between
8277 % the two lists, and returns whichever is the greater of that number and the
8278 % entry's current |disamb.names| value. If either list runs out of names before
8279 % a difference is found, this counts as a 0 index (no need to disambiguate).
8280 %
8281 % \begin{macrocode}
8282 FUNCTION {cmp.names}
8283 { 's :=
8284 #1 'nameptr :=
8285 disamb.names.old
8286 s num.names$ 'numnames :=
8287 name.old num.names$ duplicate$ numnames <
8288 { 'numnames := }
8289 'pop$
8290 if$
8291 numnames 'namesleft :=
8292 { namesleft #0 > }
8293 { s nameptr "{ll}" format.name$
8294 name.old nameptr "{ll}" format.name$
8295 =
8296 'skip$
8297 { nameptr #1 -
8298 duplicate$ disamb.names >
8299 { swap$ pop$ }
8300 'pop$
8301 if$
8302 #1 'namesleft :=
8303 }
8304 if$
8305 nameptr #1 + 'nameptr :=
8306 namesleft #1 - 'namesleft :=
8307 }
8308 while$
8309 }
8310 % \end{macrocode}
8311 %
8312 % With |check.cite.init|, we compare the lead author\slash editor name with the
8313 % previous (or subsequent) one. If the surname is different, nothing is done.
8314 % If the surname is the same but the initial is different, |cite.initials| is
8315 % set to 1 and the label is regenerated. If both the surname and the initial is
8316 % the same, |cite.initials| is set to the same as for the previous (subsequent)
8317 % entry; if the name list has more than 3 names in it, we additionally run
8318 % |cmp.names| (above) to set an appropriate value of |disamb.names|; and lastly
8319 % the label is regenerated.
8320 %
8321 % \begin{macrocode}
8322 FUNCTION {check.cite.init}
8323 { 'name :=
8324 name #1 "{ll}" format.name$ 'name1f :=
8325 name #1 "{f.{.}}{ jj}{ vv}" format.name$ 'name1g :=
8326 name1f name1f.old =
8327 { name1g name1g.old =
8328 { cite.initials.old 'cite.initials :=
8329 name num.names$ #3 >
8330 { name cmp.names }
8331 { #0 }
8332 if$
8333 duplicate$
8334 'disamb.names :=
8335 'disamb.names.old :=
8336 presort
8337 }
8338 { #1 'cite.initials :=
8339 presort
8340 end.loop.init
8341 }
8342 if$
8343 }
8344 { end.loop.init }
8345 if$
8346 name 'name.old :=
8347 }
8348 % \end{macrocode}
8349 %
8350 % The above functions only need to be run on the name field used to
8351 % generate the label, so this wrapper function detects whether and which
8352 % one was. If |shortauthor| or |shorteditor| was used, we use |author|
8353 % or |editor| instead if it is the list rather than the name that is
8354 % shorter, otherwise we get inconsistent results.
8355 %
8356 % \begin{macrocode}
8357 FUNCTION {check.cite.head}
8358 { author duplicate$ is.label.source
8359 { check.cite.init }
8360 { pop$
8361 editor duplicate$ is.label.source
8362 { check.cite.init }
8363 { pop$
8364 shortauthor duplicate$ is.label.source
8365 { duplicate$ num.names$ author num.names$ =
8366 { check.cite.init }
8367 { pop$
8368 author check.cite.init
8369 }
8370 if$
8371 }
8372 { pop$
8373 shorteditor duplicate$ is.label.source
8374 { duplicate$ num.names$ editor num.names$ =
8375 { check.cite.init }
8376 { pop$
8377 editor check.cite.init
8378 }
8379 if$
8380 }
8381 { pop$
8382 label.source has.no.init
8383 }
8384 if$
8385 }
8386 if$
8387 }
8388 if$
8389 }
8390 if$
8391 }
8392 % \end{macrocode}
8393 %
8394 % We run this both forwards and backwards over the list of entries, so each one
8395 % is compared with both the previous and subsequent entry.
8396 %
8397 % \begin{macrocode}
8398 EXECUTE {initialize.init.stuff}
8399 ITERATE {check.cite.head}
8400 EXECUTE {initialize.init.stuff}
8401 REVERSE {check.cite.head}
8402 SORT
8403 % \end{macrocode}
8404 %
8405 % Having disambiguated author\slash editor lists as much as we can, we now look
8406 % to see if more than entry has the same head name\slash title and year. If so,
8407 % we'll need to add a letter to the year.
8408 %
8409 % We'll need a few helper variables for this.
8410 %
8411 % \begin{macrocode}
8412 INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
8413 STRINGS { last.label next.extra }
8414 % \end{macrocode}
8415 %
8416 % The |last.char| function will help us tell if the information in the year slot
8417 % ends in a number or not.
8418 %
8419 % \begin{macrocode}
8420 FUNCTION {last.char}
8421 { #1 'len :=
8422 { duplicate$ duplicate$ #1 len substring$ = not }
8423 { len #1 + 'len := }
8424 while$
8425 len #1 substring$
8426 }
8427 % \end{macrocode}
8428 %
8429 % The following function is a convenience for managing the loop.
8430 %
8431 % \begin{macrocode}
8432 FUNCTION {initialize.extra.label.stuff}
8433 { #0 int.to.chr$ 'last.label :=
8434 "" 'next.extra :=
8435 #0 'last.extra.num :=
8436 "a" chr.to.int$ #1 - 'last.extra.num.blank :=
8437 last.extra.num.blank 'last.extra.num.extended :=
8438 #0 'number.label :=
8439 }
8440 % \end{macrocode}
8441 %
8442 % When we go forwards through the entries, we'll set the entry's |extra.label|
8443 % either to the empty string or a letter. The letter `b' means the entry shares
8444 % a label with the previous entry, `c' means it shares one with the two previous
8445 % entries, and so on. The first entry with the shared label of course remains
8446 % unmarked. We add some logic to prepend a non-breaking space to the letter if
8447 % the ambiguous label didn't end in a numeral (between `/' and `:' in ASCII
8448 % codes).
8449 %
8450 % \begin{macrocode}
8451 FUNCTION {forward.pass}
8452 { last.label label =
8453 { last.extra.num #1 + 'last.extra.num :=
8454 last.extra.num "z" chr.to.int$ >
8455 { "a" chr.to.int$ 'last.extra.num :=
8456 last.extra.num.extended #1 + 'last.extra.num.extended :=
8457 }
8458 'skip$
8459 if$
8460 last.extra.num.extended last.extra.num.blank >
8461 { last.extra.num.extended int.to.chr$
8462 last.extra.num int.to.chr$ *
8463 }
8464 { last.extra.num int.to.chr$ }
8465 if$
8466 label last.char chr.to.int$
8467 duplicate$ "/" chr.to.int$ >
8468 swap$ ":" chr.to.int$ < and
8469 'skip$
8470 { "~" swap$ * }
8471 if$
8472 'extra.label :=
8473 }
8474 { "a" chr.to.int$ 'last.extra.num :=
8475 "" 'extra.label :=
8476 label 'last.label :=
8477 }
8478 if$
8479 number.label #1 + 'number.label :=
8480 }
8481 % \end{macrocode}
8482 %
8483 % When we go backwards through the entries, most of the work has already been
8484 % done. We just need to watch out for entries with an |extra.label| of `b',
8485 % as that means the next one we see will be missing its |extra.label| of `a'.
8486 %
8487 % \begin{macrocode}
8488 FUNCTION {reverse.pass}
8489 { next.extra "b" =
8490 { "a" 'extra.label := }
8491 { next.extra "~b" =
8492 { "~a" 'extra.label := }
8493 'skip$
8494 if$
8495 }
8496 if$
8497 extra.label 'next.extra :=
8498 extra.label
8499 duplicate$ empty$
8500 'skip$
8501 { "{\natexlab{" swap$ * "}}" * }
8502 if$
8503 'extra.label :=
8504 label extra.label * 'label :=
8505 }
8506 % \end{macrocode}
8507 %
8508 % Now we complete the forward and backwards passes over the entries.
8509 %
8510 % \begin{macrocode}
8511 EXECUTE {initialize.extra.label.stuff}
8512 ITERATE {forward.pass}
8513 REVERSE {reverse.pass}
8514 % \end{macrocode}
8515 %
8516 % Once we have done that, we re-sort the entries to make absolutely sure they
8517 % in the right order, this time using the year (instead of the citation label)
8518 % between |sort.label| and the title. In this particular style it shouldn't
8519 % make a difference.
8520 %
8521 % \begin{macrocode}
8522 FUNCTION {bib.sort.order}
8523 { sort.label
8524 " "
8525 *
8526 year field.or.null sortify
8527 *
8528 " "
8529 *
8530 title field.or.null
8531 sort.format.title
8532 *
8533 #1 entry.max$ substring$
8534 'sort.key$ :=
8535 }
8536 ITERATE {bib.sort.order}
8537 SORT
8538 % \end{macrocode}
8539 %
8540 % \subsubsection{Writing out the bibliography to a file}
8541 % \label{sec:writing3}
8542 %
8543 % We now write out the beginning of the bibliography to a .bbl file. This
8544 % includes opening a \LaTeX\ environment, \texttt{thebibliography}, and some
8545 % user-redefinable strings.
8546 %
8547 % \begin{macrocode}
8548 FUNCTION {begin.bib}
8549 { preamble$ empty$
8550 'skip$
8551 { preamble$ write$ newline$ }
8552 if$
8553 "\begin{thebibliography}{" number.label int.to.str$ * "}" *
8554 write$ newline$
8555 "\providecommand{\natexlab}[1]{#1}"
8556 write$ newline$
8557 "\providecommand{\url}[1]{\texttt{#1}}"
8558 write$ newline$
8559 "\providecommand{\urlprefix}{Available from: }"
8560 write$ newline$
8561 "\providecommand{\urldateprefix}{Accessed }"
8562 write$ newline$
8563 "\providecommand{\selectlanguage}[1]{\relax}"
8564 write$ newline$
8565 "\providecommand{\bibinfo}[2]{#2}"
8566 write$ newline$
8567 "\providecommand{\eprint}[2][]{\url{#2}}"
8568 write$ newline$
8569 }
8570 EXECUTE {begin.bib}
8571 EXECUTE {init.state.consts}
8572 % \end{macrocode}
8573 %
8574 % We go through each entry in turn, in the right order, and write the
8575 % formatted text out to the file.
8576 %
8577 % \begin{macrocode}
8578 ITERATE {call.type$}
8579 % \end{macrocode}
8580 %
8581 % After the last entry, we close the \LaTeX\ environment and stop writing to the
8582 % .bbl file.
8583 %
8584 % \begin{macrocode}
8585 FUNCTION {end.bib}
8586 { newline$
8587 "\end{thebibliography}" write$ newline$
8588 }
8589 EXECUTE {end.bib}
8590 % \end{macrocode}
8591 % \iffalse
8592 %</bst1|bst2>
8593 % \fi