2 %%% ====================================================================
\r
3 %%% @BibTeX-style-file{
\r
4 %%% author = "Nelson H. F. Beebe, Boris Veytsman and Gerald Murray",
\r
5 %%% version = "1.00",
\r
6 %%% date = "18 January 2012",
\r
7 %%% time = "11:48 EST",
\r
8 %%% filename = "ACM-Reference-Format-Journals.bst",
\r
9 %%% address = "University of Utah
\r
10 %%% Department of Mathematics, 110 LCB
\r
11 %%% 155 S 1400 E RM 233
\r
12 %%% Salt Lake City, UT 84112-0090
\r
14 %%% telephone = "+1 801 581 5254",
\r
15 %%% FAX = "+1 801 581 4148",
\r
16 %%% URL = "http://www.math.utah.edu/~beebe",
\r
17 %%% checksum = "available here: http://www.acm.org/publications/latex_style/CRC-journals.txt"
\r
18 %%% email = "beebe@math.utah.edu, beebe@acm.org,
\r
19 %%% beebe@computer.org, borisv@lk.net, murray@hq.acm.org",
\r
20 %%% codetable = "ISO/ASCII",
\r
21 %%% keywords = "ACM Transactions bibliography style; BibTeX",
\r
22 %%% license = "public domain",
\r
23 %%% supported = "yes",
\r
25 %%% docstring = "The checksum field, above, is produced by WinMD5Free (v1.20)
\r
26 %%% available from http://www.winmd5.com/?rid=winmd5,"
\r
28 %%% ====================================================================
\r
30 % "ACM Transactions" BibTeX style, ACM-Reference-Format-Journals.bst
\r
31 % for BibTeX version 0.99c, LaTeX version 3.141
\r
32 % ACM extensions with code cleaned up, extended, and debugged 10--15-Nov-2008
\r
33 % Revised 17-APRIL-2008 (Nelson)
\r
34 % Revised 13-MARCH-2011 (Boris/Gerry)
\r
35 % Revised 23-MARCH-2011 (Boris/Gerry)
\r
36 % Revised 27-MARCH-2011 (Boris/Gerry)
\r
37 % Revised 15-APRIL-2011 (Boris/Gerry)
\r
38 % Revised 27-SEPTEMBER-2011 (Boris)
\r
41 % History (by Nelson)
\r
43 % Based on 'acmtrans' (for ACM Journals)
\r
44 % Date: 28th April 2008
\r
46 % 1. Avoid 'repeating' the 'month' values.
\r
47 % 2. Avoid incorrectly italicizing the volume number.
\r
48 % 3. Avoid non italicizing certain titles (book, inproceedings etc).
\r
49 % 4. NO series if there is NO volume.
\r
50 % 5. Sorting of reference with first surname.
\r
51 % 6. Article no added for Inproceedings.
\r
53 % Date: 07th May 2008
\r
55 % 1. Abbreviation list added
\r
57 % Citation format: [author-last-name year]
\r
58 % [author-last-name and author-last-name year]
\r
59 % [author-last-name, author-last-name, and author-last-name year]
\r
60 % [author-last-name et al. year]
\r
61 % [author-last-name]
\r
62 % author-last-name [year]
\r
63 % [author-last-name and author-last-name]
\r
64 % [author-last-name et al.]
\r
65 % [year] or [year,year]
\r
68 % Reference list ordering: alphabetical by author or whatever passes
\r
69 % for author in the absence of one.
\r
71 % Features of the old acmtrans.bst:
\r
72 % =================================
\r
74 % - all authors appear last name first.
\r
75 % - all pages are listed xx-xx, (no pp.) and are at the end of the reference
\r
76 % - publishers are identified as publisher, address
\r
77 % - conferences papers (inproceedings) may give city of conference,
\r
78 % date of conference, and journal that the proceedings appear in.
\r
79 % - months abbreviated to max four letters (eg. Mar.)
\r
80 % - volume of a series indicated after the title of the series
\r
81 % - editors appear after edited title and are identified by a trailing "Eds."
\r
82 % not in parentheses. Editor names are not given in small caps.
\r
83 % (unless there is no author line)
\r
84 % - names terminated with a period even if there is no first name.
\r
85 % - editions are indicated trailing after the work, not in parentheses.
\r
86 % - "et al." citations have a protected period to avoid bad spacing (jrh)
\r
87 % - "address" required when publisher given
\r
88 % - series (roman) and volume are in a sentence separate from (book-)title
\r
91 % Features of chicago.bst:
\r
92 % =======================
\r
94 % - full names used in citations, but abbreviated citations are available
\r
96 % - if an entry has a "month", then the month and year are also printed
\r
97 % as part of that bibitem.
\r
98 % - all conjunctions use "and" instead of "\&"
\r
99 % - major modification from Chicago Manual of Style (13th ed.) is that
\r
100 % only the first author in a reference appears last name first-
\r
101 % additional authors appear as J. Q. Public.
\r
102 % - pages are listed as "pp. xx-xx" in all entry types except
\r
104 % - book, inbook, and manual use "location: publisher" (or organization)
\r
105 % for address and publisher. All other types list publishers separately.
\r
106 % - "pp." are used to identify page numbers for all entry types except
\r
108 % - organization is used as a citation label if neither author nor editor
\r
109 % is present (for manuals).
\r
110 % - "et al." is used for long author and editor lists, or when "others"
\r
113 % Modifications and bug fixes from newapa.bst:
\r
114 % ===========================================
\r
116 % - added month, year to bib entries if month is present
\r
117 % - fixed bug with In proceedings, added necessary comma after title
\r
118 % - all conjunctions changed to "and" from "\&"
\r
119 % - fixed bug with author labels in my.full.label: "et al." now is
\r
120 % generated when "others" is an author name
\r
121 % - major modification from Chicago Manual of Style (13th ed.) is that
\r
122 % only the first author in a reference appears last name first-
\r
123 % additional authors appear as J. Q. Public.
\r
124 % - pages are listed as "pp. xx-xx" in all entry types except
\r
125 % article entries. Unnecessary (IMHO) "()" around page numbers
\r
126 % were removed, and page numbers now don't end with a period.
\r
127 % - created chicago.sty for use with this bibstyle (required).
\r
128 % - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
\r
129 % number, and /or pages. Renamed to format.journal.volume.number.
\r
130 % - fixed bug in formatting booktitles: additional period an error if
\r
131 % book has a volume.
\r
132 % - fixed bug: editors usually given redundant period before next clause
\r
133 % (format.editors.dot) removed.
\r
134 % - added label support for organizations, if both author and editor
\r
135 % are missing (from alpha.bst). If organization is too long, then
\r
136 % the key field is used for abbreviated citations.
\r
137 % - In proceedings or books of several volumes, no comma was written
\r
138 % between the "Volume x" and the page numbers (this was intentional
\r
139 % in newapa.bst). Fixed.
\r
140 % - Some journals may not have volumes/numbers, only month/year (eg.
\r
141 % IEEE Computer). Fixed bug in article style that assumed volume/number
\r
142 % was always present.
\r
144 % Original documentation for newapa.sty:
\r
145 % =====================================
\r
147 % This version was made by modifying the master file made by
\r
148 % Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
\r
149 % style of Peter F. Patel-Schneider.
\r
151 % Copyright (C) 1985, all rights reserved.
\r
152 % Copying of this file is authorized only if either
\r
153 % (1) you make absolutely no changes to your copy, including name, or
\r
154 % (2) if you do make changes, you name it something other than 'newapa.bst'.
\r
155 % There are undoubtably bugs in this style. If you make bug fixes,
\r
156 % improvements, etc. please let me know. My e-mail address is:
\r
157 % spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
\r
159 % This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
\r
160 % with lots of tweaking to make it look like APA style, along with tips
\r
161 % from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
\r
164 % Start of ACM-Reference-Format-Journals.bst
\r
166 % Note: Many of the new bibentry 'fields' will only work with the
\r
167 % 'ACM-Reference-Format-Journals.bst' file. Legacy .bib files (which will, in all probability,
\r
168 % NOT contain these new fields) will _still_ work with the ACM-Reference-Format-Journals.bst.
\r
197 % New keys recognized
\r
198 issue % UTAH: used in, e.g., ACM SIGSAM Bulletin and ACM Communications in Computer Algebra
\r
200 day % UTAH: needed for newspapers, weeklies, bi-weeklies
\r
205 lastaccessed % UTAH: used only for @Misc{...}
\r
213 { label.year extra.label sort.year sort.label }
\r
215 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
\r
217 INTEGERS { show-isbn-10-and-13 } % initialized below in begin.bib
\r
219 INTEGERS { nameptr namesleft numnames }
\r
221 INTEGERS { multiresult }
\r
225 INTEGERS { last.extra.num }
\r
227 STRINGS { s t t.org u }
\r
229 STRINGS { last.label next.extra }
\r
231 STRINGS { p1 p2 p3 page.count }
\r
233 FUNCTION { dump.stack.1 }
\r
235 duplicate$ "STACK[top] = [" swap$ * "]" * warning$
\r
238 FUNCTION { dump.stack.2 }
\r
240 duplicate$ "STACK[top ] = [" swap$ * "]" * warning$
\r
242 duplicate$ "STACK[top-1] = [" swap$ * "]" * warning$
\r
246 FUNCTION { empty.or.unknown }
\r
248 %% Examine the top stack entry, and push 1 if it is empty, or
\r
249 %% consists only of whitespace, or is a string beginning with two
\r
250 %% queries (??), and otherwise, push 0.
\r
252 %% This function provides a replacement for empty$, with the
\r
253 %% convenient feature that unknown values marked by two leading
\r
254 %% queries are treated the same as missing values, and thus, do not
\r
255 %% appear in the output .bbl file, and yet, their presence in .bib
\r
256 %% file(s) serves to mark values which are temporarily missing, but
\r
257 %% are expected to be filled in eventually once more data is
\r
258 %% obtained. The TeX User Group and BibNet bibliography archives
\r
259 %% make extensive use of this practice.
\r
261 %% An empty string cannot serve the same purpose, because just as in
\r
262 %% statistics data processing, an unknown value is not the same as an
\r
265 %% At entry: stack = ... top:[string]
\r
266 %% At exit: stack = ... top:[0 or 1]
\r
270 { #1 #2 substring$ "??" = }
\r
274 FUNCTION { writeln }
\r
276 %% In BibTeX style files, the sequences
\r
278 %% ... "one" "two" output
\r
279 %% ... "one" "two" output.xxx
\r
281 %% ship "one" to the output file, possibly following by punctuation,
\r
282 %% leaving the stack with
\r
286 %% There is thus a one-string lag in output processing that must be
\r
287 %% carefully handled to avoid duplicating a string in the output
\r
288 %% file. Unless otherwise noted, all output.xxx functions leave
\r
289 %% just one new string on the stack, and that model should be born
\r
290 %% in mind when reading or writing function code.
\r
292 %% BibTeX's asynchronous buffering of output from strings from the
\r
293 %% stack is confusing because newline$ bypasses the buffer. It
\r
294 %% would have been so much easier for newline to be a character
\r
295 %% rather than a state of the output-in-progress.
\r
297 %% The documentation in btxhak.dvi is WRONG: it says
\r
299 %% newline$ Writes onto the bbl file what's accumulated in the
\r
300 %% output buffer. It writes a blank line if and only
\r
301 %% if the output buffer is empty. Since write$ does
\r
302 %% reasonable line breaking, you should use this
\r
303 %% function only when you want a blank line or an
\r
304 %% explicit line break.
\r
306 %% write$ Pops the top (string) literal and writes it on the
\r
307 %% output buffer (which will result in stuff being
\r
308 %% written onto the bbl file when the buffer fills
\r
311 %% Examination of the BibTeX source code shows that write$ does
\r
312 %% indeed behave as claimed, but newline$ sends a newline character
\r
313 %% directly to the output file, leaving the stack unchanged. The
\r
314 %% first line "Writes onto ... buffer." is therefore wrong.
\r
316 %% The original BibTeX style files almost always use "write$ newline$"
\r
317 %% in that order, so it makes sense to hide that pair in a private
\r
318 %% function like this one, named after a statement in Pascal,
\r
319 %% the programming language embedded in the BibTeX Web program.
\r
321 write$ % output top-of-stack string
\r
322 newline$ % immediate write of newline (not via stack)
\r
325 FUNCTION { init.state.consts }
\r
328 #1 'mid.sentence :=
\r
329 #2 'after.sentence :=
\r
333 FUNCTION { output.nonnull }
\r
334 { % Stack in: ... R S T Stack out: ... R T File out: S<comma><space>
\r
336 output.state mid.sentence =
\r
341 output.state after.block =
\r
343 add.period$ writeln
\r
344 "\newblock " write$
\r
347 output.state before.all =
\r
352 add.period$ " " * write$
\r
357 mid.sentence 'output.state :=
\r
363 FUNCTION { output.nonnull.dot.space }
\r
364 { % Stack in: ... R S T Stack out: ... R T File out: S<dot><space>
\r
366 output.state mid.sentence = % { "<DEBUG output.nonnull.dot.space>. " * write$ }
\r
371 output.state after.block =
\r
373 add.period$ writeln "\newblock " write$
\r
376 output.state before.all =
\r
381 add.period$ " " * write$
\r
386 mid.sentence 'output.state :=
\r
392 FUNCTION { output.nonnull.remove }
\r
393 { % Stack in: ... R S T Stack out: ... R T File out: S<space>
\r
395 output.state mid.sentence =
\r
400 output.state after.block =
\r
402 add.period$ writeln "\newblock " write$
\r
405 output.state before.all =
\r
410 add.period$ " " * write$
\r
415 mid.sentence 'output.state :=
\r
421 FUNCTION { output.nonnull.removenospace }
\r
422 { % Stack in: ... R S T Stack out: ... R T File out: S
\r
424 output.state mid.sentence =
\r
429 output.state after.block =
\r
431 add.period$ writeln "\newblock " write$
\r
434 output.state before.all =
\r
439 add.period$ " " * write$
\r
444 mid.sentence 'output.state :=
\r
450 FUNCTION { output }
\r
451 { % discard top token if empty, else like output.nonnull
\r
452 duplicate$ empty.or.unknown
\r
458 FUNCTION { output.dot.space }
\r
459 { % discard top token if empty, else like output.nonnull.dot.space
\r
460 duplicate$ empty.or.unknown
\r
462 'output.nonnull.dot.space
\r
466 FUNCTION { output.removenospace }
\r
467 { % discard top token if empty, else like output.nonnull.removenospace
\r
468 duplicate$ empty.or.unknown
\r
470 'output.nonnull.removenospace
\r
474 FUNCTION { output.check }
\r
475 { % like output, but warn if key name on top-of-stack is not set
\r
477 duplicate$ empty.or.unknown
\r
478 { pop$ "empty " t * " in " * cite$ * warning$ }
\r
483 FUNCTION { output.check.dot.space }
\r
484 { % like output.dot.space, but warn if key name on top-of-stack is not set
\r
486 duplicate$ empty.or.unknown
\r
487 { pop$ "empty " t * " in " * cite$ * warning$ }
\r
488 'output.nonnull.dot.space
\r
492 FUNCTION { fin.block }
\r
493 { % functionally, but not logically, identical to fin.entry
\r
498 FUNCTION { fin.entry }
\r
504 FUNCTION { new.sentence }
\r
505 { % update sentence state, with neither output nor stack change
\r
506 output.state after.block =
\r
509 output.state before.all =
\r
511 { after.sentence 'output.state := }
\r
517 FUNCTION { fin.sentence }
\r
525 FUNCTION { new.block }
\r
527 output.state before.all =
\r
529 { after.block 'output.state := }
\r
533 FUNCTION { output.coden } % UTAH
\r
534 { % output non-empty CODEN as one-line sentence (stack untouched)
\r
535 coden empty.or.unknown
\r
537 { "\showCODEN{" coden * "}" * writeln }
\r
541 FUNCTION { format.articleno }
\r
543 articleno empty.or.unknown
\r
546 numpages empty.or.unknown
\r
547 { "articleno field, but no numpages field, in " cite$ * warning$ }
\r
550 "Article " articleno *
\r
555 FUNCTION { format.year }
\r
556 { % push year string or "????" onto output stack
\r
557 %% Because year is a mandatory field, we always force SOMETHING
\r
559 year empty.or.unknown
\r
565 FUNCTION { format.day.month }
\r
566 { % push "day month " or "month " or "" onto output stack
\r
567 day empty.or.unknown
\r
569 month empty.or.unknown
\r
575 month empty.or.unknown
\r
577 { day " " * month * " " *}
\r
583 FUNCTION { format.day.month.year } % UTAH
\r
584 { % if month is empty, push "" else push "(MON.)" or "(DD MON.)"
\r
585 % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.)
\r
586 % acm-*.bst addition: prefix parenthesized date string with
\r
588 articleno empty.or.unknown
\r
590 { ", " format.articleno * }
\r
592 " (" * format.day.month * format.year * ")" *
\r
595 FUNCTION { output.day.month.year } % UTAH
\r
596 { % if month is empty value, do nothing; else output stack top and
\r
597 % leave with new top string "(MON.)" or "(DD MON.)"
\r
598 % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.)
\r
599 format.day.month.year
\r
600 output.nonnull.remove
\r
603 FUNCTION { strip.doi } % UTAH
\r
604 { % Strip any Web address prefix to recover the bare DOI, leaving the
\r
605 % result on the output stack, as recommended by CrossRef DOI
\r
607 % For example, reduce "http://doi.acm.org/10.1145/1534530.1534545" to
\r
608 % "10.1145/1534530.1534545". That is later typeset and displayed as
\r
609 % doi:10.1145/1534530.1534545 as the LAST item in the reference list
\r
610 % entry. Publisher Web sites wrap this with a suitable link to a real
\r
611 % URL to resolve the DOI, and the master http://dx.doi.org/ address is
\r
612 % preferred, since publisher-specific URLs can disappear in response
\r
613 % to economic events. All journals are encouraged by the DOI
\r
614 % authorities to use that typeset format and link procedures for
\r
615 % uniformity across all publications that include DOIs in reference
\r
617 % The numeric prefix is guaranteed to start with "10.", so we use
\r
619 doi #1 #3 substring$ "10." =
\r
622 doi #1 #7 substring$ "http://" =
\r
624 doi #8 doi text.length$ #7 - substring$ 't := % get modifiable copy of rest of DOI
\r
626 "INTERNAL STYLE-FILE ERROR" 's :=
\r
628 % search for next "/" and assign its suffix to s
\r
632 t #1 #1 substring$ "/" =
\r
634 % save rest of string as true DOI (should be 10.xxxx/yyyy)
\r
635 t #2 t text.length$ #1 - substring$ 's :=
\r
636 "" 't := % empty string t terminates the loop
\r
639 % discard first character and continue loop: t <= substring(t,2,last)
\r
640 t #2 t text.length$ #1 - substring$ 't :=
\r
646 % check for valid DOI (should be 10.xxxx/yyyy)
\r
647 s #1 #3 substring$ "10." =
\r
649 { "unrecognized DOI substring " s * " in DOI value [" * doi * "]" * warning$ }
\r
652 s % push the stripped DOI on the output stack
\r
656 "unrecognized DOI value [" doi * "]" * warning$
\r
657 doi % push the unrecognized original DOI on the output stack
\r
665 % Change by BV: added standard prefix to URL
\r
667 FUNCTION { output.doi } % UTAH
\r
668 { % output non-empty DOI as one-line sentence (stack untouched)
\r
669 doi empty.or.unknown
\r
672 %% NB: We want URLs at beginning of line to reduce likelihood of
\r
673 %% BibTeX's nasty line wrapping after column 79, which then requires
\r
674 %% manual (or automated) editing of the .bbl file to repair.
\r
675 %% The \url{} macro strips percent-newlines, and is thus safe in
\r
676 %% the presence of the line wrapping, but \path|...| and
\r
677 %% \verb|...| do not.
\r
678 "\showDOI{%" writeln
\r
679 "\url{http://dx.doi.org/" strip.doi * "}}" * writeln
\r
684 FUNCTION { output.isbn } % UTAH
\r
685 { % output non-empty ISBN-10 and/or ISBN-13 as one-line sentences (stack untouched)
\r
686 show-isbn-10-and-13
\r
688 %% show both 10- and 13-digit ISBNs
\r
689 isbn empty.or.unknown
\r
692 "\showISBNx{" isbn * "}" * writeln
\r
695 isbn-13 empty.or.unknown
\r
698 "\showISBNxiii{" isbn-13 * "}" * writeln
\r
703 %% show 10-digit ISBNs only if 13-digit ISBNs not available
\r
704 isbn-13 empty.or.unknown
\r
706 isbn empty.or.unknown
\r
709 "\showISBNx{" isbn * "}" * writeln
\r
714 "\showISBNxiii{" isbn-13 * "}" * writeln
\r
721 FUNCTION { output.issn } % UTAH
\r
722 { % output non-empty ISSN as one-line sentence (stack untouched)
\r
723 issn empty.or.unknown
\r
725 { "\showISSN{" issn * "}" * writeln }
\r
729 FUNCTION { output.issue }
\r
730 { % output non-empty issue number as a one-line sentence (stack untouched)
\r
731 issue empty.or.unknown
\r
733 { "Issue " issue * "." * writeln }
\r
737 FUNCTION { output.lccn } % UTAH
\r
738 { % return with stack untouched
\r
739 lccn empty.or.unknown
\r
741 { "\showLCCN{" lccn * "}" * writeln }
\r
745 FUNCTION { output.note } % UTAH
\r
746 { % return with stack empty
\r
747 note empty.or.unknown
\r
749 { "\shownote{" note add.period$ * "}" * writeln }
\r
753 FUNCTION { output.note.check } % UTAH
\r
754 { % return with stack empty
\r
755 note empty.or.unknown
\r
756 { "empty note in " cite$ * warning$ }
\r
757 { "\shownote{" note add.period$ * "}" * writeln }
\r
762 % Changes by BV 2011/04/15. Do not output
\r
763 % url if doi is defined
\r
765 FUNCTION { output.url } % UTAH
\r
766 { % return with stack untouched
\r
767 % output URL and associated lastaccessed fields
\r
768 doi empty.or.unknown
\r
770 url empty.or.unknown
\r
773 %% NB: We want URLs at beginning of line to reduce likelihood of
\r
774 %% BibTeX's nasty line wrapping after column 79, which would require
\r
775 %% manual (or automated) editing of the .bbl file to repair. However,
\r
776 %% the \url{} macro handles the unwrapping job automatically.
\r
777 "\showURL{%" writeln
\r
778 lastaccessed empty.or.unknown
\r
780 { "Retrieved " lastaccessed * " from " * }
\r
783 %% The URL field may contain a semicolon-separated list of Web
\r
784 %% addresses, and we locate and wrap each of them in \url{...}.
\r
785 %% The simplistic approach of putting the entire list into the
\r
786 %% macro argument is that the semicolons are typeset in a
\r
787 %% typewriter font, and no space follows them.
\r
789 %% We therefore replace the original code
\r
790 %% "\url{" * url * "}}" * writeln
\r
791 %% with this character-at-a-time loop:
\r
795 url 't := % get modifiable copy of URL list
\r
799 t #1 #1 substring$ ";" =
\r
800 { % then split argument at separator
\r
804 { % else concatenate nonblank character to argument
\r
805 t #1 #1 substring$ " " =
\r
807 { t #1 #1 substring$ * }
\r
812 t #2 t text.length$ #1 - substring$ 't :=
\r
824 FUNCTION { output.year.check }
\r
825 { % warn if year empty, else output top string and leave " YEAR<label>" on stack in mid-sentence
\r
826 year empty.or.unknown
\r
827 { "empty year in " cite$ * warning$ }
\r
829 " " year * extra.label *
\r
830 mid.sentence 'output.state :=
\r
858 %% test whether first number is less than or equal to second number
\r
860 %% stack out: if n1 <= n2 then 1 else 0
\r
862 %% "DEBUG: le " cite$ * warning$
\r
863 > { #0 } { #1 } if$
\r
868 %% test whether first number is greater than or equal to second number
\r
870 %% stack out: if n1 >= n2 then 1 else 0
\r
872 %% "DEBUG: ge " cite$ * warning$
\r
873 < { #0 } { #1 } if$
\r
876 FUNCTION { is.leading.digit }
\r
878 %% test whether first character of string is a digit
\r
879 %% stack in: string
\r
880 %% stack out: if first-char-is-digit then 1 else 0
\r
882 #1 #1 substring$ % replace string by string[1:1]
\r
883 duplicate$ % string[1:1] string[1:1]
\r
885 "0" chr.to.int$ swap$ le % "0" <= string[1:1] --> 0-or-1
\r
886 swap$ % 0-or-1 string[1:1]
\r
888 "9" chr.to.int$ le % string[1:1} <= "9" --> 0-or-1
\r
892 FUNCTION { skip.digits }
\r
894 %% skip over leading digits in string
\r
895 %% stack in: string
\r
896 %% stack out: rest-of-string leading-digits
\r
898 %% "DEBUG: enter skip.digits " cite$ * warning$
\r
909 %% "=================DEBUG: skip.digits t = [" t * "]" * warning$
\r
911 { t #2 t text.length$ #1 - substring$ }
\r
922 t.org #1 t.org text.length$ u text.length$ - substring$ % leading digits
\r
924 %% "DEBUG: t.org = [" t.org * "]" * warning$
\r
925 %% "DEBUG: u = [" u * "]" * warning$
\r
929 %% "DEBUG: leave skip.digits " cite$ * warning$
\r
932 FUNCTION { skip.nondigits }
\r
934 %% skip over leading nondigits in string
\r
935 %% stack in: string
\r
936 %% stack out: rest-of-string
\r
938 %% "DEBUG: enter skip.nondigits " cite$ * warning$
\r
945 %% "=================DEBUG: skip.nondigits t = [" t * "]" * warning$
\r
951 { t #2 t text.length$ #1 - substring$ }
\r
960 %% "DEBUG: leave skip.nondigits " cite$ * warning$
\r
963 FUNCTION { parse.next.number }
\r
965 %% stack in: string
\r
966 %% stack out: rest-of-string next-numeric-part-of-string
\r
968 %% stack in: "123:1--123:59"
\r
969 %% stack out: ":1--123:59" "123"
\r
972 s skip.nondigits 's :=
\r
976 FUNCTION { reduce.pages.to.page.count }
\r
978 %% Stack in: arbitrary-and-unused
\r
979 %% Stack out: unchanged
\r
981 %% For the new-style pagination with article number and numpages or
\r
982 %% pages, we expect to have BibTeX entries containing something like
\r
983 %% articleno = "17",
\r
984 %% pages = "1--23",
\r
985 %% with output "Article 17, 23 pages",
\r
987 %% articleno = "17",
\r
988 %% numpages = "23",
\r
989 %% with output "Article 17, 23 pages",
\r
991 %% articleno = "17",
\r
992 %% pages = "17:1--17:23",
\r
993 %% with output "Article 17, 23 pages",
\r
995 %% If articleno is missing or empty, then we should output "1--23",
\r
996 %% "23" (with a warning of a missing articleno), or "17:1--17:23",
\r
999 %% "DEBUG: enter reduce.pages.to.page.count " cite$ * warning$
\r
1001 %% "DEBUG: pages = [" pages * "]" * warning$
\r
1004 parse.next.number 'p1 :=
\r
1005 parse.next.number 'p2 :=
\r
1006 parse.next.number 'p3 :=
\r
1007 parse.next.number 'page.count :=
\r
1013 duplicate$ "unexpected trailing garbage [" swap$ *
\r
1014 "] after n:p1--n:p2 in pages = [" *
\r
1024 %% "DEBUG: reduce.pages.to.page.count: "
\r
1025 %% " p1 = " p1 * *
\r
1026 %% " p2 = " p2 * *
\r
1027 %% " p3 = " p3 * *
\r
1028 %% " p4 = " page.count * *
\r
1029 %% " in " cite$ * * warning$
\r
1031 p1 p3 = p2 "1" = and numpages empty.or.unknown and
\r
1032 { "INFO: reduced pages = [" pages * "] to numpages = [" * page.count * "]" * warning$ }
\r
1034 numpages empty.or.unknown
\r
1042 p1 "1" = p3 empty.or.unknown and numpages empty.or.unknown and
\r
1045 "INFO: reduced pages = [" pages * "] to numpages = [" * page.count * "]" * warning$
\r
1048 numpages empty.or.unknown
\r
1056 %% "DEBUG: leave reduce.pages.to.page.count " cite$ * warning$
\r
1059 FUNCTION { new.block.checkb }
\r
1060 { % issue a new.block only if at least one of top two stack strings is not empty
\r
1062 swap$ empty.or.unknown
\r
1069 FUNCTION { field.or.null }
\r
1070 { % convert empty value to null string, else return value
\r
1071 duplicate$ empty.or.unknown
\r
1077 FUNCTION { emphasize }
\r
1078 { % emphasize a non-empty top string on the stack (WITHOUT italic correction)
\r
1079 duplicate$ empty.or.unknown
\r
1081 { "{\em " swap$ * "}" * }
\r
1085 FUNCTION { emphasize.with.italic.correction }
\r
1086 { % convert empty string to null string, or emphasize with a trailing italic correction
\r
1087 duplicate$ empty.or.unknown
\r
1089 { "{\em " swap$ * "\/}" * }
\r
1093 FUNCTION { comma }
\r
1094 { % convert empty string to null string, or brace string and add trailing comma
\r
1095 duplicate$ empty.or.unknown
\r
1097 { "{" swap$ * "}," * }
\r
1101 FUNCTION { format.names }
\r
1103 % Format bibliographical entries with the first author last name first,
\r
1104 % and subsequent authors with initials followed by last name.
\r
1105 % All names are formatted in this routine.
\r
1108 #1 'nameptr := % nameptr = 1;
\r
1109 s num.names$ 'numnames := % numnames = num.name$(s);
\r
1110 numnames 'namesleft :=
\r
1111 { namesleft #0 > }
\r
1113 %NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
\r
1114 %NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
\r
1115 {"{" s nameptr "{ff }{vv }{ll}{, jj}" format.name$ * "}" * 't := }
\r
1116 {"{" s nameptr "{ff }{vv }{ll}{, jj}" format.name$ * "}" * 't := }
\r
1127 t "{\sc others}" =
\r
1128 { " {et~al\mbox{.}}" * } % jrh: avoid spacing problems
\r
1129 { " {and} " * t * } % from Chicago Manual of Style
\r
1136 nameptr #1 + 'nameptr := % nameptr += 1;
\r
1137 namesleft #1 - 'namesleft := % namesleft =- 1;
\r
1142 FUNCTION { my.full.label }
\r
1145 #1 'nameptr := % nameptr = 1;
\r
1146 s num.names$ 'numnames := % numnames = num.name$(s);
\r
1147 numnames 'namesleft :=
\r
1148 { namesleft #0 > }
\r
1150 { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
\r
1161 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
\r
1162 { " and " * t * } % from Chicago Manual of Style
\r
1169 nameptr #1 + 'nameptr := % nameptr += 1;
\r
1170 namesleft #1 - 'namesleft := % namesleft =- 1;
\r
1176 FUNCTION { format.names.fml }
\r
1178 % Format names in "familiar" format, with first initial followed by
\r
1179 % last name. Like format.names, ALL names are formatted.
\r
1180 % jtb: The names are NOT put in small caps
\r
1183 #1 'nameptr := % nameptr = 1;
\r
1184 s num.names$ 'numnames := % numnames = num.name$(s);
\r
1185 numnames 'namesleft :=
\r
1186 { namesleft #0 > }
\r
1189 "{" s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ * "}" * 't :=
\r
1201 { " {et~al\mbox{.}}" * }
\r
1202 { " {and} " * t * }
\r
1209 nameptr #1 + 'nameptr := % nameptr += 1;
\r
1210 namesleft #1 - 'namesleft := % namesleft =- 1;
\r
1215 FUNCTION { format.authors }
\r
1217 author empty.or.unknown
\r
1219 { author format.names add.period$} % jtb: add period if none before
\r
1223 FUNCTION { format.key }
\r
1226 { key field.or.null }
\r
1231 FUNCTION { format.no.key }
\r
1239 FUNCTION { format.editors.fml }
\r
1241 % Format editor names for use in the "in" types: inbook, incollection,
\r
1242 % inproceedings: first initial, then last names. When editors are the
\r
1243 % LABEL for an entry, then format.editor is used which lists editors
\r
1244 % by last name first.
\r
1246 editor empty.or.unknown
\r
1249 editor format.names.fml editor num.names$ #1 >
\r
1257 FUNCTION { format.editors }
\r
1258 { % format editor names for use in labels, last names first.
\r
1259 editor empty.or.unknown
\r
1262 editor format.names
\r
1263 editor num.names$ #1 >
\r
1271 FUNCTION { format.articletitle }
\r
1273 title empty.or.unknown
\r
1275 % Use this to preserve lettercase in titles:
\r
1276 { "\showarticletitle{" title * "}" * }
\r
1277 % Use this for downcase title style:
\r
1278 % { \showarticletitle{" title "t" change.case$ * "}" * }
\r
1282 FUNCTION { format.title }
\r
1284 title empty.or.unknown
\r
1286 % Use this to preserve lettercase in titles:
\r
1288 % Use this for downcase title style:
\r
1289 % { title "t" change.case$ }
\r
1293 FUNCTION { n.dashify }
\r
1297 { t empty.or.unknown not }
\r
1299 t #1 #1 substring$ "-" =
\r
1301 t #1 #2 substring$ "--" = not
\r
1303 t #2 global.max$ substring$ 't :=
\r
1306 { t #1 #1 substring$ "-" = }
\r
1309 t #2 global.max$ substring$ 't :=
\r
1316 t #1 #1 substring$ *
\r
1317 t #2 global.max$ substring$ 't :=
\r
1324 FUNCTION { format.btitle }
\r
1326 edition empty.or.unknown
\r
1327 { title emphasize }
\r
1328 { title empty.or.unknown
\r
1329 { title emphasize } % jtb: what is this supposed to do ?!?
\r
1330 { "{\em " title * "\/} (" * edition "l" change.case$ * " ed.)" * } % jtb: no parens for ed.
\r
1336 FUNCTION { format.emphasize.booktitle }
\r
1337 { % push "" or "{\em booktitle}" or "{\em booktitle}, (second ed.)" on stack
\r
1338 edition empty.or.unknown
\r
1339 { booktitle emphasize }
\r
1340 { booktitle empty.or.unknown
\r
1342 { "{\em " booktitle * "} (" * edition "l" change.case$ * " ed.)" * }
\r
1348 FUNCTION { format.city }
\r
1350 % jtb: if the preceding string (the title of the conference) is non-empty,
\r
1351 % jtb: append the location, otherwise leave empty (so as to trigger the
\r
1352 % jtb: error message in output.check
\r
1354 duplicate$ empty.or.unknown
\r
1357 city empty.or.unknown
\r
1359 date empty.or.unknown
\r
1361 { " (" * date * ")" * }
\r
1365 date empty.or.unknown
\r
1366 { " (" * city * ")" * }
\r
1367 { " (" * city * ", " * date * ")" * }
\r
1375 FUNCTION { tie.or.space.connect }
\r
1377 duplicate$ text.length$ #3 <
\r
1384 FUNCTION { either.or.check }
\r
1388 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
\r
1392 FUNCTION { format.bvolume }
\r
1394 % jtb: If there is a series, this is added and the volume trails after it.
\r
1395 % jtb: Otherwise, "Vol" is Capitalized.
\r
1397 volume empty.or.unknown
\r
1400 series empty.or.unknown
\r
1401 { "Vol." volume tie.or.space.connect}
\r
1402 { series ", " * "Vol." volume tie.or.space.connect *}
\r
1404 "volume and number" number either.or.check
\r
1409 FUNCTION { format.bvolume.noseries }
\r
1411 volume empty.or.unknown
\r
1414 series empty.or.unknown
\r
1415 { "Vol." volume tie.or.space.connect}
\r
1416 { "Vol." volume tie.or.space.connect}
\r
1417 % { series ", " * "Vol." volume tie.or.space.connect *}
\r
1419 "volume and number" number either.or.check
\r
1424 FUNCTION { format.series }
\r
1426 series empty.or.unknown
\r
1428 {" {\em (" * series ")}" *}
\r
1432 FUNCTION { format.number.series }
\r
1434 volume empty.or.unknown
\r
1436 number empty.or.unknown
\r
1438 volume empty.or.unknown
\r
1441 series empty.or.unknown
\r
1443 { " (" series * ")" * }
\r
1447 } % { series field.or.null }
\r
1449 output.state mid.sentence =
\r
1450 { "Number" } % gnp - changed to mixed case always
\r
1453 number tie.or.space.connect series empty.or.unknown
\r
1454 { "there's a number but no series in " cite$ * warning$ }
\r
1455 { " in " * series * }
\r
1466 FUNCTION { multi.page.check }
\r
1469 #0 'multiresult :=
\r
1471 t empty.or.unknown not
\r
1474 { t #1 #1 substring$
\r
1476 swap$ duplicate$ "," =
\r
1479 { #1 'multiresult := }
\r
1480 { t #2 global.max$ substring$ 't := }
\r
1487 FUNCTION { format.pages }
\r
1489 pages empty.or.unknown
\r
1492 pages multi.page.check
\r
1493 { pages n.dashify } % gnp - removed () % jtb: removed pp.
\r
1500 FUNCTION { format.pages.check.without.articleno }
\r
1501 { %% format pages field only if articleno is absent
\r
1502 %% Stack out: pages-specification
\r
1503 numpages missing$ pages missing$ and
\r
1504 { "page numbers missing in both pages and numpages fields in " cite$ * warning$ }
\r
1508 articleno empty.or.unknown
\r
1519 FUNCTION { format.pages.check }
\r
1521 pages empty.or.unknown
\r
1522 { "page numbers missing in " cite$ * warning$ "" }
\r
1523 { pages n.dashify }
\r
1527 FUNCTION { format.bookpages }
\r
1529 bookpages empty.or.unknown
\r
1531 { bookpages "book pages" tie.or.space.connect }
\r
1535 FUNCTION { format.named.pages }
\r
1537 pages empty.or.unknown
\r
1539 { format.pages "pages" tie.or.space.connect }
\r
1544 % Changed by Boris Veytsman, 2011-03-13
\r
1545 % Now the word "pages" is printed even if
\r
1546 % there field pages is not empty.
\r
1549 FUNCTION { format.page.count }
\r
1551 page.count empty.or.unknown
\r
1554 articleno empty.or.unknown
\r
1555 { "numpages field, but no articleno field, in " cite$ * warning$ }
\r
1558 page.count "pages" tie.or.space.connect
\r
1563 FUNCTION { format.articleno.numpages }
\r
1565 %% There are seven possible outputs, depending on which fields are set.
\r
1567 %% These four are handled here:
\r
1569 %% articleno, numpages, pages -> "Article articleno-value, numpages-value pages"
\r
1570 %% articleno, numpages -> "Article articleno-value, numpages-value pages"
\r
1571 %% articleno, pages -> "Article articleno-value, reduced-pages-value pages"
\r
1572 %% articleno -> "Article articleno-value" and warn about missing numpages
\r
1574 %% The remaining three have already been handled by
\r
1575 %% format.pages.check.without.articleno:
\r
1577 %% numpages, pages -> "pages-value"
\r
1578 %% numpages -> "numpages-value"
\r
1579 %% pages -> "pages-value"
\r
1581 articleno empty.or.unknown
\r
1583 numpages empty.or.unknown
\r
1585 { "require articleno with numpages field in " cite$ * warning$ }
\r
1590 numpages empty.or.unknown
\r
1592 pages empty.or.unknown
\r
1594 "require pages or numpages fields with articleno field in " cite$ * warning$
\r
1597 { reduce.pages.to.page.count }
\r
1600 { numpages 'page.count := }
\r
1603 %% The Article number is now handled in format.day.month.year because
\r
1604 %% ACM prefers the style "Digital Libraries 12, 3, Article 5 (July 2008)"
\r
1605 %% over "Digital Libraries 12, 3 (July 2008), Article 5"
\r
1606 %% format.articleno output
\r
1612 FUNCTION { format.journal.volume.number.day.month.year }
\r
1614 % By Young (and Spencer)
\r
1615 % GNP - fixed bugs with missing volume, number, and/or pages
\r
1617 % Format journal, volume, number, pages for article types.
\r
1619 journal empty.or.unknown
\r
1620 { "no journal in " cite$ * warning$
\r
1622 % { journal emphasize.with.italic.correction }
\r
1624 journal "Journal of the ACM" =
\r
1625 { "{\it J. ACM}" }
\r
1627 journal "American Mathematical Society Translations" =
\r
1628 { "{\it Amer. Math. Soc. Transl.}" }
\r
1630 journal "Bulletin of the American Mathematical Society" =
\r
1631 { "{\it Bull. Amer. Math. Soc.}" }
\r
1633 journal "Proceedings of the American Mathematical Society" =
\r
1634 { "{\it Proc. Amer. Math. Soc.}" }
\r
1636 journal "Transactions of the American Mathematical Society" =
\r
1637 { "{\it Trans. Amer. Math. Soc.}" }
\r
1639 journal "Communications of the {ACM}" =
\r
1640 { "{\it Commun. {ACM}}" }
\r
1642 journal "{ACM} Computing Surveys" =
\r
1643 { "{\it Comput. Surveys}" }
\r
1645 journal "{ACM} Transactions on Mathematical Software" =
\r
1646 { "{\it {ACM} Trans. Math. Software}" }
\r
1648 journal "{ACM} {SIGNUM} Newsletter" =
\r
1649 { "{\it {ACM} {SIGNUM} Newslett.}" }
\r
1651 journal "American Journal of Sociology" =
\r
1652 { "{\it Amer. J. Sociology}" }
\r
1654 journal "Journal of the American Statistical Association" =
\r
1655 { "{\it J. Amer. Statist. Assoc.}" }
\r
1657 journal "Applied Mathematics and Computation" =
\r
1658 { "{\it Appl. Math. Comput.}" }
\r
1660 journal "American Mathematical Monthly" =
\r
1661 { "{\it Amer. Math. Monthly}" }
\r
1663 journal "British Journal of Mathematical and Statistical Psychology" =
\r
1664 { "{\it Brit. J. Math. Statist. Psych.}" }
\r
1666 journal "Canadian Mathematical Bulletin" =
\r
1667 { "{\it Canad. Math. Bull.}" }
\r
1669 journal "Journal of Computational and Applied Mathematics" =
\r
1670 { "{\it J. Comput. Appl. Math.}" }
\r
1672 journal "Journal of Computational Physics" =
\r
1673 { "{\it J. Comput. Phys.}" }
\r
1675 journal "Computers and Structures" =
\r
1676 { "{\it Comput. \& Structures}" }
\r
1678 journal "The Computer Journal" =
\r
1679 { "{\it Comput. J.}" }
\r
1681 journal "Journal of Computer and System Sciences" =
\r
1682 { "{\it J. Comput. System Sci.}" }
\r
1684 journal "Contemporary Mathematics" =
\r
1685 { "{\it Contemp. Math.}" }
\r
1687 journal "Crelle's Journal" =
\r
1688 { "{\it Crelle's J.}" }
\r
1690 journal "Giornale di Mathematiche" =
\r
1691 { "{\it Giorn. Mat.}" }
\r
1693 journal "{IEEE} Transactions on Computers" =
\r
1694 { "{\it {IEEE} Trans. Comput.}" }
\r
1696 journal "{IEEE} Transactions on Automatic Control" =
\r
1697 { "{\it {IEEE} Trans. Automat. Control}" }
\r
1699 journal "Proceedings of the {IEEE}" =
\r
1700 { "{\it Proc. {IEEE}}" }
\r
1702 journal "{IEEE} Transactions on Aerospace and Electronic Systems" =
\r
1703 { "{\it {IEEE} Trans. Aerospace Electron. Systems}" }
\r
1705 journal "{IMA} Journal of Numerical Analysis" =
\r
1706 { "{\it {IMA} J. Numer. Anal.}" }
\r
1708 journal "Information Processing Letters" =
\r
1709 { "{\it Inform. Process. Lett.}" }
\r
1711 journal "Journal of the Institute of Mathematics and its Applications" =
\r
1712 { "{\it J. Inst. Math. Appl.}" }
\r
1714 journal "International Journal of Control" =
\r
1715 { "{\it Internat. J. Control}" }
\r
1717 journal "International Journal for Numerical Methods in Engineering" =
\r
1718 { "{\it Internat. J. Numer. Methods Engrg.}" }
\r
1720 journal "International Journal of Supercomputing Applications" =
\r
1721 { "{\it Internat. J. Supercomputing Applic.}" }
\r
1723 journal "Journal of Research of the National Bureau of Standards" =
\r
1724 { "{\it J. Res. Nat. Bur. Standards}" }
\r
1726 journal "Linear Algebra and its Applications" =
\r
1727 { "{\it Linear Algebra Appl.}" }
\r
1729 journal "Journal of Mathematical Analysis and Applications" =
\r
1730 { "{\it J. Math. Anal. Appl.}" }
\r
1732 journal "Mathematische Annalen" =
\r
1733 { "{\it Math. Ann.}" }
\r
1735 journal "Journal of Mathematical Physics" =
\r
1736 { "{\it J. Math. Phys.}" }
\r
1738 journal "Mathematics of Computation" =
\r
1739 { "{\it Math. Comp.}" }
\r
1741 journal "Mathematica Scandinavica" =
\r
1742 { "{\it Math. Scand.}" }
\r
1744 journal "Mathematical Tables and Other Aids to Computation" =
\r
1745 { "{\it Math. Tables Aids Comput.}" }
\r
1747 journal "Numerische Mathematik" =
\r
1748 { "{\it Numer. Math.}" }
\r
1750 journal "Pacific Journal of Mathematics" =
\r
1751 { "{\it Pacific J. Math.}" }
\r
1753 journal "Journal of Parallel and Distributed Computing" =
\r
1754 { "{\it J. Parallel and Distrib. Comput.}" }
\r
1756 journal "Parallel Computing" =
\r
1757 { "{\it Parallel Comput.}" }
\r
1759 journal "Philosophical Magazine" =
\r
1760 { "{\it Philos. Mag.}" }
\r
1762 journal "Proceedings of the National Academy of Sciences of the USA" =
\r
1763 { "{\it Proc. Nat. Acad. Sci. U. S. A.}" }
\r
1765 journal "Quarterly Journal of Mathematics, Oxford, Series (2)" =
\r
1766 { "{\it Quart. J. Math. Oxford Ser. (2)}" }
\r
1768 journal "Quarterly of Applied Mathematics" =
\r
1769 { "{\it Quart. Appl. Math.}" }
\r
1771 journal "Review of the International Statisical Institute" =
\r
1772 { "{\it Rev. Inst. Internat. Statist.}" }
\r
1774 journal "Journal of the Society for Industrial and Applied Mathematics" =
\r
1775 { "{\it J. Soc. Indust. Appl. Math.}" }
\r
1777 journal "Journal of the Society for Industrial and Applied Mathematics, Series B, Numerical Analysis" =
\r
1778 { "{\it J. Soc. Indust. Appl. Math. Ser. B Numer. Anal.}" }
\r
1780 journal "{SIAM} Journal on Algebraic and Discrete Methods" =
\r
1781 { "{\it {SIAM} J. Algebraic Discrete Methods}" }
\r
1783 journal "{SIAM} Journal on Applied Mathematics" =
\r
1784 { "{\it {SIAM} J. Appl. Math.}" }
\r
1786 journal "{SIAM} Journal on Computing" =
\r
1787 { "{\it {SIAM} J. Comput.}" }
\r
1789 journal "{SIAM} Journal on Matrix Analysis and Applications" =
\r
1790 { "{\it {SIAM} J. Matrix Anal. Appl.}" }
\r
1792 journal "{SIAM} Journal on Numerical Analysis" =
\r
1793 { "{\it {SIAM} J. Numer. Anal.}" }
\r
1795 journal "{SIAM} Review" =
\r
1796 { "{\it {SIAM} Rev.}" }
\r
1798 journal "{SIAM} Journal on Scientific and Statistical Computing" =
\r
1799 { "{\it {SIAM} J. Sci. Statist. Comput.}" }
\r
1801 journal "Software Practice and Experience" =
\r
1802 { "{\it Software Prac. Experience}" }
\r
1804 journal "Statistical Science" =
\r
1805 { "{\it Statist. Sci.}" }
\r
1807 journal "{USSR} Computational Mathematics and Mathematical Physics" =
\r
1808 { "{\it {U. S. S. R.} Comput. Math. and Math. Phys.}" }
\r
1810 journal "Journal of {VLSI} and Computer Systems" =
\r
1811 { "{\it J. {VLSI} Comput. Syst.}" }
\r
1813 journal "Zeitschrift fur Angewandte Mathematik und Mechanik" =
\r
1814 { "{\it Z. Angew. Math. Mech.}" }
\r
1816 journal "Zeitschrift fur Angewandte Mathematik und Physik" =
\r
1817 { "{\it Z. Angew. Math. Phys.}" }
\r
1819 journal "ACM Computing Surveys" =
\r
1820 { "{\it Comput. Surveys}" }
\r
1822 journal "ACM Transactions on Mathematical Software" =
\r
1823 { "{\it ACM Trans. Math. Software}" }
\r
1825 journal "ACM {SIGNUM} Newsletter" =
\r
1826 { "{\it ACM {SIGNUM} Newslett.}" }
\r
1828 journal "IEEE Transactions on Computers" =
\r
1829 { "{\it IEEE Trans. Comput.}" }
\r
1831 journal "IEEE Transactions on Automatic Control" =
\r
1832 { "{\it IEEE Trans. Automat. Control}" }
\r
1834 journal "Proceedings of the IEEE" =
\r
1835 { "{\it Proc. IEEE}" }
\r
1837 journal "IEEE Transactions on Aerospace and Electronic Systems" =
\r
1838 { "{\it IEEE Trans. Aerospace Electron. Systems}" }
\r
1840 journal "IMA Journal of Numerical Analysis" =
\r
1841 { "{\it IMA J. Numer. Anal.}" }
\r
1843 journal "SIAM Journal on Algebraic and Discrete Methods" =
\r
1844 { "{\it SIAM J. Algebraic Discrete Methods}" }
\r
1846 journal "SIAM Journal on Applied Mathematics" =
\r
1847 { "{\it SIAM J. Appl. Math.}" }
\r
1849 journal "SIAM Journal on Computing" =
\r
1850 { "{\it SIAM J. Comput.}" }
\r
1852 journal "SIAM Journal on Matrix Analysis and Applications" =
\r
1853 { "{\it SIAM J. Matrix Anal. Appl.}" }
\r
1855 journal "SIAM Journal on Numerical Analysis" =
\r
1856 { "{\it SIAM J. Numer. Anal.}" }
\r
1858 journal "SIAM Review" =
\r
1859 { "{\it SIAM Rev.}" }
\r
1861 journal "SIAM Journal on Scientific and Statistical Computing" =
\r
1862 { "{\it SIAM J. Sci. Statist. Comput.}" }
\r
1864 journal "USSR Computational Mathematics and Mathematical Physics" =
\r
1865 { "{\it U. S. S. R. Comput. Math. and Math. Phys.}" }
\r
1867 journal "Journal of VLSI and Computer Systems" =
\r
1868 { "{\it J. VLSI Comput. Syst.}" }
\r
1870 journal "Communications of the ACM" =
\r
1871 { "{\it Commun. ACM}" }
\r
1872 %% If no match with cases needing special handling, just output journal name
\r
1873 { journal emphasize.with.italic.correction }
\r
2042 number empty.or.unknown
\r
2044 volume empty.or.unknown
\r
2045 { "no number and no volume in " cite$ * warning$ "" * }
\r
2046 { " " * " {" * volume * "}" * }
\r
2050 volume empty.or.unknown
\r
2052 "unusual to have number, but no volume, for " cite$ * warning$
\r
2055 { " " * volume comma " " * number * * }
\r
2060 format.day.month.year *
\r
2063 FUNCTION { format.chapter.pages }
\r
2065 chapter empty.or.unknown
\r
2067 { type empty.or.unknown
\r
2068 { "Chapter" } % gnp - changed to mixed case
\r
2069 { type "t" change.case$ }
\r
2071 chapter tie.or.space.connect
\r
2072 pages empty.or.unknown
\r
2073 {"page numbers missing in " cite$ * warning$} % gnp - added check
\r
2074 { ", " * format.pages * }
\r
2080 FUNCTION { format.in.emphasize.booktitle }
\r
2081 { % jtb: format for collections or proceedings not appearing in a journal
\r
2082 booktitle empty.or.unknown
\r
2084 { "In " format.emphasize.booktitle * }
\r
2088 FUNCTION { format.in.booktitle }
\r
2089 { % jtb: format for proceedings appearing in a journal
\r
2090 booktitle empty.or.unknown
\r
2092 { "In " booktitle * }
\r
2096 FUNCTION { format.in.ed.booktitle }
\r
2098 booktitle empty.or.unknown
\r
2100 { editor empty.or.unknown
\r
2101 { "In " format.emphasize.booktitle * }
\r
2102 % jtb: swapped editor location
\r
2103 { "In " format.emphasize.booktitle * ", " * format.editors.fml * }
\r
2109 FUNCTION { format.thesis.type }
\r
2110 { % call with default type on stack top
\r
2111 type empty.or.unknown
\r
2112 'skip$ % use default type
\r
2114 pop$ % discard default type
\r
2115 % NO: it is silly to have to brace protect every degree type!: type "t" change.case$
\r
2121 FUNCTION { format.tr.number }
\r
2123 type empty.or.unknown
\r
2124 % { "Tech. Rep." }
\r
2125 { "{T}echnical {R}eport" } % ACM wants it explicit (Gerry 9/28)
\r
2128 number empty.or.unknown
\r
2129 { "t" change.case$ }
\r
2130 %% LOOKS BAD: { "." * number tie.or.space.connect }
\r
2131 %% Prefer "Research report RJ687." to "Research report. RJ687."
\r
2132 { number tie.or.space.connect }
\r
2136 FUNCTION { format.advisor }
\r
2138 advisor empty.or.unknown
\r
2140 { "Advisor(s) " advisor * }
\r
2144 FUNCTION { format.article.crossref }
\r
2146 "\citeN{" * crossref * "}" *
\r
2149 FUNCTION { format.crossref.editor }
\r
2151 editor #1 "{vv~}{ll}" format.name$
\r
2152 editor num.names$ duplicate$
\r
2154 { pop$ " et~al\mbox{.}" * } % jrh: avoid spacing problems
\r
2157 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
\r
2158 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
\r
2159 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
\r
2167 FUNCTION { format.book.crossref }
\r
2169 volume empty.or.unknown
\r
2170 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
\r
2173 { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
\r
2177 editor empty.or.unknown
\r
2178 editor field.or.null author field.or.null =
\r
2180 { key empty.or.unknown
\r
2181 { series empty.or.unknown
\r
2182 { "need editor, key, or series for " cite$ * " to crossref " *
\r
2183 crossref * warning$
\r
2186 { "{\em " * series * "\/}" * }
\r
2192 { format.crossref.editor * }
\r
2194 " \citeN{" * crossref * "}" *
\r
2197 FUNCTION { format.incoll.inproc.crossref }
\r
2199 " \citeN{" * crossref * "}" *
\r
2202 FUNCTION { format.lab.names }
\r
2204 % format.lab.names:
\r
2206 % determines "short" names for the abbreviated author information.
\r
2207 % "Long" labels are created in calc.label, using the routine my.full.label
\r
2208 % to format author and editor fields.
\r
2210 % There are 4 cases for labels. (n=3 in the example)
\r
2211 % a) one author Foo
\r
2212 % b) one to n Foo, Bar and Baz
\r
2213 % c) use of "and others" Foo, Bar et al.
\r
2214 % d) more than n Foo et al.
\r
2217 s num.names$ 'numnames :=
\r
2218 numnames #2 > % change number to number of others allowed before
\r
2219 % forcing "et al".
\r
2220 { s #1 "{vv~}{ll}" format.name$ " et~al\mbox{.}" * } % jrh: \mbox{} added
\r
2222 numnames #1 - 'namesleft :=
\r
2224 s #1 "{vv~}{ll}" format.name$
\r
2225 { namesleft #0 > }
\r
2226 { nameptr numnames =
\r
2227 { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
\r
2228 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
\r
2229 { " and " * s nameptr "{vv~}{ll}" format.name$ * }
\r
2232 { ", " * s nameptr "{vv~}{ll}" format.name$ * }
\r
2234 nameptr #1 + 'nameptr :=
\r
2235 namesleft #1 - 'namesleft :=
\r
2242 FUNCTION { author.key.label }
\r
2244 author empty.or.unknown
\r
2245 { key empty.or.unknown
\r
2246 { "no key, author in " cite$ * warning$
\r
2247 cite$ #1 #3 substring$ }
\r
2251 { author format.lab.names }
\r
2255 FUNCTION { author.key.organization.label }
\r
2256 { % added - gnp. Provide label formatting by organization if author is null.
\r
2257 author empty.or.unknown
\r
2258 { organization empty.or.unknown
\r
2259 { key empty.or.unknown
\r
2260 { "no key, author or organization in " cite$ * warning$
\r
2261 cite$ #1 #3 substring$ }
\r
2268 { author format.lab.names }
\r
2272 FUNCTION { editor.key.organization.label }
\r
2273 { % added - gnp. Provide label formatting by organization if editor is null.
\r
2274 editor empty.or.unknown
\r
2275 { organization empty.or.unknown
\r
2276 { key empty.or.unknown
\r
2277 { "no key, editor or organization in " cite$ * warning$
\r
2278 cite$ #1 #3 substring$ }
\r
2285 { editor format.lab.names }
\r
2289 FUNCTION { author.editor.key.label }
\r
2291 author empty.or.unknown
\r
2292 { editor empty.or.unknown
\r
2293 { key empty.or.unknown
\r
2294 { "no key, author, or editor in " cite$ * warning$
\r
2295 cite$ #1 #3 substring$ }
\r
2299 { editor format.lab.names }
\r
2302 { author format.lab.names }
\r
2306 FUNCTION { calc.label }
\r
2308 % Changed - GNP. See also author.organization.sort, editor.organization.sort
\r
2309 % Form label for BibTeX entry. The classification of which fields are used
\r
2310 % for which type of entry (book, inbook, etc.) are taken from alpha.bst.
\r
2311 % The change here from newapa is to also include organization as a
\r
2312 % citation label if author or editor is missing.
\r
2317 type$ "periodical" =
\r
2319 'author.editor.key.label
\r
2320 { type$ "proceedings" =
\r
2321 'editor.key.organization.label
\r
2322 { type$ "manual" =
\r
2323 'author.key.organization.label
\r
2331 author empty.or.unknown % generate the full label citation information.
\r
2333 editor empty.or.unknown
\r
2335 organization empty.or.unknown
\r
2337 key empty.or.unknown
\r
2339 "no author, editor, organization, or key in " cite$ * warning$
\r
2348 { editor my.full.label }
\r
2351 { author my.full.label }
\r
2354 % leave label on the stack, to be popped when required.
\r
2356 "}{" * swap$ * "}{" *
\r
2357 % year field.or.null purify$ #-1 #4 substring$ *
\r
2359 % save the year for sort processing afterwards (adding a, b, c, etc.)
\r
2361 year field.or.null purify$ #-1 #4 substring$
\r
2366 % Change by Gerry: use number-like citations for transactions
\r
2369 %FUNCTION {output.bibitem}
\r
2371 % "\bibitem{" write$
\r
2376 % before.all 'output.state :=
\r
2379 FUNCTION { output.bibitem }
\r
2382 "\bibitem[\protect\citeauthoryear{" write$
\r
2390 before.all 'output.state :=
\r
2394 FUNCTION { output.issue.doi.coden.isxn.lccn.url }
\r
2395 { % enter and return with stack empty
\r
2396 %% We switch now from buffered output to output of complete lines, so
\r
2397 %% that the Issue .. URL data have their own lines, and are less likely
\r
2398 %% to be line-wrapped by BibTeX's short-sighted algorithm, which wraps
\r
2399 %% lines longer than 79 characters, backtracking to what it thinks is
\r
2400 %% a break point in the string. Any such wrapping MUST be undone to
\r
2401 %% prevent percent-newline from appearing in DOIs and URLs. The
\r
2402 %% output data are intentionally wrapped in \showxxx{} macros at
\r
2403 %% beginning of line, and that supply their own punctuation (if they
\r
2404 %% are not defined to suppress output entirely), to make it easier for
\r
2405 %% other software to recover them from .bbl files.
\r
2407 %% It also makes it possible to later change the macro definitions
\r
2408 %% to suppress particular output values, or alter their appearance.
\r
2410 %% Note that it is possible for theses, technical reports, and
\r
2411 %% manuals to have ISBNs, and anything that has an ISBN may also
\r
2412 %% have an ISSN. When there are no values for these keys, there
\r
2413 %% is no output generated for them here.
\r
2415 "\newblock" writeln
\r
2416 after.block 'output.state :=
\r
2420 output.coden % CODEN is functionally like ISSN, so output them sequentially
\r
2423 output.doi % DOI is ALWAYS last according to CrossRef DOI documentation
\r
2424 output.url % but ACM wants URL last
\r
2427 FUNCTION { output.issue.doi.coden.isxn.lccn.url.note }
\r
2428 { % enter with stack empty, return with empty string on stack
\r
2429 output.issue.doi.coden.isxn.lccn.url
\r
2430 note empty.or.unknown
\r
2433 "\newblock" writeln
\r
2440 FUNCTION { output.issue.doi.coden.isxn.lccn.url.note.check }
\r
2441 { % enter with stack empty, return with empty string on stack
\r
2442 output.issue.doi.coden.isxn.lccn.url
\r
2443 note empty.or.unknown
\r
2446 "\newblock" writeln
\r
2453 FUNCTION { article }
\r
2457 author empty.or.unknown
\r
2459 editor empty.or.unknown
\r
2460 { "neither author and editor supplied for " cite$ * warning$ }
\r
2461 { format.editors "editor" output.check }
\r
2464 { format.authors "author" output.check }
\r
2467 author format.no.key output % added
\r
2468 output.year.check % added
\r
2470 format.articletitle "title" output.check
\r
2472 howpublished output
\r
2475 { format.journal.volume.number.day.month.year }
\r
2477 "cross reference in @Article{...} is unusual" warning$
\r
2478 format.article.crossref output.nonnull
\r
2483 format.pages.check.without.articleno output
\r
2484 format.articleno.numpages output
\r
2486 output.issue.doi.coden.isxn.lccn.url.note
\r
2493 author empty.or.unknown
\r
2494 { format.editors "author and editor" output.check }
\r
2495 { format.authors output.nonnull
\r
2497 { "author and editor" editor either.or.check }
\r
2502 output.year.check % added
\r
2504 format.btitle "title" output.check
\r
2506 { new.sentence % jtb: start a new sentence for series/volume
\r
2507 format.bvolume output
\r
2509 format.number.series output
\r
2511 publisher "publisher" output.check
\r
2512 address "address" output.check % jtb: require address
\r
2514 pages empty.or.unknown
\r
2515 { format.bookpages } % use bookpages when pages empty
\r
2516 { format.pages.check "pages" tie.or.space.connect }
\r
2521 format.book.crossref output.nonnull
\r
2525 output.issue.doi.coden.isxn.lccn.url.note
\r
2529 FUNCTION { booklet }
\r
2532 format.authors output
\r
2533 author format.key output % added
\r
2534 output.year.check % added
\r
2536 format.title "title" output.check
\r
2538 howpublished output
\r
2541 output.issue.doi.coden.isxn.lccn.url.note
\r
2545 FUNCTION { inbook }
\r
2548 author empty.or.unknown
\r
2550 "author and editor" output.check
\r
2552 { format.authors output.nonnull
\r
2554 { "author and editor" editor either.or.check }
\r
2559 output.year.check % added
\r
2561 format.btitle "title" output.check
\r
2563 { new.sentence % jtb: start a new sentence for series/volume
\r
2564 format.bvolume output
\r
2566 format.number.series output
\r
2568 publisher "publisher" output.check
\r
2569 address "address" output.check % jtb: require address
\r
2570 format.bookpages output
\r
2571 format.chapter.pages
\r
2572 "chapter and pages" output.check % jtb: moved from before publisher
\r
2575 format.bookpages output
\r
2576 format.chapter.pages "chapter and pages" output.check
\r
2578 format.book.crossref output.nonnull
\r
2582 output.issue.doi.coden.isxn.lccn.url.note
\r
2586 FUNCTION { incollection }
\r
2589 format.authors "author" output.check
\r
2590 author format.key output % added
\r
2591 output.year.check % added
\r
2593 format.articletitle "title" output.check
\r
2596 { format.in.ed.booktitle "booktitle" output.check
\r
2597 new.sentence % jtb: start a new sentence for series/volume
\r
2598 format.bvolume output
\r
2599 format.number.series output
\r
2601 publisher "publisher" output.check
\r
2602 address "address" output.check % jtb: require address
\r
2603 format.bookpages output
\r
2604 format.chapter.pages output % gnp - was special.output.nonnull
\r
2605 % left out comma before page numbers
\r
2606 % jtb: moved from before publisher
\r
2609 format.incoll.inproc.crossref output.nonnull
\r
2610 format.chapter.pages output
\r
2614 output.issue.doi.coden.isxn.lccn.url.note
\r
2618 FUNCTION { inproceedings }
\r
2621 format.authors "author" output.check
\r
2622 author format.key output % added
\r
2623 output.year.check % added
\r
2625 format.articletitle "title" output.check
\r
2626 howpublished output.dot.space
\r
2629 journal missing$ % jtb: proceedings appearing in journals
\r
2630 { format.in.emphasize.booktitle format.city "booktitle" output.check.dot.space
\r
2631 format.series output.removenospace
\r
2632 format.editors.fml output % BV 2011/09/27 Moved dot to comma
\r
2633 format.bvolume.noseries output
\r
2635 organization output
\r
2636 publisher "publisher" output.check % jtb: require publisher (?)
\r
2637 address "address" output.check % jtb: require address
\r
2638 format.bookpages output
\r
2641 format.in.booktitle format.city "booktitle" output.check
\r
2642 format.editors.fml output
\r
2644 format.journal.volume.number.day.month.year output
\r
2647 format.articleno output
\r
2648 format.pages.check.without.articleno output
\r
2651 format.incoll.inproc.crossref output.nonnull
\r
2652 format.articleno output
\r
2653 format.pages.check.without.articleno output
\r
2656 format.articleno.numpages output
\r
2658 output.issue.doi.coden.isxn.lccn.url.note
\r
2662 FUNCTION { conference } { inproceedings }
\r
2664 FUNCTION { manual }
\r
2667 author empty.or.unknown
\r
2668 { editor empty.or.unknown
\r
2669 { organization "organization" output.check
\r
2670 organization format.key output } % if all else fails, use key
\r
2671 { format.editors "author and editor" output.check }
\r
2674 { format.authors output.nonnull }
\r
2676 output.year.check % added
\r
2678 format.btitle "title" output.check
\r
2679 organization address new.block.checkb
\r
2680 % jtb: back to normal style: organization, address
\r
2681 organization "organization" output.check
\r
2684 output.issue.doi.coden.isxn.lccn.url.note
\r
2688 FUNCTION { mastersthesis }
\r
2691 format.authors "author" output.check
\r
2692 author format.key output % added
\r
2693 output.year.check % added
\r
2695 format.title emphasize "title" output.check % NB: ACM style requires emphasized thesis title
\r
2697 "Master's\ thesis" format.thesis.type output new.sentence % Added dot. BV 2011/09/27
\r
2698 school "school" output.check
\r
2701 format.advisor output
\r
2703 output.issue.doi.coden.isxn.lccn.url.note
\r
2710 format.authors output
\r
2711 author format.key output % added
\r
2712 output.year.check % added
\r
2713 title howpublished new.block.checkb
\r
2714 format.title output
\r
2716 howpublished output
\r
2717 "" output.nonnull.dot.space
\r
2718 output.day.month.year % Gerry - appears odd if (only) the year is 'repeated' but (appears) 'valuable' if the month/day is _also_ included - 2011/09/28
\r
2720 output.issue.doi.coden.isxn.lccn.url.note
\r
2724 FUNCTION { phdthesis }
\r
2727 format.authors "author" output.check
\r
2728 author format.key output % added
\r
2729 output.year.check % added
\r
2731 format.title emphasize "title" output.check % NB: ACM style requires emphasized thesis title
\r
2733 "Ph.D. Dissertation" format.thesis.type output new.sentence % Added dot. BV 2011/09/27
\r
2734 school "school" output.check
\r
2737 format.advisor output
\r
2739 output.issue.doi.coden.isxn.lccn.url.note
\r
2743 FUNCTION {format.date}
\r
2744 { year empty.or.unknown
\r
2745 { month empty.or.unknown
\r
2747 "" % output empty date if year/month both empty
\r
2748 day empty.or.unknown
\r
2750 { "there's a day but no month or year in " cite$ * warning$ }
\r
2753 { "there's a month but no year in " cite$ * warning$
\r
2755 day empty.or.unknown
\r
2762 { month empty.or.unknown
\r
2764 year % output only year if month empty
\r
2765 day empty.or.unknown
\r
2767 { "there's a day and year but no month in " cite$ * warning$ }
\r
2772 day empty.or.unknown
\r
2783 FUNCTION {new.block.checka}
\r
2791 FUNCTION { periodical }
\r
2794 editor empty.or.unknown
\r
2795 { organization output }
\r
2796 { format.editors output.nonnull }
\r
2799 title emphasize "title" output.check
\r
2800 format.date output
\r
2804 howpublished new.block.checka
\r
2805 howpublished output
\r
2807 output.issue.doi.coden.isxn.lccn.url.note
\r
2811 FUNCTION { proceedings }
\r
2814 editor empty.or.unknown
\r
2815 { organization output
\r
2816 organization format.key output } % gnp - changed from author format.key
\r
2817 { format.editors output.nonnull }
\r
2819 % author format.key output % gnp - removed (should be either
\r
2820 % editor or organization
\r
2821 output.year.check % added (newapa)
\r
2823 format.btitle format.city "title" output.check % jtb: added city
\r
2825 format.bvolume output
\r
2826 format.number.series output
\r
2828 organization output
\r
2829 % jtb: normal order: publisher, address
\r
2833 output.issue.doi.coden.isxn.lccn.url.note
\r
2837 FUNCTION { techreport }
\r
2840 format.authors "author" output.check
\r
2841 author format.key output % added
\r
2842 output.year.check % added
\r
2844 format.btitle "title" output.check
\r
2846 % format.tr.number output % jtb: moved month ...
\r
2847 format.tr.number output new.sentence % Gerry - need dot 2011/09/28
\r
2848 institution "institution" output.check
\r
2851 format.named.pages output
\r
2852 % ACM omits year at end in transactions style
\r
2853 % format.day.month.year output.nonnull.dot.space % jtb: ... to here (no parens)
\r
2855 output.issue.doi.coden.isxn.lccn.url.note
\r
2859 FUNCTION { unpublished }
\r
2863 "author" output.check
\r
2864 author format.key output % added
\r
2865 output.year.check % added
\r
2867 format.title "title" output.check
\r
2869 output.day.month.year % UTAH
\r
2871 output.issue.doi.coden.isxn.lccn.url.note.check
\r
2875 FUNCTION { default.type } { misc }
\r
2877 %%% ACM journal-style month definitions: full name if 1--5 letters, else
\r
2878 %%% abbreviation of 3 or 4 characters and a dot
\r
2880 MACRO {jan} {"Jan."}
\r
2882 MACRO {feb} {"Feb."}
\r
2884 MACRO {mar} {"March"}
\r
2886 MACRO {apr} {"April"}
\r
2888 MACRO {may} {"May"}
\r
2890 MACRO {jun} {"June"}
\r
2892 MACRO {jul} {"July"}
\r
2894 MACRO {aug} {"Aug."}
\r
2896 MACRO {sep} {"Sept."}
\r
2898 MACRO {oct} {"Oct."}
\r
2900 MACRO {nov} {"Nov."}
\r
2902 MACRO {dec} {"Dec."}
\r
2905 %%% ====================================================================
\r
2906 %%% I M P O R T A N T C H A N G E
\r
2908 %%% For the 2009 release of the official acm-*.bst files, there are to
\r
2909 %%% be NO predefined journal abbreviations in those style files.
\r
2911 %%% ACM may later develop an official list of mappings of full journal
\r
2912 %%% names of commonly-cited journals to ACM-preferred abbreviations, but
\r
2913 %%% authors should consider that use of any of these commented-out
\r
2914 %%% abbreviations is DEPRECATED unless the BibTeX file itself provides
\r
2915 %%% its own @String{name = "value"} definitions.
\r
2917 %%% Use of journal (and publisher and address) @String{...}
\r
2918 %%% abbreviations, as opposed to explicit value assignments such as
\r
2919 %%% journal = "J. ACM" and publisher = "IEEE", is preferred in
\r
2920 %%% bibliographic databases, because it makes it easier for journal
\r
2921 %%% production staff to replace those definitions by publisher-preferred
\r
2922 %%% abbreviations when articles are typeset for publication.
\r
2924 %%% For historical reasons, and because some of these abbreviations are
\r
2925 %%% used in other (non-ACM) bibliography style files, they are preserved
\r
2926 %%% here in comments. Future releases of the acm*-.bst files are likely
\r
2927 %%% to remove them entirely.
\r
2928 %%% ====================================================================
\r
2930 %%% DEPRECATED: MACRO {acmcs} {"ACM Comput. Surv."} % original BibTeX
\r
2932 %%% DEPRECATED: MACRO {acmlett} {"ACM Lett. Program. Lang. Syst."}
\r
2934 %%% DEPRECATED: MACRO {acta} {"Acta Inf."} % original BibTeX
\r
2936 %%% DEPRECATED: MACRO {ai} {"Artificial Intelligence"}
\r
2938 %%% DEPRECATED: MACRO {al} {"Ada Lett."}
\r
2940 %%% DEPRECATED: MACRO {acr} {"Adv. Comput. Res."}
\r
2942 %%% DEPRECATED: MACRO {bit} {"Bit"}
\r
2944 %%% DEPRECATED: MACRO {cacm} {"Commun. ACM"} % original BibTeX
\r
2946 %%% DEPRECATED: MACRO {cj} {"Comput. J."}
\r
2948 %%% DEPRECATED: MACRO {cn} {"Comput. Netw."}
\r
2950 %%% DEPRECATED: MACRO {cl} {"Comput. Lang."}
\r
2952 %%% DEPRECATED: MACRO {ibmjrd} {"IBM J. Res. and Development"} % original BibTeX
\r
2954 %%% DEPRECATED: MACRO {ibmsj} {"IBM Systems Journal"} % original BibTeX
\r
2956 %%% DEPRECATED: MACRO {ict} {"Inf. Contr."}
\r
2958 %%% DEPRECATED: MACRO {ieebcs} {"IEE/BCS Softw. Eng. J."}
\r
2960 %%% DEPRECATED: MACRO {ieees} {"IEEE Softw."}
\r
2962 %%% DEPRECATED: MACRO {ieeese} {"IEEE Trans. Softw. Eng."} % original BibTeX
\r
2964 %%% DEPRECATED: MACRO {ieeetc} {"IEEE Trans. Comput."} % original BibTeX
\r
2966 %%% DEPRECATED: MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} % original BibTeX
\r
2968 %%% DEPRECATED: MACRO {ieeetpds} {"IEEE Trans. Parall. Distrib. Syst."}
\r
2970 %%% DEPRECATED: MACRO {ieeetit} {"IEEE Trans. Inf. Theory"}
\r
2972 %%% DEPRECATED: MACRO {ipl} {"Inf. Process. Lett."} % original BibTeX
\r
2974 %%% DEPRECATED: MACRO {icp} {"Inf. Comput."}
\r
2976 %%% DEPRECATED: MACRO {ist} {"Inf. Softw. Tech."}
\r
2978 %%% DEPRECATED: MACRO {ijsa} {"Int. J. Supercomput. Appl."}
\r
2980 %%% DEPRECATED: MACRO {ijpp} {"Int. J. Parallel Program."}
\r
2982 %%% DEPRECATED: MACRO {jacm} {"J. ACM"} % original BibTeX
\r
2984 %%% DEPRECATED: % MACRO {jcss} {"Journal of Computer and System Sciences"} % original BibTeX
\r
2985 %%% DEPRECATED: MACRO {jcss} {"J. Comput. Syst. Sci."} % original BibTeX
\r
2987 %%% DEPRECATED: MACRO {jlp} {"J. Logic Program."}
\r
2989 %%% DEPRECATED: MACRO {jfp} {"J. Funct. Program."}
\r
2991 %%% DEPRECATED: MACRO {jsmrp} {"J. Softw. Maint. Res. Pract."}
\r
2993 %%% DEPRECATED: MACRO {jss} {"J. Syst. Softw."}
\r
2995 %%% DEPRECATED: MACRO {jlc} {"J. Logic and Comput."}
\r
2997 %%% DEPRECATED: MACRO {jlsc} {"J. Lisp Symb. Comput."}
\r
2999 %%% DEPRECATED: MACRO {lpls} {"Lett. Program. Lang. Syst."}
\r
3001 %%% DEPRECATED: MACRO {mor} {"Math. Oper. Res."}
\r
3003 %%% DEPRECATED: MACRO {mscs} {"Math. Struct. Comput. Sci."}
\r
3005 %%% DEPRECATED: MACRO {mst} {"Math. Syst. Theor."}
\r
3007 %%% DEPRECATED: MACRO {ngc} {"New Gen. Comput."}
\r
3009 %%% DEPRECATED: MACRO {scp} {"Sci. Comput. Program."} % original BibTeX
\r
3011 %%% DEPRECATED: MACRO {sicomp} {"SIAM J. Comput."} % original BibTeX
\r
3013 %%% DEPRECATED: MACRO {spe} {"Softw. Pract. Exper."}
\r
3015 %%% DEPRECATED: MACRO {tocs} {"ACM Trans. Comput. Syst."} % original BibTeX
\r
3017 %%% DEPRECATED: MACRO {tods} {"ACM Trans. Database Syst."} % original BibTeX
\r
3019 %%% DEPRECATED: MACRO {tog} {"ACM Trans. Graphics"} % original BibTeX
\r
3021 %%% DEPRECATED: MACRO {toms} {"ACM Trans. Math. Softw."} % original BibTeX
\r
3023 %%% DEPRECATED: MACRO {toois} {"ACM Trans. Office Inf. Syst."} % original BibTeX
\r
3025 %%% DEPRECATED: MACRO {toplas} {"ACM Trans. Program. Lang. Syst."} % original BibTeX
\r
3027 %%% DEPRECATED: MACRO {tcs} {"Theor. Comput. Sci."} % original BibTeX
\r
3029 %%% DEPRECATED: MACRO {tr} {"Tech. Rep."}
\r
3030 %%% ====================================================================
\r
3034 FUNCTION { sortify }
\r
3040 FUNCTION { chop.word }
\r
3044 s #1 len substring$ =
\r
3045 { s len #1 + global.max$ substring$ }
\r
3050 FUNCTION { sort.format.names }
\r
3055 s num.names$ 'numnames :=
\r
3056 numnames 'namesleft :=
\r
3057 { namesleft #0 > }
\r
3062 % s nameptr "{ff{ } }{ll{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
\r
3063 s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
\r
3064 nameptr numnames = t "others" = and
\r
3068 nameptr #1 + 'nameptr :=
\r
3069 namesleft #1 - 'namesleft :=
\r
3074 FUNCTION { sort.format.title }
\r
3079 "The " #4 t chop.word
\r
3083 #1 global.max$ substring$
\r
3086 FUNCTION { author.sort }
\r
3088 author empty.or.unknown
\r
3089 { key empty.or.unknown
\r
3090 { "to sort, need author or key in " cite$ * warning$
\r
3095 { author sort.format.names }
\r
3099 FUNCTION { author.editor.sort }
\r
3101 author empty.or.unknown
\r
3103 editor empty.or.unknown
\r
3105 key empty.or.unknown
\r
3106 { "to sort, need author, editor, or key in " cite$ * warning$
\r
3112 { editor sort.format.names }
\r
3115 { author sort.format.names }
\r
3119 FUNCTION { author.organization.sort }
\r
3121 % added - GNP. Stack author or organization for sorting (from alpha.bst).
\r
3122 % Unlike alpha.bst, we need entire names, not abbreviations
\r
3124 author empty.or.unknown
\r
3125 { organization empty.or.unknown
\r
3126 { key empty.or.unknown
\r
3127 { "to sort, need author, organization, or key in " cite$ * warning$
\r
3133 { organization sortify }
\r
3136 { author sort.format.names }
\r
3140 FUNCTION { editor.organization.sort }
\r
3142 % added - GNP. Stack editor or organization for sorting (from alpha.bst).
\r
3143 % Unlike alpha.bst, we need entire names, not abbreviations
\r
3145 editor empty.or.unknown
\r
3146 { organization empty.or.unknown
\r
3147 { key empty.or.unknown
\r
3148 { "to sort, need editor, organization, or key in " cite$ * warning$
\r
3154 { organization sortify }
\r
3157 { editor sort.format.names }
\r
3161 FUNCTION { presort }
\r
3163 % Presort creates the bibentry's label via a call to calc.label, and then
\r
3164 % sorts the entries based on entry type. Chicago.bst adds support for
\r
3165 % including organizations as the sort key; the following is stolen from
\r
3168 calc.label sortify % recalculate bibitem label
\r
3169 year field.or.null purify$ #-1 #4 substring$ * % add year
\r
3175 'author.editor.sort
\r
3176 { type$ "proceedings" =
\r
3177 'editor.organization.sort
\r
3178 { type$ "manual" =
\r
3179 'author.organization.sort
\r
3186 #1 entry.max$ substring$ % added for newapa
\r
3187 'sort.label := % added for newapa
\r
3188 sort.label % added for newapa
\r
3192 title field.or.null
\r
3195 #1 entry.max$ substring$
\r
3199 ITERATE { presort }
\r
3201 SORT % by label, year, author/editor, title
\r
3203 FUNCTION { initialize.extra.label.stuff }
\r
3204 { #0 int.to.chr$ 'last.label :=
\r
3206 #0 'last.extra.num :=
\r
3209 FUNCTION { forward.pass }
\r
3211 % Pass through all entries, comparing current entry to last one.
\r
3212 % Need to concatenate year to the stack (done by calc.label) to determine
\r
3213 % if two entries are the same (see presort)
\r
3216 % OLD:calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
\r
3218 author.key.label year field.or.null purify$ #-1 #4 substring$ * % add year
\r
3219 #1 entry.max$ substring$ = % are they equal?
\r
3220 { last.extra.num #1 + 'last.extra.num :=
\r
3221 last.extra.num int.to.chr$ 'extra.label :=
\r
3223 { "a" chr.to.int$ 'last.extra.num :=
\r
3224 "" 'extra.label :=
\r
3225 % OLD: calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
\r
3227 author.key.label year field.or.null purify$ #-1 #4 substring$ * % add year
\r
3228 #1 entry.max$ substring$ 'last.label := % assign to last.label
\r
3233 FUNCTION { reverse.pass }
\r
3236 { "a" 'extra.label := }
\r
3239 label.year extra.label * 'sort.year :=
\r
3240 extra.label 'next.extra :=
\r
3243 EXECUTE {initialize.extra.label.stuff}
\r
3245 ITERATE {forward.pass}
\r
3247 REVERSE {reverse.pass}
\r
3249 FUNCTION { bib.sort.order }
\r
3254 year field.or.null sortify
\r
3258 title field.or.null
\r
3261 #1 entry.max$ substring$
\r
3265 ITERATE { bib.sort.order }
\r
3267 SORT % by sort.label, year, title --- giving final bib. order.
\r
3269 FUNCTION { begin.bib }
\r
3271 %% Set to #0 show 13-digit ISBN in preference to 10-digit ISBN.
\r
3272 %% Set to #1 to show both 10-digit and 13-digit ISBNs.
\r
3273 #1 'show-isbn-10-and-13 :=
\r
3275 "%%% -*-BibTeX-*-" writeln
\r
3276 "%%% Do NOT edit. File created by BibTeX with style" writeln
\r
3277 "%%% ACM-Reference-Format-Journals [18-Jan-2012]." writeln
\r
3280 preamble$ empty.or.unknown
\r
3282 { preamble$ writeln }
\r
3284 "\begin{thebibliography}{00}" writeln
\r
3286 "%%% ====================================================================" writeln
\r
3287 "%%% NOTE TO THE USER: you can override these defaults by providing" writeln
\r
3288 "%%% customized versions of any of these macros before the \bibliography" writeln
\r
3289 "%%% command. Each of them MUST provide its own final punctuation," writeln
\r
3290 "%%% except for \shownote{}, \showDOI{}, and \showURL{}. The latter two" writeln
\r
3291 "%%% do not use final punctuation, in order to avoid confusing it with" writeln
\r
3292 "%%% the Web address." writeln
\r
3294 "%%% To suppress output of a particular field, define its macro to expand" writeln
\r
3295 "%%% to an empty string, or better, \unskip, like this:" writeln
\r
3297 "%%% \newcommand{\showDOI}[1]{\unskip} % LaTeX syntax" writeln
\r
3299 "%%% \def \showDOI #1{\unskip} % plain TeX syntax" writeln
\r
3301 "%%% ====================================================================" writeln
\r
3304 %% ACM publications do not use CODEN, ISSN, and LCCN data, so their default
\r
3305 %% macro wrappers expand to \unskip, discarding their values and unwanted
\r
3308 %% For other publications, prior definitions like these may be useful:
\r
3311 %% \def \showCODEN #1{CODEN #1.}
\r
3312 %% \def \showISSN #1{ISSN #1.}
\r
3313 %% \def \showLCCN #1{LCCN #1.}
\r
3316 %% \newcommand{\showCODEN}[1]{CODEN #1.}
\r
3317 %% \newcommand{\showISSN}[1]#1{ISSN #1.}
\r
3318 %% \newcommand{\showLCCN}[1]{LCCN #1.}
\r
3320 "\ifx \showCODEN \undefined \def \showCODEN #1{\unskip} \fi" writeln
\r
3321 "\ifx \showDOI \undefined \def \showDOI #1{{\tt DOI:}\penalty0{#1}\ } \fi" writeln
\r
3322 % ACM styles omit ISBNs, but they can be included by suitable definitions of
\r
3323 % \showISBNx and \showISBNxiii before the .bbl file is read
\r
3324 "\ifx \showISBNx \undefined \def \showISBNx #1{\unskip} \fi" writeln
\r
3325 "\ifx \showISBNxiii \undefined \def \showISBNxiii #1{\unskip} \fi" writeln
\r
3326 "\ifx \showISSN \undefined \def \showISSN #1{\unskip} \fi" writeln
\r
3327 "\ifx \showLCCN \undefined \def \showLCCN #1{\unskip} \fi" writeln
\r
3328 "\ifx \shownote \undefined \def \shownote #1{#1} \fi" writeln % NB: final period supplied by add.period$ above
\r
3329 "\ifx \showarticletitle \undefined \def \showarticletitle #1{#1} \fi" writeln
\r
3330 "\ifx \showURL \undefined \def \showURL #1{#1} \fi" writeln
\r
3333 EXECUTE {begin.bib}
\r
3335 EXECUTE {init.state.consts}
\r
3337 ITERATE {call.type$}
\r
3339 FUNCTION { end.bib }
\r
3342 "\end{thebibliography}"
\r
3348 %%% End of ACM-Reference-Format-Journals.bst V1.00 - 18 January 2012
\r