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