summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/rsc/angew.bst
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-09-08 00:26:52 +0000
committerKarl Berry <karl@freefriends.org>2008-09-08 00:26:52 +0000
commit06ebf7d14fd3c483ed229b86d938732cf3f6a5d2 (patch)
tree9e7ce6c30307798cacf45704443c9de484ab9603 /Master/texmf-dist/bibtex/bst/rsc/angew.bst
parent883bf95bf548e81277aeb42fc6e26f1926744a3a (diff)
rsc 3.0 (27aug08)
git-svn-id: svn://tug.org/texlive/trunk@10467 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/rsc/angew.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/rsc/angew.bst560
1 files changed, 483 insertions, 77 deletions
diff --git a/Master/texmf-dist/bibtex/bst/rsc/angew.bst b/Master/texmf-dist/bibtex/bst/rsc/angew.bst
index bb6521b1d52..9859c2fad86 100644
--- a/Master/texmf-dist/bibtex/bst/rsc/angew.bst
+++ b/Master/texmf-dist/bibtex/bst/rsc/angew.bst
@@ -6,11 +6,11 @@
%%
%% rsc.dtx (with options: `bib,angew')
%% ----------------------------------------------------------------
-%% The rsc package - BibTeX support for Royal Society of Chemistry
-%% and Wiley style article
+%% The rsc package --- BibTeX styles for Royal Society of Chemistry
+%% and Wiley journals
%% Maintained by Joseph Wright
%% E-mail: joseph.wright@morningstar2.co.uk
-%% Released under the LaTeX Project Public License v1.3 or later
+%% Released under the LaTeX Project Public License v1.3c or later
%% See http://www.latex-project.org/lppl.txt
%% ----------------------------------------------------------------
%%
@@ -19,12 +19,16 @@ ENTRY
author
booktitle
chapter
+ ctrl-use-title
+ ctrl-etal-number
+ ctrl-use-doi-all
doi
edition
editor
howpublished
institution
journal
+ key
note
number
organization
@@ -39,10 +43,14 @@ ENTRY
year
}
{}
- { label }
+ { label
+ extra.label
+ short.list
+ }
-INTEGERS { output.state before.all mid.sentence after.sentence }
-INTEGERS { after.block after.item author.or.editor }
+INTEGERS { output.state before.all mid.sentence }
+INTEGERS { after.sentence after.block after.item }
+INTEGERS { author.or.editor }
FUNCTION {init.state.consts}
{ #0 'before.all :=
@@ -52,6 +60,14 @@ FUNCTION {init.state.consts}
#4 'after.item :=
}
+INTEGERS { is.use.title etal.number use.doi.all }
+
+FUNCTION {default.is.use.title} { #0 }
+
+FUNCTION {default.etal.number} { #0 }
+
+FUNCTION {default.use.doi.all} { #0 }
+
FUNCTION {add.comma}
{ ", " * }
@@ -97,23 +113,41 @@ FUNCTION {output.check}
if$
}
-FUNCTION {output.bibitem}
-{ newline$
- "\bibitem{" write$
- cite$ write$
- "}" write$
- newline$
- ""
- before.all 'output.state :=
+INTEGERS { would.add.period.textlen }
+
+FUNCTION {would.add.period}
+{ duplicate$
+ add.period$
+ text.length$
+ 'would.add.period.textlen :=
+ duplicate$
+ text.length$
+ would.add.period.textlen =
+ { #0 }
+ { #1 }
+ if$
}
FUNCTION {fin.entry}
-{ add.period$
+{ would.add.period
+ { "\relax" * write$ newline$
+ "\mciteBstWouldAddEndPuncttrue" write$ newline$
+ "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
+ write$ newline$
+ "{\mcitedefaultendpunct}{\mcitedefaultseppunct}\relax"
+ }
+ { "\relax" * write$ newline$
+ "\mciteBstWouldAddEndPunctfalse" write$ newline$
+ "\mciteSetBstMidEndSepPunct{\mcitedefaultmidpunct}"
+ write$ newline$
+ "{}{\mcitedefaultseppunct}\relax"
+ }
+ if$
write$
newline$
+ "\EndOfBibitem" write$
}
-
FUNCTION {not}
{ { #0 }
{ #1 }
@@ -166,6 +200,9 @@ FUNCTION {bbl.and}
FUNCTION {bbl.chapter}
{ "Chapter" }
+FUNCTION {bbl.doi}
+{ "DOI" }
+
FUNCTION {bbl.editor}
{ "Ed.:" }
@@ -286,6 +323,19 @@ FUNCTION{find.replace}
while$
}
+FUNCTION {chr.to.value}
+{ chr.to.int$ #48 -
+ duplicate$ duplicate$
+ #0 < swap$ #9 > or
+ { #48 + int.to.chr$
+ " is not a number..." *
+ warning$
+ pop$ #0
+ }
+ {}
+ if$
+}
+
FUNCTION{is.a.digit}
{ duplicate$ "" =
{pop$ #0}
@@ -385,28 +435,35 @@ FUNCTION {format.names}
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
- { namesleft #0 > }
- { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
- nameptr #1 >
- { namesleft #1 >
- { add.comma t * }
- { numnames #2 >
- { "" * }
- 'skip$
- if$
- t "others" =
- { bbl.etal space.connect }
+ numnames etal.number > etal.number #0 > and
+ { s #1 "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ t bbl.etal space.connect
+ }
+ {
+ { namesleft #0 > }
+ { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
{ add.comma t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal space.connect }
+ { add.comma t * }
+ if$
+ }
if$
}
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+ }
+ if$
}
FUNCTION {format.authors}
@@ -437,7 +494,7 @@ FUNCTION {format.editors}
strip.comma
editor num.names$ #1 >
{ bbl.editors }
- { bbl.editor }
+ { bbl.editor }
if$
" " *
editor format.names * paren
@@ -445,6 +502,17 @@ FUNCTION {format.editors}
if$
}
+FUNCTION {format.doi}
+{ use.doi.all
+ { doi empty$
+ { bbl.doi doi tie.or.space.connect output }
+ 'skip$
+ if$
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {n.separate.multi}
{ 't :=
""
@@ -517,6 +585,91 @@ FUNCTION {format.title.vol}
if$
}
+FUNCTION {format.full.names}
+{'s :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr
+ "{vv~}{ll}" format.name$ 't :=
+ nameptr #1 >
+ {
+ namesleft #1 >
+ { ", " * t * }
+ {
+ numnames #2 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and space.connect t space.connect }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {author.editor.full}
+{ author empty$
+ { editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+ }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {author.full}
+{ author empty$
+ { "" }
+ { author format.full.names }
+ if$
+}
+
+FUNCTION {editor.full}
+{ editor empty$
+ { "" }
+ { editor format.full.names }
+ if$
+}
+
+FUNCTION {make.full.names}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.full
+ { type$ "proceedings" =
+ 'editor.full
+ 'author.full
+ if$
+ }
+ if$
+}
+
+FUNCTION {output.bibitem} { newline$
+ "\bibitem[" write$
+ label write$
+ ")" make.full.names duplicate$ short.list =
+ { pop$ }
+ { * }
+ if$
+ "]{" * write$
+ cite$ write$
+ "}" write$
+ newline$
+ ""
+ before.all 'output.state :=
+}
+
FUNCTION {n.dashify} { 't :=
""
{ t empty$ not }
@@ -558,7 +711,8 @@ FUNCTION {format.bdate}
FUNCTION {either.or.check}
{ empty$
'pop$
- { "Can't use both " swap$ * " fields in " * cite$ * warning$ }
+ { "Can't use both " swap$ * " fields in "
+ * cite$ * warning$ }
if$
}
@@ -737,16 +891,20 @@ FUNCTION {format.thesis.type}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
+ is.use.title
+ { title format.title.noemph "title" output.check }
+ 'skip$
+ if$
+
journal "," "" find.replace emphasize
"journal" output.check
after.item 'output.state :=
format.date "year" output.check
volume empty$
- { ""
- format.pages.nopp output
- }
- { format.vol.pages output }
+ { "" format.pages.nopp output }
+ { format.vol.pages output }
if$
+ format.doi
fin.entry
}
@@ -755,7 +913,8 @@ FUNCTION {book}
author empty$
{ title format.title.vol "title" output.check
editor empty$
- { "Need either an author or editor for " cite$ * warning$ }
+ { "Need either an author or editor for "
+ cite$ * warning$ }
{ "" format.editors * "editor" output.check }
if$
}
@@ -771,6 +930,7 @@ FUNCTION {book}
'skip$
{ format.pages output }
if$
+ format.doi
fin.entry
}
@@ -781,6 +941,7 @@ FUNCTION {booklet}
howpublished output
address output
format.date output
+ format.doi
fin.entry
}
@@ -789,7 +950,8 @@ FUNCTION {inbook}
author empty$
{ title format.title.vol "title" output.check
editor empty$
- { "Need at least an author or an editor for " cite$ * warning$ }
+ { "Need at least an author or an editor for "
+ cite$ * warning$ }
{ "" format.editors * "editor" output.check }
if$
}
@@ -801,26 +963,33 @@ FUNCTION {inbook}
format.edition output
format.bdate "year" output.check
format.chapter.pages "chapter and pages" output.check
+ format.doi
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
author empty$
- { booktitle format.title.vol "booktitle" output.check
+ { booktitle
+ format.title.vol
+ "booktitle" output.check
editor empty$
- { "Need at least an author or an editor for " cite$ * warning$ }
+ { "Need at least an author or an editor for "
+ cite$ * warning$ }
{ "" format.editors * "editor" output.check }
if$
}
{ format.authors output
- booktitle format.title.vol.in "booktitle" output.check
+ booktitle
+ format.title.vol
+ "booktitle" output.check
}
if$
format.pub.address "publisher" output.check
format.edition output
format.bdate "year" output.check
format.chapter.pages "chapter and pages" output.check
+ format.doi
fin.entry
}
@@ -829,6 +998,7 @@ FUNCTION {inpress}
format.authors "author" output.check
journal emphasize "journal" output.check
bbl.inpress output
+ format.doi
fin.entry
}
@@ -842,6 +1012,7 @@ FUNCTION {inproceedings}
'skip$
{ format.pages output }
if$
+ format.doi
fin.entry
}
@@ -870,6 +1041,7 @@ FUNCTION {manual}
if$
format.edition output
format.date output
+ format.doi
fin.entry
}
@@ -880,6 +1052,7 @@ FUNCTION {mastersthesis}
school "school" output.check
address output
format.date "year" output.check
+ format.doi
fin.entry
}
@@ -894,6 +1067,7 @@ FUNCTION {misc}
format.date output
format.url output
note output
+ format.doi
fin.entry
empty.misc.check
}
@@ -912,6 +1086,7 @@ FUNCTION {patent}
journal emphasize "journal" output.check
format.pages.patent "pages" output.check
format.date "year" output.check
+ format.doi
fin.entry
}
@@ -922,6 +1097,7 @@ FUNCTION {phdthesis}
school "school" output.check
address output
format.date "year" output.check
+ format.doi
fin.entry
}
@@ -934,19 +1110,7 @@ FUNCTION {proceedings}
'skip$
{ format.pages output }
if$
- fin.entry
-}
-
-FUNCTION {remark}
-{ output.bibitem
- note "note" output.check
- fin.entry
-}
-
-FUNCTION {submitted}
-{ output.bibitem
- format.authors "author" output.check
- bbl.submitted output
+ format.doi
fin.entry
}
@@ -967,6 +1131,7 @@ FUNCTION {techreport}
output
format.pub.address output
format.date "year" output.check
+ format.doi
fin.entry
}
@@ -979,12 +1144,98 @@ FUNCTION {unpublished}
if$
doi empty$
{ note output }
- { "DOI" doi tie.or.space.connect output }
+ {
+ bbl.doi doi tie.or.space.connect output
+ }
if$
fin.entry
empty.doi.note
}
+INTEGERS { a b }
+
+FUNCTION {mult}
+{ 'a :=
+ 'b :=
+ b #0 <
+ {#-1 #0 b - 'b :=}
+ {#1}
+ if$
+ #0
+ {b #0 >}
+ { a +
+ b #1 - 'b :=
+ }
+ while$
+ swap$
+ 'skip$
+ {#0 swap$ -}
+ if$
+}
+
+FUNCTION {str.to.int.aux}
+{ {duplicate$ empty$ not}
+ { swap$ #10 mult 'a :=
+ duplicate$ #1 #1 substring$
+ chr.to.value a +
+ swap$
+ #2 global.max$ substring$
+ }
+ while$
+ pop$
+}
+
+FUNCTION {str.to.int}
+{ duplicate$ #1 #1 substring$ "-" =
+ {#1 swap$ #2 global.max$ substring$}
+ {#0 swap$}
+ if$
+ #0 swap$ str.to.int.aux
+ swap$
+ {#0 swap$ -}
+ {}
+ if$
+}
+
+FUNCTION {yes.no.to.int}
+{ "l" change.case$ duplicate$
+ "yes" =
+ { pop$ #1 }
+ { duplicate$ "no" =
+ { pop$ #0 }
+ { "unknown Boolean " quote$ * swap$ * quote$ *
+ " in " * cite$ * warning$
+ #0
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {Control}
+{ ctrl-use-title
+ empty$
+ { skip$ }
+ { ctrl-use-title
+ yes.no.to.int
+ 'is.use.title := }
+ if$
+ ctrl-etal-number
+ empty$
+ { skip$ }
+ { ctrl-etal-number
+ str.to.int
+ 'etal.number := }
+ if$
+ ctrl-use-doi-all
+ empty$
+ { skip$ }
+ { ctrl-use-doi-all
+ yes.no.to.int
+ 'use.doi.all := }
+ if$
+}
+
FUNCTION {conference} {inproceedings}
FUNCTION {other} {patent}
@@ -1006,39 +1257,197 @@ MACRO {dec} {"December"}
READ
-STRINGS { longest.label }
+FUNCTION {initialize.controls}
+{ default.is.use.title 'is.use.title :=
+ default.etal.number 'etal.number :=
+ default.use.doi.all 'use.doi.all :=
+}
+
+INTEGERS { len }
+
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+
+FUNCTION {format.lab.names}
+{ 's :=
+ s #1 "{vv~}{ll}" format.name$
+ s num.names$ duplicate$
+ #2 >
+ { pop$ bbl.etal space.connect }
+ { #2 <
+ 'skip$
+ { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
+ { bbl.etal space.connect }
+ { bbl.and space.connect s #2 "{vv~}{ll}"
+ format.name$ space.connect }
+ if$
+ }
+ if$
+ }
+ if$
+}
-INTEGERS { number.label longest.label.width }
+FUNCTION {author.key.label}
+{ author empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.editor.key.label}
+{ author empty$
+ { editor empty$
+ { key empty$
+ { cite$ #1 #3 substring$ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {author.key.organization.label}
+{ author empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3
+ text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { author format.lab.names }
+ if$
+}
+
+FUNCTION {editor.key.organization.label}
+{ editor empty$
+ { key empty$
+ { organization empty$
+ { cite$ #1 #3 substring$ }
+ { "The " #4 organization chop.word #3
+ text.prefix$ }
+ if$
+ }
+ 'key
+ if$
+ }
+ { editor format.lab.names }
+ if$
+}
+
+FUNCTION {calc.short.authors}
+{ type$ "book" =
+ type$ "inbook" =
+ or
+ 'author.editor.key.label
+ { type$ "proceedings" =
+ 'editor.key.organization.label
+ { type$ "manual" =
+ 'author.key.organization.label
+ 'author.key.label
+ if$
+ }
+ if$
+ }
+ if$
+ 'short.list :=
+}
+
+FUNCTION {calc.label}
+{ calc.short.authors
+ short.list
+ "("
+ *
+ year duplicate$ empty$
+ short.list key field.or.null = or
+ { pop$ "" }
+ 'skip$
+ if$
+ *
+ 'label :=
+}
+
+ITERATE {calc.label}
+
+STRINGS { longest.label last.label next.extra }
+
+INTEGERS { longest.label.width last.extra.num number.label }
FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
- #1 'number.label :=
+ #0 int.to.chr$ 'last.label :=
+ "" 'next.extra :=
#0 'longest.label.width :=
+ #0 'last.extra.num :=
+ #0 'number.label :=
}
-FUNCTION {longest.label.pass}
-{ number.label int.to.str$ 'label :=
- number.label #1 + 'number.label :=
- label width$ longest.label.width >
- { label 'longest.label :=
- label width$ 'longest.label.width :=
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
}
- 'skip$
if$
+ number.label #1 + 'number.label :=
}
EXECUTE {initialize.longest.label}
-ITERATE {longest.label.pass}
+ITERATE {forward.pass}
FUNCTION {begin.bib}
{ preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
- "\providecommand{\url}[1]{\texttt{#1}}"
+ "\ifx\mcitethebibliography\mciteundefinedmacro"
+ write$ newline$
+ " \PackageError"
+ "{angew.bst}"
+ "{mciteplus.sty has not been loaded}" * *
+ write$ newline$
+ " {This bibstyle requires the use of the"
+ " mciteplus package.}" *
+ write$ newline$
+ "\fi"
+ write$ newline$
+ "\begin{mcitethebibliography}{"
+ number.label int.to.str$ * "}" *
+ write$ newline$
+ "\providecommand{\natexlab}[1]{#1}"
+ write$ newline$
+ "\mciteSetBstSublistMode{f}"
+ write$ newline$
+ "\mciteSetBstMaxWidthForm{subitem}"
+ write$ newline$
+ "{\alph{mcitesubitemcount})}"
+ write$ newline$
+ "\mciteSetBstSublistLabelBeginEnd"
+ write$ newline$
+ "{\mcitemaxwidthsubitemform\space}"
+ write$ newline$
+ "{\relax}{\relax}"
write$ newline$
- "\begin{thebibliography}{" longest.label * "}" * write$ newline$
}
EXECUTE {begin.bib}
@@ -1049,10 +1458,7 @@ ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
- "\end{thebibliography}" write$ newline$
+ "\end{mcitethebibliography}" write$ newline$
}
EXECUTE {end.bib}
-%%
-%%
-%% End of file `angew.bst'.