From c9989009c3dce550e1dd39eecabf1a804dca71a3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 25 Feb 2021 22:02:35 +0000 Subject: bath-bst (25feb21) (branch) git-svn-id: svn://tug.org/texlive/branches/branch2020.0@57917 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/bibtex/bst/bath-bst/bath.bst | 152 ++++++++++++++----- Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst | 194 +++++++++++++++++------- 2 files changed, 248 insertions(+), 98 deletions(-) (limited to 'Master/texmf-dist/bibtex') diff --git a/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst b/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst index f3aea4b2043..06a0aa908a4 100644 --- a/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst +++ b/Master/texmf-dist/bibtex/bst/bath-bst/bath.bst @@ -238,22 +238,21 @@ FUNCTION {either.or.check} if$ } FUNCTION {is.online} -{ type$ "software" = - { #0 } - { url empty$ doi empty$ and - { type$ "online" = - { #1 } - { #0 } - if$ - } +{ url empty$ doi empty$ and + { type$ "online" = { #1 } + { #0 } if$ } + { #1 } if$ } FUNCTION {bbl.and} { "and"} +FUNCTION {bbl.byeditor} +{ "Ed. by" } + FUNCTION {bbl.etal} { "et~al." } @@ -485,6 +484,14 @@ FUNCTION {format.names.ed} FUNCTION {format.authors} { author "author" format.names } +FUNCTION {format.byeditors} +{ editor "editor" format.names.ed duplicate$ empty$ 'skip$ + { bbl.byeditor + " " * + swap$ * + } + if$ +} FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } FUNCTION {format.editors} @@ -661,23 +668,33 @@ FUNCTION {get.title.addenda} continue.clause format.titleaddon output continue.clause + type$ "reference" = + { format.byeditors output } + 'skip$ + if$ format.translators output } FUNCTION {word.in} { bbl.in capitalize ":" * " " * } -FUNCTION {format.booktitle} +FUNCTION {format.label.booktitle} { booktitle duplicate$ empty$ 'skip$ { "t" change.case$ } if$ "booktitle" bibinfo.check +} +FUNCTION {format.booktitle} +{ format.label.booktitle emphasize } FUNCTION {format.in.ed.booktitle} -{ format.booktitle duplicate$ empty$ 'skip$ - { editor "editor" format.names.ed duplicate$ empty$ 'pop$ +{ format.booktitle + duplicate$ empty$ + 'skip$ + { + editor "editor" format.names.ed duplicate$ empty$ 'pop$ { "," * " " * get.bbl.editor add.period$ @@ -1506,13 +1523,17 @@ FUNCTION {book} { output.bibitem author empty$ { editor empty$ - { format.btitle "title" output.check + type$ "reference" = + or + { type$ "reference" = + { format.title "title" output.check } + { format.btitle "title" output.check } + if$ format.date "year" output.check year empty$ 'skip$ { date.block } if$ get.title.addenda } { format.editors "author and editor" output.check - editor format.key output format.date "year" output.check date.block format.btitle "title" output.check @@ -1598,6 +1619,8 @@ FUNCTION {inbook} date.block format.btitle "title" output.check get.title.addenda + new.block + format.edition output crossref missing$ { format.publisher.address output format.bvolume output @@ -1611,7 +1634,6 @@ FUNCTION {inbook} format.book.crossref output.nonnull } if$ - format.edition output new.block format.note output new.block @@ -1621,22 +1643,49 @@ FUNCTION {inbook} } FUNCTION {incollection} { output.bibitem - format.authors "author" output.check - author format.key output - format.date "year" output.check - date.block - format.title "title" output.check - get.title.addenda + author empty$ + { type$ "inreference" = + { format.label.booktitle output } + { format.title "title" output.check } + if$ + format.date "year" output.check + year empty$ 'skip$ { date.block } if$ + type$ "inreference" = + 'skip$ + { get.title.addenda } + if$ + } + { format.authors output.nonnull + format.date "year" output.check + date.block + format.title "title" output.check + get.title.addenda + } + if$ new.block crossref missing$ - { format.in.ed.booktitle "booktitle" output.check + { type$ "inreference" = + author empty$ + and + { format.byeditors output } + { format.in.ed.booktitle "booktitle" output.check } + if$ new.block + format.edition output + new.block + type$ "inreference" = + author empty$ + and + { format.btitle "title" output.check + get.title.addenda + new.block + } + 'skip$ + if$ format.publisher.address output format.bvolume output format.number.series output format.chapter.pages output - new.sentence - format.edition output } { format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2052,6 +2101,9 @@ FUNCTION {letter} 'article if$ } +FUNCTION {collection} { book } +FUNCTION {reference} { book } +FUNCTION {inreference} { incollection } FUNCTION {audio} { booklet } FUNCTION {movie} { booklet } FUNCTION {music} { booklet } @@ -2161,18 +2213,28 @@ FUNCTION {editor.key.label} FUNCTION {author.key.label} { author empty$ { key empty$ - { title empty$ - { cite$ #1 #3 substring$ } - { title - type$ "article" = - type$ "incollection" = - or - type$ "inproceedings" = - or - type$ "misc" = - or - 'skip$ - { emphasize } + { type$ "inreference" = + booktitle empty$ not + and + { booktitle } + { title empty$ + { cite$ #1 #3 substring$ } + { title + type$ "article" = + type$ "incollection" = + or + type$ "inproceedings" = + or + type$ "reference" = + author empty$ + and + or + type$ "misc" = + or + 'skip$ + { emphasize } + if$ + } if$ } if$ @@ -2283,15 +2345,21 @@ FUNCTION {editor.sort} } FUNCTION {author.sort} { author empty$ - { title empty$ - { key empty$ - { "to sort, need author, title, or key in " cite$ * warning$ - "" + { type$ "inreference" = + booktitle empty$ not + and + { booktitle sort.format.title } + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ } - { key sortify } + { title sort.format.title } if$ } - { title sort.format.title } if$ } { author sort.format.names } @@ -2425,6 +2493,6 @@ FUNCTION {end.bib} } EXECUTE {end.bib} %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `bath.bst'. diff --git a/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst b/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst index e7f61277456..41ec643e053 100644 --- a/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst +++ b/Master/texmf-dist/bibtex/bst/bath-bst/bathx.bst @@ -238,22 +238,21 @@ FUNCTION {either.or.check} if$ } FUNCTION {is.online} -{ type$ "software" = - { #0 } - { url empty$ doi empty$ and - { type$ "online" = - { #1 } - { #0 } - if$ - } +{ url empty$ doi empty$ and + { type$ "online" = { #1 } + { #0 } if$ } + { #1 } if$ } FUNCTION {bbl.and} { "and"} +FUNCTION {bbl.byeditor} +{ "Ed. by" } + FUNCTION {bbl.etal} { "et~al." } @@ -485,6 +484,14 @@ FUNCTION {format.names.ed} FUNCTION {format.authors} { author "author" format.names } +FUNCTION {format.byeditors} +{ editor "editor" format.names.ed duplicate$ empty$ 'skip$ + { bbl.byeditor + " " * + swap$ * + } + if$ +} FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } FUNCTION {format.editors} @@ -661,46 +668,70 @@ FUNCTION {get.title.addenda} continue.clause format.titleaddon output continue.clause - library empty$ - type$ "image" = - or is.online - and journal empty$ and - type empty$ - type$ "booklet" = not - type$ "audio" = not - and - type$ "video" = not - and - type$ "music" = not - and - type$ "movie" = not - and + booktitle empty$ + type$ "inreference" = + author empty$ + and + or + and + library empty$ + type$ "image" = + or + and + type$ "software" = not + and + type empty$ + type$ "booklet" = not + type$ "audio" = not + and + type$ "video" = not + and + type$ "music" = not + and + type$ "movie" = not + and or and { bbl.online output } 'skip$ if$ continue.clause + type$ "reference" = + { format.byeditors output } + 'skip$ + if$ format.translators output } FUNCTION {word.in} { bbl.in capitalize ":" * " " * } -FUNCTION {format.booktitle} +FUNCTION {format.label.booktitle} { booktitle duplicate$ empty$ 'skip$ { "t" change.case$ } if$ "booktitle" bibinfo.check +} +FUNCTION {format.booktitle} +{ format.label.booktitle emphasize } FUNCTION {format.in.ed.booktitle} -{ format.booktitle duplicate$ empty$ 'skip$ - { editor "editor" format.names.ed duplicate$ empty$ 'pop$ +{ format.booktitle + duplicate$ empty$ + 'skip$ + { + is.online + { " " * + bbl.online * + } + 'skip$ + if$ + editor "editor" format.names.ed duplicate$ empty$ 'pop$ { "," * " " * get.bbl.editor add.period$ @@ -1556,13 +1587,17 @@ FUNCTION {book} { output.bibitem author empty$ { editor empty$ - { format.btitle "title" output.check + type$ "reference" = + or + { type$ "reference" = + { format.title "title" output.check } + { format.btitle "title" output.check } + if$ format.date "year" output.check year empty$ 'skip$ { date.block } if$ get.title.addenda } { format.editors "author and editor" output.check - editor format.key output format.date "year" output.check date.block format.btitle "title" output.check @@ -1648,6 +1683,8 @@ FUNCTION {inbook} date.block format.btitle "title" output.check get.title.addenda + new.block + format.edition output crossref missing$ { format.publisher.address output format.bvolume output @@ -1661,7 +1698,6 @@ FUNCTION {inbook} format.book.crossref output.nonnull } if$ - format.edition output new.block format.note output new.block @@ -1671,22 +1707,49 @@ FUNCTION {inbook} } FUNCTION {incollection} { output.bibitem - format.authors "author" output.check - author format.key output - format.date "year" output.check - date.block - format.title "title" output.check - get.title.addenda + author empty$ + { type$ "inreference" = + { format.label.booktitle output } + { format.title "title" output.check } + if$ + format.date "year" output.check + year empty$ 'skip$ { date.block } if$ + type$ "inreference" = + 'skip$ + { get.title.addenda } + if$ + } + { format.authors output.nonnull + format.date "year" output.check + date.block + format.title "title" output.check + get.title.addenda + } + if$ new.block crossref missing$ - { format.in.ed.booktitle "booktitle" output.check + { type$ "inreference" = + author empty$ + and + { format.byeditors output } + { format.in.ed.booktitle "booktitle" output.check } + if$ + new.block + format.edition output new.block + type$ "inreference" = + author empty$ + and + { format.btitle "title" output.check + get.title.addenda + new.block + } + 'skip$ + if$ format.publisher.address output format.bvolume output format.number.series output format.chapter.pages output - new.sentence - format.edition output } { format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -2102,6 +2165,9 @@ FUNCTION {letter} 'article if$ } +FUNCTION {collection} { book } +FUNCTION {reference} { book } +FUNCTION {inreference} { incollection } FUNCTION {audio} { booklet } FUNCTION {movie} { booklet } FUNCTION {music} { booklet } @@ -2211,18 +2277,28 @@ FUNCTION {editor.key.label} FUNCTION {author.key.label} { author empty$ { key empty$ - { title empty$ - { cite$ #1 #3 substring$ } - { title - type$ "article" = - type$ "incollection" = - or - type$ "inproceedings" = - or - type$ "misc" = - or - 'skip$ - { emphasize } + { type$ "inreference" = + booktitle empty$ not + and + { booktitle } + { title empty$ + { cite$ #1 #3 substring$ } + { title + type$ "article" = + type$ "incollection" = + or + type$ "inproceedings" = + or + type$ "reference" = + author empty$ + and + or + type$ "misc" = + or + 'skip$ + { emphasize } + if$ + } if$ } if$ @@ -2333,15 +2409,21 @@ FUNCTION {editor.sort} } FUNCTION {author.sort} { author empty$ - { title empty$ - { key empty$ - { "to sort, need author, title, or key in " cite$ * warning$ - "" + { type$ "inreference" = + booktitle empty$ not + and + { booktitle sort.format.title } + { title empty$ + { key empty$ + { "to sort, need author, title, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ } - { key sortify } + { title sort.format.title } if$ } - { title sort.format.title } if$ } { author sort.format.names } @@ -2475,6 +2557,6 @@ FUNCTION {end.bib} } EXECUTE {end.bib} %% -%% Copyright (C) 2020 by University of Bath +%% Copyright (C) 2016-2021 by University of Bath %% %% End of file `bathx.bst'. -- cgit v1.2.3