2 %%% ====================================================================
3 %%% @BibTeX-style-file{
4 %%% author = "Nelson H. F. Beebe, Boris Veytsman and Gerald Murray",
6 %%% date = "18 January 2012",
7 %%% time = "11:48 EST",
8 %%% filename = "ACM-Reference-Format-Journals.bst",
9 %%% address = "University of Utah
10 %%% Department of Mathematics, 110 LCB
11 %%% 155 S 1400 E RM 233
12 %%% Salt Lake City, UT 84112-0090
14 %%% telephone = "+1 801 581 5254",
15 %%% FAX = "+1 801 581 4148",
16 %%% URL = "http://www.math.utah.edu/~beebe",
17 %%% checksum = "available here: http://www.acm.org/publications/latex_style/CRC-journals.txt"
18 %%% email = "beebe@math.utah.edu, beebe@acm.org,
19 %%% beebe@computer.org, borisv@lk.net, murray@hq.acm.org",
20 %%% codetable = "ISO/ASCII",
21 %%% keywords = "ACM Transactions bibliography style; BibTeX",
22 %%% license = "public domain",
23 %%% supported = "yes",
25 %%% docstring = "The checksum field, above, is produced by WinMD5Free (v1.20)
26 %%% available from http://www.winmd5.com/?rid=winmd5,"
28 %%% ====================================================================
30 % "SIGCHI Format" BibTeX style, Forked from ACM-Reference-Format-Journals.bst
31 % Modifications 13-FEBURARY-2015 (David Ayman Shamma)
33 % "ACM Transactions" BibTeX style, ACM-Reference-Format-Journals.bst
34 % for BibTeX version 0.99c, LaTeX version 3.141
35 % ACM extensions with code cleaned up, extended, and debugged 10--15-Nov-2008
36 % Revised 17-APRIL-2008 (Nelson)
37 % Revised 13-MARCH-2011 (Boris/Gerry)
38 % Revised 23-MARCH-2011 (Boris/Gerry)
39 % Revised 27-MARCH-2011 (Boris/Gerry)
40 % Revised 15-APRIL-2011 (Boris/Gerry)
41 % Revised 27-SEPTEMBER-2011 (Boris)
46 % Based on 'acmtrans' (for ACM Journals)
47 % Date: 28th April 2008
49 % 1. Avoid 'repeating' the 'month' values.
50 % 2. Avoid incorrectly italicizing the volume number.
51 % 3. Avoid non italicizing certain titles (book, inproceedings etc).
52 % 4. NO series if there is NO volume.
53 % 5. Sorting of reference with first surname.
54 % 6. Article no added for Inproceedings.
58 % 1. Abbreviation list added
60 % Citation format: [author-last-name year]
61 % [author-last-name and author-last-name year]
62 % [author-last-name, author-last-name, and author-last-name year]
63 % [author-last-name et al. year]
65 % author-last-name [year]
66 % [author-last-name and author-last-name]
67 % [author-last-name et al.]
68 % [year] or [year,year]
71 % Reference list ordering: alphabetical by author or whatever passes
72 % for author in the absence of one.
74 % Features of the old acmtrans.bst:
75 % =================================
77 % - all authors appear last name first.
78 % - all pages are listed xx-xx, (no pp.) and are at the end of the reference
79 % - publishers are identified as publisher, address
80 % - conferences papers (inproceedings) may give city of conference,
81 % date of conference, and journal that the proceedings appear in.
82 % - months abbreviated to max four letters (eg. Mar.)
83 % - volume of a series indicated after the title of the series
84 % - editors appear after edited title and are identified by a trailing "Eds."
85 % not in parentheses. Editor names are not given in small caps.
86 % (unless there is no author line)
87 % - names terminated with a period even if there is no first name.
88 % - editions are indicated trailing after the work, not in parentheses.
89 % - "et al." citations have a protected period to avoid bad spacing (jrh)
90 % - "address" required when publisher given
91 % - series (roman) and volume are in a sentence separate from (book-)title
94 % Features of chicago.bst:
95 % =======================
97 % - full names used in citations, but abbreviated citations are available
99 % - if an entry has a "month", then the month and year are also printed
100 % as part of that bibitem.
101 % - all conjunctions use "and" instead of "\&"
102 % - major modification from Chicago Manual of Style (13th ed.) is that
103 % only the first author in a reference appears last name first-
104 % additional authors appear as J. Q. Public.
105 % - pages are listed as "pp. xx-xx" in all entry types except
107 % - book, inbook, and manual use "location: publisher" (or organization)
108 % for address and publisher. All other types list publishers separately.
109 % - "pp." are used to identify page numbers for all entry types except
111 % - organization is used as a citation label if neither author nor editor
112 % is present (for manuals).
113 % - "et al." is used for long author and editor lists, or when "others"
116 % Modifications and bug fixes from newapa.bst:
117 % ===========================================
119 % - added month, year to bib entries if month is present
120 % - fixed bug with In proceedings, added necessary comma after title
121 % - all conjunctions changed to "and" from "\&"
122 % - fixed bug with author labels in my.full.label: "et al." now is
123 % generated when "others" is an author name
124 % - major modification from Chicago Manual of Style (13th ed.) is that
125 % only the first author in a reference appears last name first-
126 % additional authors appear as J. Q. Public.
127 % - pages are listed as "pp. xx-xx" in all entry types except
128 % article entries. Unnecessary (IMHO) "()" around page numbers
129 % were removed, and page numbers now don't end with a period.
130 % - created chicago.sty for use with this bibstyle (required).
131 % - fixed bugs in FUNCTION {format.vol.num.pages} for missing volume,
132 % number, and /or pages. Renamed to format.journal.volume.number.
133 % - fixed bug in formatting booktitles: additional period an error if
135 % - fixed bug: editors usually given redundant period before next clause
136 % (format.editors.dot) removed.
137 % - added label support for organizations, if both author and editor
138 % are missing (from alpha.bst). If organization is too long, then
139 % the key field is used for abbreviated citations.
140 % - In proceedings or books of several volumes, no comma was written
141 % between the "Volume x" and the page numbers (this was intentional
142 % in newapa.bst). Fixed.
143 % - Some journals may not have volumes/numbers, only month/year (eg.
144 % IEEE Computer). Fixed bug in article style that assumed volume/number
145 % was always present.
147 % Original documentation for newapa.sty:
148 % =====================================
150 % This version was made by modifying the master file made by
151 % Oren Patashnik (PATASHNIK@SCORE.STANFORD.EDU), and the 'named' BibTeX
152 % style of Peter F. Patel-Schneider.
154 % Copyright (C) 1985, all rights reserved.
155 % Copying of this file is authorized only if either
156 % (1) you make absolutely no changes to your copy, including name, or
157 % (2) if you do make changes, you name it something other than 'newapa.bst'.
158 % There are undoubtably bugs in this style. If you make bug fixes,
159 % improvements, etc. please let me know. My e-mail address is:
160 % spencer@cgrg.ohio.state.edu or 71160.3141@compuserve.com
162 % This style was made from 'plain.bst', 'named.bst', and 'apalike.bst',
163 % with lots of tweaking to make it look like APA style, along with tips
164 % from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
167 % Start of ACM-Reference-Format-Journals.bst
169 % Note: Many of the new bibentry 'fields' will only work with the
170 % 'ACM-Reference-Format-Journals.bst' file. Legacy .bib files (which will, in all probability,
171 % NOT contain these new fields) will _still_ work with the ACM-Reference-Format-Journals.bst.
200 % New keys recognized
201 issue % UTAH: used in, e.g., ACM SIGSAM Bulletin and ACM Communications in Computer Algebra
203 day % UTAH: needed for newspapers, weeklies, bi-weeklies
208 lastaccessed % UTAH: used only for @Misc{...}
216 { label.year extra.label sort.year sort.label }
218 INTEGERS { output.state before.all mid.sentence after.sentence after.block }
220 INTEGERS { show-isbn-10-and-13 } % initialized below in begin.bib
222 INTEGERS { nameptr namesleft numnames }
224 INTEGERS { multiresult }
228 INTEGERS { last.extra.num }
230 STRINGS { s t t.org u }
232 STRINGS { last.label next.extra }
234 STRINGS { p1 p2 p3 page.count }
236 FUNCTION { dump.stack.1 }
238 duplicate$ "STACK[top] = [" swap$ * "]" * warning$
241 FUNCTION { dump.stack.2 }
243 duplicate$ "STACK[top ] = [" swap$ * "]" * warning$
245 duplicate$ "STACK[top-1] = [" swap$ * "]" * warning$
249 FUNCTION { empty.or.unknown }
251 %% Examine the top stack entry, and push 1 if it is empty, or
252 %% consists only of whitespace, or is a string beginning with two
253 %% queries (??), and otherwise, push 0.
255 %% This function provides a replacement for empty$, with the
256 %% convenient feature that unknown values marked by two leading
257 %% queries are treated the same as missing values, and thus, do not
258 %% appear in the output .bbl file, and yet, their presence in .bib
259 %% file(s) serves to mark values which are temporarily missing, but
260 %% are expected to be filled in eventually once more data is
261 %% obtained. The TeX User Group and BibNet bibliography archives
262 %% make extensive use of this practice.
264 %% An empty string cannot serve the same purpose, because just as in
265 %% statistics data processing, an unknown value is not the same as an
268 %% At entry: stack = ... top:[string]
269 %% At exit: stack = ... top:[0 or 1]
273 { #1 #2 substring$ "??" = }
279 %% In BibTeX style files, the sequences
281 %% ... "one" "two" output
282 %% ... "one" "two" output.xxx
284 %% ship "one" to the output file, possibly following by punctuation,
285 %% leaving the stack with
289 %% There is thus a one-string lag in output processing that must be
290 %% carefully handled to avoid duplicating a string in the output
291 %% file. Unless otherwise noted, all output.xxx functions leave
292 %% just one new string on the stack, and that model should be born
293 %% in mind when reading or writing function code.
295 %% BibTeX's asynchronous buffering of output from strings from the
296 %% stack is confusing because newline$ bypasses the buffer. It
297 %% would have been so much easier for newline to be a character
298 %% rather than a state of the output-in-progress.
300 %% The documentation in btxhak.dvi is WRONG: it says
302 %% newline$ Writes onto the bbl file what's accumulated in the
303 %% output buffer. It writes a blank line if and only
304 %% if the output buffer is empty. Since write$ does
305 %% reasonable line breaking, you should use this
306 %% function only when you want a blank line or an
307 %% explicit line break.
309 %% write$ Pops the top (string) literal and writes it on the
310 %% output buffer (which will result in stuff being
311 %% written onto the bbl file when the buffer fills
314 %% Examination of the BibTeX source code shows that write$ does
315 %% indeed behave as claimed, but newline$ sends a newline character
316 %% directly to the output file, leaving the stack unchanged. The
317 %% first line "Writes onto ... buffer." is therefore wrong.
319 %% The original BibTeX style files almost always use "write$ newline$"
320 %% in that order, so it makes sense to hide that pair in a private
321 %% function like this one, named after a statement in Pascal,
322 %% the programming language embedded in the BibTeX Web program.
324 write$ % output top-of-stack string
325 newline$ % immediate write of newline (not via stack)
328 FUNCTION { init.state.consts }
332 #2 'after.sentence :=
336 FUNCTION { output.nonnull }
337 { % Stack in: ... R S T Stack out: ... R T File out: S<comma><space>
339 output.state mid.sentence =
344 output.state after.block =
350 output.state before.all =
355 add.period$ " " * write$
360 mid.sentence 'output.state :=
366 FUNCTION { output.nonnull.dot.space }
367 { % Stack in: ... R S T Stack out: ... R T File out: S<dot><space>
369 output.state mid.sentence = % { "<DEBUG output.nonnull.dot.space>. " * write$ }
374 output.state after.block =
376 add.period$ writeln "\newblock " write$
379 output.state before.all =
384 add.period$ " " * write$
389 mid.sentence 'output.state :=
395 FUNCTION { output.nonnull.remove }
396 { % Stack in: ... R S T Stack out: ... R T File out: S<space>
398 output.state mid.sentence =
403 output.state after.block =
405 add.period$ writeln "\newblock " write$
408 output.state before.all =
413 add.period$ " " * write$
418 mid.sentence 'output.state :=
424 FUNCTION { output.nonnull.removenospace }
425 { % Stack in: ... R S T Stack out: ... R T File out: S
427 output.state mid.sentence =
432 output.state after.block =
434 add.period$ writeln "\newblock " write$
437 output.state before.all =
442 add.period$ " " * write$
447 mid.sentence 'output.state :=
454 { % discard top token if empty, else like output.nonnull
455 duplicate$ empty.or.unknown
461 FUNCTION { output.dot.space }
462 { % discard top token if empty, else like output.nonnull.dot.space
463 duplicate$ empty.or.unknown
465 'output.nonnull.dot.space
469 FUNCTION { output.removenospace }
470 { % discard top token if empty, else like output.nonnull.removenospace
471 duplicate$ empty.or.unknown
473 'output.nonnull.removenospace
477 FUNCTION { output.check }
478 { % like output, but warn if key name on top-of-stack is not set
480 duplicate$ empty.or.unknown
481 { pop$ "empty " t * " in " * cite$ * warning$ }
486 FUNCTION { output.check.dot.space }
487 { % like output.dot.space, but warn if key name on top-of-stack is not set
489 duplicate$ empty.or.unknown
490 { pop$ "empty " t * " in " * cite$ * warning$ }
491 'output.nonnull.dot.space
495 FUNCTION { fin.block }
496 { % functionally, but not logically, identical to fin.entry
501 FUNCTION { fin.entry }
507 FUNCTION { new.sentence }
508 { % update sentence state, with neither output nor stack change
509 output.state after.block =
512 output.state before.all =
514 { after.sentence 'output.state := }
520 FUNCTION { fin.sentence }
528 FUNCTION { new.block }
530 output.state before.all =
532 { after.block 'output.state := }
536 FUNCTION { output.coden } % UTAH
537 { % output non-empty CODEN as one-line sentence (stack untouched)
538 coden empty.or.unknown
540 { "\showCODEN{" coden * "}" * writeln }
544 FUNCTION { format.articleno }
546 articleno empty.or.unknown
549 numpages empty.or.unknown
550 { "articleno field, but no numpages field, in " cite$ * warning$ }
553 "Article " articleno *
558 FUNCTION { format.year }
559 { % push year string or "????" onto output stack
560 %% Because year is a mandatory field, we always force SOMETHING
562 year empty.or.unknown
568 FUNCTION { format.day.month }
569 { % push "day month " or "month " or "" onto output stack
572 month empty.or.unknown
578 month empty.or.unknown
580 { day " " * month * " " *}
586 FUNCTION { format.day.month.year } % UTAH
587 { % if month is empty, push "" else push "(MON.)" or "(DD MON.)"
588 % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.)
589 % acm-*.bst addition: prefix parenthesized date string with
591 articleno empty.or.unknown
593 { ", " format.articleno * }
595 " (" * format.day.month * format.year * ")" *
598 FUNCTION { output.day.month.year } % UTAH
599 { % if month is empty value, do nothing; else output stack top and
600 % leave with new top string "(MON.)" or "(DD MON.)"
601 % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.)
602 format.day.month.year
603 output.nonnull.remove
606 FUNCTION { strip.doi } % UTAH
607 { % Strip any Web address prefix to recover the bare DOI, leaving the
608 % result on the output stack, as recommended by CrossRef DOI
610 % For example, reduce "http://doi.acm.org/10.1145/1534530.1534545" to
611 % "10.1145/1534530.1534545". That is later typeset and displayed as
612 % doi:10.1145/1534530.1534545 as the LAST item in the reference list
613 % entry. Publisher Web sites wrap this with a suitable link to a real
614 % URL to resolve the DOI, and the master http://dx.doi.org/ address is
615 % preferred, since publisher-specific URLs can disappear in response
616 % to economic events. All journals are encouraged by the DOI
617 % authorities to use that typeset format and link procedures for
618 % uniformity across all publications that include DOIs in reference
620 % The numeric prefix is guaranteed to start with "10.", so we use
622 doi #1 #3 substring$ "10." =
625 doi #1 #7 substring$ "http://" =
627 doi #8 doi text.length$ #7 - substring$ 't := % get modifiable copy of rest of DOI
629 "INTERNAL STYLE-FILE ERROR" 's :=
631 % search for next "/" and assign its suffix to s
635 t #1 #1 substring$ "/" =
637 % save rest of string as true DOI (should be 10.xxxx/yyyy)
638 t #2 t text.length$ #1 - substring$ 's :=
639 "" 't := % empty string t terminates the loop
642 % discard first character and continue loop: t <= substring(t,2,last)
643 t #2 t text.length$ #1 - substring$ 't :=
649 % check for valid DOI (should be 10.xxxx/yyyy)
650 s #1 #3 substring$ "10." =
652 { "unrecognized DOI substring " s * " in DOI value [" * doi * "]" * warning$ }
655 s % push the stripped DOI on the output stack
659 "unrecognized DOI value [" doi * "]" * warning$
660 doi % push the unrecognized original DOI on the output stack
668 % Change by BV: added standard prefix to URL
670 FUNCTION { output.doi } % UTAH
671 { % output non-empty DOI as one-line sentence (stack untouched)
675 %% NB: We want URLs at beginning of line to reduce likelihood of
676 %% BibTeX's nasty line wrapping after column 79, which then requires
677 %% manual (or automated) editing of the .bbl file to repair.
678 %% The \url{} macro strips percent-newlines, and is thus safe in
679 %% the presence of the line wrapping, but \path|...| and
680 %% \verb|...| do not.
682 "\url{http://dx.doi.org/" strip.doi * "}}" * writeln
687 FUNCTION { output.isbn } % UTAH
688 { % output non-empty ISBN-10 and/or ISBN-13 as one-line sentences (stack untouched)
691 %% show both 10- and 13-digit ISBNs
692 isbn empty.or.unknown
695 "\showISBNx{" isbn * "}" * writeln
698 isbn-13 empty.or.unknown
701 "\showISBNxiii{" isbn-13 * "}" * writeln
706 %% show 10-digit ISBNs only if 13-digit ISBNs not available
707 isbn-13 empty.or.unknown
709 isbn empty.or.unknown
712 "\showISBNx{" isbn * "}" * writeln
717 "\showISBNxiii{" isbn-13 * "}" * writeln
724 FUNCTION { output.issn } % UTAH
725 { % output non-empty ISSN as one-line sentence (stack untouched)
726 issn empty.or.unknown
728 { "\showISSN{" issn * "}" * writeln }
732 FUNCTION { output.issue }
733 { % output non-empty issue number as a one-line sentence (stack untouched)
734 issue empty.or.unknown
736 { "Issue " issue * "." * writeln }
740 FUNCTION { output.lccn } % UTAH
741 { % return with stack untouched
742 lccn empty.or.unknown
744 { "\showLCCN{" lccn * "}" * writeln }
748 FUNCTION { output.note } % UTAH
749 { % return with stack empty
750 note empty.or.unknown
752 { "\shownote{" note add.period$ * "}" * writeln }
756 FUNCTION { output.note.check } % UTAH
757 { % return with stack empty
758 note empty.or.unknown
759 { "empty note in " cite$ * warning$ }
760 { "\shownote{" note add.period$ * "}" * writeln }
765 % Changes by BV 2011/04/15. Do not output
766 % url if doi is defined
768 FUNCTION { output.url } % UTAH
769 { % return with stack untouched
770 % output URL and associated lastaccessed fields
776 %% NB: We want URLs at beginning of line to reduce likelihood of
777 %% BibTeX's nasty line wrapping after column 79, which would require
778 %% manual (or automated) editing of the .bbl file to repair. However,
779 %% the \url{} macro handles the unwrapping job automatically.
781 lastaccessed empty.or.unknown
783 { "Retrieved " lastaccessed * " from " * }
786 %% The URL field may contain a semicolon-separated list of Web
787 %% addresses, and we locate and wrap each of them in \url{...}.
788 %% The simplistic approach of putting the entire list into the
789 %% macro argument is that the semicolons are typeset in a
790 %% typewriter font, and no space follows them.
792 %% We therefore replace the original code
793 %% "\url{" * url * "}}" * writeln
794 %% with this character-at-a-time loop:
798 url 't := % get modifiable copy of URL list
802 t #1 #1 substring$ ";" =
803 { % then split argument at separator
807 { % else concatenate nonblank character to argument
808 t #1 #1 substring$ " " =
810 { t #1 #1 substring$ * }
815 t #2 t text.length$ #1 - substring$ 't :=
827 FUNCTION { output.year.check }
828 { % warn if year empty, else output top string and leave " YEAR<label>" on stack in mid-sentence
829 year empty.or.unknown
830 { "empty year in " cite$ * warning$ }
832 " " year * extra.label *
833 mid.sentence 'output.state :=
861 %% test whether first number is less than or equal to second number
863 %% stack out: if n1 <= n2 then 1 else 0
865 %% "DEBUG: le " cite$ * warning$
871 %% test whether first number is greater than or equal to second number
873 %% stack out: if n1 >= n2 then 1 else 0
875 %% "DEBUG: ge " cite$ * warning$
879 FUNCTION { is.leading.digit }
881 %% test whether first character of string is a digit
883 %% stack out: if first-char-is-digit then 1 else 0
885 #1 #1 substring$ % replace string by string[1:1]
886 duplicate$ % string[1:1] string[1:1]
888 "0" chr.to.int$ swap$ le % "0" <= string[1:1] --> 0-or-1
889 swap$ % 0-or-1 string[1:1]
891 "9" chr.to.int$ le % string[1:1} <= "9" --> 0-or-1
895 FUNCTION { skip.digits }
897 %% skip over leading digits in string
899 %% stack out: rest-of-string leading-digits
901 %% "DEBUG: enter skip.digits " cite$ * warning$
912 %% "=================DEBUG: skip.digits t = [" t * "]" * warning$
914 { t #2 t text.length$ #1 - substring$ }
925 t.org #1 t.org text.length$ u text.length$ - substring$ % leading digits
927 %% "DEBUG: t.org = [" t.org * "]" * warning$
928 %% "DEBUG: u = [" u * "]" * warning$
932 %% "DEBUG: leave skip.digits " cite$ * warning$
935 FUNCTION { skip.nondigits }
937 %% skip over leading nondigits in string
939 %% stack out: rest-of-string
941 %% "DEBUG: enter skip.nondigits " cite$ * warning$
948 %% "=================DEBUG: skip.nondigits t = [" t * "]" * warning$
954 { t #2 t text.length$ #1 - substring$ }
963 %% "DEBUG: leave skip.nondigits " cite$ * warning$
966 FUNCTION { parse.next.number }
969 %% stack out: rest-of-string next-numeric-part-of-string
971 %% stack in: "123:1--123:59"
972 %% stack out: ":1--123:59" "123"
975 s skip.nondigits 's :=
979 FUNCTION { reduce.pages.to.page.count }
981 %% Stack in: arbitrary-and-unused
982 %% Stack out: unchanged
984 %% For the new-style pagination with article number and numpages or
985 %% pages, we expect to have BibTeX entries containing something like
988 %% with output "Article 17, 23 pages",
992 %% with output "Article 17, 23 pages",
995 %% pages = "17:1--17:23",
996 %% with output "Article 17, 23 pages",
998 %% If articleno is missing or empty, then we should output "1--23",
999 %% "23" (with a warning of a missing articleno), or "17:1--17:23",
1002 %% "DEBUG: enter reduce.pages.to.page.count " cite$ * warning$
1004 %% "DEBUG: pages = [" pages * "]" * warning$
1007 parse.next.number 'p1 :=
1008 parse.next.number 'p2 :=
1009 parse.next.number 'p3 :=
1010 parse.next.number 'page.count :=
1016 duplicate$ "unexpected trailing garbage [" swap$ *
1017 "] after n:p1--n:p2 in pages = [" *
1027 %% "DEBUG: reduce.pages.to.page.count: "
1031 %% " p4 = " page.count * *
1032 %% " in " cite$ * * warning$
1034 p1 p3 = p2 "1" = and numpages empty.or.unknown and
1035 { "INFO: reduced pages = [" pages * "] to numpages = [" * page.count * "]" * warning$ }
1037 numpages empty.or.unknown
1045 p1 "1" = p3 empty.or.unknown and numpages empty.or.unknown and
1048 "INFO: reduced pages = [" pages * "] to numpages = [" * page.count * "]" * warning$
1051 numpages empty.or.unknown
1059 %% "DEBUG: leave reduce.pages.to.page.count " cite$ * warning$
1062 FUNCTION { new.block.checkb }
1063 { % issue a new.block only if at least one of top two stack strings is not empty
1065 swap$ empty.or.unknown
1072 FUNCTION { field.or.null }
1073 { % convert empty value to null string, else return value
1074 duplicate$ empty.or.unknown
1080 FUNCTION { emphasize }
1081 { % emphasize a non-empty top string on the stack (WITHOUT italic correction)
1082 duplicate$ empty.or.unknown
1084 { "{\em " swap$ * "}" * }
1088 FUNCTION { emphasize.with.italic.correction }
1089 { % convert empty string to null string, or emphasize with a trailing italic correction
1090 duplicate$ empty.or.unknown
1092 { "{\em " swap$ * "\/}" * }
1097 { % convert empty string to null string, or brace string and add trailing comma
1098 duplicate$ empty.or.unknown
1100 { "{" swap$ * "}," * }
1104 FUNCTION { format.names }
1106 % Format bibliographical entries with the first author last name first,
1107 % and subsequent authors with initials followed by last name.
1108 % All names are formatted in this routine.
1111 #1 'nameptr := % nameptr = 1;
1112 s num.names$ 'numnames := % numnames = num.name$(s);
1113 numnames 'namesleft :=
1116 %NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
1117 %NO: BAD ORDER: {"{" s nameptr "{ff~}{ll}{, jj}{, vv}" format.name$ * "}" * 't := }
1118 {"{" s nameptr "{ff }{vv }{ll}{, jj}" format.name$ * "}" * 't := }
1119 {"{" s nameptr "{ff }{vv }{ll}{, jj}" format.name$ * "}" * 't := }
1131 { " {et~al\mbox{.}}" * } % jrh: avoid spacing problems
1132 { " {and} " * t * } % from Chicago Manual of Style
1139 nameptr #1 + 'nameptr := % nameptr += 1;
1140 namesleft #1 - 'namesleft := % namesleft =- 1;
1145 FUNCTION { my.full.label }
1148 #1 'nameptr := % nameptr = 1;
1149 s num.names$ 'numnames := % numnames = num.name$(s);
1150 numnames 'namesleft :=
1153 { s nameptr "{vv~}{ll}" format.name$ 't := % get the next name
1164 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
1165 { " and " * t * } % from Chicago Manual of Style
1172 nameptr #1 + 'nameptr := % nameptr += 1;
1173 namesleft #1 - 'namesleft := % namesleft =- 1;
1179 FUNCTION { format.names.fml }
1181 % Format names in "familiar" format, with first initial followed by
1182 % last name. Like format.names, ALL names are formatted.
1183 % jtb: The names are NOT put in small caps
1186 #1 'nameptr := % nameptr = 1;
1187 s num.names$ 'numnames := % numnames = num.name$(s);
1188 numnames 'namesleft :=
1192 "{" s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ * "}" * 't :=
1204 { " {et~al\mbox{.}}" * }
1212 nameptr #1 + 'nameptr := % nameptr += 1;
1213 namesleft #1 - 'namesleft := % namesleft =- 1;
1218 FUNCTION { format.authors }
1220 author empty.or.unknown
1222 { author format.names add.period$} % jtb: add period if none before
1226 FUNCTION { format.key }
1229 { key field.or.null }
1234 FUNCTION { format.no.key }
1242 FUNCTION { format.editors.fml }
1244 % Format editor names for use in the "in" types: inbook, incollection,
1245 % inproceedings: first initial, then last names. When editors are the
1246 % LABEL for an entry, then format.editor is used which lists editors
1247 % by last name first.
1249 editor empty.or.unknown
1252 editor format.names.fml editor num.names$ #1 >
1260 FUNCTION { format.editors }
1261 { % format editor names for use in labels, last names first.
1262 editor empty.or.unknown
1266 editor num.names$ #1 >
1274 FUNCTION { format.articletitle }
1276 title empty.or.unknown
1278 % Use this to preserve lettercase in titles:
1279 { "\showarticletitle{" title * "}" * }
1280 % Use this for downcase title style:
1281 % { \showarticletitle{" title "t" change.case$ * "}" * }
1285 FUNCTION { format.title }
1287 title empty.or.unknown
1289 % Use this to preserve lettercase in titles:
1291 % Use this for downcase title style:
1292 % { title "t" change.case$ }
1296 FUNCTION { n.dashify }
1300 { t empty.or.unknown not }
1302 t #1 #1 substring$ "-" =
1304 t #1 #2 substring$ "--" = not
1306 t #2 global.max$ substring$ 't :=
1309 { t #1 #1 substring$ "-" = }
1312 t #2 global.max$ substring$ 't :=
1319 t #1 #1 substring$ *
1320 t #2 global.max$ substring$ 't :=
1327 FUNCTION { format.btitle }
1329 edition empty.or.unknown
1331 { title empty.or.unknown
1332 { title emphasize } % jtb: what is this supposed to do ?!?
1333 { "{\em " title * "\/} (" * edition "l" change.case$ * " ed.)" * } % jtb: no parens for ed.
1339 FUNCTION { format.emphasize.booktitle }
1340 { % push "" or "{\em booktitle}" or "{\em booktitle}, (second ed.)" on stack
1341 edition empty.or.unknown
1342 { booktitle emphasize }
1343 { booktitle empty.or.unknown
1345 { "{\em " booktitle * "} (" * edition "l" change.case$ * " ed.)" * }
1351 FUNCTION { format.city }
1353 % jtb: if the preceding string (the title of the conference) is non-empty,
1354 % jtb: append the location, otherwise leave empty (so as to trigger the
1355 % jtb: error message in output.check
1357 duplicate$ empty.or.unknown
1360 city empty.or.unknown
1362 date empty.or.unknown
1364 { " (" * date * ")" * }
1368 date empty.or.unknown
1369 { " (" * city * ")" * }
1370 { " (" * city * ", " * date * ")" * }
1378 FUNCTION { tie.or.space.connect }
1380 duplicate$ text.length$ #3 <
1387 FUNCTION { either.or.check }
1391 { "can't use both " swap$ * " fields in " * cite$ * warning$ }
1395 FUNCTION { format.bvolume }
1397 % jtb: If there is a series, this is added and the volume trails after it.
1398 % jtb: Otherwise, "Vol" is Capitalized.
1400 volume empty.or.unknown
1403 series empty.or.unknown
1404 { "Vol." volume tie.or.space.connect}
1405 { series ", " * "Vol." volume tie.or.space.connect *}
1407 "volume and number" number either.or.check
1412 FUNCTION { format.bvolume.noseries }
1414 volume empty.or.unknown
1417 series empty.or.unknown
1418 { "Vol." volume tie.or.space.connect}
1419 { "Vol." volume tie.or.space.connect}
1420 % { series ", " * "Vol." volume tie.or.space.connect *}
1422 "volume and number" number either.or.check
1427 FUNCTION { format.series }
1429 series empty.or.unknown
1431 {" {\em (" * series ")}" *}
1435 FUNCTION { format.number.series }
1437 volume empty.or.unknown
1439 number empty.or.unknown
1441 volume empty.or.unknown
1444 series empty.or.unknown
1446 { " (" series * ")" * }
1450 } % { series field.or.null }
1452 output.state mid.sentence =
1453 { "Number" } % gnp - changed to mixed case always
1456 number tie.or.space.connect series empty.or.unknown
1457 { "there's a number but no series in " cite$ * warning$ }
1458 { " in " * series * }
1469 FUNCTION { multi.page.check }
1474 t empty.or.unknown not
1477 { t #1 #1 substring$
1479 swap$ duplicate$ "," =
1482 { #1 'multiresult := }
1483 { t #2 global.max$ substring$ 't := }
1490 FUNCTION { format.pages }
1492 pages empty.or.unknown
1495 pages multi.page.check
1496 { pages n.dashify } % gnp - removed () % jtb: removed pp.
1503 FUNCTION { format.pages.check.without.articleno }
1504 { %% format pages field only if articleno is absent
1505 %% Stack out: pages-specification
1506 numpages missing$ pages missing$ and
1507 { "page numbers missing in both pages and numpages fields in " cite$ * warning$ }
1511 articleno empty.or.unknown
1522 FUNCTION { format.pages.check }
1524 pages empty.or.unknown
1525 { "page numbers missing in " cite$ * warning$ "" }
1530 FUNCTION { format.bookpages }
1532 bookpages empty.or.unknown
1534 { bookpages "book pages" tie.or.space.connect }
1538 FUNCTION { format.named.pages }
1540 pages empty.or.unknown
1542 { format.pages "pages" tie.or.space.connect }
1547 % Changed by Boris Veytsman, 2011-03-13
1548 % Now the word "pages" is printed even if
1549 % there field pages is not empty.
1552 FUNCTION { format.page.count }
1554 page.count empty.or.unknown
1557 articleno empty.or.unknown
1558 { "numpages field, but no articleno field, in " cite$ * warning$ }
1561 page.count "pages" tie.or.space.connect
1566 FUNCTION { format.articleno.numpages }
1568 %% There are seven possible outputs, depending on which fields are set.
1570 %% These four are handled here:
1572 %% articleno, numpages, pages -> "Article articleno-value, numpages-value pages"
1573 %% articleno, numpages -> "Article articleno-value, numpages-value pages"
1574 %% articleno, pages -> "Article articleno-value, reduced-pages-value pages"
1575 %% articleno -> "Article articleno-value" and warn about missing numpages
1577 %% The remaining three have already been handled by
1578 %% format.pages.check.without.articleno:
1580 %% numpages, pages -> "pages-value"
1581 %% numpages -> "numpages-value"
1582 %% pages -> "pages-value"
1584 articleno empty.or.unknown
1586 numpages empty.or.unknown
1588 { "require articleno with numpages field in " cite$ * warning$ }
1593 numpages empty.or.unknown
1595 pages empty.or.unknown
1597 "require pages or numpages fields with articleno field in " cite$ * warning$
1600 { reduce.pages.to.page.count }
1603 { numpages 'page.count := }
1606 %% The Article number is now handled in format.day.month.year because
1607 %% ACM prefers the style "Digital Libraries 12, 3, Article 5 (July 2008)"
1608 %% over "Digital Libraries 12, 3 (July 2008), Article 5"
1609 %% format.articleno output
1615 FUNCTION { format.journal.volume.number.day.month.year }
1617 % By Young (and Spencer)
1618 % GNP - fixed bugs with missing volume, number, and/or pages
1620 % Format journal, volume, number, pages for article types.
1622 journal empty.or.unknown
1623 { "no journal in " cite$ * warning$
1625 % { journal emphasize.with.italic.correction }
1627 journal "Journal of the ACM" =
1630 journal "American Mathematical Society Translations" =
1631 { "{\it Amer. Math. Soc. Transl.}" }
1633 journal "Bulletin of the American Mathematical Society" =
1634 { "{\it Bull. Amer. Math. Soc.}" }
1636 journal "Proceedings of the American Mathematical Society" =
1637 { "{\it Proc. Amer. Math. Soc.}" }
1639 journal "Transactions of the American Mathematical Society" =
1640 { "{\it Trans. Amer. Math. Soc.}" }
1642 journal "Communications of the {ACM}" =
1643 { "{\it Commun. {ACM}}" }
1645 journal "{ACM} Computing Surveys" =
1646 { "{\it Comput. Surveys}" }
1648 journal "{ACM} Transactions on Mathematical Software" =
1649 { "{\it {ACM} Trans. Math. Software}" }
1651 journal "{ACM} {SIGNUM} Newsletter" =
1652 { "{\it {ACM} {SIGNUM} Newslett.}" }
1654 journal "American Journal of Sociology" =
1655 { "{\it Amer. J. Sociology}" }
1657 journal "Journal of the American Statistical Association" =
1658 { "{\it J. Amer. Statist. Assoc.}" }
1660 journal "Applied Mathematics and Computation" =
1661 { "{\it Appl. Math. Comput.}" }
1663 journal "American Mathematical Monthly" =
1664 { "{\it Amer. Math. Monthly}" }
1666 journal "British Journal of Mathematical and Statistical Psychology" =
1667 { "{\it Brit. J. Math. Statist. Psych.}" }
1669 journal "Canadian Mathematical Bulletin" =
1670 { "{\it Canad. Math. Bull.}" }
1672 journal "Journal of Computational and Applied Mathematics" =
1673 { "{\it J. Comput. Appl. Math.}" }
1675 journal "Journal of Computational Physics" =
1676 { "{\it J. Comput. Phys.}" }
1678 journal "Computers and Structures" =
1679 { "{\it Comput. \& Structures}" }
1681 journal "The Computer Journal" =
1682 { "{\it Comput. J.}" }
1684 journal "Journal of Computer and System Sciences" =
1685 { "{\it J. Comput. System Sci.}" }
1687 journal "Contemporary Mathematics" =
1688 { "{\it Contemp. Math.}" }
1690 journal "Crelle's Journal" =
1691 { "{\it Crelle's J.}" }
1693 journal "Giornale di Mathematiche" =
1694 { "{\it Giorn. Mat.}" }
1696 journal "{IEEE} Transactions on Computers" =
1697 { "{\it {IEEE} Trans. Comput.}" }
1699 journal "{IEEE} Transactions on Automatic Control" =
1700 { "{\it {IEEE} Trans. Automat. Control}" }
1702 journal "Proceedings of the {IEEE}" =
1703 { "{\it Proc. {IEEE}}" }
1705 journal "{IEEE} Transactions on Aerospace and Electronic Systems" =
1706 { "{\it {IEEE} Trans. Aerospace Electron. Systems}" }
1708 journal "{IMA} Journal of Numerical Analysis" =
1709 { "{\it {IMA} J. Numer. Anal.}" }
1711 journal "Information Processing Letters" =
1712 { "{\it Inform. Process. Lett.}" }
1714 journal "Journal of the Institute of Mathematics and its Applications" =
1715 { "{\it J. Inst. Math. Appl.}" }
1717 journal "International Journal of Control" =
1718 { "{\it Internat. J. Control}" }
1720 journal "International Journal for Numerical Methods in Engineering" =
1721 { "{\it Internat. J. Numer. Methods Engrg.}" }
1723 journal "International Journal of Supercomputing Applications" =
1724 { "{\it Internat. J. Supercomputing Applic.}" }
1726 journal "Journal of Research of the National Bureau of Standards" =
1727 { "{\it J. Res. Nat. Bur. Standards}" }
1729 journal "Linear Algebra and its Applications" =
1730 { "{\it Linear Algebra Appl.}" }
1732 journal "Journal of Mathematical Analysis and Applications" =
1733 { "{\it J. Math. Anal. Appl.}" }
1735 journal "Mathematische Annalen" =
1736 { "{\it Math. Ann.}" }
1738 journal "Journal of Mathematical Physics" =
1739 { "{\it J. Math. Phys.}" }
1741 journal "Mathematics of Computation" =
1742 { "{\it Math. Comp.}" }
1744 journal "Mathematica Scandinavica" =
1745 { "{\it Math. Scand.}" }
1747 journal "Mathematical Tables and Other Aids to Computation" =
1748 { "{\it Math. Tables Aids Comput.}" }
1750 journal "Numerische Mathematik" =
1751 { "{\it Numer. Math.}" }
1753 journal "Pacific Journal of Mathematics" =
1754 { "{\it Pacific J. Math.}" }
1756 journal "Journal of Parallel and Distributed Computing" =
1757 { "{\it J. Parallel and Distrib. Comput.}" }
1759 journal "Parallel Computing" =
1760 { "{\it Parallel Comput.}" }
1762 journal "Philosophical Magazine" =
1763 { "{\it Philos. Mag.}" }
1765 journal "Proceedings of the National Academy of Sciences of the USA" =
1766 { "{\it Proc. Nat. Acad. Sci. U. S. A.}" }
1768 journal "Quarterly Journal of Mathematics, Oxford, Series (2)" =
1769 { "{\it Quart. J. Math. Oxford Ser. (2)}" }
1771 journal "Quarterly of Applied Mathematics" =
1772 { "{\it Quart. Appl. Math.}" }
1774 journal "Review of the International Statisical Institute" =
1775 { "{\it Rev. Inst. Internat. Statist.}" }
1777 journal "Journal of the Society for Industrial and Applied Mathematics" =
1778 { "{\it J. Soc. Indust. Appl. Math.}" }
1780 journal "Journal of the Society for Industrial and Applied Mathematics, Series B, Numerical Analysis" =
1781 { "{\it J. Soc. Indust. Appl. Math. Ser. B Numer. Anal.}" }
1783 journal "{SIAM} Journal on Algebraic and Discrete Methods" =
1784 { "{\it {SIAM} J. Algebraic Discrete Methods}" }
1786 journal "{SIAM} Journal on Applied Mathematics" =
1787 { "{\it {SIAM} J. Appl. Math.}" }
1789 journal "{SIAM} Journal on Computing" =
1790 { "{\it {SIAM} J. Comput.}" }
1792 journal "{SIAM} Journal on Matrix Analysis and Applications" =
1793 { "{\it {SIAM} J. Matrix Anal. Appl.}" }
1795 journal "{SIAM} Journal on Numerical Analysis" =
1796 { "{\it {SIAM} J. Numer. Anal.}" }
1798 journal "{SIAM} Review" =
1799 { "{\it {SIAM} Rev.}" }
1801 journal "{SIAM} Journal on Scientific and Statistical Computing" =
1802 { "{\it {SIAM} J. Sci. Statist. Comput.}" }
1804 journal "Software Practice and Experience" =
1805 { "{\it Software Prac. Experience}" }
1807 journal "Statistical Science" =
1808 { "{\it Statist. Sci.}" }
1810 journal "{USSR} Computational Mathematics and Mathematical Physics" =
1811 { "{\it {U. S. S. R.} Comput. Math. and Math. Phys.}" }
1813 journal "Journal of {VLSI} and Computer Systems" =
1814 { "{\it J. {VLSI} Comput. Syst.}" }
1816 journal "Zeitschrift fur Angewandte Mathematik und Mechanik" =
1817 { "{\it Z. Angew. Math. Mech.}" }
1819 journal "Zeitschrift fur Angewandte Mathematik und Physik" =
1820 { "{\it Z. Angew. Math. Phys.}" }
1822 journal "ACM Computing Surveys" =
1823 { "{\it Comput. Surveys}" }
1825 journal "ACM Transactions on Mathematical Software" =
1826 { "{\it ACM Trans. Math. Software}" }
1828 journal "ACM {SIGNUM} Newsletter" =
1829 { "{\it ACM {SIGNUM} Newslett.}" }
1831 journal "IEEE Transactions on Computers" =
1832 { "{\it IEEE Trans. Comput.}" }
1834 journal "IEEE Transactions on Automatic Control" =
1835 { "{\it IEEE Trans. Automat. Control}" }
1837 journal "Proceedings of the IEEE" =
1838 { "{\it Proc. IEEE}" }
1840 journal "IEEE Transactions on Aerospace and Electronic Systems" =
1841 { "{\it IEEE Trans. Aerospace Electron. Systems}" }
1843 journal "IMA Journal of Numerical Analysis" =
1844 { "{\it IMA J. Numer. Anal.}" }
1846 journal "SIAM Journal on Algebraic and Discrete Methods" =
1847 { "{\it SIAM J. Algebraic Discrete Methods}" }
1849 journal "SIAM Journal on Applied Mathematics" =
1850 { "{\it SIAM J. Appl. Math.}" }
1852 journal "SIAM Journal on Computing" =
1853 { "{\it SIAM J. Comput.}" }
1855 journal "SIAM Journal on Matrix Analysis and Applications" =
1856 { "{\it SIAM J. Matrix Anal. Appl.}" }
1858 journal "SIAM Journal on Numerical Analysis" =
1859 { "{\it SIAM J. Numer. Anal.}" }
1861 journal "SIAM Review" =
1862 { "{\it SIAM Rev.}" }
1864 journal "SIAM Journal on Scientific and Statistical Computing" =
1865 { "{\it SIAM J. Sci. Statist. Comput.}" }
1867 journal "USSR Computational Mathematics and Mathematical Physics" =
1868 { "{\it U. S. S. R. Comput. Math. and Math. Phys.}" }
1870 journal "Journal of VLSI and Computer Systems" =
1871 { "{\it J. VLSI Comput. Syst.}" }
1873 journal "Communications of the ACM" =
1874 { "{\it Commun. ACM}" }
1875 %% If no match with cases needing special handling, just output journal name
1876 { journal emphasize.with.italic.correction }
2045 number empty.or.unknown
2047 volume empty.or.unknown
2048 { "no number and no volume in " cite$ * warning$ "" * }
2049 { " " * " {" * volume * "}" * }
2053 volume empty.or.unknown
2055 "unusual to have number, but no volume, for " cite$ * warning$
2058 { " " * volume comma " " * number * * }
2063 format.day.month.year *
2066 FUNCTION { format.chapter.pages }
2068 chapter empty.or.unknown
2070 { type empty.or.unknown
2071 { "Chapter" } % gnp - changed to mixed case
2072 { type "t" change.case$ }
2074 chapter tie.or.space.connect
2075 pages empty.or.unknown
2076 {"page numbers missing in " cite$ * warning$} % gnp - added check
2077 { ", " * format.pages * }
2083 FUNCTION { format.in.emphasize.booktitle }
2084 { % jtb: format for collections or proceedings not appearing in a journal
2085 booktitle empty.or.unknown
2087 { "In " format.emphasize.booktitle * }
2091 FUNCTION { format.in.booktitle }
2092 { % jtb: format for proceedings appearing in a journal
2093 booktitle empty.or.unknown
2095 { "In " booktitle * }
2099 FUNCTION { format.in.ed.booktitle }
2101 booktitle empty.or.unknown
2103 { editor empty.or.unknown
2104 { "In " format.emphasize.booktitle * }
2105 % jtb: swapped editor location
2106 { "In " format.emphasize.booktitle * ", " * format.editors.fml * }
2112 FUNCTION { format.thesis.type }
2113 { % call with default type on stack top
2114 type empty.or.unknown
2115 'skip$ % use default type
2117 pop$ % discard default type
2118 % NO: it is silly to have to brace protect every degree type!: type "t" change.case$
2124 FUNCTION { format.tr.number }
2126 type empty.or.unknown
2128 { "{T}echnical {R}eport" } % ACM wants it explicit (Gerry 9/28)
2131 number empty.or.unknown
2132 { "t" change.case$ }
2133 %% LOOKS BAD: { "." * number tie.or.space.connect }
2134 %% Prefer "Research report RJ687." to "Research report. RJ687."
2135 { number tie.or.space.connect }
2139 FUNCTION { format.advisor }
2141 advisor empty.or.unknown
2143 { "Advisor(s) " advisor * }
2147 FUNCTION { format.article.crossref }
2149 "\citeN{" * crossref * "}" *
2152 FUNCTION { format.crossref.editor }
2154 editor #1 "{vv~}{ll}" format.name$
2155 editor num.names$ duplicate$
2157 { pop$ " et~al\mbox{.}" * } % jrh: avoid spacing problems
2160 { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
2161 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
2162 { " and " * editor #2 "{vv~}{ll}" format.name$ * }
2170 FUNCTION { format.book.crossref }
2172 volume empty.or.unknown
2173 { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
2176 { "Volume" volume tie.or.space.connect % gnp - changed to mixed case
2180 editor empty.or.unknown
2181 editor field.or.null author field.or.null =
2183 { key empty.or.unknown
2184 { series empty.or.unknown
2185 { "need editor, key, or series for " cite$ * " to crossref " *
2189 { "{\em " * series * "\/}" * }
2195 { format.crossref.editor * }
2197 " \citeN{" * crossref * "}" *
2200 FUNCTION { format.incoll.inproc.crossref }
2202 " \citeN{" * crossref * "}" *
2205 FUNCTION { format.lab.names }
2209 % determines "short" names for the abbreviated author information.
2210 % "Long" labels are created in calc.label, using the routine my.full.label
2211 % to format author and editor fields.
2213 % There are 4 cases for labels. (n=3 in the example)
2215 % b) one to n Foo, Bar and Baz
2216 % c) use of "and others" Foo, Bar et al.
2217 % d) more than n Foo et al.
2220 s num.names$ 'numnames :=
2221 numnames #2 > % change number to number of others allowed before
2223 { s #1 "{vv~}{ll}" format.name$ " et~al\mbox{.}" * } % jrh: \mbox{} added
2225 numnames #1 - 'namesleft :=
2227 s #1 "{vv~}{ll}" format.name$
2229 { nameptr numnames =
2230 { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
2231 { " et~al\mbox{.}" * } % jrh: avoid spacing problems
2232 { " and " * s nameptr "{vv~}{ll}" format.name$ * }
2235 { ", " * s nameptr "{vv~}{ll}" format.name$ * }
2237 nameptr #1 + 'nameptr :=
2238 namesleft #1 - 'namesleft :=
2245 FUNCTION { author.key.label }
2247 author empty.or.unknown
2248 { key empty.or.unknown
2249 { "no key, author in " cite$ * warning$
2250 cite$ #1 #3 substring$ }
2254 { author format.lab.names }
2258 FUNCTION { author.key.organization.label }
2259 { % added - gnp. Provide label formatting by organization if author is null.
2260 author empty.or.unknown
2261 { organization empty.or.unknown
2262 { key empty.or.unknown
2263 { "no key, author or organization in " cite$ * warning$
2264 cite$ #1 #3 substring$ }
2271 { author format.lab.names }
2275 FUNCTION { editor.key.organization.label }
2276 { % added - gnp. Provide label formatting by organization if editor is null.
2277 editor empty.or.unknown
2278 { organization empty.or.unknown
2279 { key empty.or.unknown
2280 { "no key, editor or organization in " cite$ * warning$
2281 cite$ #1 #3 substring$ }
2288 { editor format.lab.names }
2292 FUNCTION { author.editor.key.label }
2294 author empty.or.unknown
2295 { editor empty.or.unknown
2296 { key empty.or.unknown
2297 { "no key, author, or editor in " cite$ * warning$
2298 cite$ #1 #3 substring$ }
2302 { editor format.lab.names }
2305 { author format.lab.names }
2309 FUNCTION { calc.label }
2311 % Changed - GNP. See also author.organization.sort, editor.organization.sort
2312 % Form label for BibTeX entry. The classification of which fields are used
2313 % for which type of entry (book, inbook, etc.) are taken from alpha.bst.
2314 % The change here from newapa is to also include organization as a
2315 % citation label if author or editor is missing.
2320 type$ "periodical" =
2322 'author.editor.key.label
2323 { type$ "proceedings" =
2324 'editor.key.organization.label
2326 'author.key.organization.label
2334 author empty.or.unknown % generate the full label citation information.
2336 editor empty.or.unknown
2338 organization empty.or.unknown
2340 key empty.or.unknown
2342 "no author, editor, organization, or key in " cite$ * warning$
2351 { editor my.full.label }
2354 { author my.full.label }
2357 % leave label on the stack, to be popped when required.
2359 "}{" * swap$ * "}{" *
2360 % year field.or.null purify$ #-1 #4 substring$ *
2362 % save the year for sort processing afterwards (adding a, b, c, etc.)
2364 year field.or.null purify$ #-1 #4 substring$
2369 % Change by Gerry: use number-like citations for transactions
2372 FUNCTION {output.bibitem}
2379 before.all 'output.state :=
2382 % FUNCTION { output.bibitem }
2385 % "\bibitem[\protect\citeauthoryear{" write$
2393 % before.all 'output.state :=
2397 FUNCTION { output.issue.doi.coden.isxn.lccn.url }
2398 { % enter and return with stack empty
2399 %% We switch now from buffered output to output of complete lines, so
2400 %% that the Issue .. URL data have their own lines, and are less likely
2401 %% to be line-wrapped by BibTeX's short-sighted algorithm, which wraps
2402 %% lines longer than 79 characters, backtracking to what it thinks is
2403 %% a break point in the string. Any such wrapping MUST be undone to
2404 %% prevent percent-newline from appearing in DOIs and URLs. The
2405 %% output data are intentionally wrapped in \showxxx{} macros at
2406 %% beginning of line, and that supply their own punctuation (if they
2407 %% are not defined to suppress output entirely), to make it easier for
2408 %% other software to recover them from .bbl files.
2410 %% It also makes it possible to later change the macro definitions
2411 %% to suppress particular output values, or alter their appearance.
2413 %% Note that it is possible for theses, technical reports, and
2414 %% manuals to have ISBNs, and anything that has an ISBN may also
2415 %% have an ISSN. When there are no values for these keys, there
2416 %% is no output generated for them here.
2419 after.block 'output.state :=
2423 output.coden % CODEN is functionally like ISSN, so output them sequentially
2426 output.doi % DOI is ALWAYS last according to CrossRef DOI documentation
2427 output.url % but ACM wants URL last
2430 FUNCTION { output.issue.doi.coden.isxn.lccn.url.note }
2431 { % enter with stack empty, return with empty string on stack
2432 output.issue.doi.coden.isxn.lccn.url
2433 note empty.or.unknown
2443 FUNCTION { output.issue.doi.coden.isxn.lccn.url.note.check }
2444 { % enter with stack empty, return with empty string on stack
2445 output.issue.doi.coden.isxn.lccn.url
2446 note empty.or.unknown
2456 FUNCTION { article }
2460 author empty.or.unknown
2462 editor empty.or.unknown
2463 { "neither author and editor supplied for " cite$ * warning$ }
2464 { format.editors "editor" output.check }
2467 { format.authors "author" output.check }
2470 author format.no.key output % added
2471 output.year.check % added
2473 format.articletitle "title" output.check
2478 { format.journal.volume.number.day.month.year }
2480 "cross reference in @Article{...} is unusual" warning$
2481 format.article.crossref output.nonnull
2486 format.pages.check.without.articleno output
2487 format.articleno.numpages output
2489 output.issue.doi.coden.isxn.lccn.url.note
2496 author empty.or.unknown
2497 { format.editors "author and editor" output.check }
2498 { format.authors output.nonnull
2500 { "author and editor" editor either.or.check }
2505 output.year.check % added
2507 format.btitle "title" output.check
2509 { new.sentence % jtb: start a new sentence for series/volume
2510 format.bvolume output
2512 format.number.series output
2514 publisher "publisher" output.check
2515 address "address" output.check % jtb: require address
2517 pages empty.or.unknown
2518 { format.bookpages } % use bookpages when pages empty
2519 { format.pages.check "pages" tie.or.space.connect }
2524 format.book.crossref output.nonnull
2528 output.issue.doi.coden.isxn.lccn.url.note
2532 FUNCTION { booklet }
2535 format.authors output
2536 author format.key output % added
2537 output.year.check % added
2539 format.title "title" output.check
2544 output.issue.doi.coden.isxn.lccn.url.note
2551 author empty.or.unknown
2553 "author and editor" output.check
2555 { format.authors output.nonnull
2557 { "author and editor" editor either.or.check }
2562 output.year.check % added
2564 format.btitle "title" output.check
2566 { new.sentence % jtb: start a new sentence for series/volume
2567 format.bvolume output
2569 format.number.series output
2571 publisher "publisher" output.check
2572 address "address" output.check % jtb: require address
2573 format.bookpages output
2574 format.chapter.pages
2575 "chapter and pages" output.check % jtb: moved from before publisher
2578 format.bookpages output
2579 format.chapter.pages "chapter and pages" output.check
2581 format.book.crossref output.nonnull
2585 output.issue.doi.coden.isxn.lccn.url.note
2589 FUNCTION { incollection }
2592 format.authors "author" output.check
2593 author format.key output % added
2594 output.year.check % added
2596 format.articletitle "title" output.check
2599 { format.in.ed.booktitle "booktitle" output.check
2600 new.sentence % jtb: start a new sentence for series/volume
2601 format.bvolume output
2602 format.number.series output
2604 publisher "publisher" output.check
2605 address "address" output.check % jtb: require address
2606 format.bookpages output
2607 format.chapter.pages output % gnp - was special.output.nonnull
2608 % left out comma before page numbers
2609 % jtb: moved from before publisher
2612 format.incoll.inproc.crossref output.nonnull
2613 format.chapter.pages output
2617 output.issue.doi.coden.isxn.lccn.url.note
2621 FUNCTION { inproceedings }
2624 format.authors "author" output.check
2625 author format.key output % added
2626 output.year.check % added
2628 format.articletitle "title" output.check
2629 howpublished output.dot.space
2632 journal missing$ % jtb: proceedings appearing in journals
2633 { format.in.emphasize.booktitle format.city "booktitle" output.check.dot.space
2634 format.series output.removenospace
2635 format.editors.fml output % BV 2011/09/27 Moved dot to comma
2636 format.bvolume.noseries output
2639 publisher "publisher" output.check % jtb: require publisher (?)
2640 address "address" output.check % jtb: require address
2641 format.bookpages output
2644 format.in.booktitle format.city "booktitle" output.check
2645 format.editors.fml output
2647 format.journal.volume.number.day.month.year output
2650 format.articleno output
2651 format.pages.check.without.articleno output
2654 format.incoll.inproc.crossref output.nonnull
2655 format.articleno output
2656 format.pages.check.without.articleno output
2659 format.articleno.numpages output
2661 output.issue.doi.coden.isxn.lccn.url.note
2665 FUNCTION { conference } { inproceedings }
2670 author empty.or.unknown
2671 { editor empty.or.unknown
2672 { organization "organization" output.check
2673 organization format.key output } % if all else fails, use key
2674 { format.editors "author and editor" output.check }
2677 { format.authors output.nonnull }
2679 output.year.check % added
2681 format.btitle "title" output.check
2682 organization address new.block.checkb
2683 % jtb: back to normal style: organization, address
2684 organization "organization" output.check
2687 output.issue.doi.coden.isxn.lccn.url.note
2691 FUNCTION { mastersthesis }
2694 format.authors "author" output.check
2695 author format.key output % added
2696 output.year.check % added
2698 format.title emphasize "title" output.check % NB: ACM style requires emphasized thesis title
2700 "Master's\ thesis" format.thesis.type output new.sentence % Added dot. BV 2011/09/27
2701 school "school" output.check
2704 format.advisor output
2706 output.issue.doi.coden.isxn.lccn.url.note
2713 format.authors output
2714 author format.key output % added
2715 output.year.check % added
2716 title howpublished new.block.checkb
2720 "" output.nonnull.dot.space
2721 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
2723 output.issue.doi.coden.isxn.lccn.url.note
2727 FUNCTION { phdthesis }
2730 format.authors "author" output.check
2731 author format.key output % added
2732 output.year.check % added
2734 format.title emphasize "title" output.check % NB: ACM style requires emphasized thesis title
2736 "Ph.D. Dissertation" format.thesis.type output new.sentence % Added dot. BV 2011/09/27
2737 school "school" output.check
2740 format.advisor output
2742 output.issue.doi.coden.isxn.lccn.url.note
2746 FUNCTION {format.date}
2747 { year empty.or.unknown
2748 { month empty.or.unknown
2750 "" % output empty date if year/month both empty
2751 day empty.or.unknown
2753 { "there's a day but no month or year in " cite$ * warning$ }
2756 { "there's a month but no year in " cite$ * warning$
2758 day empty.or.unknown
2765 { month empty.or.unknown
2767 year % output only year if month empty
2768 day empty.or.unknown
2770 { "there's a day and year but no month in " cite$ * warning$ }
2775 day empty.or.unknown
2786 FUNCTION {new.block.checka}
2794 FUNCTION { periodical }
2797 editor empty.or.unknown
2798 { organization output }
2799 { format.editors output.nonnull }
2802 title emphasize "title" output.check
2807 howpublished new.block.checka
2810 output.issue.doi.coden.isxn.lccn.url.note
2814 FUNCTION { proceedings }
2817 editor empty.or.unknown
2818 { organization output
2819 organization format.key output } % gnp - changed from author format.key
2820 { format.editors output.nonnull }
2822 % author format.key output % gnp - removed (should be either
2823 % editor or organization
2824 output.year.check % added (newapa)
2826 format.btitle format.city "title" output.check % jtb: added city
2828 format.bvolume output
2829 format.number.series output
2832 % jtb: normal order: publisher, address
2836 output.issue.doi.coden.isxn.lccn.url.note
2840 FUNCTION { techreport }
2843 format.authors "author" output.check
2844 author format.key output % added
2845 output.year.check % added
2847 format.btitle "title" output.check
2849 % format.tr.number output % jtb: moved month ...
2850 format.tr.number output new.sentence % Gerry - need dot 2011/09/28
2851 institution "institution" output.check
2854 format.named.pages output
2855 % ACM omits year at end in transactions style
2856 % format.day.month.year output.nonnull.dot.space % jtb: ... to here (no parens)
2858 output.issue.doi.coden.isxn.lccn.url.note
2862 FUNCTION { unpublished }
2866 "author" output.check
2867 author format.key output % added
2868 output.year.check % added
2870 format.title "title" output.check
2872 output.day.month.year % UTAH
2874 output.issue.doi.coden.isxn.lccn.url.note.check
2878 FUNCTION { default.type } { misc }
2880 %%% ACM journal-style month definitions: full name if 1--5 letters, else
2881 %%% abbreviation of 3 or 4 characters and a dot
2883 MACRO {jan} {"Jan."}
2885 MACRO {feb} {"Feb."}
2887 MACRO {mar} {"March"}
2889 MACRO {apr} {"April"}
2893 MACRO {jun} {"June"}
2895 MACRO {jul} {"July"}
2897 MACRO {aug} {"Aug."}
2899 MACRO {sep} {"Sept."}
2901 MACRO {oct} {"Oct."}
2903 MACRO {nov} {"Nov."}
2905 MACRO {dec} {"Dec."}
2908 %%% ====================================================================
2909 %%% I M P O R T A N T C H A N G E
2911 %%% For the 2009 release of the official acm-*.bst files, there are to
2912 %%% be NO predefined journal abbreviations in those style files.
2914 %%% ACM may later develop an official list of mappings of full journal
2915 %%% names of commonly-cited journals to ACM-preferred abbreviations, but
2916 %%% authors should consider that use of any of these commented-out
2917 %%% abbreviations is DEPRECATED unless the BibTeX file itself provides
2918 %%% its own @String{name = "value"} definitions.
2920 %%% Use of journal (and publisher and address) @String{...}
2921 %%% abbreviations, as opposed to explicit value assignments such as
2922 %%% journal = "J. ACM" and publisher = "IEEE", is preferred in
2923 %%% bibliographic databases, because it makes it easier for journal
2924 %%% production staff to replace those definitions by publisher-preferred
2925 %%% abbreviations when articles are typeset for publication.
2927 %%% For historical reasons, and because some of these abbreviations are
2928 %%% used in other (non-ACM) bibliography style files, they are preserved
2929 %%% here in comments. Future releases of the acm*-.bst files are likely
2930 %%% to remove them entirely.
2931 %%% ====================================================================
2933 %%% DEPRECATED: MACRO {acmcs} {"ACM Comput. Surv."} % original BibTeX
2935 %%% DEPRECATED: MACRO {acmlett} {"ACM Lett. Program. Lang. Syst."}
2937 %%% DEPRECATED: MACRO {acta} {"Acta Inf."} % original BibTeX
2939 %%% DEPRECATED: MACRO {ai} {"Artificial Intelligence"}
2941 %%% DEPRECATED: MACRO {al} {"Ada Lett."}
2943 %%% DEPRECATED: MACRO {acr} {"Adv. Comput. Res."}
2945 %%% DEPRECATED: MACRO {bit} {"Bit"}
2947 %%% DEPRECATED: MACRO {cacm} {"Commun. ACM"} % original BibTeX
2949 %%% DEPRECATED: MACRO {cj} {"Comput. J."}
2951 %%% DEPRECATED: MACRO {cn} {"Comput. Netw."}
2953 %%% DEPRECATED: MACRO {cl} {"Comput. Lang."}
2955 %%% DEPRECATED: MACRO {ibmjrd} {"IBM J. Res. and Development"} % original BibTeX
2957 %%% DEPRECATED: MACRO {ibmsj} {"IBM Systems Journal"} % original BibTeX
2959 %%% DEPRECATED: MACRO {ict} {"Inf. Contr."}
2961 %%% DEPRECATED: MACRO {ieebcs} {"IEE/BCS Softw. Eng. J."}
2963 %%% DEPRECATED: MACRO {ieees} {"IEEE Softw."}
2965 %%% DEPRECATED: MACRO {ieeese} {"IEEE Trans. Softw. Eng."} % original BibTeX
2967 %%% DEPRECATED: MACRO {ieeetc} {"IEEE Trans. Comput."} % original BibTeX
2969 %%% DEPRECATED: MACRO {ieeetcad} {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} % original BibTeX
2971 %%% DEPRECATED: MACRO {ieeetpds} {"IEEE Trans. Parall. Distrib. Syst."}
2973 %%% DEPRECATED: MACRO {ieeetit} {"IEEE Trans. Inf. Theory"}
2975 %%% DEPRECATED: MACRO {ipl} {"Inf. Process. Lett."} % original BibTeX
2977 %%% DEPRECATED: MACRO {icp} {"Inf. Comput."}
2979 %%% DEPRECATED: MACRO {ist} {"Inf. Softw. Tech."}
2981 %%% DEPRECATED: MACRO {ijsa} {"Int. J. Supercomput. Appl."}
2983 %%% DEPRECATED: MACRO {ijpp} {"Int. J. Parallel Program."}
2985 %%% DEPRECATED: MACRO {jacm} {"J. ACM"} % original BibTeX
2987 %%% DEPRECATED: % MACRO {jcss} {"Journal of Computer and System Sciences"} % original BibTeX
2988 %%% DEPRECATED: MACRO {jcss} {"J. Comput. Syst. Sci."} % original BibTeX
2990 %%% DEPRECATED: MACRO {jlp} {"J. Logic Program."}
2992 %%% DEPRECATED: MACRO {jfp} {"J. Funct. Program."}
2994 %%% DEPRECATED: MACRO {jsmrp} {"J. Softw. Maint. Res. Pract."}
2996 %%% DEPRECATED: MACRO {jss} {"J. Syst. Softw."}
2998 %%% DEPRECATED: MACRO {jlc} {"J. Logic and Comput."}
3000 %%% DEPRECATED: MACRO {jlsc} {"J. Lisp Symb. Comput."}
3002 %%% DEPRECATED: MACRO {lpls} {"Lett. Program. Lang. Syst."}
3004 %%% DEPRECATED: MACRO {mor} {"Math. Oper. Res."}
3006 %%% DEPRECATED: MACRO {mscs} {"Math. Struct. Comput. Sci."}
3008 %%% DEPRECATED: MACRO {mst} {"Math. Syst. Theor."}
3010 %%% DEPRECATED: MACRO {ngc} {"New Gen. Comput."}
3012 %%% DEPRECATED: MACRO {scp} {"Sci. Comput. Program."} % original BibTeX
3014 %%% DEPRECATED: MACRO {sicomp} {"SIAM J. Comput."} % original BibTeX
3016 %%% DEPRECATED: MACRO {spe} {"Softw. Pract. Exper."}
3018 %%% DEPRECATED: MACRO {tocs} {"ACM Trans. Comput. Syst."} % original BibTeX
3020 %%% DEPRECATED: MACRO {tods} {"ACM Trans. Database Syst."} % original BibTeX
3022 %%% DEPRECATED: MACRO {tog} {"ACM Trans. Graphics"} % original BibTeX
3024 %%% DEPRECATED: MACRO {toms} {"ACM Trans. Math. Softw."} % original BibTeX
3026 %%% DEPRECATED: MACRO {toois} {"ACM Trans. Office Inf. Syst."} % original BibTeX
3028 %%% DEPRECATED: MACRO {toplas} {"ACM Trans. Program. Lang. Syst."} % original BibTeX
3030 %%% DEPRECATED: MACRO {tcs} {"Theor. Comput. Sci."} % original BibTeX
3032 %%% DEPRECATED: MACRO {tr} {"Tech. Rep."}
3033 %%% ====================================================================
3037 FUNCTION { sortify }
3043 FUNCTION { chop.word }
3047 s #1 len substring$ =
3048 { s len #1 + global.max$ substring$ }
3053 FUNCTION { sort.format.names }
3058 s num.names$ 'numnames :=
3059 numnames 'namesleft :=
3065 % s nameptr "{ff{ } }{ll{ }}{ vv{ }}{ jj{ }}" format.name$ 't :=
3066 s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't :=
3067 nameptr numnames = t "others" = and
3071 nameptr #1 + 'nameptr :=
3072 namesleft #1 - 'namesleft :=
3077 FUNCTION { sort.format.title }
3082 "The " #4 t chop.word
3086 #1 global.max$ substring$
3089 FUNCTION { author.sort }
3091 author empty.or.unknown
3092 { key empty.or.unknown
3093 { "to sort, need author or key in " cite$ * warning$
3098 { author sort.format.names }
3102 FUNCTION { author.editor.sort }
3104 author empty.or.unknown
3106 editor empty.or.unknown
3108 key empty.or.unknown
3109 { "to sort, need author, editor, or key in " cite$ * warning$
3115 { editor sort.format.names }
3118 { author sort.format.names }
3122 FUNCTION { author.organization.sort }
3124 % added - GNP. Stack author or organization for sorting (from alpha.bst).
3125 % Unlike alpha.bst, we need entire names, not abbreviations
3127 author empty.or.unknown
3128 { organization empty.or.unknown
3129 { key empty.or.unknown
3130 { "to sort, need author, organization, or key in " cite$ * warning$
3136 { organization sortify }
3139 { author sort.format.names }
3143 FUNCTION { editor.organization.sort }
3145 % added - GNP. Stack editor or organization for sorting (from alpha.bst).
3146 % Unlike alpha.bst, we need entire names, not abbreviations
3148 editor empty.or.unknown
3149 { organization empty.or.unknown
3150 { key empty.or.unknown
3151 { "to sort, need editor, organization, or key in " cite$ * warning$
3157 { organization sortify }
3160 { editor sort.format.names }
3164 FUNCTION { presort }
3166 % Presort creates the bibentry's label via a call to calc.label, and then
3167 % sorts the entries based on entry type. Chicago.bst adds support for
3168 % including organizations as the sort key; the following is stolen from
3171 calc.label sortify % recalculate bibitem label
3172 year field.or.null purify$ #-1 #4 substring$ * % add year
3179 { type$ "proceedings" =
3180 'editor.organization.sort
3182 'author.organization.sort
3189 #1 entry.max$ substring$ % added for newapa
3190 'sort.label := % added for newapa
3191 sort.label % added for newapa
3198 #1 entry.max$ substring$
3204 SORT % by label, year, author/editor, title
3206 FUNCTION { initialize.extra.label.stuff }
3207 { #0 int.to.chr$ 'last.label :=
3209 #0 'last.extra.num :=
3212 FUNCTION { forward.pass }
3214 % Pass through all entries, comparing current entry to last one.
3215 % Need to concatenate year to the stack (done by calc.label) to determine
3216 % if two entries are the same (see presort)
3219 % OLD:calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
3221 author.key.label year field.or.null purify$ #-1 #4 substring$ * % add year
3222 #1 entry.max$ substring$ = % are they equal?
3223 { last.extra.num #1 + 'last.extra.num :=
3224 last.extra.num int.to.chr$ 'extra.label :=
3226 { "a" chr.to.int$ 'last.extra.num :=
3228 % OLD: calc.label year field.or.null purify$ #-1 #4 substring$ * % add year
3230 author.key.label year field.or.null purify$ #-1 #4 substring$ * % add year
3231 #1 entry.max$ substring$ 'last.label := % assign to last.label
3236 FUNCTION { reverse.pass }
3239 { "a" 'extra.label := }
3242 label.year extra.label * 'sort.year :=
3243 extra.label 'next.extra :=
3246 EXECUTE {initialize.extra.label.stuff}
3248 ITERATE {forward.pass}
3250 REVERSE {reverse.pass}
3252 FUNCTION { bib.sort.order }
3257 year field.or.null sortify
3264 #1 entry.max$ substring$
3268 ITERATE { bib.sort.order }
3270 SORT % by sort.label, year, title --- giving final bib. order.
3272 FUNCTION { begin.bib }
3274 %% Set to #0 show 13-digit ISBN in preference to 10-digit ISBN.
3275 %% Set to #1 to show both 10-digit and 13-digit ISBNs.
3276 #1 'show-isbn-10-and-13 :=
3278 "%%% -*-BibTeX-*-" writeln
3279 "%%% Do NOT edit. File created by BibTeX with style" writeln
3280 "%%% ACM-Reference-Format-Journals [18-Jan-2012]." writeln
3283 preamble$ empty.or.unknown
3285 { preamble$ writeln }
3287 "\begin{thebibliography}{00}" writeln
3289 "%%% ====================================================================" writeln
3290 "%%% NOTE TO THE USER: you can override these defaults by providing" writeln
3291 "%%% customized versions of any of these macros before the \bibliography" writeln
3292 "%%% command. Each of them MUST provide its own final punctuation," writeln
3293 "%%% except for \shownote{}, \showDOI{}, and \showURL{}. The latter two" writeln
3294 "%%% do not use final punctuation, in order to avoid confusing it with" writeln
3295 "%%% the Web address." writeln
3297 "%%% To suppress output of a particular field, define its macro to expand" writeln
3298 "%%% to an empty string, or better, \unskip, like this:" writeln
3300 "%%% \newcommand{\showDOI}[1]{\unskip} % LaTeX syntax" writeln
3302 "%%% \def \showDOI #1{\unskip} % plain TeX syntax" writeln
3304 "%%% ====================================================================" writeln
3307 %% ACM publications do not use CODEN, ISSN, and LCCN data, so their default
3308 %% macro wrappers expand to \unskip, discarding their values and unwanted
3311 %% For other publications, prior definitions like these may be useful:
3314 %% \def \showCODEN #1{CODEN #1.}
3315 %% \def \showISSN #1{ISSN #1.}
3316 %% \def \showLCCN #1{LCCN #1.}
3319 %% \newcommand{\showCODEN}[1]{CODEN #1.}
3320 %% \newcommand{\showISSN}[1]#1{ISSN #1.}
3321 %% \newcommand{\showLCCN}[1]{LCCN #1.}
3323 "\ifx \showCODEN \undefined \def \showCODEN #1{\unskip} \fi" writeln
3324 "\ifx \showDOI \undefined \def \showDOI #1{{\tt DOI:}\penalty0{#1}\ } \fi" writeln
3325 % ACM styles omit ISBNs, but they can be included by suitable definitions of
3326 % \showISBNx and \showISBNxiii before the .bbl file is read
3327 "\ifx \showISBNx \undefined \def \showISBNx #1{\unskip} \fi" writeln
3328 "\ifx \showISBNxiii \undefined \def \showISBNxiii #1{\unskip} \fi" writeln
3329 "\ifx \showISSN \undefined \def \showISSN #1{\unskip} \fi" writeln
3330 "\ifx \showLCCN \undefined \def \showLCCN #1{\unskip} \fi" writeln
3331 "\ifx \shownote \undefined \def \shownote #1{#1} \fi" writeln % NB: final period supplied by add.period$ above
3332 "\ifx \showarticletitle \undefined \def \showarticletitle #1{#1} \fi" writeln
3333 "\ifx \showURL \undefined \def \showURL #1{#1} \fi" writeln
3338 EXECUTE {init.state.consts}
3340 ITERATE {call.type$}
3342 FUNCTION { end.bib }
3345 "\end{thebibliography}"
3351 %%% End of ACM-Reference-Format-Journals.bst V1.00 - 18 January 2012