summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/bibtex/bst/iopart-num
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-26 22:58:14 +0000
committerKarl Berry <karl@freefriends.org>2006-12-26 22:58:14 +0000
commit3c0f8633c92bdac2228b07e937ded1ad20c654c9 (patch)
treef7bae4c15084420e0e88e774bf8874f34a3aeebd /Master/texmf-dist/bibtex/bst/iopart-num
parent4caf9036e5da2d823e0d3910e77b58584e234349 (diff)
iopart-num update
git-svn-id: svn://tug.org/texlive/trunk@2946 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/bibtex/bst/iopart-num')
-rwxr-xr-xMaster/texmf-dist/bibtex/bst/iopart-num/iopart-num.bst415
1 files changed, 291 insertions, 124 deletions
diff --git a/Master/texmf-dist/bibtex/bst/iopart-num/iopart-num.bst b/Master/texmf-dist/bibtex/bst/iopart-num/iopart-num.bst
index a88722c32b6..4a4fd9d1987 100755
--- a/Master/texmf-dist/bibtex/bst/iopart-num/iopart-num.bst
+++ b/Master/texmf-dist/bibtex/bst/iopart-num/iopart-num.bst
@@ -1,43 +1,42 @@
% iopart-num.bst -- BibTeX style for IOP journals (Harvard-like numeric style)
%
-% M. A. Caprio, Yale University
-% July 11, 2005
-% Version 1.0
-%
% DESCRIPTION
%
-% The formatting implemented is based upon the specification
-% "Preparing an article for publication in an Institute
-% of Physics Publishing journal using LaTeX2e", by Neil Scriven
-% and Romneya Robertson.
-%
-% INSTRUCTIONS
-%
-% If natbib is *not* used, under the iopart document class the
-% biblography section should be started with \section*{References}.
+% Further documenation may be found in iopart-num.pdf.
%
-% If natbib *is* used, it should be loaded with the option "square"
-% to produce citations in square brackets, e.g.,
-% \usepackage[square,sort&compress]{natbib}.
+% Available from CTAN as /biblio/bibtex/contrib/iopart-num.
%
-% TECHNICAL NOTES
+% HISTORY
%
-% Created using custom-bib, with following manual modifications:
+% Version 1.0 (2005/07/11)
+% Created using custom-bib (merlin.mbs), with following manual modifications:
% -- remove trailing period from predefined volume, page, etc., abbreviations
% -- provide command \newblock to fix incompatibility between natbib
-% and iopart (1996/06/10)
+% and iopart (as of iopart version 1996/06/10)
% -- move edition after booktitle
% -- add version identifier to generated output
% -- for incollection and inproceedings, move volume from after publisher to before
% -- for any series with number, number after series
+% Version 2.0 (2006/12/21)
+% -- define section field for proper formatting of lettered journal sections
+% (as requested by Chris Latham)
+% -- suppress printing of number for article, but provide issue field
+% for periodicals with issue-based page numbering (suggested by Chris Latham)
+% -- patch remove.dots to not strip "\." control sequence (bug reported by Kevin Bube)
+% -- define epilog field (undocumented)
+% -- delete predefined computer science journal names
+% -- bring book volume+number or series+number formatting into IOP form
+% -- for book, inbook, and proceedings with editors but no author, fix formating of editors
+% -- for incollection and inproceedings, put editors in correct location
+% -- for journal: use same page formatting even if volume missing
%
-% COMMENTS ON CONFORMANCE TO IOP STYLE
-%
-% -- If journal section letters are to be typeset upright, this must be done
-% manually in the database entry.
-% -- The e-print number (specified as eprint) is typeset parenthetically at
-% end of an entry (as currently encountered in J. Phys.) rather than as a
-% separate entry (as described in the Scriven and Robertson specification).
+% LIMITATIONS
+%
+% Still not in IOP form:
+% -- for incollection and inproceedings, editors initials should preceed rather
+% than follow last name
+% -- of the two semantically different formatting for a book in a multivolume work,
+% only "title (series volume)" formatting is supported, not "series volume title"
%% This is file `iopart-num.bst',
%% generated with the docstrip utility.
@@ -107,9 +106,118 @@ ENTRY
url
volume
year
+%mc
+ issue
+ section
+ epilog
}
{}
{ label }
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% mc utilities
+% require merlin.mbs logical operators and field.or.null
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% hang -- {hang} suspends execution, for debugging purposes
+% Note that not all pending output may have been flushed.
+FUNCTION {hang}
+{
+ {#1} {skip$} while$
+}
+
+% string.length -- {s string.length} returns the true character length of s
+% In contrast, text.length$ gives special treatment to LaTeX
+% accents ("special characters") and braces.
+% Example: "" string.length -> 0
+% Example: "hello" string.length -> 5
+
+STRINGS {string.length.s }
+INTEGERS {string.length.i }
+FUNCTION {string.length}
+{
+ 'string.length.s :=
+ #0 'string.length.i :=
+ {
+ string.length.s #1 #1 substring$ "" = not
+ }
+ {
+ string.length.i #1 + 'string.length.i :=
+ string.length.s #2 global.max$ substring$ 'string.length.s :=
+ }
+ while$
+ string.length.i
+}
+
+% shared working variables for stripping functions
+STRINGS { strip.s strip.t }
+INTEGERS { strip.i }
+
+% strip.leading -- {s t strip.leading} strips t from s if it appears
+% as an initial substring
+% Example: "abcdef" "abc" strip.leading -> "def"
+% Example: "abcdef" "xyz" strip.leading -> "abcdef"
+
+FUNCTION{strip.leading}
+{
+ 'strip.t :=
+ 'strip.s :=
+ strip.t string.length 'strip.i :=
+ strip.s #1 strip.i substring$ strip.t =
+ { strip.s strip.i #1 + global.max$ substring$ }
+ { strip.s }
+ if$
+}
+
+% strip.trailing -- {s t strip.trailing} strips t from s if it appears
+% as a terminal substring
+% Example: "abcdef" "def" strip.trailing -> "abc"
+% Example: "abcdef" "xyz" strip.trailing -> "abcdef"
+FUNCTION{strip.trailing}
+{
+ 'strip.t :=
+ 'strip.s :=
+ strip.t string.length 'strip.i :=
+ strip.s #-1 strip.i substring$ strip.t =
+ { strip.s #-1 strip.i - global.max$ substring$ }
+ { strip.s }
+ if$
+}
+
+% trim -- {s trim} strips any trailing whitespace from s
+% Example: "abcdef " trim -> "abcdef"
+STRINGS {trim.s trim.t}
+FUNCTION{trim}
+{
+ 'trim.s :=
+ {
+ trim.s #-1 #1 substring$ 'trim.t :=
+ trim.t empty$ trim.t string.length #0 > and
+ }
+ { trim.s #-2 global.max$ substring$ 'trim.s := }
+ while$
+ trim.s
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
@@ -118,6 +226,7 @@ FUNCTION {init.state.consts}
#3 'after.block :=
}
STRINGS { s t}
+
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
@@ -151,8 +260,23 @@ FUNCTION {output.check}
'output.nonnull
if$
}
+
+%mc
+FUNCTION {format.epilog}
+{ epilog duplicate$ empty$
+ { pop$ }
+ { * }
+ if$
+}
+%mc end
+
+
FUNCTION {fin.entry}
-{ duplicate$ empty$
+{
+%mc
+format.epilog
+%mc end
+ duplicate$ empty$
'pop$
'write$
if$
@@ -184,31 +308,29 @@ FUNCTION {date.block}
add.blank
}
-FUNCTION {not}
-{ { #0 }
- { #1 }
- if$
-}
-FUNCTION {and}
-{ 'skip$
- { pop$ #0 }
- if$
-}
-FUNCTION {or}
-{ { pop$ #1 }
- 'skip$
- if$
-}
STRINGS {z}
FUNCTION {remove.dots}
{ 'z :=
""
{ z empty$ not }
- { z #1 #1 substring$
- z #2 global.max$ substring$ 'z :=
- duplicate$ "." = 'pop$
- { * }
+ {
+%mc patch to preserve the control sequence \. if it appears in a name
+ z #1 #2 substring$ "\." =
+ {
+ % process "\." sequence
+ z #3 global.max$ substring$ 'z :=
+ "\." *
+ }
+ {
+ % process regular character
+ z #1 #1 substring$
+ z #2 global.max$ substring$ 'z :=
+ duplicate$ "." = 'pop$
+ { * }
+ if$
+ }
if$
+%mc
}
while$
}
@@ -400,47 +522,6 @@ FUNCTION {eng.ord}
if$
}
-MACRO {acmcs} {"ACM Comput. Surv."}
-
-MACRO {acta} {"Acta Inf."}
-
-MACRO {cacm} {"Commun. ACM"}
-
-MACRO {ibmjrd} {"IBM J. Res. Dev."}
-
-MACRO {ibmsj} {"IBM Syst.~J."}
-
-MACRO {ieeese} {"IEEE Trans. Software Eng."}
-
-MACRO {ieeetc} {"IEEE Trans. Comput."}
-
-MACRO {ieeetcad}
- {"IEEE Trans. Comput. Aid. Des."}
-
-MACRO {ipl} {"Inf. Process. Lett."}
-
-MACRO {jacm} {"J.~ACM"}
-
-MACRO {jcss} {"J.~Comput. Syst. Sci."}
-
-MACRO {scp} {"Sci. Comput. Program."}
-
-MACRO {sicomp} {"SIAM J. Comput."}
-
-MACRO {tocs} {"ACM Trans. Comput. Syst."}
-
-MACRO {tods} {"ACM Trans. Database Syst."}
-
-MACRO {tog} {"ACM Trans. Graphic."}
-
-MACRO {toms} {"ACM Trans. Math. Software"}
-
-MACRO {toois} {"ACM Trans. Office Inf. Syst."}
-
-MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
-
-MACRO {tcs} {"Theor. Comput. Sci."}
-
FUNCTION {bibinfo.check}
{ swap$
duplicate$ missing$
@@ -625,13 +706,32 @@ FUNCTION {get.bbl.editor}
FUNCTION {format.editors}
{ editor "editor" format.names duplicate$ empty$ 'skip$
{
- "," *
+%% "," *
+%% " " *
+%% get.bbl.editor
+%% *
+%mc
" " *
+ "(" *
get.bbl.editor
*
+ ")" *
+%mc end
}
if$
}
+%mc
+FUNCTION {format.editors.inline}
+{ editor "editor" format.names duplicate$ empty$ 'skip$
+ {
+ bbl.editor " " *
+ swap$
+ *
+ }
+ if$
+}
+%mc end
+
FUNCTION {format.isbn}
{ isbn "isbn" bibinfo.check
duplicate$ empty$ 'skip$
@@ -761,15 +861,31 @@ FUNCTION {either.or.check}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
- { bbl.volume volume tie.or.space.prefix
- "volume" bibinfo.check * *
+%% { bbl.volume volume tie.or.space.prefix
+%% "volume" bibinfo.check * *
+%% series "series" bibinfo.check
+%% duplicate$ empty$ 'pop$
+%% { swap$ bbl.of space.word * swap$
+%% emphasize * }
+%% if$
+%% "volume and number" number either.or.check
+%% }
+%mc
+ {
series "series" bibinfo.check
- duplicate$ empty$ 'pop$
- { swap$ bbl.of space.word * swap$
- emphasize * }
+ empty$
+ {bbl.volume volume tie.or.space.prefix "volume" bibinfo.check * *}
+ {
+ "("
+ series "series" bibinfo.check emphasize *
+ " " * bbl.volume *
+ volume tie.or.space.prefix "volume" bibinfo.check *
+ ")" * *
+ }
if$
"volume and number" number either.or.check
}
+%mc end
if$
}
FUNCTION {format.number.series}
@@ -786,9 +902,16 @@ FUNCTION {format.number.series}
%% number tie.or.space.prefix "number" bibinfo.check * *
%% bbl.in space.word *
%% series "series" bibinfo.check *
- series "series" bibinfo.check
+ %% " " * bbl.number *
+ %% number tie.or.space.prefix "number" bibinfo.check * *
+%mc
+ "("
+ series "series" bibinfo.check emphasize *
" " * bbl.number *
- number tie.or.space.prefix "number" bibinfo.check * *
+ number tie.or.space.prefix "number" bibinfo.check *
+ ")" *
+ *
+%mc end
}
if$
}
@@ -904,16 +1027,23 @@ FUNCTION {format.pages}
}
FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
- { swap$ duplicate$ empty$
- { pop$ pop$ format.pages }
- {
+%mc { swap$ duplicate$ empty$
+%mc { pop$ pop$ format.pages }
+%mc {
+%mc " " *
+%mc swap$
+%mc n.dashify
+%mc "pages" bibinfo.check
+%mc *
+%mc }
+%mc if$
+%mc }
+ { swap$
" " *
swap$
n.dashify
"pages" bibinfo.check
*
- }
- if$
}
if$
}
@@ -937,16 +1067,22 @@ FUNCTION {format.journal.eid}
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
+%mc section handling
+ section field.or.null strip.leading
+ section field.or.null strip.trailing trim
+%mc end
duplicate$ empty$ 'skip$
{
"volume" bibinfo.check
}
if$
bolden
- number "number" bibinfo.check duplicate$ empty$ 'skip$
+%mc number "number" bibinfo.check duplicate$ empty$ 'skip$
+ issue "issue" bibinfo.check duplicate$ empty$ 'skip$
{
swap$ duplicate$ empty$
- { "there's a number but no volume in " cite$ * warning$ }
+%mc { "there's a number but no volume in " cite$ * warning$ }
+ { "there's an issue but no volume in " cite$ * warning$ }
'skip$
if$
swap$
@@ -984,22 +1120,22 @@ FUNCTION {format.booktitle}
booktitle "booktitle" bibinfo.check
emphasize
}
-FUNCTION {format.in.ed.booktitle}
-{ format.booktitle duplicate$ empty$ 'skip$
- {
- editor "editor" format.names.ed duplicate$ empty$ 'pop$
- {
- "," *
- " " *
- get.bbl.editor
- ", " *
- * swap$
- * }
- if$
- word.in swap$ *
- }
- if$
-}
+%% FUNCTION {format.in.ed.booktitle}
+%% { format.booktitle duplicate$ empty$ 'skip$
+%% {
+%% editor "editor" format.names.ed duplicate$ empty$ 'pop$
+%% {
+%% "," *
+%% " " *
+%% get.bbl.editor
+%% ", " *
+%% * swap$
+%% * }
+%% if$
+%% word.in swap$ *
+%% }
+%% if$
+%% }
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
month empty$ year empty$ note empty$
@@ -1073,6 +1209,7 @@ FUNCTION {format.crossref.editor}
}
if$
}
+
FUNCTION {format.book.crossref}
{ volume duplicate$ empty$
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
@@ -1150,6 +1287,8 @@ FUNCTION {format.organization.address}
{ organization "organization" bibinfo.check format.org.or.pub
}
+
+
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
@@ -1157,11 +1296,23 @@ FUNCTION {article}
date.block
crossref missing$
{
+%mc add section handling
+%mc journal
+%mc "journal" bibinfo.check
+%mc emphasize
+%mc "journal" output.check
+%mc add.blank
journal
"journal" bibinfo.check
+ section field.or.null strip.trailing trim
emphasize
"journal" output.check
add.blank
+ section empty$
+ { skip$ }
+ { section * add.blank}
+ if$
+%mc end
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
@@ -1266,11 +1417,17 @@ FUNCTION {incollection}
format.date "year" output.check
date.block
crossref missing$
- { format.in.ed.booktitle "booktitle" output.check
+ {
+ %% format.in.ed.booktitle "booktitle" output.check
+%mc
+ format.booktitle "booktitle" output.check
format.bvolume output
+ format.number.series output
+ format.editors.inline output
+%mc end
format.publisher.address output
%% format.bvolume output
- format.number.series output
+ %% format.number.series output
format.chapter.pages output
format.edition output
format.isbn output
@@ -1290,15 +1447,23 @@ FUNCTION {inproceedings}
format.date "year" output.check
date.block
crossref missing$
- { format.in.ed.booktitle "booktitle" output.check
+ {
+
+ %%format.in.ed.booktitle "booktitle" output.check
+%mc
+ format.booktitle "booktitle" output.check
+ format.bvolume output
+ format.number.series output
+ format.editors.inline output
+%mc end
publisher empty$
{ format.organization.address output }
{ organization "organization" bibinfo.check output
format.publisher.address output
}
if$
- format.bvolume output
- format.number.series output
+ %% format.bvolume output
+ %% format.number.series output
format.pages output
format.isbn output
format.issn output
@@ -1496,7 +1661,9 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\eprint}[2][]{\url{#2}}"
write$ newline$
- "% Bibliography created with iopart-num.bst, v1.0"
+ "% Bibliography created with iopart-num v2.0"
+ write$ newline$
+ "% /biblio/bibtex/contrib/iopart-num"
write$ newline$
}
EXECUTE {begin.bib}