texlive[63398] Master/texmf-dist: bath-bst (25may22)

commits+karl at tug.org commits+karl at tug.org
Wed May 25 22:18:04 CEST 2022


Revision: 63398
          http://tug.org/svn/texlive?view=revision&revision=63398
Author:   karl
Date:     2022-05-25 22:18:03 +0200 (Wed, 25 May 2022)
Log Message:
-----------
bath-bst (25may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst
    trunk/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst
    trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.bib
    trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.pdf
    trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.tex
    trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.bib
    trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.pdf
    trunk/Master/texmf-dist/source/bibtex/bath-bst/Makefile
    trunk/Master/texmf-dist/source/bibtex/bath-bst/bath-bst.dtx

Modified: trunk/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst	2022-05-25 20:18:03 UTC (rev 63398)
@@ -407,6 +407,10 @@
      }
    if$
 }
+  FUNCTION {word.in}
+{ bbl.in capitalize
+  ":" *
+  " " * }
 
 INTEGERS { nameptr namesleft numnames }
 STRINGS  { bibinfo }
@@ -703,19 +707,27 @@
     }
   if$
 }
-FUNCTION {get.title.online}
-{ online.shown
+FUNCTION {print.labeltitle.addenda}
+{ continue.clause
+  online.shown
     'skip$
-    { continue.clause
+    { format.version output
+      continue.clause
       format.titleaddon output
       #1 'online.shown :=
     }
   if$
 }
-FUNCTION {get.title.addenda}
+FUNCTION {print.title.addenda}
 { continue.clause
-  format.version output
-  get.title.online
+  online.shown
+    'skip$
+    { format.version output
+      continue.clause
+      format.titleaddon output
+      #1 'online.shown :=
+    }
+  if$
   continue.clause
   type$ "reference" =
     { format.byeditors output }
@@ -723,10 +735,6 @@
   if$
   format.translators output
 }
-FUNCTION {word.in}
-{ bbl.in capitalize
-  ":" *
-  " " * }
 FUNCTION {format.label.booktitle}
 { booktitle
   duplicate$ empty$ 'skip$
@@ -1199,7 +1207,7 @@
     }
   if$
 }
-FUNCTION {format.org.or.pub}
+FUNCTION {prepend.address}
 { 't :=
   ""
   address empty$ t empty$ and
@@ -1218,12 +1226,12 @@
   if$
 }
 FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
+{ publisher "publisher" bibinfo.warn prepend.address
 }
 FUNCTION {format.organization.address}
 { publisher empty$
-    { organization "organization" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { organization "organization" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       organization duplicate$ empty$
         'pop$
         { "organization" bibinfo.check ". " * swap$ * }
@@ -1233,8 +1241,8 @@
 }
 FUNCTION {format.institution.address}
 { publisher empty$
-    { institution "institution" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { institution "institution" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       institution duplicate$ empty$
         'pop$
         { "institution" bibinfo.check ". " * swap$ * }
@@ -1247,35 +1255,25 @@
   emphasize
 }
 FUNCTION {format.img.library}
+{ library "library" bibinfo.check
+}
+FUNCTION {format.img.library.address}
 { library duplicate$ empty$
-    { pop$ "" }
-    { "library" bibinfo.check
-      "At: " swap$ *
+    { pop$
+      institution duplicate$ empty$
+        'skip$
+        { "institution" bibinfo.check }
+      if$
     }
+    { "library" bibinfo.check }
   if$
-}
-FUNCTION {format.img.library.address}
-{ address empty$ library empty$ and institution empty$ and
-    { "" }
-    { "At: "
-      address "address" bibinfo.check *
-      library duplicate$ empty$
-        { institution duplicate$ empty$
-            { pop$ "" }
-            { address empty$
-              'skip$
-              { ". " swap$ }
-              if$
-              "institution" bibinfo.check * *
-            }
-          if$
+  duplicate$ empty$
+    { address "address" bibinfo.check * }
+    { address duplicate$ empty$
+        'pop$
+        { "address" bibinfo.check
+          swap$ ", " * swap$ *
         }
-        { address empty$
-            'skip$
-            { ". " swap$ }
-          if$
-          "library" bibinfo.check * *
-        }
       if$
     }
   if$
@@ -1288,7 +1286,7 @@
         format.img.library.address }
       { "organization" bibinfo.check
         library empty$
-          { format.org.or.pub }
+          { prepend.address }
           { ". " *
             format.img.library.address *
           }
@@ -1296,7 +1294,7 @@
       }
     if$
   }
-  { "publisher" bibinfo.warn format.org.or.pub
+  { "publisher" bibinfo.warn prepend.address
     library empty$
       'skip$
       { ". " *
@@ -1584,7 +1582,7 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { journal "t" change.case$
@@ -1614,16 +1612,16 @@
             { format.title "title" output.check }
             { format.btitle "title" output.check }
           if$
-          get.title.online
+          print.labeltitle.addenda
           format.date "year" output.check
           year empty$ 'skip$ { date.block } if$
-          get.title.addenda
+          print.title.addenda
         }
         { format.editors "author and editor" output.check
           format.date "year" output.check
           date.block
           format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
         }
       if$
     }
@@ -1635,7 +1633,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
@@ -1642,8 +1640,13 @@
   format.number.series output
   new.block
   format.edition output
+  new.block
+  format.note output
   crossref missing$
-    { new.sentence
+    { keywords field.or.null "uksi" =
+        { mid.sentence 'output.state := }
+        { new.sentence }
+      if$
       format.publisher.address output
     }
     { new.block
@@ -1651,8 +1654,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1661,10 +1662,10 @@
 { output.bibitem
   author empty$
     { format.avtitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1671,7 +1672,7 @@
       format.date "year" output.check
       date.block
       format.avtitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -1707,9 +1708,12 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   format.edition output
+  new.block
+  format.note output
+  new.block
   crossref missing$
     { format.publisher.address output
       format.bvolume output
@@ -1724,8 +1728,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1736,7 +1738,7 @@
     { type$ "inreference" =
         { format.label.booktitle output}
         { format.title "title" output.check
-          get.title.online
+          print.labeltitle.addenda
         }
       if$
       format.date "year" output.check
@@ -1743,7 +1745,7 @@
       year empty$ 'skip$ { date.block } if$
       type$ "inreference" =
         'skip$
-        { get.title.addenda }
+        { print.title.addenda }
       if$
     }
     { format.authors output.nonnull
@@ -1750,7 +1752,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -1768,23 +1770,25 @@
       author empty$
       and
         { format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
           new.block
         }
         'skip$
       if$
+      format.note output
+      new.block
       format.publisher.address output
       format.bvolume output
       format.number.series output
       format.chapter.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.chapter.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1796,12 +1800,13 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { format.in.ed.booktitle "booktitle" output.check
       eventyear output
       venue output
+      format.note output
       new.sentence
       publisher empty$
         { format.organization.address output }
@@ -1813,13 +1818,13 @@
       format.number.series output
       format.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1837,10 +1842,10 @@
         'new.sentence
         'continue.clause
       if$
-      get.title.online
+      print.labeltitle.addenda
       format.jur.date "year" output.check
       year empty$ 'skip$ { eu.case.check } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1848,7 +1853,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   eu.case.check
@@ -1874,9 +1880,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
+      print.labeltitle.addenda
       continue.clause
       format.date emphasize "year" output.check
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1884,7 +1891,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   entrysubtype field.or.null "secondary" =
@@ -1930,9 +1938,10 @@
 { output.bibitem
   author empty$
   { format.title "title" output.check
+    print.labeltitle.addenda
     continue.clause
     format.eu.date "year" output.check
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -1940,7 +1949,8 @@
     date.block
     continue.clause
     format.title "title" output.check
-    get.title.addenda
+    print.labeltitle.addenda
+    print.title.addenda
   }
   if$
   eu.case.check
@@ -1972,10 +1982,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1982,7 +1992,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   month "month" bibinfo.check output
@@ -1990,12 +2000,12 @@
   new.block
   format.manual.number output
   new.block
+  format.note output
+  new.block
   format.library output
   organization address new.block.checkb
   format.organization.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2004,10 +2014,10 @@
 { output.bibitem
   author empty$
   { format.btitle "title" output.check
-    get.title.online
+    print.labeltitle.addenda
     format.date "year" output.check
     year empty$ 'skip$ { date.block } if$
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -2014,17 +2024,17 @@
     format.date "year" output.check
     date.block
     format.btitle "title" output.check
-    get.title.addenda
+    print.title.addenda
   }
   if$
   format.edition output
   new.block
+  format.note output
+  new.block
   format.manual.number output
   new.block
   format.pub.org.lib.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2036,15 +2046,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.mthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2053,10 +2063,10 @@
 { output.bibitem
   author empty$
     { format.title "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2063,7 +2073,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -2082,15 +2092,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.phdthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2099,10 +2109,10 @@
 { output.bibitem
   editor empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.editors output
       editor format.key output
@@ -2109,11 +2119,12 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
   format.number.series output
+  format.note output
   new.sentence
   publisher empty$
     { format.organization.address output }
@@ -2122,8 +2133,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2132,10 +2141,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2142,12 +2151,18 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
   format.tr.number output
   new.block
+  library empty$
+    'skip$
+    { format.note output
+      new.block
+    }
+  if$
   publisher empty$
     { format.institution.address output }
     { institution "institution" bibinfo.check output
@@ -2155,10 +2170,11 @@
     }
   if$
   new.block
-  format.library output
+  library empty$
+    { format.note output }
+    { format.library output }
+  if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2167,10 +2183,10 @@
 { output.bibitem
   author empty$
     { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2177,7 +2193,7 @@
       format.date "year" output.check
       date.block
       booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -2185,10 +2201,10 @@
   new.block
   howpublished "howpublished" bibinfo.check output
   new.block
+  format.note output
+  new.block
   bbl.unpublished output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry

Modified: trunk/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst
===================================================================
--- trunk/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst	2022-05-25 20:18:03 UTC (rev 63398)
@@ -407,6 +407,10 @@
      }
    if$
 }
+  FUNCTION {word.in}
+{ bbl.in capitalize
+  ":" *
+  " " * }
 
 INTEGERS { nameptr namesleft numnames }
 STRINGS  { bibinfo }
@@ -703,56 +707,122 @@
     }
   if$
 }
-FUNCTION {get.title.online}
-{ is.online
-  journal empty$
+FUNCTION {print.labeltitle.addenda}
+{ continue.clause
+  format.titleaddon output
+  continue.clause
+  type$ duplicate$ "legislation" = not
+  swap$ "jurisdiction" = not
   and
-    booktitle empty$
-      type$ "inreference" =
-      author empty$
-      and
-    or
-  and
-    library empty$
-    type$ duplicate$ "image" =
-    swap$ duplicate$ "booklet" =
-    swap$ duplicate$ "audio" =
-    swap$ duplicate$ "video" =
-    swap$ duplicate$ "music" =
-    swap$ "movie" =
-    or
-    or
-    or
-    or
-    or
-    or
-  and
-  type$ "software" = not
-  and
-    series empty$
-      type duplicate$ empty$
-        { pop$ #1 }
-        { duplicate$ "TV" =
-          swap$ "Radio" =
-          or not
+    { format.version output
+      is.online
+        { entrysubtype duplicate$ empty$
+            { pop$
+              journal empty$
+                booktitle empty$
+                  type$ "inreference" =
+                  author empty$
+                  and
+                or
+              and
+                library empty$
+                type$ duplicate$ "image" =
+                swap$ duplicate$ "audio" =
+                swap$ duplicate$ "video" =
+                swap$ duplicate$ "music" =
+                swap$ "movie" =
+                or
+                or
+                or
+                or
+                or
+              and
+                series empty$
+                  type field.or.null
+                  duplicate$ "TV" =
+                  swap$ "Radio" =
+                  or not
+                or
+              and
+                { continue.clause
+                  bbl.online output
+                  #1 'online.shown :=
+                }
+                'skip$
+              if$
+            }
+            { "entrysubtype" bibinfo.check
+              "[" swap$ * "]" *
+              continue.clause output
+            }
+          if$
         }
+        'skip$
       if$
-    or
-  and
-    { continue.clause
-      bbl.online output
-      #1 'online.shown :=
     }
     'skip$
   if$
 }
-FUNCTION {get.title.addenda}
+FUNCTION {print.title.addenda}
 { continue.clause
+  type$ duplicate$ "legislation" = not
+  swap$ "jurisdiction" = not
+  and
+    { format.titleaddon output
+      continue.clause
+    }
+    'skip$
+  if$
   format.version output
+  is.online
+    { entrysubtype duplicate$ empty$
+        type$ duplicate$ "legislation" =
+        swap$ "jurisdiction" =
+        or
+      or
+        { pop$
+          journal empty$
+            booktitle empty$
+              type$ "inreference" =
+              author empty$
+              and
+            or
+          and
+            library empty$
+            type$ duplicate$ "image" =
+            swap$ duplicate$ "audio" =
+            swap$ duplicate$ "video" =
+            swap$ duplicate$ "music" =
+            swap$ "movie" =
+            or
+            or
+            or
+            or
+            or
+          and
+            series empty$
+              type field.or.null
+              duplicate$ "TV" =
+              swap$ "Radio" =
+              or not
+            or
+          and
+            { continue.clause
+              bbl.online output
+              #1 'online.shown :=
+            }
+            'skip$
+          if$
+        }
+        { "entrysubtype" bibinfo.check
+          "[" swap$ * "]" *
+          continue.clause output
+        }
+      if$
+    }
+    'skip$
+  if$
   continue.clause
-  format.titleaddon output
-  get.title.online
-  continue.clause
   type$ "reference" =
     { format.byeditors output }
     'skip$
@@ -759,10 +829,6 @@
   if$
   format.translators output
 }
-FUNCTION {word.in}
-{ bbl.in capitalize
-  ":" *
-  " " * }
 FUNCTION {format.label.booktitle}
 { booktitle
   duplicate$ empty$ 'skip$
@@ -1251,7 +1317,7 @@
     }
   if$
 }
-FUNCTION {format.org.or.pub}
+FUNCTION {prepend.address}
 { 't :=
   ""
   address empty$ t empty$ and
@@ -1270,12 +1336,12 @@
   if$
 }
 FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
+{ publisher "publisher" bibinfo.warn prepend.address
 }
 FUNCTION {format.organization.address}
 { publisher empty$
-    { organization "organization" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { organization "organization" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       organization duplicate$ empty$
         'pop$
         { "organization" bibinfo.check ". " * swap$ * }
@@ -1285,8 +1351,8 @@
 }
 FUNCTION {format.institution.address}
 { publisher empty$
-    { institution "institution" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { institution "institution" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       institution duplicate$ empty$
         'pop$
         { "institution" bibinfo.check ". " * swap$ * }
@@ -1309,35 +1375,25 @@
   if$
 }
 FUNCTION {format.img.library}
+{ library "library" bibinfo.check
+}
+FUNCTION {format.img.library.address}
 { library duplicate$ empty$
-    { pop$ "" }
-    { "library" bibinfo.check
-      "At: " swap$ *
+    { pop$
+      institution duplicate$ empty$
+        'skip$
+        { "institution" bibinfo.check }
+      if$
     }
+    { "library" bibinfo.check }
   if$
-}
-FUNCTION {format.img.library.address}
-{ address empty$ library empty$ and institution empty$ and
-    { "" }
-    { "At: "
-      address "address" bibinfo.check *
-      library duplicate$ empty$
-        { institution duplicate$ empty$
-            { pop$ "" }
-            { address empty$
-              'skip$
-              { ". " swap$ }
-              if$
-              "institution" bibinfo.check * *
-            }
-          if$
+  duplicate$ empty$
+    { address "address" bibinfo.check * }
+    { address duplicate$ empty$
+        'pop$
+        { "address" bibinfo.check
+          swap$ ", " * swap$ *
         }
-        { address empty$
-            'skip$
-            { ". " swap$ }
-          if$
-          "library" bibinfo.check * *
-        }
       if$
     }
   if$
@@ -1350,7 +1406,7 @@
         format.img.library.address }
       { "organization" bibinfo.check
         library empty$
-          { format.org.or.pub }
+          { prepend.address }
           { ". " *
             format.img.library.address *
           }
@@ -1358,7 +1414,7 @@
       }
     if$
   }
-  { "publisher" bibinfo.warn format.org.or.pub
+  { "publisher" bibinfo.warn prepend.address
     library empty$
       'skip$
       { ". " *
@@ -1652,7 +1708,7 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { journal "t" change.case$
@@ -1689,16 +1745,16 @@
             { format.title "title" output.check }
             { format.btitle "title" output.check }
           if$
-          get.title.online
+          print.labeltitle.addenda
           format.date "year" output.check
           year empty$ 'skip$ { date.block } if$
-          get.title.addenda
+          print.title.addenda
         }
         { format.editors "author and editor" output.check
           format.date "year" output.check
           date.block
           format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
         }
       if$
     }
@@ -1710,7 +1766,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
@@ -1717,8 +1773,13 @@
   format.number.series output
   new.block
   format.edition output
+  new.block
+  format.note output
   crossref missing$
-    { new.sentence
+    { keywords field.or.null "uksi" =
+        { mid.sentence 'output.state := }
+        { new.sentence }
+      if$
       format.publisher.address output
     }
     { new.block
@@ -1726,8 +1787,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1736,10 +1795,10 @@
 { output.bibitem
   author empty$
     { format.avtitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1746,7 +1805,7 @@
       format.date "year" output.check
       date.block
       format.avtitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -1789,9 +1848,12 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   format.edition output
+  new.block
+  format.note output
+  new.block
   crossref missing$
     { format.publisher.address output
       format.bvolume output
@@ -1806,8 +1868,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1818,7 +1878,7 @@
     { type$ "inreference" =
         { format.label.booktitle output}
         { format.title "title" output.check
-          get.title.online
+          print.labeltitle.addenda
         }
       if$
       format.date "year" output.check
@@ -1825,7 +1885,7 @@
       year empty$ 'skip$ { date.block } if$
       type$ "inreference" =
         'skip$
-        { get.title.addenda }
+        { print.title.addenda }
       if$
     }
     { format.authors output.nonnull
@@ -1832,7 +1892,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -1850,23 +1910,25 @@
       author empty$
       and
         { format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
           new.block
         }
         'skip$
       if$
+      format.note output
+      new.block
       format.publisher.address output
       format.bvolume output
       format.number.series output
       format.chapter.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.chapter.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1878,12 +1940,13 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { format.in.ed.booktitle "booktitle" output.check
       eventyear output
       venue output
+      format.note output
       new.sentence
       publisher empty$
         { format.organization.address output }
@@ -1895,13 +1958,13 @@
       format.number.series output
       format.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -1919,10 +1982,10 @@
         'new.sentence
         'continue.clause
       if$
-      get.title.online
+      print.labeltitle.addenda
       format.jur.date "year" output.check
       year empty$ 'skip$ { eu.case.check } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1930,7 +1993,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   eu.case.check
@@ -1956,9 +2020,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
+      print.labeltitle.addenda
       continue.clause
       format.date emphasize "year" output.check
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -1966,7 +2031,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   entrysubtype field.or.null "secondary" =
@@ -2012,9 +2078,10 @@
 { output.bibitem
   author empty$
   { format.title "title" output.check
+    print.labeltitle.addenda
     continue.clause
     format.eu.date "year" output.check
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -2022,7 +2089,8 @@
     date.block
     continue.clause
     format.title "title" output.check
-    get.title.addenda
+    print.labeltitle.addenda
+    print.title.addenda
   }
   if$
   eu.case.check
@@ -2054,10 +2122,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2064,7 +2132,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   month "month" bibinfo.check output
@@ -2072,12 +2140,12 @@
   new.block
   format.manual.number output
   new.block
+  format.note output
+  new.block
   format.library output
   organization address new.block.checkb
   format.organization.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2086,10 +2154,10 @@
 { output.bibitem
   author empty$
   { format.btitle "title" output.check
-    get.title.online
+    print.labeltitle.addenda
     format.date "year" output.check
     year empty$ 'skip$ { date.block } if$
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -2096,17 +2164,17 @@
     format.date "year" output.check
     date.block
     format.btitle "title" output.check
-    get.title.addenda
+    print.title.addenda
   }
   if$
   format.edition output
   new.block
+  format.note output
+  new.block
   format.manual.number output
   new.block
   format.pub.org.lib.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2118,15 +2186,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.mthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2135,10 +2203,10 @@
 { output.bibitem
   author empty$
     { format.title "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2145,7 +2213,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -2164,15 +2232,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.phdthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2181,10 +2249,10 @@
 { output.bibitem
   editor empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.editors output
       editor format.key output
@@ -2191,11 +2259,12 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
   format.number.series output
+  format.note output
   new.sentence
   publisher empty$
     { format.organization.address output }
@@ -2204,8 +2273,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2214,10 +2281,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2224,12 +2291,14 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
   format.tr.number output
   new.block
+  format.note output
+  new.block
   publisher empty$
     { format.institution.address output }
     { institution "institution" bibinfo.check output
@@ -2239,8 +2308,6 @@
   new.block
   format.library output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -2249,10 +2316,10 @@
 { output.bibitem
   author empty$
     { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -2259,7 +2326,7 @@
       format.date "year" output.check
       date.block
       booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -2267,10 +2334,10 @@
   new.block
   howpublished "howpublished" bibinfo.check output
   new.block
+  format.note output
+  new.block
   bbl.unpublished output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry

Modified: trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.bib
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.bib	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.bib	2022-05-25 20:18:03 UTC (rev 63398)
@@ -286,14 +286,13 @@
   organization = {Wikimedia Foundation},
   url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
   urldate = {7 January 2016}}
- at manual{anon1946peb,
-  author = {Anon.},
-  year = {1946},
-  title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
-    organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
-    {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ at manual{brbr1965gph,
+  author = {{Bristol Region Building Record}},
+  year = {1965},
+  title = {{Green} {Park} {House} (since demolished), viewed from southwest},
   titleaddon = {[Photograph]},
-  note = {At: London. Design Council Slide Collection}}
+  note = {BRBR, D/877/1},
+  organization = {Archives \& Research Collections, University of Bath Library}}
 @book{andrews.dury1773wilts,
   author = {Andrews, J. and Dury, A.},
   year = {1773},
@@ -467,7 +466,7 @@
     {清代以來三峽地區水旱災害的初步硏}},
   titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
     the {Qing} dynasty]},
-  journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+  journal = {Zhongguo shehui kexue \emph{中國社會科學}},
   volume = {1},
   pages = {168-79}}
 @article{hua1999qys2,
@@ -535,7 +534,8 @@
   address = {United Kingdom},
   publisher = {HMSO},
   url = {http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf},
-  urldate = {17 April 2016}}
+  urldate = {17 April 2016},
+  keywords = {uksi}}
 @techreport{ec2015gra,
   author = {{European Commission}},
   year = {2015},

Modified: trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.tex	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst-v1.tex	2022-05-25 20:18:03 UTC (rev 63398)
@@ -14,7 +14,7 @@
 %% ----------------------------------------------------------------
 %% 
 \ProvidesFile{bath-bst-v1.tex}
-    [2022/03/04 v5.0 Harvard referencing style as recommended by the University of Bath Library]
+    [2022/05/25 v6.0 Harvard referencing style as recommended by the University of Bath Library]
 
 \documentclass[10pt,a4paper]{article}
 \usepackage[british]{babel}
@@ -41,6 +41,7 @@
 \xdefinecolor{Green}{rgb}{0,.5,0}
 \xdefinecolor{Slate}{RGB}{80,86,94}
 \xdefinecolor{BathStone}{RGB}{213,211,185}
+\xdefinecolor{SlushPuppy}{RGB}{177,215,237}
 \colorlet{ok}{Green}
 \colorlet{todo}{red}
 \colorlet{hacked}{orange}
@@ -203,6 +204,9 @@
       }
     }
   }
+\def\bstIonly{\tcbset{colback=hacked!10}}
+\def\bstIIonly{\tcbset{colback=SlushPuppy!25}}
+\def\bstboth{\tcbset{colback=BathStone!25}}
 
 
 \usepackage{natbib}
@@ -383,6 +387,15 @@
   Maps need to be given the \texttt{book} entry type; previously \texttt{manual} was recommended.
 \end{itemize}
 
+\subsection{Version 6}
+
+\begin{itemize}
+\item
+  All elements of the title block (including \texttt{titleaddon},
+  \texttt{version}, and \texttt{entrysubtype}) now move to the head of the
+  reference in the absence of an author\slash editor.
+\end{itemize}
+
 \section{Examples}
 
 The examples below are shown in three parts.
@@ -757,6 +770,17 @@
 \end{Verbatim}
 \end{bibexbox}
 
+\begin{tips}\item
+The Harvard (Bath) style treats preprints as grey literature, and so the
+\texttt{techreport} entry type (or its alias \texttt{report}) is the best match
+semantically.
+\item
+Use \texttt{note} to specify the name of the preprint repository.
+If you don't want this information showing up in other Bib\TeX\ styles,
+or you think you might want to switch to using \texttt{bathx.bst} later,
+use the \texttt{library} field instead.
+\end{tips}
+
 \begin{bibexbox}<RX>{ganju2021sed}
   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].
   \tcblower
@@ -777,12 +801,6 @@
 \end{Verbatim}
 \end{bibexbox}
 
-\begin{tips}\item
-The Harvard (Bath) style treats preprints as grey literature, and so the
-\texttt{techreport} entry type (or its alias \texttt{report}) is the best match
-semantically. Use \texttt{library} to specify the name of the preprint repository.
-\end{tips}
-
 \subsubsection*{Newspaper article}
 
 \begin{hacks}\item
@@ -1082,22 +1100,33 @@
 \end{Verbatim}
 \end{bibexbox}
 
-\begin{bibexbox}<RI>{anon1946peb}
-  Anon., 1946. \emph{Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition organised by the Council of Industrial Design and held at the Victoria and Albert Museum, London, 1946. Designed by B.~G. Bowden} [Photograph]. At: London. Design Council Slide Collection.
+\begin{bibexbox}<RI>{brbr1965gph}
+  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.
   \tcblower
 \begin{Verbatim}
- at manual{anon1946peb,
-  author = {Anon.},
-  year = {1946},
-  title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
-    organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
-    {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ at manual{brbr1965gph,
+  author = {{Bristol Region Building Record}},
+  year = {1965},
+  title = {{Green} {Park} {House} (since demolished), viewed from southwest},
   titleaddon = {[Photograph]},
-  note = {At: London. Design Council Slide Collection}}
+  note = {BRBR, D/877/1},
+  organization = {Archives \& Research Collections, University of Bath Library}}
 \end{Verbatim}
 \end{bibexbox}
 
+\begin{tips}\item
+If the \texttt{organization} is a publisher, put the location in \texttt{address} as normal;
+if it is an archive or where the image is displayed, include the location within the \texttt{organization} field,
+after the archive name and a comma.
+\item
+Put archival locator information (e.g.\@ box or shelf number) in the \texttt{note} field.
+\end{tips}
 
+\begin{info}\item
+The \texttt{@image} entry type can be used for any visual artistic work,
+including sculptures and interactive exhibits.
+\end{info}
+
 \subsubsection*{Map}
 
 \begin{bibexbox}<RX>{andrews.dury1773wilts}
@@ -1520,7 +1549,7 @@
 
 \newcommand*{\noop}[1]{}
 \begin{bibexbox}(hacked)<RX>{hua1999qys1}
-  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 \textup{中國社會科學}}, 1, pp.168--79.
+  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.
   \tcblower
 \begin{Verbatim}
 @article{hua1999qys1,
@@ -1530,7 +1559,7 @@
     {清代以來三峽地區水旱災害的初步硏}},
   titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
     the {Qing} dynasty]},
-  journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+  journal = {Zhongguo shehui kexue \emph{中國社會科學}},
   volume = {1},
   pages = {168-79}}
 \end{Verbatim}
@@ -1709,10 +1738,15 @@
   address = {United Kingdom},
   publisher = {HMSO},
   url = {http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf},
-  urldate = {17 April 2016}}
+  urldate = {17 April 2016},
+  keywords = {uksi}}
 \end{Verbatim}
 \end{bibexbox}
 
+\begin{tips}\item
+Use the \texttt{uksi} keyword to trigger the comma before the publisher.
+It should be ignored harmlessly by other styles.
+\end{tips}
 
 \subsection{Legal or government document: EU reports\slash legislation}
 

Modified: trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.bib
===================================================================
--- trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.bib	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.bib	2022-05-25 20:18:03 UTC (rev 63398)
@@ -284,15 +284,13 @@
   organization = {Wikimedia Foundation},
   url = {https://commons.wikimedia.org/wiki/File:Royal_Crescent_in_Bath,_England_-_July_2006.jpg},
   urlyear = {7 January 2016}}
- at image{anon1946peb,
-  author = {Anon.},
-  year = {1946},
-  title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
-    organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
-    {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ at image{brbr1965gph,
+  author = {{Bristol Region Building Record}},
+  year = {1965},
+  title = {{Green} {Park} {House} (since demolished), viewed from southwest},
   titleaddon = {Photograph},
-  address = {London},
-  library = {Design Council Slide Collection}}
+  number = {BRBR, D/877/1},
+  library = {Archives \& Research Collections, University of Bath Library}}
 @book{andrews.dury1773wilts,
   author = {Andrews, J. and Dury, A.},
   year = {1773},
@@ -438,7 +436,7 @@
   author = {@screencasto},
   title = {{Screencast-O-Matic}},
   version = {2},
-  titleaddon = {computer program},
+  entrysubtype = {computer program},
   url = {https://screencast-o-matic.com/},
   urlyear = {16 May 2016}}
 @book{aristotle2007ne,
@@ -470,7 +468,7 @@
     {清代以來三峽地區水旱災害的初步硏}},
   titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
     the {Qing} dynasty},
-  journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+  journal = {Zhongguo shehui kexue \emph{中國社會科學}},
   volume = {1},
   pages = {168-79}}
 @article{hua1999qys2,

Modified: trunk/Master/texmf-dist/doc/bibtex/bath-bst/bath-bst.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/bibtex/bath-bst/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/bibtex/bath-bst/Makefile	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/source/bibtex/bath-bst/Makefile	2022-05-25 20:18:03 UTC (rev 63398)
@@ -25,7 +25,7 @@
 $(NAME).bbl: $(NAME).aux $(BST2) $(NAME).bib
 	bibtex $(NAME) >/dev/null
 
-$(NAME).pdf: $(NAME).dtx
+$(NAME).pdf: $(NAME).dtx $(NAME).bbl
 	latexmk -silent -lualatex -interaction=batchmode $< >/dev/null
 	@echo "Compilation of main PDF complete."
 
@@ -35,7 +35,7 @@
 $(NAME)-v1.bbl: $(NAME)-v1.aux $(BST1) $(NAME)-v1.bib
 	bibtex $(NAME)-v1 >/dev/null
 
-$(NAME)-v1.pdf: $(NAME)-v1.tex $(BST1) $(NAME)-v1.bib
+$(NAME)-v1.pdf: $(NAME)-v1.tex $(BST1) $(NAME)-v1.bbl
 	latexmk -silent -lualatex -interaction=batchmode $< >/dev/null
 	@echo "Compilation of test PDF complete."
 

Modified: trunk/Master/texmf-dist/source/bibtex/bath-bst/bath-bst.dtx
===================================================================
--- trunk/Master/texmf-dist/source/bibtex/bath-bst/bath-bst.dtx	2022-05-24 23:49:18 UTC (rev 63397)
+++ trunk/Master/texmf-dist/source/bibtex/bath-bst/bath-bst.dtx	2022-05-25 20:18:03 UTC (rev 63398)
@@ -74,7 +74,7 @@
 \ProvidesFile{bath-bst.dtx}
 %</driver>
 %<*driver|tex1>
-    [2022/03/04 v5.0 Harvard referencing style as recommended by the University of Bath Library]
+    [2022/05/25 v6.0 Harvard referencing style as recommended by the University of Bath Library]
 
 \documentclass[10pt,a4paper]{article}
 \usepackage[british]{babel}
@@ -103,6 +103,7 @@
 \xdefinecolor{Green}{rgb}{0,.5,0}
 \xdefinecolor{Slate}{RGB}{80,86,94}
 \xdefinecolor{BathStone}{RGB}{213,211,185}
+\xdefinecolor{SlushPuppy}{RGB}{177,215,237}
 \colorlet{ok}{Green}
 \colorlet{todo}{red}
 \colorlet{hacked}{orange}
@@ -265,6 +266,9 @@
       }
     }
   }
+\def\bstIonly{\tcbset{colback=hacked!10}}
+\def\bstIIonly{\tcbset{colback=SlushPuppy!25}}
+\def\bstboth{\tcbset{colback=BathStone!25}}
 %</driver|tex1>
 %<*driver>
 % For typesetting the implementation
@@ -676,8 +680,24 @@
   Maps need to be given the \texttt{book} entry type; previously \texttt{manual} was recommended.
 \end{itemize}
 
+\subsection{Version 6}
 
+\begin{itemize}
+%<*driver>
+\item
+  Entry type clarifications such as `Photograph' and `Computer program' are now
+  handled differently from translated titles, in particular as regards their
+  position relative to the version, and how they interact with the `[Online]'
+  tag. As a result, they should now be placed in \texttt{entrysubtype} rather
+  than \texttt{titleaddon}.
+%</driver>
+\item
+  All elements of the title block (including \texttt{titleaddon},
+  \texttt{version}, and \texttt{entrysubtype}) now move to the head of the
+  reference in the absence of an author\slash editor.
+\end{itemize}
 
+
 \section{Examples}
 
 The examples below are shown in three parts.
@@ -1285,6 +1305,28 @@
 %</driver>
 \end{bibexbox}
 
+\begin{tips}\item
+The Harvard (Bath) style treats preprints as grey literature, and so the
+\texttt{techreport} entry type (or its alias \texttt{report}) is the best match
+semantically.
+\item
+%<*driver>
+Use \texttt{library} to specify the name of the preprint repository.
+Note that the workaround in \texttt{bath.bst} of using \texttt{note} instead
+does not work in \texttt{bathx.bst}.
+\iffalse
+%</driver>
+%<*tex1>
+Use \texttt{note} to specify the name of the preprint repository.
+If you don't want this information showing up in other Bib\TeX\ styles,
+or you think you might want to switch to using \texttt{bathx.bst} later,
+use the \texttt{library} field instead.
+%</tex1>
+%<*driver>
+\fi
+%</driver>
+\end{tips}
+
 \begin{bibexbox}<RX>{ganju2021sed}
   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].
   \tcblower
@@ -1331,13 +1373,7 @@
 %</driver>
 \end{bibexbox}
 
-\begin{tips}\item
-The Harvard (Bath) style treats preprints as grey literature, and so the
-\texttt{techreport} entry type (or its alias \texttt{report}) is the best match
-semantically. Use \texttt{library} to specify the name of the preprint repository.
-\end{tips}
 
-
 \subsubsection*{Newspaper article}
 
 \begin{hacks}\item
@@ -1896,21 +1932,19 @@
 %</driver>
 \end{bibexbox}
 
-\begin{bibexbox}<RI>{anon1946peb}
-  Anon., 1946. \emph{Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition organised by the Council of Industrial Design and held at the Victoria and Albert Museum, London, 1946. Designed by B.~G. Bowden} [Photograph]. At: London. Design Council Slide Collection.
+\begin{bibexbox}<RI>{brbr1965gph}
+  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.
   \tcblower
 \begin{Verbatim}
 %</driver|tex1>
 %<*driver|bib>
- at image{anon1946peb,
-  author = {Anon.},
-  year = {1946},
-  title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
-    organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
-    {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ at image{brbr1965gph,
+  author = {{Bristol Region Building Record}},
+  year = {1965},
+  title = {{Green} {Park} {House} (since demolished), viewed from southwest},
   titleaddon = {Photograph},
-  address = {London},
-  library = {Design Council Slide Collection}}
+  number = {BRBR, D/877/1},
+  library = {Archives \& Research Collections, University of Bath Library}}
 %</driver|bib>
 %<*driver>
 \end{Verbatim}
@@ -1917,14 +1951,13 @@
 \iffalse
 %</driver>
 %<*tex1|bib1>
- at manual{anon1946peb,
-  author = {Anon.},
-  year = {1946},
-  title = {Prototype electric bicycle displayed at the \enquote{Britain Can Make It} exhibition
-    organised by the {Council} of {Industrial} {Design} and held at the {Victoria} and {Albert}
-    {Museum}, {London}, 1946. {Designed} by {B.~G.} {Bowden}},
+ at manual{brbr1965gph,
+  author = {{Bristol Region Building Record}},
+  year = {1965},
+  title = {{Green} {Park} {House} (since demolished), viewed from southwest},
   titleaddon = {[Photograph]},
-  note = {At: London. Design Council Slide Collection}}
+  note = {BRBR, D/877/1},
+  organization = {Archives \& Research Collections, University of Bath Library}}
 %</tex1|bib1>
 %<*driver|tex1>
 \end{Verbatim}
@@ -1933,17 +1966,40 @@
 %</driver>
 \end{bibexbox}
 
+\begin{tips}\item
 %<*driver>
-\begin{tips}\item
-Use the \texttt{library} field to record the archive and register number.
+Use the \texttt{library} field to record the archive.
 If the image is on display rather than archived,
 use \texttt{institution} instead for the museum, gallery or building.
 If you also wish to provide the name of the organisation that published the image,
 use the \texttt{publisher} field if the location you provide relates to the publisher,
 but the \texttt{organization} field if the location relates to the archive.
+\item
+Put archival locator information (e.g.\@ box or shelf number) in the \texttt{number} field.
+\item
+Put the clarification of the resource type in \texttt{entrysubtype}.
+In most cases, you can use \texttt{titleaddon} instead,
+but \texttt{entrysubtype} will correctly suppress \enquote{Online} being shown
+while \texttt{titleaddon} will not.
+\iffalse
+%</driver>
+%<*tex1>
+If the \texttt{organization} is a publisher, put the location in \texttt{address} as normal;
+if it is an archive or where the image is displayed, include the location within the \texttt{organization} field,
+after the archive name and a comma.
+\item
+Put archival locator information (e.g.\@ box or shelf number) in the \texttt{note} field.
+%</tex1>
+%<*driver>
+\fi
+%</driver>
 \end{tips}
-%</driver>
 
+\begin{info}\item
+The \texttt{@image} entry type can be used for any visual artistic work,
+including sculptures and interactive exhibits.
+\end{info}
+
 \subsubsection*{Map}
 
 \begin{bibexbox}<RX>{andrews.dury1773wilts}
@@ -2715,7 +2771,7 @@
   author = {@screencasto},
   title = {{Screencast-O-Matic}},
   version = {2},
-  titleaddon = {computer program},
+  entrysubtype = {computer program},
   url = {https://screencast-o-matic.com/},
   urlyear = {16 May 2016}}
 %</driver|bib>
@@ -2742,6 +2798,15 @@
 \begin{info}\item
 Internally, \texttt{software} is an alias for \texttt{manual}.
 \end{info}
+%<*driver>
+\begin{tips}\item
+Put the clarification of the resource type in \texttt{entrysubtype}. In most
+cases, you can use \texttt{titleaddon} instead, but \texttt{titleaddon} is shown
+immediately after the title and may be shown alongside the \enquote{Online}
+label, whereas \texttt{entrysubtype} is printed after the \texttt{version} and
+supersedes the \enquote{Online} label.
+\end{tips}
+%</driver>
 
 
 \subsection{Works in languages other than English}
@@ -2864,7 +2929,7 @@
 
 \newcommand*{\noop}[1]{}
 \begin{bibexbox}(hacked)<RX>{hua1999qys1}
-  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 \textup{中國社會科學}}, 1, pp.168--79.
+  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.
   \tcblower
 \begin{Verbatim}
 %</driver|tex1>
@@ -2876,7 +2941,7 @@
     {清代以來三峽地區水旱災害的初步硏}},
   titleaddon = {A preliminary study of floods and droughts in the {Three} {Gorges} region since
     the {Qing} dynasty},
-  journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+  journal = {Zhongguo shehui kexue \emph{中國社會科學}},
   volume = {1},
   pages = {168-79}}
 %</driver|bib>
@@ -2892,7 +2957,7 @@
     {清代以來三峽地區水旱災害的初步硏}},
   titleaddon = {[A preliminary study of floods and droughts in the {Three} {Gorges} region since
     the {Qing} dynasty]},
-  journal = {Zhongguo shehui kexue \textup{中國社會科學}},
+  journal = {Zhongguo shehui kexue \emph{中國社會科學}},
   volume = {1},
   pages = {168-79}}
 %</tex1|bib1>
@@ -3284,7 +3349,8 @@
   address = {United Kingdom},
   publisher = {HMSO},
   url = {http://www.legislation.gov.uk/uksi/2012/1916/pdfs/uksi_20121916_en.pdf},
-  urldate = {17 April 2016}}
+  urldate = {17 April 2016},
+  keywords = {uksi}}
 %</tex1|bib1>
 %<*driver|tex1>
 \end{Verbatim}
@@ -3293,11 +3359,19 @@
 %</driver>
 \end{bibexbox}
 
+\begin{tips}\item
 %<*driver>
-\begin{tips}\item
 Use the \texttt{entrysubtype} `secondary' to put the number in the right place.
+\iffalse
+%</driver>
+%<*tex1>
+Use the \texttt{uksi} keyword to trigger the comma before the publisher.
+It should be ignored harmlessly by other styles.
+%</tex1>
+%<*driver>
+\fi
+%</driver>
 \end{tips}
-%</driver>
 
 
 \subsection{Legal or government document: EU reports\slash legislation}
@@ -3670,8 +3744,20 @@
   { label extra.label sort.label short.list }
 %    \end{macrocode}
 %
-% \subsection{Writing references out to a file}
+% \subsection{Writing out references to a file}
+% \label{sec:writing1}
 %
+% This is the first of three sections that deal with writing out to the .bbl
+% bibliography file. That file contains the |thebibliography| environment,
+% which in turn contains |\bibitem| commands each providing citation data and
+% followed by a formatted reference. The business of writing the environment,
+% sorting the items and calculating the first half of the citation data for
+% each item is covered in section \ref{sec:writing3}. Calculating the second
+% half of the citation data and writing the |\bibitem| command is covered in
+% section \ref{sec:writing2}; some of the functions defined there are used in
+% section \ref{sec:writing3}, hence the backward structure. This section
+% contains generic functions for writing out the formatted reference.
+%
 % We define a set of integers for saving an output state. We will use them to
 % to implement the mechanism for stringing the elements of the reference
 % together. Whenever an element is printed, it is separated from any previous
@@ -3698,9 +3784,11 @@
 STRINGS { s t }
 %    \end{macrocode}
 %
-% The |output.nonnull| function removes an element from the stack, writes the
-% appropriate delimiter to the .bbl file depending on the state, then restores
-% the original element. Afterwards, the output state is set to |mid.sentence|.
+% The |output.nonnull| function takes the top two tokens (strings) from the
+% stack. It appends the appropriate delimiter to the earlier token and writes
+% it to the .bbl file. It then returns the later (topmost) token to the top of
+% the stack ready for the next occurrence of the function. These are the
+% delimiters used in each state:
 %
 % \begin{itemize}
 % \item |before.all| = nothing is written.
@@ -3710,6 +3798,8 @@
 % \item |after.block| = a period, line break and |\newblock| are written.
 % \end{itemize}
 %
+% Afterwards, the output state is set to |mid.sentence|.
+%
 %    \begin{macrocode}
 FUNCTION {output.nonnull}
 { 's :=
@@ -3749,11 +3839,10 @@
 }
 %    \end{macrocode}
 %
-% Before writing anything out, we need to make sure there is something to be
-% printed. We provide two functions for this: |output| is silent, while
-% |output.check| will write a warning to the log that the field is empty. The
-% latter consumes an additional string (at the top of the stack) for printing
-% in the warning message.
+% We provide two wrappers around |output.nonull| to avoid passing it empty
+% strings: |output| is silent, while |output.check| will write a warning to the
+% log that the field is empty. The latter consumes an additional string (at the
+% top of the stack) for printing in the warning message.
 %
 %    \begin{macrocode}
 FUNCTION {output}
@@ -3818,14 +3907,14 @@
 }
 %    \end{macrocode}
 %
-% The |bibinfo| functions consume two tokens: the value and name of a field
-% respectively. If the value is non-null, the tokens are concatenated in
-% the form |\bibinfo{field name}| |{field value}|. Otherwise, the field name
-% is removed from the stack; if the value is missing rather than empty, it is
-% replaced with an empty string. The |check| version does this silently, while
-% the |warn| version issues a warning in the log file if the value is missing
-% or empty.
+% The |bibinfo| functions consume two tokens -- the value and name of a
+% field respectively -- and return a single string. If the value is non-null,
+% the tokens are concatenated in the form |\bibinfo{field name}{field value}|,
+% otherwise an empty string is returned.
 %
+% The |check| version does this silently, while the |warn| version issues a
+% warning in the log file if the value is missing or empty.
+%
 %    \begin{macrocode}
 FUNCTION {bibinfo.check}
 { swap$
@@ -3920,7 +4009,7 @@
 }
 %    \end{macrocode}
 %
-% The \texttt{emphasize} function applies emphasis.
+% The \texttt{emphasize} function applies emphasis to the topmest token.
 %
 %    \begin{macrocode}
 FUNCTION {emphasize}
@@ -4137,7 +4226,8 @@
 
 %    \end{macrocode}
 %
-% This function allows us to convert cardinal numbers to English ordinals.
+% This function takes a cardinal number and replaces it with the corresponding
+% English ordinal.
 %
 %    \begin{macrocode}
 FUNCTION {eng.ord}
@@ -4160,10 +4250,20 @@
      }
    if$
 }
+%    \end{macrocode}
+%
+% |word.in| provides the `In:' before book titles.
+%
+%    \begin{macrocode}
+  FUNCTION {word.in}
+{ bbl.in capitalize
+  ":" *
+  " " * }
 
 %    \end{macrocode}
 %
-% \subsection{Name handling}
+% \subsection{Writing out citation data to a file}
+% \label{sec:writing2}
 %
 % |format.names| consumes two tokens (field, string field name) and returns a
 % list of names in the form `Surname, Suffix, Initials Prefix'. To help with this,
@@ -4428,14 +4528,14 @@
 }
 %    \end{macrocode}
 %
-% |output.bibitem| writes out the very start of the entry in the bibliography,
+% |output.bibitem| writes out the start of an entry in the bibliography,
 % which looks like |\bibitem[{|author--year elements|}]{|entry key|}|. The
 % author--year part uses special \textsf{natbib} syntax: either `Author(Year)'
 % or `Truncated author list(Year)Full author list'. The |calc.label| function
 % below supplies the truncated author list, opening parenthesis and year; you
 % see here the closing parenthesis and conditional inclusion of the full list.
-% The function then starts a new line and puts the entry driver into the
-% |before.all| output state.
+% The function then starts a new line, puts the entry driver into the
+% |before.all| output state, and puts an empty string at the top of the stack.
 %
 %    \begin{macrocode}
 FUNCTION {output.bibitem}
@@ -4480,11 +4580,16 @@
 }
 %    \end{macrocode}
 %
-% \subsection{Titles}
+% \subsection{Field formats}
 %
-% |select.language| checks if the field before was written out, and if so,
-% wraps |{\selectlanguage{language}|\dots|}| around it.
+% Each of the |format.*| functions below (and above) add a single string
+% (possibly empty) to the stack, based on the value of one or more fields.
 %
+% \subsubsection{Title block}
+%
+% |select.language| checks if the string at the top of the stack is empty, and
+% if not, wraps |{\selectlanguage{language}|\dots|}| around it.
+%
 %    \begin{macrocode}
 FUNCTION {select.language}
 { duplicate$ empty$
@@ -4557,13 +4662,13 @@
   if$
 }
 %    \end{macrocode}
+% \iffalse
+%<*bst1>
+% \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
 %
-% |format.titleaddon| returns the titleaddon field. This is the
-% |bath.bst| version:
+% |format.titleaddon| returns the titleaddon field. This is the |bath.bst|
+% version:
 %
-% \iffalse
-%<*bst1>
-% \fi
 %    \begin{macrocode}
 FUNCTION {format.titleaddon}
 { titleaddon
@@ -4575,7 +4680,7 @@
 % \iffalse
 %</bst1>
 %<*bst2>
-% \fi\addtocounter{lstnumber}{-6}
+% \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-6\relax}\bstIIonly
 %
 % This is the |bathx.bst| version:
 %
@@ -4589,7 +4694,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi
+% \fi\bstboth
 %
 % |format.version| returns the version field.
 %
@@ -4605,102 +4710,195 @@
 }
 %    \end{macrocode}
 %
-% |get.title.online| is a the function for writing `[Online]' after
-% a title. In \texttt{bath.bst} it prints the titleaddon field:
+% |print.labeltitle.addenda| is a convenience for writing out the elements that
+% normally follow the title when it appears at the head of the reference.
 %
+%    \begin{macrocode}
+FUNCTION {print.labeltitle.addenda}
+{ continue.clause
+%    \end{macrocode}
 % \iffalse
 %<*bst1>
-% \fi
+% \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
+%
+% In \texttt{bath.bst} it prints the version and then |titleaddon| field:
+%
 %    \begin{macrocode}
-FUNCTION {get.title.online}
-{ online.shown
+  online.shown
     'skip$
-    { continue.clause
+    { format.version output
+      continue.clause
       format.titleaddon output
       #1 'online.shown :=
     }
   if$
-}
 %    \end{macrocode}
-%\iffalse
+% \iffalse
 %</bst1>
 %<*bst2>
-%\fi\addtocounter{lstnumber}{-9}
+% \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-8\relax}\bstIIonly
 %
-% In \texttt{bathx.bst} it conditionally prints the |bbl.online| string:
+% In \texttt{bathx.bst} it prints the |titleaddon| field, then the version,
+% then either the |entrysubtype| or the |bbl.online| string as appropriate:
 %
 %    \begin{macrocode}
-FUNCTION {get.title.online}
-{ is.online
-  journal empty$
+  format.titleaddon output
+  continue.clause
+  type$ duplicate$ "legislation" = not
+  swap$ "jurisdiction" = not
   and
-    booktitle empty$
-      type$ "inreference" =
-      author empty$
-      and
-    or
-  and
-    library empty$
-    type$ duplicate$ "image" =
-    swap$ duplicate$ "booklet" =
-    swap$ duplicate$ "audio" =
-    swap$ duplicate$ "video" =
-    swap$ duplicate$ "music" =
-    swap$ "movie" =
-    or
-    or
-    or
-    or
-    or
-    or
-  and
-  type$ "software" = not
-  and
-    series empty$
-      type duplicate$ empty$
-        { pop$ #1 }
-        { duplicate$ "TV" =
-          swap$ "Radio" =
-          or not
+    { format.version output
+      is.online
+        { entrysubtype duplicate$ empty$
+            { pop$
+              journal empty$
+                booktitle empty$
+                  type$ "inreference" =
+                  author empty$
+                  and
+                or
+              and
+                library empty$
+                type$ duplicate$ "image" =
+                swap$ duplicate$ "audio" =
+                swap$ duplicate$ "video" =
+                swap$ duplicate$ "music" =
+                swap$ "movie" =
+                or
+                or
+                or
+                or
+                or
+              and
+                series empty$
+                  type field.or.null
+                  duplicate$ "TV" =
+                  swap$ "Radio" =
+                  or not
+                or
+              and
+                { continue.clause
+                  bbl.online output
+                  #1 'online.shown :=
+                }
+                'skip$
+              if$
+            }
+            { "entrysubtype" bibinfo.check
+              "[" swap$ * "]" *
+              continue.clause output
+            }
+          if$
         }
+        'skip$
       if$
-    or
-  and
-    { continue.clause
-      bbl.online output
-      #1 'online.shown :=
     }
     'skip$
   if$
-}
 %    \end{macrocode}
-%\iffalse
+% \iffalse
 %</bst2>
-%\fi\addtocounter{mismatch}{34}
+% \fi\addtocounter{mismatch}{45}\bstboth
 %
-% |get.title.addenda| is a convenience for writing out the elements that
-% normally follow the title in |mid.clause| state.
+% |print.title.addenda| is a convenience for writing out the elements that
+% normally follow the title in its regular position. It is similar to
+% |print.labeltitle.addenda| but has somewhate different logic.
 %
 %    \begin{macrocode}
-FUNCTION {get.title.addenda}
+}
+FUNCTION {print.title.addenda}
 { continue.clause
-  format.version output
 %    \end{macrocode}
+% \iffalse
+%<*bst1>
+% \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
 %
-% These two lines are peculiar to |bathx.bst|, where |titleaddon| doesn't get moved:
+% In \texttt{bath.bst} it prints the version and then |titleaddon| field:
 %
+%    \begin{macrocode}
+  online.shown
+    'skip$
+    { format.version output
+      continue.clause
+      format.titleaddon output
+      #1 'online.shown :=
+    }
+  if$
+%    \end{macrocode}
 % \iffalse
+%</bst1>
 %<*bst2>
-% \fi
+% \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-8\relax}\bstIIonly
+%
+% In \texttt{bathx.bst} it prints the |titleaddon| field, then the version,
+% then either the |entrysubtype| or the |bbl.online| string as appropriate:
+%
 %    \begin{macrocode}
-  continue.clause
-  format.titleaddon output
+  type$ duplicate$ "legislation" = not
+  swap$ "jurisdiction" = not
+  and
+    { format.titleaddon output
+      continue.clause
+    }
+    'skip$
+  if$
+  format.version output
+  is.online
+    { entrysubtype duplicate$ empty$
+        type$ duplicate$ "legislation" =
+        swap$ "jurisdiction" =
+        or
+      or
+        { pop$
+          journal empty$
+            booktitle empty$
+              type$ "inreference" =
+              author empty$
+              and
+            or
+          and
+            library empty$
+            type$ duplicate$ "image" =
+            swap$ duplicate$ "audio" =
+            swap$ duplicate$ "video" =
+            swap$ duplicate$ "music" =
+            swap$ "movie" =
+            or
+            or
+            or
+            or
+            or
+          and
+            series empty$
+              type field.or.null
+              duplicate$ "TV" =
+              swap$ "Radio" =
+              or not
+            or
+          and
+            { continue.clause
+              bbl.online output
+              #1 'online.shown :=
+            }
+            'skip$
+          if$
+        }
+        { "entrysubtype" bibinfo.check
+          "[" swap$ * "]" *
+          continue.clause output
+        }
+      if$
+    }
+    'skip$
+  if$
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{2}
+% \fi\addtocounter{mismatch}{49}\bstboth
+%
+% We finish off with editor\slash translator information.
+%
 %    \begin{macrocode}
-  get.title.online
   continue.clause
   type$ "reference" =
     { format.byeditors output }
@@ -4710,15 +4908,6 @@
 }
 %    \end{macrocode}
 %
-% |word.in| provides the `In:' before book titles.
-%
-%    \begin{macrocode}
-FUNCTION {word.in}
-{ bbl.in capitalize
-  ":" *
-  " " * }
-%    \end{macrocode}
-%
 % |format.label.booktitle| returns the booktitle field upright
 %
 %    \begin{macrocode}
@@ -4750,12 +4939,12 @@
     'skip$
     {
 %    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
 %
 % In |bathx.bst|, we conditionally include the |bbl.online| string:
 %
-% \iffalse
-%<*bst2>
-% \fi
 %    \begin{macrocode}
       is.online
         { " " *
@@ -4767,7 +4956,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{7}
+% \fi\addtocounter{mismatch}{7}\bstboth
 %    \begin{macrocode}
       editor "editor" format.names.ed duplicate$ empty$ 'pop$
         { "," *
@@ -4795,14 +4984,14 @@
   if$
 }
 %    \end{macrocode}
+% \iffalse
+%<*bst1>
+% \fi\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
 %
-% \subsection{Dates}
+% \subsubsection{Dates}
 %
 % In |bath.bst|, |nodate.check| doesn't do anything:
 %
-% \iffalse
-%<*bst1>
-% \fi\addtocounter{lstnumber}{-\value{mismatch}}
 %    \begin{macrocode}
 FUNCTION {nodate.check}
 {
@@ -4812,7 +5001,7 @@
 % \iffalse
 %</bst1>
 %<*bst2>
-% \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-4\relax}
+% \fi\addtocounter{lstnumber}{\numexpr\value{mismatch}-4\relax}\bstIIonly
 %
 % In |bathx.bst|, it looks at the most recent token. If it is empty, replaces
 % it with `n.d.' unless either |sortyear| or the |nonodate| option is present.
@@ -4834,7 +5023,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{9}
+% \fi\addtocounter{mismatch}{9}\bstboth
 %
 % |format.date| returns the year and any disambiguation label.
 %
@@ -4908,7 +5097,7 @@
 }
 %    \end{macrocode}
 %
-% \subsection{Series, volumes, editions}
+% \subsubsection{Series, types and numbering}
 %
 % |format.series| returns the case-altered series field.
 %
@@ -5239,7 +5428,7 @@
 }
 %    \end{macrocode}
 %
-% |format.chapter| prints out the chapter field in the form `c.1', for use with
+% |format.chapter| returns the chapter field in the form `c.1', for use with
 % UK primary legislation.
 %
 %    \begin{macrocode}
@@ -5253,7 +5442,7 @@
 }
 %    \end{macrocode}
 %
-% |format.series.number.chapter| prints out the series and chapter/number fields
+% |format.series.number.chapter| returns the series and chapter/number fields
 % in the form `(series, c.1)' or `(series, number)', for use with UK legislation.
 %
 %    \begin{macrocode}
@@ -5374,7 +5563,7 @@
 }
 %    \end{macrocode}
 %
-% \subsection{Notes}
+% \subsubsection{Notes}
 %
 % |format.note| returns the note field, but changes the case of the first
 % letter according to the output state (unless protected by braces).
@@ -5401,15 +5590,15 @@
 }
 %    \end{macrocode}
 %
-% \subsection{Addresses and publishers}
+% \subsubsection{Publication block}
 %
-% |format.org.or.pub| intercepts a publisher (or whatever) being written out as
-% bibinfo. If the write will succeed and an address has been specified, the
-% address is written out first, then a colon and space; then the original write
-% is allowed to proceed.
+% |prepend.address| prepends the address field to the string at the top of the
+% stack, which should be a publisher (or equivalent) bibinfo string. If both
+% the input string and address field are non-empty, a colon and space are
+% interposed between them.
 %
 %    \begin{macrocode}
-FUNCTION {format.org.or.pub}
+FUNCTION {prepend.address}
 { 't :=
   ""
   address empty$ t empty$ and
@@ -5429,17 +5618,17 @@
 }
 %    \end{macrocode}
 %
-% The next three functions write out the address plus the publisher,
+% The next three functions return the address plus the publisher,
 % organization and institution respectively.
 %
 %    \begin{macrocode}
 FUNCTION {format.publisher.address}
-{ publisher "publisher" bibinfo.warn format.org.or.pub
+{ publisher "publisher" bibinfo.warn prepend.address
 }
 FUNCTION {format.organization.address}
 { publisher empty$
-    { organization "organization" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { organization "organization" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       organization duplicate$ empty$
         'pop$
         { "organization" bibinfo.check ". " * swap$ * }
@@ -5449,8 +5638,8 @@
 }
 FUNCTION {format.institution.address}
 { publisher empty$
-    { institution "institution" bibinfo.check format.org.or.pub }
-    { publisher "publisher" bibinfo.warn format.org.or.pub
+    { institution "institution" bibinfo.check prepend.address }
+    { publisher "publisher" bibinfo.warn prepend.address
       institution duplicate$ empty$
         'pop$
         { "institution" bibinfo.check ". " * swap$ * }
@@ -5467,12 +5656,12 @@
 { library "library" bibinfo.check
   emphasize
 %    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
 %
 % In |bathx.bst|, we conditionally include the |bbl.online| string:
 %
-% \iffalse
-%<*bst2>
-% \fi
 %    \begin{macrocode}
   duplicate$ empty$ not
   is.online
@@ -5487,46 +5676,36 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{10}
+% \fi\addtocounter{mismatch}{10}\bstboth
 %
-% The library field is also used for where a physical image is kept.
-% As we have only one address field, it will attach to whichever is
-% present out of organization, publisher and library. In case there
-% is more than one, it will attach to |publisher| in preference to
-% |library| and |library| in preference to |organization|.
+% The |library| (or |institution|) field is also used for where a physical
+% image is kept. As we have only one address field, it will attach to whichever
+% is present out of organization, publisher and library. In case there is more
+% than one, it will attach to |publisher| in preference to |library| and
+% |library| in preference to |organization|.
 %
 %    \begin{macrocode}
 }
 FUNCTION {format.img.library}
+{ library "library" bibinfo.check
+}
+FUNCTION {format.img.library.address}
 { library duplicate$ empty$
-    { pop$ "" }
-    { "library" bibinfo.check
-      "At: " swap$ *
+    { pop$
+      institution duplicate$ empty$
+        'skip$
+        { "institution" bibinfo.check }
+      if$
     }
+    { "library" bibinfo.check }
   if$
-}
-FUNCTION {format.img.library.address}
-{ address empty$ library empty$ and institution empty$ and
-    { "" }
-    { "At: "
-      address "address" bibinfo.check *
-      library duplicate$ empty$
-        { institution duplicate$ empty$
-            { pop$ "" }
-            { address empty$
-              'skip$
-              { ". " swap$ }
-              if$
-              "institution" bibinfo.check * *
-            }
-          if$
+  duplicate$ empty$
+    { address "address" bibinfo.check * }
+    { address duplicate$ empty$
+        'pop$
+        { "address" bibinfo.check
+          swap$ ", " * swap$ *
         }
-        { address empty$
-            'skip$
-            { ". " swap$ }
-          if$
-          "library" bibinfo.check * *
-        }
       if$
     }
   if$
@@ -5539,7 +5718,7 @@
         format.img.library.address }
       { "organization" bibinfo.check
         library empty$
-          { format.org.or.pub }
+          { prepend.address }
           { ". " *
             format.img.library.address *
           }
@@ -5547,7 +5726,7 @@
       }
     if$
   }
-  { "publisher" bibinfo.warn format.org.or.pub
+  { "publisher" bibinfo.warn prepend.address
     library empty$
       'skip$
       { ". " *
@@ -5560,7 +5739,7 @@
 
 %    \end{macrocode}
 %
-% \subsection{Pinpointing}
+% \subsubsection{Pinpointing}
 %
 % |multi.page.check| should operate on the pages field. If the value is a range,
 % that is, contains `-', `,' or `+', returns 1, otherwise returns 0.
@@ -5803,12 +5982,12 @@
         }
         { "journal" bibinfo.check
 %    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
 %
 % In |bathx.bst|, we conditionally include the |bbl.online| string:
 %
-% \iffalse
-%<*bst2>
-% \fi
 %    \begin{macrocode}
           is.online
             { " " * bbl.online *
@@ -5819,7 +5998,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{6}
+% \fi\addtocounter{mismatch}{6}\bstboth
 %    \begin{macrocode}
           volume "volume" bibinfo.check
           duplicate$ empty$
@@ -5843,9 +6022,9 @@
 }
 %    \end{macrocode}
 %
-% \subsection{URLs}
+% \subsubsection{Access and URLs}
 %
-% |format.eprint| constructs a string |\eprint[archive]{eprint}|.
+% |format.eprint| returns a string |\eprint[archive]{eprint}|.
 %
 %    \begin{macrocode}
 FUNCTION {format.eprint}
@@ -5862,7 +6041,7 @@
 }
 %    \end{macrocode}
 %
-% |format.url| constructs a string |Available from: \url{url} [Accessed urldate]|.
+% |format.url| returns a string |Available from: \url{url} [Accessed urldate]|.
 % We also allow the \texttt{library} field to be used as a fallback URL.
 %
 %    \begin{macrocode}
@@ -5898,7 +6077,7 @@
 }
 %    \end{macrocode}
 %
-% \subsection{Cross referencing between entries}
+% \subsubsection{Related items}
 %
 % The following functions are used for entries that look like `Author, (Year).
 % Title. In: Author (Year).' In practice, they should never be used with Harvard
@@ -5936,7 +6115,7 @@
 
 %    \end{macrocode}
 %
-% \subsection{Formatting drivers for specific entry types}
+% \subsection{Drivers for formatting specific entry types}
 %
 % These functions are called when an entry of the given type is being
 % formatted.
@@ -5951,7 +6130,7 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { journal "t" change.case$
@@ -5959,12 +6138,12 @@
       emphasize
       "journal" output.check
 %    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
 %
 % In |bathx.bst|, we conditionally include the |bbl.online| string:
 %
-% \iffalse
-%<*bst2>
-% \fi
 %    \begin{macrocode}
       is.online
         { continue.clause
@@ -5976,7 +6155,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{7}
+% \fi\addtocounter{mismatch}{7}\bstboth
 %    \begin{macrocode}
       format.vol.num.pages output
     }
@@ -6006,16 +6185,16 @@
             { format.title "title" output.check }
             { format.btitle "title" output.check }
           if$
-          get.title.online
+          print.labeltitle.addenda
           format.date "year" output.check
           year empty$ 'skip$ { date.block } if$
-          get.title.addenda
+          print.title.addenda
         }
         { format.editors "author and editor" output.check
           format.date "year" output.check
           date.block
           format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
         }
       if$
     }
@@ -6027,7 +6206,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
@@ -6034,8 +6213,13 @@
   format.number.series output
   new.block
   format.edition output
+  new.block
+  format.note output
   crossref missing$
-    { new.sentence
+    { keywords field.or.null "uksi" =
+        { mid.sentence 'output.state := }   
+        { new.sentence }
+      if$
       format.publisher.address output
     }
     { new.block
@@ -6043,8 +6227,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6058,10 +6240,10 @@
 { output.bibitem
   author empty$
     { format.avtitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6068,18 +6250,18 @@
       format.date "year" output.check
       date.block
       format.avtitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
   format.series.episode output
 %    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
 %
 % In |bathx.bst|, we conditionally include the |bbl.online| string:
 %
-% \iffalse
-%<*bst2>
-% \fi
 %    \begin{macrocode}
   is.online
     { continue.clause
@@ -6091,7 +6273,7 @@
 %    \end{macrocode}
 % \iffalse
 %</bst2>
-% \fi\addtocounter{mismatch}{7}
+% \fi\addtocounter{mismatch}{7}\bstboth
 %    \begin{macrocode}
   new.block
   type "type" bibinfo.check output
@@ -6129,9 +6311,12 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   format.edition output
+  new.block
+  format.note output
+  new.block
   crossref missing$
     { format.publisher.address output
       format.bvolume output
@@ -6146,8 +6331,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6163,7 +6346,7 @@
     { type$ "inreference" =
         { format.label.booktitle output}
         { format.title "title" output.check
-          get.title.online
+          print.labeltitle.addenda
         }
       if$
       format.date "year" output.check
@@ -6170,7 +6353,7 @@
       year empty$ 'skip$ { date.block } if$
       type$ "inreference" =
         'skip$
-        { get.title.addenda }
+        { print.title.addenda }
       if$
     }
     { format.authors output.nonnull
@@ -6177,7 +6360,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -6195,23 +6378,25 @@
       author empty$
       and
         { format.btitle "title" output.check
-          get.title.addenda
+          print.title.addenda
           new.block
         }
         'skip$
       if$
+      format.note output
+      new.block
       format.publisher.address output
       format.bvolume output
       format.number.series output
       format.chapter.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.chapter.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6228,12 +6413,13 @@
   format.date "year" output.check
   date.block
   format.title "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
   crossref missing$
     { format.in.ed.booktitle "booktitle" output.check
       eventyear output
       venue output
+      format.note output
       new.sentence
       publisher empty$
         { format.organization.address output }
@@ -6245,13 +6431,13 @@
       format.number.series output
       format.pages output
     }
-    { format.incoll.inproc.crossref output.nonnull
+    { format.note output
+      new.block
+      format.incoll.inproc.crossref output.nonnull
       format.pages output
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6274,10 +6460,10 @@
         'new.sentence
         'continue.clause
       if$
-      get.title.online
+      print.labeltitle.addenda
       format.jur.date "year" output.check
       year empty$ 'skip$ { eu.case.check } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6285,7 +6471,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   eu.case.check
@@ -6316,9 +6503,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
+      print.labeltitle.addenda
       continue.clause
       format.date emphasize "year" output.check
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6326,7 +6514,8 @@
       date.block
       continue.clause
       format.btitle "title" output.check
-      get.title.addenda
+      print.labeltitle.addenda
+      print.title.addenda
     }
   if$
   entrysubtype field.or.null "secondary" =
@@ -6372,9 +6561,10 @@
 { output.bibitem
   author empty$
   { format.title "title" output.check
+    print.labeltitle.addenda
     continue.clause
     format.eu.date "year" output.check
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -6382,7 +6572,8 @@
     date.block
     continue.clause
     format.title "title" output.check
-    get.title.addenda
+    print.labeltitle.addenda
+    print.title.addenda
   }
   if$
   eu.case.check
@@ -6419,10 +6610,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6429,7 +6620,7 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   month "month" bibinfo.check output
@@ -6437,12 +6628,12 @@
   new.block
   format.manual.number output
   new.block
+  format.note output
+  new.block
   format.library output
   organization address new.block.checkb
   format.organization.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6456,10 +6647,10 @@
 { output.bibitem
   author empty$
   { format.btitle "title" output.check
-    get.title.online
+    print.labeltitle.addenda
     format.date "year" output.check
     year empty$ 'skip$ { date.block } if$
-    get.title.addenda
+    print.title.addenda
   }
   { format.authors output
     author format.key output
@@ -6466,17 +6657,17 @@
     format.date "year" output.check
     date.block
     format.btitle "title" output.check
-    get.title.addenda
+    print.title.addenda
   }
   if$
   format.edition output
   new.block
+  format.note output
+  new.block
   format.manual.number output
   new.block
   format.pub.org.lib.address output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6493,15 +6684,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.mthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6515,10 +6706,10 @@
 { output.bibitem
   author empty$
     { format.title "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6525,7 +6716,7 @@
       format.date "year" output.check
       date.block
       format.title "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -6549,15 +6740,15 @@
   format.date "year" output.check
   date.block
   format.btitle "title" output.check
-  get.title.addenda
+  print.title.addenda
   new.block
+  format.note output
+  new.block
   bbl.phdthesis format.thesis.type output.nonnull
   new.block
   school "school" bibinfo.warn output
   address "address" bibinfo.check output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6571,10 +6762,10 @@
 { output.bibitem
   editor empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.editors output
       editor format.key output
@@ -6581,11 +6772,12 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   format.bvolume output
   format.number.series output
+  format.note output
   new.sentence
   publisher empty$
     { format.organization.address output }
@@ -6594,8 +6786,6 @@
     }
   if$
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6609,10 +6799,10 @@
 { output.bibitem
   author empty$
     { format.btitle "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6619,12 +6809,48 @@
       format.date "year" output.check
       date.block
       format.btitle "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
   format.tr.number output
   new.block
+%    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
+%
+% In |bathx.bst|, the |library| field is used for the repository,
+% so the note can go in the same position as in \textsf{biblatex-bath}:
+%
+%    \begin{macrocode}
+  format.note output
+  new.block
+%    \end{macrocode}
+% \iffalse
+%</bst2>
+%<*bst1>
+% \fi\addtocounter{mismatch}{2}\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
+%
+% In |bath.bst|, the |note| field is recommended for the repository,
+% therefore has to go after the publisher (unless the |library| field
+% has been used):
+%
+%    \begin{macrocode}
+  library empty$
+    'skip$
+    { format.note output
+      new.block
+    }
+  if$
+%    \end{macrocode}
+% \iffalse
+%</bst1>
+% \fi\addtocounter{mismatch}{-6}\addtocounter{lstnumber}{\numexpr\value{mismatch}\relax}\bstboth
+%
+% This bit is the same.
+%
+%    \begin{macrocode}
   publisher empty$
     { format.institution.address output }
     { institution "institution" bibinfo.check output
@@ -6632,10 +6858,37 @@
     }
   if$
   new.block
+%    \end{macrocode}
+% \iffalse
+%<*bst2>
+% \fi\bstIIonly
+%
+% In |bathx.bst|, the |library| field always comes after the publisher:
+%
+%    \begin{macrocode}
   format.library output
+%    \end{macrocode}
+% \iffalse
+%</bst2>
+%<*bst1>
+% \fi\addtocounter{mismatch}{1}\addtocounter{lstnumber}{-\value{mismatch}}\bstIonly
+%
+% In |bath.bst|, we fall back to |note| if |library| is not provided:
+%
+%    \begin{macrocode}
+  library empty$
+    { format.note output }
+    { format.library output }
+  if$
+%    \end{macrocode}
+% \iffalse
+%</bst1>
+% \fi\addtocounter{mismatch}{-4}\addtocounter{lstnumber}{\numexpr\value{mismatch}\relax}\bstboth
+%
+% The rest is the same.
+%
+%    \begin{macrocode}
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6649,10 +6902,10 @@
 { output.bibitem
   author empty$
     { booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.online
+      print.labeltitle.addenda
       format.date "year" output.check
       year empty$ 'skip$ { date.block } if$
-      get.title.addenda
+      print.title.addenda
     }
     { format.authors output
       author format.key output
@@ -6659,7 +6912,7 @@
       format.date "year" output.check
       date.block
       booktitle empty$ 'format.btitle 'format.title if$ "title" output.check
-      get.title.addenda
+      print.title.addenda
     }
   if$
   new.block
@@ -6667,10 +6920,10 @@
   new.block
   howpublished "howpublished" bibinfo.check output
   new.block
+  format.note output
+  new.block
   bbl.unpublished output
   new.block
-  format.note output
-  new.block
   format.eprint output
   format.url output
   fin.entry
@@ -6714,7 +6967,8 @@
 
 %    \end{macrocode}
 %
-% \subsection{Bibliography processing}
+% \subsection{Writing out the bibliography to a file}
+% \label{sec:writing3}
 %
 % We are now ready for Bib\TeX\ to read in the \texttt{.bib} file.
 %
@@ -6906,9 +7160,10 @@
 }
 %    \end{macrocode}
 %
-% |calc.label| creates a string in the form `Truncated Author List(Year'. The
-% closing parenthesis is supplied by |output.bibitem| (see above), into which
-% this string is incorporated.
+% |calc.label| creates a string in the form `Truncated Author List(Year' and
+% saves it to the |label| variable. The closing parenthesis is supplied by
+% |output.bibitem| (see section \ref{sec:writing2}), into which this string is
+% incorporated.
 %
 %    \begin{macrocode}
 FUNCTION {calc.label}



More information about the tex-live-commits mailing list.