Debian Codegraph @

texmf-dist/bibtex/bst/unbtex/unbtex-alf-pt.bst

raw
1 %%
2 %% unbtex-alf-pt.bst bibliography style file is adapted from abntex-alf.bst
3 %% to format bibliographic references in ABNT style and author-year citation
4 %% scheme for documents written in Portuguese.
5 %%
6 %% abntex2-alf.bst, v1.9.7 laurocesar
7 %% Copyright 2012-2018 by abnTeX2 group at https://www.abntex.net.br/
8 %%
9 %% This work may be distributed and/or modified under the conditions of the
10 %% LaTeX Project Public License, either version 1.3 of this license or (at
11 %% your option) any later version.
12 %% The latest version of this license is in
13 %% https://www.latex-project.org/lppl.txt
14 %% and version 1.3 or later is part of all distributions of LaTeX version
15 %% 2005/12/01 or later.
16 %%
17 %% This work has the LPPL maintenance status `maintained'.
18 %%
19 %% The Current Maintainer of this work is the abnTeX2 team, led by Lauro
20 %% César Araujo. Further information are available on
21 %% https://www.abntex.net.br/
22 %%
23
24 ENTRY
25 { address author
26 booktitle booksubtitle
27 chapter conference-number conference-year conference-location
28 edition editor editortype
29 dimensions furtherresp
30 howpublished illustrated institution
31 isbn issn journal key month note marginnote number organization
32 org-short pages pagename
33 publisher reprinted-from reprinted-text school
34 series subtitle section title type doi url urlaccessdate
35 volume year year-presented
36 abnt-and-type
37 abnt-doi abnt-dont-use-etal
38 abnt-etal-cite abnt-etal-list abnt-etal-text abnt-emphasize abnt-experimental
39 abnt-full-initials
40 abnt-last-names abnt-ldots-type
41 abnt-missing-year abnt-cite-style abnt-no-etal-label abnt-note
42 abnt-repeated-author-omit abnt-repeated-title-omit
43 abnt-show-options abnt-refinfo abnt-thesis-year abnt-url-package
44 abnt-title-command
45 abnt-verbatim-entry
46 iso-abbreviation iso-author-punctuation iso-date-place
47 }{}{ label extra.label year.label}
48
49 %revision string
50 STRINGS { abnt.bst.revision }
51
52 %general purpose strings
53 STRINGS { r s t }
54
55 %variables needed to implement the various abnt options
56 STRINGS {abnt.etal.text abnt.emphasize previous.author previous.title}
57 INTEGERS {abnt.alf abnt.cite.style abnt.doi
58 abnt.experimental abnt.etal.cite abnt.etal.list
59 abnt.full.initials
60 abnt.last.names abnt.ldots.type
61 abnt.missing.year
62 abnt.refinfo abnt.repeated.author.omit abnt.repeated.title.omit
63 abnt.show.options abnt.and.type
64 abnt.title.command
65 abnt.thesis.year
66 abnt.url.package abnt.verbatim.entry
67 iso.abbreviation iso.author.punctuation iso.date.place
68 repeated.author}
69
70 %needed for title formatting
71 INTEGERS { title.lenght title.pos first.word no.bracket}
72 STRINGS { title.char}
73
74 %needed for controlling the sentence position
75 INTEGERS {output.state before.all mid.sentence after.sentence after.block }
76
77 %needed for url identification
78 INTEGERS {url.type}
79
80 %static values for options
81 %values for abnt.doi
82 FUNCTION {abnt.doi.expand.to.url} {#0} %expands a doi address to its url correspondent
83 FUNCTION {abnt.doi.link} {#1} %links doi to its url correspondent
84 FUNCTION {abnt.doi.leave.as.is} {#2} %shows doi as is, external viewer will have
85 %to know what to do with a "doi:" document
86
87 %values for url types
88 FUNCTION {unknown.url} {#0}
89 FUNCTION {http.url} {#1}
90 FUNCTION {file.url} {#2}
91 FUNCTION {ftp.url} {#3}
92 FUNCTION {doi.url} {#4}
93 FUNCTION {mailto.url} {#5}
94
95 FUNCTION {init.state.consts}
96 { #0 'before.all :=
97 #1 'mid.sentence :=
98 #2 'after.sentence :=
99 #3 'after.block :=
100 }
101
102 %output.nonnull decides what is written before the argument s, if a comma, period etc.
103 FUNCTION {output.nonnull}
104 { 's := %the argument is written into s
105 output.state mid.sentence =
106 { ", " * write$ } %mid.sentence first write comma
107 { output.state after.block =
108 { add.period$ write$ newline$ }
109 { output.state before.all = 'write$
110 { add.period$ " " * write$ }
111 if$}
112 if$
113 mid.sentence 'output.state := }
114 if$
115 s %now comes s
116 }
117 FUNCTION {output.nonnull.dash}
118 { 's := %the argument is written into s
119 output.state mid.sentence =
120 { " --- " * write$ } %mid.sentence first write comma
121 { output.state after.block =
122 { add.period$ write$ newline$ write$}
123 { output.state before.all = 'write$
124 { add.period$ " " * write$ }
125 if$}
126 if$
127 mid.sentence 'output.state := }
128 if$
129 s %now comes s
130 }
131 FUNCTION {output} %does nothing or calls output.nonull
132 { duplicate$ empty$
133 'pop$
134 'output.nonnull
135 if$
136 }
137 FUNCTION {output.dash} %does nothing or calls output.nonull
138 { duplicate$ empty$
139 'pop$
140 'output.nonnull.dash
141 if$
142 }
143 FUNCTION {output.check} %like ouput, but complains if t empty
144 { 't :=
145 duplicate$ empty$
146 { pop$ "campo " t * " vazio em " * cite$ * warning$ }
147 'output.nonnull
148 if$
149 }
150
151 FUNCTION {new.block}
152 { output.state before.all =
153 'skip$
154 { after.block 'output.state := }
155 if$
156 }
157 FUNCTION {new.sentence}
158 { output.state after.block =
159 'skip$
160 { output.state before.all =
161 'skip$
162 { after.sentence 'output.state := }
163 if$
164 }
165 if$
166 }
167 FUNCTION {add.blank} { " " * before.all 'output.state :=}
168
169 FUNCTION {date.block} {new.block}
170
171 FUNCTION {not}
172 { { #0 }
173 { #1 }
174 if$
175 }
176 FUNCTION {and}
177 { 'skip$
178 { pop$ #0 }
179 if$
180 }
181 FUNCTION {or}
182 { { pop$ #1 }
183 'skip$
184 if$
185 }
186 FUNCTION {new.block.checka}
187 { empty$
188 'skip$
189 'new.block
190 if$
191 }
192 FUNCTION {new.block.checkb}
193 { empty$
194 swap$ empty$
195 and
196 'skip$
197 'new.block
198 if$
199 }
200 FUNCTION {new.sentence.checka}
201 { empty$
202 'skip$
203 'new.sentence
204 if$
205 }
206 FUNCTION {new.sentence.checkb}
207 { empty$
208 swap$ empty$
209 and
210 'skip$
211 'new.sentence
212 if$
213 }
214 FUNCTION {field.or.null}
215 { duplicate$ empty$
216 { pop$ "" }
217 'skip$
218 if$
219 }
220 FUNCTION {emphasize}
221 { duplicate$ empty$
222 { pop$ "" }
223 { abnt.emphasize "{" * swap$ * "}" * }
224 if$
225 }
226
227 FUNCTION {tie.or.space.prefix} %if text length less than 3 chars. uses a tie
228 { duplicate$ text.length$ #5 <
229 { "~" }
230 { " " }
231 if$
232 swap$
233 }
234
235 FUNCTION {no.space} { { "" } swap$ }
236
237 FUNCTION {space.word} { " " swap$ * " " * }
238
239 FUNCTION {bbl.and}
240 { abnt.and.type #0 = {" e "} 'skip$ if$
241 abnt.and.type #1 = {" \& "} 'skip$ if$}
242 FUNCTION {bbl.chapter} { "cap." }
243 FUNCTION {bbl.colon} {": "}
244 FUNCTION {bbl.editors} { "Ed." }
245 FUNCTION {bbl.editor} { "Ed." }
246 FUNCTION {bbl.edby} { "editado por" }
247 FUNCTION {bbl.edition} { "ed." }
248 FUNCTION {bbl.empty} {""}
249 FUNCTION {bbl.etal}{abnt.etal.text "" = {""} {" " abnt.etal.text *} if$}
250 FUNCTION {bbl.doi.url} {"https://dx.doi.org/"}
251 FUNCTION {bbl.in}{ "In" iso.abbreviation 'skip$ { bbl.colon *} if$}
252 FUNCTION {bbl.ldots} %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
253 {abnt.ldots.type
254 {abnt.ldots.type #1 = {"\ldots"} 'skip$ if$
255 abnt.ldots.type #2 = {"$\ldots$"} 'skip$ if$
256 abnt.ldots.type #3 = {"{...}"} 'skip$ if$}
257 {""} %for #0 use nothing
258 if$}
259 FUNCTION {bbl.master} { "Mestrado" }
260 FUNCTION {bbl.missing.year}
261 {abnt.missing.year
262 {"[\emph{s.d.}]"} %#1
263 {""} %#0
264 if$}
265 FUNCTION {bbl.monography} { "Monografia" }
266 FUNCTION {bbl.mthesis} { "Disserta\c{c}\~{a}o" }
267 FUNCTION {bbl.no.address} {"[\emph{S.l.}]"}
268 FUNCTION {bbl.no.address.no.publisher} {"[\emph{S.l.}: \emph{s.n.}]"}
269 FUNCTION {bbl.no.publisher} {"[\emph{s.n.}]"}
270 FUNCTION {bbl.number} { iso.abbreviation {"no."} {"n."} if$ }
271 FUNCTION {bbl.nr} { "n." }
272 FUNCTION {bbl.of} { "de" }
273 FUNCTION {bbl.phd} { "Doutorado" }
274 FUNCTION {bbl.phdthesis} { "Tese" }
275 FUNCTION {bbl.pages}
276 {pagename empty$
277 { "p." }
278 {pagename}
279 if$
280 }
281 FUNCTION {bbl.page} { bbl.pages }
282 FUNCTION {bbl.reprint} {"Separata de"}
283 FUNCTION {bbl.semicolon} { "; "}
284 FUNCTION {bbl.same.field} {"\underline{\ \ \ \ \ \ \ \ }"}
285 FUNCTION {bbl.techrep} { "Rel. Tec." }
286 FUNCTION {bbl.url.accessdate}
287 {iso.abbreviation { "Cited "} {"Acesso em: "} if$}
288 FUNCTION {bbl.url.available}
289 { iso.abbreviation {"Available from Internet: "} {"Dispon{\'\i}vel em: "} if$}
290 FUNCTION {bbl.void} {""}
291 FUNCTION {bbl.volume} { iso.abbreviation {"vol."} {"v."} if$ }
292
293 MACRO {jan} {"jan."}
294 MACRO {feb} {"fev."}
295 MACRO {mar} {"mar."}
296 MACRO {apr} {"abr."}
297 MACRO {may} {"maio"}
298 MACRO {jun} {"jun."}
299 MACRO {jul} {"jul."}
300 MACRO {aug} {"ago."}
301 MACRO {sep} {"set."}
302 MACRO {oct} {"out."}
303 MACRO {nov} {"nov."}
304 MACRO {dec} {"dez."}
305
306 FUNCTION {is.num}
307 { chr.to.int$
308 duplicate$ "0" chr.to.int$ < not
309 swap$ "9" chr.to.int$ > not and
310 }
311 FUNCTION {str.to.int}
312 { duplicate$ is.num
313 {chr.to.int$ #48 -}
314 'skip$
315 if$
316 }
317 FUNCTION {bibinfo.check} %usage: field "field" bibinfo.check
318 { swap$ duplicate$ missing$
319 {pop$ pop$ ""}
320 { duplicate$ empty$
321 {swap$ pop$}
322 {swap$ pop$}
323 if$
324 }
325 if$
326 }
327 FUNCTION {bibinfo.warn}
328 { swap$
329 duplicate$ missing$
330 {swap$ "faltando " swap$ * " em " * cite$ * warning$ pop$ ""}
331 { duplicate$ empty$
332 {swap$ "vazio " swap$ * " em " * cite$ * warning$}
333 {swap$ pop$}
334 if$
335 }
336 if$
337 }
338
339 FUNCTION {write.field.verbatim}
340 {
341 duplicate$ missing$
342 {pop$ pop$}
343 {
344 s text.length$ #0 >
345 {s "," * newline$ write$ "" 's :=}
346 'skip$
347 if$
348 swap$
349 "={" * swap$ * "}" *
350 s swap$ * 's :=
351 }
352 if$
353 }
354
355 FUNCTION {write.entry.verbatim1}
356 {
357 "address" address write.field.verbatim
358 "author" author write.field.verbatim
359 "booktitle" booktitle write.field.verbatim
360 "booksubtitle" booksubtitle write.field.verbatim
361 "chapter" chapter write.field.verbatim
362 "conference-number" conference-number write.field.verbatim
363 "conference-year" conference-year write.field.verbatim
364 "conference-location" conference-location write.field.verbatim
365 "edition" edition write.field.verbatim
366 "editor" editor write.field.verbatim
367 "editortype" editortype write.field.verbatim
368 "dimensions" dimensions write.field.verbatim
369 "furtherresp" furtherresp write.field.verbatim
370 "howpublished" howpublished write.field.verbatim
371 "illustrated" illustrated write.field.verbatim
372 "institution" institution write.field.verbatim
373 "isbn" isbn write.field.verbatim
374 "issn" issn write.field.verbatim
375 "journal" journal write.field.verbatim
376 }
377 FUNCTION {write.entry.verbatim2}
378 {
379 "key" key write.field.verbatim
380 "month" month write.field.verbatim
381 "note" note write.field.verbatim
382 "marginnote" marginnote write.field.verbatim
383 "number" number write.field.verbatim
384 "organization" organization write.field.verbatim
385 "org-short" org-short write.field.verbatim
386 "pages" pages write.field.verbatim
387 "pagename" pagename write.field.verbatim
388 "publisher" publisher write.field.verbatim
389 "reprinted-from" reprinted-from write.field.verbatim
390 "reprinted-text" reprinted-text write.field.verbatim
391 "school" school write.field.verbatim
392 "series" series write.field.verbatim
393 "subtitle" subtitle write.field.verbatim
394 "section" section write.field.verbatim
395 "title" title write.field.verbatim
396 "type" type write.field.verbatim
397 }
398 FUNCTION {write.entry.verbatim3}
399 {
400 "doi" doi write.field.verbatim
401 "url" url write.field.verbatim
402 "urlaccessdate" urlaccessdate write.field.verbatim
403 "volume" volume write.field.verbatim
404 "year" year write.field.verbatim
405 "abnt-emphasize" abnt-emphasize write.field.verbatim
406 "abnt-experimental" abnt-experimental write.field.verbatim
407 "abnt-doi" abnt-doi write.field.verbatim
408 "abnt-dont-use-etal" abnt-dont-use-etal write.field.verbatim
409 "abnt-full-initials" abnt-full-initials write.field.verbatim
410 "abnt-ldots-type" abnt-ldots-type write.field.verbatim
411 "abnt-missing-year" abnt-missing-year write.field.verbatim
412 "abnt-cite-style" abnt-cite-style write.field.verbatim
413 "abnt-no-etal-label" abnt-no-etal-label write.field.verbatim
414 %abnt-note
415 "abnt-repeated-author-omit" abnt-repeated-author-omit write.field.verbatim
416 "abnt-repeated-title-omit" abnt-repeated-title-omit write.field.verbatim
417 "abnt-show-options" abnt-show-options write.field.verbatim
418 "abnt-refinfo" abnt-refinfo write.field.verbatim
419 "abnt-thesis-year" abnt-thesis-year write.field.verbatim
420 "abnt-title-command" abnt-title-command write.field.verbatim
421 "abnt-url-package" abnt-url-package write.field.verbatim
422 "abnt-verbatim-entry" abnt-verbatim-entry write.field.verbatim
423 }
424
425 FUNCTION {write.entry.verbatim}
426 {"" 's := "" 't :=
427 abnt.verbatim.entry
428 {"{\footnotesize\begin{verbatim}" newline$ write$
429 "@" type$ * "{" * cite$ * 's :=
430 write.entry.verbatim1
431 write.entry.verbatim2
432 write.entry.verbatim3
433 s "" = {"}"} {s "}" *} if$
434 newline$ write$
435 "\end{verbatim}}" newline$ write$}
436 {newline$}
437 if$}
438
439 STRINGS { bibinfo}
440 INTEGERS { nameptr namesleft numnames }
441
442 FUNCTION {get.person} {"{vv }{ll}{, jj}{, ff}" format.name$}
443 FUNCTION {get.last.name} {#1 "{ll}" format.name$}
444 FUNCTION {get.first.name} {#1 "{ff}" format.name$}
445 FUNCTION {get.von} {#1 "{vv}" format.name$}
446 FUNCTION {get.jr} {#1 "{jj}" format.name$}
447 FUNCTION {is.composed.von}
448 {get.person
449 get.von duplicate$ empty$ {pop$ #0}
450 {duplicate$
451 get.first.name empty$ not
452 swap$ get.last.name empty$ not and
453 } if$
454 }
455
456 FUNCTION {recompose.name}
457 {get.person duplicate$ duplicate$ duplicate$
458 get.von #1 "{ll }" format.name$ swap$
459 get.last.name *
460 swap$ #1 "{, ff}" format.name$ *
461 swap$ get.von #1 "{ ff}" format.name$ *
462 }
463
464 FUNCTION {format.single.name}
465 {
466 s nameptr get.person 'r :=
467 abnt.last.names
468 {r #1 "{ll}{ jj}" format.name$ "u" change.case$
469 abnt.full.initials
470 {r #1 "{, ff}{ vv}" format.name$ *}
471 {r #1 "{, f.}{ vv}" format.name$ *}
472 if$}
473 {%r #1 is.composed.von {r #1 recompose.name 'r :=} 'skip$ if$
474 r #1 "{ll}" format.name$
475 #1 "{ll}" format.name$
476 r #1 "{ jj}" format.name$ * "u" change.case$
477 abnt.full.initials
478 {r #1 "{, ff}{ vv}" format.name$ *
479 r #1 "{ll}" format.name$
480 #1 "{ ff}{ vv}" format.name$ *}
481 {iso.author.punctuation
482 {r #1 "{, f{}}{ vv}" format.name$ *}
483 {r #1 "{, f.}{ vv}" format.name$ *} if$
484 r #1 "{ll}" format.name$
485 #1 "{ f.}{ vv}" format.name$ *}
486 if$}
487
488 if$
489 }
490 FUNCTION {format.names}
491 { 'bibinfo := duplicate$ empty$ 'skip$
492 {'s :=
493 "" 't :=
494 #1 'nameptr := s num.names$ 'numnames :=
495 numnames 'namesleft :=
496 { namesleft #0 > }
497 { format.single.name
498 bibinfo bibinfo.check
499 't :=
500 nameptr #1 >
501 {nameptr #1 #1 + = numnames abnt.etal.list > and
502 {abnt.etal.list {"others" 't := #1 'namesleft :=} 'skip$ if$ }
503 'skip$
504 if$
505 namesleft #1 >
506 { "; " * t * }
507 { numnames #2 >
508 { "" * }
509 'skip$
510 if$
511 s nameptr "{ll}" format.name$ duplicate$ "others" =
512 { 't := }
513 { pop$ }
514 if$
515 t "others" =
516 { " \emph{et al.}" *}
517 { "; " * t *}
518 if$ }
519 if$ }
520 't
521 if$
522 nameptr #1 + 'nameptr :=
523 namesleft #1 - 'namesleft := }
524 while$
525 } if$
526 }
527
528 %from plain.bst
529 FUNCTION {format.names.plain}
530 { 's :=
531 #1 'nameptr :=
532 s num.names$ 'numnames :=
533 numnames 'namesleft :=
534 { namesleft #0 > }
535 { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ 't :=
536 nameptr #1 >
537 { namesleft #1 >
538 { ", " * t * }
539 { numnames #20 >
540 { "," * }
541 'skip$
542 if$
543 t "others" =
544 { " \emph{et al.}" * }
545 { bbl.and * t * }
546 if$
547 }
548 if$
549 }
550 't
551 if$
552 nameptr #1 + 'nameptr :=
553 namesleft #1 - 'namesleft :=
554 }
555 while$
556 }
557 FUNCTION {format.names.ed} {format.names}
558
559 FUNCTION {format.authors}
560 {
561 author "author" format.names
562 }
563
564 FUNCTION {format.authors.plain}
565 {
566 author format.names.plain
567 }
568
569 FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
570
571 FUNCTION {format.book.pages}
572 { pages "pages" bibinfo.check duplicate$ empty$
573 'skip$
574 { "~" * bbl.pages * }
575 if$
576 }
577 FUNCTION {format.dimensions}
578 { dimensions empty$
579 'skip$
580 { dimensions output}
581 if$
582 }
583 FUNCTION {format.furtherresp}
584 { furtherresp empty$
585 'skip$
586 { furtherresp output}
587 if$
588 }
589 FUNCTION {format.illustrated}
590 { illustrated missing$
591 'skip$
592 {illustrated empty$
593 {"il." output}
594 {illustrated output}
595 if$}
596 if$
597 }
598 FUNCTION {format.isbn}
599 { isbn "isbn" bibinfo.check duplicate$ empty$
600 'skip$
601 {new.block "ISBN " swap$ *}
602 if$
603 }
604
605 FUNCTION {format.issn}
606 { issn "issn" bibinfo.check
607 duplicate$ empty$ 'skip$
608 {new.block "ISSN " swap$ *}
609 if$
610 }
611
612 FUNCTION {format.doi}
613 { doi "doi" bibinfo.check
614 duplicate$ empty$ 'skip$
615 {new.block duplicate$ "DOI \href{https://dx.doi.org/" swap$ * "}{" * swap$ * "}" *}
616 if$
617 }
618
619 FUNCTION {format.note}
620 { note empty$
621 { "" }
622 { note #1 #1 substring$
623 duplicate$ "{" =
624 'skip$
625 { output.state mid.sentence =
626 { "l" }
627 { "u" }
628 if$
629 change.case$ }
630 if$
631 note #2 global.max$ substring$ * "note" bibinfo.check }
632 if$
633 }
634
635 FUNCTION {format.howpublished}
636 { howpublished empty$
637 { "" }
638 { howpublished #1 #1 substring$
639 duplicate$ "{" =
640 'skip$
641 { output.state mid.sentence =
642 { "l" }
643 { "u" }
644 if$
645 change.case$ }
646 if$
647 howpublished #2 global.max$ substring$ * "howpublished" bibinfo.check }
648 if$
649 }
650
651 %ABNT styles require that the title acts as an author if
652 %typical author fields are absent. In this case the first
653 %word is uppercase. Our main problem is to establish what
654 %the first word actually is since portuguese uses accents.
655 %For example: Fun{\c c}\ão (Função) is a whole word but contains a
656 %space, but if we write Fun\c{c}\ão \c is converted to uppercase...
657 %You get the problem, don't you?
658 FUNCTION {format.title.as.author}
659 { 's := %holds the title
660 #1 'title.pos := %our position in the title
661 #1 'first.word := %boolean, true if we already have the first word
662 #1 'no.bracket := %boolean, false if we are inside a {}
663 "" 't := %holds the first title.pos characters of the title
664 {first.word}
665 {s title.pos #1 substring$ 'title.char :=
666 %checks if the character is a {
667 title.char "{" = {#0 'no.bracket :=} 'skip$ if$
668 %if we are in a bracket
669 no.bracket 'skip$ {title.char "}" = {#1 'no.bracket :=} 'skip$ if$} if$
670 type$ "journalpart" =
671 {title.char "." = title.char ":" = or title.char "!" = or
672 title.char "," = or title.char ";" = or title.char "?" = or}
673 {title.char " " =}
674 if$ s t = or no.bracket and
675 {#0 'first.word :=
676 t title.char * "u" change.case$
677 title.pos #1 + 'title.pos :=
678 s title.pos global.max$ substring$ * 's :=}
679 {title.pos #1 + 'title.pos := t title.char * 't :=}
680 if$
681 }
682 while$
683 s
684 }
685
686 %compares current title with the title of the previous entry
687 FUNCTION {compare.title}
688 {abnt.repeated.title.omit
689 {duplicate$ "" = 'skip$
690 {duplicate$ previous.title = repeated.author and
691 {duplicate$ 'previous.title := pop$ bbl.same.field}
692 {duplicate$ 'previous.title :=}
693 if$}
694 if$}
695 'skip$
696 if$
697 }
698
699 FUNCTION {apply.title.command}
700 {abnt.title.command
701 {duplicate$ empty$ 'skip$
702 {"\bibtextitlecommand{" type$ * "}{" * swap$ * "}" *}
703 if$}
704 'skip$ if$
705 }
706
707 FUNCTION {format.title}
708 {author empty$ editor empty$ and organization empty$ and
709 {title format.title.as.author}
710 {title duplicate$ empty$ {pop$ ""} {"t" change.case$} if$}
711 if$
712 subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$
713 apply.title.command
714 compare.title
715 }
716
717 FUNCTION {n.dashify}
718 {
719 't :=
720 ""
721 { t empty$ not }
722 { t #1 #1 substring$ "-" =
723 { t #1 #2 substring$ "--" = not
724 { "--" *
725 t #2 global.max$ substring$ 't :=
726 }
727 { { t #1 #1 substring$ "-" = }
728 { "-" *
729 t #2 global.max$ substring$ 't :=
730 }
731 while$
732 }
733 if$
734 }
735 { t #1 #1 substring$ *
736 t #2 global.max$ substring$ 't :=
737 }
738 if$
739 }
740 while$
741 }
742
743 %FUNCTION {word.in} { bbl.in " " * }
744 FUNCTION {word.in} {"\emph{In}: "}
745
746 FUNCTION {format.month}
747 { month empty$ 'skip$
748 {month "month" bibinfo.check}
749 if$
750 }
751
752 FUNCTION {format.date}
753 { year empty$
754 { month empty$
755 { bbl.missing.year }
756 { "existe o campo month (mês) mas não o campo year (ano) em " cite$ * warning$ month}
757 if$}
758 { month empty$
759 { year n.dashify}
760 { month " " * year * }
761 if$}
762 if$
763 }
764 FUNCTION {format.btitle}
765 {author empty$ editor empty$ and organization empty$ and
766 {title format.title.as.author "title" bibinfo.check duplicate$ empty$ 'skip$ {} if$
767 subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
768 {title "title" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
769 subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
770 if$
771 apply.title.command
772 compare.title
773 }
774 FUNCTION {either.or.check}
775 { empty$
776 'pop$
777 { "não posso usar ambos " swap$ * " os campos em " * cite$ * warning$ }
778 if$
779 }
780
781 FUNCTION {format.volume} %leaves formatted or empty volume on the stack
782 {volume duplicate$ empty$
783 'skip$
784 {volume #1 #1 substring$ is.num
785 {bbl.volume swap$ tie.or.space.prefix * *}
786 'skip$
787 if$}
788 if$
789 }
790
791 FUNCTION {format.number} %leaves formatted or empty number on the stack
792 { number duplicate$ empty$
793 'skip$
794 {bbl.number swap$ tie.or.space.prefix * *}
795 if$
796 }
797
798 FUNCTION {format.patent.number}
799 { number
800 }
801
802 FUNCTION {format.bvolume}
803 { volume empty$
804 { "" }
805 { format.volume
806 number empty$ 'skip$ {output format.number} if$
807 series "series" bibinfo.check
808 duplicate$ empty$ 'pop$
809 { swap$ bbl.of space.word * swap$
810 emphasize * }
811 if$
812 }
813 if$
814 }
815
816 FUNCTION {format.bvolume.if.no.series}
817 { series empty$
818 { format.bvolume }
819 { "" }
820 if$
821 }
822
823 FUNCTION {format.number.or.volume}
824 {number empty$
825 {format.volume}
826 {number} %we use the pure number here without leading "n."
827 if$
828 }
829
830 FUNCTION {format.volume.and.number}
831 {format.volume output
832 format.number
833 }
834
835 FUNCTION {format.volume.number.series}
836 { number empty$ volume empty$ and
837 { series empty$
838 { "" }
839 {" (" series "series" bibinfo.check * ")" *}
840 if$}
841 { series empty$
842 {""} %{ format.number.or.volume }
843 { " (" series "series" bibinfo.check * ", " *
844 format.number.or.volume * ")" * }
845 if$ }
846 if$
847 }
848
849 FUNCTION {extract.num}
850 { duplicate$ 't :=
851 "" 's :=
852 { t empty$ not }
853 { t #1 #1 substring$
854 t #2 global.max$ substring$ 't :=
855 duplicate$ is.num
856 { s swap$ * 's := }
857 { pop$ "" 't := }
858 if$ }
859 while$
860 s empty$
861 'skip$
862 { pop$ s }
863 if$
864 }
865
866 FUNCTION {format.edition}
867 { edition duplicate$ empty$ 'skip$
868 {output.state mid.sentence = { "l" } { "t" } if$ change.case$
869 "edition" bibinfo.check
870 edition #1 #1 substring$ is.num {". " * bbl.edition * } 'skip$ if$}
871 if$
872 }
873 INTEGERS { multiresult }
874 FUNCTION {multi.page.check}
875 { 't :=
876 #0 'multiresult :=
877 { multiresult not
878 t empty$ not
879 and }
880 { t #1 #1 substring$
881 duplicate$ "-" =
882 swap$ duplicate$ "," =
883 swap$ "+" =
884 or or
885 { #1 'multiresult := }
886 { t #2 global.max$ substring$ 't := }
887 if$ }
888 while$
889 multiresult
890 }
891 FUNCTION {format.pages}
892 { pages duplicate$ empty$ 'skip$
893 { duplicate$ multi.page.check
894 { n.dashify bbl.pages swap$}
895 { bbl.page swap$ }
896 if$
897 tie.or.space.prefix "pages" bibinfo.check * * }
898 if$
899 }
900 FUNCTION {format.journal.pages}
901 { pages empty$ {""}
902 { pages n.dashify bbl.pages
903 swap$ tie.or.space.prefix "pages" bibinfo.check * *}
904 if$
905 }
906
907 FUNCTION {get.url.type}
908 {s #1 #5 substring$ "https:" = {http.url}
909 {s #1 #6 substring$ "https:" = {http.url}
910 {s #1 #5 substring$ "file:" = {file.url}
911 {s #1 #4 substring$ "ftp:" = {ftp.url}
912 {s #1 #4 substring$ "doi:" = {doi.url}
913 {s #1 #7 substring$ "mailto:" = {mailto.url} {unknown.url} if$}
914 if$}
915 if$}
916 if$}
917 if$}
918 if$
919 'url.type :=
920 }
921
922 FUNCTION {expand.doi}
923 {s
924 url.type doi.url =
925 {#5 global.max$ substring$ bbl.doi.url swap$ *}
926 'skip$ if$
927 }
928
929 INTEGERS {url.pos url.length}
930 FUNCTION {filter.url.tex}
931 {s text.length$ #1 + 'url.length :=
932 #1 'url.pos := "" 't :=
933 {url.pos url.length <}
934 {s url.pos #1 substring$
935 duplicate$ "_" = {pop$ "\underline{\ }" } 'skip$ if$
936 duplicate$ "%" = {pop$ "\%" } 'skip$ if$
937 duplicate$ "&" = {pop$ "\&" } 'skip$ if$
938 duplicate$ "~" = {pop$ "\~{}" } 'skip$ if$
939 duplicate$ "/" = {pop$ "\-/" } 'skip$ if$
940 duplicate$ "." = {pop$ "\-." } 'skip$ if$
941 duplicate$ "\" = {pop$ "{\textbackslash}" } 'skip$ if$
942 duplicate$ "#" = {pop$ "\#" } 'skip$ if$
943 duplicate$ "_" = {pop$ "\_" } 'skip$ if$
944 t swap$ * 't :=
945 url.pos #1 + 'url.pos :=
946 }
947 while$
948 t
949 }
950 FUNCTION {filter.url.html}
951 {s text.length$ #1 + 'url.length :=
952 #1 'url.pos := "" 't :=
953 {url.pos url.length <}
954 {s url.pos #1 substring$
955 duplicate$ "%" = {pop$ "\%" } 'skip$ if$
956 duplicate$ "#" = {pop$ "\#" } 'skip$ if$
957 duplicate$ "_" = {pop$ "\_" } 'skip$ if$
958 t swap$ * 't :=
959 url.pos #1 + 'url.pos :=
960 }
961 while$
962 t
963 }
964
965 FUNCTION {compose.url}
966 {'s :=
967 get.url.type
968 bbl.url.available
969 abnt.url.package #0 =
970 { "$<$" *
971 abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
972 * "$>$" *} 'skip$ if$
973 abnt.url.package #1 =
974 { "\url{" * filter.url.html * "}" *} 'skip$ if$
975 abnt.url.package #2 =
976 {url.type http.url =
977 {"\htmladdnormallink{$<$" * filter.url.tex * "$>$}{" * filter.url.html * "}" *}
978 'skip$ if$
979 url.type doi.url = url.type ftp.url = or url.type mailto.url = or
980 {"\htmladdnormallink{$<$" *
981 abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
982 * "$>$}{" *
983 abnt.doi abnt.doi.leave.as.is = {s} 'expand.doi if$
984 * "}" * }
985 'skip$ if$
986 url.type unknown.url =
987 {"$<$" * filter.url.tex * "$>$" *}
988 'skip$ if$} 'skip$ if$
989 }
990 FUNCTION {format.url}
991 { url empty$ 'skip$
992 {url compose.url output new.sentence }
993 if$
994 urlaccessdate duplicate$ empty$ 'skip$
995 { bbl.url.accessdate swap$ *}
996 if$
997 "urlaccessdate" bibinfo.check output new.sentence
998 }
999
1000 FUNCTION {format.conference.info}
1001 { conference-number empty$
1002 'skip$
1003 {conference-number "." * output}
1004 if$
1005 conference-year empty$
1006 'skip$
1007 {conference-year output}
1008 if$
1009 conference-location empty$
1010 'skip$
1011 {conference-location output}
1012 if$
1013 new.sentence
1014 }
1015
1016 FUNCTION {format.chapter.pages}
1017 { chapter empty$
1018 'format.pages
1019 { type empty$
1020 { bbl.chapter }
1021 { type "l" change.case$
1022 "type" bibinfo.check }
1023 if$
1024 chapter tie.or.space.prefix "chapter" bibinfo.check * *
1025 pages empty$
1026 'skip$
1027 { ", " * format.pages * }
1028 if$ }
1029 if$
1030 }
1031
1032 FUNCTION {format.booktitle}
1033 {author empty$ editor empty$ and organization empty$ and
1034 {booktitle format.title.as.author "booktitle" bibinfo.check duplicate$ empty$ 'skip$ {} if$
1035 booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
1036 apply.title.command} if$}
1037 {booktitle "booktitle" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
1038 %{booktitle "booktitle" bibinfo.check "u" change.case$ duplicate$ empty$ 'skip$ {} if$
1039 booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
1040 apply.title.command} if$}
1041 if$
1042 }
1043 FUNCTION {format.editors}
1044 { editor empty$
1045 {"inbook" type$ = 'bbl.same.field 'skip$ if$}
1046 {author empty$
1047 {editor "editor" format.names " (" *
1048 editortype empty$ {bbl.editor} {editortype} if$
1049 ")" * * }
1050 {"inbook" type$ =
1051 {bbl.same.field }
1052 {editor "editor" format.names " (" *
1053 editortype empty$ {bbl.editor} {editortype} if$
1054 ")" * *}
1055 if$}
1056 if$}
1057 if$
1058 }
1059 FUNCTION {format.in.ed.booktitle}
1060 { editor empty$
1061 {organization empty$ not author empty$ not and %if one of two not empty
1062 {word.in organization "u" change.case$ * output
1063 format.conference.info
1064 booktitle empty$ {""} {new.sentence format.booktitle} if$}
1065 {word.in
1066 organization empty$ author empty$ and 'skip$
1067 {"inbook" type$ = {bbl.same.field * output new.sentence ""}
1068 'skip$ if$ } if$
1069 booktitle empty$ 'skip$ {format.booktitle *} if$}
1070 if$}
1071 {word.in format.editors * output
1072 booktitle empty$ {""} {new.sentence format.booktitle} if$}
1073 if$
1074 output
1075 new.sentence
1076 }
1077 FUNCTION {empty.misc.check}
1078 { author empty$ title empty$ howpublished empty$
1079 month empty$ year empty$ note empty$
1080 and and and and and
1081 key empty$ not and
1082 { "todos os campos relevantes estão vazios ou faltando em " cite$ * warning$ }
1083 'skip$
1084 if$
1085 }
1086 FUNCTION {format.type}
1087 { type "type" bibinfo.check
1088 duplicate$ empty$ 'skip$
1089 {new.block "" swap$ * }
1090 if$
1091 }
1092
1093 FUNCTION {format.year}
1094 {year empty$
1095 { "campo year vazio ou faltando em " cite$ *
1096 abnt.missing.year {" (referencia com [s.d.] sem data)" *} 'skip$ if$ warning$
1097 abnt.missing.year {" " } {""} if$ bbl.missing.year *}
1098 {year n.dashify "year" bibinfo.check}
1099 if$
1100 }
1101
1102 FUNCTION {format.year.presented}
1103 {year-presented empty$
1104 {""}
1105 {year-presented n.dashify}
1106 if$
1107 }
1108
1109 FUNCTION {format.field.address}
1110 { 't :=
1111 address empty$ organization empty$ and url empty$ and t empty$ and
1112 {bbl.no.address.no.publisher}
1113 {address empty$
1114 %if an url is present we don't give a missing address "[s.l.]" notice
1115 {url empty$ {bbl.no.address ": "} {"" ""} if$}
1116 {address ": "}
1117 if$
1118 t empty$
1119 {%if an organization is present then it is OK not to have a publisher
1120 organization empty$ {* bbl.no.publisher * } 'pop$ if$}
1121 {* t * }
1122 if$}
1123 if$
1124 }
1125
1126 FUNCTION {format.address}
1127 {address empty$
1128 { bbl.no.address}
1129 { address}
1130 if$
1131 }
1132
1133 FUNCTION {format.publisher.address}
1134 { publisher "publisher" bibinfo.check format.field.address}
1135
1136 FUNCTION {format.publisher.address.relax}
1137 {publisher empty$ address empty$ and {""}
1138 {publisher "publisher" bibinfo.check format.field.address}
1139 if$}
1140
1141 FUNCTION {format.organization.address}
1142 { organization "organization" bibinfo.check format.field.address}
1143
1144 %retains current authorship for future use
1145 FUNCTION {compare.authorship}
1146 {abnt.repeated.author.omit
1147 {duplicate$ "" = 'skip$
1148 {duplicate$ previous.author =
1149 {duplicate$ 'previous.author :=
1150 pop$ bbl.same.field
1151 #1 'repeated.author :=}
1152 {duplicate$ 'previous.author :=
1153 #0 'repeated.author :=}
1154 if$}
1155 if$}
1156 'skip$
1157 if$
1158 }
1159
1160 FUNCTION {format.author.or.organization}
1161 { author empty$
1162 { organization empty$ 'skip$
1163 { organization "u" change.case$ "organization" bibinfo.check output}
1164 if$}
1165 { format.authors output.nonnull }
1166 if$
1167 compare.authorship
1168 }
1169
1170 FUNCTION {format.editor.or.organization}
1171 { editor empty$
1172 { organization empty$ 'skip$
1173 { organization "u" change.case$ "organization" bibinfo.check output}
1174 if$}
1175 { format.editors output.nonnull }
1176 if$
1177 compare.authorship
1178 }
1179
1180 FUNCTION {format.author.or.editor.or.organization}
1181 { author empty$
1182 { editor empty$
1183 { organization empty$
1184 'skip$
1185 { organization "u" change.case$ "organization" bibinfo.check output}
1186 if$}
1187 { format.editors output.nonnull }
1188 if$}
1189 { format.authors output.nonnull }
1190 if$
1191 compare.authorship
1192 }
1193
1194 FUNCTION {format.reprint}
1195 { reprinted-text missing$
1196 {""}
1197 {reprinted-text empty$
1198 {bbl.reprint} {reprinted-text} if$
1199 bbl.colon *}
1200 if$
1201 }
1202
1203 FUNCTION {format.journal}
1204 {
1205 format.reprint
1206 journal emphasize *
1207 }
1208
1209 %generates the first label in \abntrefinfo to be used with \citeonline
1210 FUNCTION {format.names.for.label1} %abnt-alf only
1211 { 's := "" 't :=
1212 #1 'nameptr := s num.names$ 'numnames :=
1213 numnames 'namesleft :=
1214 { namesleft #0 > }
1215 {abnt.last.names
1216 {s nameptr "{ll}{ jj}" format.name$}
1217 {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
1218 s nameptr "{ jj}" format.name$ *}
1219 if$
1220 't :=
1221 nameptr #1 >
1222 {namesleft #1 >
1223 { numnames abnt.etal.cite > abnt.etal.cite #0 = not and
1224 {#0 'namesleft := abnt.etal.cite {" \emph{et al.}" *} 'skip$ if$}
1225 {", " * t * } if$ }
1226 { t "others" =
1227 {abnt.etal.cite {" \emph{et al.}" *} 'skip$ if$}
1228 {numnames nameptr =
1229 {bbl.and * t *}
1230 'skip$ if$}
1231 if$
1232 }
1233 if$ }
1234 't
1235 if$
1236 nameptr #1 + 'nameptr :=
1237 namesleft #1 - 'namesleft := }
1238 while$
1239 }
1240
1241 %generates the second label in \abntrefinfo to be used with \cite
1242 FUNCTION {format.names.for.label2} %abnt-alf only
1243 { 's := "" 't :=
1244 #1 'nameptr := s num.names$ 'numnames :=
1245 numnames 'namesleft :=
1246 { namesleft #0 > }
1247 {abnt.last.names
1248 {s nameptr "{ll}{ jj}" format.name$}
1249 {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
1250 s nameptr "{ jj}" format.name$ *}
1251 if$
1252 % Desabilita caixa alta nas citações do comando \cite ao logo do texto
1253 %abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ 't :=
1254 abnt.cite.style #0 = {} 'skip$ if$ 't :=
1255 nameptr #1 >
1256 {namesleft #1 >
1257 { numnames abnt.etal.cite >
1258 {#0 'namesleft := abnt.etal.cite {" \emph{et al.}" *} 'skip$ if$}
1259 {"; " * t * } if$ }
1260 { t "OTHERS" = t "others" = or
1261 {abnt.etal.cite {" \emph{et al.}" *} 'skip$ if$}
1262 {numnames nameptr = { bbl.semicolon * t *} 'skip$ if$}
1263 if$
1264 }
1265 if$ }
1266 't
1267 if$
1268 nameptr #1 + 'nameptr :=
1269 namesleft #1 - 'namesleft := }
1270 while$
1271 }
1272
1273 FUNCTION {format.title.for.label}
1274 { 's :=
1275 #1 'title.pos := #1 'first.word :=
1276 "" 't :=
1277 {first.word}
1278 {s title.pos #1 substring$ 'title.char :=
1279 title.char "." = title.char ":" = or title.char ";" = or
1280 title.char "," = or title.char " " = or s t = or
1281 {#0 'first.word :=
1282 title.pos #1 + 'title.pos :=}
1283 {title.pos #1 + 'title.pos := t title.char * 't :=}
1284 if$
1285 }
1286 while$
1287 s t = %title equals first word, dont use bbl.ldots
1288 {t "}{" * t
1289 %abnt.cite.style #0 = {"u" change.case$ * } 'skip$ if$}
1290 abnt.cite.style #0 = { * } 'skip$ if$}
1291 {t bbl.ldots * "}{" * t
1292 %abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ * bbl.ldots *}
1293 abnt.cite.style #0 = {} 'skip$ if$ * bbl.ldots *}
1294 if$
1295 }
1296
1297 %cvs keys have the general form $key: value $
1298 INTEGERS {key.pos value.pos}
1299 FUNCTION {extract.cvs.key} %we borrow the functionality of format.title.for.label
1300 { 's := %holds the entire cvs string
1301 #1 'key.pos :=
1302 #0 'value.pos := %0= between first $ and :, 1=between : and second $, 2= at the end
1303 "" 't := %holds the resulting value
1304 {value.pos #0 = value.pos #1 = or}
1305 { s key.pos #1 substring$ 'title.char :=
1306 value.pos #0 =
1307 { title.char ":" = {#1 'value.pos := key.pos #1 + 'key.pos :=} 'skip$ if$}
1308 { title.char "$" =
1309 {#2 'value.pos :=}
1310 {t title.char * 't :=}
1311 if$}
1312 if$
1313 key.pos #1 + 'key.pos :=
1314 }
1315 while$
1316 t
1317 }
1318
1319 %generates and extended label of type {Author}{AUTHOR}{YEAR}
1320 %for abnt.cite.style=1 they will be of type {Author}{Author}{YEAR}
1321 %final result is placed into variable label
1322 FUNCTION {calc.extended.label}
1323 { "{"
1324 author empty$ not
1325 {author format.names.for.label1 * "}{" * author format.names.for.label2 *}
1326 {editor empty$ not
1327 {editor format.names.for.label1 * "}{" * editor format.names.for.label2 *}
1328 {org-short empty$ not
1329 %{org-short * "}{" * org-short "u" change.case$ *}
1330 {org-short * "}{" * org-short *}
1331 {organization empty$ not
1332 %{organization * "}{" * organization "u" change.case$ *}
1333 {organization * "}{" * organization *}
1334 {title empty$ not
1335 {title format.title.for.label *}
1336 {"nada}{NADA" *}
1337 if$}
1338 if$}
1339 if$}
1340 if$}
1341 if$
1342 "}{" *
1343 year empty$ 'skip$ {year *} if$
1344 'label := %place the stack into label
1345 % final } will be placed in reverse.pass
1346 }
1347 %generates and simple label of type "Author YEAR"
1348 %final result is placed onto the stack
1349 FUNCTION {calc.simple.label}
1350 { author empty$ not
1351 {author format.names.for.label1}
1352 {editor empty$ not
1353 {editor format.names.for.label1}
1354 {organization empty$ not
1355 {organization}
1356 {title empty$ not
1357 {title}
1358 {""}
1359 if$}
1360 if$}
1361 if$}
1362 if$
1363 year empty$ 'skip$ {" " * year *} if$
1364 }
1365
1366 FUNCTION {output.bibitem}
1367 { newline$
1368 abnt.alf
1369 {"\bibitem[" write$
1370 calc.simple.label
1371 write$ "]{"}
1372 {"\bibitem{"}
1373 if$
1374 write$ cite$ write$ "}" write$ newline$
1375 abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
1376 "{" write$
1377 "" before.all 'output.state :=
1378 }
1379 FUNCTION {output.hiddenbibitem}
1380 { newline$
1381 abnt.alf
1382 {"\hiddenbibitem[" write$
1383 calc.simple.label
1384 write$ "]{"}
1385 {"\bibitem{"}
1386 if$
1387 write$ cite$ write$ "}" write$ newline$
1388 abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
1389 "{" write$
1390 "" before.all 'output.state :=
1391 }
1392 FUNCTION {fin.entry}
1393 { add.period$ write$
1394 reprinted-from empty$ 'skip$
1395 {" " reprinted-text empty$
1396 {bbl.reprint} {reprinted-text} if$ * bbl.colon *
1397 "\abntreprintinfo{ " * reprinted-from * "}" * write$}
1398 if$
1399 abnt-note empty$ 'skip$
1400 {"\footnote{" abnt-note * "}" * write$} if$
1401 "}" write$
1402 %newline$
1403 write.entry.verbatim
1404 }
1405
1406 FUNCTION { abnt.display.options}
1407 { 's := 't :=
1408 abnt.show.options #1 = % "warn"
1409 {"opção " t * " passou para " * s * warning$ } 'skip$ if$
1410
1411 abnt.show.options #2 = % "list"
1412 {"Op\c c\~ao selecionada {\tt " t * "=}\verb+" * s * "+" * output new.sentence } 'skip$ if$
1413 }
1414
1415 FUNCTION { abnt-options1 }
1416 {
1417 abnt-show-options empty$
1418 'skip$
1419 {abnt-show-options "no" =
1420 {#0} {abnt-show-options "warn" =
1421 {#1} {abnt-show-options "list" =
1422 {#2 } {#0 } if$} if$} if$
1423 'abnt.show.options :=} % #0 "no"; #1 "warn"; #2 "list"
1424 if$
1425
1426 abnt.show.options #2 =
1427 {output.bibitem "Mudan\c ca de estilo ap\'os este ponto com o comando \verb!\citeoption{"
1428 cite$ * "}! " *
1429 output new.sentence} 'skip$ if$
1430
1431 abnt-show-options empty$
1432 'skip$ {"abnt-show-options" abnt-show-options abnt.display.options} if$
1433
1434 abnt-cite-style empty$
1435 'skip$
1436 {abnt-cite-style "(AUTHOR, YEAR)" =
1437 {#0 'abnt.cite.style :=}
1438 {abnt-cite-style "(Author, YEAR)" =
1439 {#1 'abnt.cite.style :=}
1440 {"opção " abnt-cite-style * " desconhecida" * warning$}
1441 if$}
1442 if$
1443 "abnt-cite-style" abnt-cite-style abnt.display.options}if$
1444
1445 abnt-experimental empty$
1446 'skip$ {abnt-experimental "yes" = 'abnt.experimental :=
1447 "abnt-experimental" abnt-experimental abnt.display.options} if$
1448
1449 abnt-emphasize duplicate$ empty$
1450 'pop$ {'abnt.emphasize :=
1451 "abnt-emphasize" abnt.emphasize abnt.display.options
1452 abnt-emphasize "\bf" = abnt-emphasize "\it" = or abnt-emphasize "\em" = or
1453 abnt-emphasize "\bfseries" = or
1454 {"não use " abnt-emphasize * " para abnt-emphasize em " * cite$ *
1455 ", isto alterará TODO o texto. Use \textbf ou \emph. Veja a documentação abnt-bibtex-doc para mais detalhes." * warning$}
1456 'skip$ if$
1457 } if$
1458
1459 abnt-doi empty$
1460 'skip$
1461 {abnt-doi "expand" =
1462 {abnt.doi.expand.to.url 'abnt.doi :=}
1463 {abnt-doi "link" =
1464 {abnt.doi.link 'abnt.doi :=}
1465 {abnt-doi "doi" =
1466 {abnt.doi.leave.as.is 'abnt.doi :=}
1467 {"opção " abnt-doi * " desconhecida" * warning$}
1468 if$}
1469 if$}
1470 if$
1471 "abnt-doi" abnt-doi abnt.display.options}if$
1472 }
1473 FUNCTION { abnt-options2 }
1474 {
1475 abnt-full-initials empty$
1476 'skip$ {abnt-full-initials "yes" = 'abnt.full.initials :=
1477 "abnt-full-initials" abnt-full-initials abnt.display.options} if$
1478
1479 abnt-last-names empty$
1480 'skip$
1481 {abnt-last-names "abnt" = {#0}
1482 {abnt-last-names "bibtex" = {#1} {#0} if$} if$
1483 'abnt.last.names :=
1484 "abnt-last-names" abnt-last-names abnt.display.options}
1485 if$
1486
1487 abnt-ldots-type empty$
1488 'skip$
1489 {abnt-ldots-type "none" = {#0}
1490 {abnt-ldots-type "normal" = {#1}
1491 {abnt-ldots-type "math" = {#2}
1492 {abnt-ldots-type "text" = {#1} {#0}
1493 if$} if$} if$} if$
1494 'abnt.ldots.type :=
1495 "abnt-ldots-type" abnt-ldots-type abnt.display.options}
1496 if$
1497
1498 abnt-missing-year empty$
1499 'skip$
1500 {abnt-missing-year "void" = {#0}
1501 {abnt-missing-year "sd" = {#1} {#0} if$}
1502 if$
1503 'abnt.missing.year :=
1504 "abnt-missing-year" abnt-missing-year abnt.display.options}
1505 if$
1506
1507 abnt-and-type empty$
1508 'skip$ {abnt-and-type "e" =
1509 {#0} {abnt-and-type "&" =
1510 {#1} {#0} if$} if$
1511 'abnt.and.type :=
1512 "abnt-and-type" abnt-and-type abnt.display.options}
1513 if$
1514
1515 abnt-thesis-year empty$
1516 'skip$ {abnt-thesis-year "final" =
1517 {#0} {abnt-thesis-year "title" =
1518 {#1} {abnt-thesis-year "both" =
1519 {#2} {#0} if$} if$} if$
1520 'abnt.thesis.year :=
1521 "abnt-thesis-year" abnt-thesis-year abnt.display.options}
1522 if$
1523
1524 abnt-refinfo empty$
1525 'skip$ {abnt-refinfo "yes" = 'abnt.refinfo :=
1526 "abnt-refinfo" abnt-refinfo abnt.display.options} if$
1527 }
1528 FUNCTION { abnt-options3 }
1529 {
1530
1531 abnt-dont-use-etal empty$
1532 'skip$ {abnt-dont-use-etal "yes" = {#0 'abnt.etal.list :=} 'skip$ if$
1533 "Uso da opção abnt-dont-use-etal se tornou obsoleto, usamos abnt-etal-list." warning$
1534 "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
1535
1536 abnt-etal-cite empty$
1537 'skip$ {abnt-etal-cite str.to.int 'abnt.etal.cite :=
1538 "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
1539
1540 abnt-etal-list empty$
1541 'skip$ {abnt-etal-list str.to.int 'abnt.etal.list :=
1542 "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
1543
1544 abnt-etal-text missing$
1545 'skip$ {abnt-etal-text 'abnt.etal.text :=
1546 "abnt-etal-text" abnt.etal.text abnt.display.options} if$
1547
1548 abnt-no-etal-label empty$
1549 'skip$ {abnt-no-etal-label "yes" = {#0 'abnt.etal.cite :=} 'skip$ if$
1550 "Uso da opção abnt-no-etal-label se tornou obsoleto, usamos abnt-etal-cite." warning$
1551 "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
1552
1553 abnt-repeated-author-omit empty$
1554 'skip$ {abnt-repeated-author-omit "yes" =
1555 {#1 'abnt.repeated.author.omit :=}
1556 {#0 'abnt.repeated.author.omit := "" 'previous.author :=} if$
1557 "abnt-repeated-author-omit" abnt-repeated-author-omit abnt.display.options} if$
1558
1559 abnt-repeated-title-omit empty$ 'skip$
1560 {abnt-repeated-title-omit "yes" =
1561 {#1 'abnt.repeated.title.omit :=}
1562 {#0 'abnt.repeated.title.omit := "" 'previous.title :=} if$
1563 "abnt-repeated-title-omit" abnt-repeated-title-omit abnt.display.options
1564 abnt.repeated.author.omit not abnt.repeated.title.omit and
1565 {"Use abnt-repeated-title-omit=yes junto com abnt-repeated-author-omit=yes"
1566 warning$} 'skip$ if$} if$
1567
1568 abnt-title-command empty$
1569 'skip$ {abnt-title-command "yes" =
1570 {#1 'abnt.title.command :=}
1571 {#0 'abnt.title.command :=} if$
1572 "abnt-title-command" abnt-title-command abnt.display.options} if$
1573
1574 abnt-url-package empty$ 'skip$
1575 {abnt-url-package "url" =
1576 {#1 'abnt.url.package :=}
1577 {abnt-url-package "hyperref" = {#2 'abnt.url.package :=} 'skip$ if$}
1578 if$
1579 "abnt-url-package" abnt-url-package abnt.display.options}
1580 if$
1581
1582 abnt-verbatim-entry empty$
1583 'skip$ {abnt-verbatim-entry "yes" = 'abnt.verbatim.entry :=
1584 "abnt-verbatim-entry" abnt-verbatim-entry abnt.display.options} if$
1585
1586 abnt.show.options #2 = 'fin.entry 'skip$ if$
1587 }
1588
1589 %we had to break this function in two parts because of the following message:
1590 %Sorry---you've exceeded BibTeX's single function space 100
1591 %(That was a fatal error)
1592 FUNCTION { iso-options1 }
1593 {
1594 iso-abbreviation empty$
1595 'skip$ {iso-abbreviation "standard" = 'iso.abbreviation :=
1596 "iso-abbreviation" iso-abbreviation abnt.display.options} if$
1597 iso-author-punctuation empty$
1598 'skip$ {iso-author-punctuation "void" = 'iso.author.punctuation :=
1599 "iso-author-punctuation" iso-author-punctuation abnt.display.options} if$
1600 iso-date-place empty$
1601 'skip$ {iso-date-place "ISO" = 'iso.date.place :=
1602 "iso-date-place" iso-date-place abnt.display.options} if$
1603 }
1604
1605 FUNCTION { abnt-options }
1606 {
1607 abnt-options1
1608 abnt-options2
1609 abnt-options3
1610 iso-options1
1611 }
1612
1613 FUNCTION { iso-options } { abnt-options }
1614
1615 FUNCTION { iso.year.label }
1616 { iso.date.place
1617 { abnt.alf
1618 {year.label output new.sentence}
1619 'skip$ if$}
1620 'skip$ if$}
1621
1622 FUNCTION { iso.date }
1623 { iso.date.place
1624 { abnt.alf
1625 'skip$
1626 {year output new.sentence}
1627 if$}
1628 'skip$ if$}
1629
1630 FUNCTION { non.iso.date }
1631 {iso.date.place 'skip$ {format.date output} if$}
1632
1633 FUNCTION {article}
1634 { output.bibitem
1635 format.author.or.organization new.sentence
1636 iso.year.label
1637 format.title "title" output.check new.block
1638 format.journal output
1639 iso.date.place {format.year output} 'skip$ if$
1640 %iso.date.place {format.date output} 'skip$ if$
1641 %iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1642 % {format.year output new.sentence} if$
1643 section "section" bibinfo.check output.dash
1644 publisher "publisher" bibinfo.check output
1645 address "address" bibinfo.check output
1646 format.volume output
1647 format.number output
1648 format.pages output
1649 non.iso.date
1650 format.issn output new.block
1651 format.note output new.block
1652 format.doi output new.block
1653 format.url
1654 fin.entry
1655 }
1656 FUNCTION {book}
1657 { output.bibitem
1658 format.author.or.editor.or.organization new.sentence
1659 iso.year.label
1660 format.type output new.sentence
1661 format.btitle "title" output.check new.sentence
1662 format.furtherresp new.sentence
1663 format.edition output new.sentence
1664 format.publisher.address output
1665 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1666 {format.year output new.sentence} if$
1667 format.volume output new.sentence
1668 format.book.pages output
1669 format.illustrated
1670 format.dimensions new.sentence
1671 format.howpublished output new.sentence
1672 format.volume.number.series output new.sentence
1673 format.note output
1674 format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
1675 format.isbn output new.sentence
1676 format.doi output new.block
1677 format.url
1678 fin.entry
1679 }
1680 FUNCTION {booklet}
1681 { output.bibitem
1682 format.author.or.editor.or.organization new.sentence
1683 iso.year.label
1684 format.type output new.sentence
1685 format.btitle "title" output.check new.sentence
1686 format.edition output new.sentence
1687 address "address" bibinfo.check output
1688 format.bvolume output
1689 %format.date output new.sentence
1690 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1691 {format.year output new.sentence} if$
1692 format.book.pages output new.sentence
1693 format.volume.number.series output new.sentence
1694 format.note output
1695 format.isbn output new.sentence
1696 format.doi output new.block
1697 format.url
1698 fin.entry
1699 }
1700
1701 FUNCTION {hidden}
1702 { output.hiddenbibitem
1703 fin.entry}
1704
1705 FUNCTION {inbook}
1706 { output.bibitem
1707 format.author.or.organization new.sentence
1708 iso.year.label
1709 format.title "title" output.check new.block
1710 format.in.ed.booktitle
1711 format.furtherresp new.sentence
1712 format.edition output new.sentence
1713 format.publisher.address output
1714 %format.year output new.sentence
1715 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1716 {format.year output new.sentence} if$
1717 format.bvolume.if.no.series output
1718 format.volume.number.series output
1719 format.chapter.pages output new.sentence
1720 format.isbn output new.block
1721 format.note output new.block
1722 format.doi output new.block
1723 format.url
1724 fin.entry
1725 }
1726
1727 FUNCTION {incollection}
1728 { output.bibitem
1729 format.author.or.organization new.sentence
1730 iso.year.label
1731 format.title "title" output.check new.sentence
1732 format.in.ed.booktitle
1733 format.edition output new.sentence
1734 format.publisher.address output
1735 %format.year output
1736 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1737 {format.year output} if$
1738 format.volume.number.series output new.sentence
1739 format.bvolume.if.no.series output
1740 format.chapter.pages output new.sentence
1741 format.isbn output new.block
1742 format.note output new.block
1743 format.doi output new.block
1744 format.url
1745 fin.entry
1746 }
1747 FUNCTION {inproceedings}
1748 { output.bibitem
1749 format.author.or.organization new.sentence
1750 iso.year.label
1751 format.title "title" output.check new.sentence
1752 format.in.ed.booktitle
1753 format.publisher.address output
1754 %format.year output new.sentence
1755 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1756 {format.year output new.sentence} if$
1757 format.bvolume.if.no.series output
1758 format.volume.number.series output
1759 format.pages output
1760 format.isbn output
1761 format.issn output new.sentence
1762 format.note output new.sentence
1763 format.doi output new.block
1764 format.url
1765 fin.entry
1766 }
1767 FUNCTION {journalpart}
1768 { output.bibitem
1769 format.author.or.editor.or.organization new.sentence
1770 iso.year.label
1771 format.type output new.sentence
1772 format.btitle "title" output.check new.sentence
1773 format.furtherresp new.sentence
1774 format.edition output new.sentence
1775 format.publisher.address output
1776 format.volume output
1777 format.number output
1778 %format.date output new.sentence
1779 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1780 {format.date output new.sentence} if$
1781 format.book.pages output
1782 format.illustrated
1783 format.dimensions new.sentence
1784 format.note output
1785 format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
1786 format.isbn output new.sentence
1787 format.doi output new.block
1788 format.url
1789 fin.entry
1790 }
1791 FUNCTION {conference} { inproceedings }
1792 FUNCTION {manual}
1793 { output.bibitem
1794 format.author.or.editor.or.organization new.sentence
1795 iso.year.label
1796 format.btitle "title" output.check new.block
1797 format.furtherresp new.sentence
1798 format.edition output new.sentence
1799 format.address output
1800 %format.date output new.sentence
1801 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1802 {format.year output new.sentence} if$
1803 format.bvolume.if.no.series output
1804 format.book.pages output new.sentence
1805 format.volume.number.series output new.sentence
1806 format.note output new.sentence
1807 format.doi output new.block
1808 format.url
1809 fin.entry
1810 }
1811
1812 FUNCTION {misc}
1813 { output.bibitem
1814 format.author.or.editor.or.organization new.sentence
1815 iso.year.label
1816 format.type output
1817 format.btitle output new.sentence
1818 format.furtherresp new.sentence
1819 format.publisher.address.relax output
1820 %format.date output new.block
1821 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1822 {format.year output new.sentence} if$
1823 format.book.pages output new.sentence
1824 format.illustrated
1825 format.dimensions new.sentence
1826 format.howpublished output new.block
1827 format.volume.number.series output new.sentence
1828 format.note output new.block
1829 format.doi output new.block
1830 format.url
1831 fin.entry
1832 empty.misc.check
1833 }
1834
1835 FUNCTION {patent}
1836 { output.bibitem
1837 format.editor.or.organization new.sentence
1838 iso.year.label
1839 format.authors.plain output new.sentence
1840 format.btitle output new.sentence
1841 format.furtherresp new.sentence
1842 %format.date output new.block
1843 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1844 {format.year output new.sentence} if$
1845 format.patent.number output
1846 format.howpublished output new.block
1847 format.note output new.block
1848 format.url
1849 fin.entry
1850 empty.misc.check
1851 }
1852
1853 FUNCTION {format.thesis.type}
1854 { type$ "phdthesis" =
1855 {bbl.phdthesis}
1856 {type$ "mastersthesis" =
1857 {bbl.mthesis}
1858 {type$ "monography" =
1859 {bbl.monography}
1860 {bbl.void}
1861 if$}
1862 if$}
1863 if$
1864 type empty$
1865 {type missing$
1866 {type$ "phdthesis" =
1867 { " (" bbl.phd * ")" *}
1868 {type$ "mastersthesis" = { " (" bbl.master * ")" *} {pop$ ""} if$}
1869 if$}
1870 {""}
1871 if$}
1872 {type$ "thesis" =
1873 {type}
1874 {" (" type * ")" * "type" bibinfo.check}
1875 if$}
1876 if$
1877 * %joins first and second part of this function
1878 }
1879 FUNCTION {thesis}
1880 { output.bibitem
1881 format.authors "author" output.check new.block
1882 iso.year.label
1883 format.btitle "title" output.check new.block
1884 abnt.thesis.year #1 = abnt.thesis.year #2 = or
1885 {format.date "year" output.check new.sentence} 'skip$ if$
1886 format.year.presented output new.sentence
1887 format.book.pages output new.sentence
1888 format.thesis.type output.nonnull
1889 school "school" bibinfo.warn output.dash
1890 address "address" bibinfo.check output
1891 abnt.thesis.year #0 = abnt.thesis.year #2 = or
1892 {format.date "year" output.check new.sentence} 'skip$ if$
1893 format.note output new.block
1894 format.doi output new.block
1895 format.url
1896 fin.entry
1897 }
1898
1899 FUNCTION {phdthesis} { thesis }
1900 FUNCTION {mastersthesis} { thesis }
1901 FUNCTION {monography} { thesis }
1902
1903 FUNCTION {proceedings}
1904 { output.bibitem
1905 iso.year.label
1906 format.editor.or.organization
1907 format.conference.info
1908 format.btitle "title" output.check
1909 format.bvolume output
1910 format.volume.number.series output
1911 editor empty$
1912 { publisher empty$
1913 'skip$
1914 { new.sentence format.publisher.address output format.year output}
1915 if$
1916 }
1917 { publisher empty$
1918 { new.sentence
1919 format.organization.address output format.year output}
1920 { new.sentence
1921 organization "organization" bibinfo.check output
1922 format.publisher.address output format.year output}
1923 if$ }
1924 if$
1925 new.sentence format.book.pages output new.sentence
1926 format.isbn output
1927 format.issn output new.block
1928 format.note output new.block
1929 format.doi output new.block
1930 format.url
1931 fin.entry
1932 }
1933
1934 FUNCTION {techreport} {manual}
1935
1936 FUNCTION {unpublished}
1937 { output.bibitem
1938 format.author.or.editor.or.organization new.sentence
1939 iso.year.label
1940 format.title "title" output.check new.sentence
1941 format.note "note" output.check new.sentence
1942 %format.date output new.sentence
1943 iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
1944 {format.year output new.sentence} if$
1945 format.doi output new.block
1946 format.url
1947 fin.entry
1948 }
1949
1950 FUNCTION {default.type} { misc }
1951 READ
1952 FUNCTION {sortify}
1953 { purify$
1954 "l" change.case$
1955 }
1956 INTEGERS { len }
1957 FUNCTION {chop.word}
1958 { 's :=
1959 'len :=
1960 s #1 len substring$ =
1961 { s len #1 + global.max$ substring$ }
1962 's
1963 if$
1964 }
1965 FUNCTION {sort.format.names}
1966 { 's :=
1967 #1 'nameptr :=
1968 ""
1969 s num.names$ 'numnames :=
1970 numnames 'namesleft :=
1971 { namesleft #0 > }
1972 { format.single.name 't :=
1973 nameptr #1 >
1974 {
1975 nameptr #3
1976 #1 + =
1977 numnames #3
1978 > and
1979 { "others" 't :=
1980 #1 'namesleft := }
1981 'skip$
1982 if$
1983 " " *
1984 namesleft #1 = t "others" = and
1985 { "zzzzz" * }
1986 { t sortify * }
1987 if$
1988 }
1989 { t sortify * }
1990 if$
1991 nameptr #1 + 'nameptr :=
1992 namesleft #1 - 'namesleft :=
1993 }
1994 while$
1995 }
1996
1997 FUNCTION {sort.format.title}
1998 { 't :=
1999 "A " #2
2000 "An " #3
2001 "The " #4 t chop.word
2002 chop.word
2003 chop.word
2004 sortify
2005 #1 global.max$ substring$
2006 }
2007 FUNCTION {any.sort}
2008 { author empty$
2009 { organization empty$
2010 { editor empty$
2011 { title empty$
2012 { key empty$
2013 { "para ordenar, precisa dos campos author, organization, editor, title ou key in " cite$ * warning$ ""}
2014 { key sortify }
2015 if$}
2016 { title sortify}
2017 if$}
2018 { editor sort.format.names }
2019 if$}
2020 { organization sortify }
2021 if$}
2022 { author sort.format.names }
2023 if$
2024 }
2025
2026 FUNCTION {presort}
2027 {
2028 any.sort
2029 " " * year field.or.null sortify * " " * title field.or.null
2030 sort.format.title * #1 entry.max$ substring$
2031 %for non-alpha style we drop a void sort.key such that SORT has no effect
2032 abnt.alf 'skip$ {pop$ ""} if$ 'sort.key$ :=
2033 year empty$ {""} {year} if$ 'year.label :=
2034 calc.extended.label
2035 }
2036
2037 FUNCTION {set.default.abnt.variables}
2038 { %if you change abnt-num to abnt-alf by hand you need also to change
2039 %the name of RCSfile by hand, otherwise cvs takes care of it.
2040 %
2041 "$RCSfile: unbtex-alf-pt.bst,v $ " extract.cvs.key
2042 %
2043 "unbtex-alf-pt.bst,v " = 'abnt.alf := % #1 para abnt-alf #0 para abnt-num
2044 "$Revision: v-1.9.7 $" extract.cvs.key 'abnt.bst.revision :=
2045 #0 'abnt.and.type := % #0 "e"; #1 "&"
2046 "\emph" 'abnt.emphasize :=
2047 #0 'abnt.cite.style := %default norm version for NBR10520
2048 %#0 \cite=(AUTHOR, YEAR)
2049 %#1 \cite=(Author, YEAR)
2050 #0 'abnt.experimental :=
2051 abnt.doi.expand.to.url 'abnt.doi :=
2052 #3 'abnt.etal.cite :=
2053 #3 'abnt.etal.list :=
2054 "et al." 'abnt.etal.text :=
2055 #0 'abnt.full.initials :=
2056 #0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
2057 #1 'abnt.ldots.type := %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
2058 #0 'abnt.missing.year := %#0 "void"; #1 "[s.d.]"
2059 #0 'repeated.author :=
2060 #0 'abnt.repeated.author.omit :=
2061 #0 'abnt.repeated.title.omit :=
2062 #1 'abnt.refinfo :=
2063 #0 'abnt.show.options := % #0 "no"; #1 "warn"; #2 "list"
2064 #0 'abnt.thesis.year := % #0 "final"; #1 "title"; #2 "both"
2065 #0 'abnt.title.command := % #0 "no"; #1 "yes"
2066 #0 'abnt.url.package := % #0 "none"'; #2 "url"; #2 "hyperref"
2067 #0 'abnt.verbatim.entry :=
2068 }
2069 FUNCTION {set.default.iso.variables}
2070 { #0 'iso.abbreviation := % #0 ABNT-style; #1 ISO-style
2071 #0 'iso.author.punctuation := % #0 ABNT (Smith, A. B.); #1 ISO (Smith, AB)
2072 #0 'iso.date.place := % #0 ABNT-sty; #1 ISO-style
2073 }
2074 EXECUTE {set.default.abnt.variables}
2075 EXECUTE {set.default.iso.variables}
2076 FUNCTION {process.early.abnt.options}
2077 {%here we intercept all entries which need priority handling
2078 %note: we cannot use type$ at this point
2079 abnt-and-type missing$
2080 abnt-experimental missing$ and
2081 abnt-etal-cite missing$ and
2082 abnt-etal-text missing$ and
2083 abnt-ldots-type missing$ and
2084 abnt-cite-style missing$ and
2085 abnt-no-etal-label missing$ and
2086 abnt-title-command missing$ and
2087 'skip$ {call.type$} if$
2088 }
2089 ITERATE {process.early.abnt.options}
2090 FUNCTION {search.reprinted}
2091 { reprinted-from missing$ 'skip$
2092 {"\nocite{" reprinted-from * "}" * write$ newline$
2093 }
2094 if$
2095 }
2096 ITERATE {search.reprinted}
2097 FUNCTION {abntreprintinfo}
2098 {"\providecommand{\abntreprintinfo}[1]{%" write$ newline$
2099 " \citeonline{#1}}" write$ newline$}
2100 EXECUTE {abntreprintinfo}
2101 ITERATE {presort}
2102 SORT
2103 STRINGS { last.label next.extra}
2104 INTEGERS { last.extra.num }
2105 FUNCTION {forward.pass}
2106 { last.label label =
2107 { last.extra.num #1 + 'last.extra.num :=
2108 last.extra.num int.to.chr$ 'extra.label :=
2109 }
2110 { "a" chr.to.int$ 'last.extra.num :=
2111 "" 'extra.label :=
2112 label 'last.label :=
2113 }
2114 if$
2115 }
2116
2117 FUNCTION {reverse.pass}
2118 { next.extra "b" =
2119 { "a" 'extra.label := }
2120 'skip$
2121 if$
2122 label extra.label * 'label :=
2123 year.label extra.label * 'year.label :=
2124 extra.label 'next.extra :=
2125 label "}" * 'label :=
2126 }
2127 ITERATE {forward.pass}
2128 REVERSE {reverse.pass}
2129 FUNCTION {begin.bib}
2130 {
2131 abnt.alf
2132 {"\setlength{\labelsep}{0pt}" write$}
2133 'skip$
2134 if$
2135 "\begin{thebibliography}{}" write$ newline$
2136 preamble$ empty$
2137 'skip$
2138 { preamble$ write$ newline$ }
2139 if$
2140 abnt.refinfo #1 =
2141 {"\providecommand{\abntrefinfo}[3]{}" write$ newline$}
2142 'skip$ if$
2143 "\providecommand{\abntbstabout}[1]{}" write$ newline$
2144 abnt.title.command
2145 {"\providecommand{\bibtextitlecommand}[2]{#2}" write$ newline$}
2146 'skip$ if$
2147 "\abntbstabout{" abnt.bst.revision * "}" * write$ newline$
2148 % Ajusta o espaçamento entre linhas nas referências bibliográficas
2149 %"\setlength{\baselineskip}{1.0\baselineskip}" write$ newline$
2150 %"\setlength{\itemsep}{0pt}" write$ newline$
2151 }
2152 EXECUTE {begin.bib}
2153 EXECUTE {init.state.consts}
2154 FUNCTION {process.entry}{call.type$}
2155 ITERATE {process.entry}
2156 FUNCTION {end.bib}
2157 { newline$ "\end{thebibliography}" write$ newline$
2158 }
2159 EXECUTE {end.bib}