academia-mcp 1.6.1__py3-none-any.whl → 1.6.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1928 +0,0 @@
1
- %%% Modification of BibTeX style file acl_natbib_nourl.bst
2
- %%% ... by urlbst, version 0.9.1 (marked with "% urlbst")
3
- %%% See <https://purl.org/nxg/dist/urlbst> and repository <https://heptapod.host/nxg/urlbst>
4
- %%% Modifications Copyright 2002–23, Norman Gray,
5
- %%% and distributed under the terms of the LPPL; see README for discussion.
6
- %%%
7
- %%% Added webpage entry type, and url and lastchecked fields.
8
- %%% Added eprint support.
9
- %%% Added DOI support.
10
- %%% Added PUBMED support.
11
- %%% Added hyperref support.
12
- %%% Original headers follow...
13
-
14
- %%
15
- %% This is file `acl_natbib_basic.bst',
16
- %% generated with the docstrip utility.
17
- %%
18
- %% The original source files were:
19
- %%
20
- %% merlin.mbs (with options: `ay,nat,pres,ed-au,keyxyr,blkyear,dt-beg,yr-per,note-yr,num-xser,pre-edn,xedn,nfss')
21
- %% ----------------------------------------
22
- %% *** Intended for ACL conferences ***
23
- %%
24
- %% Copyright 1994-2011 Patrick W Daly
25
- % ===============================================================
26
- % IMPORTANT NOTICE:
27
- % This bibliographic style (bst) file has been generated from one or
28
- % more master bibliographic style (mbs) files, listed above.
29
- %
30
- % This generated file can be redistributed and/or modified under the terms
31
- % of the LaTeX Project Public License Distributed from CTAN
32
- % archives in directory macros/latex/base/lppl.txt; either
33
- % version 1 of the License, or any later version.
34
- % ===============================================================
35
- % Name and version information of the main mbs file:
36
- % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)]
37
- % For use with BibTeX version 0.99a or later
38
- %-------------------------------------------------------------------
39
- % This bibliography style file is intended for texts in ENGLISH
40
- % This is an author-year citation style bibliography. As such, it is
41
- % non-standard LaTeX, and requires a special package file to function properly.
42
- % Such a package is natbib.sty by Patrick W. Daly
43
- % The form of the \bibitem entries is
44
- % \bibitem[Jones et al.(1990)]{key}...
45
- % \bibitem[Jones et al.(1990)Jones, Baker, and Smith]{key}...
46
- % The essential feature is that the label (the part in brackets) consists
47
- % of the author names, as they should appear in the citation, with the year
48
- % in parentheses following. There must be no space before the opening
49
- % parenthesis!
50
- % With natbib v5.3, a full list of authors may also follow the year.
51
- % In natbib.sty, it is possible to define the type of enclosures that is
52
- % really wanted (brackets or parentheses), but in either case, there must
53
- % be parentheses in the label.
54
- % The \cite command functions as follows:
55
- % \citet{key} ==>> Jones et al. (1990)
56
- % \citet*{key} ==>> Jones, Baker, and Smith (1990)
57
- % \citep{key} ==>> (Jones et al., 1990)
58
- % \citep*{key} ==>> (Jones, Baker, and Smith, 1990)
59
- % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2)
60
- % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990)
61
- % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32)
62
- % \citeauthor{key} ==>> Jones et al.
63
- % \citeauthor*{key} ==>> Jones, Baker, and Smith
64
- % \citeyear{key} ==>> 1990
65
- %---------------------------------------------------------------------
66
-
67
- ENTRY
68
- { address
69
- archivePrefix
70
- author
71
- booktitle
72
- chapter
73
- edition
74
- editor
75
- eid
76
- eprint
77
- eprinttype % = archivePrefix
78
- howpublished
79
- institution
80
- journal
81
- key
82
- month
83
- note
84
- number
85
- organization
86
- pages
87
- publisher
88
- school
89
- series
90
- title
91
- type
92
- volume
93
- year
94
- doi % urlbst
95
- pubmed % urlbst
96
- url % urlbst
97
- lastchecked % urlbst
98
- }
99
- {}
100
- { label extra.label sort.label short.list }
101
- INTEGERS { output.state before.all mid.sentence after.sentence after.block }
102
- % urlbst...
103
- % urlbst constants and state variables
104
- STRINGS { urlintro
105
- eprinturl eprintprefix doiprefix doiurl pubmedprefix pubmedurl
106
- citedstring onlinestring linktextstring
107
- openinlinelink closeinlinelink }
108
- INTEGERS { hrefform doiform inlinelinks makeinlinelink
109
- addeprints adddoi addpubmed }
110
- FUNCTION {init.urlbst.variables}
111
- {
112
- % The following constants may be adjusted by hand, if desired
113
-
114
- % The first set allow you to enable or disable certain functionality.
115
- #1 'addeprints := % 0=no eprints; 1=include eprints
116
- #2 'hrefform := % 0=no crossrefs; 1=hypertex hrefs; 2=hyperref hrefs
117
- #1 'inlinelinks := % 0=URLs explicit; 1=URLs attached to titles
118
- #1 'adddoi := % 0=no DOI resolver; 1=include it
119
- #1 'addpubmed := % 0=no PUBMED resolver; 1=include it
120
- #0 'doiform := % 0=with href; 1=with \doi{}
121
-
122
- % String constants, which you _might_ want to tweak.
123
- "online" 'onlinestring := % label that a resource is online
124
- "[link]" 'linktextstring := % anonymous link text
125
- "http://www.ncbi.nlm.nih.gov/pubmed/" 'pubmedurl := % prefix to make URL from PUBMED
126
- "https://doi.org/" 'doiurl := % prefix to make URL from DOI
127
- "doi:" 'doiprefix := % printed text to introduce DOI
128
- "https://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref
129
- "cited " 'citedstring := % label in "lastchecked" remark
130
- "arXiv:" 'eprintprefix := % text prefix printed before eprint ref
131
- "PMID:" 'pubmedprefix := % text prefix printed before PUBMED ref
132
- "URL: " 'urlintro := % text prefix before URL
133
-
134
- % The following are internal state variables, not configuration constants,
135
- % so they shouldn't be fiddled with.
136
- #0 'makeinlinelink := % state variable managed by possibly.setup.inlinelink
137
- "" 'openinlinelink := % ditto
138
- "" 'closeinlinelink := % ditto
139
- }
140
- INTEGERS {
141
- bracket.state
142
- outside.brackets
143
- open.brackets
144
- within.brackets
145
- close.brackets
146
- }
147
- % ...urlbst to here
148
- FUNCTION {init.state.consts}
149
- { #0 'outside.brackets := % urlbst...
150
- #1 'open.brackets :=
151
- #2 'within.brackets :=
152
- #3 'close.brackets := % ...urlbst to here
153
-
154
- #0 'before.all :=
155
- #1 'mid.sentence :=
156
- #2 'after.sentence :=
157
- #3 'after.block :=
158
- }
159
- STRINGS { s t}
160
- % urlbst
161
- FUNCTION {output.nonnull.original}
162
- { 's :=
163
- output.state mid.sentence =
164
- { ", " * write$ }
165
- { output.state after.block =
166
- { add.period$ write$
167
- newline$
168
- "\newblock " write$
169
- }
170
- { output.state before.all =
171
- 'write$
172
- { add.period$ " " * write$ }
173
- if$
174
- }
175
- if$
176
- mid.sentence 'output.state :=
177
- }
178
- if$
179
- s
180
- }
181
-
182
- % urlbst...
183
- % Minimal DOI parsing.
184
- % Given a DOI on the stack, check whether it starts with 'doiurl' or not.
185
- % In either case, leave on the stack first a DOI with, and then a DOI without, the URL prefix.
186
- FUNCTION {parse.doi}
187
- {
188
- #1 doiurl text.length$ substring$
189
- doiurl =
190
- { doi
191
- doi doiurl text.length$ #1 + #999 substring$ }
192
- { doiurl doi *
193
- doi }
194
- if$
195
- }
196
- % The following three functions are for handling inlinelink. They wrap
197
- % a block of text which is potentially output with write$ by multiple
198
- % other functions, so we don't know the content a priori.
199
- % They communicate between each other using the variables makeinlinelink
200
- % (which is true if a link should be made), and closeinlinelink (which holds
201
- % the string which should close any current link. They can be called
202
- % at any time, but start.inlinelink will be a no-op unless something has
203
- % previously set makeinlinelink true, and the two ...end.inlinelink functions
204
- % will only do their stuff if start.inlinelink has previously set
205
- % closeinlinelink to be non-empty.
206
- % (thanks to 'ijvm' for suggested code here)
207
- FUNCTION {uand}
208
- { 'skip$ { pop$ #0 } if$ } % 'and' (which isn't defined at this point in the file)
209
- FUNCTION {possibly.setup.inlinelink}
210
- { makeinlinelink hrefform #0 > uand
211
- { doi empty$ adddoi uand
212
- { pubmed empty$ addpubmed uand
213
- { eprint empty$ addeprints uand
214
- { url empty$
215
- { "" }
216
- { url }
217
- if$ }
218
- { eprinturl eprint * }
219
- if$ }
220
- { pubmedurl pubmed * }
221
- if$ }
222
- % { doiurl doi * }
223
- { doi empty$
224
- { "XXX" }
225
- { doi parse.doi pop$ }
226
- if$
227
- }
228
- if$
229
- % an appropriately-formatted URL is now on the stack
230
- hrefform #1 = % hypertex
231
- { "\special {html:<a href=" quote$ * swap$ * quote$ * "> }{" * 'openinlinelink :=
232
- "\special {html:</a>}" 'closeinlinelink := }
233
- { "\href {" swap$ * "} {" * 'openinlinelink := % hrefform=#2 -- hyperref
234
- % the space between "} {" matters: a URL of just the right length can cause "\% newline em"
235
- "}" 'closeinlinelink := }
236
- if$
237
- #0 'makeinlinelink :=
238
- }
239
- 'skip$
240
- if$ % makeinlinelink
241
- }
242
- FUNCTION {add.inlinelink}
243
- { openinlinelink empty$
244
- 'skip$
245
- { openinlinelink swap$ * closeinlinelink *
246
- "" 'openinlinelink :=
247
- }
248
- if$
249
- }
250
- FUNCTION {output.nonnull}
251
- { % Save the thing we've been asked to output
252
- 's :=
253
- % If the bracket-state is close.brackets, then add a close-bracket to
254
- % what is currently at the top of the stack, and set bracket.state
255
- % to outside.brackets
256
- bracket.state close.brackets =
257
- { "]" *
258
- outside.brackets 'bracket.state :=
259
- }
260
- 'skip$
261
- if$
262
- bracket.state outside.brackets =
263
- { % We're outside all brackets -- this is the normal situation.
264
- % Write out what's currently at the top of the stack, using the
265
- % original output.nonnull function.
266
- s
267
- add.inlinelink
268
- output.nonnull.original % invoke the original output.nonnull
269
- }
270
- { % Still in brackets. Add open-bracket or (continuation) comma, add the
271
- % new text (in s) to the top of the stack, and move to the close-brackets
272
- % state, ready for next time (unless inbrackets resets it). If we come
273
- % into this branch, then output.state is carefully undisturbed.
274
- bracket.state open.brackets =
275
- { " [" * }
276
- { ", " * } % bracket.state will be within.brackets
277
- if$
278
- s *
279
- close.brackets 'bracket.state :=
280
- }
281
- if$
282
- }
283
-
284
- % Call this function just before adding something which should be presented in
285
- % brackets. bracket.state is handled specially within output.nonnull.
286
- FUNCTION {inbrackets}
287
- { bracket.state close.brackets =
288
- { within.brackets 'bracket.state := } % reset the state: not open nor closed
289
- { open.brackets 'bracket.state := }
290
- if$
291
- }
292
-
293
- FUNCTION {format.lastchecked}
294
- { lastchecked empty$
295
- { "" }
296
- { inbrackets citedstring lastchecked * }
297
- if$
298
- }
299
- % ...urlbst to here
300
- FUNCTION {output}
301
- { duplicate$ empty$
302
- 'pop$
303
- 'output.nonnull
304
- if$
305
- }
306
- FUNCTION {output.check}
307
- { 't :=
308
- duplicate$ empty$
309
- { pop$ "empty " t * " in " * cite$ * warning$ }
310
- 'output.nonnull
311
- if$
312
- }
313
- FUNCTION {fin.entry.original} % urlbst (renamed from fin.entry, so it can be wrapped below)
314
- { add.period$
315
- write$
316
- newline$
317
- }
318
-
319
- FUNCTION {new.block}
320
- { output.state before.all =
321
- 'skip$
322
- { after.block 'output.state := }
323
- if$
324
- }
325
- FUNCTION {new.sentence}
326
- { output.state after.block =
327
- 'skip$
328
- { output.state before.all =
329
- 'skip$
330
- { after.sentence 'output.state := }
331
- if$
332
- }
333
- if$
334
- }
335
- FUNCTION {add.blank}
336
- { " " * before.all 'output.state :=
337
- }
338
-
339
- FUNCTION {date.block}
340
- {
341
- new.block
342
- }
343
-
344
- FUNCTION {not}
345
- { { #0 }
346
- { #1 }
347
- if$
348
- }
349
- FUNCTION {and}
350
- { 'skip$
351
- { pop$ #0 }
352
- if$
353
- }
354
- FUNCTION {or}
355
- { { pop$ #1 }
356
- 'skip$
357
- if$
358
- }
359
- FUNCTION {new.block.checkb}
360
- { empty$
361
- swap$ empty$
362
- and
363
- 'skip$
364
- 'new.block
365
- if$
366
- }
367
- FUNCTION {field.or.null}
368
- { duplicate$ empty$
369
- { pop$ "" }
370
- 'skip$
371
- if$
372
- }
373
- FUNCTION {emphasize}
374
- { duplicate$ empty$
375
- { pop$ "" }
376
- { "\emph{" swap$ * "}" * }
377
- if$
378
- }
379
- FUNCTION {tie.or.space.prefix} % puts ~ before the preceding part if it is of length <3
380
- { duplicate$ text.length$ #3 <
381
- { "~" }
382
- { " " }
383
- if$
384
- swap$
385
- }
386
-
387
- FUNCTION {capitalize}
388
- { "u" change.case$ "t" change.case$ }
389
-
390
- FUNCTION {space.word}
391
- { " " swap$ * " " * }
392
- % Here are the language-specific definitions for explicit words.
393
- % Each function has a name bbl.xxx where xxx is the English word.
394
- % The language selected here is ENGLISH
395
- FUNCTION {bbl.and}
396
- { "and"}
397
-
398
- FUNCTION {bbl.etal}
399
- { "et~al." }
400
-
401
- FUNCTION {bbl.editors}
402
- { "editors" }
403
-
404
- FUNCTION {bbl.editor}
405
- { "editor" }
406
-
407
- FUNCTION {bbl.edby}
408
- { "edited by" }
409
-
410
- FUNCTION {bbl.edition}
411
- { "edition" }
412
-
413
- FUNCTION {bbl.volume}
414
- { "volume" }
415
-
416
- FUNCTION {bbl.of}
417
- { "of" }
418
-
419
- FUNCTION {bbl.number}
420
- { "number" }
421
-
422
- FUNCTION {bbl.nr}
423
- { "no." }
424
-
425
- FUNCTION {bbl.in}
426
- { "in" }
427
-
428
- FUNCTION {bbl.pages}
429
- { "pages" }
430
-
431
- FUNCTION {bbl.page}
432
- { "page" }
433
-
434
- FUNCTION {bbl.chapter}
435
- { "chapter" }
436
-
437
- FUNCTION {bbl.techrep}
438
- { "Technical Report" }
439
-
440
- FUNCTION {bbl.mthesis}
441
- { "Master's thesis" }
442
-
443
- FUNCTION {bbl.phdthesis}
444
- { "Ph.D. thesis" }
445
-
446
- MACRO {jan} {"January"}
447
-
448
- MACRO {feb} {"February"}
449
-
450
- MACRO {mar} {"March"}
451
-
452
- MACRO {apr} {"April"}
453
-
454
- MACRO {may} {"May"}
455
-
456
- MACRO {jun} {"June"}
457
-
458
- MACRO {jul} {"July"}
459
-
460
- MACRO {aug} {"August"}
461
-
462
- MACRO {sep} {"September"}
463
-
464
- MACRO {oct} {"October"}
465
-
466
- MACRO {nov} {"November"}
467
-
468
- MACRO {dec} {"December"}
469
-
470
- MACRO {acmcs} {"ACM Computing Surveys"}
471
-
472
- MACRO {acta} {"Acta Informatica"}
473
-
474
- MACRO {cacm} {"Communications of the ACM"}
475
-
476
- MACRO {ibmjrd} {"IBM Journal of Research and Development"}
477
-
478
- MACRO {ibmsj} {"IBM Systems Journal"}
479
-
480
- MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
481
-
482
- MACRO {ieeetc} {"IEEE Transactions on Computers"}
483
-
484
- MACRO {ieeetcad}
485
- {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
486
-
487
- MACRO {ipl} {"Information Processing Letters"}
488
-
489
- MACRO {jacm} {"Journal of the ACM"}
490
-
491
- MACRO {jcss} {"Journal of Computer and System Sciences"}
492
-
493
- MACRO {scp} {"Science of Computer Programming"}
494
-
495
- MACRO {sicomp} {"SIAM Journal on Computing"}
496
-
497
- MACRO {tocs} {"ACM Transactions on Computer Systems"}
498
-
499
- MACRO {tods} {"ACM Transactions on Database Systems"}
500
-
501
- MACRO {tog} {"ACM Transactions on Graphics"}
502
-
503
- MACRO {toms} {"ACM Transactions on Mathematical Software"}
504
-
505
- MACRO {toois} {"ACM Transactions on Office Information Systems"}
506
-
507
- MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
508
-
509
- MACRO {tcs} {"Theoretical Computer Science"}
510
-
511
- % bibinfo.check avoids acting on missing fields while bibinfo.warn will
512
- % issue a warning message if a missing field is detected. Prior to calling
513
- % the bibinfo functions, the user should push the field value and then its
514
- % name string, in that order.
515
- FUNCTION {bibinfo.check}
516
- { swap$
517
- duplicate$ missing$
518
- {
519
- pop$ pop$
520
- ""
521
- }
522
- { duplicate$ empty$
523
- {
524
- swap$ pop$
525
- }
526
- { swap$
527
- pop$
528
- }
529
- if$
530
- }
531
- if$
532
- }
533
- FUNCTION {bibinfo.warn}
534
- { swap$
535
- duplicate$ missing$
536
- {
537
- swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
538
- ""
539
- }
540
- { duplicate$ empty$
541
- {
542
- swap$ "empty " swap$ * " in " * cite$ * warning$
543
- }
544
- { swap$
545
- pop$
546
- }
547
- if$
548
- }
549
- if$
550
- }
551
- INTEGERS { nameptr namesleft numnames }
552
-
553
-
554
- STRINGS { bibinfo}
555
-
556
- FUNCTION {format.names}
557
- { 'bibinfo :=
558
- duplicate$ empty$ 'skip$ {
559
- 's :=
560
- "" 't :=
561
- #1 'nameptr :=
562
- s num.names$ 'numnames :=
563
- numnames 'namesleft :=
564
- { namesleft #0 > }
565
- { s nameptr
566
- "{ff~}{vv~}{ll}{, jj}" % first name first for all authors
567
- format.name$
568
- bibinfo bibinfo.check
569
- 't :=
570
- nameptr #1 >
571
- {
572
- namesleft #1 >
573
- { ", " * t * }
574
- {
575
- s nameptr "{ll}" format.name$ duplicate$ "others" =
576
- { 't := }
577
- { pop$ }
578
- if$
579
- numnames #2 >
580
- { "," * }
581
- 'skip$
582
- if$
583
- t "others" =
584
- {
585
- " " * bbl.etal *
586
- }
587
- {
588
- bbl.and
589
- space.word * t *
590
- }
591
- if$
592
- }
593
- if$
594
- }
595
- 't
596
- if$
597
- nameptr #1 + 'nameptr :=
598
- namesleft #1 - 'namesleft :=
599
- }
600
- while$
601
- } if$
602
- }
603
- FUNCTION {format.names.ed}
604
- {
605
- format.names
606
- }
607
- FUNCTION {format.key}
608
- { empty$
609
- { key field.or.null }
610
- { "" }
611
- if$
612
- }
613
-
614
- FUNCTION {format.authors}
615
- { author "author" format.names
616
- }
617
- FUNCTION {get.bbl.editor}
618
- { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
619
-
620
- FUNCTION {format.editors}
621
- { editor "editor" format.names duplicate$ empty$ 'skip$
622
- {
623
- "," *
624
- " " *
625
- get.bbl.editor
626
- *
627
- }
628
- if$
629
- }
630
- FUNCTION {format.note}
631
- {
632
- note empty$
633
- { "" }
634
- { note #1 #1 substring$
635
- duplicate$ "{" =
636
- 'skip$
637
- { output.state mid.sentence =
638
- { "l" }
639
- { "u" }
640
- if$
641
- change.case$
642
- }
643
- if$
644
- note #2 global.max$ substring$ * "note" bibinfo.check
645
- }
646
- if$
647
- }
648
-
649
- FUNCTION {format.title}
650
- { title
651
- duplicate$ empty$ 'skip$
652
- { "t" change.case$ }
653
- if$
654
- "title" bibinfo.check
655
- }
656
- FUNCTION {format.full.names}
657
- {'s :=
658
- "" 't :=
659
- #1 'nameptr :=
660
- s num.names$ 'numnames :=
661
- numnames 'namesleft :=
662
- { namesleft #0 > }
663
- { s nameptr
664
- "{vv~}{ll}" format.name$
665
- 't :=
666
- nameptr #1 >
667
- {
668
- namesleft #1 >
669
- { ", " * t * }
670
- {
671
- s nameptr "{ll}" format.name$ duplicate$ "others" =
672
- { 't := }
673
- { pop$ }
674
- if$
675
- t "others" =
676
- {
677
- " " * bbl.etal *
678
- }
679
- {
680
- numnames #2 >
681
- { "," * }
682
- 'skip$
683
- if$
684
- bbl.and
685
- space.word * t *
686
- }
687
- if$
688
- }
689
- if$
690
- }
691
- 't
692
- if$
693
- nameptr #1 + 'nameptr :=
694
- namesleft #1 - 'namesleft :=
695
- }
696
- while$
697
- }
698
-
699
- FUNCTION {author.editor.key.full}
700
- { author empty$
701
- { editor empty$
702
- { key empty$
703
- { cite$ #1 #3 substring$ }
704
- 'key
705
- if$
706
- }
707
- { editor format.full.names }
708
- if$
709
- }
710
- { author format.full.names }
711
- if$
712
- }
713
-
714
- FUNCTION {author.key.full}
715
- { author empty$
716
- { key empty$
717
- { cite$ #1 #3 substring$ }
718
- 'key
719
- if$
720
- }
721
- { author format.full.names }
722
- if$
723
- }
724
-
725
- FUNCTION {editor.key.full}
726
- { editor empty$
727
- { key empty$
728
- { cite$ #1 #3 substring$ }
729
- 'key
730
- if$
731
- }
732
- { editor format.full.names }
733
- if$
734
- }
735
-
736
- FUNCTION {make.full.names}
737
- { type$ "book" =
738
- type$ "inbook" =
739
- or
740
- 'author.editor.key.full
741
- { type$ "proceedings" =
742
- 'editor.key.full
743
- 'author.key.full
744
- if$
745
- }
746
- if$
747
- }
748
-
749
- FUNCTION {output.bibitem.original} % urlbst (renamed from output.bibitem, so it can be wrapped below)
750
- { newline$
751
- "\bibitem[{" write$
752
- label write$
753
- ")" make.full.names duplicate$ short.list =
754
- { pop$ }
755
- { * }
756
- if$
757
- "}]{" * write$
758
- cite$ write$
759
- "}" write$
760
- newline$
761
- ""
762
- before.all 'output.state :=
763
- }
764
-
765
- FUNCTION {n.dashify}
766
- {
767
- 't :=
768
- ""
769
- { t empty$ not }
770
- { t #1 #1 substring$ "-" =
771
- { t #1 #2 substring$ "--" = not
772
- { "--" *
773
- t #2 global.max$ substring$ 't :=
774
- }
775
- { { t #1 #1 substring$ "-" = }
776
- { "-" *
777
- t #2 global.max$ substring$ 't :=
778
- }
779
- while$
780
- }
781
- if$
782
- }
783
- { t #1 #1 substring$ *
784
- t #2 global.max$ substring$ 't :=
785
- }
786
- if$
787
- }
788
- while$
789
- }
790
-
791
- FUNCTION {word.in}
792
- { bbl.in capitalize
793
- " " * }
794
-
795
- FUNCTION {format.date}
796
- { year "year" bibinfo.check duplicate$ empty$
797
- {
798
- }
799
- 'skip$
800
- if$
801
- extra.label *
802
- before.all 'output.state :=
803
- after.sentence 'output.state :=
804
- }
805
- FUNCTION {format.btitle}
806
- { title "title" bibinfo.check
807
- duplicate$ empty$ 'skip$
808
- {
809
- emphasize
810
- }
811
- if$
812
- }
813
- FUNCTION {either.or.check}
814
- { empty$
815
- 'pop$
816
- { "can't use both " swap$ * " fields in " * cite$ * warning$ }
817
- if$
818
- }
819
- FUNCTION {format.bvolume}
820
- { volume empty$
821
- { "" }
822
- { bbl.volume volume tie.or.space.prefix
823
- "volume" bibinfo.check * *
824
- series "series" bibinfo.check
825
- duplicate$ empty$ 'pop$
826
- { swap$ bbl.of space.word * swap$
827
- emphasize * }
828
- if$
829
- "volume and number" number either.or.check
830
- }
831
- if$
832
- }
833
- FUNCTION {format.number.series}
834
- { volume empty$
835
- { number empty$
836
- { series field.or.null }
837
- { series empty$
838
- { number "number" bibinfo.check }
839
- { output.state mid.sentence =
840
- { bbl.number }
841
- { bbl.number capitalize }
842
- if$
843
- number tie.or.space.prefix "number" bibinfo.check * *
844
- bbl.in space.word *
845
- series "series" bibinfo.check *
846
- }
847
- if$
848
- }
849
- if$
850
- }
851
- { "" }
852
- if$
853
- }
854
-
855
- FUNCTION {format.edition}
856
- { edition duplicate$ empty$ 'skip$
857
- {
858
- output.state mid.sentence =
859
- { "l" }
860
- { "t" }
861
- if$ change.case$
862
- "edition" bibinfo.check
863
- " " * bbl.edition *
864
- }
865
- if$
866
- }
867
- INTEGERS { multiresult }
868
- FUNCTION {multi.page.check}
869
- { 't :=
870
- #0 'multiresult :=
871
- { multiresult not
872
- t empty$ not
873
- and
874
- }
875
- { t #1 #1 substring$
876
- duplicate$ "-" =
877
- swap$ duplicate$ "," =
878
- swap$ "+" =
879
- or or
880
- { #1 'multiresult := }
881
- { t #2 global.max$ substring$ 't := }
882
- if$
883
- }
884
- while$
885
- multiresult
886
- }
887
- FUNCTION {format.pages}
888
- { pages duplicate$ empty$ 'skip$
889
- { duplicate$ multi.page.check
890
- {
891
- bbl.pages swap$
892
- n.dashify
893
- }
894
- {
895
- bbl.page swap$
896
- }
897
- if$
898
- tie.or.space.prefix
899
- "pages" bibinfo.check
900
- * *
901
- }
902
- if$
903
- }
904
- FUNCTION {format.journal.pages}
905
- { pages duplicate$ empty$ 'pop$
906
- { swap$ duplicate$ empty$
907
- { pop$ pop$ format.pages }
908
- {
909
- ":" *
910
- swap$
911
- n.dashify
912
- "pages" bibinfo.check
913
- *
914
- }
915
- if$
916
- }
917
- if$
918
- }
919
- FUNCTION {format.journal.eid}
920
- { eid "eid" bibinfo.check
921
- duplicate$ empty$ 'pop$
922
- { swap$ duplicate$ empty$ 'skip$
923
- {
924
- ":" *
925
- }
926
- if$
927
- swap$ *
928
- }
929
- if$
930
- }
931
- FUNCTION {format.vol.num.pages}
932
- { volume field.or.null
933
- duplicate$ empty$ 'skip$
934
- {
935
- "volume" bibinfo.check
936
- }
937
- if$
938
- number "number" bibinfo.check duplicate$ empty$ 'skip$
939
- {
940
- swap$ duplicate$ empty$
941
- { "there's a number but no volume in " cite$ * warning$ }
942
- 'skip$
943
- if$
944
- swap$
945
- "(" swap$ * ")" *
946
- }
947
- if$ *
948
- eid empty$
949
- { format.journal.pages }
950
- { format.journal.eid }
951
- if$
952
- }
953
-
954
- FUNCTION {format.chapter}
955
- { chapter empty$
956
- 'format.pages
957
- { type empty$
958
- { bbl.chapter }
959
- { type "l" change.case$
960
- "type" bibinfo.check
961
- }
962
- if$
963
- chapter tie.or.space.prefix
964
- "chapter" bibinfo.check
965
- * *
966
- }
967
- if$
968
- }
969
-
970
- FUNCTION {format.chapter.pages}
971
- { chapter empty$
972
- 'format.pages
973
- { type empty$
974
- { bbl.chapter }
975
- { type "l" change.case$
976
- "type" bibinfo.check
977
- }
978
- if$
979
- chapter tie.or.space.prefix
980
- "chapter" bibinfo.check
981
- * *
982
- pages empty$
983
- 'skip$
984
- { ", " * format.pages * }
985
- if$
986
- }
987
- if$
988
- }
989
-
990
- FUNCTION {format.booktitle}
991
- {
992
- booktitle "booktitle" bibinfo.check
993
- emphasize
994
- }
995
- FUNCTION {format.in.booktitle}
996
- { format.booktitle duplicate$ empty$ 'skip$
997
- {
998
- word.in swap$ *
999
- }
1000
- if$
1001
- }
1002
- FUNCTION {format.in.ed.booktitle}
1003
- { format.booktitle duplicate$ empty$ 'skip$
1004
- {
1005
- editor "editor" format.names.ed duplicate$ empty$ 'pop$
1006
- {
1007
- "," *
1008
- " " *
1009
- get.bbl.editor
1010
- ", " *
1011
- * swap$
1012
- * }
1013
- if$
1014
- word.in swap$ *
1015
- }
1016
- if$
1017
- }
1018
- FUNCTION {format.thesis.type}
1019
- { type duplicate$ empty$
1020
- 'pop$
1021
- { swap$ pop$
1022
- "t" change.case$ "type" bibinfo.check
1023
- }
1024
- if$
1025
- }
1026
- FUNCTION {format.tr.number}
1027
- { number "number" bibinfo.check
1028
- type duplicate$ empty$
1029
- { pop$ bbl.techrep }
1030
- 'skip$
1031
- if$
1032
- "type" bibinfo.check
1033
- swap$ duplicate$ empty$
1034
- { pop$ "t" change.case$ }
1035
- { tie.or.space.prefix * * }
1036
- if$
1037
- }
1038
- FUNCTION {format.article.crossref}
1039
- {
1040
- word.in
1041
- " \cite{" * crossref * "}" *
1042
- }
1043
- FUNCTION {format.book.crossref}
1044
- { volume duplicate$ empty$
1045
- { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1046
- pop$ word.in
1047
- }
1048
- { bbl.volume
1049
- capitalize
1050
- swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
1051
- }
1052
- if$
1053
- " \cite{" * crossref * "}" *
1054
- }
1055
- FUNCTION {format.incoll.inproc.crossref}
1056
- {
1057
- word.in
1058
- " \cite{" * crossref * "}" *
1059
- }
1060
- FUNCTION {format.org.or.pub}
1061
- { 't :=
1062
- ""
1063
- address empty$ t empty$ and
1064
- 'skip$
1065
- {
1066
- t empty$
1067
- { address "address" bibinfo.check *
1068
- }
1069
- { t *
1070
- address empty$
1071
- 'skip$
1072
- { ", " * address "address" bibinfo.check * }
1073
- if$
1074
- }
1075
- if$
1076
- }
1077
- if$
1078
- }
1079
- FUNCTION {format.publisher.address}
1080
- { publisher "publisher" bibinfo.warn format.org.or.pub
1081
- }
1082
-
1083
- FUNCTION {format.organization.address}
1084
- { organization "organization" bibinfo.check format.org.or.pub
1085
- }
1086
-
1087
- FUNCTION {archiveprefix.or.eprinttype} % holder for eprinttype with archiveprefix precedence
1088
- {
1089
- archiveprefix empty$
1090
- {
1091
- eprinttype empty$
1092
- { "" } % not using 'skip$ to reduce errors like "nothing to pop from stack"
1093
- { eprinttype }
1094
- if$
1095
- }
1096
- { archiveprefix }
1097
- if$
1098
- }
1099
-
1100
- FUNCTION {output.eprint} % this is only used with the @misc record type (common for arXiv and other preprint server bibtex records)
1101
- {
1102
- eprint empty$
1103
- {% if eprint field is empty
1104
- publisher field.or.null "arXiv" = % field.or.null here helps when no publisher field in the record
1105
- { publisher " preprint" * } % add " preprint" to publisher with the idea that publisher is the name of the preprint server
1106
- { "" } % if publisher != "arXiv" then empty output
1107
- if$
1108
- emphasize % no output function after emphasize because nothing goes after this
1109
- }
1110
- {% if eprint field is not empty
1111
- archiveprefix.or.eprinttype empty$
1112
- { "" } % not using 'skip$ to reduce errors like "nothing to pop from stack"
1113
- {% if archiveprefix or eprinttype fields are not empty
1114
- journal empty$
1115
- { "Preprint" } % if journal field is empty: output just "Preprint" emphasized like a journal name
1116
- { journal } % if journal field is not empty, output it (takes precedence)
1117
- if$
1118
- emphasize output % emphasize what we formed before, setting output as a border to the subblock that follows with the comma delimiter
1119
- archiveprefix.or.eprinttype ":" * eprint * % subblock with eprinttype and eprint number
1120
- }
1121
- if$
1122
- }
1123
- if$
1124
- }
1125
-
1126
- % urlbst...
1127
- % Functions for making hypertext links.
1128
- % In all cases, the stack has (link-text href-url)
1129
- %
1130
- % make 'null' specials
1131
- FUNCTION {make.href.null}
1132
- {
1133
- pop$
1134
- }
1135
- % make hypertex specials
1136
- FUNCTION {make.href.hypertex}
1137
- {
1138
- "\special {html:<a href=" quote$ *
1139
- swap$ * quote$ * "> }" * swap$ *
1140
- "\special {html:</a>}" *
1141
- }
1142
- % make hyperref specials
1143
- FUNCTION {make.href.hyperref}
1144
- {
1145
- "\href {" swap$ * "} {\path{" * swap$ * "}}" *
1146
- }
1147
- FUNCTION {make.href}
1148
- { hrefform #2 =
1149
- 'make.href.hyperref % hrefform = 2
1150
- { hrefform #1 =
1151
- 'make.href.hypertex % hrefform = 1
1152
- 'make.href.null % hrefform = 0 (or anything else)
1153
- if$
1154
- }
1155
- if$
1156
- }
1157
-
1158
- % If inlinelinks is true, then format.url should be a no-op, since it's
1159
- % (a) redundant, and (b) could end up as a link-within-a-link.
1160
- FUNCTION {format.url}
1161
- { inlinelinks #1 = url empty$ or
1162
- { "" }
1163
- { hrefform #1 =
1164
- { % special case -- add HyperTeX specials
1165
- urlintro "\url{" url * "}" * url make.href.hypertex * }
1166
- { urlintro "\url{" * url * "}" * }
1167
- if$
1168
- }
1169
- if$
1170
- }
1171
- FUNCTION {format.eprint}
1172
- { eprint empty$
1173
- { "" }
1174
- { eprintprefix eprint * eprinturl eprint * make.href }
1175
- if$
1176
- }
1177
-
1178
- FUNCTION {format.doi}
1179
- { doi empty$
1180
- { "" }
1181
- { doi parse.doi % leaves "https://doi.org/DOI" DOI on the stack
1182
- 's := 't :=
1183
- doiform #1 =
1184
- { "\doi{" s * "}" * }
1185
- { doiprefix s * t make.href }
1186
- if$
1187
- }
1188
- if$
1189
- }
1190
-
1191
- FUNCTION {format.pubmed}
1192
- { pubmed empty$
1193
- { "" }
1194
- { pubmedprefix pubmed * pubmedurl pubmed * make.href }
1195
- if$
1196
- }
1197
-
1198
- % Output a URL. We can't use the more normal idiom (something like
1199
- % `format.url output'), because the `inbrackets' within
1200
- % format.lastchecked applies to everything between calls to `output',
1201
- % so that `format.url format.lastchecked * output' ends up with both
1202
- % the URL and the lastchecked in brackets.
1203
- FUNCTION {output.url}
1204
- { url empty$
1205
- 'skip$
1206
- { new.block
1207
- format.url output
1208
- format.lastchecked output
1209
- }
1210
- if$
1211
- }
1212
-
1213
- FUNCTION {output.web.refs}
1214
- {
1215
- new.block
1216
- inlinelinks
1217
- 'skip$ % links were inline -- don't repeat them
1218
- { % If the generated DOI will be the same as the URL,
1219
- % then don't print the URL (thanks to Joseph Wright
1220
- % for (the original version of) this code,
1221
- % at http://tex.stackexchange.com/questions/5660)
1222
- adddoi
1223
- doi empty$ { "X" } { doi parse.doi pop$ } if$ % DOI URL to be generated
1224
- url empty$ { "Y" } { url } if$ % the URL, or "Y" if empty
1225
- = % are the strings equal?
1226
- and
1227
- 'skip$
1228
- { output.url }
1229
- if$
1230
- addeprints eprint empty$ not and
1231
- { format.eprint output.nonnull }
1232
- 'skip$
1233
- if$
1234
- adddoi doi empty$ not and
1235
- { format.doi output.nonnull }
1236
- 'skip$
1237
- if$
1238
- addpubmed pubmed empty$ not and
1239
- { format.pubmed output.nonnull }
1240
- 'skip$
1241
- if$
1242
- }
1243
- if$
1244
- }
1245
-
1246
- % Wrapper for output.bibitem.original.
1247
- % If the URL field is not empty, set makeinlinelink to be true,
1248
- % so that an inline link will be started at the next opportunity
1249
- FUNCTION {output.bibitem}
1250
- { outside.brackets 'bracket.state :=
1251
- output.bibitem.original
1252
- inlinelinks url empty$ not doi empty$ not or pubmed empty$ not or eprint empty$ not or and
1253
- { #1 'makeinlinelink := }
1254
- { #0 'makeinlinelink := }
1255
- if$
1256
- }
1257
-
1258
- % Wrapper for fin.entry.original
1259
- FUNCTION {fin.entry}
1260
- { output.web.refs % urlbst
1261
- makeinlinelink % ooops, it appears we didn't have a title for inlinelink
1262
- { possibly.setup.inlinelink % add some artificial link text here, as a fallback
1263
- linktextstring output.nonnull }
1264
- 'skip$
1265
- if$
1266
- bracket.state close.brackets = % urlbst
1267
- { "]" * }
1268
- 'skip$
1269
- if$
1270
- fin.entry.original
1271
- }
1272
-
1273
- % Webpage entry type.
1274
- % Title and url fields required;
1275
- % author, note, year, month, and lastchecked fields optional
1276
- % See references
1277
- % ISO 690-2 http://www.nlc-bnc.ca/iso/tc46sc9/standard/690-2e.htm
1278
- % http://www.classroom.net/classroom/CitingNetResources.html
1279
- % http://neal.ctstateu.edu/history/cite.html
1280
- % http://www.cas.usf.edu/english/walker/mla.html
1281
- % for citation formats for web pages.
1282
- FUNCTION {webpage}
1283
- { output.bibitem
1284
- author empty$
1285
- { editor empty$
1286
- 'skip$ % author and editor both optional
1287
- { format.editors output.nonnull }
1288
- if$
1289
- }
1290
- { editor empty$
1291
- { format.authors output.nonnull }
1292
- { "can't use both author and editor fields in " cite$ * warning$ }
1293
- if$
1294
- }
1295
- if$
1296
- new.block
1297
- title empty$ 'skip$ 'possibly.setup.inlinelink if$
1298
- format.title "title" output.check
1299
- inbrackets onlinestring output
1300
- new.block
1301
- year empty$
1302
- 'skip$
1303
- { format.date "year" output.check }
1304
- if$
1305
- % We don't need to output the URL details ('lastchecked' and 'url'),
1306
- % because fin.entry does that for us, using output.web.refs. The only
1307
- % reason we would want to put them here is if we were to decide that
1308
- % they should go in front of the rather miscellaneous information in 'note'.
1309
- new.block
1310
- note output
1311
- fin.entry
1312
- }
1313
- % ...urlbst to here
1314
-
1315
-
1316
- FUNCTION {article}
1317
- { output.bibitem
1318
- format.authors "author" output.check
1319
- author format.key output
1320
- format.date "year" output.check
1321
- date.block
1322
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1323
- format.title "title" output.check
1324
- new.block
1325
- crossref missing$
1326
- {
1327
- journal
1328
- "journal" bibinfo.check
1329
- emphasize
1330
- "journal" output.check
1331
- possibly.setup.inlinelink format.vol.num.pages output% urlbst
1332
- }
1333
- { format.article.crossref output.nonnull
1334
- format.pages output
1335
- }
1336
- if$
1337
- new.block
1338
- format.note output
1339
- fin.entry
1340
- }
1341
- FUNCTION {book}
1342
- { output.bibitem
1343
- author empty$
1344
- { format.editors "author and editor" output.check
1345
- editor format.key output
1346
- }
1347
- { format.authors output.nonnull
1348
- crossref missing$
1349
- { "author and editor" editor either.or.check }
1350
- 'skip$
1351
- if$
1352
- }
1353
- if$
1354
- format.date "year" output.check
1355
- date.block
1356
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1357
- format.btitle "title" output.check
1358
- format.edition output
1359
- crossref missing$
1360
- { format.bvolume output
1361
- new.block
1362
- format.number.series output
1363
- new.sentence
1364
- format.publisher.address output
1365
- }
1366
- {
1367
- new.block
1368
- format.book.crossref output.nonnull
1369
- }
1370
- if$
1371
- new.block
1372
- format.note output
1373
- fin.entry
1374
- }
1375
- FUNCTION {booklet}
1376
- { output.bibitem
1377
- format.authors output
1378
- author format.key output
1379
- format.date "year" output.check
1380
- date.block
1381
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1382
- format.title "title" output.check
1383
- new.block
1384
- howpublished "howpublished" bibinfo.check output
1385
- address "address" bibinfo.check output
1386
- new.block
1387
- format.note output
1388
- fin.entry
1389
- }
1390
-
1391
- FUNCTION {inbook}
1392
- { output.bibitem
1393
- author empty$
1394
- { format.editors "author and editor" output.check
1395
- editor format.key output
1396
- }
1397
- { format.authors output.nonnull
1398
- crossref missing$
1399
- { "author and editor" editor either.or.check }
1400
- 'skip$
1401
- if$
1402
- }
1403
- if$
1404
- format.date "year" output.check
1405
- date.block
1406
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1407
- format.btitle "title" output.check
1408
- crossref missing$
1409
- {
1410
- format.edition output
1411
- format.bvolume output
1412
- format.chapter "chapter" output.check
1413
- new.block
1414
- format.number.series output
1415
- new.sentence
1416
- format.publisher.address output
1417
- }
1418
- {
1419
- format.chapter "chapter" output.check
1420
- new.block
1421
- format.book.crossref output.nonnull
1422
- }
1423
- if$
1424
- new.block
1425
- format.note output
1426
- fin.entry
1427
- }
1428
-
1429
- FUNCTION {incollection}
1430
- { output.bibitem
1431
- format.authors "author" output.check
1432
- author format.key output
1433
- format.date "year" output.check
1434
- date.block
1435
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1436
- format.title "title" output.check
1437
- new.block
1438
- crossref missing$
1439
- { format.in.ed.booktitle "booktitle" output.check
1440
- format.edition output
1441
- format.bvolume output
1442
- format.number.series output
1443
- format.chapter.pages output
1444
- new.sentence
1445
- format.publisher.address output
1446
- }
1447
- { format.incoll.inproc.crossref output.nonnull
1448
- format.chapter.pages output
1449
- }
1450
- if$
1451
- new.block
1452
- format.note output
1453
- fin.entry
1454
- }
1455
- FUNCTION {inproceedings}
1456
- { output.bibitem
1457
- format.authors "author" output.check
1458
- author format.key output
1459
- format.date "year" output.check
1460
- date.block
1461
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1462
- format.title "title" output.check
1463
- new.block
1464
- crossref missing$
1465
- { format.in.booktitle "booktitle" output.check
1466
- format.bvolume output
1467
- format.number.series output
1468
- format.pages output
1469
- address "address" bibinfo.check output
1470
- new.sentence
1471
- organization "organization" bibinfo.check output
1472
- publisher "publisher" bibinfo.check output
1473
- }
1474
- { format.incoll.inproc.crossref output.nonnull
1475
- format.pages output
1476
- }
1477
- if$
1478
- new.block
1479
- format.note output
1480
- fin.entry
1481
- }
1482
- FUNCTION {conference} { inproceedings }
1483
- FUNCTION {manual}
1484
- { output.bibitem
1485
- format.authors output
1486
- author format.key output
1487
- format.date "year" output.check
1488
- date.block
1489
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1490
- format.btitle "title" output.check
1491
- format.edition output
1492
- organization address new.block.checkb
1493
- organization "organization" bibinfo.check output
1494
- address "address" bibinfo.check output
1495
- new.block
1496
- format.note output
1497
- fin.entry
1498
- }
1499
-
1500
- FUNCTION {mastersthesis}
1501
- { output.bibitem
1502
- format.authors "author" output.check
1503
- author format.key output
1504
- format.date "year" output.check
1505
- date.block
1506
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1507
- format.title
1508
- "title" output.check
1509
- new.block
1510
- bbl.mthesis format.thesis.type output.nonnull
1511
- school "school" bibinfo.warn output
1512
- address "address" bibinfo.check output
1513
- month "month" bibinfo.check output
1514
- new.block
1515
- format.note output
1516
- fin.entry
1517
- }
1518
-
1519
- FUNCTION {misc}
1520
- { output.bibitem
1521
- format.authors output
1522
- author format.key output
1523
- format.date "year" output.check
1524
- date.block
1525
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1526
- format.title output
1527
- new.block
1528
- howpublished "howpublished" bibinfo.check output
1529
- new.block
1530
- output.eprint output
1531
- new.block
1532
- format.note output
1533
- fin.entry
1534
- }
1535
- FUNCTION {phdthesis}
1536
- { output.bibitem
1537
- format.authors "author" output.check
1538
- author format.key output
1539
- format.date "year" output.check
1540
- date.block
1541
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1542
- format.btitle
1543
- "title" output.check
1544
- new.block
1545
- bbl.phdthesis format.thesis.type output.nonnull
1546
- school "school" bibinfo.warn output
1547
- address "address" bibinfo.check output
1548
- new.block
1549
- format.note output
1550
- fin.entry
1551
- }
1552
-
1553
- FUNCTION {presentation}
1554
- { output.bibitem
1555
- format.authors output
1556
- author format.key output
1557
- new.block
1558
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1559
- format.title output
1560
- new.block
1561
- format.organization.address "organization and address" output.check
1562
- month "month" output.check
1563
- year "year" output.check
1564
- new.block
1565
- format.note output
1566
- new.sentence
1567
- type missing$ 'skip$
1568
- {"(" type capitalize * ")" * output}
1569
- if$
1570
- fin.entry
1571
- }
1572
-
1573
- FUNCTION {proceedings}
1574
- { output.bibitem
1575
- format.editors output
1576
- editor format.key output
1577
- format.date "year" output.check
1578
- date.block
1579
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1580
- format.btitle "title" output.check
1581
- format.bvolume output
1582
- format.number.series output
1583
- new.sentence
1584
- publisher empty$
1585
- { format.organization.address output }
1586
- { organization "organization" bibinfo.check output
1587
- new.sentence
1588
- format.publisher.address output
1589
- }
1590
- if$
1591
- new.block
1592
- format.note output
1593
- fin.entry
1594
- }
1595
-
1596
- FUNCTION {techreport}
1597
- { output.bibitem
1598
- format.authors "author" output.check
1599
- author format.key output
1600
- format.date "year" output.check
1601
- date.block
1602
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1603
- format.title
1604
- "title" output.check
1605
- new.block
1606
- format.tr.number output.nonnull
1607
- institution "institution" bibinfo.warn output
1608
- address "address" bibinfo.check output
1609
- new.block
1610
- format.note output
1611
- fin.entry
1612
- }
1613
-
1614
- FUNCTION {unpublished}
1615
- { output.bibitem
1616
- format.authors "author" output.check
1617
- author format.key output
1618
- format.date "year" output.check
1619
- date.block
1620
- title empty$ 'skip$ 'possibly.setup.inlinelink if$ % urlbst
1621
- format.title "title" output.check
1622
- new.block
1623
- format.note "note" output.check
1624
- fin.entry
1625
- }
1626
-
1627
- FUNCTION {default.type} { misc }
1628
- READ
1629
- FUNCTION {sortify}
1630
- { purify$
1631
- "l" change.case$
1632
- }
1633
- INTEGERS { len }
1634
- FUNCTION {chop.word}
1635
- { 's :=
1636
- 'len :=
1637
- s #1 len substring$ =
1638
- { s len #1 + global.max$ substring$ }
1639
- 's
1640
- if$
1641
- }
1642
- FUNCTION {format.lab.names}
1643
- { 's :=
1644
- "" 't :=
1645
- s #1 "{vv~}{ll}" format.name$
1646
- s num.names$ duplicate$
1647
- #2 >
1648
- { pop$
1649
- " " * bbl.etal *
1650
- }
1651
- { #2 <
1652
- 'skip$
1653
- { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1654
- {
1655
- " " * bbl.etal *
1656
- }
1657
- { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
1658
- * }
1659
- if$
1660
- }
1661
- if$
1662
- }
1663
- if$
1664
- }
1665
-
1666
- FUNCTION {author.key.label}
1667
- { author empty$
1668
- { key empty$
1669
- { cite$ #1 #3 substring$ }
1670
- 'key
1671
- if$
1672
- }
1673
- { author format.lab.names }
1674
- if$
1675
- }
1676
-
1677
- FUNCTION {author.editor.key.label}
1678
- { author empty$
1679
- { editor empty$
1680
- { key empty$
1681
- { cite$ #1 #3 substring$ }
1682
- 'key
1683
- if$
1684
- }
1685
- { editor format.lab.names }
1686
- if$
1687
- }
1688
- { author format.lab.names }
1689
- if$
1690
- }
1691
-
1692
- FUNCTION {editor.key.label}
1693
- { editor empty$
1694
- { key empty$
1695
- { cite$ #1 #3 substring$ }
1696
- 'key
1697
- if$
1698
- }
1699
- { editor format.lab.names }
1700
- if$
1701
- }
1702
-
1703
- FUNCTION {calc.short.authors}
1704
- { type$ "book" =
1705
- type$ "inbook" =
1706
- or
1707
- 'author.editor.key.label
1708
- { type$ "proceedings" =
1709
- 'editor.key.label
1710
- 'author.key.label
1711
- if$
1712
- }
1713
- if$
1714
- 'short.list :=
1715
- }
1716
-
1717
- FUNCTION {calc.label}
1718
- { calc.short.authors
1719
- short.list
1720
- "("
1721
- *
1722
- year duplicate$ empty$
1723
- short.list key field.or.null = or
1724
- { pop$ "" }
1725
- 'skip$
1726
- if$
1727
- *
1728
- 'label :=
1729
- }
1730
-
1731
- FUNCTION {sort.format.names}
1732
- { 's :=
1733
- #1 'nameptr :=
1734
- ""
1735
- s num.names$ 'numnames :=
1736
- numnames 'namesleft :=
1737
- { namesleft #0 > }
1738
- { s nameptr
1739
- "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}"
1740
- format.name$ 't :=
1741
- nameptr #1 >
1742
- {
1743
- " " *
1744
- namesleft #1 = t "others" = and
1745
- { "zzzzz" 't := }
1746
- 'skip$
1747
- if$
1748
- t sortify *
1749
- }
1750
- { t sortify * }
1751
- if$
1752
- nameptr #1 + 'nameptr :=
1753
- namesleft #1 - 'namesleft :=
1754
- }
1755
- while$
1756
- }
1757
-
1758
- FUNCTION {sort.format.title}
1759
- { 't :=
1760
- "A " #2
1761
- "An " #3
1762
- "The " #4 t chop.word
1763
- chop.word
1764
- chop.word
1765
- sortify
1766
- #1 global.max$ substring$
1767
- }
1768
- FUNCTION {author.sort}
1769
- { author empty$
1770
- { key empty$
1771
- { "to sort, need author or key in " cite$ * warning$
1772
- ""
1773
- }
1774
- { key sortify }
1775
- if$
1776
- }
1777
- { author sort.format.names }
1778
- if$
1779
- }
1780
- FUNCTION {author.editor.sort}
1781
- { author empty$
1782
- { editor empty$
1783
- { key empty$
1784
- { "to sort, need author, editor, or key in " cite$ * warning$
1785
- ""
1786
- }
1787
- { key sortify }
1788
- if$
1789
- }
1790
- { editor sort.format.names }
1791
- if$
1792
- }
1793
- { author sort.format.names }
1794
- if$
1795
- }
1796
- FUNCTION {editor.sort}
1797
- { editor empty$
1798
- { key empty$
1799
- { "to sort, need editor or key in " cite$ * warning$
1800
- ""
1801
- }
1802
- { key sortify }
1803
- if$
1804
- }
1805
- { editor sort.format.names }
1806
- if$
1807
- }
1808
- FUNCTION {presort}
1809
- { calc.label
1810
- label sortify
1811
- " "
1812
- *
1813
- type$ "book" =
1814
- type$ "inbook" =
1815
- or
1816
- 'author.editor.sort
1817
- { type$ "proceedings" =
1818
- 'editor.sort
1819
- 'author.sort
1820
- if$
1821
- }
1822
- if$
1823
- #1 entry.max$ substring$
1824
- 'sort.label :=
1825
- sort.label
1826
- *
1827
- " "
1828
- *
1829
- title field.or.null
1830
- sort.format.title
1831
- *
1832
- #1 entry.max$ substring$
1833
- 'sort.key$ :=
1834
- }
1835
-
1836
- ITERATE {presort}
1837
- SORT
1838
- STRINGS { last.label next.extra }
1839
- INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label }
1840
- FUNCTION {initialize.extra.label.stuff}
1841
- { #0 int.to.chr$ 'last.label :=
1842
- "" 'next.extra :=
1843
- #0 'last.extra.num :=
1844
- "a" chr.to.int$ #1 - 'last.extra.num.blank :=
1845
- last.extra.num.blank 'last.extra.num.extended :=
1846
- #0 'number.label :=
1847
- }
1848
- FUNCTION {forward.pass}
1849
- { last.label label =
1850
- { last.extra.num #1 + 'last.extra.num :=
1851
- last.extra.num "z" chr.to.int$ >
1852
- { "a" chr.to.int$ 'last.extra.num :=
1853
- last.extra.num.extended #1 + 'last.extra.num.extended :=
1854
- }
1855
- 'skip$
1856
- if$
1857
- last.extra.num.extended last.extra.num.blank >
1858
- { last.extra.num.extended int.to.chr$
1859
- last.extra.num int.to.chr$
1860
- * 'extra.label := }
1861
- { last.extra.num int.to.chr$ 'extra.label := }
1862
- if$
1863
- }
1864
- { "a" chr.to.int$ 'last.extra.num :=
1865
- "" 'extra.label :=
1866
- label 'last.label :=
1867
- }
1868
- if$
1869
- number.label #1 + 'number.label :=
1870
- }
1871
- FUNCTION {reverse.pass}
1872
- { next.extra "b" =
1873
- { "a" 'extra.label := }
1874
- 'skip$
1875
- if$
1876
- extra.label 'next.extra :=
1877
- extra.label
1878
- duplicate$ empty$
1879
- 'skip$
1880
- { year field.or.null #-1 #1 substring$ chr.to.int$ #65 <
1881
- { "{\natexlab{" swap$ * "}}" * }
1882
- { "{(\natexlab{" swap$ * "})}" * }
1883
- if$ }
1884
- if$
1885
- 'extra.label :=
1886
- label extra.label * 'label :=
1887
- }
1888
- EXECUTE {initialize.extra.label.stuff}
1889
- ITERATE {forward.pass}
1890
- REVERSE {reverse.pass}
1891
- FUNCTION {bib.sort.order}
1892
- { sort.label
1893
- " "
1894
- *
1895
- year field.or.null sortify
1896
- *
1897
- " "
1898
- *
1899
- title field.or.null
1900
- sort.format.title
1901
- *
1902
- #1 entry.max$ substring$
1903
- 'sort.key$ :=
1904
- }
1905
- ITERATE {bib.sort.order}
1906
- SORT
1907
- FUNCTION {begin.bib}
1908
- { preamble$ empty$
1909
- 'skip$
1910
- { preamble$ write$ newline$ }
1911
- if$
1912
- "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1913
- write$ newline$
1914
- "\providecommand{\natexlab}[1]{#1}"
1915
- write$ newline$
1916
- }
1917
- EXECUTE {begin.bib}
1918
- EXECUTE {init.urlbst.variables} % urlbst
1919
- EXECUTE {init.state.consts}
1920
- ITERATE {call.type$}
1921
- FUNCTION {end.bib}
1922
- { newline$
1923
- "\end{thebibliography}" write$ newline$
1924
- }
1925
- EXECUTE {end.bib}
1926
- %% End of customized bst file
1927
- %%
1928
- %% End of file `acl_natbib_basic.bst'.