galaaz 0.4.10 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2048 -531
  3. data/Rakefile +3 -2
  4. data/bin/gknit +152 -6
  5. data/bin/gknit-draft +105 -0
  6. data/bin/gknit-draft.rb +28 -0
  7. data/bin/gknit_Rscript +127 -0
  8. data/bin/grun +27 -1
  9. data/bin/gstudio +47 -4
  10. data/bin/{gstudio.rb → gstudio_irb.rb} +0 -0
  11. data/bin/gstudio_pry.rb +7 -0
  12. data/blogs/galaaz_ggplot/galaaz_ggplot.html +10 -195
  13. data/blogs/galaaz_ggplot/galaaz_ggplot.md +404 -0
  14. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/midwest_rb.png +0 -0
  15. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-html/scatter_plot_rb.png +0 -0
  16. data/blogs/gknit/gknit.Rmd +5 -3
  17. data/blogs/gknit/gknit.pdf +0 -0
  18. data/blogs/gknit/lst.rds +0 -0
  19. data/blogs/manual/lst.rds +0 -0
  20. data/blogs/manual/manual.Rmd +826 -53
  21. data/blogs/manual/manual.html +2338 -695
  22. data/blogs/manual/manual.md +2032 -539
  23. data/blogs/manual/manual.pdf +0 -0
  24. data/blogs/manual/manual.tex +1804 -594
  25. data/blogs/manual/manual_files/figure-html/bubble-1.png +0 -0
  26. data/blogs/manual/manual_files/figure-html/diverging_bar.png +0 -0
  27. data/blogs/manual/manual_files/figure-latex/bubble-1.png +0 -0
  28. data/blogs/manual/manual_files/figure-latex/diverging_bar.pdf +0 -0
  29. data/blogs/manual/model.rb +41 -0
  30. data/blogs/nse_dplyr/nse_dplyr.Rmd +226 -73
  31. data/blogs/nse_dplyr/nse_dplyr.html +254 -336
  32. data/blogs/nse_dplyr/nse_dplyr.md +353 -158
  33. data/blogs/oh_my/oh_my.html +274 -386
  34. data/blogs/oh_my/oh_my.md +208 -205
  35. data/blogs/ruby_plot/ruby_plot.html +20 -205
  36. data/blogs/ruby_plot/ruby_plot.md +14 -15
  37. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.png +0 -0
  38. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.png +0 -0
  39. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.png +0 -0
  40. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.png +0 -0
  41. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.png +0 -0
  42. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_decorations.png +0 -0
  43. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.png +0 -0
  44. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.png +0 -0
  45. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.png +0 -0
  46. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.png +0 -0
  47. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.png +0 -0
  48. data/examples/Bibliography/master.bib +50 -0
  49. data/examples/Bibliography/stats.bib +72 -0
  50. data/examples/islr/x_y_rnorm.jpg +0 -0
  51. data/examples/latex_templates/Test-acm_article/Makefile +16 -0
  52. data/examples/latex_templates/Test-acm_article/Test-acm_article.Rmd +65 -0
  53. data/examples/latex_templates/Test-acm_article/acm_proc_article-sp.cls +1670 -0
  54. data/examples/latex_templates/Test-acm_article/sensys-abstract.cls +703 -0
  55. data/examples/latex_templates/Test-acm_article/sigproc.bib +59 -0
  56. data/examples/latex_templates/Test-acs_article/Test-acs_article.Rmd +260 -0
  57. data/examples/latex_templates/Test-acs_article/Test-acs_article.pdf +0 -0
  58. data/examples/latex_templates/Test-acs_article/acs-Test-acs_article.bib +11 -0
  59. data/examples/latex_templates/Test-acs_article/acs-my_output.bib +11 -0
  60. data/examples/latex_templates/Test-acs_article/acstest.bib +17 -0
  61. data/examples/latex_templates/Test-aea_article/AEA.cls +1414 -0
  62. data/{blogs/gknit/marshal.dump → examples/latex_templates/Test-aea_article/BibFile.bib} +0 -0
  63. data/examples/latex_templates/Test-aea_article/Test-aea_article.Rmd +108 -0
  64. data/examples/latex_templates/Test-aea_article/Test-aea_article.pdf +0 -0
  65. data/examples/latex_templates/Test-aea_article/aea.bst +1269 -0
  66. data/examples/latex_templates/Test-aea_article/multicol.sty +853 -0
  67. data/examples/latex_templates/Test-aea_article/references.bib +0 -0
  68. data/examples/latex_templates/Test-aea_article/setspace.sty +546 -0
  69. data/examples/latex_templates/Test-amq_article/Test-amq_article.Rmd +256 -0
  70. data/examples/latex_templates/Test-amq_article/Test-amq_article.pdf +0 -0
  71. data/examples/latex_templates/Test-amq_article/Test-amq_article.pdfsync +3397 -0
  72. data/examples/latex_templates/Test-amq_article/pics/Figure2.pdf +0 -0
  73. data/examples/latex_templates/Test-ams_article/Test-ams_article.Rmd +215 -0
  74. data/examples/latex_templates/Test-ams_article/amstest.bib +436 -0
  75. data/examples/latex_templates/Test-asa_article/Test-asa_article.Rmd +153 -0
  76. data/examples/latex_templates/Test-asa_article/Test-asa_article.pdf +0 -0
  77. data/examples/latex_templates/Test-asa_article/agsm.bst +1353 -0
  78. data/examples/latex_templates/Test-asa_article/bibliography.bib +233 -0
  79. data/examples/latex_templates/Test-ieee_article/IEEEtran.bst +2409 -0
  80. data/examples/latex_templates/Test-ieee_article/IEEEtran.cls +6346 -0
  81. data/examples/latex_templates/Test-ieee_article/Test-ieee_article.Rmd +175 -0
  82. data/examples/latex_templates/Test-ieee_article/Test-ieee_article.pdf +0 -0
  83. data/examples/latex_templates/Test-ieee_article/mybibfile.bib +20 -0
  84. data/examples/latex_templates/Test-rjournal_article/RJournal.sty +335 -0
  85. data/examples/latex_templates/Test-rjournal_article/RJreferences.bib +18 -0
  86. data/examples/latex_templates/Test-rjournal_article/RJwrapper.pdf +0 -0
  87. data/examples/latex_templates/Test-rjournal_article/Test-rjournal_article.Rmd +52 -0
  88. data/examples/latex_templates/Test-springer_article/Test-springer_article.Rmd +65 -0
  89. data/examples/latex_templates/Test-springer_article/Test-springer_article.pdf +0 -0
  90. data/examples/latex_templates/Test-springer_article/bibliography.bib +26 -0
  91. data/examples/latex_templates/Test-springer_article/spbasic.bst +1658 -0
  92. data/examples/latex_templates/Test-springer_article/spmpsci.bst +1512 -0
  93. data/examples/latex_templates/Test-springer_article/spphys.bst +1443 -0
  94. data/examples/latex_templates/Test-springer_article/svglov3.clo +113 -0
  95. data/examples/latex_templates/Test-springer_article/svjour3.cls +1431 -0
  96. data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.Rmd +73 -0
  97. data/examples/rmarkdown/svm-rmarkdown-anon-ms-example/svm-rmarkdown-anon-ms-example.pdf +0 -0
  98. data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.Rmd +382 -0
  99. data/examples/rmarkdown/svm-rmarkdown-article-example/svm-rmarkdown-article-example.pdf +0 -0
  100. data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.Rmd +164 -0
  101. data/examples/rmarkdown/svm-rmarkdown-beamer-example/svm-rmarkdown-beamer-example.pdf +0 -0
  102. data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.Rmd +92 -0
  103. data/examples/rmarkdown/svm-rmarkdown-cv/svm-rmarkdown-cv.pdf +0 -0
  104. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/attend-grade-relationships.csv +482 -0
  105. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.Rmd +280 -0
  106. data/examples/rmarkdown/svm-rmarkdown-syllabus-example/svm-rmarkdown-syllabus-example.pdf +0 -0
  107. data/examples/rmarkdown/svm-xaringan-example/svm-xaringan-example.Rmd +386 -0
  108. data/lib/R_interface/r.rb +1 -1
  109. data/lib/R_interface/r_libs.R +1 -1
  110. data/lib/R_interface/r_methods.rb +10 -0
  111. data/lib/R_interface/rpkg.rb +1 -0
  112. data/lib/R_interface/rsupport.rb +4 -6
  113. data/lib/gknit.rb +2 -0
  114. data/lib/gknit/draft.rb +105 -0
  115. data/lib/gknit/knitr_engine.rb +0 -33
  116. data/lib/util/exec_ruby.rb +1 -27
  117. data/specs/figures/bg.jpeg +0 -0
  118. data/specs/figures/bg.png +0 -0
  119. data/specs/figures/dose_len.png +0 -0
  120. data/specs/figures/no_args.jpeg +0 -0
  121. data/specs/figures/no_args.png +0 -0
  122. data/specs/figures/width_height.jpeg +0 -0
  123. data/specs/figures/width_height.png +0 -0
  124. data/specs/figures/width_height_units1.jpeg +0 -0
  125. data/specs/figures/width_height_units1.png +0 -0
  126. data/specs/figures/width_height_units2.jpeg +0 -0
  127. data/specs/figures/width_height_units2.png +0 -0
  128. data/specs/r_dataframe.spec.rb +11 -11
  129. data/specs/ruby_expression.spec.rb +1 -0
  130. data/specs/tmp.rb +41 -20
  131. data/version.rb +1 -1
  132. metadata +73 -35
  133. data/blogs/galaaz_ggplot/galaaz_ggplot.aux +0 -41
  134. data/blogs/galaaz_ggplot/galaaz_ggplot.out +0 -10
  135. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/midwest_rb.pdf +0 -0
  136. data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-latex/scatter_plot_rb.pdf +0 -0
  137. data/blogs/gknit/gknit.md +0 -1430
  138. data/blogs/gknit/gknit.tex +0 -1358
  139. data/blogs/manual/graph.rb +0 -29
  140. data/blogs/nse_dplyr/nse_dplyr.tex +0 -1373
  141. data/blogs/ruby_plot/ruby_plot.Rmd_external_figs +0 -662
  142. data/blogs/ruby_plot/ruby_plot_files/figure-html/dose_len.svg +0 -57
  143. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_delivery.svg +0 -106
  144. data/blogs/ruby_plot/ruby_plot_files/figure-html/facet_by_dose.svg +0 -110
  145. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color.svg +0 -174
  146. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_by_delivery_color2.svg +0 -236
  147. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_jitter.svg +0 -296
  148. data/blogs/ruby_plot/ruby_plot_files/figure-html/facets_with_points.svg +0 -236
  149. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_box_plot.svg +0 -218
  150. data/blogs/ruby_plot/ruby_plot_files/figure-html/final_violin_plot.svg +0 -128
  151. data/blogs/ruby_plot/ruby_plot_files/figure-html/violin_with_jitter.svg +0 -150
  152. data/blogs/ruby_plot/ruby_plot_files/figure-latex/dose_len.png +0 -0
  153. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_delivery.png +0 -0
  154. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facet_by_dose.png +0 -0
  155. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color.png +0 -0
  156. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_by_delivery_color2.png +0 -0
  157. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_decorations.png +0 -0
  158. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_jitter.png +0 -0
  159. data/blogs/ruby_plot/ruby_plot_files/figure-latex/facets_with_points.png +0 -0
  160. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_box_plot.png +0 -0
  161. data/blogs/ruby_plot/ruby_plot_files/figure-latex/final_violin_plot.png +0 -0
  162. data/blogs/ruby_plot/ruby_plot_files/figure-latex/violin_with_jitter.png +0 -0
  163. data/examples/paper/paper.rb +0 -36
@@ -0,0 +1,1512 @@
1
+ %%
2
+ %% This is file `spmpsci.bst',
3
+ %% generated with the docstrip utility.
4
+ %%
5
+ %% The original source files were:
6
+ %%
7
+ %% merlin.mbs (with options: `vonx,nm-rvv,yr-par,xmth,jttl-rm,thtit-a,vol-bf,volp-com,pgsep-c,num-xser,ser-vol,ser-ed,jnm-x,btit-rm,bt-rm,doi,edparxc,au-col,in-col,fin-bare,pp,ed,abr,xedn,jabr,xand,url,url-blk,nfss,')
8
+ %% ----------------------------------------
9
+ %%********************************************************************************%%
10
+ %% %%
11
+ %% For Springer mathematics, computer science, and physical sciences journals %%
12
+ %% publications. %%
13
+ %% Report bugs and improvements to: Joylene Vette-Guillaume or Frank Holzwarth %%
14
+ %% Springer-Verlag 2004/10/15 %%
15
+ %% %%
16
+ %%********************************************************************************%%
17
+ %%
18
+ %% Copyright 1994-2004 Patrick W Daly
19
+ % ===============================================================
20
+ % IMPORTANT NOTICE:
21
+ % This bibliographic style (bst) file has been generated from one or
22
+ % more master bibliographic style (mbs) files, listed above.
23
+ %
24
+ % This generated file can be redistributed and/or modified under the terms
25
+ % of the LaTeX Project Public License Distributed from CTAN
26
+ % archives in directory macros/latex/base/lppl.txt; either
27
+ % version 1 of the License, or any later version.
28
+ % ===============================================================
29
+ % Name and version information of the main mbs file:
30
+ % \ProvidesFile{merlin.mbs}[2004/02/09 4.13 (PWD, AO, DPC)]
31
+ % For use with BibTeX version 0.99a or later
32
+ %-------------------------------------------------------------------
33
+ % This bibliography style file is intended for texts in ENGLISH
34
+ % This is a numerical citation style, and as such is standard LaTeX.
35
+ % It requires no extra package to interface to the main text.
36
+ % The form of the \bibitem entries is
37
+ % \bibitem{key}...
38
+ % Usage of \cite is as follows:
39
+ % \cite{key} ==>> [#]
40
+ % \cite[chap. 2]{key} ==>> [#, chap. 2]
41
+ % where # is a number determined by the ordering in the reference list.
42
+ % The order in the reference list is alphabetical by authors.
43
+ %---------------------------------------------------------------------
44
+
45
+ ENTRY
46
+ { address
47
+ author
48
+ booktitle
49
+ chapter
50
+ doi
51
+ edition
52
+ editor
53
+ eid
54
+ howpublished
55
+ institution
56
+ journal
57
+ key
58
+ month
59
+ note
60
+ number
61
+ organization
62
+ pages
63
+ publisher
64
+ school
65
+ series
66
+ title
67
+ type
68
+ url
69
+ volume
70
+ year
71
+ }
72
+ {}
73
+ { label }
74
+ INTEGERS { output.state before.all mid.sentence after.sentence after.block }
75
+ FUNCTION {init.state.consts}
76
+ { #0 'before.all :=
77
+ #1 'mid.sentence :=
78
+ #2 'after.sentence :=
79
+ #3 'after.block :=
80
+ }
81
+ STRINGS { s t}
82
+ FUNCTION {output.nonnull}
83
+ { 's :=
84
+ output.state mid.sentence =
85
+ { ", " * write$ }
86
+ { output.state after.block =
87
+ { add.period$ write$
88
+ newline$
89
+ "\newblock " write$
90
+ }
91
+ { output.state before.all =
92
+ 'write$
93
+ { add.period$ " " * write$ }
94
+ if$
95
+ }
96
+ if$
97
+ mid.sentence 'output.state :=
98
+ }
99
+ if$
100
+ s
101
+ }
102
+ FUNCTION {output}
103
+ { duplicate$ empty$
104
+ 'pop$
105
+ 'output.nonnull
106
+ if$
107
+ }
108
+ FUNCTION {output.check}
109
+ { 't :=
110
+ duplicate$ empty$
111
+ { pop$ "empty " t * " in " * cite$ * warning$ }
112
+ 'output.nonnull
113
+ if$
114
+ }
115
+ FUNCTION {fin.entry}
116
+ { duplicate$ empty$
117
+ 'pop$
118
+ 'write$
119
+ if$
120
+ newline$
121
+ }
122
+
123
+ FUNCTION {new.block}
124
+ { output.state before.all =
125
+ 'skip$
126
+ { after.block 'output.state := }
127
+ if$
128
+ }
129
+ FUNCTION {new.sentence}
130
+ { output.state after.block =
131
+ 'skip$
132
+ { output.state before.all =
133
+ 'skip$
134
+ { after.sentence 'output.state := }
135
+ if$
136
+ }
137
+ if$
138
+ }
139
+ FUNCTION {add.blank}
140
+ { " " * before.all 'output.state :=
141
+ }
142
+
143
+ FUNCTION {add.colon}
144
+ { duplicate$ empty$
145
+ 'skip$
146
+ { ":" * add.blank }
147
+ if$
148
+ }
149
+
150
+ FUNCTION {date.block}
151
+ {
152
+ new.block
153
+ }
154
+
155
+ FUNCTION {not}
156
+ { { #0 }
157
+ { #1 }
158
+ if$
159
+ }
160
+ FUNCTION {and}
161
+ { 'skip$
162
+ { pop$ #0 }
163
+ if$
164
+ }
165
+ FUNCTION {or}
166
+ { { pop$ #1 }
167
+ 'skip$
168
+ if$
169
+ }
170
+ FUNCTION {new.block.checka}
171
+ { empty$
172
+ 'skip$
173
+ 'new.block
174
+ if$
175
+ }
176
+ FUNCTION {new.block.checkb}
177
+ { empty$
178
+ swap$ empty$
179
+ and
180
+ 'skip$
181
+ 'new.block
182
+ if$
183
+ }
184
+ FUNCTION {new.sentence.checka}
185
+ { empty$
186
+ 'skip$
187
+ 'new.sentence
188
+ if$
189
+ }
190
+ FUNCTION {new.sentence.checkb}
191
+ { empty$
192
+ swap$ empty$
193
+ and
194
+ 'skip$
195
+ 'new.sentence
196
+ if$
197
+ }
198
+ FUNCTION {field.or.null}
199
+ { duplicate$ empty$
200
+ { pop$ "" }
201
+ 'skip$
202
+ if$
203
+ }
204
+ FUNCTION {emphasize}
205
+ { duplicate$ empty$
206
+ { pop$ "" }
207
+ { "\emph{" swap$ * "}" * }
208
+ if$
209
+ }
210
+ FUNCTION {bolden}
211
+ { duplicate$ empty$
212
+ { pop$ "" }
213
+ { "\textbf{" swap$ * "}" * }
214
+ if$
215
+ }
216
+ FUNCTION {tie.or.space.prefix}
217
+ { duplicate$ text.length$ #3 <
218
+ { "~" }
219
+ { " " }
220
+ if$
221
+ swap$
222
+ }
223
+
224
+ FUNCTION {capitalize}
225
+ { "u" change.case$ "t" change.case$ }
226
+
227
+ FUNCTION {space.word}
228
+ { " " swap$ * " " * }
229
+ % Here are the language-specific definitions for explicit words.
230
+ % Each function has a name bbl.xxx where xxx is the English word.
231
+ % The language selected here is ENGLISH
232
+ FUNCTION {bbl.and}
233
+ { "and"}
234
+
235
+ FUNCTION {bbl.etal}
236
+ { "et~al." }
237
+
238
+ FUNCTION {bbl.editors}
239
+ { "eds." }
240
+
241
+ FUNCTION {bbl.editor}
242
+ { "ed." }
243
+
244
+ FUNCTION {bbl.edby}
245
+ { "edited by" }
246
+
247
+ FUNCTION {bbl.edition}
248
+ { "edn." }
249
+
250
+ FUNCTION {bbl.volume}
251
+ { "vol." }
252
+
253
+ FUNCTION {bbl.of}
254
+ { "of" }
255
+
256
+ FUNCTION {bbl.number}
257
+ { "no." }
258
+
259
+ FUNCTION {bbl.nr}
260
+ { "no." }
261
+
262
+ FUNCTION {bbl.in}
263
+ { "in" }
264
+
265
+ FUNCTION {bbl.pages}
266
+ { "pp." }
267
+
268
+ FUNCTION {bbl.page}
269
+ { "p." }
270
+
271
+ FUNCTION {bbl.chapter}
272
+ { "chap." }
273
+
274
+ FUNCTION {bbl.techrep}
275
+ { "Tech. Rep." }
276
+
277
+ FUNCTION {bbl.mthesis}
278
+ { "Master's thesis" }
279
+
280
+ FUNCTION {bbl.phdthesis}
281
+ { "Ph.D. thesis" }
282
+
283
+ MACRO {jan} {"Jan."}
284
+
285
+ MACRO {feb} {"Feb."}
286
+
287
+ MACRO {mar} {"Mar."}
288
+
289
+ MACRO {apr} {"Apr."}
290
+
291
+ MACRO {may} {"May"}
292
+
293
+ MACRO {jun} {"Jun."}
294
+
295
+ MACRO {jul} {"Jul."}
296
+
297
+ MACRO {aug} {"Aug."}
298
+
299
+ MACRO {sep} {"Sep."}
300
+
301
+ MACRO {oct} {"Oct."}
302
+
303
+ MACRO {nov} {"Nov."}
304
+
305
+ MACRO {dec} {"Dec."}
306
+
307
+ MACRO {acmcs} {"ACM Comput. Surv."}
308
+
309
+ MACRO {acta} {"Acta Inf."}
310
+
311
+ MACRO {cacm} {"Commun. ACM"}
312
+
313
+ MACRO {ibmjrd} {"IBM J. Res. Dev."}
314
+
315
+ MACRO {ibmsj} {"IBM Syst.~J."}
316
+
317
+ MACRO {ieeese} {"IEEE Trans. Software Eng."}
318
+
319
+ MACRO {ieeetc} {"IEEE Trans. Comput."}
320
+
321
+ MACRO {ieeetcad}
322
+ {"IEEE Trans. Comput. Aid. Des."}
323
+
324
+ MACRO {ipl} {"Inf. Process. Lett."}
325
+
326
+ MACRO {jacm} {"J.~ACM"}
327
+
328
+ MACRO {jcss} {"J.~Comput. Syst. Sci."}
329
+
330
+ MACRO {scp} {"Sci. Comput. Program."}
331
+
332
+ MACRO {sicomp} {"SIAM J. Comput."}
333
+
334
+ MACRO {tocs} {"ACM Trans. Comput. Syst."}
335
+
336
+ MACRO {tods} {"ACM Trans. Database Syst."}
337
+
338
+ MACRO {tog} {"ACM Trans. Graphic."}
339
+
340
+ MACRO {toms} {"ACM Trans. Math. Software"}
341
+
342
+ MACRO {toois} {"ACM Trans. Office Inf. Syst."}
343
+
344
+ MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."}
345
+
346
+ MACRO {tcs} {"Theor. Comput. Sci."}
347
+
348
+ FUNCTION {bibinfo.check}
349
+ { swap$
350
+ duplicate$ missing$
351
+ {
352
+ pop$ pop$
353
+ ""
354
+ }
355
+ { duplicate$ empty$
356
+ {
357
+ swap$ pop$
358
+ }
359
+ { swap$
360
+ pop$
361
+ }
362
+ if$
363
+ }
364
+ if$
365
+ }
366
+ FUNCTION {bibinfo.warn}
367
+ { swap$
368
+ duplicate$ missing$
369
+ {
370
+ swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
371
+ ""
372
+ }
373
+ { duplicate$ empty$
374
+ {
375
+ swap$ "empty " swap$ * " in " * cite$ * warning$
376
+ }
377
+ { swap$
378
+ pop$
379
+ }
380
+ if$
381
+ }
382
+ if$
383
+ }
384
+ FUNCTION {format.url}
385
+ { url empty$
386
+ { "" }
387
+ { "\urlprefix\url{" url * "}" * }
388
+ if$
389
+ }
390
+
391
+ STRINGS { bibinfo}
392
+ INTEGERS { nameptr namesleft numnames }
393
+
394
+ FUNCTION {format.names}
395
+ { 'bibinfo :=
396
+ duplicate$ empty$ 'skip$ {
397
+ 's :=
398
+ "" 't :=
399
+ #1 'nameptr :=
400
+ s num.names$ 'numnames :=
401
+ numnames 'namesleft :=
402
+ { namesleft #0 > }
403
+ { s nameptr
404
+ "{vv~}{ll}{ jj}{, f{.}.}"
405
+ format.name$
406
+ bibinfo bibinfo.check
407
+ 't :=
408
+ nameptr #1 >
409
+ {
410
+ namesleft #1 >
411
+ { ", " * t * }
412
+ {
413
+ "," *
414
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
415
+ { 't := }
416
+ { pop$ }
417
+ if$
418
+ t "others" =
419
+ {
420
+ " " * bbl.etal *
421
+ }
422
+ { " " * t * }
423
+ if$
424
+ }
425
+ if$
426
+ }
427
+ 't
428
+ if$
429
+ nameptr #1 + 'nameptr :=
430
+ namesleft #1 - 'namesleft :=
431
+ }
432
+ while$
433
+ } if$
434
+ }
435
+ FUNCTION {format.names.ed}
436
+ {
437
+ 'bibinfo :=
438
+ duplicate$ empty$ 'skip$ {
439
+ 's :=
440
+ "" 't :=
441
+ #1 'nameptr :=
442
+ s num.names$ 'numnames :=
443
+ numnames 'namesleft :=
444
+ { namesleft #0 > }
445
+ { s nameptr
446
+ "{f{.}.~}{vv~}{ll}{ jj}"
447
+ format.name$
448
+ bibinfo bibinfo.check
449
+ 't :=
450
+ nameptr #1 >
451
+ {
452
+ namesleft #1 >
453
+ { ", " * t * }
454
+ {
455
+ "," *
456
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
457
+ { 't := }
458
+ { pop$ }
459
+ if$
460
+ t "others" =
461
+ {
462
+
463
+ " " * bbl.etal *
464
+ }
465
+ { " " * t * }
466
+ if$
467
+ }
468
+ if$
469
+ }
470
+ 't
471
+ if$
472
+ nameptr #1 + 'nameptr :=
473
+ namesleft #1 - 'namesleft :=
474
+ }
475
+ while$
476
+ } if$
477
+ }
478
+ FUNCTION {format.authors}
479
+ { author "author" format.names
480
+ }
481
+ FUNCTION {get.bbl.editor}
482
+ { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
483
+
484
+ FUNCTION {format.editors}
485
+ { editor "editor" format.names duplicate$ empty$ 'skip$
486
+ {
487
+ " " *
488
+ get.bbl.editor
489
+ "(" swap$ * ")" *
490
+ *
491
+ }
492
+ if$
493
+ }
494
+ FUNCTION {format.doi}
495
+ { doi "doi" bibinfo.check
496
+ duplicate$ empty$ 'skip$
497
+ {
498
+ new.block
499
+ "\doi{" swap$ * "}" *
500
+ }
501
+ if$
502
+ }
503
+ FUNCTION {format.note}
504
+ {
505
+ note empty$
506
+ { "" }
507
+ { note #1 #1 substring$
508
+ duplicate$ "{" =
509
+ 'skip$
510
+ { output.state mid.sentence =
511
+ { "l" }
512
+ { "u" }
513
+ if$
514
+ change.case$
515
+ }
516
+ if$
517
+ note #2 global.max$ substring$ * "note" bibinfo.check
518
+ }
519
+ if$
520
+ }
521
+
522
+ FUNCTION {format.title}
523
+ { title
524
+ duplicate$ empty$ 'skip$
525
+ { "t" change.case$ }
526
+ if$
527
+ "title" bibinfo.check
528
+ }
529
+ FUNCTION {output.bibitem}
530
+ { newline$
531
+ "\bibitem{" write$
532
+ cite$ write$
533
+ "}" write$
534
+ newline$
535
+ ""
536
+ before.all 'output.state :=
537
+ }
538
+
539
+ FUNCTION {if.digit}
540
+ { duplicate$ "0" =
541
+ swap$ duplicate$ "1" =
542
+ swap$ duplicate$ "2" =
543
+ swap$ duplicate$ "3" =
544
+ swap$ duplicate$ "4" =
545
+ swap$ duplicate$ "5" =
546
+ swap$ duplicate$ "6" =
547
+ swap$ duplicate$ "7" =
548
+ swap$ duplicate$ "8" =
549
+ swap$ "9" = or or or or or or or or or
550
+ }
551
+ FUNCTION {n.separate}
552
+ { 't :=
553
+ ""
554
+ #0 'numnames :=
555
+ { t empty$ not }
556
+ { t #-1 #1 substring$ if.digit
557
+ { numnames #1 + 'numnames := }
558
+ { #0 'numnames := }
559
+ if$
560
+ t #-1 #1 substring$ swap$ *
561
+ t #-2 global.max$ substring$ 't :=
562
+ numnames #5 =
563
+ { duplicate$ #1 #2 substring$ swap$
564
+ #3 global.max$ substring$
565
+ "," swap$ * *
566
+ }
567
+ 'skip$
568
+ if$
569
+ }
570
+ while$
571
+ }
572
+ FUNCTION {n.dashify}
573
+ {
574
+ 't :=
575
+ ""
576
+ { t empty$ not }
577
+ { t #1 #1 substring$ "-" =
578
+ { t #1 #2 substring$ "--" = not
579
+ { "--" *
580
+ t #2 global.max$ substring$ 't :=
581
+ }
582
+ { { t #1 #1 substring$ "-" = }
583
+ { "-" *
584
+ t #2 global.max$ substring$ 't :=
585
+ }
586
+ while$
587
+ }
588
+ if$
589
+ }
590
+ { t #1 #1 substring$ *
591
+ t #2 global.max$ substring$ 't :=
592
+ }
593
+ if$
594
+ }
595
+ while$
596
+ }
597
+
598
+ FUNCTION {word.in}
599
+ { bbl.in capitalize
600
+ ":" *
601
+ " " * }
602
+
603
+ FUNCTION {format.date}
604
+ {
605
+ ""
606
+ duplicate$ empty$
607
+ year "year" bibinfo.check duplicate$ empty$
608
+ { swap$ 'skip$
609
+ { "there's a month but no year in " cite$ * warning$ }
610
+ if$
611
+ *
612
+ }
613
+ { swap$ 'skip$
614
+ {
615
+ swap$
616
+ " " * swap$
617
+ }
618
+ if$
619
+ *
620
+ }
621
+ if$
622
+ duplicate$ empty$
623
+ 'skip$
624
+ {
625
+ before.all 'output.state :=
626
+ " (" swap$ * ")" *
627
+ }
628
+ if$
629
+ }
630
+ FUNCTION {format.btitle}
631
+ { title "title" bibinfo.check
632
+ duplicate$ empty$ 'skip$
633
+ {
634
+ }
635
+ if$
636
+ }
637
+ FUNCTION {either.or.check}
638
+ { empty$
639
+ 'pop$
640
+ { "can't use both " swap$ * " fields in " * cite$ * warning$ }
641
+ if$
642
+ }
643
+ FUNCTION {format.bvolume}
644
+ { volume empty$
645
+ { "" }
646
+ { bbl.volume volume tie.or.space.prefix
647
+ "volume" bibinfo.check * *
648
+ series "series" bibinfo.check
649
+ duplicate$ empty$ 'pop$
650
+ { emphasize ", " * swap$ * }
651
+ if$
652
+ "volume and number" number either.or.check
653
+ }
654
+ if$
655
+ }
656
+ FUNCTION {format.number.series}
657
+ { volume empty$
658
+ { number empty$
659
+ { series field.or.null }
660
+ { series empty$
661
+ { number "number" bibinfo.check }
662
+ { output.state mid.sentence =
663
+ { bbl.number }
664
+ { bbl.number capitalize }
665
+ if$
666
+ number tie.or.space.prefix "number" bibinfo.check * *
667
+ bbl.in space.word *
668
+ series "series" bibinfo.check *
669
+ }
670
+ if$
671
+ }
672
+ if$
673
+ }
674
+ { "" }
675
+ if$
676
+ }
677
+
678
+ FUNCTION {format.edition}
679
+ { edition duplicate$ empty$ 'skip$
680
+ {
681
+ output.state mid.sentence =
682
+ { "l" }
683
+ { "t" }
684
+ if$ change.case$
685
+ "edition" bibinfo.check
686
+ " " * bbl.edition *
687
+ }
688
+ if$
689
+ }
690
+ INTEGERS { multiresult }
691
+ FUNCTION {multi.page.check}
692
+ { 't :=
693
+ #0 'multiresult :=
694
+ { multiresult not
695
+ t empty$ not
696
+ and
697
+ }
698
+ { t #1 #1 substring$
699
+ duplicate$ "-" =
700
+ swap$ duplicate$ "," =
701
+ swap$ "+" =
702
+ or or
703
+ { #1 'multiresult := }
704
+ { t #2 global.max$ substring$ 't := }
705
+ if$
706
+ }
707
+ while$
708
+ multiresult
709
+ }
710
+ FUNCTION {format.pages}
711
+ { pages duplicate$ empty$ 'skip$
712
+ { duplicate$ multi.page.check
713
+ {
714
+ bbl.pages swap$
715
+ n.dashify
716
+ }
717
+ {
718
+ bbl.page swap$
719
+ }
720
+ if$
721
+ tie.or.space.prefix
722
+ "pages" bibinfo.check
723
+ * *
724
+ }
725
+ if$
726
+ }
727
+ FUNCTION {format.journal.pages}
728
+ { pages duplicate$ empty$ 'pop$
729
+ { swap$ duplicate$ empty$
730
+ { pop$ pop$ format.pages }
731
+ {
732
+ ", " *
733
+ swap$
734
+ n.dashify
735
+ "pages" bibinfo.check
736
+ *
737
+ }
738
+ if$
739
+ }
740
+ if$
741
+ }
742
+ FUNCTION {format.journal.eid}
743
+ { eid "eid" bibinfo.check
744
+ duplicate$ empty$ 'pop$
745
+ { swap$ duplicate$ empty$ 'skip$
746
+ {
747
+ ", " *
748
+ }
749
+ if$
750
+ swap$ *
751
+ }
752
+ if$
753
+ }
754
+ FUNCTION {format.vol.num.pages}
755
+ { volume field.or.null
756
+ duplicate$ empty$ 'skip$
757
+ {
758
+ "volume" bibinfo.check
759
+ }
760
+ if$
761
+ bolden
762
+ number "number" bibinfo.check duplicate$ empty$ 'skip$
763
+ {
764
+ swap$ duplicate$ empty$
765
+ { "there's a number but no volume in " cite$ * warning$ }
766
+ 'skip$
767
+ if$
768
+ swap$
769
+ "(" swap$ * ")" *
770
+ }
771
+ if$ *
772
+ eid empty$
773
+ { format.journal.pages }
774
+ { format.journal.eid }
775
+ if$
776
+ }
777
+
778
+ FUNCTION {format.chapter.pages}
779
+ { chapter empty$
780
+ 'format.pages
781
+ { type empty$
782
+ { bbl.chapter }
783
+ { type "l" change.case$
784
+ "type" bibinfo.check
785
+ }
786
+ if$
787
+ chapter tie.or.space.prefix
788
+ "chapter" bibinfo.check
789
+ * *
790
+ pages empty$
791
+ 'skip$
792
+ { ", " * format.pages * }
793
+ if$
794
+ }
795
+ if$
796
+ }
797
+
798
+ FUNCTION {format.booktitle}
799
+ {
800
+ booktitle "booktitle" bibinfo.check
801
+ }
802
+ FUNCTION {format.in.ed.booktitle}
803
+ { format.booktitle duplicate$ empty$ 'skip$
804
+ {
805
+ format.bvolume duplicate$ empty$ 'pop$
806
+ { ", " swap$ * * }
807
+ if$
808
+ editor "editor" format.names.ed duplicate$ empty$ 'pop$
809
+ {
810
+ " " *
811
+ get.bbl.editor
812
+ "(" swap$ * ") " *
813
+ * swap$
814
+ * }
815
+ if$
816
+ word.in swap$ *
817
+ }
818
+ if$
819
+ }
820
+ FUNCTION {empty.misc.check}
821
+ { author empty$ title empty$ howpublished empty$
822
+ month empty$ year empty$ note empty$
823
+ and and and and and
824
+ key empty$ not and
825
+ { "all relevant fields are empty in " cite$ * warning$ }
826
+ 'skip$
827
+ if$
828
+ }
829
+ FUNCTION {format.thesis.type}
830
+ { type duplicate$ empty$
831
+ 'pop$
832
+ { swap$ pop$
833
+ "t" change.case$ "type" bibinfo.check
834
+ }
835
+ if$
836
+ }
837
+ FUNCTION {format.tr.number}
838
+ { number "number" bibinfo.check
839
+ type duplicate$ empty$
840
+ { pop$ bbl.techrep }
841
+ 'skip$
842
+ if$
843
+ "type" bibinfo.check
844
+ swap$ duplicate$ empty$
845
+ { pop$ "t" change.case$ }
846
+ { tie.or.space.prefix * * }
847
+ if$
848
+ }
849
+ FUNCTION {format.article.crossref}
850
+ {
851
+ key duplicate$ empty$
852
+ { pop$
853
+ journal duplicate$ empty$
854
+ { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
855
+ { "journal" bibinfo.check emphasize word.in swap$ * }
856
+ if$
857
+ }
858
+ { word.in swap$ * " " *}
859
+ if$
860
+ " \cite{" * crossref * "}" *
861
+ }
862
+ FUNCTION {format.crossref.editor}
863
+ { editor #1 "{vv~}{ll}" format.name$
864
+ "editor" bibinfo.check
865
+ editor num.names$ duplicate$
866
+ #2 >
867
+ { pop$
868
+ "editor" bibinfo.check
869
+ " " * bbl.etal
870
+ *
871
+ }
872
+ { #2 <
873
+ 'skip$
874
+ { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
875
+ {
876
+ "editor" bibinfo.check
877
+ " " * bbl.etal
878
+ *
879
+ }
880
+ {
881
+ bbl.and space.word
882
+ * editor #2 "{vv~}{ll}" format.name$
883
+ "editor" bibinfo.check
884
+ *
885
+ }
886
+ if$
887
+ }
888
+ if$
889
+ }
890
+ if$
891
+ }
892
+ FUNCTION {format.book.crossref}
893
+ { volume duplicate$ empty$
894
+ { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
895
+ pop$ word.in
896
+ }
897
+ { bbl.volume
898
+ capitalize
899
+ swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
900
+ }
901
+ if$
902
+ editor empty$
903
+ editor field.or.null author field.or.null =
904
+ or
905
+ { key empty$
906
+ { series empty$
907
+ { "need editor, key, or series for " cite$ * " to crossref " *
908
+ crossref * warning$
909
+ "" *
910
+ }
911
+ { series emphasize * }
912
+ if$
913
+ }
914
+ { key * }
915
+ if$
916
+ }
917
+ { format.crossref.editor * }
918
+ if$
919
+ " \cite{" * crossref * "}" *
920
+ }
921
+ FUNCTION {format.incoll.inproc.crossref}
922
+ {
923
+ editor empty$
924
+ editor field.or.null author field.or.null =
925
+ or
926
+ { key empty$
927
+ { format.booktitle duplicate$ empty$
928
+ { "need editor, key, or booktitle for " cite$ * " to crossref " *
929
+ crossref * warning$
930
+ }
931
+ { word.in swap$ * }
932
+ if$
933
+ }
934
+ { word.in key * " " *}
935
+ if$
936
+ }
937
+ { word.in format.crossref.editor * " " *}
938
+ if$
939
+ " \cite{" * crossref * "}" *
940
+ }
941
+ FUNCTION {format.org.or.pub}
942
+ { 't :=
943
+ ""
944
+ address empty$ t empty$ and
945
+ 'skip$
946
+ {
947
+ t empty$
948
+ { address "address" bibinfo.check *
949
+ }
950
+ { t *
951
+ address empty$
952
+ 'skip$
953
+ { ", " * address "address" bibinfo.check * }
954
+ if$
955
+ }
956
+ if$
957
+ }
958
+ if$
959
+ }
960
+ FUNCTION {format.publisher.address}
961
+ { publisher "publisher" bibinfo.warn format.org.or.pub
962
+ }
963
+
964
+ FUNCTION {format.organization.address}
965
+ { organization "organization" bibinfo.check format.org.or.pub
966
+ }
967
+
968
+ FUNCTION {article}
969
+ { output.bibitem
970
+ format.authors "author" output.check
971
+ add.colon
972
+ new.block
973
+ format.title "title" output.check
974
+ new.block
975
+ crossref missing$
976
+ {
977
+ journal
978
+ "journal" bibinfo.check
979
+ "journal" output.check
980
+ add.blank
981
+ format.vol.num.pages output
982
+ format.date "year" output.check
983
+ }
984
+ { format.article.crossref output.nonnull
985
+ format.pages output
986
+ }
987
+ if$
988
+ format.doi output
989
+ new.block
990
+ format.url output
991
+ new.block
992
+ format.note output
993
+ fin.entry
994
+ }
995
+ FUNCTION {book}
996
+ { output.bibitem
997
+ author empty$
998
+ { format.editors "author and editor" output.check
999
+ add.colon
1000
+ }
1001
+ { format.authors output.nonnull
1002
+ add.colon
1003
+ crossref missing$
1004
+ { "author and editor" editor either.or.check }
1005
+ 'skip$
1006
+ if$
1007
+ }
1008
+ if$
1009
+ new.block
1010
+ format.btitle "title" output.check
1011
+ crossref missing$
1012
+ { format.bvolume output
1013
+ format.edition output
1014
+ new.block
1015
+ format.number.series output
1016
+ new.sentence
1017
+ format.publisher.address output
1018
+ }
1019
+ {
1020
+ new.block
1021
+ format.book.crossref output.nonnull
1022
+ }
1023
+ if$
1024
+ format.date "year" output.check
1025
+ format.doi output
1026
+ new.block
1027
+ format.url output
1028
+ new.block
1029
+ format.note output
1030
+ fin.entry
1031
+ }
1032
+ FUNCTION {booklet}
1033
+ { output.bibitem
1034
+ format.authors output
1035
+ add.colon
1036
+ new.block
1037
+ format.title "title" output.check
1038
+ new.block
1039
+ howpublished "howpublished" bibinfo.check output
1040
+ address "address" bibinfo.check output
1041
+ format.date output
1042
+ format.doi output
1043
+ new.block
1044
+ format.url output
1045
+ new.block
1046
+ format.note output
1047
+ fin.entry
1048
+ }
1049
+
1050
+ FUNCTION {inbook}
1051
+ { output.bibitem
1052
+ author empty$
1053
+ { format.editors "author and editor" output.check
1054
+ add.colon
1055
+ }
1056
+ { format.authors output.nonnull
1057
+ add.colon
1058
+ crossref missing$
1059
+ { "author and editor" editor either.or.check }
1060
+ 'skip$
1061
+ if$
1062
+ }
1063
+ if$
1064
+ new.block
1065
+ format.btitle "title" output.check
1066
+ crossref missing$
1067
+ {
1068
+ format.bvolume output
1069
+ format.edition output
1070
+ format.chapter.pages "chapter and pages" output.check
1071
+ new.block
1072
+ format.number.series output
1073
+ new.sentence
1074
+ format.publisher.address output
1075
+ }
1076
+ {
1077
+ format.chapter.pages "chapter and pages" output.check
1078
+ new.block
1079
+ format.book.crossref output.nonnull
1080
+ }
1081
+ if$
1082
+ format.date "year" output.check
1083
+ format.doi output
1084
+ new.block
1085
+ format.url output
1086
+ new.block
1087
+ format.note output
1088
+ fin.entry
1089
+ }
1090
+
1091
+ FUNCTION {incollection}
1092
+ { output.bibitem
1093
+ format.authors "author" output.check
1094
+ add.colon
1095
+ new.block
1096
+ format.title "title" output.check
1097
+ new.block
1098
+ crossref missing$
1099
+ { format.in.ed.booktitle "booktitle" output.check
1100
+ format.number.series output
1101
+ format.edition output
1102
+ format.chapter.pages output
1103
+ new.sentence
1104
+ format.publisher.address output
1105
+ format.date "year" output.check
1106
+ }
1107
+ { format.incoll.inproc.crossref output.nonnull
1108
+ format.chapter.pages output
1109
+ }
1110
+ if$
1111
+ format.doi output
1112
+ new.block
1113
+ format.url output
1114
+ new.block
1115
+ format.note output
1116
+ fin.entry
1117
+ }
1118
+ FUNCTION {inproceedings}
1119
+ { output.bibitem
1120
+ format.authors "author" output.check
1121
+ add.colon
1122
+ new.block
1123
+ format.title "title" output.check
1124
+ new.block
1125
+ crossref missing$
1126
+ { format.in.ed.booktitle "booktitle" output.check
1127
+ format.number.series output
1128
+ format.pages output
1129
+ new.sentence
1130
+ publisher empty$
1131
+ { format.organization.address output }
1132
+ { organization "organization" bibinfo.check output
1133
+ format.publisher.address output
1134
+ }
1135
+ if$
1136
+ format.date "year" output.check
1137
+ }
1138
+ { format.incoll.inproc.crossref output.nonnull
1139
+ format.pages output
1140
+ }
1141
+ if$
1142
+ format.doi output
1143
+ new.block
1144
+ format.url output
1145
+ new.block
1146
+ format.note output
1147
+ fin.entry
1148
+ }
1149
+ FUNCTION {conference} { inproceedings }
1150
+ FUNCTION {manual}
1151
+ { output.bibitem
1152
+ author empty$
1153
+ { organization "organization" bibinfo.check
1154
+ duplicate$ empty$ 'pop$
1155
+ { output
1156
+ address "address" bibinfo.check output
1157
+ }
1158
+ if$
1159
+ }
1160
+ { format.authors output.nonnull }
1161
+ if$
1162
+ add.colon
1163
+ new.block
1164
+ format.btitle "title" output.check
1165
+ author empty$
1166
+ { organization empty$
1167
+ {
1168
+ address new.block.checka
1169
+ address "address" bibinfo.check output
1170
+ }
1171
+ 'skip$
1172
+ if$
1173
+ }
1174
+ {
1175
+ organization address new.block.checkb
1176
+ organization "organization" bibinfo.check output
1177
+ address "address" bibinfo.check output
1178
+ }
1179
+ if$
1180
+ format.edition output
1181
+ format.date output
1182
+ format.doi output
1183
+ new.block
1184
+ format.url output
1185
+ new.block
1186
+ format.note output
1187
+ fin.entry
1188
+ }
1189
+
1190
+ FUNCTION {mastersthesis}
1191
+ { output.bibitem
1192
+ format.authors "author" output.check
1193
+ add.colon
1194
+ new.block
1195
+ format.title
1196
+ "title" output.check
1197
+ new.block
1198
+ bbl.mthesis format.thesis.type output.nonnull
1199
+ school "school" bibinfo.warn output
1200
+ address "address" bibinfo.check output
1201
+ format.date "year" output.check
1202
+ format.doi output
1203
+ new.block
1204
+ format.url output
1205
+ new.block
1206
+ format.note output
1207
+ fin.entry
1208
+ }
1209
+
1210
+ FUNCTION {misc}
1211
+ { output.bibitem
1212
+ format.authors output
1213
+ add.colon
1214
+ title howpublished new.block.checkb
1215
+ format.title output
1216
+ howpublished new.block.checka
1217
+ howpublished "howpublished" bibinfo.check output
1218
+ format.date output
1219
+ format.doi output
1220
+ new.block
1221
+ format.url output
1222
+ new.block
1223
+ format.note output
1224
+ fin.entry
1225
+ empty.misc.check
1226
+ }
1227
+ FUNCTION {phdthesis}
1228
+ { output.bibitem
1229
+ format.authors "author" output.check
1230
+ add.colon
1231
+ new.block
1232
+ format.title
1233
+ "title" output.check
1234
+ new.block
1235
+ bbl.phdthesis format.thesis.type output.nonnull
1236
+ school "school" bibinfo.warn output
1237
+ address "address" bibinfo.check output
1238
+ format.date "year" output.check
1239
+ format.doi output
1240
+ new.block
1241
+ format.url output
1242
+ new.block
1243
+ format.note output
1244
+ fin.entry
1245
+ }
1246
+
1247
+ FUNCTION {proceedings}
1248
+ { output.bibitem
1249
+ editor empty$
1250
+ { organization "organization" bibinfo.check output
1251
+ }
1252
+ { format.editors output.nonnull }
1253
+ if$
1254
+ add.colon
1255
+ new.block
1256
+ format.btitle "title" output.check
1257
+ format.bvolume output
1258
+ format.number.series output
1259
+ editor empty$
1260
+ { publisher empty$
1261
+ 'skip$
1262
+ {
1263
+ new.sentence
1264
+ format.publisher.address output
1265
+ }
1266
+ if$
1267
+ }
1268
+ { publisher empty$
1269
+ {
1270
+ new.sentence
1271
+ format.organization.address output }
1272
+ {
1273
+ new.sentence
1274
+ organization "organization" bibinfo.check output
1275
+ format.publisher.address output
1276
+ }
1277
+ if$
1278
+ }
1279
+ if$
1280
+ format.date "year" output.check
1281
+ format.doi output
1282
+ new.block
1283
+ format.url output
1284
+ new.block
1285
+ format.note output
1286
+ fin.entry
1287
+ }
1288
+
1289
+ FUNCTION {techreport}
1290
+ { output.bibitem
1291
+ format.authors "author" output.check
1292
+ add.colon
1293
+ new.block
1294
+ format.title
1295
+ "title" output.check
1296
+ new.block
1297
+ format.tr.number output.nonnull
1298
+ institution "institution" bibinfo.warn output
1299
+ address "address" bibinfo.check output
1300
+ format.date "year" output.check
1301
+ format.doi output
1302
+ new.block
1303
+ format.url output
1304
+ new.block
1305
+ format.note output
1306
+ fin.entry
1307
+ }
1308
+
1309
+ FUNCTION {unpublished}
1310
+ { output.bibitem
1311
+ format.authors "author" output.check
1312
+ add.colon
1313
+ new.block
1314
+ format.title "title" output.check
1315
+ format.date output
1316
+ format.doi output
1317
+ new.block
1318
+ format.url output
1319
+ new.block
1320
+ format.note "note" output.check
1321
+ fin.entry
1322
+ }
1323
+
1324
+ FUNCTION {default.type} { misc }
1325
+ READ
1326
+ FUNCTION {sortify}
1327
+ { purify$
1328
+ "l" change.case$
1329
+ }
1330
+ INTEGERS { len }
1331
+ FUNCTION {chop.word}
1332
+ { 's :=
1333
+ 'len :=
1334
+ s #1 len substring$ =
1335
+ { s len #1 + global.max$ substring$ }
1336
+ 's
1337
+ if$
1338
+ }
1339
+ FUNCTION {sort.format.names}
1340
+ { 's :=
1341
+ #1 'nameptr :=
1342
+ ""
1343
+ s num.names$ 'numnames :=
1344
+ numnames 'namesleft :=
1345
+ { namesleft #0 > }
1346
+ { s nameptr
1347
+ "{ll{ }}{ f{ }}{ jj{ }}"
1348
+ format.name$ 't :=
1349
+ nameptr #1 >
1350
+ {
1351
+ " " *
1352
+ namesleft #1 = t "others" = and
1353
+ { "zzzzz" * }
1354
+ { t sortify * }
1355
+ if$
1356
+ }
1357
+ { t sortify * }
1358
+ if$
1359
+ nameptr #1 + 'nameptr :=
1360
+ namesleft #1 - 'namesleft :=
1361
+ }
1362
+ while$
1363
+ }
1364
+
1365
+ FUNCTION {sort.format.title}
1366
+ { 't :=
1367
+ "A " #2
1368
+ "An " #3
1369
+ "The " #4 t chop.word
1370
+ chop.word
1371
+ chop.word
1372
+ sortify
1373
+ #1 global.max$ substring$
1374
+ }
1375
+ FUNCTION {author.sort}
1376
+ { author empty$
1377
+ { key empty$
1378
+ { "to sort, need author or key in " cite$ * warning$
1379
+ ""
1380
+ }
1381
+ { key sortify }
1382
+ if$
1383
+ }
1384
+ { author sort.format.names }
1385
+ if$
1386
+ }
1387
+ FUNCTION {author.editor.sort}
1388
+ { author empty$
1389
+ { editor empty$
1390
+ { key empty$
1391
+ { "to sort, need author, editor, or key in " cite$ * warning$
1392
+ ""
1393
+ }
1394
+ { key sortify }
1395
+ if$
1396
+ }
1397
+ { editor sort.format.names }
1398
+ if$
1399
+ }
1400
+ { author sort.format.names }
1401
+ if$
1402
+ }
1403
+ FUNCTION {author.organization.sort}
1404
+ { author empty$
1405
+ { organization empty$
1406
+ { key empty$
1407
+ { "to sort, need author, organization, or key in " cite$ * warning$
1408
+ ""
1409
+ }
1410
+ { key sortify }
1411
+ if$
1412
+ }
1413
+ { "The " #4 organization chop.word sortify }
1414
+ if$
1415
+ }
1416
+ { author sort.format.names }
1417
+ if$
1418
+ }
1419
+ FUNCTION {editor.organization.sort}
1420
+ { editor empty$
1421
+ { organization empty$
1422
+ { key empty$
1423
+ { "to sort, need editor, organization, or key in " cite$ * warning$
1424
+ ""
1425
+ }
1426
+ { key sortify }
1427
+ if$
1428
+ }
1429
+ { "The " #4 organization chop.word sortify }
1430
+ if$
1431
+ }
1432
+ { editor sort.format.names }
1433
+ if$
1434
+ }
1435
+ FUNCTION {presort}
1436
+ { type$ "book" =
1437
+ type$ "inbook" =
1438
+ or
1439
+ 'author.editor.sort
1440
+ { type$ "proceedings" =
1441
+ 'editor.organization.sort
1442
+ { type$ "manual" =
1443
+ 'author.organization.sort
1444
+ 'author.sort
1445
+ if$
1446
+ }
1447
+ if$
1448
+ }
1449
+ if$
1450
+ " "
1451
+ *
1452
+ year field.or.null sortify
1453
+ *
1454
+ " "
1455
+ *
1456
+ title field.or.null
1457
+ sort.format.title
1458
+ *
1459
+ #1 entry.max$ substring$
1460
+ 'sort.key$ :=
1461
+ }
1462
+ ITERATE {presort}
1463
+ SORT
1464
+ STRINGS { longest.label }
1465
+ INTEGERS { number.label longest.label.width }
1466
+ FUNCTION {initialize.longest.label}
1467
+ { "" 'longest.label :=
1468
+ #1 'number.label :=
1469
+ #0 'longest.label.width :=
1470
+ }
1471
+ FUNCTION {longest.label.pass}
1472
+ { number.label int.to.str$ 'label :=
1473
+ number.label #1 + 'number.label :=
1474
+ label width$ longest.label.width >
1475
+ { label 'longest.label :=
1476
+ label width$ 'longest.label.width :=
1477
+ }
1478
+ 'skip$
1479
+ if$
1480
+ }
1481
+ EXECUTE {initialize.longest.label}
1482
+ ITERATE {longest.label.pass}
1483
+ FUNCTION {begin.bib}
1484
+ { preamble$ empty$
1485
+ 'skip$
1486
+ { preamble$ write$ newline$ }
1487
+ if$
1488
+ "\begin{thebibliography}{" longest.label * "}" *
1489
+ write$ newline$
1490
+ "\providecommand{\url}[1]{{#1}}"
1491
+ write$ newline$
1492
+ "\providecommand{\urlprefix}{URL }"
1493
+ write$ newline$
1494
+ "\expandafter\ifx\csname urlstyle\endcsname\relax"
1495
+ write$ newline$
1496
+ " \providecommand{\doi}[1]{DOI~\discretionary{}{}{}#1}\else"
1497
+ write$ newline$
1498
+ " \providecommand{\doi}{DOI~\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
1499
+ write$ newline$
1500
+ }
1501
+ EXECUTE {begin.bib}
1502
+ EXECUTE {init.state.consts}
1503
+ ITERATE {call.type$}
1504
+ FUNCTION {end.bib}
1505
+ { newline$
1506
+ "\end{thebibliography}" write$ newline$
1507
+ }
1508
+ EXECUTE {end.bib}
1509
+ %% End of customized bst file
1510
+ %%
1511
+ %% End of file `spmpsci.bst'.
1512
+