/articles/adei2016

To get this branch, use:
bzr branch http://darksoft.org/webbzr/articles/adei2016
1 by Suren A. Chilingaryan
Initial import
1
% iopart-num.bst -- BibTeX style for IOP journals (Harvard-like numeric style)
2
%
3
% DESCRIPTION
4
%
5
%   Further documenation may be found in iopart-num.pdf.
6
%
7
%   Available from CTAN as /biblio/bibtex/contrib/iopart-num.
8
%
9
% HISTORY
10
% 
11
% Version 1.0 (2005/07/11)
12
%   Created using custom-bib (merlin.mbs), with following manual modifications:
13
%   -- remove trailing period from predefined volume, page, etc., abbreviations
14
%   -- provide command \newblock to fix incompatibility between natbib
15
%      and iopart (as of iopart version 1996/06/10) 
16
%   -- move edition after booktitle
17
%   -- add version identifier to generated output
18
%   -- for incollection and inproceedings, move volume from after publisher to before
19
%   -- for any series with number, number after series
20
% Version 2.0 (2006/12/21)
21
%   -- define section field for proper formatting of lettered journal sections 
22
%      (as requested by Chris Latham)
23
%   -- suppress printing of number for article, but provide issue field
24
%      for periodicals with issue-based page numbering (suggested by Chris Latham)
25
%   -- patch remove.dots to not strip "\." control sequence (bug reported by Kevin Bube)
26
%   -- define epilog field (undocumented)
27
%   -- delete predefined computer science journal names
28
%   -- bring book volume+number or series+number formatting into IOP form
29
%   -- for book, inbook, and proceedings with editors but no author, fix formating of editors
30
%   -- for incollection and inproceedings, put editors in correct location
31
%   -- for journal: use same page formatting even if volume missing
32
%
33
% LIMITATIONS
34
%
35
% Still not in IOP form: 
36
%   -- for incollection and inproceedings, editors initials should preceed rather 
37
%      than follow last name
38
%   -- of the two semantically different formatting for a book in a multivolume work,
39
%      only "title (series volume)" formatting is supported, not "series volume title"
40
41
%% This is file `iopart-num.bst',
42
%% generated with the docstrip utility.
43
%%
44
%% The original source files were:
45
%%
46
%% merlin.mbs  (with options: `seq-no,nm-rv,dt-beg,yr-blk,xmth,yrp-x,jtit-x,vol-bf,volp-blk,num-xser,jnm-x,add-pub,pub-par,pre-pub,isbn,issn,blk-com,com-blank,fin-bare,pp,ed,abr,ednx,mth-bare,ord,jabr,and-xcom,etal-it,revdata,eprint,url,url-blk')
47
%% ----------------------------------------
48
%% *** Institute of Physics (IOP) journals; Harvard-like numeric style ***
49
%% 
50
%% Copyright 1994-2002 Patrick W Daly
51
 % ===============================================================
52
 % IMPORTANT NOTICE:
53
 % This bibliographic style (bst) file has been generated from one or
54
 % more master bibliographic style (mbs) files, listed above.
55
 %
56
 % This generated file can be redistributed and/or modified under the terms
57
 % of the LaTeX Project Public License Distributed from CTAN
58
 % archives in directory macros/latex/base/lppl.txt; either
59
 % version 1 of the License, or any later version.
60
 % ===============================================================
61
 % Name and version information of the main mbs file:
62
 % \ProvidesFile{merlin.mbs}[2002/10/21 4.05 (PWD, AO, DPC)]
63
 %   For use with BibTeX version 0.99a or later
64
 %-------------------------------------------------------------------
65
 % This bibliography style file is intended for texts in ENGLISH
66
 % This is a numerical citation style, and as such is standard LaTeX.
67
 % It requires no extra package to interface to the main text.
68
 % The form of the \bibitem entries is
69
 %   \bibitem{key}...
70
 % Usage of \cite is as follows:
71
 %   \cite{key} ==>>          [#]
72
 %   \cite[chap. 2]{key} ==>> [#, chap. 2]
73
 % where # is a number determined by the ordering in the reference list.
74
 % The order in the reference list is that by which the works were originally
75
 %   cited in the text, or that in the database.
76
 %---------------------------------------------------------------------
77
78
ENTRY
79
  { address
80
    archive
81
    author
82
    booktitle
83
    chapter
84
    collaboration
85
    edition
86
    editor
87
    eid
88
    eprint
89
    howpublished
90
    institution
91
    isbn
92
    issn
93
    journal
94
    key
95
    month
96
    note
97
    number
98
    numpages
99
    organization
100
    pages
101
    publisher
102
    school
103
    series
104
    title
105
    type
106
    url
107
    volume
108
    year
109
%mc
110
    issue
111
    section
112
    epilog
113
  }
114
  {}
115
  { label }
116
117
FUNCTION {not}
118
{   { #0 }
119
    { #1 }
120
  if$
121
}
122
FUNCTION {and}
123
{   'skip$
124
    { pop$ #0 }
125
  if$
126
}
127
FUNCTION {or}
128
{   { pop$ #1 }
129
    'skip$
130
  if$
131
}
132
133
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
134
% mc utilities
135
%   require merlin.mbs logical operators and field.or.null
136
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137
138
% hang -- {hang} suspends execution, for debugging purposes
139
%   Note that not all pending output may have been flushed.
140
FUNCTION {hang}
141
{
142
  {#1} {skip$} while$
143
}
144
145
% string.length -- {s string.length} returns the true character length of s
146
%   In contrast, text.length$ gives special treatment to LaTeX
147
%   accents ("special characters") and braces.
148
%   Example:   "" string.length     -> 0
149
%   Example:   "hello" string.length    -> 5
150
151
STRINGS {string.length.s }
152
INTEGERS {string.length.i }
153
FUNCTION {string.length}
154
{
155
 'string.length.s :=
156
 #0 'string.length.i :=
157
  {
158
    string.length.s #1 #1 substring$ "" = not
159
  }
160
  { 
161
   string.length.i #1 + 'string.length.i := 
162
   string.length.s #2 global.max$ substring$ 'string.length.s :=
163
  }
164
  while$
165
  string.length.i
166
}
167
168
% shared working variables for stripping functions
169
STRINGS { strip.s strip.t }
170
INTEGERS { strip.i }
171
172
% strip.leading -- {s t strip.leading} strips t from s if it appears
173
%   as an initial substring 
174
%   Example:   "abcdef" "abc" strip.leading   -> "def"
175
%   Example:   "abcdef" "xyz" strip.leading   -> "abcdef"
176
177
FUNCTION{strip.leading}
178
{
179
  'strip.t :=
180
  'strip.s :=
181
  strip.t string.length 'strip.i :=
182
  strip.s #1 strip.i substring$ strip.t =
183
    { strip.s strip.i #1 + global.max$ substring$ }
184
    { strip.s }
185
  if$
186
}
187
188
% strip.trailing -- {s t strip.trailing} strips t from s if it appears
189
%   as a terminal substring 
190
%   Example:   "abcdef" "def" strip.trailing  -> "abc"
191
%   Example:   "abcdef" "xyz" strip.trailing  -> "abcdef"
192
FUNCTION{strip.trailing}
193
{
194
  'strip.t :=
195
  'strip.s :=
196
  strip.t string.length 'strip.i :=
197
  strip.s #-1 strip.i substring$ strip.t =
198
    { strip.s #-1 strip.i - global.max$ substring$ }
199
    { strip.s }
200
  if$
201
}
202
203
% trim -- {s trim} strips any trailing whitespace from s
204
%   Example:   "abcdef  " trim  -> "abcdef"
205
STRINGS {trim.s trim.t}
206
FUNCTION{trim}
207
{
208
  'trim.s :=
209
  {
210
   trim.s #-1 #1 substring$ 'trim.t :=
211
   trim.t empty$ trim.t string.length #0 > and
212
  }
213
    { trim.s #-2 global.max$ substring$ 'trim.s := }
214
  while$
215
  trim.s
216
}
217
218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
219
220
221
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
222
FUNCTION {init.state.consts}
223
{ #0 'before.all :=
224
  #1 'mid.sentence :=
225
  #2 'after.sentence :=
226
  #3 'after.block :=
227
}
228
STRINGS { s t}
229
230
FUNCTION {output.nonnull}
231
{ 's :=
232
  output.state mid.sentence =
233
    { " " * write$ }
234
    { output.state after.block =
235
        { add.period$ write$
236
          newline$
237
          "\newblock " write$
238
        }
239
        { output.state before.all =
240
            'write$
241
            { add.period$ " " * write$ }
242
          if$
243
        }
244
      if$
245
      mid.sentence 'output.state :=
246
    }
247
  if$
248
  s
249
}
250
FUNCTION {output}
251
{ duplicate$ empty$
252
    'pop$
253
    'output.nonnull
254
  if$
255
}
256
FUNCTION {output.check}
257
{ 't :=
258
  duplicate$ empty$
259
    { pop$ "empty " t * " in " * cite$ * warning$ }
260
    'output.nonnull
261
  if$
262
}
263
264
%mc
265
FUNCTION {format.epilog}
266
{ epilog duplicate$ empty$
267
    { pop$ }
268
    { * }
269
  if$
270
}
271
%mc end
272
273
274
FUNCTION {fin.entry}
275
{   
276
%mc
277
format.epilog 
278
%mc end
279
  duplicate$ empty$
280
    'pop$
281
    'write$
282
  if$
283
  newline$
284
}
285
286
FUNCTION {new.block}
287
{ output.state before.all =
288
    'skip$
289
    { after.block 'output.state := }
290
  if$
291
}
292
FUNCTION {new.sentence}
293
{ output.state after.block =
294
    'skip$
295
    { output.state before.all =
296
        'skip$
297
        { after.sentence 'output.state := }
298
      if$
299
    }
300
  if$
301
}
302
FUNCTION {add.blank}
303
{  " " * before.all 'output.state :=
304
}
305
306
FUNCTION {date.block}
307
{
308
  add.blank
309
}
310
311
STRINGS {z}
312
FUNCTION {remove.dots}
313
{ 'z :=
314
  ""
315
  { z empty$ not }
316
  {
317
%mc patch to preserve the control sequence \. if it appears in a name
318
   z #1 #2 substring$ "\." = 
319
      { 
320
        % process "\." sequence
321
        z #3 global.max$ substring$ 'z :=
322
        "\." * 
323
      }
324
      {    
325
        % process regular character
326
        z #1 #1 substring$
327
        z #2 global.max$ substring$ 'z :=
328
        duplicate$ "." = 'pop$
329
         { * }
330
        if$
331
      }
332
    if$
333
%mc
334
  }
335
  while$
336
}
337
FUNCTION {new.block.checka}
338
{ empty$
339
    'skip$
340
    'new.block
341
  if$
342
}
343
FUNCTION {new.block.checkb}
344
{ empty$
345
  swap$ empty$
346
  and
347
    'skip$
348
    'new.block
349
  if$
350
}
351
FUNCTION {new.sentence.checka}
352
{ empty$
353
    'skip$
354
    'new.sentence
355
  if$
356
}
357
FUNCTION {new.sentence.checkb}
358
{ empty$
359
  swap$ empty$
360
  and
361
    'skip$
362
    'new.sentence
363
  if$
364
}
365
FUNCTION {field.or.null}
366
{ duplicate$ empty$
367
    { pop$ "" }
368
    'skip$
369
  if$
370
}
371
FUNCTION {emphasize}
372
{ duplicate$ empty$
373
    { pop$ "" }
374
    { "{\em " swap$ * "\/}" * }
375
  if$
376
}
377
FUNCTION {bolden}
378
{ duplicate$ empty$
379
    { pop$ "" }
380
    { "{\bf " swap$ * "}" * }
381
  if$
382
}
383
FUNCTION {tie.or.space.prefix}
384
{ duplicate$ text.length$ #3 <
385
    { "~" }
386
    { " " }
387
  if$
388
  swap$
389
}
390
391
FUNCTION {capitalize}
392
{ "u" change.case$ "t" change.case$ }
393
394
FUNCTION {space.word}
395
{ " " swap$ * " " * }
396
 % Here are the language-specific definitions for explicit words.
397
 % Each function has a name bbl.xxx where xxx is the English word.
398
 % The language selected here is ENGLISH
399
FUNCTION {bbl.and}
400
{ "and"}
401
402
FUNCTION {bbl.etal}
403
{ "et~al." }
404
405
FUNCTION {bbl.editors}
406
{ "eds" }
407
408
FUNCTION {bbl.editor}
409
{ "ed" }
410
411
FUNCTION {bbl.edby}
412
{ "edited by" }
413
414
FUNCTION {bbl.edition}
415
{ "ed" }
416
417
FUNCTION {bbl.volume}
418
{ "vol" }
419
420
FUNCTION {bbl.of}
421
{ "of" }
422
423
FUNCTION {bbl.number}
424
{ "no" }
425
426
FUNCTION {bbl.nr}
427
{ "no" }
428
429
FUNCTION {bbl.in}
430
{ "in" }
431
432
FUNCTION {bbl.pages}
433
{ "pp" }
434
435
FUNCTION {bbl.page}
436
{ "p" }
437
438
FUNCTION {bbl.eidpp}
439
{ "pages" }
440
441
FUNCTION {bbl.chapter}
442
{ "chap" }
443
444
FUNCTION {bbl.techrep}
445
{ "Tech. Rep." }
446
447
FUNCTION {bbl.mthesis}
448
{ "Master's thesis" }
449
450
FUNCTION {bbl.phdthesis}
451
{ "Ph.D. thesis" }
452
453
FUNCTION {bbl.first}
454
{ "1st" }
455
456
FUNCTION {bbl.second}
457
{ "2nd" }
458
459
FUNCTION {bbl.third}
460
{ "3rd" }
461
462
FUNCTION {bbl.fourth}
463
{ "4th" }
464
465
FUNCTION {bbl.fifth}
466
{ "5th" }
467
468
FUNCTION {bbl.st}
469
{ "st" }
470
471
FUNCTION {bbl.nd}
472
{ "nd" }
473
474
FUNCTION {bbl.rd}
475
{ "rd" }
476
477
FUNCTION {bbl.th}
478
{ "th" }
479
480
MACRO {jan} {"Jan."}
481
482
MACRO {feb} {"Feb."}
483
484
MACRO {mar} {"Mar."}
485
486
MACRO {apr} {"Apr."}
487
488
MACRO {may} {"May"}
489
490
MACRO {jun} {"Jun."}
491
492
MACRO {jul} {"Jul."}
493
494
MACRO {aug} {"Aug."}
495
496
MACRO {sep} {"Sep."}
497
498
MACRO {oct} {"Oct."}
499
500
MACRO {nov} {"Nov."}
501
502
MACRO {dec} {"Dec."}
503
504
FUNCTION {eng.ord}
505
{ duplicate$ "1" swap$ *
506
  #-2 #1 substring$ "1" =
507
     { bbl.th * }
508
     { duplicate$ #-1 #1 substring$
509
       duplicate$ "1" =
510
         { pop$ bbl.st * }
511
         { duplicate$ "2" =
512
             { pop$ bbl.nd * }
513
             { "3" =
514
                 { bbl.rd * }
515
                 { bbl.th * }
516
               if$
517
             }
518
           if$
519
          }
520
       if$
521
     }
522
   if$
523
}
524
525
FUNCTION {bibinfo.check}
526
{ swap$
527
  duplicate$ missing$
528
    {
529
      pop$ pop$
530
      ""
531
    }
532
    { duplicate$ empty$
533
        {
534
          swap$ pop$
535
        }
536
        { swap$
537
          pop$
538
        }
539
      if$
540
    }
541
  if$
542
}
543
FUNCTION {bibinfo.warn}
544
{ swap$
545
  duplicate$ missing$
546
    {
547
      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
548
      ""
549
    }
550
    { duplicate$ empty$
551
        {
552
          swap$ "empty " swap$ * " in " * cite$ * warning$
553
        }
554
        { swap$
555
          pop$
556
        }
557
      if$
558
    }
559
  if$
560
}
561
%% FUNCTION {format.eprint}
562
%% { eprint duplicate$ empty$
563
%%     'skip$
564
%%     { "\eprint"
565
%%       archive empty$
566
%%         'skip$
567
%%         { "[" * archive * "]" * }
568
%%       if$
569
%%       "{" * swap$ * "}" *
570
%%     }
571
%%   if$
572
%% }
573
FUNCTION {format.eprint}
574
{ eprint duplicate$ empty$
575
    'skip$
576
    { 
577
      "(\textit{Preprint} " 
578
      swap$
579
       "\eprint"
580
      archive empty$
581
        'skip$
582
        { "[" * archive * "]" * }
583
      if$
584
      "{" * swap$ * "}" *
585
      *
586
      ")"
587
      *
588
    }
589
  if$
590
}
591
592
FUNCTION {format.url}
593
{ url empty$
594
    { "" }
595
    { "\urlprefix\url{" url * "}" * }
596
  if$
597
}
598
599
STRINGS  { bibinfo}
600
INTEGERS { nameptr namesleft numnames }
601
602
FUNCTION {format.names}
603
{ 'bibinfo :=
604
  duplicate$ empty$ 'skip$ {
605
  's :=
606
  "" 't :=
607
  #1 'nameptr :=
608
  s num.names$ 'numnames :=
609
  numnames 'namesleft :=
610
    { namesleft #0 > }
611
    { s nameptr
612
      "{vv~}{ll}{ jj}{ f{~}}"
613
      format.name$
614
      remove.dots
615
      bibinfo bibinfo.check
616
      't :=
617
      nameptr #1 >
618
        {
619
          namesleft #1 >
620
            { ", " * t * }
621
            {
622
              s nameptr "{ll}" format.name$ duplicate$ "others" =
623
                { 't := }
624
                { pop$ }
625
              if$
626
              t "others" =
627
                {
628
                  " " * bbl.etal emphasize *
629
                }
630
                {
631
                  bbl.and
632
                  space.word * t *
633
                }
634
              if$
635
            }
636
          if$
637
        }
638
        't
639
      if$
640
      nameptr #1 + 'nameptr :=
641
      namesleft #1 - 'namesleft :=
642
    }
643
  while$
644
  } if$
645
}
646
FUNCTION {format.names.ed}
647
{
648
  'bibinfo :=
649
  duplicate$ empty$ 'skip$ {
650
  's :=
651
  "" 't :=
652
  #1 'nameptr :=
653
  s num.names$ 'numnames :=
654
  numnames 'namesleft :=
655
    { namesleft #0 > }
656
    { s nameptr
657
      "{f{~}~}{vv~}{ll}{ jj}"
658
      format.name$
659
      remove.dots
660
      bibinfo bibinfo.check
661
      't :=
662
      nameptr #1 >
663
        {
664
          namesleft #1 >
665
            { ", " * t * }
666
            {
667
              s nameptr "{ll}" format.name$ duplicate$ "others" =
668
                { 't := }
669
                { pop$ }
670
              if$
671
              t "others" =
672
                {
673
674
                  " " * bbl.etal emphasize *
675
                }
676
                {
677
                  bbl.and
678
                  space.word * t *
679
                }
680
              if$
681
            }
682
          if$
683
        }
684
        't
685
      if$
686
      nameptr #1 + 'nameptr :=
687
      namesleft #1 - 'namesleft :=
688
    }
689
  while$
690
  } if$
691
}
692
FUNCTION {format.authors}
693
{ author "author" format.names
694
    duplicate$ empty$ 'skip$
695
    { collaboration "collaboration" bibinfo.check
696
      duplicate$ empty$ 'skip$
697
        { " (" swap$ * ")" * }
698
      if$
699
      *
700
    }
701
  if$
702
}
703
FUNCTION {get.bbl.editor}
704
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
705
706
FUNCTION {format.editors}
707
{ editor "editor" format.names duplicate$ empty$ 'skip$
708
    {
709
%%      "," *
710
%%      " " *
711
%%      get.bbl.editor
712
%%      *
713
%mc
714
      " " *
715
      "(" *
716
      get.bbl.editor
717
      *
718
      ")" *
719
%mc end
720
    }
721
  if$
722
}
723
%mc
724
FUNCTION {format.editors.inline}
725
{ editor "editor" format.names duplicate$ empty$ 'skip$
726
    {
727
      bbl.editor " " *
728
      swap$
729
      *
730
    }
731
  if$
732
}
733
%mc end
734
735
FUNCTION {format.isbn}
736
{ isbn "isbn" bibinfo.check
737
  duplicate$ empty$ 'skip$
738
    {
739
      "ISBN " swap$ *
740
    }
741
  if$
742
}
743
744
FUNCTION {format.issn}
745
{ issn "issn" bibinfo.check
746
  duplicate$ empty$ 'skip$
747
    {
748
      "ISSN " swap$ *
749
    }
750
  if$
751
}
752
753
FUNCTION {format.note}
754
{
755
 note empty$
756
    { "" }
757
    { note #1 #1 substring$
758
      duplicate$ "{" =
759
        'skip$
760
        { output.state mid.sentence =
761
          { "l" }
762
          { "u" }
763
        if$
764
        change.case$
765
        }
766
      if$
767
      note #2 global.max$ substring$ * "note" bibinfo.check
768
    }
769
  if$
770
}
771
772
FUNCTION {format.title}
773
{ title
774
  duplicate$ empty$ 'skip$
775
    { "t" change.case$ }
776
  if$
777
  "title" bibinfo.check
778
}
779
FUNCTION {output.bibitem}
780
{ newline$
781
  "\bibitem{" write$
782
  cite$ write$
783
  "}" write$
784
  newline$
785
  ""
786
  before.all 'output.state :=
787
}
788
789
FUNCTION {n.dashify}
790
{
791
  't :=
792
  ""
793
    { t empty$ not }
794
    { t #1 #1 substring$ "-" =
795
        { t #1 #2 substring$ "--" = not
796
            { "--" *
797
              t #2 global.max$ substring$ 't :=
798
            }
799
            {   { t #1 #1 substring$ "-" = }
800
                { "-" *
801
                  t #2 global.max$ substring$ 't :=
802
                }
803
              while$
804
            }
805
          if$
806
        }
807
        { t #1 #1 substring$ *
808
          t #2 global.max$ substring$ 't :=
809
        }
810
      if$
811
    }
812
  while$
813
}
814
815
FUNCTION {word.in}
816
{ bbl.in
817
  " " * }
818
819
FUNCTION {format.date}
820
{
821
  ""
822
  duplicate$ empty$
823
  year  "year"  bibinfo.check duplicate$ empty$
824
    { swap$ 'skip$
825
        { "there's a month but no year in " cite$ * warning$ }
826
      if$
827
      *
828
    }
829
    { swap$ 'skip$
830
        {
831
          swap$
832
          " " * swap$
833
        }
834
      if$
835
      *
836
      remove.dots
837
    }
838
  if$
839
  duplicate$ empty$
840
    'skip$
841
    {
842
      before.all 'output.state :=
843
    " " swap$ *
844
    }
845
  if$
846
}
847
FUNCTION {format.btitle}
848
{ title "title" bibinfo.check
849
  duplicate$ empty$ 'skip$
850
    {
851
      emphasize
852
    }
853
  if$
854
}
855
FUNCTION {either.or.check}
856
{ empty$
857
    'pop$
858
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
859
  if$
860
}
861
FUNCTION {format.bvolume}
862
{ volume empty$
863
    { "" }
864
%%    { bbl.volume volume tie.or.space.prefix
865
%%      "volume" bibinfo.check * *
866
%%      series "series" bibinfo.check
867
%%      duplicate$ empty$ 'pop$
868
%%        { swap$ bbl.of space.word * swap$
869
%%         emphasize * }
870
%%      if$
871
%%      "volume and number" number either.or.check
872
%%    }
873
%mc
874
    {
875
      series "series" bibinfo.check
876
      empty$ 
877
        {bbl.volume volume tie.or.space.prefix "volume" bibinfo.check * *}
878
        { 
879
          "(" 
880
          series "series" bibinfo.check emphasize *
881
          " " * bbl.volume * 
882
          volume tie.or.space.prefix "volume" bibinfo.check * 
883
          ")" * *
884
        }
885
      if$
886
      "volume and number" number either.or.check
887
    }
888
%mc end
889
  if$
890
}
891
FUNCTION {format.number.series}
892
{ volume empty$
893
    { number empty$
894
        { series field.or.null }
895
        { series empty$
896
            { number "number" bibinfo.check }
897
        { 
898
          %% output.state mid.sentence =
899
          %%   { bbl.number }
900
          %%   { bbl.number capitalize }
901
          %% if$
902
          %% number tie.or.space.prefix "number" bibinfo.check * *
903
          %% bbl.in space.word *
904
          %% series "series" bibinfo.check *
905
          %% " " * bbl.number * 
906
          %% number tie.or.space.prefix "number" bibinfo.check * *
907
%mc
908
              "(" 
909
              series "series" bibinfo.check emphasize *
910
              " " * bbl.number * 
911
              number tie.or.space.prefix "number" bibinfo.check * 
912
              ")" *
913
              *
914
%mc end
915
        }
916
      if$
917
    }
918
      if$
919
    }
920
    { "" }
921
  if$
922
}
923
924
925
FUNCTION {is.num}
926
{ chr.to.int$
927
  duplicate$ "0" chr.to.int$ < not
928
  swap$ "9" chr.to.int$ > not and
929
}
930
931
FUNCTION {extract.num}
932
{ duplicate$ 't :=
933
  "" 's :=
934
  { t empty$ not }
935
  { t #1 #1 substring$
936
    t #2 global.max$ substring$ 't :=
937
    duplicate$ is.num
938
      { s swap$ * 's := }
939
      { pop$ "" 't := }
940
    if$
941
  }
942
  while$
943
  s empty$
944
    'skip$
945
    { pop$ s }
946
  if$
947
}
948
949
FUNCTION {convert.edition}
950
{ extract.num "l" change.case$ 's :=
951
  s "first" = s "1" = or
952
    { bbl.first 't := }
953
    { s "second" = s "2" = or
954
        { bbl.second 't := }
955
        { s "third" = s "3" = or
956
            { bbl.third 't := }
957
            { s "fourth" = s "4" = or
958
                { bbl.fourth 't := }
959
                { s "fifth" = s "5" = or
960
                    { bbl.fifth 't := }
961
                    { s #1 #1 substring$ is.num
962
                        { s eng.ord 't := }
963
                        { edition 't := }
964
                      if$
965
                    }
966
                  if$
967
                }
968
              if$
969
            }
970
          if$
971
        }
972
      if$
973
    }
974
  if$
975
  t
976
}
977
978
FUNCTION {format.edition}
979
{ edition duplicate$ empty$ 'skip$
980
    {
981
      convert.edition
982
      output.state mid.sentence =
983
        { "l" }
984
        { "t" }
985
      if$ change.case$
986
      "edition" bibinfo.check
987
      " " * bbl.edition *
988
    }
989
  if$
990
}
991
INTEGERS { multiresult }
992
FUNCTION {multi.page.check}
993
{ 't :=
994
  #0 'multiresult :=
995
    { multiresult not
996
      t empty$ not
997
      and
998
    }
999
    { t #1 #1 substring$
1000
      duplicate$ "-" =
1001
      swap$ duplicate$ "," =
1002
      swap$ "+" =
1003
      or or
1004
        { #1 'multiresult := }
1005
        { t #2 global.max$ substring$ 't := }
1006
      if$
1007
    }
1008
  while$
1009
  multiresult
1010
}
1011
FUNCTION {format.pages}
1012
{ pages duplicate$ empty$ 'skip$
1013
    { duplicate$ multi.page.check
1014
        {
1015
          bbl.pages swap$
1016
          n.dashify
1017
        }
1018
        {
1019
          bbl.page swap$
1020
        }
1021
      if$
1022
      tie.or.space.prefix
1023
      "pages" bibinfo.check
1024
      * *
1025
    }
1026
  if$
1027
}
1028
FUNCTION {format.journal.pages}
1029
{ pages duplicate$ empty$ 'pop$
1030
%mc     { swap$ duplicate$ empty$
1031
%mc         { pop$ pop$ format.pages }
1032
%mc         {
1033
%mc           " " *
1034
%mc           swap$
1035
%mc           n.dashify
1036
%mc           "pages" bibinfo.check
1037
%mc           *
1038
%mc         }
1039
%mc       if$
1040
%mc     }
1041
    { swap$
1042
          " " *
1043
          swap$
1044
          n.dashify
1045
          "pages" bibinfo.check
1046
          *
1047
    }
1048
  if$
1049
}
1050
FUNCTION {format.journal.eid}
1051
{ eid "eid" bibinfo.check
1052
  duplicate$ empty$ 'skip$
1053
    { swap$ duplicate$ empty$ 'skip$
1054
      {
1055
          " " *
1056
      }
1057
      if$
1058
      swap$
1059
      numpages empty$ 'skip$
1060
        { bbl.eidpp numpages tie.or.space.prefix
1061
          "numpages" bibinfo.check * *
1062
          " (" swap$ * ")" * *
1063
        }
1064
      if$
1065
    }
1066
  if$ *
1067
}
1068
FUNCTION {format.vol.num.pages}
1069
{ volume field.or.null
1070
%mc section handling
1071
    section field.or.null strip.leading
1072
    section field.or.null strip.trailing trim
1073
%mc end
1074
  duplicate$ empty$ 'skip$
1075
    {
1076
      "volume" bibinfo.check
1077
    }
1078
  if$
1079
  bolden
1080
%mc  number "number" bibinfo.check duplicate$ empty$ 'skip$
1081
  issue "issue" bibinfo.check duplicate$ empty$ 'skip$
1082
    {
1083
      swap$ duplicate$ empty$
1084
%mc        { "there's a number but no volume in " cite$ * warning$ }
1085
        { "there's an issue but no volume in " cite$ * warning$ }
1086
        'skip$
1087
      if$
1088
      swap$
1089
      "(" swap$ * ")" *
1090
    }
1091
  if$ *
1092
  eid empty$
1093
    { format.journal.pages }
1094
    { format.journal.eid }
1095
  if$
1096
}
1097
1098
FUNCTION {format.chapter.pages}
1099
{ chapter empty$
1100
    'format.pages
1101
    { type empty$
1102
        { bbl.chapter }
1103
        { type "l" change.case$
1104
          "type" bibinfo.check
1105
        }
1106
      if$
1107
      chapter tie.or.space.prefix
1108
      "chapter" bibinfo.check
1109
      * *
1110
      pages empty$
1111
        'skip$
1112
        { ", " * format.pages * }
1113
      if$
1114
    }
1115
  if$
1116
}
1117
1118
FUNCTION {format.booktitle}
1119
{
1120
  booktitle "booktitle" bibinfo.check
1121
  emphasize
1122
}
1123
%% FUNCTION {format.in.ed.booktitle}
1124
%% { format.booktitle duplicate$ empty$ 'skip$
1125
%%     {
1126
%%       editor "editor" format.names.ed duplicate$ empty$ 'pop$
1127
%%         {
1128
%%           "," *
1129
%%           " " *
1130
%%           get.bbl.editor
1131
%%           ", " *
1132
%%           * swap$
1133
%%           * }
1134
%%       if$
1135
%%       word.in swap$ *
1136
%%     }
1137
%%   if$
1138
%% }
1139
FUNCTION {empty.misc.check}
1140
{ author empty$ title empty$ howpublished empty$
1141
  month empty$ year empty$ note empty$
1142
  and and and and and
1143
    { "all relevant fields are empty in " cite$ * warning$ }
1144
    'skip$
1145
  if$
1146
}
1147
FUNCTION {format.thesis.type}
1148
{ type duplicate$ empty$
1149
    'pop$
1150
    { swap$ pop$
1151
      "t" change.case$ "type" bibinfo.check
1152
    }
1153
  if$
1154
}
1155
FUNCTION {format.tr.number}
1156
{ number "number" bibinfo.check
1157
  type duplicate$ empty$
1158
    { pop$ bbl.techrep }
1159
    'skip$
1160
  if$
1161
  "type" bibinfo.check
1162
  swap$ duplicate$ empty$
1163
    { pop$ "t" change.case$ }
1164
    { tie.or.space.prefix * * }
1165
  if$
1166
}
1167
FUNCTION {format.article.crossref}
1168
{
1169
  key duplicate$ empty$
1170
    { pop$
1171
      journal duplicate$ empty$
1172
        { "need key or journal for " cite$ * " to crossref " * crossref * warning$ }
1173
        { "journal" bibinfo.check emphasize word.in swap$ * }
1174
      if$
1175
    }
1176
    { word.in swap$ * " " *}
1177
  if$
1178
  " \cite{" * crossref * "}" *
1179
}
1180
FUNCTION {format.crossref.editor}
1181
{ editor #1 "{vv~}{ll}" format.name$
1182
  "editor" bibinfo.check
1183
  editor num.names$ duplicate$
1184
  #2 >
1185
    { pop$
1186
      "editor" bibinfo.check
1187
      " " * bbl.etal
1188
      emphasize
1189
      *
1190
    }
1191
    { #2 <
1192
        'skip$
1193
        { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
1194
            {
1195
              "editor" bibinfo.check
1196
              " " * bbl.etal
1197
              emphasize
1198
              *
1199
            }
1200
            {
1201
             bbl.and space.word
1202
              * editor #2 "{vv~}{ll}" format.name$
1203
              "editor" bibinfo.check
1204
              *
1205
            }
1206
          if$
1207
        }
1208
      if$
1209
    }
1210
  if$
1211
}
1212
1213
FUNCTION {format.book.crossref}
1214
{ volume duplicate$ empty$
1215
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1216
      pop$ word.in
1217
    }
1218
    { bbl.volume
1219
      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
1220
    }
1221
  if$
1222
  editor empty$
1223
  editor field.or.null author field.or.null =
1224
  or
1225
    { key empty$
1226
        { series empty$
1227
            { "need editor, key, or series for " cite$ * " to crossref " *
1228
              crossref * warning$
1229
              "" *
1230
            }
1231
            { series emphasize * }
1232
          if$
1233
        }
1234
        { key * }
1235
      if$
1236
    }
1237
    { format.crossref.editor * }
1238
  if$
1239
  " \cite{" * crossref * "}" *
1240
}
1241
FUNCTION {format.incoll.inproc.crossref}
1242
{
1243
  editor empty$
1244
  editor field.or.null author field.or.null =
1245
  or
1246
    { key empty$
1247
        { format.booktitle duplicate$ empty$
1248
            { "need editor, key, or booktitle for " cite$ * " to crossref " *
1249
              crossref * warning$
1250
            }
1251
            { word.in swap$ * }
1252
          if$
1253
        }
1254
        { word.in key * " " *}
1255
      if$
1256
    }
1257
    { word.in format.crossref.editor * " " *}
1258
  if$
1259
  " \cite{" * crossref * "}" *
1260
}
1261
FUNCTION {format.org.or.pub}
1262
{ 't :=
1263
  ""
1264
  address empty$ t empty$ and
1265
    'skip$
1266
    {
1267
      add.blank "(" *
1268
      address "address" bibinfo.check *
1269
      t empty$
1270
        'skip$
1271
        { address empty$
1272
            'skip$
1273
            { ": " * }
1274
          if$
1275
          t *
1276
        }
1277
      if$
1278
      ")" *
1279
    }
1280
  if$
1281
}
1282
FUNCTION {format.publisher.address}
1283
{ publisher "publisher" bibinfo.warn format.org.or.pub
1284
}
1285
1286
FUNCTION {format.organization.address}
1287
{ organization "organization" bibinfo.check format.org.or.pub
1288
}
1289
1290
1291
1292
FUNCTION {article}
1293
{ output.bibitem
1294
  format.authors "author" output.check
1295
  format.date "year" output.check
1296
  date.block
1297
  crossref missing$
1298
    {
1299
%mc add section handling
1300
%mc       journal
1301
%mc       "journal" bibinfo.check
1302
%mc       emphasize
1303
%mc       "journal" output.check
1304
%mc       add.blank
1305
      journal
1306
      "journal" bibinfo.check
1307
      section field.or.null strip.trailing trim
1308
      emphasize
1309
      "journal" output.check
1310
      add.blank
1311
      section empty$
1312
        { skip$ }
1313
        { section * add.blank}
1314
      if$
1315
%mc end
1316
      format.vol.num.pages output
1317
    }
1318
    { format.article.crossref output.nonnull
1319
      format.pages output
1320
    }
1321
  if$
1322
  format.issn output
1323
  format.note output
1324
  format.eprint output
1325
  format.url output
1326
  fin.entry
1327
}
1328
FUNCTION {book}
1329
{ output.bibitem
1330
  author empty$
1331
    { format.editors "author and editor" output.check
1332
    }
1333
    { format.authors output.nonnull
1334
      crossref missing$
1335
        { "author and editor" editor either.or.check }
1336
        'skip$
1337
      if$
1338
    }
1339
  if$
1340
  format.date "year" output.check
1341
  date.block
1342
  format.btitle "title" output.check
1343
  format.edition output
1344
  crossref missing$
1345
    { format.bvolume output
1346
      format.number.series output
1347
      format.publisher.address output
1348
    }
1349
    {
1350
      format.book.crossref output.nonnull
1351
    }
1352
  if$
1353
  %% format.edition output
1354
  format.isbn output
1355
  format.note output
1356
  format.eprint output
1357
  format.url output
1358
  fin.entry
1359
}
1360
FUNCTION {booklet}
1361
{ output.bibitem
1362
  format.authors output
1363
  format.date output
1364
  date.block
1365
  format.title "title" output.check
1366
  howpublished "howpublished" bibinfo.check output
1367
  address "address" bibinfo.check output
1368
  format.isbn output
1369
  format.note output
1370
  format.eprint output
1371
  format.url output
1372
  fin.entry
1373
}
1374
1375
FUNCTION {inbook}
1376
{ output.bibitem
1377
  author empty$
1378
    { format.editors "author and editor" output.check
1379
    }
1380
    { format.authors output.nonnull
1381
      crossref missing$
1382
        { "author and editor" editor either.or.check }
1383
        'skip$
1384
      if$
1385
    }
1386
  if$
1387
  format.date "year" output.check
1388
  date.block
1389
  format.btitle "title" output.check
1390
  crossref missing$
1391
    {
1392
      format.bvolume output
1393
      format.publisher.address output
1394
      %% format.bvolume output
1395
      format.chapter.pages "chapter and pages" output.check
1396
      format.number.series output
1397
    }
1398
    {
1399
      format.chapter.pages "chapter and pages" output.check
1400
      format.book.crossref output.nonnull
1401
    }
1402
  if$
1403
  format.edition output
1404
  crossref missing$
1405
    { format.isbn output }
1406
    'skip$
1407
  if$
1408
  format.note output
1409
  format.eprint output
1410
  format.url output
1411
  fin.entry
1412
}
1413
1414
FUNCTION {incollection}
1415
{ output.bibitem
1416
  format.authors "author" output.check
1417
  format.date "year" output.check
1418
  date.block
1419
  crossref missing$
1420
    { 
1421
      %% format.in.ed.booktitle "booktitle" output.check
1422
%mc   
1423
      format.booktitle "booktitle" output.check
1424
      format.bvolume output
1425
      format.number.series output
1426
      format.editors.inline output
1427
%mc end
1428
      format.publisher.address output
1429
      %% format.bvolume output
1430
      %% format.number.series output
1431
      format.chapter.pages output
1432
      format.edition output
1433
      format.isbn output
1434
    }
1435
    { format.incoll.inproc.crossref output.nonnull
1436
      format.chapter.pages output
1437
    }
1438
  if$
1439
  format.note output
1440
  format.eprint output
1441
  format.url output
1442
  fin.entry
1443
}
1444
FUNCTION {inproceedings}
1445
{ output.bibitem
1446
  format.authors "author" output.check
1447
  format.date "year" output.check
1448
  date.block
1449
  crossref missing$
1450
    { 
1451
1452
      %%format.in.ed.booktitle "booktitle" output.check
1453
%mc   
1454
      format.booktitle "booktitle" output.check
1455
      format.bvolume output
1456
      format.number.series output
1457
      format.editors.inline output
1458
%mc end
1459
      publisher empty$
1460
        { format.organization.address output }
1461
        { organization "organization" bibinfo.check output
1462
          format.publisher.address output
1463
        }
1464
      if$
1465
      %% format.bvolume output
1466
      %% format.number.series output
1467
      format.pages output
1468
      format.isbn output
1469
      format.issn output
1470
    }
1471
    { format.incoll.inproc.crossref output.nonnull
1472
      format.pages output
1473
    }
1474
  if$
1475
  format.note output
1476
  format.eprint output
1477
  format.url output
1478
  fin.entry
1479
}
1480
FUNCTION {conference} { inproceedings }
1481
FUNCTION {manual}
1482
{ output.bibitem
1483
  author empty$
1484
    { organization "organization" bibinfo.check
1485
      duplicate$ empty$ 'pop$
1486
        { output
1487
          address "address" bibinfo.check output
1488
        }
1489
      if$
1490
    }
1491
    { format.authors output.nonnull }
1492
  if$
1493
  format.date output
1494
  date.block
1495
  format.btitle "title" output.check
1496
  author empty$
1497
    { organization empty$
1498
        {
1499
          address "address" bibinfo.check output
1500
        }
1501
        'skip$
1502
      if$
1503
    }
1504
    {
1505
      organization "organization" bibinfo.check output
1506
      address "address" bibinfo.check output
1507
    }
1508
  if$
1509
  format.edition output
1510
  format.note output
1511
  format.eprint output
1512
  format.url output
1513
  fin.entry
1514
}
1515
1516
FUNCTION {mastersthesis}
1517
{ output.bibitem
1518
  format.authors "author" output.check
1519
  format.date "year" output.check
1520
  date.block
1521
  format.btitle
1522
  "title" output.check
1523
  bbl.mthesis format.thesis.type output.nonnull
1524
  school "school" bibinfo.warn output
1525
  address "address" bibinfo.check output
1526
  format.note output
1527
  format.eprint output
1528
  format.url output
1529
  fin.entry
1530
}
1531
1532
FUNCTION {misc}
1533
{ output.bibitem
1534
  format.authors output
1535
  format.date output
1536
  format.title output
1537
  howpublished "howpublished" bibinfo.check output
1538
  format.note output
1539
  format.eprint output
1540
  format.url output
1541
  fin.entry
1542
  empty.misc.check
1543
}
1544
FUNCTION {phdthesis}
1545
{ output.bibitem
1546
  format.authors "author" output.check
1547
  format.date "year" output.check
1548
  date.block
1549
  format.btitle
1550
  "title" output.check
1551
  bbl.phdthesis format.thesis.type output.nonnull
1552
  school "school" bibinfo.warn output
1553
  address "address" bibinfo.check output
1554
  format.note output
1555
  format.eprint output
1556
  format.url output
1557
  fin.entry
1558
}
1559
1560
FUNCTION {proceedings}
1561
{ output.bibitem
1562
  editor empty$
1563
    { organization "organization" bibinfo.check output
1564
    }
1565
    { format.editors output.nonnull }
1566
  if$
1567
  format.date "year" output.check
1568
  date.block
1569
  format.btitle "title" output.check
1570
  format.bvolume output
1571
  format.number.series output
1572
  editor empty$
1573
    { publisher empty$
1574
        'skip$
1575
        {
1576
          format.publisher.address output
1577
        }
1578
      if$
1579
    }
1580
    { publisher empty$
1581
        {
1582
          format.organization.address output }
1583
        {
1584
          organization "organization" bibinfo.check output
1585
          format.publisher.address output
1586
        }
1587
      if$
1588
     }
1589
  if$
1590
  format.isbn output
1591
  format.issn output
1592
  format.note output
1593
  format.eprint output
1594
  format.url output
1595
  fin.entry
1596
}
1597
1598
FUNCTION {techreport}
1599
{ output.bibitem
1600
  format.authors "author" output.check
1601
  format.date "year" output.check
1602
  date.block
1603
  format.title
1604
  "title" output.check
1605
  format.tr.number output.nonnull
1606
  institution "institution" bibinfo.warn output
1607
  address "address" bibinfo.check output
1608
  format.note output
1609
  format.eprint output
1610
  format.url output
1611
  fin.entry
1612
}
1613
1614
FUNCTION {unpublished}
1615
{ output.bibitem
1616
  format.authors "author" output.check
1617
  format.date output
1618
  date.block
1619
  format.title "title" output.check
1620
  format.note "note" output.check
1621
  format.eprint output
1622
  format.url output
1623
  fin.entry
1624
}
1625
1626
FUNCTION {default.type} { misc }
1627
READ
1628
STRINGS { longest.label }
1629
INTEGERS { number.label longest.label.width }
1630
FUNCTION {initialize.longest.label}
1631
{ "" 'longest.label :=
1632
  #1 'number.label :=
1633
  #0 'longest.label.width :=
1634
}
1635
FUNCTION {longest.label.pass}
1636
{ number.label int.to.str$ 'label :=
1637
  number.label #1 + 'number.label :=
1638
  label width$ longest.label.width >
1639
    { label 'longest.label :=
1640
      label width$ 'longest.label.width :=
1641
    }
1642
    'skip$
1643
  if$
1644
}
1645
EXECUTE {initialize.longest.label}
1646
ITERATE {longest.label.pass}
1647
FUNCTION {begin.bib}
1648
{ preamble$ empty$
1649
    'skip$
1650
    { preamble$ write$ newline$ }
1651
  if$
1652
  "\providecommand{\newblock}{}"
1653
  write$ newline$
1654
  "\begin{thebibliography}{"  longest.label  * "}" *
1655
  write$ newline$
1656
  "\expandafter\ifx\csname url\endcsname\relax"
1657
  write$ newline$
1658
  "  \def\url#1{{\tt #1}}\fi"
1659
  write$ newline$
1660
  "\expandafter\ifx\csname urlprefix\endcsname\relax\def\urlprefix{URL }\fi"
1661
  write$ newline$
1662
  "\providecommand{\eprint}[2][]{\url{#2}}"
1663
  write$ newline$
1664
  "% Bibliography created with iopart-num v2.0"
1665
  write$ newline$
1666
  "% /biblio/bibtex/contrib/iopart-num"
1667
  write$ newline$
1668
}
1669
EXECUTE {begin.bib}
1670
EXECUTE {init.state.consts}
1671
ITERATE {call.type$}
1672
FUNCTION {end.bib}
1673
{ newline$
1674
  "\end{thebibliography}" write$ newline$
1675
}
1676
EXECUTE {end.bib}
1677
%% End of customized bst file
1678
%%
1679
%% End of file `iopart-num.bst'.