summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/rsc/rsc.bst
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/rsc/rsc.bst')
-rw-r--r--Master/texmf-dist/bibtex/bst/rsc/rsc.bst356
1 files changed, 320 insertions, 36 deletions
diff --git a/Master/texmf-dist/bibtex/bst/rsc/rsc.bst b/Master/texmf-dist/bibtex/bst/rsc/rsc.bst
index 25d816ea9b8..856d6a976c2 100644
--- a/Master/texmf-dist/bibtex/bst/rsc/rsc.bst
+++ b/Master/texmf-dist/bibtex/bst/rsc/rsc.bst
@@ -1,50 +1,56 @@
% ----------------------------------------------------------------
% BibTeX bibliography style `rsc' for Dalton Trans.,
-% Org. Biomol. Chem., etc.
+% Org. Biomol. Chem., Chem. Commun., Phys. Chem. Chem. Phys., etc.
% ----------------------------------------------------------------
%
% ----------------------------------------------------------------
% Maintained by Joseph A. Wright
% E-mail: joseph.wright@morningstar2.co.uk
+% Released under the GNU General Public License
+% See http://www.gnu.org/licenses/gpl.txt
% ----------------------------------------------------------------
% ----------------------------------------------------------------
% History
+% 2006-10-30 Improvements to patent number handling; automatic
+% digit grouping. Patent assignee recognised from
+% organization field. Added support for non-standard
+% types as in achemso.bst
+% 2006-10-22 Added converters for edition numbers (to change
+% 1 to 1st, 2 to 2nd, etc.) from custom-bib
+% package.
% 2006-06-27 Substantial improvements to output consistency
-% with RSC style requirements
+% with RSC style requirements.
% Improved support for unpublished works, in press
% and so on.
% ----------------------------------------------------------------
%
% ----------------------------------------------------------------
-% Usage notes
-% 1) Patents. Patents can be saves as type 'patent' or 'other'
+% Usage notes:
+% 1) Other than the 'article' reference type, the RSC publication
+% rules give only limited guidance. I have therefore had to
+% look at a number of real-world examples, and pick the useage
+% I am happiest with. So of the layout is therefore more of
+% a personal preference than anything else.
+% 2) Patents. Patents can be saves as type 'patent' or 'other'
% Fill in as for article, and the correct formatting will
% result (Authors, "Journal", Year). Any other use of 'other'
-% will give the same result.
-% 2) Unpublished. If a journal is given (for example, for
+% will give the same result. Patent numbers are automatically
+% digit-grouped if they are purely made up of digits. Assignee
+% is given in the organization field.
+% 3) Unpublished. If a journal is given (for example, for
% submitted or in press articles), then this will be printed.
% Use the 'note' field for the status of the references
% (personal communication, in press, etc.)
-% 3) In press articles with DOI. If unpublished articles have
+% 4) In press articles with DOI. If unpublished articles have
% a DOI given, this will be given in the output, with
% the year added as well. In this case, no 'note' is added
-% 4) Miscellaneous (e.g. software). Use the 'howpublished' field
-% for organisation,address etc.
-% ----------------------------------------------------------------
-%
-% ----------------------------------------------------------------
-% Based on original file from BibTeX distribution. Notice from
-% that file is reproduced below:
-% ----------------------------------------------------------------
-% version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
-% Copyright (C) 1985, all rights reserved.
-% Copying of this file is authorized only if either
-% (1) you make absolutely no changes to your copy, including name, or
-% (2) if you do make changes, you name it something other than
-% btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
-% This restriction helps ensure that all standard styles are identical.
-% The file btxbst.doc has the documentation for this style.
+% 5) Miscellaneous (e.g. software). Use the 'howpublished' field
+% for organisation, address etc.
+% 6) The non-standard types remark, inpress and submitted are
+% supported for compatibility with achemso.bst. Note that they
+% are implemented to act in the same way as the rest of this
+% style.
% ----------------------------------------------------------------
ENTRY
@@ -273,6 +279,127 @@ FUNCTION {paren}
if$
}
+% Some functions taken from custombib.tex
+FUNCTION {bbl.first}
+{ "1st" }
+
+FUNCTION {bbl.second}
+{ "2nd" }
+
+FUNCTION {bbl.third}
+{ "3rd" }
+
+FUNCTION {bbl.fourth}
+{ "4th" }
+
+FUNCTION {bbl.fifth}
+{ "5th" }
+
+FUNCTION {bbl.st}
+{ "st" }
+
+FUNCTION {bbl.nd}
+{ "nd" }
+
+FUNCTION {bbl.rd}
+{ "rd" }
+
+FUNCTION {bbl.th}
+{ "th" }
+
+FUNCTION {eng.ord}
+{ duplicate$ "1" swap$ *
+ #-2 #1 substring$ "1" =
+ { bbl.th * }
+ { duplicate$ #-1 #1 substring$
+ duplicate$ "1" =
+ { pop$ bbl.st * }
+ { duplicate$ "2" =
+ { pop$ bbl.nd * }
+ { "3" =
+ { bbl.rd * }
+ { bbl.th * }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$
+ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {bibinfo.check}
+{ swap$
+ duplicate$ missing$
+ {
+ pop$ pop$
+ ""
+ }
+ { duplicate$ empty$
+ {
+ swap$ pop$
+ }
+ { swap$
+ pop$
+ }
+ if$
+ }
+ if$
+}
+
+FUNCTION {convert.edition}
+{ extract.num "l" change.case$ 's :=
+ s "first" = s "1" = or
+ { bbl.first 't := }
+ { s "second" = s "2" = or
+ { bbl.second 't := }
+ { s "third" = s "3" = or
+ { bbl.third 't := }
+ { s "fourth" = s "4" = or
+ { bbl.fourth 't := }
+ { s "fifth" = s "5" = or
+ { bbl.fifth 't := }
+ { s #1 #1 substring$ is.num
+ { s eng.ord 't := }
+ { edition 't := }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ }
+ if$
+ t
+}
+
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
@@ -325,6 +452,117 @@ FUNCTION {format.editors}
if$
}
+INTEGERS { a b }
+
+FUNCTION {mult}
+{
+ 'a := %% we store the first value
+ 'b := %% we store the second value
+
+ b #0 < %% We remember the sign of b, and
+ {#-1 #0 b - 'b :=} %% then consider its absolute value.
+ {#1} %%
+ if$ %%
+
+ #0 %% Put 0 on the stack.
+ {b #0 >} %% While b is strictly positive,
+ { %% we add a to the value on the stack
+ a + %% and decrement b.
+ b #1 - 'b := %%
+ } %%
+ while$ %%
+
+ swap$ %% Last, we take the opposite
+ 'skip$ %% if b was negative.
+ {#0 swap$ -} %%
+ if$ %%
+}
+
+FUNCTION {chr.to.value.silent} %% The ASCII code of a character
+{
+ chr.to.int$ #48 - %% ASCII value of "0" -> 48
+ duplicate$ duplicate$ %% "1" -> 49
+ #0 < swap$ #9 > or %% ...
+ { pop$ pop$ "0" #0 }
+ {}
+ if$
+}
+
+FUNCTION {str.to.int.aux.silent} %% The auxiliary function
+{
+ {duplicate$ empty$ not} %% While the string is not empty
+ { %% consider its first char
+ swap$ #10 mult 'a := %% and ``add'' it at the end of
+ duplicate$ #1 #1 substring$ %% the result.
+ chr.to.value.silent a +
+ swap$
+ #2 global.max$ substring$
+ }
+ while$
+ pop$
+}
+
+FUNCTION {str.to.int.silent}
+{ %% Handling negative values
+ duplicate$ #1 #1 substring$ "-" =
+ {#1 swap$ #2 global.max$ substring$}
+ {#0 swap$}
+ if$
+ %% Initialization, and then
+ #0 swap$ str.to.int.aux.silent %% call to the aux. funtion
+ swap$
+ {#0 swap$ -} %% And handle the sign.
+ {}
+ if$
+}
+
+% Two functions from Nicolas Markey
+
+FUNCTION{is.a.digit}
+{
+ duplicate$ "" =
+ {pop$ #0}
+ {chr.to.int$ #48 - duplicate$
+ #0 < swap$ #9 > or not}
+ if$
+}
+
+FUNCTION{is.a.number}
+{
+ {duplicate$ #1 #1 substring$ is.a.digit }
+ {#2 global.max$ substring$}
+ while$
+ "" =
+}
+
+FUNCTION {n.separate.multi}
+{ 't :=
+ ""
+ #0 'numnames :=
+ t text.length$ #4 > t is.a.number and % Test that t is both:
+ { % 1) a number
+ { t empty$ not } % 2) over four digits long
+ { t #-1 #1 substring$ is.num
+ { numnames #1 + 'numnames := }
+ { #0 'numnames := }
+ if$
+ t #-1 #1 substring$ swap$ *
+ t #-2 global.max$ substring$ 't :=
+ numnames #4 =
+ { duplicate$ #1 #1 substring$ swap$
+ #2 global.max$ substring$
+ "\," swap$ * *
+ #1 'numnames :=
+ }
+ 'skip$
+ if$
+ }
+ while$
+ }
+ { t swap$ * }
+ if$
+}
+
% Need a different format for books with editors
% than for editors in a collection
@@ -445,12 +683,15 @@ FUNCTION {format.number.series}
}
FUNCTION {format.edition}
-{ edition empty$
- { "" }
- { output.state mid.sentence =
- { edition "l" change.case$ " edn." * }
- { edition "t" change.case$ " edn." * }
- if$
+{ edition duplicate$ empty$ 'skip$
+ {
+ convert.edition
+ output.state mid.sentence =
+ { "l" }
+ { "t" }
+ if$ change.case$
+ "edn." bibinfo.check
+ " " * "edn." *
}
if$
}
@@ -499,6 +740,17 @@ FUNCTION {format.pages.nopp}
if$
}
+FUNCTION {format.pages.patent}
+{ pages empty$
+ { "there is no patent number for " cite$ * warning$ }
+ { pages multi.page.check
+ { pages n.dashify }
+ { pages n.separate.multi }
+ if$
+ }
+ if$
+}
+
FUNCTION {format.vol.num.pages}
{ volume boldface field.or.null
number empty$
@@ -640,11 +892,11 @@ FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
editor num.names$ duplicate$
#2 >
- { pop$ " et~al." * }
+ { pop$ " \emph{et~al.}" * }
{ #2 <
'skip$
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
- { " et~al." * }
+ { " \emph{et~al.}" * }
{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
if$
}
@@ -725,10 +977,15 @@ FUNCTION {article}
FUNCTION {patent}
{ output.bibitem
- format.authors "author" output.check
+ organization empty$
+ { format.authors "author" output.check }
+ { format.authors
+ " (" organization ")" * * *
+ "author" output.check
+ }
+ if$
journal emphasize "journal" output.check
- " "
- format.pages.nopp output
+ format.pages.patent "pages" output.check
format.date "year" output.check
fin.entry
}
@@ -890,7 +1147,7 @@ FUNCTION {manual}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
- "M.Sc.~thesis" format.thesis.type output.nonnull
+ "M.Sc.~thesis" emphasize format.thesis.type output.nonnull
school "school" output.check
address output
format.date "year" output.check
@@ -912,7 +1169,7 @@ FUNCTION {misc}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
- "Ph.D.~thesis" format.thesis.type output.nonnull
+ "Ph.D.~thesis" emphasize format.thesis.type output.nonnull
school "school" output.check
address output
format.date "year" output.check
@@ -981,6 +1238,33 @@ FUNCTION {unpublished}
fin.entry
}
+% The next three dunctions are taken from
+% achemso to provide compatiblity. They have
+% been modified to conform to the approach taken by
+% the rest of this style.
+
+FUNCTION { submitted }
+{ output.bibitem
+ format.authors "author" output.check
+ "submitted for publication in"
+ journal emphasize space.connect "journal" output.check
+ fin.entry
+}
+
+FUNCTION { inpress }
+{ output.bibitem
+ format.authors "author" output.check
+ journal emphasize "journal" output.check
+ "in press" output
+ fin.entry
+}
+
+FUNCTION { remark }
+{ output.bibitem
+ note "note" output.check
+ fin.entry
+}
+
FUNCTION {default.type} { misc }
MACRO {jan} {"January"}