Debian Codegraph @

texmf-dist/bibtex/bst/hitszbeamer/hitszbeamer.bst

raw
1 %=============================================================================
2 % FileName: hitszbeamer.bst
3 % Author: 杨敬轩(Jingxuan Yang)
4 % Email: [email protected]
5 % Version: 1.0.0
6 % Modified: 杨敬轩(Jingxuan Yang)
7 % History: Yanshuo Chu,胡海星
8 % LastChange: 2020-03-17 00:01:59
9 %=============================================================================
10 %
11 ENTRY % class Entry {
12 { % public:
13 author % String author;
14 editor % String editor;
15 translator % String translator;
16 title % String title;
17 edition % String edition;
18 address % String address;
19 publisher % String publisher;
20 pages % String pages;
21 year % String year;
22 date % String date;
23 modifydate % String modifydate;
24 citedate % String citedate;
25 url % String url;
26 doi % String doi;
27 language % String language;
28 booktitle % String booktitle;
29 journal % String journal;
30 chapter % String chapter;
31 series % String series;
32 volume % String volume;
33 number % String number;
34 version % String version;
35 month % String month;
36 school % String school;
37 institution % String institution;
38 organization % String organization;
39 type % String type;
40 howpublished % String howpublished;
41 eid % String eid;
42 key % String key;
43 country % String country;
44 patentid % String patentid;
45 media % String media;
46 } { % // declare integer variables
47 required % int required; // withther the bibfield is required
48 } { % // declare String variables
49 label % String label; // label for the entry
50 mark % String mark; // mark for the entry
51 % // there is ahidden entry variable sort.key$
52 % String sort_key;
53 } % }
54 %
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 %
57 INTEGERS { % // declare global int variables
58 entry.count % static int entry_count; // number of entries
59 longest.label.width % static int longest_label_width; // width of the longest label
60 i % static int i;
61 j % static int j;
62 k % static int k;
63 } %
64 %
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 %
67 STRINGS { % // declare global String variables
68 longest.label % static String longest_label; // the longest label
69 s % static String s;
70 t % static String t;
71 } %
72 %
73 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74
75 % define global static constants
76 FUNCTION {true} {#1}
77 FUNCTION {false} {#0}
78 FUNCTION {debug.enabled} {true}
79 FUNCTION {cap.volume.en} {"Vol~"}
80 FUNCTION {cap.volume.zh} {"卷"}
81 FUNCTION {cap.edition.en} {"~ed"}
82 FUNCTION {cap.edition.zh} {"版"}
83 FUNCTION {cap.anonymous.en} {"Anon"}
84 FUNCTION {cap.anonymous.zh} {"佚名"}
85 FUNCTION {cap.no.address.en} {"[S.l.]"}
86 FUNCTION {cap.no.address.zh} {"[出版地不详]"}
87 FUNCTION {cap.no.publisher.en} {"[s.n.]"}
88 FUNCTION {cap.no.publisher.zh} {"[出版者不详]"}
89 FUNCTION {cap.et.al.en} {", et~al"}
90 FUNCTION {cap.et.al.zh} {", 等"}
91 FUNCTION {cap.translate.en} {"~trans"}
92 FUNCTION {cap.translate.zh} {"译"}
93 FUNCTION {cap.doi.url} {"http://dx.doi.org/"}
94 FUNCTION {cap.st.en} {"st"}
95 FUNCTION {cap.nd.en} {"nd"}
96 FUNCTION {cap.rd.en} {"rd"}
97 FUNCTION {cap.th.en} {"th"}
98
99 FUNCTION {cap.space} {" "}
100 FUNCTION {cap.period} {"\@. "}
101 FUNCTION {cap.comma} {"\@, "}
102 FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"}
103 FUNCTION {cap.double.slash} {" //\thinspace{}"}
104 FUNCTION {cap.dash} {"\textnormal{-}"}
105
106 % Predefined latex command used to format the style of bibitems
107 FUNCTION {env.bibbegin} { "\begin{thebibliography}" }
108 FUNCTION {env.bibend} { "\end{thebibliography}" }
109 FUNCTION {cmd.bibauthor} { "\providecommand{\bibauthor}[1]{#1}" }
110 FUNCTION {cmd.bibeditor} { "\providecommand{\bibeditor}[1]{#1}" }
111 FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" }
112 FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" }
113 FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" }
114 FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" }
115 FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{\mbox{#1}}" }
116 FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" }
117 FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" }
118 FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" }
119 FUNCTION {cmd.biborganization} { "\providecommand{\biborganization}[1]{#1}" }
120 FUNCTION {cmd.bibaddress} { "\providecommand{\bibaddress}[1]{#1}" }
121 FUNCTION {cmd.bibpublisher} { "\providecommand{\bibpublisher}[1]{#1}" }
122 FUNCTION {cmd.bibinstitution} { "\providecommand{\bibinstitution}[1]{#1}" }
123 FUNCTION {cmd.bibschool} { "\providecommand{\bibschool}[1]{#1}" }
124 FUNCTION {cmd.bibvolume} { "\providecommand{\bibvolume}[1]{#1}" }
125 FUNCTION {cmd.bibnumber} { "\providecommand{\bibnumber}[1]{#1}" }
126 FUNCTION {cmd.bibversion} { "\providecommand{\bibversion}[1]{#1}" }
127 FUNCTION {cmd.bibpages} { "\providecommand{\bibpages}[1]{#1}" }
128 FUNCTION {cmd.bibmodifydate} { "\providecommand{\bibmodifydate}[1]{#1}" }
129 FUNCTION {cmd.bibcitedate} { "\providecommand{\bibcitedate}[1]{#1}" }
130 FUNCTION {cmd.bibyear} { "\providecommand{\bibyear}[1]{#1}" }
131 FUNCTION {cmd.bibdate} { "\providecommand{\bibdate}[1]{#1}" }
132 FUNCTION {cmd.biburl} { "\providecommand{\biburl}[1]{\newline\url{#1}}" }
133
134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135 %
136 FUNCTION {log.str} { % void Entry::log_str(String value, String message)
137 debug.enabled { % if (debug_enabled == 1) {
138 "DEBUG: " swap$ * " - '" * % message = "DEBUG: " + message + " - '";
139 swap$ * % message = message + value;
140 "'" * % message = message + "'";
141 top$ % log(message);
142 } { % } else {
143 pop$ pop$ % return;
144 } if$ % }
145 } % }
146 %
147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148 %
149 FUNCTION {log.int} { % int Entry::log_int(int value, String message)
150 debug.enabled { % if (debug_enabled == 1) {
151 "DEBUG: " swap$ * " - " * % message = "DEBUG: " + message + " - ";
152 swap$ int.to.str$ * % message = message + int_to_str(value);
153 top$ % log(message);
154 } { % } else {
155 pop$ pop$ % return;
156 } if$ % }
157 } % }
158 %
159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 %
161 FUNCTION {not} { % int Entry::not(int x) {
162 { % if (x == 1) {
163 false % return false;
164 } { % } else {
165 true % return true;
166 } if$ % }
167 } % }
168 %
169 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 %
171 FUNCTION {and} { % int Entry::and(int x, int y) {
172 { % if (y == 1) {
173 skip$ % return x;
174 } { % } else {
175 pop$ false % return false;
176 } if$ % }
177 } % }
178 %
179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
180 %
181 FUNCTION {or} { % int Entry::or(int x, int y) {
182 { % if (y == 1) {
183 pop$ true % return true;
184 } { % } else {
185 skip$ % return x;
186 } if$ % }
187 } % }
188 %
189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190 % // calculate the length in characters of a string
191 % // We need this function since text.length$ is NOT
192 % // the length in characters.
193 INTEGERS {length.i} % static int length_i;
194 FUNCTION {length} { % int Entry::length(String str) {
195 duplicate$ empty$ { % if (empty(str)) {
196 pop$ #0 % return 0;
197 } { % } else {
198 #1 'length.i := % length_i = 1;
199 false % int stop = false;
200 {not} { % while (! stop) {
201 duplicate$ length.i #1 substring$ % String tmp = substring(str, length_i, 1);
202 "" = { % if (tmp == "") {
203 true % stop = true;
204 } { % } else {
205 length.i #1 + 'length.i := % length_i = length_i + 1;
206 false % stop = false;
207 } if$ % }
208 } while$ % }
209 pop$ length.i #1 - % return length_i - 1;
210 } if$ % }
211 } % }
212 %
213 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
214 %
215 FUNCTION {is.digit} { % int Entry::is_digit(String ch) {
216 chr.to.int$ % int ascii = chr_to_int(ch);
217 duplicate$ "0" chr.to.int$ < { % if (ascii < chr_to_int("0")) {
218 pop$ false % return false;
219 } { % } else {
220 "9" chr.to.int$ > { % if (ascii > chr_to_int("9")) {
221 false % return false;
222 } { % } else {
223 true % return true;
224 } if$ % }
225 } if$ % }
226 } % }
227 %
228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
229 % // test if str is a number
230 FUNCTION {is.number} { % int Entry::is_number(String str) {
231 duplicate$ empty$ not swap$ % int result = (! empty(str));
232 { duplicate$ empty$ not} { % while (! empty(str)) {
233 duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(str, 1, 1))) {
234 #2 global.max$ substring$ % str = substring(str, 2, global_max);
235 } { % } else {
236 pop$ pop$ false % result = false;
237 "" % str = "";
238 } if$ % }
239 } while$ % }
240 pop$ % return result;
241 } % }
242 %
243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
244 % // extract the number prefix of str
245 FUNCTION {extract.number} { % String Entry::extract_number(String str) {
246 duplicate$ % String suffix = str;
247 duplicate$ length swap$ % int n = length(str);
248 duplicate$ empty$ % int stop = empty(suffix);
249 { not } { % while (! stop) {
250 duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(suffix, 1, 1))) {
251 #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max);
252 duplicate$ empty$ % stop = empty(suffix);
253 } { % } else {
254 true % stop = true;
255 } if$ % }
256 } while$ % }
257 length - % int n = n - length(suffix);
258 #1 swap$ substring$ % return substring(str, 1, n);
259 } % }
260 %
261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
262 %
263 FUNCTION {get.last.chr} { % String Entry::get_last_chr(String str) {
264 duplicate$ length % int n = length(str);
265 duplicate$ #0 = { % if (n == 0) {
266 pop$ % return str;
267 } { % } else {
268 #1 substring$ % return substring(str, n, 1);
269 } if$ % }
270 } % }
271 %
272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273 %
274 FUNCTION {get.ordinal.suffix.en} { % String Entry::get_ordinal_suffix_en(String ch) {
275 duplicate$ "1" = { % if (num == "1") {
276 pop$ cap.st.en % return cap_st_en;
277 } { % } else {
278 duplicate$ "2" = { % if (num == "2") {
279 pop$ cap.nd.en % return cap_nd_en;
280 } { % } else {
281 duplicate$ "3" = { % if (num == "3") {
282 pop$ cap.rd.en % return cap_rd_en;
283 } { % } else {
284 pop$ cap.th.en % return cap_th_en;
285 } if$ % }
286 } if$ % }
287 } if$ % }
288 } % }
289 %
290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
291 %
292 FUNCTION {num.to.ordinal.en} { % String Entry::num_to_ordinal_en(String num) {
293 duplicate$ empty$ { % if (empty(num)) {
294 skip$ % return num;
295 } { % } else {
296 duplicate$ get.last.chr % String ch = get_last_chr(num);
297 get.ordinal.suffix.en % String str = get_ordinal_suffix_en(ch);
298 * % reutrn num + str;
299 } if$ % }
300 } % }
301 %
302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
303 %
304 STRINGS {remove.dots.result} % static String remove_dots_result;
305 %
306 FUNCTION {remove.dots} { % String Entry::remove_dots(String str) {
307 "" 'remove.dots.result := % remove_dots_result = "";
308 { duplicate$ empty$ not } { % while (! empty(str)) {
309 duplicate$ #1 #2 substring$ % String tmp = substring(str, 1, 2);
310 "\." = { % if (tmp == "\.") {
311 #3 global.max$ substring$ % str = substring(str, 3, global_max);
312 } { % } else {
313 duplicate$ #1 #1 substring$ % tmp = substring(str, 1, 1);
314 duplicate$ "." = { % if (tmp == ".") {
315 pop$ #2 global.max$ substring$ % str = substring(str, 2, global_max);
316 } { % } else {
317 remove.dots.result swap$ * % tmp = remove_dots_result + tmp;
318 'remove.dots.result := % remove_dots_result = tmp;
319 #2 global.max$ substring$ % str = substring(str, 2, global_max);
320 } if$ % }
321 } if$ % }
322 } while$ % }
323 pop$ remove.dots.result % return remove_dots_result;
324 } % }
325 %
326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
327 %
328 FUNCTION {add.brace} { % String Entry::add_brace(String str) {
329 "{" swap$ * "}" * % return "{" + str + "}";
330 } % }
331 %
332 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
333 %
334 FUNCTION {add.bracket} { % String Entry::bracket(String str) {
335 "(" swap$ * ")" * % return "(" + str + ")";
336 } % }
337 %
338 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
339 %
340 FUNCTION {add.squarebracket} { % String Entry::add_squarebracket(String str) {
341 "[" swap$ * "]" * % return "[" + str + "]";
342 } % }
343 %
344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345 %
346 FUNCTION {add.textit} { % String Entry::add_textit(String str) {
347 "\textit{" swap$ * "}" * % return "\textit{" + str + "}";
348 } % }
349 %
350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
351 %
352 FUNCTION {add.textbf} { % String Entry::add_textbf(String str) {
353 "\textbf{" swap$ * "}" * % return "\textbf{" + str + "}";
354 } % }
355 %
356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
357 % // test if str contains a dash '-'
358 FUNCTION {contain.dash} { % int Entry::contain_dash(String str) {
359 false swap$ % int result = false;
360 { duplicate$ empty$ not} { % while (! empty(str)) {
361 duplicate$ #1 #1 substring$ "-" = { % if (substring(str, 1, 1) == "-") {
362 pop$ pop$ true % result = true;
363 "" % str = "";
364 } { % } else {
365 #2 global.max$ substring$ % str = substring(str, 2, global_max);
366 } if$ % }
367 } while$ % }
368 pop$ % return result;
369 } % }
370 %
371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
372 % // extract the substring before the first '-'
373 % // returns the string itself if no '-'
374 FUNCTION {extract.before.first.dash} { % String Entry::extract_before_first_dash(String str) {
375 duplicate$ % String suffix = str;
376 duplicate$ length swap$ % int n = length(str);
377 duplicate$ empty$ % int stop = empty(suffix);
378 { not } { % while (! stop) {
379 duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") {
380 true % stop = true;
381 } { % } else {4r
382 #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max);
383 duplicate$ empty$ % stop = empty(suffix);
384 } if$ % }
385 } while$ % }
386 length - % int n = n - length(suffix);
387 #1 swap$ substring$ % return substring(str, 1, n);
388 } % }
389 %
390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
391 % // extract the substring after the first '-'
392 % // returns the string itself if no '-'
393 FUNCTION {extract.after.first.dash} { % String Entry::extract_after_first_dash(String str) {
394 duplicate$ % String suffix = str;
395 duplicate$ empty$ % int stop = empty(suffix);
396 { not } { % while (! stop) {
397 duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") {
398 true % stop = true;
399 } { % } else {4r
400 #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max);
401 duplicate$ empty$ % stop = empty(suffix);
402 } if$ % }
403 } while$ % }
404 duplicate$ empty$ { % if (empty(suffix)) {
405 pop$ % return str;
406 } { % } else {
407 swap$ pop$ #2 global.max$ substring$ % return substring(suffix, 2, global_max);
408 } if$ % }
409 } % }
410 %
411 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
412 % // extract the substring after the last '-'
413 % // returns the empty string if no '-'
414 FUNCTION {extract.after.last.dash} { % String Entry::extract_after_last_dash(String str) {
415 duplicate$ contain.dash not { % if (! contain_dash(str)) {
416 pop$ "" % return "";
417 } { % } else {
418 {duplicate$ contain.dash} { % while (contain_dash(str)) {
419 extract.after.first.dash % str = extract_after_first_dash(str);
420 } while$ % }
421 % return str;
422 } if$ % }
423 } % }
424 %
425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
426 %
427 FUNCTION {trim.start} { % String Entry::trim_start(String str) {
428 {duplicate$ #1 #1 substring$ " " =} { % while (substring(str, 1, 1) == " ") {
429 #2 global.max$ substring$ % str = substring(str, 2, global_max);
430 } while$ % }
431 % return str;
432 } % }
433 %
434 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
435 %
436 FUNCTION {trim.end} { % String Entry::trim_end(String str) {
437 {duplicate$ get.last.chr " " =} { % while (get_last_chr(str) == " ") {
438 duplicate$ length #1 - % int n = length(str) - 1;
439 #1 swap$ substring$ % str = substring(str, 1, n);
440 } while$ % }
441 % return str;
442 } % }
443 %
444 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
445 %
446 FUNCTION {trim} { % String Entry::trim(String str) {
447 trim.start % str = trim_start(str);
448 trim.end % return trim_end(str);
449 } % }
450 %
451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
452 %
453 FUNCTION {start.bibitem} { % void Entry::start_bibitem() {
454 newline$ % writeln();
455 "\bibitem{" cite$ * "}" * write$ % write("\bibitem{" + this.cite + "}");
456 newline$ % writeln();
457 } % }
458 %
459 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
460 %
461 FUNCTION {end.bibitem} { % void Entry::end_bibitem() {
462 cap.period write$ % write(cap_period);
463 newline$ % writeln();
464 } % }
465 %
466 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
467 %
468 FUNCTION {is.in.chinese} { % int Entry::is_in_chinese() {
469 language empty$ { % if (empty(this.language)) {
470 false % return false;
471 } { % } else {
472 language "zh" = { % if (this.language == "zh") {
473 true % return true;
474 } { % } else {
475 false % return false;
476 } if$ % }
477 } if$ % }
478 } % }
479 %
480 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
481 %
482 FUNCTION {is.online} { % int Entry::is_online() {
483 url empty$ not { % if (! empty(this.url)) {
484 true % return true;
485 } { % } else {
486 doi empty$ not { % if (! empty(this.doi)) {
487 true % return true;
488 } { % } else {
489 false % return false;
490 } if$ % }
491 } if$ % }
492 } % }
493 %
494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
495 %
496 FUNCTION {set.mark} { % void Entry::set_mark(String mark) {
497 'mark := % this.mark = mark;
498 is.online { % if (is_online()) {
499 mark "/OL" * 'mark := % this.mark = this.mark + "/OL";
500 } { % } else {
501 media empty$ not { % if (! empty(this.media)) {
502 mark "/" * media * 'mark := % this.mark = this.mark + "/" + this.media;
503 } 'skip$ if$ % }
504 } if$ % }
505 } % }
506 %
507 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
508 %
509 FUNCTION {cap.volume} { % String Entry::cap_volume() {
510 is.in.chinese { % if (is_in_chinese()) {
511 cap.volume.zh % return cap_volume_zh;
512 } { % } else {
513 cap.volume.en % return cap_volume_en;
514 } if$ % }
515 } % }
516 %
517 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
518 %
519 FUNCTION {cap.edition} { % String Entry::cap_edition() {
520 is.in.chinese { % if (is_in_chinese()) {
521 cap.edition.zh % return cap_edition_zh;
522 } { % } else {
523 cap.edition.en % return cap_edition_en;
524 } if$ % }
525 } % }
526 %
527 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
528 %
529 FUNCTION {cap.anonymous} { % String Entry::cap_anonymous() {
530 is.in.chinese { % if (is_in_chinese()) {
531 cap.anonymous.zh % return cap_anonymous_zh;
532 } { % } else {
533 cap.anonymous.en % return cap_anonymous_en;
534 } if$ % }
535 } % }
536 %
537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
538 %
539 FUNCTION {cap.no.address} { % String Entry::cap_no_address() {
540 is.in.chinese { % if (is_in_chinese()) {
541 cap.no.address.zh % return cap_no_address_zh;
542 } { % } else {
543 cap.no.address.en % return cap_no_address_en;
544 } if$ % }
545 } % }
546 %
547 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
548 %
549 FUNCTION {cap.no.publisher} { % String Entry::cap_no_publisher() {
550 is.in.chinese { % if (is_in_chinese()) {
551 cap.no.publisher.zh % return cap_no_publisher_zh;
552 } { % } else {
553 cap.no.publisher.en % return cap_no_publisher_en;
554 } if$ % }
555 } % }
556 %
557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
558 %
559 FUNCTION {cap.et.al} { % String Entry::cap_et_al() {
560 is.in.chinese { % if (is_in_chinese()) {
561 cap.et.al.zh % return cap_et_al_zh;
562 } { % } else {
563 cap.et.al.en % return cap_et_al_en;
564 } if$ % }
565 } % }
566 %
567 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
568 %
569 FUNCTION {cap.translate} { % String Entry::cap_translate() {
570 is.in.chinese { % if (is_in_chinese()) {
571 cap.translate.zh % return cap_translate_zh;
572 } { % } else {
573 cap.translate.en % return cap_translate_en;
574 } if$ % }
575 } % }
576 %
577 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
578 %
579 FUNCTION {format.bibinfo} { % String Entry::format_bibinfo(String info, String type) {
580 swap$ add.brace swap$ % info = add_brace(info);
581 "\bib" swap$ * swap$ * % return "\bib" + type + info;
582 } % }
583 %
584 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
585 INTEGERS { nameindex namecount } % static int nameindex, namecount;
586 STRINGS { namelist nameformat } % static String namelist, nameformat;
587 STRINGS { firstname lastname jrname vonname} % static String firstname, lastname, jrname, vonname;
588 %
589 FUNCTION {format.names} { % String Entry::format_names(String names) {
590 'namelist := % namelist = names;
591 namelist num.names$ 'namecount := % namecount = num_names(namelist);
592 "" % String result = "";
593 #0 'nameindex := % nameindex = 0;
594 {nameindex namecount < nameindex #3 < and} { % while ((nameindex < namecount) && (nameindex < 3)) {
595 nameindex #1 + 'nameindex := % nameindex = nameindex + 1;
596 nameindex #1 > { % if (nameindex > 1) {
597 cap.comma * % result = result + cap_comma;
598 } 'skip$ if$ % }
599 namelist nameindex "{vv}" format.name$ % String tmp = format_name(namelist, nameindex, "{vv}");
600 'vonname := % vonname = tmp;
601 namelist nameindex "{jj}" format.name$ % tmp = format_name(namelist, nameindex, "{jj}");
602 remove.dots 'jrname := % jrname = remove_dots(tmp);
603 namelist nameindex "{f}" format.name$ % tmp = format_name(namelist, nameindex, "{f}");
604 remove.dots % tmp = remove_dots(tmp);
605 'firstname := % firstname = change_case(tmp, "u");
606 namelist nameindex "{ll}" format.name$ % tmp = format_name(namelist, nameindex, "{ll}");
607 'lastname := % lastname = change_case(tmp, "u");
608 jrname empty$ not { % if (! empty(jrname)) {
609 jrname * " " * % result = result + jrname + " "
610 } 'skip$ if$ % }
611 vonname empty$ not { % if (! empty(vonname)) {
612 vonname * " " * % result = result + vonname + " "
613 } 'skip$ if$ % }
614 lastname empty$ not { % if (! empty(lastname)) {
615 lastname * " " * % result = result + lastname + " "
616 } 'skip$ if$ % }
617 firstname empty$ not { % if (! empty(firstname)) {
618 firstname * " " * % result = result + firstname + " "
619 } 'skip$ if$ % }
620 trim.end % result = trim_end(result);
621 } while$ % }
622 nameindex namecount < { % if (nameindex < namecount) {
623 cap.et.al * % result = result + cap_et_al();
624 } 'skip$ if$ % }
625 } % }
626 %
627 %
628 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
629 % // format English names
630 FUNCTION {format.names.en} { % String Entry::format_names_en(String names) {
631 format.names % format_names(names);
632 } % }
633 %
634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
635 % // format Chinese names
636 FUNCTION {format.names.zh} { % String Entry::format_names_zh(String names) {
637 format.names % format_names(names);
638 } % }
639 %
640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
641 %
642 FUNCTION {format.author} { % String Emtry::format_author(String authors) {
643 is.in.chinese { % if (is_in_chinese) {
644 format.names.zh % authors = format_names_zh(authors);
645 } { % } else {
646 format.names.en % authors = format_names_en(authors);
647 } if$ % }
648 "author" format.bibinfo % return format_bibinfo(authors, "author");
649 } % }
650 %
651 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
652 %
653 FUNCTION {format.editor} { % String Emtry::format_author(String editors) {
654 is.in.chinese { % if (is_in_chinese) {
655 format.names.zh % editors = format_names_zh(editors);
656 } { % } else {
657 format.names.en % editors = format_names_en(editors);
658 } if$ % }
659 "editor" format.bibinfo % return format_bibinfo(editors, "editor");
660 } % }
661 %
662 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
663 %
664 FUNCTION {format.translator} { % String Emtry::format_translator(String translators) {
665 is.in.chinese { % if (is_in_chinese) {
666 duplicate$ % String names = translators;
667 format.names.zh % translators = format_names_zh(translators);
668 swap$ num.names$ #3 > { % if (num_names(names) > 3) {
669 cap.translate.zh * % translators = translators + cap_translate_zh;
670 } { % } else {
671 cap.comma * cap.translate.zh * % translators = translators + cap_comma + cap_translate_zh;
672 } if$ % }
673 } { % } else {
674 duplicate$ % String names = translators;
675 format.names.en % translators = format_names_en(translators);
676 swap$ num.names$ #3 > { % if (num_names(names) > 3) {
677 cap.translate.en * % translators = translators + cap_translate_en;
678 } { % } else {
679 cap.comma * cap.translate.en * % translators = translators + cap_comma + cap_translate_en;
680 } if$ % }
681 } if$ % }
682 "translator" format.bibinfo % return format_bibinfo(translator, "translator");
683 } % }
684 %
685 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
686 %
687 FUNCTION {format.title} { % String Emtry::format_title(String title) {
688 "title" format.bibinfo % return format_bibinfo(title, "title");
689 } % }
690 %
691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
692 %
693 FUNCTION {format.booktitle} { % String Emtry::format_booktitle(String booktitle) {
694 "booktitle" format.bibinfo % return format_bibinfo(booktitle, "booktitle");
695 } % }
696 %
697 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
698 %
699 FUNCTION {format.mark} { % String Emtry::format_mark(String mark) {
700 "[" swap$ * "]" * % mark = "[" + mark + "]";
701 "mark" format.bibinfo % return format_bibinfo(mark, "mark");
702 } % }
703 %
704 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
705 %
706 FUNCTION {format.country} { % String Emtry::format_country(String country) {
707 "country" format.bibinfo % return format_bibinfo(country, "country");
708 } % }
709 %
710 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
711 %
712 FUNCTION {format.patentid} { % String Emtry::format_patentid(String patentid) {
713 "patentid" format.bibinfo % return format_bibinfo(patentid, "patentid");
714 } % }
715 %
716 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
717 %
718 FUNCTION {format.edition} { % String Emtry::format_edition(String edition) {
719 duplicate$ is.number { % if (is_number(edition)) {
720 is.in.chinese { % if (is_in_chinese()) {
721 cap.edition.zh * % edition = edition + cap_edition_zh;
722 } { % } else {
723 num.to.ordinal.en cap.edition.en * % edition = num_to_ordinal_en(edition) + cap_edition_en;
724 } if$ % }
725 } 'skip$ if$ % }
726 % // use a \mbox{} to prevent line break within edition
727 "\mbox{" swap$ * "}" * % edition = "\mbox{" + edition + "}";
728 "edition" format.bibinfo % return format_bibinfo(edition, "edition");
729 } % }
730 %
731 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
732 %
733 FUNCTION {format.organization} { % String Emtry::format_organization(String organization) {
734 "organization" format.bibinfo % return format_bibinfo(organization, "organization");
735 } % }
736 %
737 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
738 %
739 FUNCTION {format.address} { % String Emtry::format_address(String address) {
740 "address" format.bibinfo % return format_bibinfo(address, "address");
741 } % }
742 %
743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
744 %
745 FUNCTION {format.publisher} { % String Emtry::format_publisher(String publisher) {
746 "publisher" format.bibinfo % return format_bibinfo(publisher, "publisher");
747 } % }
748 %
749 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
750 %
751 FUNCTION {format.institution} { % String Emtry::format_institution(String institution) {
752 "institution" format.bibinfo % return format_bibinfo(institution, "institution");
753 } % }
754 %
755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
756 %
757 FUNCTION {format.school} { % String Emtry::format_school(String school) {
758 "school" format.bibinfo % return format_bibinfo(school, "school");
759 } % }
760 %
761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
762 %
763 FUNCTION {format.year} { % String Emtry::format_year(String year) {
764 "year" format.bibinfo % return format_bibinfo(year, "year");
765 } % }
766 %
767 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
768 %
769 FUNCTION {format.date} { % String Emtry::format_date(String date) {
770 "date" format.bibinfo % return format_bibinfo(date, "date");
771 } % }
772 %
773 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
774 %
775 FUNCTION {format.journal} { % String Emtry::format_journal(String journal) {
776 "journal" format.bibinfo % return format_bibinfo(journal, "journal");
777 } % }
778 %
779 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
780 %
781 FUNCTION {format.volume} { % String Emtry::format_volume(String volume) {
782 "volume" format.bibinfo % return format_bibinfo(volume, "volume");
783 } % }
784 %
785 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
786 %
787 FUNCTION {format.number} { % String Emtry::format_number(String number) {
788 add.bracket % number = add_bracket(number);
789 "number" format.bibinfo % return format_bibinfo(number, "number");
790 } % }
791 %
792 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
793 %
794 FUNCTION {format.report.number} { % String Emtry::format_report_number(String number) {
795 "number" format.bibinfo % return format_bibinfo(number, "number");
796 } % }
797 %
798 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
799 %
800 FUNCTION {format.version} { % String Emtry::format_version(String version) {
801 "version" format.bibinfo % return format_bibinfo(version, "version");
802 } % }
803 %
804 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
805 %
806 FUNCTION {format.pages} { % String Emtry::format_pages(String pages) {
807 "pages" format.bibinfo % return format_bibinfo(pages, "pages");
808 } % }
809 %
810 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
811 %
812 FUNCTION {format.modifydate} { % String Emtry::format_modifydate(String modifydate) {
813 add.bracket % modifydate = add_bracket(modifydate);
814 "modifydate" format.bibinfo % return format_bibinfo(modifydate, "modifydate");
815 } % }
816 %
817 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
818 %
819 FUNCTION {format.citedate} { % String Emtry::format_citedate(String citedate) {
820 add.squarebracket % citedate = add_squarebracket(citedate);
821 "citedate" format.bibinfo % return format_bibinfo(citedate, "citedate");
822 } % }
823 %
824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
825 %
826 % // NOTE: do not use the format_bibinfo() for URL,
827 % // since if the URL contains special symbols such
828 % // as '%', the \biburl{} will be broken.
829 FUNCTION {format.url} { % String Emtry::format_url(String url) {
830 "\url{" swap$ * "}" * % return "\url{" + url + "}";
831 } % }
832 %
833 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
834 %
835 FUNCTION {get.full.title} { % String Entry::get_full_title() {
836 series empty$ { % if (empty(this.series)) {
837 volume empty$ { % if (empty(this.volume)) {
838 title % return this.title;
839 } { % } else {
840 title cap.colon * cap.volume * volume * % return this.title + cap_colon + cap_volume() + this.volume;
841 } if$ % }
842 } { % } else {
843 volume empty$ { % if (empty(this.volume)) {
844 series cap.colon * title * % return this.series + cap_colon + this.title;
845 } { % } else {
846 series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume;
847 cap.colon * title * % return str + cap_colon + this.title;
848 } if$ % }
849 } if$ % }
850 } % }
851 %
852 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
853 %
854 FUNCTION {get.full.booktitle} { % String Entry::get_full_booktitle() {
855 series empty$ { % if (empty(this.series)) {
856 volume empty$ { % if (empty(this.volume)) {
857 booktitle % return this.booktitle;
858 } { % } else {
859 booktitle cap.colon * cap.volume * volume * % return this.booktitle + cap_colon + cap_volume() + this.volume;
860 } if$ % }
861 } { % } else {
862 volume empty$ { % if (empty(this.volume)) {
863 series cap.colon * booktitle * % return this.series + cap_colon + this.booktitle;
864 } { % } else {
865 series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume;
866 cap.colon * booktitle * % return str + cap_colon + this.booktitle;
867 } if$ % }
868 } if$ % }
869 } % }
870 %
871 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
872 %
873 FUNCTION {get.pages} { % String Entry::get_pages() {
874 pages contain.dash { % if (contain_dash(this.pages)) {
875 pages extract.before.first.dash % String p1 = extract_before_first_dash(this.pages);
876 pages extract.after.last.dash % String p2 = extract_after_last_dash(this.pages);
877 cap.dash swap$ * * % return p1 + cap_dash + p2;
878 } { % } else {
879 pages % return this.pages;
880 } if$ % }
881 } % }
882 %
883 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
884 %
885 FUNCTION {output.author.or.editor} { % void Entry::output_author_or_editor(int required) {
886 'required := % this.required = required;
887 author empty$ not { % if (! empty(this.author)) {
888 author format.author write$ % write(format_author(this.author));
889 cap.period write$ % write(cap_period);
890 } { % } else {
891 editor empty$ not { % if (! empty(this.editor)) {
892 editor format.editor write$ % write(format_editor(this.editor));
893 cap.period write$ % write(cap_period);
894 } { % } else {
895 required { % if (required == 1) {
896 "Require author/editor: " cite$ * warning$% warning("Require author/editor: " + this.cite);
897 cap.anonymous format.author write$ % write(format_author(cap_anonymous()));
898 cap.period write$ % write(cap_period);
899 } 'skip$ if$ % }
900 } if$ % }
901 } if$ % }
902 } % }
903 %
904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
905 %
906 FUNCTION {output.author} { % void Entry::output_author(int required) {
907 'required := % this.required = required;
908 author empty$ not { % if (! empty(this.author)) {
909 author format.author write$ % write(format_author(this.author));
910 cap.period write$ % write(cap_period);
911 } { % } else {
912 required { % if (required == 1) {
913 "Require author: " cite$ * warning$ % warning("Require author: " + this.cite);
914 cap.anonymous format.author write$ % write(format_author(cap_anonymous()));
915 cap.period write$ % write(cap_period);
916 } 'skip$ if$ % }
917 } if$ % }
918 } % }
919 %
920 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
921 %
922 FUNCTION {output.editor} { % void Entry::output_editor(int required) {
923 'required := % this.required = required;
924 editor empty$ not { % if (! empty(this.editor)) {
925 editor format.editor write$ % write(format_editor(this.editor));
926 cap.period write$ % write(cap_period);
927 } { % } else {
928 required { % if (required == 1) {
929 "Require editor: " cite$ * warning$ % warning("Require editor: " + this.cite);
930 cap.anonymous format.editor write$ % write(format_editor(cap_anonymous()));
931 cap.period write$ % write(cap_period);
932 } 'skip$ if$ % }
933 } if$ % }
934 } % }
935 %
936 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
937 %
938 FUNCTION {output.title} { % void Entry::output_title(int required) {
939 'required := % this.required = required;
940 title empty$ not { % if (! empty(this.title)) {
941 title format.title write$ % write(format_title(this.title));
942 } { % } else {
943 required { % if (required == 1) {
944 "Require title: " cite$ * warning$ % warning("Require title: " + this.cite);
945 } 'skip$ if$ % }
946 } if$ % }
947 } % }
948 %
949 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
950 %
951 FUNCTION {output.series.volume.title} { % void Entry::output_series_volume_title(int required) {
952 'required := % this.required = required;
953 title empty$ not { % if (! empty(this.title)) {
954 get.full.title format.booktitle write$ % write(format_booktitle(get_full_title()));
955 } { % } else {
956 required { % if (required == 1) {
957 "Require title: " cite$ * warning$ % warning("Require title: " + this.cite);
958 } 'skip$ if$ % }
959 } if$ % }
960 } % }
961 %
962 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
963 %
964 FUNCTION {output.series.volume.booktitle} { % void Entry::output_series_volume_booktitle(int required) {
965 'required := % this.required = required;
966 booktitle empty$ not { % if (! empty(this.booktitle)) {
967 get.full.booktitle format.booktitle write$ % write(format_booktitle(get_full_booktitle());
968 } { % } else {
969 required { % if (required == 1) {
970 "Require booktitle: " cite$ * warning$ % warning("Require booktitle: " + this.cite);
971 } 'skip$ if$ % }
972 } if$ % }
973 } % }
974 %
975 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
976 %
977 FUNCTION {output.journal} { % void Entry::output_journal(int required) {
978 'required := % this.required = required;
979 journal empty$ not { % if (! empty(this.journal)) {
980 cap.period write$ % write(cap_period);
981 journal format.journal write$ % write(format_journal(this.journal));
982 } { % } else {
983 required { % if (required == 1) {
984 "Require journal: " cite$ * warning$ % warning("Require journal: " + this.cite);
985 } 'skip$ if$ % }
986 } if$ % }
987 } % }
988 %
989 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
990 %
991 FUNCTION {output.mark} { % void Entry::output_mark(int required) {
992 'required := % this.required = required;
993 mark empty$ not { % if (! empty(this.mark)) {
994 mark format.mark write$ % write(format_mark(this.mark));
995 } { % } else {
996 required { % if (required == 1) {
997 "Require mark: " cite$ * warning$ % warning("Require mark: " + this.cite);
998 } 'skip$ if$ % }
999 } if$ % }
1000 } % }
1001 %
1002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1003 %
1004 FUNCTION {output.translator} { % void Entry::output_translator(int required) {
1005 'required := % this.required = required;
1006 translator empty$ not { % if (! empty(this.translator)) {
1007 cap.period write$ % write(cap_period);
1008 translator format.translator write$ % write(format_translator(this.translator));
1009 } { % } else {
1010 required { % if (required == 1) {
1011 "Require translator: " cite$ * warning$ % warning("Require translator: " + this.cite);
1012 } 'skip$ if$ % }
1013 } if$ % }
1014 } % }
1015 %
1016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1017 %
1018 FUNCTION {output.edition} { % void Entry::output_edition(int required) {
1019 'required := % this.required = required;
1020 edition empty$ not { % if (! empty(this.edition)) {
1021 cap.period write$ % write(cap_period);
1022 edition format.edition write$ % write(format_edition(this.edition));
1023 } { % } else {
1024 required { % if (required == 1) {
1025 "Require edition: " cite$ * warning$ % warning("Require edition: " + this.cite);
1026 } 'skip$ if$ % }
1027 } if$ % }
1028 } % }
1029 %
1030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1031 %
1032 FUNCTION {output.address} { % void Entry::output_address(int required) {
1033 'required := % this.required = required;
1034 address empty$ not { % if (! empty(this.address)) {
1035 cap.period write$ % write(cap_period);
1036 address format.address write$ % write(format_address(this.address));
1037 } { % } else {
1038 required { % if (required == 1) {
1039 "Require address: " cite$ * warning$ % warning("Require address: " + this.cite);
1040 cap.period write$ % write(cap_period);
1041 cap.no.address format.address write$ % write(format_address(cap_no_address()));
1042 } 'skip$ if$ % }
1043 } if$ % }
1044 } % }
1045 %
1046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1047 %
1048 FUNCTION {output.inproaddress} { % void Entry::output_inproaddress(int required) {
1049 'required := % this.required = required;
1050 address empty$ not { % if (! empty(this.address)) {
1051 cap.comma write$ % write(cap_comma);
1052 address format.address write$ % write(format_address(this.address));
1053 } { % } else {
1054 required { % if (required == 1) {
1055 "Require address: " cite$ * warning$ % warning("Require address: " + this.cite);
1056 cap.comma write$ % write(cap_comma);
1057 cap.no.address format.address write$ % write(format_address(cap_no_address()));
1058 } 'skip$ if$ % }
1059 } if$ % }
1060 } % }
1061 %
1062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1063 %
1064 FUNCTION {output.publisher} { % void Entry::output_publisher(int required) {
1065 'required := % this.required = required;
1066 publisher empty$ not { % if (! empty(this.publisher)) {
1067 cap.colon write$ % write(cap_colon);
1068 publisher format.publisher write$ % write(format_publisher(this.publisher));
1069 } { % } else {
1070 required { % if (required == 1) {
1071 "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite);
1072 cap.colon write$ % write(cap_colon);
1073 cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher()));
1074 } 'skip$ if$ % }
1075 } if$ % }
1076 } % }
1077 %
1078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1079 %
1080 FUNCTION {output.publisher.no.address} { % void Entry::output_publisher_no_address(int required) {
1081 'required := % this.required = required;
1082 publisher empty$ not { % if (! empty(this.publisher)) {
1083 cap.period write$ % write(cap_period);
1084 publisher format.publisher write$ % write(format_publisher(this.publisher));
1085 } { % } else {
1086 required { % if (required == 1) {
1087 "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite);
1088 cap.period write$ % write(cap_period);
1089 cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher()));
1090 } 'skip$ if$ % }
1091 } if$ % }
1092 } % }
1093 %
1094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1095 %
1096 FUNCTION {output.school} { % void Entry::output_school(int required) {
1097 'required := % this.required = required;
1098 school empty$ not { % if (! empty(this.school)) {
1099 cap.colon write$ % write(cap_colon);
1100 school format.school write$ % write(format_school(this.school));
1101 } { % } else {
1102 required { % if (required == 1) {
1103 "Require school: " cite$ * warning$ % warning("Require publisher: " + this.cite);
1104 cap.colon write$ % write(cap_colon);
1105 cap.no.publisher format.school write$ % write(format_school(cap_no_publisher()));
1106 } 'skip$ if$ % }
1107 } if$ % }
1108 } % }
1109 %
1110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1111 %
1112 FUNCTION {output.institution} { % void Entry::output_institution(int required) {
1113 'required := % this.required = required;
1114 institution empty$ not { % if (! empty(this.institution)) {
1115 cap.colon write$ % write(cap_colon);
1116 institution format.institution write$ % write(format_publisher(this.institution));
1117 } { % } else {
1118 required { % if (required == 1) {
1119 "Require institution: " cite$ * warning$ % warning("Require institution: " + this.cite);
1120 cap.colon write$ % write(cap_colon);
1121 cap.no.publisher format.institution write$ % write(format_institution(cap_no_publisher()));
1122 } 'skip$ if$ % }
1123 } if$ % }
1124 } % }
1125 %
1126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1127 %
1128 FUNCTION {output.year} { % void Entry::output_year(int required) {
1129 'required := % this.required = required;
1130 year empty$ not { % if (! empty(this.year)) {
1131 year format.year write$ % write(format_year(this.year));
1132 } { % } else {
1133 required { % if (required == 1) {
1134 "Require year: " cite$ * warning$ % warning("Require year: " + this.cite);
1135 } 'skip$ if$ % }
1136 } if$ % }
1137 } % }
1138 %
1139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1140 %
1141 FUNCTION {output.pages} { % void Entry::output_pages(int required) {
1142 'required := % this.required = required;
1143 pages empty$ not { % if (! empty(this.pages)) {
1144 cap.colon write$ % write(cap_colon);
1145 get.pages format.pages write$ % write(format_pages(get_pages()));
1146 } { % } else {
1147 required { % if (required == 1) {
1148 "Require pages: " cite$ * warning$ % warning("Require pages: " + this.cite);
1149 } 'skip$ if$ % }
1150 } if$ % }
1151 } % }
1152 %
1153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1154 %
1155 FUNCTION {output.modifydate} { % void Entry::output_modifydate(int required) {
1156 'required := % this.required = required;
1157 modifydate empty$ not { % if (! empty(this.modifydate)) {
1158 cap.space write$ % write(cap_space);
1159 modifydate format.modifydate write$ % write(format_modifydate(this.modifydate));
1160 } { % } else {
1161 required { % if (required == 1) {
1162 "Require modifydate: " cite$ * warning$ % warning("Require modifydate: " + this.cite);
1163 } 'skip$ if$ % }
1164 } if$ % }
1165 } % }
1166 %
1167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1168 %
1169 FUNCTION {output.citedate} { % void Entry::output_citedate(int required) {
1170 'required := % this.required = required;
1171 citedate empty$ not { % if (! empty(this.citedate)) {
1172 cap.space write$ % write(cap_space);
1173 citedate format.citedate write$ % write(format_citedate(this.citedate));
1174 } { % } else {
1175 required is.online or { % if ((required == 1) || (is_online())) {
1176 "Require citedate: " cite$ * warning$ % warning("Require citedate: " + this.cite);
1177 } 'skip$ if$ % }
1178 } if$ % }
1179 } % }
1180 %
1181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1182 %
1183 FUNCTION {output.date} { % void Entry::output_date(int required) {
1184 'required := % this.required = required;
1185 date empty$ not { % if (! empty(this.date)) {
1186 date format.date write$ % write(format_date(this.date));
1187 } { % } else {
1188 required { % if (required == 1) {
1189 "Require date: " cite$ * warning$ % warning("Require date: " + this.cite);
1190 } 'skip$ if$ % }
1191 } if$ % }
1192 } % }
1193 %
1194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1195 %
1196 FUNCTION {output.volume} { % void Entry::output_volume(int required) {
1197 'required := % this.required = required;
1198 volume empty$ not { % if (! empty(this.volume)) {
1199 cap.comma write$ % write(cap_comma);
1200 volume format.volume write$ % write(format_volume(this.volume));
1201 } { % } else {
1202 required { % if (required == 1) {
1203 "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite);
1204 } 'skip$ if$ % }
1205 } if$ % }
1206 } % }
1207 %
1208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1209 %
1210 FUNCTION {output.number} { % void Entry::output_number(int required) {
1211 'required := % this.required = required;
1212 number empty$ not { % if (! empty(this.number)) {
1213 number format.number write$ % write(format_number(this.number));
1214 } { % } else {
1215 required { % if (required == 1) {
1216 "Require number: " cite$ * warning$ % warning("Require number: " + this.cite);
1217 } 'skip$ if$ % }
1218 } if$ % }
1219 } % }
1220 %
1221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1222 %
1223 FUNCTION {output.report.number} { % void Entry::output_report_number(int required) {
1224 'required := % this.required = required;
1225 number empty$ not { % if (! empty(this.number)) {
1226 cap.colon write$ % write(cap_colon);
1227 number format.report.number write$ % write(format_report_number(this.number));
1228 } { % } else {
1229 required { % if (required == 1) {
1230 "Require number: " cite$ * warning$ % warning("Require number: " + this.cite);
1231 } 'skip$ if$ % }
1232 } if$ % }
1233 } % }
1234 %
1235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1236 %
1237 FUNCTION {output.country} { % void Entry::output_country(int required) {
1238 'required := % this.required = required;
1239 country empty$ not { % if (! empty(this.country)) {
1240 cap.colon write$ % write(cap_colon);
1241 country format.country write$ % write(format_country(this.country));
1242 } { % } else {
1243 required { % if (required == 1) {
1244 "Require country: " cite$ * warning$ % warning("Require country: " + this.cite);
1245 } 'skip$ if$ % }
1246 } if$ % }
1247 } % }
1248 %
1249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1250 %
1251 FUNCTION {output.patentid} { % void Entry::output_patentid(int required) {
1252 'required := % this.required = required;
1253 patentid empty$ not { % if (! empty(this.patentid)) {
1254 cap.comma write$ % write(cap_comma);
1255 patentid format.patentid write$ % write(format_patentid(this.patentid));
1256 } { % } else {
1257 required { % if (required == 1) {
1258 "Require patentid: " cite$ * warning$ % warning("Require patentid: " + this.cite);
1259 } 'skip$ if$ % }
1260 } if$ % }
1261 } % }
1262 %
1263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1264 %
1265 FUNCTION {output.start.year} { % void Entry::output_start_year(int required) {
1266 'required := % this.required = required;
1267 year empty$ not { % if (! empty(this.year)) {
1268 year extract.before.first.dash % String str = extract_before_first_dash(this.year);
1269 format.year write$ % write(format_year(str));
1270 } { % } else {
1271 required { % if (required == 1) {
1272 "Require year: " cite$ * warning$ % warning("Require year: " + this.cite);
1273 } 'skip$ if$ % }
1274 } if$ % }
1275 } % }
1276 %
1277 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1278 %
1279 FUNCTION {output.start.volume} { % void Entry::output_start_volume(int required) {
1280 'required := % this.required = required;
1281 volume empty$ not { % if (! empty(this.volume)) {
1282 cap.comma write$ % write(cap_comma);
1283 volume extract.before.first.dash % String str = extract_before_first_dash(this.volume);
1284 format.volume write$ % write(format_volume(str));
1285 } { % } else {
1286 required { % if (required == 1) {
1287 "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite);
1288 } 'skip$ if$ % }
1289 } if$ % }
1290 } % }
1291 %
1292 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1293 %
1294 FUNCTION {output.start.number} { % void Entry::output_start_number(int required) {
1295 'required := % this.required = required;
1296 number empty$ not { % if (! empty(this.number)) {
1297 number extract.before.first.dash % String str = extract_before_first_dash(this.number);
1298 format.number write$ % write(format_number(str));
1299 } { % } else {
1300 required { % if (required == 1) {
1301 "Require number: " cite$ * warning$ % warning("Require number: " + this.cite);
1302 } 'skip$ if$ % }
1303 } if$ % }
1304 } % }
1305 %
1306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1307 %
1308 FUNCTION {output.end.year} { % void Entry::output_end_year(int required) {
1309 'required := % this.required = required;
1310 year empty$ not { % if (! empty(this.year)) {
1311 year extract.after.last.dash % String str = extract_after_last_dash(this.year);
1312 format.year write$ % write(format_year(str));
1313 } { % } else {
1314 required { % if (required == 1) {
1315 "Require year: " cite$ * warning$ % warning("Require year: " + this.cite);
1316 } 'skip$ if$ % }
1317 } if$ % }
1318 } % }
1319 %
1320 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1321 %
1322 FUNCTION {output.end.volume} { % void Entry::output_end_volume(int required) {
1323 'required := % this.required = required;
1324 volume empty$ not { % if (! empty(this.volume)) {
1325 cap.comma write$ % write(cap_comma);
1326 volume extract.after.last.dash % String str = extract_after_last_dash(this.volume);
1327 format.volume write$ % write(format_volume(str));
1328 } { % } else {
1329 required { % if (required == 1) {
1330 "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite);
1331 } 'skip$ if$ % }
1332 } if$ % }
1333 } % }
1334 %
1335 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1336 %
1337 FUNCTION {output.end.number} { % void Entry::output_end_number(int required) {
1338 'required := % this.required = required;
1339 number empty$ not { % if (! empty(this.number)) {
1340 number extract.after.last.dash % String str = extract_after_last_dash(this.number);
1341 format.number write$ % write(format_number(str));
1342 } { % } else {
1343 required { % if (required == 1) {
1344 "Require number: " cite$ * warning$ % warning("Require number: " + this.cite);
1345 } 'skip$ if$ % }
1346 } if$ % }
1347 } % }
1348 %
1349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1350 %
1351 FUNCTION {output.url.or.doi} { % void Entry::output_url_or_doi(int required) {
1352 'required := % this.required = required;
1353 url empty$ not { % if (! empty(this.url)) {
1354 cap.period write$ % write(cap_period);
1355 url format.url write$ % write(format_url(this.url));
1356 } { % } else {
1357 doi empty$ not { % if (! empty(this.doi)) {
1358 cap.period write$ % write(cap_period);
1359 cap.doi.url doi * format.url write$ % write(format_url(cap_doi_url + this.doi));
1360 } { % } else {
1361 required { % if (required == 1) {
1362 "Require URL or DOI: " cite$ * warning$ % warning("Require URL or DOI: " + this.cite);
1363 } 'skip$ if$ % }
1364 } if$ % }
1365 } if$ % }
1366 } % }
1367 %
1368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1369 %
1370 FUNCTION {output.url} { % void Entry::output_url(int required) {
1371 'required := % this.required = required;
1372 url empty$ not { % if (! empty(this.url)) {
1373 cap.period write$ % write(cap_period);
1374 url format.url write$ % write(format_url(this.url));
1375 } { % } else {
1376 required { % if (required == 1) {
1377 "Require URL: " cite$ * warning$ % warning("Require URL: " + this.cite);
1378 } 'skip$ if$ % }
1379 } if$ % }
1380 } % }
1381 %
1382 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1383 %
1384 FUNCTION {output.version} { % void Entry::output_version(int required) {
1385 'required := % this.required = required;
1386 version empty$ not { % if (! empty(this.version)) {
1387 cap.period write$ % write(cap_period);
1388 version format.version write$ % write(format_version(this.version));
1389 } { % } else {
1390 required { % if (required == 1) {
1391 "Require version: " cite$ * warning$ % warning("Require version: " + this.cite);
1392 } 'skip$ if$ % }
1393 } if$ % }
1394 } % }
1395 %
1396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1397 %
1398 FUNCTION {book.impl} { % void Entry::book_impl() {
1399 start.bibitem % start_bibitem();
1400 true output.author.or.editor % output_author_or_editor(true);
1401 true output.series.volume.title % output_series_volume_title(true);
1402 true output.mark % output_mark(true);
1403 false output.translator % output_translator(false);
1404 false output.edition % output_edition(false);
1405 publisher empty$ not { % if (! empty(this.publisher)) {
1406 true output.address % output_address(true);
1407 true output.publisher % output_publisher(true);
1408 cap.comma write$ % write(cap_comma);
1409 } { % } else {
1410 cap.period write$ % write(cap_period);
1411 } if$ % }
1412 true output.year % output_year(true);
1413 false output.pages % output_pages(false);
1414 false output.citedate % output_citedate(false);
1415 false output.url.or.doi % output_url_or_doi(false);
1416 end.bibitem % end_bibitem();
1417 } % }
1418 %
1419 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1420 %
1421 FUNCTION {book} { % void Entry::book() {
1422 "M" set.mark % set_mark("M");
1423 book.impl % book_impl();
1424 } % }
1425 %
1426 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1427 %
1428 FUNCTION {collection} { % void Entry::collection() {
1429 "G" set.mark % set_mark("G");
1430 book.impl % book_impl();
1431 } % }
1432 %
1433 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1434 %
1435 FUNCTION {proceedings} { % void Entry::proceedings() {
1436 "C" set.mark % set_mark("C");
1437 start.bibitem % start_bibitem();
1438 true output.editor % output_editor(true);
1439 true output.series.volume.title % output_series_volume_title(true);
1440 true output.mark % output_mark(true);
1441 false output.translator % output_translator(false);
1442 false output.edition % output_edition(false);
1443 publisher empty$ not { % if (! empty(this.publisher)) {
1444 true output.address % output_address(true);
1445 true output.publisher % output_publisher(true);
1446 cap.comma write$ % write(cap_comma);
1447 } { % } else {
1448 cap.period write$ % write(cap_period);
1449 } if$ % }
1450 true output.year % output_year(true);
1451 false output.pages % output_pages(false);
1452 false output.citedate % output_citedate(false);
1453 false output.url.or.doi % output_url_or_doi(false);
1454 end.bibitem % end_bibitem();
1455 } % }
1456 %
1457 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1458 %
1459 FUNCTION {conference} { % void Entry::conference() {
1460 proceedings % proceedings();
1461 } % }
1462 %
1463 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1464 %
1465 FUNCTION {thesis.impl} { % void Entry::thesis_impl() {
1466 start.bibitem % start_bibitem();
1467 true output.author % output_author(true);
1468 true output.title % output_title(true);
1469 true output.mark % output_mark(true);
1470 false output.translator % output_translator(false);
1471 true output.address % output_address(true);
1472 true output.school % output_school(true);
1473 cap.comma write$ % write(cap_comma);
1474 true output.year % output_year(true);
1475 false output.pages % output_pages(false);
1476 false output.citedate % output_citedate(false);
1477 false output.url.or.doi % output_url_or_doi(false);
1478 end.bibitem % end_bibitem();
1479 } % }
1480 %
1481 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1482 %
1483 FUNCTION {phdthesis} { % void Entry::phdthesis() {
1484 "D" set.mark % set_mark("D");
1485 thesis.impl % thesis_impl();
1486 } % }
1487 %
1488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1489 %
1490 FUNCTION {masterthesis} { % void Entry::masterthesis() {
1491 "D" set.mark % set_mark("D");
1492 thesis.impl % thesis_impl();
1493 } % }
1494 %
1495 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1496 %
1497 FUNCTION {bachelorthesis} { % void Entry::bachelorthesis() {
1498 "D" set.mark % set_mark("D");
1499 thesis.impl % thesis_impl();
1500 } % }
1501 %
1502 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1503 %
1504 FUNCTION {techreport} { % void Entry::techreport() {
1505 "R" set.mark % set_mark("R");
1506 start.bibitem % start_bibitem();
1507 true output.author % output_author(true);
1508 true output.title % output_title(true);
1509 false output.report.number % output_report_number(false);
1510 true output.mark % output_mark(true);
1511 false output.translator % output_translator(false);
1512 false output.edition % output_edition(false);
1513 false output.version % output_version(false);
1514 institution empty$ not { % if (! empty(this.institution)) {
1515 true output.address % output_address(true);
1516 true output.institution % output_institution(true);
1517 cap.comma write$ % write(cap_comma);
1518 } { % } else {
1519 cap.period write$ % write(cap_period);
1520 } if$ % }
1521 true output.year % output_year(true);
1522 false output.pages % output_pages(false);
1523 false output.citedate % output_citedate(false);
1524 false output.url.or.doi % output_url_or_doi(false);
1525 end.bibitem % end_bibitem();
1526 } % }
1527 %
1528 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1529 %
1530 FUNCTION {standard} { % void Entry::standard() {
1531 "S" set.mark % set_mark("S");
1532 start.bibitem % start_bibitem();
1533 true output.author % output_author(true);
1534 true output.title % output_title(true);
1535 true output.mark % output_mark(true);
1536 false output.translator % output_translator(false);
1537 false output.edition % output_edition(false);
1538 publisher empty$ not { % if (! empty(this.publisher)) {
1539 true output.address % output_address(true);
1540 true output.publisher % output_publisher(true);
1541 cap.comma write$ % write(cap_comma);
1542 } { % } else {
1543 cap.period write$ % write(cap_period);
1544 } if$ % }
1545 true output.year % output_year(true);
1546 false output.pages % output_pages(false);
1547 false output.citedate % output_citedate(false);
1548 false output.url.or.doi % output_url_or_doi(false);
1549 end.bibitem % end_bibitem();
1550 } % }
1551 %
1552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1553 %
1554 FUNCTION {reference} { % void Entry::reference() {
1555 "K" set.mark % set_mark("K");
1556 start.bibitem % start_bibitem();
1557 false output.author.or.editor % output_author_or_editor(false);
1558 true output.series.volume.title % output_series_volume_title(true);
1559 true output.mark % output_mark(true);
1560 false output.translator % output_translator(false);
1561 false output.edition % output_edition(false);
1562 publisher empty$ not { % if (! empty(this.publisher)) {
1563 true output.address % output_address(true);
1564 true output.publisher % output_publisher(true);
1565 cap.comma write$ % write(cap_comma);
1566 } { % } else {
1567 cap.period write$ % write(cap_period);
1568 } if$ % }
1569 true output.year % output_year(true);
1570 false output.pages % output_pages(false);
1571 false output.citedate % output_citedate(false);
1572 false output.url.or.doi % output_url_or_doi(false);
1573 end.bibitem % end_bibitem();
1574 } % }
1575 %
1576 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1577 %
1578 FUNCTION {manual} { % void Entry::manual() {
1579 reference % reference();
1580 } % }
1581 %
1582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1583 %
1584 FUNCTION {periodical.impl} { % void Entry::periodical_impl() {
1585 start.bibitem % start_bibitem();
1586 false output.editor % output_editor(false);
1587 true output.title % output_title(true);
1588 true output.mark % output_mark(true);
1589 cap.period write$ % write(cap_period);
1590 true output.start.year % output_start_year(true);
1591 false output.start.volume % output_start_volume(false);
1592 false output.start.number % output_start_number(false);
1593 cap.dash write$ % write(cap_dash);
1594 year contain.dash { % if (contain_dash(this.year)) {
1595 true output.end.year % output_end_year(true);
1596 false output.end.volume % output_end_volume(false);
1597 false output.end.number % output_end_number(false);
1598 } 'skip$ if$ % }
1599 publisher empty$ not { % if (! empty(this.publisher)) {
1600 true output.address % output_address(true);
1601 true output.publisher % output_publisher(true);
1602 cap.comma write$ % write(cap_comma);
1603 } { % } else {
1604 cap.period write$ % write(cap_period);
1605 } if$ % }
1606 true output.start.year % output_start_year(true);
1607 cap.dash write$ % write(cap_dash);
1608 year contain.dash { % if (contain_dash(this.year)) {
1609 true output.end.year % output_end_year(true);
1610 } 'skip$ if$ % }
1611 false output.citedate % output_citedate(false);
1612 false output.url.or.doi % output_url_or_doi(false);
1613 end.bibitem % end_bibitem();
1614 } % }
1615 %
1616 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1617 %
1618 FUNCTION {periodical} { % void Entry::periodical() {
1619 "J" set.mark % set_mark("J");
1620 periodical.impl % periodical_impl();
1621 } % }
1622 %
1623 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1624 %
1625 FUNCTION {newspaper} { % void Entry::newspaper() {
1626 "N" set.mark % set_mark("N");
1627 periodical.impl % periodical_impl();
1628 } % }
1629 %
1630 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1631 %
1632 FUNCTION {patent} { % void Entry::patent() {
1633 "P" set.mark % set_mark("P");
1634 start.bibitem % start_bibitem();
1635 true output.author % output_author(true);
1636 true output.title % output_title(true);
1637 true output.country % output_country(true);
1638 true output.patentid % output_patentid(true);
1639 true output.mark % output_mark(true);
1640 cap.period write$ % write(cap_period);
1641 true output.date % output_date(true);
1642 false output.citedate % output_citedate(false);
1643 false output.url.or.doi % output_url_or_doi(false);
1644 end.bibitem % end_bibitem();
1645 } % }
1646 %
1647 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1648 %
1649 FUNCTION {online} { % void Entry::online() {
1650 "EB" set.mark % set_mark("EB");
1651 start.bibitem % start_bibitem();
1652 false output.author % output_author(false);
1653 true output.title % output_title(true);
1654 true output.mark % output_mark(true);
1655 publisher empty$ not { % if (! empty(this.publisher)) {
1656 address empty$ not { % if (! empty(this.address)) {
1657 true output.address % output_address(true);
1658 true output.publisher % output_publisher(true);
1659 cap.comma write$ % write(cap_comma);
1660 } { % } else {
1661 true output.publisher.no.address % output_publisher_no_address(true);
1662 cap.comma write$ % write(cap_comma);
1663 } if$ % }
1664 } { % } else {
1665 cap.period write$ % write(cap_period);
1666 } if$ % }
1667 true output.year % output_year(true);
1668 false output.modifydate % output_modifydate(false);
1669 true output.citedate % output_citedate(true);
1670 true output.url % output_url(true);
1671 end.bibitem % end_bibitem();
1672 } % }
1673 %
1674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1675 %
1676 FUNCTION {webpage} { % void Entry::online() {
1677 online % online();
1678 } % }
1679 %
1680 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1681 %
1682 FUNCTION {program.impl} { % void Entry::program_impl() {
1683 start.bibitem % start_bibitem();
1684 false output.author % output_author(false);
1685 true output.title % output_title(true);
1686 true output.mark % output_mark(true);
1687 publisher empty$ not { % if (! empty(this.publisher)) {
1688 true output.address % output_address(true);
1689 true output.publisher % output_publisher(true);
1690 cap.comma write$ % write(cap_comma);
1691 } { % } else {
1692 cap.period write$ % write(cap_period);
1693 } if$ % }
1694 true output.year % output_year(true);
1695 false output.citedate % output_citedate(false);
1696 false output.url.or.doi % output_url_or_doi(false);
1697 end.bibitem % end_bibitem();
1698 } % }
1699 %
1700 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1701 %
1702 FUNCTION {program} { % void Entry::program() {
1703 "CP" set.mark % set_mark("CP");
1704 program.impl % program_impl();
1705 } % }
1706 %
1707 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1708 %
1709 FUNCTION {database} { % void Entry::database() {
1710 "DB" set.mark % set_mark("DB");
1711 program.impl % program_impl();
1712 } % }
1713 %
1714 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1715 %
1716 FUNCTION {unpublished} { % void Entry::unpublished() {
1717 "H" set.mark % set_mark("H");
1718 start.bibitem % start_bibitem();
1719 true output.author % output_author(true);
1720 true output.title % output_title(true);
1721 true output.mark % output_mark(true);
1722 cap.period write$ % write(cap_period);
1723 true output.year % output_year(true);
1724 false output.citedate % output_citedate(false);
1725 false output.url.or.doi % output_url_or_doi(false);
1726 end.bibitem % end_bibitem();
1727 } % }
1728 %
1729 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1730 %
1731 FUNCTION {manuscript} { % void Entry::manuscript() {
1732 unpublished % unpublished();
1733 } % }
1734 %
1735 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1736 %
1737 FUNCTION {inbook.impl} { % void Entry::inbook_impl() {
1738 start.bibitem % start_bibitem();
1739 true output.author % output_author(true);
1740 true output.title % output_title(true);
1741 true output.mark % output_mark(true);
1742 false output.translator % output_translator(false);
1743 cap.double.slash write$ % write(cap_double_slash);
1744 false output.editor % output_editor(false);
1745 true output.series.volume.booktitle % output_series_volume_booktitle(true);
1746 false output.edition % output_edition(false);
1747 publisher empty$ not { % if (! empty(this.publisher)) {
1748 true output.address % output_address(true);
1749 true output.publisher % output_publisher(true);
1750 cap.comma write$ % write(cap_comma);
1751 } { % } else {
1752 cap.period write$ % write(cap_period);
1753 } if$ % }
1754 true output.year % output_year(true);
1755 false output.pages % output_pages(false);
1756 false output.citedate % output_citedate(false);
1757 false output.url.or.doi % output_url_or_doi(false);
1758 end.bibitem % end_bibitem();
1759 } % }
1760 %
1761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1762 %
1763 FUNCTION {inproceedings.impl} { % void Entry::inproceedings_impl() {
1764 start.bibitem % start_bibitem();
1765 true output.author % output_author(true);
1766 true output.title % output_title(true);
1767 true output.mark % output_mark(true);
1768 false output.translator % output_translator(false);
1769 cap.double.slash write$ % write(cap_double_slash);
1770 false output.editor % output_editor(false);
1771 true output.series.volume.booktitle % output_series_volume_booktitle(true);
1772 false output.edition % output_edition(false);
1773 publisher empty$ not { % if (! empty(this.publisher)) {
1774 true output.inproaddress % output_inproaddress(true);
1775 true output.publisher % output_publisher(true);
1776 cap.comma write$ % write(cap_comma);
1777 } { % } else {
1778 true output.inproaddress % output_inproaddress(true);
1779 cap.comma write$ % write(cap_comma);
1780 } if$ % }
1781 true output.year % output_year(true);
1782 false output.pages % output_pages(false);
1783 false output.citedate % output_citedate(false);
1784 false output.url.or.doi % output_url_or_doi(false);
1785 end.bibitem % end_bibitem();
1786 } % }
1787 %
1788 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1789 %
1790 FUNCTION {inbook} { % void Entry::inbook() {
1791 "M" set.mark % set_mark("M");
1792 inbook.impl % inbook_impl();
1793 } % }
1794 %
1795 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1796 %
1797 FUNCTION {incollection} { % void Entry::incollection() {
1798 "G" set.mark % set_mark("G");
1799 inbook.impl % inbook_impl();
1800 } % }
1801 %
1802 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1803 %
1804 FUNCTION {inproceedings} { % void Entry::inproceedings() {
1805 "C" set.mark % set_mark("C");
1806 inproceedings.impl % inproceedings_impl();
1807 } % }
1808 %
1809 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1810 %
1811 FUNCTION {article} { % void Entry::article() {
1812 "J" set.mark % set_mark("J");
1813 start.bibitem % start_bibitem();
1814 true output.author % output_author(true);
1815 true output.title % output_title(true);
1816 true output.mark % output_mark(true);
1817 true output.journal % output_journal(true);
1818 cap.comma write$ % write(cap_comma);
1819 true output.year % output_year(true);
1820 false output.volume % output_volume(false);
1821 false output.number % output_number(false);
1822 false output.pages % output_pages(false);
1823 false output.citedate % output_citedate(false);
1824 false output.url.or.doi % output_url_or_doi(false);
1825 end.bibitem % end_bibitem();
1826 } % }
1827 %
1828 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1829 %
1830 FUNCTION {news} { % void Entry::news() {
1831 "N" set.mark % set_mark("N");
1832 start.bibitem % start_bibitem();
1833 true output.author % output_author(true);
1834 true output.title % output_title(true);
1835 true output.mark % output_mark(true);
1836 true output.journal % output_journal(true);
1837 cap.comma write$ % write(cap_comma);
1838 true output.date % output_date(true);
1839 false output.number % output_number(false);
1840 false output.citedate % output_citedate(false);
1841 false output.url.or.doi % output_url_or_doi(false);
1842 end.bibitem % end_bibitem();
1843 } % }
1844 %
1845 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1846 %
1847 FUNCTION {default.type} { % void Entry::default_type() {
1848 "Unsupported entry type for " cite$ * warning$ % warning("Unsupported entry type for " + this.cite);
1849 } % }
1850 %
1851 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1852 %
1853 FUNCTION {longest.label.pass} { % void longest_label_pass(Entry entry) {
1854 entry.count #1 + 'entry.count := % entry_count = entry_count + 1;
1855 entry.count int.to.str$ 'label := % this.label = int_to_str(entry_count);
1856 label width$ longest.label.width > { % if (width(this.label) > longest_label_width) {
1857 label 'longest.label := % longest_label = this.label;
1858 label width$ 'longest.label.width := % longest_label_width = width(this.label);
1859 } 'skip$ if$ % }
1860 } % }
1861 %
1862 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1863 %
1864 FUNCTION {write.style.commands} { % void write_style_commands() {
1865 cmd.bibauthor write$ % write(cmd_bibauthor);
1866 newline$ % writeln();
1867 cmd.bibeditor write$ % write(cmd_bibeditor);
1868 newline$ % writeln();
1869 cmd.bibtranslator write$ % write(cmd_bibtranslator);
1870 newline$ % writeln();
1871 cmd.bibtitle write$ % write(cmd_bibtitle);
1872 newline$ % writeln();
1873 cmd.bibbooktitle write$ % write(cmd_bibbooktitle);
1874 newline$ % writeln();
1875 cmd.bibjournal write$ % write(cmd_bibjournal);
1876 newline$ % writeln();
1877 cmd.bibmark write$ % write(cmd_bibmark);
1878 newline$ % writeln();
1879 cmd.bibcountry write$ % write(cmd_bibcountry);
1880 newline$ % writeln();
1881 cmd.bibpatentid write$ % write(cmd_bibpatentid);
1882 newline$ % writeln();
1883 cmd.bibedition write$ % write(cmd_bibedition);
1884 newline$ % writeln();
1885 cmd.biborganization write$ % write(cmd_biborganization);
1886 newline$ % writeln();
1887 cmd.bibaddress write$ % write(cmd_bibaddress);
1888 newline$ % writeln();
1889 cmd.bibpublisher write$ % write(cmd_bibpublisher);
1890 newline$ % writeln();
1891 cmd.bibinstitution write$ % write(cmd_bibinstitution);
1892 newline$ % writeln();
1893 cmd.bibschool write$ % write(cmd_bibschool);
1894 newline$ % writeln();
1895 cmd.bibvolume write$ % write(cmd_bibvolume);
1896 newline$ % writeln();
1897 cmd.bibnumber write$ % write(cmd_bibnumber);
1898 newline$ % writeln();
1899 cmd.bibversion write$ % write(cmd_bibversion);
1900 newline$ % writeln();
1901 cmd.bibpages write$ % write(cmd_bibpages);
1902 newline$ % writeln();
1903 cmd.bibmodifydate write$ % write(cmd_bibmodifydate);
1904 newline$ % writeln();
1905 cmd.bibcitedate write$ % write(cmd_bibcitedate);
1906 newline$ % writeln();
1907 cmd.bibyear write$ % write(cmd_bibyear);
1908 newline$ % writeln();
1909 cmd.bibdate write$ % write(cmd_bibdate);
1910 newline$ % writeln();
1911 cmd.biburl write$ % write(cmd_biburl);
1912 newline$ % writeln();
1913 } % }
1914 %
1915 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1916 %
1917 FUNCTION {begin.bib} { % void begin_bib() {
1918 preamble$ empty$ not { % if (! empty(premble)) {
1919 preamble$ write$ % write(premeable);
1920 newline$ % writeln();
1921 } 'skip$ if$ % }
1922 env.bibbegin write$ % write(env_bibbegin);
1923 "{" longest.label * "}" * write$ % write("{" + longest.label + "}");
1924 newline$ % writeln();
1925 write.style.commands % write_style_commands();
1926 } % }
1927 %
1928 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1929 %
1930 FUNCTION {end.bib} { % void end_bib() {
1931 newline$ % writeln();
1932 env.bibend write$ % write(env_bibend);
1933 newline$ % writeln();
1934 } % }
1935 %
1936 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1937 %
1938 FUNCTION {initialize} { % void initialize() {
1939 #0 'entry.count := % entry_count = 0;
1940 #0 'longest.label.width := % longest_label_width = 0;
1941 "" 'longest.label := % longest_label = "";
1942 } % }
1943 %
1944 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1945 %
1946 % void main() {
1947 READ % List<Entry> entryList = read("<file>.bib");
1948 EXECUTE {initialize} % initialize();
1949 ITERATE {longest.label.pass} % for (Entry entry : entryList) {
1950 % longest_label_pass(entry);
1951 % }
1952 EXECUTE {begin.bib} % begin_bib();
1953 ITERATE {call.type$} % for (Entry entry : entryList) {
1954 % switch (typeof(entry)) {
1955 % case "book":
1956 % entry.book();
1957 % break;
1958 % case "article":
1959 % entry.article();
1960 % break;
1961 % .
1962 % .
1963 % .
1964 % case "incollection":
1965 % entry.incollection();
1966 % break;
1967 % case "misc":
1968 % entry.misc();
1969 % break;
1970 % default:
1971 % entry.default_type();
1972 % }
1973 % }
1974 EXECUTE {end.bib} % end_bib();
1975 % }
1976 %
1977 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1978 %% End of file `GBT7714-2005.bst'