summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/achemso/achemso.bst
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/achemso/achemso.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/achemso/achemso.bst321
1 files changed, 204 insertions, 117 deletions
diff --git a/Master/texmf-dist/bibtex/bst/achemso/achemso.bst b/Master/texmf-dist/bibtex/bst/achemso/achemso.bst
index 6ce62d149af..7aecc54d70e 100644
--- a/Master/texmf-dist/bibtex/bst/achemso/achemso.bst
+++ b/Master/texmf-dist/bibtex/bst/achemso/achemso.bst
@@ -21,6 +21,7 @@ ENTRY
chapter
ctrl-use-title
ctrl-etal-number
+ ctrl-etal-truncate
doi
edition
editor
@@ -47,88 +48,113 @@ ENTRY
short.list
}
-INTEGERS { output.state before.all mid.sentence after.sentence }
-INTEGERS { after.block after.item author.or.editor }
-INTEGERS { separate.by.semicolon }
-INTEGERS { is.use.title etal.number }
+INTEGERS {
+ before.all
+ mid.sentence
+ after.sentence
+ after.block
+ after.item
+}
-FUNCTION {init.state.consts}
-{ #0 'before.all :=
+FUNCTION { init.state.consts } {
+ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
#4 'after.item :=
}
-%% #0 turns off the display of the title for articles
-%% #1 enables
-FUNCTION {default.is.use.title} { #0 }
+%% For true/false settings, #1 is regarded as true and #0 as false.
+INTEGERS {
+ etal.number
+ etal.truncate
+ is.use.title
+}
+
+FUNCTION { default.etal.number } { #15 }
+
+FUNCTION { default.etal.truncate } { #0 }
-%% The number of names that force "et al." to be used
-FUNCTION {default.etal.number} { #15 }
+FUNCTION { default.is.use.title } { #0 }
-FUNCTION {add.comma}
-{ ", " * }
+FUNCTION { add.comma } { ", " * }
+
+FUNCTION { add.colon } { ": " * }
+
+FUNCTION { add.semicolon } { "; " * }
+
+INTEGERS { separate.by.semicolon }
-FUNCTION {add.semicolon}
-{ "; " * }
+FUNCTION { init.separate.by.semicolon }
+ { #1 'separate.by.semicolon := }
-FUNCTION {add.comma.or.semicolon}
-{ #1 separate.by.semicolon =
- 'add.semicolon
- 'add.comma
+FUNCTION { add.comma.or.semicolon } {
+ #1 separate.by.semicolon = {
+ add.semicolon
+ }{
+ add.comma
+ }
if$
}
-FUNCTION {add.colon}
-{ ": " * }
-
STRINGS { s t }
-FUNCTION {output.nonnull}
-{ 's :=
- output.state mid.sentence =
- { add.comma write$ }
- { output.state after.block =
- { add.semicolon write$
- newline$
- "\newblock " write$
- }
- { output.state before.all =
- 'write$
- { output.state after.item =
- { " " * write$ }
- { add.period$ " " * write$ }
- if$
- }
- if$
+INTEGERS { output.state }
+
+FUNCTION { output.nonnull } {
+ 's :=
+ output.state mid.sentence = {
+ add.comma write$
+ }{
+ output.state after.block = {
+ add.semicolon write$
+ newline$
+ "\newblock " write$
+ }{
+ output.state before.all = {
+ write$
+ }{
+ output.state after.item = {
+ " " * write$
+ }{
+ add.period$ " " * write$
}
+ if$
+ }
if$
- mid.sentence 'output.state :=
}
+ if$
+ mid.sentence 'output.state :=
+ }
if$
s
}
-FUNCTION {output}
-{ duplicate$ empty$
- 'pop$
- 'output.nonnull
+FUNCTION { output } {
+ duplicate$ empty$ {
+ pop$
+ }{
+ output.nonnull
+ }
if$
}
-FUNCTION {output.check}
-{ 't :=
- duplicate$ empty$
- { pop$ "Empty " t * " in " * cite$ * warning$ }
- 'output.nonnull
+FUNCTION { output.check } {
+ 't :=
+ duplicate$ empty$ {
+ pop$ "Empty " t * " in " * cite$ * warning$
+ }{
+ output.nonnull
+ }
if$
}
-FUNCTION {new.block}
-{ output.state before.all =
- 'skip$
- { after.block 'output.state := }
+FUNCTION { new.block } {
+ output.state before.all = {
+ skip$
+ }{
+ after.block 'output.state :=
+ }
if$
}
@@ -143,7 +169,7 @@ FUNCTION {new.sentence}
if$
}
-INTEGERS {would.add.period.textlen}
+INTEGERS { would.add.period.textlen }
FUNCTION {would.add.period}
{ duplicate$
@@ -472,44 +498,78 @@ FUNCTION {tie.or.space.connect}
FUNCTION {space.connect}
{ " " swap$ * * }
-INTEGERS { nameptr namesleft numnames }
+INTEGERS {
+ current.name
+ remaining.names
+ total.names
+}
-FUNCTION {format.names}
-{ 's :=
- #1 'nameptr :=
- s num.names$ 'numnames :=
- numnames 'namesleft :=
- numnames etal.number > etal.number #0 > and
- { s #1 "{vv~}{ll,}{~f.}{,~jj}" format.name$ 't :=
- t bbl.etal space.connect
+STRINGS {
+ formatted.name
+ names.list
+}
+
+FUNCTION { format.names.loop } {
+ { remaining.names #0 > } {
+ names.list current.name "{vv~}{ll,}{~f.}{,~jj}" format.name$
+ 'formatted.name :=
+ current.name #1 > {
+ formatted.name "others," = {
+ bbl.etal space.connect
+ remaining.names #1 'remaining.names :=
+ }{
+ add.comma.or.semicolon formatted.name *
+ }
+ if$
+ }{
+ formatted.name
}
- {
- { namesleft #0 > }
- { s nameptr "{vv~}{ll,}{~f.}{,~jj}" format.name$ 't :=
- nameptr #1 >
- { namesleft #1 >
- { add.comma.or.semicolon t * }
- { numnames #2 >
- { "" * }
- 'skip$
- if$
- t "others," =
- { bbl.etal space.connect }
- { add.comma.or.semicolon t * }
- if$
- }
- if$
- }
- 't
- if$
- nameptr #1 + 'nameptr :=
- namesleft #1 - 'namesleft :=
- }
- while$
+ if$
+ current.name #1 + 'current.name :=
+ remaining.names #1 - 'remaining.names :=
+ }
+ while$
+}
+
+FUNCTION { format.names.all } {
+ total.names 'remaining.names :=
+ format.names.loop
+}
+
+FUNCTION { format.names.etal } {
+ etal.truncate #1 = {
+ etal.number 'remaining.names :=
+ }{
+ #1 'remaining.names :=
+ }
+ if$
+ format.names.loop
+ formatted.name "others," = {
+ }{
+ bbl.etal space.connect
}
if$
}
+FUNCTION { format.names } {
+ 'names.list :=
+ #1 'current.name :=
+ names.list num.names$ 'total.names :=
+ etal.number #0 = {
+ format.names.all
+ }{
+ total.names etal.number > {
+ format.names.etal
+ }{
+ format.names.all
+ }
+ if$
+ }
+ if$
+}
+
+INTEGERS { author.or.editor }
+
FUNCTION {format.authors}
{ author empty$
{ "" }
@@ -536,6 +596,8 @@ FUNCTION {format.editors}
if$
}
+INTEGERS { nameptr numnames namesleft }
+
FUNCTION {n.separate.multi}
{ 't :=
""
@@ -1247,20 +1309,33 @@ FUNCTION {yes.no.to.int}
%% Using the same mechanism as in IEEEtrans, control of
%% output can be achieved using a special entry type.
-FUNCTION {Control}
-{ ctrl-use-title
- empty$
- { skip$ }
- { ctrl-use-title
- yes.no.to.int
- 'is.use.title := }
+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 := }
+ empty$ {
+ skip$
+ }{
+ ctrl-etal-number
+ str.to.int
+ 'etal.number :=
+ }
+ if$
+ ctrl-etal-truncate
+ empty$ {
+ skip$
+ }{
+ ctrl-etal-truncate
+ yes.no.to.int
+ 'etal.truncate :=
+ }
if$
}
@@ -1433,8 +1508,8 @@ FUNCTION {calc.short.authors}
'short.list :=
}
-FUNCTION {calc.label}
-{ calc.short.authors
+FUNCTION { calc.label } {
+ calc.short.authors
short.list
"("
*
@@ -1447,14 +1522,22 @@ FUNCTION {calc.label}
'label :=
}
-ITERATE {calc.label}
+ITERATE { calc.label }
-STRINGS { longest.label last.label next.extra }
+STRINGS {
+ longest.label
+ last.label
+ next.extra
+}
-INTEGERS { longest.label.width last.extra.num number.label }
+INTEGERS {
+ longest.label.width
+ last.extra.num
+ number.label
+}
-FUNCTION {initialize.longest.label}
-{ "" 'longest.label :=
+FUNCTION { initialize.longest.label } {
+ "" 'longest.label :=
#0 int.to.chr$ 'last.label :=
"" 'next.extra :=
#0 'longest.label.width :=
@@ -1475,14 +1558,16 @@ FUNCTION {forward.pass}
number.label #1 + 'number.label :=
}
-EXECUTE {initialize.longest.label}
+EXECUTE { initialize.longest.label }
-ITERATE {forward.pass}
+ITERATE { forward.pass }
-FUNCTION {begin.bib}
-{ preamble$ empty$
- 'skip$
- { preamble$ write$ newline$ }
+FUNCTION { begin.bib } {
+ preamble$ empty$ {
+ skip$
+ }{
+ preamble$ write$ newline$
+ }
if$
"\providecommand*{\mcitethebibliography}{\thebibliography}"
write$ newline$
@@ -1522,18 +1607,20 @@ FUNCTION {begin.bib}
write$ newline$
}
-EXECUTE {begin.bib}
+EXECUTE { begin.bib }
-EXECUTE {init.state.consts}
+EXECUTE { init.state.consts }
-ITERATE {call.type$}
+EXECUTE { init.separate.by.semicolon }
-FUNCTION {end.bib}
-{ newline$
+ITERATE { call.type$ }
+
+FUNCTION { end.bib } {
+ newline$
"\end{mcitethebibliography}" write$ newline$
}
-EXECUTE {end.bib}
+EXECUTE { end.bib }
%%
%% Originally developed by Mats Dahlgren
%% Copyright (C) 1996-1998 by Mats Dahlgren