summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fcavtex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/fcavtex
Initial commit
Diffstat (limited to 'macros/latex/contrib/fcavtex')
-rw-r--r--macros/latex/contrib/fcavtex/README69
-rw-r--r--macros/latex/contrib/fcavtex/examples/basico-cap1.tex12
-rw-r--r--macros/latex/contrib/fcavtex/examples/basico-principal.pdfbin0 -> 36215 bytes
-rw-r--r--macros/latex/contrib/fcavtex/examples/basico-principal.tex41
-rw-r--r--macros/latex/contrib/fcavtex/examples/basico-resumo.tex3
-rw-r--r--macros/latex/contrib/fcavtex/fcavtex.bst2248
-rw-r--r--macros/latex/contrib/fcavtex/fcavtex.cls482
-rw-r--r--macros/latex/contrib/fcavtex/manual/fcavtex.pdfbin0 -> 291510 bytes
-rw-r--r--macros/latex/contrib/fcavtex/manual/fcavtex.tex234
9 files changed, 3089 insertions, 0 deletions
diff --git a/macros/latex/contrib/fcavtex/README b/macros/latex/contrib/fcavtex/README
new file mode 100644
index 0000000000..824f539398
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/README
@@ -0,0 +1,69 @@
+ fcavTeX
+ Normas FCAV/UNESP - Jaboticabal
+ Teses e Dissertações
+
+-----------------------------------------------------------------
+
+Este arquivo leia-me traz o histórico de modificações dos arquivos
+da classe fcavTeX, criada para formatação automática segundo as
+normas da Faculdade de Ciências Agrárias e Veterinárias de Jaboticabal
+UNESP.
+
+Apesar da recomendação para que os arquivos da classe base abnTeX2
+não fossem alterados, o arquivo abntex2-alf.bst teve que ser
+modificado para atender as exigências da Universidade.
+
+A versão mais recente do fcavTeX é v-1.0.
+
+Histórico de modificações
+-----------------------------------------------------------------
+ 06/08/2015 - v-1.1
+ . correções de bugs e organização do pacote
+-----------------------------------------------------------------
+ 27/06/2015 - v-1.0
+ . versão incial CTAN
+
+INSTALAÇÃO
+-----------------------------------------------------------------
+
+Instalação Manual
+------------------
+
+Você pode instalar a classe manualmente colocando os arquivos
+abaixo em qualquer caminho que seus compiladores LaTeX possam
+encontrá-los. Normalmente isso é feito colocando-os na mesma
+pasta do seu arquivo .tex.
+
+ abntex2-alf.bst Arquivo de manipulação das entradas
+ bibliográficas e geração da lista
+ de referências.
+ unespfcav.cls Arquivo de classe configurado de
+ acordo com as normas mais recentes
+ da universidade.
+
+
+CÓPIA E MODIFICAÇÃO
+-----------------------------------------------------------------
+
+Copyright 2015 fcavTeX Walter Maldonado Junior
+
+Este pacote pode ser redistribuído e/ou modificado de acordo com
+os termos da 'LaTeX Project Public License' distribuída nos
+arquivos CTAN no diretório macros/latex/base/lppl.txt; na versão
+1.3 da licensa ou, (à sua escolha) qualquer versão mais recente.
+
+This package can be redistributed and/or modified under the terms
+of the LaTeX Project Public License distributed from CTAN
+archives in the directory macros/latex/base/lppl.txt; either
+version 1.3 of the license, or (at your option) any later version.
+
+AJUDA
+-----------------------------------------------------------------
+
+Maiores informações em:
+
+https://github.com/waltermaldonado/fcavTeX
+
+Precisamos de colaboradores, toda ajuda é bem vinda!
+
+Walter Maldonado Junior - walter@agroestat.com.br
diff --git a/macros/latex/contrib/fcavtex/examples/basico-cap1.tex b/macros/latex/contrib/fcavtex/examples/basico-cap1.tex
new file mode 100644
index 0000000000..9d7b94689b
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/examples/basico-cap1.tex
@@ -0,0 +1,12 @@
+\chapter{Considerações gerais}
+\section{Introdução}
+
+Texto texto texto texto.
+
+\section{Revisão de Literatura}
+
+Primeiro parágrado da seção Revisão de Literatura. Texto texto texto.
+
+Segundo parágrafo.
+
+\bibliography{meuarquivobibtex.bib}
diff --git a/macros/latex/contrib/fcavtex/examples/basico-principal.pdf b/macros/latex/contrib/fcavtex/examples/basico-principal.pdf
new file mode 100644
index 0000000000..9a202063b0
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/examples/basico-principal.pdf
Binary files differ
diff --git a/macros/latex/contrib/fcavtex/examples/basico-principal.tex b/macros/latex/contrib/fcavtex/examples/basico-principal.tex
new file mode 100644
index 0000000000..85db891c63
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/examples/basico-principal.tex
@@ -0,0 +1,41 @@
+\documentclass{fcavtex}
+
+\begin{document}
+
+\titulo{Estimativa da produção de citros usando imagens digitais}
+\tituloingles{Citrus yield estimation using digital images}
+\autor{Walter Maldonado Jr}
+\orientador{Prof. Dr. José Carlos Barbosa}
+\qualificacaoautor{Engenheiro agrônomo}
+\instituicao{UNIVERSIDADE ESTADUAL PAULISTA \textendash\ UNESP\par CÂMPUS DE JABOTICABAL}
+\tipodoc{Tese}
+\titulopretendido{Doutor}
+\programa{Agronomia (Produção Vegetal)}
+\ano{2015}
+\banca{José Carlos Barbosa, Wilson Itamar Maruyama, Renata Aparecida da Andrade}
+\email{walter@agroestat.com.br}
+\palavraschave{laranja, safra, projeção, teste}
+\keywords{orange, crop, forecasting}
+\nomefichacatalografica{Maldonado Jr, Walter}
+\cutter{cutter}
+\cdu{CDU 999:999.999.9:999.99}
+
+\capa
+\folhaderosto
+\fichacatalografica
+\certificadodeaprovacao{}
+\dadoscurriculares{Dados curriculares aqui!}
+\epigrafe{Epígrafe}
+\dedicatoria{Dedicatória}
+\agradecimentos{Agradecimentos aqui!}
+\sumario
+\include{basico-resumo}
+\abstract{}{}
+\listadetabelas
+\listadefiguras
+
+\corpodotextoemcapitulos
+
+\include{basico-cap1}
+
+\end{document}
diff --git a/macros/latex/contrib/fcavtex/examples/basico-resumo.tex b/macros/latex/contrib/fcavtex/examples/basico-resumo.tex
new file mode 100644
index 0000000000..53c7c80b53
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/examples/basico-resumo.tex
@@ -0,0 +1,3 @@
+\resumo{palavra1, palavra2, palavra3}{
+ Texto do resumo.
+}
diff --git a/macros/latex/contrib/fcavtex/fcavtex.bst b/macros/latex/contrib/fcavtex/fcavtex.bst
new file mode 100644
index 0000000000..6742d4c47c
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/fcavtex.bst
@@ -0,0 +1,2248 @@
+%% fcavtex.bst, v-1.1 waltermaldonado
+%% Copyright 2015 by Walter Maldonado Jr
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% This file is a modified version of the one provided by Lauro César Araujo
+%% Further information are available on https://github.com/waltermaldonado/fcavTeX
+%%
+%% The Current Maintainer of this work is Walter Maldonado Jr
+%%
+%% Creator and original mantainer: Gerald Weber <gweber@codigolivre.org.br>
+%% Copyright 2001-2002 by the abnTeX group at http://abntex.codigolivre.org.br
+%%
+%% This file is an *extensive* modification from a file generated with the docstrip utility.
+%% The original source files were:
+%% merlin.mbs (with options: `babel,nm-revf,aunm-semi,nmlm,x3,m3,dt-end,yr-com,xmth,vnum-x,volp-com,jwdpg,jwdvol,num-xser,btit-rm,bt-rm,pg-bk,add-pub,pub-date,pub-xpar,pre-pub,isbn,issn,pp,ed,abr,ednx,nfss')
+%% These sourefiles are copyrighted by Patrick W Daly
+
+ENTRY
+ { address author
+ booktitle booksubtitle
+ chapter conference-number conference-year conference-location
+ edition editor editortype
+ dimensions furtherresp
+ howpublished illustrated institution
+ isbn issn journal key month note marginnote number organization
+ org-short pages pagename
+ publisher reprinted-from reprinted-text school
+ series subtitle section title type url urldate
+ volume year year-presented
+ abnt-and-type
+ abnt-doi abnt-dont-use-etal
+ abnt-etal-cite abnt-etal-list abnt-etal-text abnt-emphasize abnt-experimental
+ abnt-full-initials
+ abnt-last-names abnt-ldots-type
+ abnt-missing-year abnt-cite-style abnt-no-etal-label abnt-note
+ abnt-repeated-author-omit abnt-repeated-title-omit
+ abnt-show-options abnt-refinfo abnt-thesis-year abnt-url-package
+ abnt-title-command
+ abnt-verbatim-entry
+ iso-abbreviation iso-author-punctuation iso-date-place
+ }{}{ label extra.label year.label}
+
+%revision string
+STRINGS { abnt.bst.revision }
+
+%general purpose strings
+STRINGS { r s t }
+
+%variables needed to implement the various abnt options
+STRINGS {abnt.etal.text abnt.emphasize previous.author previous.title}
+INTEGERS {abnt.alf abnt.cite.style abnt.doi
+ abnt.experimental abnt.etal.cite abnt.etal.list
+ abnt.full.initials
+ abnt.last.names abnt.ldots.type
+ abnt.missing.year
+ abnt.refinfo abnt.repeated.author.omit abnt.repeated.title.omit
+ abnt.show.options abnt.and.type
+ abnt.title.command
+ abnt.thesis.year
+ abnt.url.package abnt.verbatim.entry
+ iso.abbreviation iso.author.punctuation iso.date.place
+ repeated.author}
+
+%needed for title formatting
+INTEGERS { title.lenght title.pos first.word no.bracket}
+STRINGS { title.char}
+
+%needed for controlling the sentence position
+INTEGERS {output.state before.all mid.sentence after.sentence after.block }
+
+%needed for url identification
+INTEGERS {url.type}
+
+%static values for options
+%values for abnt.doi
+FUNCTION {abnt.doi.expand.to.url} {#0} %expands a doi address to its url correspondent
+FUNCTION {abnt.doi.link} {#1} %links doi to its url correspondent
+FUNCTION {abnt.doi.leave.as.is} {#2} %shows doi as is, external viewer will have
+ %to know what to do with a "doi:" document
+
+%values for url types
+FUNCTION {unknown.url} {#0}
+FUNCTION {http.url} {#1}
+FUNCTION {file.url} {#2}
+FUNCTION {ftp.url} {#3}
+FUNCTION {doi.url} {#4}
+FUNCTION {mailto.url} {#5}
+
+FUNCTION {init.state.consts}
+{ #0 'before.all :=
+ #1 'mid.sentence :=
+ #2 'after.sentence :=
+ #3 'after.block :=
+}
+
+%output.nonnull decides what is written before the argument s, if a comma, period etc.
+FUNCTION {output.nonnull}
+{ 's := %the argument is written into s
+ output.state mid.sentence =
+ { ", " * write$ } %mid.sentence first write comma
+ { output.state after.block =
+ { add.period$ write$ newline$ }
+ { output.state before.all = 'write$
+ { add.period$ " " * write$ }
+ if$}
+ if$
+ mid.sentence 'output.state := }
+ if$
+ s %now comes s
+}
+FUNCTION {output.nonnull.dash}
+{ 's := %the argument is written into s
+ output.state mid.sentence =
+ { " --- " * write$ } %mid.sentence first write comma
+ { output.state after.block =
+ { add.period$ write$ newline$ write$}
+ { output.state before.all = 'write$
+ { add.period$ " " * write$ }
+ if$}
+ if$
+ mid.sentence 'output.state := }
+ if$
+ s %now comes s
+}
+FUNCTION {output} %does nothing or calls output.nonull
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull
+ if$
+}
+FUNCTION {output.dash} %does nothing or calls output.nonull
+{ duplicate$ empty$
+ 'pop$
+ 'output.nonnull.dash
+ if$
+}
+FUNCTION {output.check} %like ouput, but complains if t empty
+{ 't :=
+ duplicate$ empty$
+ { pop$ "campo " t * " vazio em " * cite$ * warning$ }
+ 'output.nonnull
+ if$
+}
+
+FUNCTION {new.block}
+{ output.state before.all =
+ 'skip$
+ { after.block 'output.state := }
+ if$
+}
+FUNCTION {new.sentence}
+{ output.state after.block =
+ 'skip$
+ { output.state before.all =
+ 'skip$
+ { after.sentence 'output.state := }
+ if$
+ }
+ if$
+}
+FUNCTION {add.blank} { " " * before.all 'output.state :=}
+
+FUNCTION {date.block} {new.block}
+
+FUNCTION {not}
+{ { #0 }
+ { #1 }
+ if$
+}
+FUNCTION {and}
+{ 'skip$
+ { pop$ #0 }
+ if$
+}
+FUNCTION {or}
+{ { pop$ #1 }
+ 'skip$
+ if$
+}
+FUNCTION {new.block.checka}
+{ empty$
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.block.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.block
+ if$
+}
+FUNCTION {new.sentence.checka}
+{ empty$
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {new.sentence.checkb}
+{ empty$
+ swap$ empty$
+ and
+ 'skip$
+ 'new.sentence
+ if$
+}
+FUNCTION {field.or.null}
+{ duplicate$ empty$
+ { pop$ "" }
+ 'skip$
+ if$
+}
+FUNCTION {emphasize}
+{ duplicate$ empty$
+ { pop$ "" }
+ { abnt.emphasize "{" * swap$ * "}" * }
+ if$
+}
+
+
+FUNCTION {tie.or.space.prefix} %if text length less than 3 chars. uses a tie
+{ duplicate$ text.length$ #5 <
+ { "~" }
+ { " " }
+ if$
+ swap$
+}
+
+FUNCTION {no.space} { { "" } swap$ }
+
+
+FUNCTION {space.word} { " " swap$ * " " * }
+
+FUNCTION {bbl.and}
+{ abnt.and.type #0 = {" e "} 'skip$ if$
+ abnt.and.type #1 = {" \& "} 'skip$ if$}
+FUNCTION {bbl.chapter} { "cap." }
+FUNCTION {bbl.colon} {": "}
+FUNCTION {bbl.editors} { "Ed." }
+FUNCTION {bbl.editor} { "Ed." }
+FUNCTION {bbl.edby} { "editado por" }
+FUNCTION {bbl.edition} { "ed." }
+FUNCTION {bbl.empty} {""}
+FUNCTION {bbl.etal}{abnt.etal.text "" = {""} {" " abnt.etal.text *} if$}
+FUNCTION {bbl.doi.url} {"http://dx.doi.org/"}
+FUNCTION {bbl.in}{ "In" iso.abbreviation 'skip$ { bbl.colon *} if$}
+FUNCTION {bbl.ldots} %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
+{abnt.ldots.type
+ {abnt.ldots.type #1 = {"\ldots"} 'skip$ if$
+ abnt.ldots.type #2 = {"$\ldots$"} 'skip$ if$
+ abnt.ldots.type #3 = {"{...}"} 'skip$ if$}
+ {""} %for #0 use nothing
+if$}
+FUNCTION {bbl.master} { "Mestrado" }
+FUNCTION {bbl.missing.year}
+{abnt.missing.year
+ {"[s.d.]"} %#1
+ {""} %#0
+ if$}
+FUNCTION {bbl.monography} { "Monografia" }
+FUNCTION {bbl.mthesis} { "Disserta\c{c}\~{a}o" }
+FUNCTION {bbl.no.address} {"[S.l.]"}
+FUNCTION {bbl.no.address.no.publisher} {"[S.l.: s.n.]"}
+FUNCTION {bbl.no.publisher} {"[s.n.]"}
+FUNCTION {bbl.number} { iso.abbreviation {"no."} {"n."} if$ }
+FUNCTION {bbl.nr} { "n." }
+FUNCTION {bbl.of} { "de" }
+FUNCTION {bbl.phd} { "Doutorado" }
+FUNCTION {bbl.phdthesis} { "Tese" }
+FUNCTION {bbl.pages}
+ {pagename empty$
+ { "p." }
+ {pagename}
+ if$
+ }
+FUNCTION {bbl.page} { bbl.pages }
+FUNCTION {bbl.reprint} {"Separata de"}
+FUNCTION {bbl.semicolon} { "; "}
+FUNCTION {bbl.same.field} {"\underline{\ \ \ \ \ \ \ \ }"}
+FUNCTION {bbl.techrep} { "Rel. Tec." }
+FUNCTION {bbl.url.accessdate}
+ {iso.abbreviation { "Cited "} {"Acesso em: "} if$}
+FUNCTION {bbl.url.available}
+{ iso.abbreviation {"Available from Internet: "} {"Dispon{\'\i}vel em: "} if$}
+FUNCTION {bbl.void} {""}
+FUNCTION {bbl.volume} { iso.abbreviation {"vol."} {"v."} if$ }
+
+
+MACRO {jan} {"jan."}
+MACRO {feb} {"fev."}
+MACRO {mar} {"mar."}
+MACRO {apr} {"abr."}
+MACRO {may} {"maio"}
+MACRO {jun} {"jun."}
+MACRO {jul} {"jul."}
+MACRO {aug} {"ago."}
+MACRO {sep} {"set."}
+MACRO {oct} {"out."}
+MACRO {nov} {"nov."}
+MACRO {dec} {"dez."}
+
+
+FUNCTION {is.num}
+{ chr.to.int$
+ duplicate$ "0" chr.to.int$ < not
+ swap$ "9" chr.to.int$ > not and
+}
+FUNCTION {str.to.int}
+{ duplicate$ is.num
+ {chr.to.int$ #48 -}
+ 'skip$
+ if$
+}
+FUNCTION {bibinfo.check} %usage: field "field" bibinfo.check
+{ swap$ duplicate$ missing$
+ {pop$ pop$ ""}
+ { duplicate$ empty$
+ {swap$ pop$}
+ {swap$ pop$}
+ if$
+ }
+ if$
+}
+FUNCTION {bibinfo.warn}
+{ swap$
+ duplicate$ missing$
+ {swap$ "faltando " swap$ * " em " * cite$ * warning$ pop$ ""}
+ { duplicate$ empty$
+ {swap$ "vazio " swap$ * " em " * cite$ * warning$}
+ {swap$ pop$}
+ if$
+ }
+ if$
+}
+
+FUNCTION {write.field.verbatim}
+{
+duplicate$ missing$
+ {pop$ pop$}
+ {
+ s text.length$ #0 >
+ {s "," * newline$ write$ "" 's :=}
+ 'skip$
+ if$
+ swap$
+ "={" * swap$ * "}" *
+ s swap$ * 's :=
+ }
+if$
+}
+
+FUNCTION {write.entry.verbatim1}
+{
+ "address" address write.field.verbatim
+ "author" author write.field.verbatim
+ "booktitle" booktitle write.field.verbatim
+ "booksubtitle" booksubtitle write.field.verbatim
+ "chapter" chapter write.field.verbatim
+ "conference-number" conference-number write.field.verbatim
+ "conference-year" conference-year write.field.verbatim
+ "conference-location" conference-location write.field.verbatim
+ "edition" edition write.field.verbatim
+ "editor" editor write.field.verbatim
+ "editortype" editortype write.field.verbatim
+ "dimensions" dimensions write.field.verbatim
+ "furtherresp" furtherresp write.field.verbatim
+ "howpublished" howpublished write.field.verbatim
+ "illustrated" illustrated write.field.verbatim
+ "institution" institution write.field.verbatim
+ "isbn" isbn write.field.verbatim
+ "issn" issn write.field.verbatim
+ "journal" journal write.field.verbatim
+}
+FUNCTION {write.entry.verbatim2}
+{
+ "key" key write.field.verbatim
+ "month" month write.field.verbatim
+ "note" note write.field.verbatim
+ "marginnote" marginnote write.field.verbatim
+ "number" number write.field.verbatim
+ "organization" organization write.field.verbatim
+ "org-short" org-short write.field.verbatim
+ "pages" pages write.field.verbatim
+ "pagename" pagename write.field.verbatim
+ "publisher" publisher write.field.verbatim
+ "reprinted-from" reprinted-from write.field.verbatim
+ "reprinted-text" reprinted-text write.field.verbatim
+ "school" school write.field.verbatim
+ "series" series write.field.verbatim
+ "subtitle" subtitle write.field.verbatim
+ "section" section write.field.verbatim
+ "title" title write.field.verbatim
+ "type" type write.field.verbatim
+}
+FUNCTION {write.entry.verbatim3}
+{
+ "url" url write.field.verbatim
+ "urldate" urldate write.field.verbatim
+ "volume" volume write.field.verbatim
+ "year" year write.field.verbatim
+ "abnt-emphasize" abnt-emphasize write.field.verbatim
+ "abnt-experimental" abnt-experimental write.field.verbatim
+ "abnt-doi" abnt-doi write.field.verbatim
+ "abnt-dont-use-etal" abnt-dont-use-etal write.field.verbatim
+ "abnt-full-initials" abnt-full-initials write.field.verbatim
+ "abnt-ldots-type" abnt-ldots-type write.field.verbatim
+ "abnt-missing-year" abnt-missing-year write.field.verbatim
+ "abnt-cite-style" abnt-cite-style write.field.verbatim
+ "abnt-no-etal-label" abnt-no-etal-label write.field.verbatim
+ %abnt-note
+ "abnt-repeated-author-omit" abnt-repeated-author-omit write.field.verbatim
+ "abnt-repeated-title-omit" abnt-repeated-title-omit write.field.verbatim
+ "abnt-show-options" abnt-show-options write.field.verbatim
+ "abnt-refinfo" abnt-refinfo write.field.verbatim
+ "abnt-thesis-year" abnt-thesis-year write.field.verbatim
+ "abnt-title-command" abnt-title-command write.field.verbatim
+ "abnt-url-package" abnt-url-package write.field.verbatim
+ "abnt-verbatim-entry" abnt-verbatim-entry write.field.verbatim
+}
+
+FUNCTION {write.entry.verbatim}
+{"" 's := "" 't :=
+ abnt.verbatim.entry
+ {"{\footnotesize\begin{verbatim}" newline$ write$
+ "@" type$ * "{" * cite$ * 's :=
+ write.entry.verbatim1
+ write.entry.verbatim2
+ write.entry.verbatim3
+ s "" = {"}"} {s "}" *} if$
+ newline$ write$
+ "\end{verbatim}}" newline$ write$}
+ {newline$}
+if$}
+
+STRINGS { bibinfo}
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {get.person} {"{vv }{ll}{, jj}{, ff}" format.name$}
+FUNCTION {get.last.name} {#1 "{ll}" format.name$}
+FUNCTION {get.first.name} {#1 "{ff}" format.name$}
+FUNCTION {get.von} {#1 "{vv}" format.name$}
+FUNCTION {get.jr} {#1 "{jj}" format.name$}
+FUNCTION {is.composed.von}
+ {get.person
+ get.von duplicate$ empty$ {pop$ #0}
+ {duplicate$
+ get.first.name empty$ not
+ swap$ get.last.name empty$ not and
+ } if$
+ }
+
+FUNCTION {recompose.name}
+ {get.person duplicate$ duplicate$ duplicate$
+ get.von #1 "{ll }" format.name$ swap$
+ get.last.name *
+ swap$ #1 "{, ff}" format.name$ *
+ swap$ get.von #1 "{ ff}" format.name$ *
+ }
+
+
+FUNCTION {format.single.name}
+{
+s nameptr get.person 'r :=
+abnt.last.names
+ {r #1 "{ll}{ jj}" format.name$ "u" change.case$
+ abnt.full.initials
+ {r #1 "{, ff}{ vv}" format.name$ *}
+ {r #1 "{, f.}{ vv}" format.name$ *}
+ if$}
+ {%r #1 is.composed.von {r #1 recompose.name 'r :=} 'skip$ if$
+ r #1 "{ll}" format.name$
+ #1 "{ll}" format.name$
+ r #1 "{ jj}" format.name$ * "u" change.case$
+ abnt.full.initials
+ {r #1 "{, f.}{ vv}" format.name$ *
+ r #1 "{ll}" format.name$
+ #1 "{ f.}{ vv}" format.name$ *}
+ {iso.author.punctuation
+ {r #1 "{, f{}}{ vv}" format.name$ *}
+ {r #1 "{, f.}{ vv}" format.name$ *} if$
+ r #1 "{ll}" format.name$
+ #1 "{ f.}{ vv}" format.name$ *}
+ if$}
+
+if$
+}
+FUNCTION {format.names}
+{ 'bibinfo := duplicate$ empty$ 'skip$
+ {'s :=
+ "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { format.single.name
+ bibinfo bibinfo.check
+ 't :=
+ nameptr #1 >
+ {nameptr #1 #1 + = numnames abnt.etal.list > and
+ {abnt.etal.list {"others" 't := #1 'namesleft :=} 'skip$ if$ }
+ 'skip$
+ if$
+ namesleft #1 >
+ { "; " * t * }
+ { numnames #2 >
+ { "" * }
+ 'skip$
+ if$
+ s nameptr "{ll}" format.name$ duplicate$ "others" =
+ { 't := }
+ { pop$ }
+ if$
+ t "others" =
+ { bbl.etal *}
+ { "; " * t *}
+ if$ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+ } if$
+}
+
+%from plain.bst
+FUNCTION {format.names.plain}
+{ 's :=
+ #1 'nameptr :=
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ 't :=
+ nameptr #1 >
+ { namesleft #1 >
+ { ", " * t * }
+ { numnames #20 >
+ { "," * }
+ 'skip$
+ if$
+ t "others" =
+ { bbl.etal * }
+ { bbl.and * t * }
+ if$
+ }
+ if$
+ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+FUNCTION {format.names.ed} {format.names}
+
+FUNCTION {format.authors}
+{
+author "author" format.names
+}
+
+FUNCTION {format.authors.plain}
+{
+author format.names.plain
+}
+
+FUNCTION {get.bbl.editor} { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }
+
+
+FUNCTION {format.book.pages}
+{ pages "pages" bibinfo.check duplicate$ empty$
+ 'skip$
+ { "~" * bbl.pages * }
+ if$
+}
+FUNCTION {format.dimensions}
+{ dimensions empty$
+ 'skip$
+ { dimensions output}
+ if$
+}
+FUNCTION {format.furtherresp}
+{ furtherresp empty$
+ 'skip$
+ { furtherresp output}
+ if$
+}
+FUNCTION {format.illustrated}
+{ illustrated missing$
+ 'skip$
+ {illustrated empty$
+ {"il." output}
+ {illustrated output}
+ if$}
+ if$
+}
+FUNCTION {format.isbn}
+{ isbn "isbn" bibinfo.check duplicate$ empty$
+ 'skip$
+ {new.block "ISBN " swap$ *}
+ if$
+}
+
+FUNCTION {format.issn}
+{ issn "issn" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {new.block "ISSN " swap$ *}
+ if$
+}
+
+FUNCTION {format.note}
+{ note empty$
+ { "" }
+ { note #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$ }
+ if$
+ note #2 global.max$ substring$ * "note" bibinfo.check }
+ if$
+}
+
+FUNCTION {format.howpublished}
+{ howpublished empty$
+ { "" }
+ { howpublished #1 #1 substring$
+ duplicate$ "{" =
+ 'skip$
+ { output.state mid.sentence =
+ { "l" }
+ { "u" }
+ if$
+ change.case$ }
+ if$
+ howpublished #2 global.max$ substring$ * "howpublished" bibinfo.check }
+ if$
+}
+
+
+%ABNT styles require that the title acts as an author if
+%typical author fields are absent. In this case the first
+%word is uppercase. Our main problem is to establish what
+%the first word actually is since portuguese uses accents.
+%For example: Fun{\c c}\ão (Função) is a whole word but contains a
+%space, but if we write Fun\c{c}\ão \c is converted to uppercase...
+%You get the problem, don't you?
+FUNCTION {format.title.as.author}
+{ 's := %holds the title
+ #1 'title.pos := %our position in the title
+ #1 'first.word := %boolean, true if we already have the first word
+ #1 'no.bracket := %boolean, false if we are inside a {}
+ "" 't := %holds the first title.pos characters of the title
+ {first.word}
+ {s title.pos #1 substring$ 'title.char :=
+ %checks if the character is a {
+ title.char "{" = {#0 'no.bracket :=} 'skip$ if$
+ %if we are in a bracket
+ no.bracket 'skip$ {title.char "}" = {#1 'no.bracket :=} 'skip$ if$} if$
+ type$ "journalpart" =
+ {title.char "." = title.char ":" = or title.char "!" = or
+ title.char "," = or title.char ";" = or title.char "?" = or}
+ {title.char " " =}
+ if$ s t = or no.bracket and
+ {#0 'first.word :=
+ t title.char * "u" change.case$
+ title.pos #1 + 'title.pos :=
+ s title.pos global.max$ substring$ * 's :=}
+ {title.pos #1 + 'title.pos := t title.char * 't :=}
+ if$
+ }
+ while$
+s
+}
+
+
+%compares current title with the title of the previous entry
+FUNCTION {compare.title}
+{abnt.repeated.title.omit
+ {duplicate$ "" = 'skip$
+ {duplicate$ previous.title = repeated.author and
+ {duplicate$ 'previous.title := pop$ bbl.same.field}
+ {duplicate$ 'previous.title :=}
+ if$}
+ if$}
+ 'skip$
+ if$
+}
+
+FUNCTION {apply.title.command}
+{abnt.title.command
+ {duplicate$ empty$ 'skip$
+ {"\bibtextitlecommand{" type$ * "}{" * swap$ * "}" *}
+ if$}
+ 'skip$ if$
+}
+
+FUNCTION {format.title}
+{author empty$ editor empty$ and organization empty$ and
+ {title format.title.as.author}
+ {title duplicate$ empty$ {pop$ ""} {} if$}
+ if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$
+ apply.title.command
+ compare.title
+}
+
+FUNCTION {n.dashify}
+{
+ 't :=
+ ""
+ { t empty$ not }
+ { t #1 #1 substring$ "-" =
+ { t #1 #2 substring$ "--" = not
+ { "--" *
+ t #2 global.max$ substring$ 't :=
+ }
+ { { t #1 #1 substring$ "-" = }
+ { "-" *
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ }
+ if$
+ }
+ { t #1 #1 substring$ *
+ t #2 global.max$ substring$ 't :=
+ }
+ if$
+ }
+ while$
+}
+
+FUNCTION {word.in} { bbl.in " " * }
+
+FUNCTION {format.month}
+{ month empty$ 'skip$
+ {month "month" bibinfo.check}
+ if$
+}
+
+FUNCTION {format.date}
+{ year empty$
+ { month empty$
+ { bbl.missing.year }
+ { "existe o campo month (mês) mas não o campo year (ano) em " cite$ * warning$ month}
+ if$}
+ { month empty$
+ { year n.dashify}
+ { month " " * year * }
+ if$}
+ if$
+}
+FUNCTION {format.btitle}
+{author empty$ editor empty$ and organization empty$ and
+ {title format.title.as.author "title" bibinfo.check duplicate$ empty$ 'skip$ {} if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
+ {title "title" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
+ subtitle empty$ 'skip$ {subtitle ": " swap$ * "t" change.case$ *} if$}
+if$
+apply.title.command
+compare.title
+}
+FUNCTION {either.or.check}
+{ empty$
+ 'pop$
+ { "não posso usar ambos " swap$ * " os campos em " * cite$ * warning$ }
+ if$
+}
+
+FUNCTION {format.volume} %leaves formatted or empty volume on the stack
+{volume duplicate$ empty$
+ 'skip$
+ {volume #1 #1 substring$ is.num
+ {bbl.volume swap$ tie.or.space.prefix * *}
+ 'skip$
+ if$}
+ if$
+}
+
+FUNCTION {format.volume.no.bbl} %leaves formatted or empty volume on the stack
+{volume duplicate$ empty$
+ 'skip$
+ {volume #1 #1 substring$ is.num
+ {"" swap$ tie.or.space.prefix * "." * *}
+ 'skip$
+ if$}
+ if$
+}
+
+FUNCTION {anais.check.url}
+{ url empty$
+ {"Anais\ldots" emphasize}
+ {"Anais eletrônicos\ldots" emphasize}
+ if$
+}
+
+FUNCTION {format.number} %leaves formatted or empty number on the stack
+{ number duplicate$ empty$
+ 'skip$
+ {bbl.number swap$ tie.or.space.prefix * *}
+ if$
+}
+
+FUNCTION {format.patent.number}
+{ number
+}
+
+FUNCTION {format.bvolume}
+{ volume empty$
+ { "" }
+ { format.volume
+ number empty$ 'skip$ {output format.number} if$
+ series "series" bibinfo.check
+ duplicate$ empty$ 'pop$
+ { swap$ bbl.of space.word * swap$
+ emphasize * }
+ if$
+ }
+ if$
+}
+
+FUNCTION {format.bvolume.if.no.series}
+{ series empty$
+ { format.bvolume }
+ { "" }
+ if$
+}
+
+
+FUNCTION {format.number.or.volume}
+{number empty$
+ {format.volume}
+ {number} %we use the pure number here without leading "n."
+ if$
+}
+
+FUNCTION {format.volume.and.number}
+{format.volume output
+ format.number
+}
+
+FUNCTION {format.volume.number.series}
+{ number empty$ volume empty$ and
+ { series empty$
+ { "" }
+ {" (" series "series" bibinfo.check * ")" *}
+ if$}
+ { series empty$
+ {""} %{ format.number.or.volume }
+ { " (" series "series" bibinfo.check * ", " *
+ format.number.or.volume * ")" * }
+ if$ }
+ if$
+}
+
+FUNCTION {extract.num}
+{ duplicate$ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$
+ t #2 global.max$ substring$ 't :=
+ duplicate$ is.num
+ { s swap$ * 's := }
+ { pop$ "" 't := }
+ if$ }
+ while$
+ s empty$
+ 'skip$
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.edition}
+{ edition duplicate$ empty$ 'skip$
+ {output.state mid.sentence = { "l" } { "t" } if$ change.case$
+ "edition" bibinfo.check
+ edition #1 #1 substring$ is.num {". " * bbl.edition * } 'skip$ if$}
+ if$
+}
+INTEGERS { multiresult }
+FUNCTION {multi.page.check}
+{ 't :=
+ #0 'multiresult :=
+ { multiresult not
+ t empty$ not
+ and }
+ { t #1 #1 substring$
+ duplicate$ "-" =
+ swap$ duplicate$ "," =
+ swap$ "+" =
+ or or
+ { #1 'multiresult := }
+ { t #2 global.max$ substring$ 't := }
+ if$ }
+ while$
+ multiresult
+}
+FUNCTION {format.pages}
+{ pages duplicate$ empty$ 'skip$
+ { duplicate$ multi.page.check
+ { n.dashify bbl.pages swap$}
+ { bbl.page swap$ }
+ if$
+ tie.or.space.prefix "pages" bibinfo.check * * }
+ if$
+}
+FUNCTION {format.journal.pages}
+{ pages empty$ {""}
+ { pages n.dashify bbl.pages
+ swap$ tie.or.space.prefix "pages" bibinfo.check * *}
+ if$
+}
+
+FUNCTION {get.url.type}
+{s #1 #5 substring$ "http:" = {http.url}
+ {s #1 #6 substring$ "https:" = {http.url}
+ {s #1 #5 substring$ "file:" = {file.url}
+ {s #1 #4 substring$ "ftp:" = {ftp.url}
+ {s #1 #4 substring$ "doi:" = {doi.url}
+ {s #1 #7 substring$ "mailto:" = {mailto.url} {unknown.url} if$}
+ if$}
+ if$}
+ if$}
+ if$}
+ if$
+ 'url.type :=
+}
+
+FUNCTION {expand.doi}
+{s
+url.type doi.url =
+ {#5 global.max$ substring$ bbl.doi.url swap$ *}
+ 'skip$ if$
+}
+
+INTEGERS {url.pos url.length}
+FUNCTION {filter.url.tex}
+{s text.length$ #1 + 'url.length :=
+ #1 'url.pos := "" 't :=
+ {url.pos url.length <}
+ {s url.pos #1 substring$
+ duplicate$ "_" = {pop$ "\underline{\ }" } 'skip$ if$
+ duplicate$ "%" = {pop$ "\%" } 'skip$ if$
+ duplicate$ "&" = {pop$ "\&" } 'skip$ if$
+ duplicate$ "~" = {pop$ "\~{}" } 'skip$ if$
+ duplicate$ "/" = {pop$ "\-/" } 'skip$ if$
+ duplicate$ "." = {pop$ "\-." } 'skip$ if$
+ duplicate$ "\" = {pop$ "{\textbackslash}" } 'skip$ if$
+ duplicate$ "#" = {pop$ "\#" } 'skip$ if$
+ duplicate$ "_" = {pop$ "\_" } 'skip$ if$
+ t swap$ * 't :=
+ url.pos #1 + 'url.pos :=
+ }
+ while$
+t
+}
+FUNCTION {filter.url.html}
+{s text.length$ #1 + 'url.length :=
+ #1 'url.pos := "" 't :=
+ {url.pos url.length <}
+ {s url.pos #1 substring$
+ t swap$ * 't :=
+ url.pos #1 + 'url.pos :=
+ }
+ while$
+t
+}
+
+FUNCTION {compose.url}
+{'s :=
+ get.url.type
+ bbl.url.available
+ abnt.url.package #0 =
+ { "$<$" *
+ abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
+ * "$>$" *} 'skip$ if$
+ abnt.url.package #1 =
+ { "\url{" * filter.url.html * "}" *} 'skip$ if$
+ abnt.url.package #2 =
+ {url.type http.url =
+ {"\htmladdnormallink{$<$" * filter.url.tex * "$>$}{" * filter.url.html * "}" *}
+ 'skip$ if$
+ url.type doi.url = url.type ftp.url = or url.type mailto.url = or
+ {"\htmladdnormallink{$<$" *
+ abnt.doi abnt.doi.expand.to.url = 'expand.doi {s} if$
+ * "$>$}{" *
+ abnt.doi abnt.doi.leave.as.is = {s} 'expand.doi if$
+ * "}" * }
+ 'skip$ if$
+ url.type unknown.url =
+ {"$<$" * filter.url.tex * "$>$" *}
+ 'skip$ if$} 'skip$ if$
+}
+FUNCTION {format.url}
+{ url empty$ 'skip$
+ {url compose.url output new.sentence }
+ if$
+ urldate empty$ 'skip$
+ { ". " * bbl.url.accessdate *
+ urldate #9 #2 substring$ * " " *
+ urldate #6 #2 substring$ "01" =
+ {"jan."}
+ {urldate #6 #2 substring$ "02" =
+ {"fev."}
+ {urldate #6 #2 substring$ "03" =
+ {"mar."}
+ {urldate #6 #2 substring$ "04" =
+ {"abr."}
+ {urldate #6 #2 substring$ "05" =
+ {"maio"}
+ {urldate #6 #2 substring$ "06" =
+ {"jun."}
+ {urldate #6 #2 substring$ "07" =
+ {"jul."}
+ {urldate #6 #2 substring$ "08" =
+ {"ago."}
+ {urldate #6 #2 substring$ "09" =
+ {"set."}
+ {urldate #6 #2 substring$ "10" =
+ {"out."}
+ {urldate #6 #2 substring$ "11" =
+ {"nov."}
+ {urldate #6 #2 substring$ "12" =
+ {"dez."}
+ {urldate #6 #2 substring$}
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$ }
+ if$
+ * " " *
+ urldate #1 #4 substring$ *}
+ if$
+ "urldate" bibinfo.check output new.sentence
+}
+
+FUNCTION {format.conference.info}
+{ conference-number empty$
+ 'skip$
+ {conference-number "." * output}
+ if$
+ conference-year empty$
+ 'skip$
+ {conference-year output}
+ if$
+ conference-location empty$
+ 'skip$
+ {conference-location output}
+ if$
+ new.sentence
+}
+
+
+FUNCTION {format.chapter.pages}
+{ chapter empty$
+ 'format.pages
+ { type empty$
+ { bbl.chapter }
+ { type "l" change.case$
+ "type" bibinfo.check }
+ if$
+ chapter tie.or.space.prefix "chapter" bibinfo.check * *
+ pages empty$
+ 'skip$
+ { ", " * format.pages * }
+ if$ }
+ if$
+}
+
+FUNCTION {format.booktitle}
+{author empty$ editor empty$ and organization empty$ and
+ {booktitle format.title.as.author "booktitle" bibinfo.check duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+ {booktitle "booktitle" bibinfo.check "u" change.case$ duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+if$
+}
+
+FUNCTION {format.booktitle.book}
+{author empty$ editor empty$ and organization empty$ and
+ {booktitle format.title.as.author "booktitle" bibinfo.check duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+ {booktitle "booktitle" bibinfo.check emphasize duplicate$ empty$ 'skip$ {} if$
+ booksubtitle empty$ 'skip$ {booksubtitle ": " swap$ * "t" change.case$ *
+ apply.title.command} if$}
+if$
+}
+
+FUNCTION {format.editors}
+{ editor empty$
+ {"inbook" type$ = 'bbl.same.field 'skip$ if$}
+ {author empty$
+ {editor "editor" format.names " (" *
+ editortype empty$ {bbl.editor} {editortype} if$
+ ")" * * }
+ {"inbook" type$ =
+ {bbl.same.field }
+ {editor "editor" format.names " (" *
+ editortype empty$ {bbl.editor} {editortype} if$
+ ")" * *}
+ if$}
+ if$}
+ if$
+}
+FUNCTION {format.in.ed.booktitle}
+{ editor empty$
+ {organization empty$ not author empty$ not and %if one of two not empty
+ {word.in organization "u" change.case$ * output
+ format.conference.info
+ booktitle empty$ {""} {new.sentence format.booktitle} if$}
+ {word.in
+ organization empty$ author empty$ and 'skip$
+ {"inbook" type$ = {bbl.same.field * output new.sentence ""}
+ 'skip$ if$ } if$
+ booktitle empty$ 'skip$ {format.booktitle *} if$}
+ if$}
+ {word.in format.editors * output
+ booktitle empty$ {""} {new.sentence format.booktitle} if$}
+ if$
+ output
+ new.sentence
+}
+
+FUNCTION {format.in.ed.booktitle.book}
+{ editor empty$
+ {organization empty$ not author empty$ not and %if one of two not empty
+ {word.in organization "u" change.case$ * output
+ format.conference.info
+ booktitle empty$ {""} {new.sentence format.booktitle.book} if$}
+ {word.in
+ organization empty$ author empty$ and 'skip$
+ {"inbook" type$ = {bbl.same.field * output new.sentence ""}
+ 'skip$ if$ } if$
+ booktitle empty$ 'skip$ {format.booktitle.book *} if$}
+ if$}
+ {word.in format.editors * output
+ booktitle empty$ {""} {new.sentence format.booktitle.book} if$}
+ if$
+ output
+ new.sentence
+}
+
+FUNCTION {empty.misc.check}
+{ author empty$ title empty$ howpublished empty$
+ month empty$ year empty$ note empty$
+ and and and and and
+ key empty$ not and
+ { "todos os campos relevantes estão vazios ou faltando em " cite$ * warning$ }
+ 'skip$
+ if$
+}
+FUNCTION {format.type}
+{ type "type" bibinfo.check
+ duplicate$ empty$ 'skip$
+ {new.block "" swap$ * }
+ if$
+}
+
+
+FUNCTION {format.year}
+{year empty$
+ { "campo year vazio ou faltando em " cite$ *
+ abnt.missing.year {" (vou colocar [s.d.])" *} 'skip$ if$ warning$
+ abnt.missing.year {", " } {""} if$ bbl.missing.year *}
+ {year n.dashify "year" bibinfo.check}
+if$
+}
+
+FUNCTION {format.year.presented}
+{year-presented empty$
+ {""}
+ {year-presented n.dashify}
+if$
+}
+
+FUNCTION {format.field.address}
+{ 't :=
+ address empty$ organization empty$ and url empty$ and t empty$ and
+ {bbl.no.address.no.publisher}
+ {address empty$
+ %if an url is present we don't give a missing address "[s.l.]" notice
+ {url empty$ {bbl.no.address ": "} {"" ""} if$}
+ {address ": "}
+ if$
+ t empty$
+ {%if an organization is present then it is OK not to have a publisher
+ organization empty$ {* bbl.no.publisher * } 'pop$ if$}
+ {* t * }
+ if$}
+ if$
+}
+
+FUNCTION {format.address}
+{address empty$
+ { bbl.no.address}
+ { address}
+ if$
+}
+
+FUNCTION {format.publisher.address}
+{ publisher "publisher" bibinfo.check format.field.address}
+
+FUNCTION {format.publisher.address.relax}
+{publisher empty$ address empty$ and {""}
+ {publisher "publisher" bibinfo.check format.field.address}
+if$}
+
+FUNCTION {format.organization.address}
+{ organization "organization" bibinfo.check format.field.address}
+
+%retains current authorship for future use
+FUNCTION {compare.authorship}
+{abnt.repeated.author.omit
+ {duplicate$ "" = 'skip$
+ {duplicate$ previous.author =
+ {duplicate$ 'previous.author :=
+ pop$ bbl.same.field
+ #1 'repeated.author :=}
+ {duplicate$ 'previous.author :=
+ #0 'repeated.author :=}
+ if$}
+ if$}
+ 'skip$
+ if$
+}
+
+FUNCTION {format.author.or.organization}
+{ author empty$
+ { organization empty$ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.authors output.nonnull }
+ if$
+ compare.authorship
+}
+
+
+FUNCTION {format.editor.or.organization}
+{ editor empty$
+ { organization empty$ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.editors output.nonnull }
+ if$
+ compare.authorship
+}
+
+FUNCTION {format.author.or.editor.or.organization}
+{ author empty$
+ { editor empty$
+ { organization empty$
+ 'skip$
+ { organization "u" change.case$ "organization" bibinfo.check output}
+ if$}
+ { format.editors output.nonnull }
+ if$}
+ { format.authors output.nonnull }
+ if$
+ compare.authorship
+}
+
+FUNCTION {format.reprint}
+{ reprinted-text missing$
+ {""}
+ {reprinted-text empty$
+ {bbl.reprint} {reprinted-text} if$
+ bbl.colon *}
+ if$
+}
+
+FUNCTION {format.journal}
+{
+ format.reprint
+ journal emphasize *
+}
+
+
+%generates the first label in \abntrefinfo to be used with \citeonline
+FUNCTION {format.names.for.label1} %abnt-alf only
+{ 's := "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {abnt.last.names
+ {s nameptr "{ll}{ jj}" format.name$}
+ {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
+ s nameptr "{ jj}" format.name$ *}
+ if$
+ 't :=
+ nameptr #1 >
+ {namesleft #1 >
+ { numnames abnt.etal.cite > abnt.etal.cite #0 = not and
+ {#0 'namesleft := abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {", " * t * } if$ }
+ { t "others" =
+ {abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {numnames nameptr =
+ {bbl.and * t *}
+ 'skip$ if$}
+ if$
+ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+}
+
+%generates the second label in \abntrefinfo to be used with \cite
+FUNCTION {format.names.for.label2} %abnt-alf only
+{ 's := "" 't :=
+ #1 'nameptr := s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ {abnt.last.names
+ {s nameptr "{ll}{ jj}" format.name$}
+ {s nameptr "{ll}" format.name$ #1 "{ll}" format.name$
+ s nameptr "{ jj}" format.name$ *}
+ if$
+ abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ 't :=
+ nameptr #1 >
+ {namesleft #1 >
+ { numnames abnt.etal.cite >
+ {#0 'namesleft := abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {"; " * t * } if$ }
+ { t "OTHERS" = t "others" = or
+ {abnt.etal.cite {bbl.etal *} 'skip$ if$}
+ {numnames nameptr = { bbl.semicolon * t *} 'skip$ if$}
+ if$
+ }
+ if$ }
+ 't
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft := }
+ while$
+}
+
+FUNCTION {format.title.for.label}
+{ 's :=
+ #1 'title.pos := #1 'first.word :=
+ "" 't :=
+ {first.word}
+ {s title.pos #1 substring$ 'title.char :=
+ title.char "." = title.char ":" = or title.char ";" = or
+ title.char "," = or title.char " " = or s t = or
+ {#0 'first.word :=
+ title.pos #1 + 'title.pos :=}
+ {title.pos #1 + 'title.pos := t title.char * 't :=}
+ if$
+ }
+ while$
+s t = %title equals first word, dont use bbl.ldots
+ {t "}{" * t
+ abnt.cite.style #0 = {"u" change.case$ * } 'skip$ if$}
+ {t bbl.ldots * "}{" * t
+ abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ * bbl.ldots *}
+if$
+}
+
+%cvs keys have the general form $key: value $
+INTEGERS {key.pos value.pos}
+FUNCTION {extract.cvs.key} %we borrow the functionality of format.title.for.label
+{ 's := %holds the entire cvs string
+ #1 'key.pos :=
+ #0 'value.pos := %0= between first $ and :, 1=between : and second $, 2= at the end
+ "" 't := %holds the resulting value
+ {value.pos #0 = value.pos #1 = or}
+ { s key.pos #1 substring$ 'title.char :=
+ value.pos #0 =
+ { title.char ":" = {#1 'value.pos := key.pos #1 + 'key.pos :=} 'skip$ if$}
+ { title.char "$" =
+ {#2 'value.pos :=}
+ {t title.char * 't :=}
+ if$}
+ if$
+ key.pos #1 + 'key.pos :=
+ }
+ while$
+ t
+}
+
+%generates and extended label of type {Author}{AUTHOR}{YEAR}
+%for abnt.cite.style=1 they will be of type {Author}{Author}{YEAR}
+%final result is placed into variable label
+FUNCTION {calc.extended.label}
+{ "{"
+ author empty$ not
+ {author format.names.for.label1 * "}{" * author format.names.for.label2 *}
+ {editor empty$ not
+ {editor format.names.for.label1 * "}{" * editor format.names.for.label2 *}
+ {org-short empty$ not
+ {org-short * "}{" * org-short "u" change.case$ *}
+ {organization empty$ not
+ {organization * "}{" * organization "u" change.case$ *}
+ {title empty$ not
+ {title format.title.for.label *}
+ {"nada}{NADA" *}
+ if$}
+ if$}
+ if$}
+ if$}
+ if$
+ "}{" *
+ year empty$ 'skip$ {year *} if$
+ 'label := %place the stack into label
+ % final } will be placed in reverse.pass
+}
+%generates and simple label of type "Author YEAR"
+%final result is placed onto the stack
+FUNCTION {calc.simple.label}
+{ author empty$ not
+ {author format.names.for.label1}
+ {editor empty$ not
+ {editor format.names.for.label1}
+ {organization empty$ not
+ {organization}
+ {title empty$ not
+ {title}
+ {""}
+ if$}
+ if$}
+ if$}
+ if$
+ year empty$ 'skip$ {" " * year *} if$
+}
+
+FUNCTION {output.bibitem}
+{ newline$
+ abnt.alf
+ {"\bibitem[" write$
+ calc.simple.label
+ write$ "]{"}
+ {"\bibitem{"}
+ if$
+ write$ cite$ write$ "}" write$ newline$
+ abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
+ "{" write$
+ "" before.all 'output.state :=
+}
+FUNCTION {output.hiddenbibitem}
+{ newline$
+ abnt.alf
+ {"\hiddenbibitem[" write$
+ calc.simple.label
+ write$ "]{"}
+ {"\bibitem{"}
+ if$
+ write$ cite$ write$ "}" write$ newline$
+ abnt.refinfo #1 = {"\abntrefinfo" write$ label write$ newline$} 'skip$ if$
+ "{" write$
+ "" before.all 'output.state :=
+}
+FUNCTION {fin.entry}
+{ add.period$ write$
+ reprinted-from empty$ 'skip$
+ {" " reprinted-text empty$
+ {bbl.reprint} {reprinted-text} if$ * bbl.colon *
+ "\abntreprintinfo{ " * reprinted-from * "}" * write$}
+ if$
+ abnt-note empty$ 'skip$
+ {"\footnote{" abnt-note * "}" * write$} if$
+ "}" write$
+ %newline$
+ write.entry.verbatim
+}
+
+FUNCTION { abnt.display.options}
+{ 's := 't :=
+ abnt.show.options #1 = % "warn"
+ {"opção " t * " passou para " * s * warning$ } 'skip$ if$
+
+ abnt.show.options #2 = % "list"
+ {"Op\c c\~ao selecionada {\tt " t * "=}\verb+" * s * "+" * output new.sentence } 'skip$ if$
+}
+
+FUNCTION { abnt-options1 }
+ {
+ abnt-show-options empty$
+ 'skip$
+ {abnt-show-options "no" =
+ {#0} {abnt-show-options "warn" =
+ {#1} {abnt-show-options "list" =
+ {#2 } {#0 } if$} if$} if$
+ 'abnt.show.options :=} % #0 "no"; #1 "warn"; #2 "list"
+ if$
+
+ abnt.show.options #2 =
+ {output.bibitem "Mudan\c ca de estilo ap\'os este ponto com o comando \verb!\citeoption{"
+ cite$ * "}! " *
+ output new.sentence} 'skip$ if$
+
+ abnt-show-options empty$
+ 'skip$ {"abnt-show-options" abnt-show-options abnt.display.options} if$
+
+ abnt-cite-style empty$
+ 'skip$
+ {abnt-cite-style "(AUTHOR, YEAR)" =
+ {#0 'abnt.cite.style :=}
+ {abnt-cite-style "(Author, YEAR)" =
+ {#1 'abnt.cite.style :=}
+ {"opção " abnt-cite-style * " desconhecida" * warning$}
+ if$}
+ if$
+ "abnt-cite-style" abnt-cite-style abnt.display.options}if$
+
+ abnt-experimental empty$
+ 'skip$ {abnt-experimental "yes" = 'abnt.experimental :=
+ "abnt-experimental" abnt-experimental abnt.display.options} if$
+
+ abnt-emphasize duplicate$ empty$
+ 'pop$ {'abnt.emphasize :=
+ "abnt-emphasize" abnt.emphasize abnt.display.options
+ abnt-emphasize "\bf" = abnt-emphasize "\it" = or abnt-emphasize "\em" = or
+ abnt-emphasize "\bfseries" = or
+ {"não use " abnt-emphasize * " para abnt-emphasize em " * cite$ *
+ ", isto alterará TODO o texto. Use \textbf ou \emph. Veja a documentação abnt-bibtex-doc para mais detalhes." * warning$}
+ 'skip$ if$
+ } if$
+
+ abnt-doi empty$
+ 'skip$
+ {abnt-doi "expand" =
+ {abnt.doi.expand.to.url 'abnt.doi :=}
+ {abnt-doi "link" =
+ {abnt.doi.link 'abnt.doi :=}
+ {abnt-doi "doi" =
+ {abnt.doi.leave.as.is 'abnt.doi :=}
+ {"opção " abnt-doi * " desconhecida" * warning$}
+ if$}
+ if$}
+ if$
+ "abnt-doi" abnt-doi abnt.display.options}if$
+ }
+FUNCTION { abnt-options2 }
+ {
+ abnt-full-initials empty$
+ 'skip$ {abnt-full-initials "yes" = 'abnt.full.initials :=
+ "abnt-full-initials" abnt-full-initials abnt.display.options} if$
+
+ abnt-last-names empty$
+ 'skip$
+ {abnt-last-names "abnt" = {#0}
+ {abnt-last-names "bibtex" = {#1} {#0} if$} if$
+ 'abnt.last.names :=
+ "abnt-last-names" abnt-last-names abnt.display.options}
+ if$
+
+
+ abnt-ldots-type empty$
+ 'skip$
+ {abnt-ldots-type "none" = {#0}
+ {abnt-ldots-type "normal" = {#1}
+ {abnt-ldots-type "math" = {#2}
+ {abnt-ldots-type "text" = {#1} {#0}
+ if$} if$} if$} if$
+ 'abnt.ldots.type :=
+ "abnt-ldots-type" abnt-ldots-type abnt.display.options}
+ if$
+
+ abnt-missing-year empty$
+ 'skip$
+ {abnt-missing-year "void" = {#0}
+ {abnt-missing-year "sd" = {#1} {#0} if$}
+ if$
+ 'abnt.missing.year :=
+ "abnt-missing-year" abnt-missing-year abnt.display.options}
+ if$
+
+
+ abnt-and-type empty$
+ 'skip$ {abnt-and-type "e" =
+ {#0} {abnt-and-type "&" =
+ {#1} {#0} if$} if$
+ 'abnt.and.type :=
+ "abnt-and-type" abnt-and-type abnt.display.options}
+ if$
+
+ abnt-thesis-year empty$
+ 'skip$ {abnt-thesis-year "final" =
+ {#0} {abnt-thesis-year "title" =
+ {#1} {abnt-thesis-year "both" =
+ {#2} {#0} if$} if$} if$
+ 'abnt.thesis.year :=
+ "abnt-thesis-year" abnt-thesis-year abnt.display.options}
+ if$
+
+ abnt-refinfo empty$
+ 'skip$ {abnt-refinfo "yes" = 'abnt.refinfo :=
+ "abnt-refinfo" abnt-refinfo abnt.display.options} if$
+}
+FUNCTION { abnt-options3 }
+ {
+
+ abnt-dont-use-etal empty$
+ 'skip$ {abnt-dont-use-etal "yes" = {#0 'abnt.etal.list :=} 'skip$ if$
+ "Uso da opção abnt-dont-use-etal se tornou obsoleto, usamos abnt-etal-list." warning$
+ "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
+
+ abnt-etal-cite empty$
+ 'skip$ {abnt-etal-cite str.to.int 'abnt.etal.cite :=
+ "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
+
+ abnt-etal-list empty$
+ 'skip$ {abnt-etal-list str.to.int 'abnt.etal.list :=
+ "abnt-etal-list" abnt.etal.list int.to.str$ abnt.display.options} if$
+
+ abnt-etal-text missing$
+ 'skip$ {abnt-etal-text 'abnt.etal.text :=
+ "abnt-etal-text" abnt.etal.text abnt.display.options} if$
+
+ abnt-no-etal-label empty$
+ 'skip$ {abnt-no-etal-label "yes" = {#0 'abnt.etal.cite :=} 'skip$ if$
+ "Uso da opção abnt-no-etal-label se tornou obsoleto, usamos abnt-etal-cite." warning$
+ "abnt-etal-cite" abnt.etal.cite int.to.str$ abnt.display.options} if$
+
+ abnt-repeated-author-omit empty$
+ 'skip$ {abnt-repeated-author-omit "yes" =
+ {#1 'abnt.repeated.author.omit :=}
+ {#0 'abnt.repeated.author.omit := "" 'previous.author :=} if$
+ "abnt-repeated-author-omit" abnt-repeated-author-omit abnt.display.options} if$
+
+ abnt-repeated-title-omit empty$ 'skip$
+ {abnt-repeated-title-omit "yes" =
+ {#1 'abnt.repeated.title.omit :=}
+ {#0 'abnt.repeated.title.omit := "" 'previous.title :=} if$
+ "abnt-repeated-title-omit" abnt-repeated-title-omit abnt.display.options
+ abnt.repeated.author.omit not abnt.repeated.title.omit and
+ {"Use abnt-repeated-title-omit=yes junto com abnt-repeated-author-omit=yes"
+ warning$} 'skip$ if$} if$
+
+ abnt-title-command empty$
+ 'skip$ {abnt-title-command "yes" =
+ {#1 'abnt.title.command :=}
+ {#0 'abnt.title.command :=} if$
+ "abnt-title-command" abnt-title-command abnt.display.options} if$
+
+ abnt-url-package empty$ 'skip$
+ {abnt-url-package "url" =
+ {#1 'abnt.url.package :=}
+ {abnt-url-package "hyperref" = {#2 'abnt.url.package :=} 'skip$ if$}
+ if$
+ "abnt-url-package" abnt-url-package abnt.display.options}
+ if$
+
+ abnt-verbatim-entry empty$
+ 'skip$ {abnt-verbatim-entry "yes" = 'abnt.verbatim.entry :=
+ "abnt-verbatim-entry" abnt-verbatim-entry abnt.display.options} if$
+
+ abnt.show.options #2 = 'fin.entry 'skip$ if$
+ }
+
+%we had to break this function in two parts because of the following message:
+%Sorry---you've exceeded BibTeX's single function space 100
+%(That was a fatal error)
+FUNCTION { iso-options1 }
+ {
+ iso-abbreviation empty$
+ 'skip$ {iso-abbreviation "standard" = 'iso.abbreviation :=
+ "iso-abbreviation" iso-abbreviation abnt.display.options} if$
+ iso-author-punctuation empty$
+ 'skip$ {iso-author-punctuation "void" = 'iso.author.punctuation :=
+ "iso-author-punctuation" iso-author-punctuation abnt.display.options} if$
+ iso-date-place empty$
+ 'skip$ {iso-date-place "ISO" = 'iso.date.place :=
+ "iso-date-place" iso-date-place abnt.display.options} if$
+ }
+
+FUNCTION { abnt-options }
+ {
+ abnt-options1
+ abnt-options2
+ abnt-options3
+ iso-options1
+ }
+
+FUNCTION { iso-options } { abnt-options }
+
+FUNCTION { iso.year.label }
+{ iso.date.place
+ { abnt.alf
+ {year.label output new.sentence}
+ 'skip$ if$}
+ 'skip$ if$}
+
+FUNCTION { iso.date }
+{ iso.date.place
+ { abnt.alf
+ 'skip$
+ {year output new.sentence}
+ if$}
+ 'skip$ if$}
+
+FUNCTION { non.iso.date }
+ {iso.date.place 'skip$ {format.date output} if$}
+
+FUNCTION {article}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.block
+ format.journal output
+ iso.date.place {format.year output} 'skip$ if$
+ %iso.date.place {format.date output} 'skip$ if$
+ %iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ % {format.year output new.sentence} if$
+ section "section" bibinfo.check output.dash
+ publisher "publisher" bibinfo.check output
+ address "address" bibinfo.check output
+ format.volume output
+ format.number output
+ format.pages output
+ non.iso.date
+ format.note output new.block
+ format.url
+ fin.entry
+}
+FUNCTION {book}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.volume output new.sentence
+ format.book.pages output
+ format.illustrated
+ format.dimensions new.sentence
+ format.howpublished output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output
+ format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {booklet}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.edition output new.sentence
+ address "address" bibinfo.check output
+ format.bvolume output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.book.pages output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+
+FUNCTION {hidden}
+{ output.hiddenbibitem
+ fin.entry}
+
+FUNCTION {inbook}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.block
+ format.in.ed.booktitle.book
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ %format.year output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.bvolume.if.no.series output
+ format.volume.number.series output
+ format.chapter.pages output new.sentence
+ format.isbn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {incollection}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.in.ed.booktitle.book
+ format.edition output new.sentence
+ format.publisher.address output
+ %format.year output
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output} if$
+ format.volume.number.series output new.sentence
+ format.bvolume.if.no.series output
+ format.chapter.pages output new.sentence
+ format.isbn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+FUNCTION {inproceedings}
+{ output.bibitem
+ format.author.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.in.ed.booktitle
+ format.volume.no.bbl output
+ format.year output
+ address output new.sentence
+ anais.check.url output
+ format.publisher.address output
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.pages output
+ format.isbn output
+ format.issn output new.sentence
+ format.note output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {journalpart}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output new.sentence
+ format.btitle "title" output.check new.sentence
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.publisher.address output
+ format.volume output
+ format.number output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.date output new.sentence} if$
+ format.book.pages output
+ format.illustrated
+ format.dimensions new.sentence
+ format.note output
+ format.issn output %pode parecer curioso, mas revistas inteiras são tratadas como livro
+ format.isbn output new.sentence
+ format.url
+ fin.entry
+}
+FUNCTION {conference} { inproceedings }
+FUNCTION {manual}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.btitle "title" output.check new.block
+ format.furtherresp new.sentence
+ format.edition output new.sentence
+ format.address output
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.bvolume.if.no.series output
+ format.book.pages output new.sentence
+ format.volume.number.series output new.sentence
+ format.note output new.sentence
+ format.url
+ fin.entry
+}
+
+FUNCTION {misc}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.type output
+ format.btitle output new.sentence
+ format.furtherresp new.sentence
+ format.publisher.address.relax output
+ %format.date output new.block
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.book.pages output new.sentence
+ format.illustrated
+ format.dimensions new.sentence
+ format.howpublished output new.block
+ format.volume.number.series output new.sentence
+ format.note output new.block
+ format.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {patent}
+{ output.bibitem
+ format.editor.or.organization new.sentence
+ iso.year.label
+ format.authors.plain output new.sentence
+ format.btitle output new.sentence
+ format.furtherresp new.sentence
+ %format.date output new.block
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.patent.number output
+ format.howpublished output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+ empty.misc.check
+}
+
+FUNCTION {format.thesis.type}
+{ type$ "phdthesis" =
+ {bbl.phdthesis}
+ {type$ "mastersthesis" =
+ {bbl.mthesis}
+ {type$ "monography" =
+ {bbl.monography}
+ {bbl.void}
+ if$}
+ if$}
+ if$
+ type empty$
+ {type missing$
+ {type$ "phdthesis" =
+ { " (" bbl.phd * ")" *}
+ {type$ "mastersthesis" = { " (" bbl.master * ")" *} {pop$ ""} if$}
+ if$}
+ {""}
+ if$}
+ {type$ "thesis" =
+ {type}
+ {" (" type * ")" * "type" bibinfo.check}
+ if$}
+ if$
+ * %joins first and second part of this function
+}
+FUNCTION {thesis}
+{ output.bibitem
+ format.authors "author" output.check new.block
+ iso.year.label
+ format.btitle "title" output.check new.block
+ abnt.thesis.year #1 = abnt.thesis.year #2 = or
+ {format.date "year" output.check new.sentence} 'skip$ if$
+ format.year.presented output new.sentence
+ format.book.pages output new.sentence
+ format.thesis.type output.nonnull
+ school "school" bibinfo.warn output.dash
+ address "address" bibinfo.check output
+ abnt.thesis.year #0 = abnt.thesis.year #2 = or
+ {format.date "year" output.check new.sentence} 'skip$ if$
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {phdthesis} { thesis }
+FUNCTION {mastersthesis} { thesis }
+FUNCTION {monography} { thesis }
+
+FUNCTION {proceedings}
+{ output.bibitem
+ iso.year.label
+ format.editor.or.organization
+ format.conference.info
+ format.btitle "title" output.check
+ format.bvolume output
+ format.volume.number.series output
+ editor empty$
+ { publisher empty$
+ 'skip$
+ { new.sentence format.publisher.address output format.year output}
+ if$
+ }
+ { publisher empty$
+ { new.sentence
+ format.organization.address output format.year output}
+ { new.sentence
+ organization "organization" bibinfo.check output
+ format.publisher.address output format.year output}
+ if$ }
+ if$
+ new.sentence format.book.pages output new.sentence
+ format.isbn output
+ format.issn output new.block
+ format.note output new.block
+ format.url
+ fin.entry
+}
+
+FUNCTION {techreport} {manual}
+
+FUNCTION {unpublished}
+{ output.bibitem
+ format.author.or.editor.or.organization new.sentence
+ iso.year.label
+ format.title "title" output.check new.sentence
+ format.note "note" output.check new.sentence
+ %format.date output new.sentence
+ iso.date.place {abnt.alf 'skip$ {format.year output new.sentence} if$}
+ {format.year output new.sentence} if$
+ format.url
+ fin.entry
+}
+
+FUNCTION {default.type} { misc }
+READ
+FUNCTION {sortify}
+{ purify$
+ "l" change.case$
+}
+INTEGERS { len }
+FUNCTION {chop.word}
+{ 's :=
+ 'len :=
+ s #1 len substring$ =
+ { s len #1 + global.max$ substring$ }
+ 's
+ if$
+}
+FUNCTION {sort.format.names}
+{ 's :=
+ #1 'nameptr :=
+ ""
+ s num.names$ 'numnames :=
+ numnames 'namesleft :=
+ { namesleft #0 > }
+ { format.single.name 't :=
+ nameptr #1 >
+ {
+ nameptr #3
+ #1 + =
+ numnames #3
+ > and
+ { "others" 't :=
+ #1 'namesleft := }
+ 'skip$
+ if$
+ " " *
+ namesleft #1 = t "others" = and
+ { "zzzzz" * }
+ { t sortify * }
+ if$
+ }
+ { t sortify * }
+ if$
+ nameptr #1 + 'nameptr :=
+ namesleft #1 - 'namesleft :=
+ }
+ while$
+}
+
+FUNCTION {sort.format.title}
+{ 't :=
+ "A " #2
+ "An " #3
+ "The " #4 t chop.word
+ chop.word
+ chop.word
+ sortify
+ #1 global.max$ substring$
+}
+FUNCTION {any.sort}
+{ author empty$
+ { organization empty$
+ { editor empty$
+ { title empty$
+ { key empty$
+ { "para ordenar, precisa dos campos author, organization, editor, title ou key in " cite$ * warning$ ""}
+ { key sortify }
+ if$}
+ { title sortify}
+ if$}
+ { editor sort.format.names }
+ if$}
+ { organization sortify }
+ if$}
+ { author sort.format.names }
+if$
+}
+
+FUNCTION {presort}
+{
+ any.sort
+ " " * year field.or.null sortify * " " * title field.or.null
+ sort.format.title * #1 entry.max$ substring$
+ %for non-alpha style we drop a void sort.key such that SORT has no effect
+ abnt.alf 'skip$ {pop$ ""} if$ 'sort.key$ :=
+ year empty$ {""} {year} if$ 'year.label :=
+ calc.extended.label
+}
+
+FUNCTION {set.default.abnt.variables}
+{ %if you change abnt-num to abnt-alf by hand you need also to change
+ %the name of RCSfile by hand, otherwise cvs takes care of it.
+ %
+ "$RCSfile: abnt-alf.bst,v $ " extract.cvs.key
+ %
+ "abnt-alf.bst,v " = 'abnt.alf := % #1 para abnt-alf #0 para abnt-num
+ "$Revision: v-1.1 $" extract.cvs.key 'abnt.bst.revision :=
+ #0 'abnt.and.type := % #0 "e"; #1 "&"
+ "\emph" 'abnt.emphasize :=
+ #0 'abnt.cite.style := %default norm version for NBR10520
+ %#0 \cite=(AUTHOR, YEAR)
+ %#1 \cite=(Author, YEAR)
+ #0 'abnt.experimental :=
+ abnt.doi.expand.to.url 'abnt.doi :=
+ #3 'abnt.etal.cite :=
+ #3 'abnt.etal.list :=
+ "et al." 'abnt.etal.text :=
+ #0 'abnt.full.initials :=
+ #0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
+ #1 'abnt.ldots.type := %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
+ #0 'abnt.missing.year := %#0 "void"; #1 "[s.d.]"
+ #0 'repeated.author :=
+ #0 'abnt.repeated.author.omit :=
+ #0 'abnt.repeated.title.omit :=
+ #1 'abnt.refinfo :=
+ #0 'abnt.show.options := % #0 "no"; #1 "warn"; #2 "list"
+ #0 'abnt.thesis.year := % #0 "final"; #1 "title"; #2 "both"
+ #0 'abnt.title.command := % #0 "no"; #1 "yes"
+ #0 'abnt.url.package := % #0 "none"'; #2 "url"; #2 "hyperref"
+ #0 'abnt.verbatim.entry :=
+}
+FUNCTION {set.default.iso.variables}
+{ #0 'iso.abbreviation := % #0 ABNT-style; #1 ISO-style
+ #0 'iso.author.punctuation := % #0 ABNT (Smith, A. B.); #1 ISO (Smith, AB)
+ #0 'iso.date.place := % #0 ABNT-sty; #1 ISO-style
+}
+EXECUTE {set.default.abnt.variables}
+EXECUTE {set.default.iso.variables}
+FUNCTION {process.early.abnt.options}
+{%here we intercept all entries which need priority handling
+ %note: we cannot use type$ at this point
+ abnt-and-type missing$
+ abnt-experimental missing$ and
+ abnt-etal-cite missing$ and
+ abnt-etal-text missing$ and
+ abnt-ldots-type missing$ and
+ abnt-cite-style missing$ and
+ abnt-no-etal-label missing$ and
+ abnt-title-command missing$ and
+ 'skip$ {call.type$} if$
+}
+ITERATE {process.early.abnt.options}
+FUNCTION {search.reprinted}
+{ reprinted-from missing$ 'skip$
+ {"\nocite{" reprinted-from * "}" * write$ newline$
+ }
+ if$
+}
+ITERATE {search.reprinted}
+FUNCTION {abntreprintinfo}
+{"\providecommand{\abntreprintinfo}[1]{%" write$ newline$
+ " \citeonline{#1}}" write$ newline$}
+EXECUTE {abntreprintinfo}
+ITERATE {presort}
+SORT
+STRINGS { last.label next.extra}
+INTEGERS { last.extra.num }
+FUNCTION {forward.pass}
+{ last.label label =
+ { last.extra.num #1 + 'last.extra.num :=
+ last.extra.num int.to.chr$ 'extra.label :=
+ }
+ { "a" chr.to.int$ 'last.extra.num :=
+ "" 'extra.label :=
+ label 'last.label :=
+ }
+ if$
+}
+
+FUNCTION {reverse.pass}
+{ next.extra "b" =
+ { "a" 'extra.label := }
+ 'skip$
+ if$
+ label extra.label * 'label :=
+ year.label extra.label * 'year.label :=
+ extra.label 'next.extra :=
+ label "}" * 'label :=
+}
+ITERATE {forward.pass}
+REVERSE {reverse.pass}
+FUNCTION {begin.bib}
+{
+ abnt.alf
+ {"\setlength{\labelsep}{0pt}" write$}
+ 'skip$
+ if$
+ "\begin{thebibliography}{}" write$ newline$
+ preamble$ empty$
+ 'skip$
+ { preamble$ write$ newline$ }
+ if$
+ abnt.refinfo #1 =
+ {"\providecommand{\abntrefinfo}[3]{}" write$ newline$}
+ 'skip$ if$
+ "\providecommand{\abntbstabout}[1]{}" write$ newline$
+ abnt.title.command
+ {"\providecommand{\bibtextitlecommand}[2]{#2}" write$ newline$}
+ 'skip$ if$
+ "\abntbstabout{" abnt.bst.revision * "}" * write$ newline$
+ %Se você não usa abntcite e precisa que a margem direita não
+ %seja justificada, descomente a linha seguinte
+ %alternativamente coloque \bibliography{abnt-nrj,...
+ "\justifying" write$ newline$
+}
+EXECUTE {begin.bib}
+EXECUTE {init.state.consts}
+FUNCTION {process.entry}{call.type$}
+ITERATE {process.entry}
+FUNCTION {end.bib}
+{ newline$ "\end{thebibliography}" write$ newline$
+}
+EXECUTE {end.bib}
+FUNCTION {apresentacao}
+{ "+---------------------------------------------------------+"
+ "| http://www.abntex.net.br/ |"
+ "| Em caso de dúvidas ou problemas com este estilo procure |"
+ abnt.alf
+ {"| Estilo bibliográfico abntex2-alf.bst versão " abnt.bst.revision * " |" *}
+ {"| Estilo bibliográfico abntex2-num.bst versão " abnt.bst.revision * " |" *}
+ if$
+ "+---------------------------------------------------------+"
+ stack$
+}
+EXECUTE{apresentacao}
diff --git a/macros/latex/contrib/fcavtex/fcavtex.cls b/macros/latex/contrib/fcavtex/fcavtex.cls
new file mode 100644
index 0000000000..abf4ee69d6
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/fcavtex.cls
@@ -0,0 +1,482 @@
+%% fcavtex.cls, v-1.1 waltermaldonado
+%% Copyright 2015 by Walter Maldonado Jr
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Walter Maldonado Jr
+%%
+%% Creator and original mantainer: Walter Maldonado Jr <walter@agroestat.com.br>
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{fcavtex}[2015/06/26 Thesis class for UNESP/FCAV - BRAZIL]
+
+\LoadClass[12pt,openright,twoside]{memoir}
+
+\RequirePackage[a4paper,vmargin=3cm,inner=3cm,outer=2cm]{geometry}
+\RequirePackage[english,brazil]{babel}
+\RequirePackage[utf8]{inputenc}
+\RequirePackage{helvet}
+\RequirePackage{layout}
+\RequirePackage[absolute,overlay]{textpos}
+\setlength{\TPHorizModule}{1mm}
+\setlength{\TPVertModule}{1mm}
+\RequirePackage{ragged2e}
+\RequirePackage{microtype}
+\RequirePackage{titlesec}
+\RequirePackage{tocloft}
+\RequirePackage{memhfixc}
+\RequirePackage{indentfirst}
+\RequirePackage[setpagesize=false]{hyperref}
+\RequirePackage[sectionbib]{chapterbib}
+\RequirePackage[alf]{abntex2cite}
+\RequirePackage[cm]{{sfmath}}
+
+% References
+\bibliographystyle{fcavtex}
+
+% Page Style
+\makepagestyle{pstyle}
+\copypagestyle{pstyle}{empty}
+\makeevenhead{pstyle}{\fontsize{12}{12}\selectfont\sffamily\thepage}{\hfill}{}
+\makeoddhead{pstyle}{}{\hfill}{\fontsize{12}{12}\selectfont\sffamily\thepage}
+
+\makepagestyle{cstyle}
+\copypagestyle{cstyle}{empty}
+\makeevenfoot{cstyle}{\hfill}{\fontsize{12}{12}\selectfont\sffamily\thepage}{}
+\makeoddfoot{cstyle}{\hfill}{\fontsize{12}{12}\selectfont\sffamily\thepage}{}
+
+\aliaspagestyle{chapter}{cstyle}
+
+\makechapterstyle{chap1}{%
+ \def\chapterheadstart{\justifying}
+ \def\afterchapternum{\space\textendash\space}
+ \renewcommand{\chapnamefont}{\fontsize{12}{12}\selectfont\sffamily\bfseries\MakeUppercase}
+ \renewcommand{\chapnumfont}{\fontsize{12}{12}\selectfont\sffamily\bfseries}
+ \renewcommand{\chaptitlefont}{\fontsize{12}{12}\selectfont\sffamily\bfseries}
+ \renewcommand{\afterchaptertitle}{}
+ \setlength{\afterchapskip}{\onelineskip}
+ \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
+}
+\renewcommand\memendofchapterhook{%
+ \preparebibliography
+ \setlength{\parindent}{12.5mm}
+}
+
+% Section styles
+\setsecheadstyle{\raggedright\MakeUppercase}
+\setbeforesecskip{\onelineskip}
+\setaftersecskip{\onelineskip}
+\titleformat{\section}{\justifying\fontsize{12}{12}\selectfont\sffamily\bfseries}{\thesection}{5pt}{}
+\titleformat{\subsection}{\justifying\fontsize{12}{12}\selectfont\sffamily\bfseries\itshape}{\thesubsection}{5pt}{}
+\titleformat{\subsubsection}{\justifying\fontsize{12}{12}\selectfont\sffamily\itshape}{\thesubsubsection}{5pt}{}
+
+% Specific commands
+\newcommand{\titulo}[1]{\def\vtitulo{#1}}
+\newcommand{\printtitulo}{\vtitulo}
+\newcommand{\tituloingles}[1]{\def\vtituloingles{#1}}
+\newcommand{\printtituloingles}{\vtituloingles}
+\newcommand{\autor}[1]{\def\vautor{#1}}
+\newcommand{\printautor}{\vautor}
+\newcommand{\orientador}[1]{\def\vorientador{#1}}
+\newcommand{\printorientador}{\vorientador}
+\newcommand{\instituicao}[1]{\def\vinstituicao{#1}}
+\newcommand{\printinstituicao}{\vinstituicao}
+\newcommand{\qualificacaoautor}[1]{\def\vqualificacaoautor{#1}}
+\newcommand{\printqualificacaoautor}{\vqualificacaoautor}
+\newcommand{\ano}[1]{\def\vano{#1}}
+\newcommand{\printano}{\vano}
+\newcommand{\tipodoc}[1]{\def\vtipodoc{#1}}
+\newcommand{\printtipodoc}{\vtipodoc}
+\newcommand{\titulopretendido}[1]{\def\vtitulopretendido{#1\space}}
+\newcommand{\printtitulopretendido}{\vtitulopretendido}
+\newcommand{\programa}[1]{\def\vprograma{#1}}
+\newcommand{\printprograma}{\vprograma}
+\newcommand{\email}[1]{\def\vemail{#1}}
+\newcommand{\printemail}{\vemail}
+\newcommand{\banca}[1]{\def\vbanca{#1}}
+\newcommand{\printbanca}{\vbanca}
+\newcommand{\palavraschave}[1]{\def\vpalavraschave{#1}}
+\newcommand{\printpalavraschave}{\vpalavraschave}
+\newcommand{\keywords}[1]{\def\vkeywords{#1}}
+\newcommand{\printkeywords}{\vkeywords}
+\newcommand{\nomefichacatalografica}[1]{\def\vnomefichacatalografica{#1}}
+\newcommand{\printnomefichacatalografica}{\vnomefichacatalografica}
+\newcommand{\cutter}[1]{\def\vcutter{#1}}
+\newcommand{\printcutter}{\vcutter}
+\newcommand{\cdu}[1]{\def\vcdu{#1}}
+\newcommand{\printcdu}{\vcdu}
+
+
+% Table of contents adjustments
+\settocdepth{subsubsection}
+\renewcommand{\tocheadstart}{}
+\renewcommand{\printtoctitle}[1]{\fontsize{12}{12}\selectfont\sffamily\textbf{\MakeUppercase{#1}}}
+\renewcommand{\aftertoctitle}{%
+ \par\addtocontents{toc}{\protect\hfill\mbox{\fontsize{12}{12}\selectfont\sffamily{Página}}\protect\par}
+}
+
+\renewcommand{\cftchapterfont}{\fontsize{12}{12}\selectfont\sffamily\bfseries}
+\renewcommand{\cftsectionfont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftsubsectionfont}{\fontsize{12}{12}\selectfont\sffamily\itshape}
+\renewcommand{\cftsubsubsectionfont}{\fontsize{12}{12}\selectfont\sffamily\itshape}
+
+\renewcommand{\cftchapterpagefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftsectionpagefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftsubsectionpagefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftsubsubsectionpagefont}{\fontsize{12}{12}\selectfont\sffamily}
+
+\renewcommand{\cftchapterleader}{\cftdotfill{\cftsectiondotsep}}
+\renewcommand{\cftsectionleader}{\cftdotfill{\cftsectiondotsep}}
+\renewcommand{\cftsubsectionleader}{\cftdotfill{\cftsectiondotsep}}
+\renewcommand{\cftsubsubsectionleader}{\cftdotfill{\cftsectiondotsep}}
+
+\renewcommand{\cftbeforechapterskip}{10pt}
+\renewcommand{\cftbeforesectionskip}{0pt}
+\renewcommand{\cftbeforesubsectionskip}{0pt}
+\renewcommand{\cftbeforesubsubsectionskip}{0pt}
+
+% List of tables adustments
+\renewcommand{\insertchapterspace}{%
+ \addtocontents{lof}{\protect\addvspace{10pt}}%
+ \addtocontents{lot}{\protect\addvspace{10pt}}%
+}
+\renewcommand{\lotheadstart}{}
+\renewcommand{\printlottitle}[1]{\fontsize{12}{12}\selectfont\sffamily\textbf{\MakeUppercase{#1}}}
+\renewcommand{\afterlottitle}{%
+ \par\addtocontents{lot}{\protect\hfill\mbox{\fontsize{12}{12}\selectfont\sffamily{Página}}\protect\par}
+}
+\renewcommand{\cfttablefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cfttablepagefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cfttableleader}{\cftdotfill{\cftsectiondotsep}}
+\renewcommand{\cftbeforetableskip}{0pt}
+
+% List of figures adustments
+\renewcommand{\lofheadstart}{}
+\renewcommand{\printloftitle}[1]{\fontsize{12}{12}\selectfont\sffamily\textbf{\MakeUppercase{#1}}}
+\renewcommand{\afterloftitle}{%
+ \par\addtocontents{lof}{\protect\hfill\mbox{\fontsize{12}{12}\selectfont\sffamily{Página}}\protect\par}
+}
+\renewcommand{\cftfigurefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftfigurepagefont}{\fontsize{12}{12}\selectfont\sffamily}
+\renewcommand{\cftfigureleader}{\cftdotfill{\cftsectiondotsep}}
+\renewcommand{\cftbeforefigureskip}{0pt}
+
+% Default formatting
+
+\fontsize{12}{12}\selectfont\sffamily
+
+% First page commands
+
+% Title page
+\newcommand{\capa}{
+ \pagestyle{empty}
+ %\begin{group}
+ \null
+ \center\begin{textblock}{160}(30,30)
+ \begin{Spacing}{1.5}
+ \fontsize{14}{14}\selectfont\sffamily\textbf{\MakeUppercase{\printinstituicao}}
+ \end{Spacing}
+ \end{textblock}
+ \center\begin{textblock}{160}(30,110)
+ \begin{Spacing}{1.5}
+ \fontsize{16}{16}\selectfont\sffamily\textbf{\MakeUppercase{\printtitulo}}
+ \end{Spacing}
+ \end{textblock}
+ \begin{textblock}{160}(30,165)
+ \begin{FlushRight}
+ \begin{Spacing}{1.5}
+ \fontsize{14}{14}\selectfont\sffamily\textbf{\printautor}
+ \par\fontsize{12}{12}\selectfont\sffamily{\printqualificacaoautor}
+ \end{Spacing}
+ \end{FlushRight}
+ \end{textblock}
+ \center\begin{textblock}{160}(30,264)
+ \begin{Spacing}{1.5}
+ \fontsize{12}{12}\selectfont\sffamily\textbf{\printano}
+ \end{Spacing}
+ \end{textblock}
+ \cleardoublepage
+ %\end{group}
+}
+
+\newcommand{\folhaderosto}{
+ %\begin{group}
+ \pagestyle{empty}
+ \center\begin{textblock}{160}(30,30)
+ \begin{Spacing}{1.5}
+ \fontsize{14}{14}\selectfont\sffamily\textbf{\MakeUppercase{\printinstituicao}}
+ \end{Spacing}
+ \end{textblock}
+ \center\begin{textblock}{160}(30,110)
+ \begin{Spacing}{1.5}
+ \fontsize{16}{16}\selectfont\sffamily\textbf{\MakeUppercase{\printtitulo}}
+ \end{Spacing}
+ \end{textblock}
+ \begin{textblock}{160}(30,135)
+ \begin{FlushRight}
+ \begin{Spacing}{1.5}
+ \fontsize{14}{14}\selectfont\sffamily\textbf{\printautor}
+ \par\fontsize{14}{14}\selectfont\sffamily\textbf{\printorientador}
+ \end{Spacing}
+ \end{FlushRight}
+ \end{textblock}
+ \begin{textblock}{90}(100,165)
+ \begin{sloppypar}
+ \begin{Spacing}{1.2}
+ \justify\fontsize{12}{12}\selectfont\sffamily{\printtipodoc\ apresentada à Faculdade de Ciências Agrárias e Veterinárias - Unesp, Câmpus de Jaboticabal, como parte das exigências para a obtenção do título de \printtitulopretendido em \printprograma}
+ \end{Spacing}
+ \end{sloppypar}
+ \end{textblock}
+ \center\begin{textblock}{160}(30,264)
+ \begin{Spacing}{1.5}
+ \fontsize{12}{18}\selectfont\sffamily\textbf{2015}
+ \end{Spacing}
+ \end{textblock}
+ \null\newpage
+ %\end{group}
+}
+
+\RequirePackage{hyphenat}
+\RequirePackage{paralist}
+\RequirePackage{mfirstuc}
+\newcommand*{\splitPC}[1][]{%
+ \begin{inparaenum}[1.]
+ \@for\my@temp:=#1\do{%
+ \item{\ignorespaces\xmakefirstuc{\my@temp}.}
+ }
+ \end{inparaenum}
+}
+
+\newcommand{\fichacatalografica}{
+ %\begin{group}
+ \center
+ \null\vfill
+ \fbox{\rule{12cm}{0pt}\rule[0pt]{0pt}{9cm}}
+ \begin{textblock}{15}(40,113)
+ \fontsize{10}{10}\selectfont\sffamily\raggedright \printcutter
+ \end{textblock}
+ \begin{textblock}{103}(56,109)
+ \fontsize{10}{10}\selectfont\sffamily\raggedright \printnomefichacatalografica
+ \end{textblock}
+ \begin{textblock}{103}(56,113)
+ \OnehalfSpacing\justifying
+ \setlength{\parindent}{7mm}
+ \fontsize{10}{10}\selectfont\sffamily\printtitulo. / \printautor. --~-- Jaboticabal, \printano \par
+ \pageref{pagesLTS.roman}, \pageref{pagesLTS.arabic}\ p. ; 28cm
+ \end{textblock}
+
+ \begin{textblock}{103}(56,135)
+ \OnehalfSpacing\justifying
+ \fontsize{10}{10}\selectfont\sffamily
+ \begingroup
+ \hyphenpenalty 10000
+ \exhyphenpenalty 10000
+ \nohyphens{
+ \begin{sloppypar}
+ \ifthenelse{\equal{\vtipodoc}{Tese}}{
+ Tese (doutorado)\space\textendash\space
+ }{
+ \ifthenelse{\equal{\vtipodoc}{Dissertação}}{
+ Dissertação (mestrado)\space\textendash\space
+ }
+ }
+ \@ Universidade Estadual Paulista, Faculdade de Ciências Agrárias e Veterinárias, \printano
+ \par
+ Orientador(a): \printorientador
+ \par
+ Banca examinadora: \vbanca
+ \par
+ Bibliografia
+ \linebreak
+ \par
+ \splitPC[\vpalavraschave]
+ I.~Título. II.~Jaboticabal~\textendash\ Faculdade de Ciências Agrárias e Veterinárias.
+ \end{sloppypar}
+ }
+ \endgroup
+ \end{textblock}
+
+ \center\begin{textblock}{119}(40,187)
+ \ignorespaces\fontsize{10}{10}\selectfont\sffamily \printcdu
+ \end{textblock}
+
+ \justify\begin{textblock}{120}(40,196)
+ \begin{sloppypar}
+ \begin{Spacing}{1.2}
+ \raggedright\fontsize{8}{8}\selectfont\sffamily{Ficha catalográfica elaborada pela Seção Técnica de Aquisição e Tratamento da Informação – Serviço Técnico de Biblioteca e Documentação - UNESP, Câmpus de Jaboticabal.
+ \ifdefined\vemail\par E-mail: \printemail\fi
+ }
+ \end{Spacing}
+ \end{sloppypar}
+ \end{textblock}
+ \vfill\null
+ \newpage
+ %\end{group}
+}
+
+\usepackage{incgraph,tikz}
+\newcommand{\certificadodeaprovacao}[1]{
+ %\begin{group}
+ \center
+ \incgraph[documentpaper][width=\paperwidth,height=\paperheight]{#1}
+ \cleardoublepage{}
+ %\end{group}
+}
+
+\newcommand{\dadoscurriculares}[1]{
+ %\begin{group}
+ \center\fontsize{12}{12}\selectfont\sffamily\textbf{DADOS CURRICULARES DO AUTOR}
+ \par\addvspace{18pt}
+ \justifying
+ \setlength{\parindent}{12.5mm}
+ \OnehalfSpacing#1
+ \cleardoublepage{}
+ %\end{group}
+}
+
+\newcommand{\epigrafe}[1]{
+ %\begin{group}
+ \null\vfill\raggedbottom\raggedleft\fontsize{12}{12}\selectfont\sffamily\textit{#1}
+ \cleardoublepage{}
+ %\end{group}
+}
+
+\newcommand{\dedicatoria}[1]{
+ %\begin{group}
+ \null\vfill\raggedbottom\raggedleft\fontsize{12}{12}\selectfont\sffamily\textit{#1}
+ \cleardoublepage{}
+ %\end{group}
+}
+
+\newcommand{\agradecimentos}[1]{
+ \center\fontsize{12}{12}\selectfont\sffamily\textbf{AGRADECIMENTOS}
+ \par\addvspace{18pt}
+ \justifying
+ \setlength{\parindent}{12.5mm}
+ \OnehalfSpacing#1
+ \cleardoublepage{}
+}
+
+\newcommand{\sumario}{
+ \frontmatter
+ \pagestyle{cstyle}
+ \center
+ \OnehalfSpacing
+ \tableofcontents*
+ \cleardoublepage{}
+}
+
+\newcommand{\resumo}[1]{
+ \center\fontsize{12}{12}\selectfont\sffamily\textbf{\MakeUppercase{\printtitulo}}
+ \par\addvspace{18pt}
+ \justifying
+ \setlength{\parindent}{0mm}
+ \SingleSpacing\textbf{RESUMO\space\textendash}\space\ignorespaces#1
+ \\
+ \\
+ \textbf{Palavras-chave: }\printpalavraschave
+ \cleardoublepage{}
+}
+
+\renewcommand{\abstract}[1]{
+ \center\fontsize{12}{12}\selectfont\sffamily\textbf{\MakeUppercase{\printtituloingles}}
+ \par\addvspace{18pt}
+ \justifying
+ \setlength{\parindent}{0mm}
+ \SingleSpacing\textbf{ABSTRACT\space\textendash}\space\ignorespaces#1
+ \\
+ \\
+ \textbf{Keywords: }\printkeywords
+ \cleardoublepage{}
+}
+
+\newcommand{\listadetabelas}{
+ \center
+ \OnehalfSpacing
+ \listoftables*
+ \cleardoublepage{}
+}
+
+\newcommand{\listadefiguras}{
+ \center
+ \OnehalfSpacing
+ \listoffigures*
+ \cleardoublepage{}
+}
+
+\newcommand{\corpodotextoemcapitulos}{
+ \mainmatter
+ \pagestyle{pstyle}
+ \chapterstyle{chap1}
+ \setcounter{secnumdepth}{2}
+ \setcounter{secnumdepth}{3}
+ \OnehalfSpacing
+}
+
+\newcommand{\preparebibliography}{
+ \citeoption{abnt-full-initials=yes}
+ \citeoption{abnt-etal-list=0}
+ \citeoption{abnt-thesis-year=both}
+ \citeoption{abnt-emphasize=bf}
+ \citeoption{abnt-url-package=url}
+ \bibliographystyle{fcavtex}
+ \renewcommand{\bibname}{Referências}
+}
+
+\def\bibliography#1{% ****
+ {
+ \ifx \SingleSpacing\undefined
+ \singlespacing
+ \else
+ \SingleSpacing
+ \fi
+ %
+ \ifthenelse{\boolean{ABCIciteoptionwasused}
+ \and\boolean{ABCIauto-abntoptions}}
+ {
+ % this system of checking is not good...
+ \IfSubStringInString{abntex2-options}{#1}
+ {\if\cb@roottest
+ \if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi
+ \fi
+ \begingroup % localize hooks into \@bibitem
+ \ifx\@CitationPrefix\@empty\else \ifx\the@ipfilectr\@empty\else
+ \@cb@insertprefix
+ \fi\fi
+ \cb@dobiblio{\@currentipfile.bbl}%
+ \endgroup}
+ {\if\cb@roottest
+ \if@filesw\immediate\write\@auxout{\string\bibdata{abntex2-options,#1}}\fi
+ \fi
+ \begingroup % localize hooks into \@bibitem
+ \ifx\@CitationPrefix\@empty\else \ifx\the@ipfilectr\@empty\else
+ \@cb@insertprefix
+ \fi\fi
+ \cb@dobiblio{\@currentipfile.bbl}%
+ \endgroup}
+ }
+ {
+ \if\cb@roottest
+ \if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi
+ \fi
+ \begingroup % localize hooks into \@bibitem
+ \ifx\@CitationPrefix\@empty\else \ifx\the@ipfilectr\@empty\else
+ \@cb@insertprefix
+ \fi\fi
+ \cb@dobiblio{\@currentipfile.bbl}%
+ \endgroup
+ }
+ % \@input@{\jobname.bbl}
+ }
+ }
+
+\RequirePackage[pagecontinue=false]{pageslts}
+\pagenumbering{arabic}
diff --git a/macros/latex/contrib/fcavtex/manual/fcavtex.pdf b/macros/latex/contrib/fcavtex/manual/fcavtex.pdf
new file mode 100644
index 0000000000..96489164f0
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/manual/fcavtex.pdf
Binary files differ
diff --git a/macros/latex/contrib/fcavtex/manual/fcavtex.tex b/macros/latex/contrib/fcavtex/manual/fcavtex.tex
new file mode 100644
index 0000000000..2ad6beb444
--- /dev/null
+++ b/macros/latex/contrib/fcavtex/manual/fcavtex.tex
@@ -0,0 +1,234 @@
+%% fcavtex.tex, v-1.1 waltermaldonado
+%% Copyright 2015 by Walter Maldonado Jr
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Walter Maldonado Jr
+%%
+%% Creator and original mantainer: Walter Maldonado Jr <walter@agroestat.com.br>
+
+\documentclass[a4paper]{ltxdoc}
+\usepackage{lmodern} % Usa a fonte Latin Modern
+\usepackage[T1]{fontenc} % seleção de códigos de fonte.
+\usepackage[utf8]{inputenc} % determina a codificação utiizada (conversão automática dos acentos)
+\usepackage{hyperref} % controla a formação do índice
+\usepackage{parskip} % espaçamento entre os parágrafos
+\usepackage{microtype} % para melhorias de justificação
+\usepackage{morefloats} % permite mais floats
+
+
+% Babel e ajustes
+\usepackage[brazil]{babel} % idiomas
+\addto\captionsbrazil{
+ %% ajusta nomes padroes do babel
+ \renewcommand{\bibname}{Refer\^encias}
+ \renewcommand{\indexname}{\'Indice}
+ \renewcommand{\listfigurename}{Lista de ilustra\c{c}\~{o}es}
+ \renewcommand{\listtablename}{Lista de tabelas}
+ %% ajusta nomes usados com a macro \autoref
+ \renewcommand{\pageautorefname}{p\'agina}
+ \renewcommand{\sectionautorefname}{se{\c c}\~ao}
+ \renewcommand{\subsectionautorefname}{subse{\c c}\~ao}
+ \renewcommand{\paragraphautorefname}{par\'agrafo}
+ \renewcommand{\subsubsectionautorefname}{subse{\c c}\~ao}
+ \renewcommand{\paragraphautorefname}{subse{\c c}\~ao}
+}
+
+\title{\textbf{A classe \textsf{fcavTeX}} \\ \Large{Teses e dissertações \\ Faculdade de Ciências Agrárias e Veterinárias de Jaboticabal}}
+
+% \thanks{Este documento
+% se referete ao \textsf{abntex2} versão \fileversion,
+% de \filedate.}
+
+\author{Walter Maldonado Jr\\walter@agroestat.com.br}
+
+\date{\today, v-1.1}
+
+\hypersetup{
+ pdftitle={A classe fcavTeX},
+ pdfauthor={Walter Maldonado Jr},
+ pdfsubject={Teses e dissertações da Faculdade de Ciências Agrárias e Veterinárias de Jaboticabal},
+ pdfkeywords={FCAV}{UNESP}{trabalho acadêmico}{dissertação}{tese}{Jaboticabal},
+ pdfproducer={Walter Maldonado Jr -- walter@agroestat.com.br}, % producer of the document
+ pdfcreator={LaTeX with fcavTeX},
+ colorlinks=true,
+ linkcolor=blue,
+ citecolor=blue,
+ urlcolor=blue
+}
+
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+
+\changes{v1.0}{2015/06/27}{Versão inicial}
+
+\usepackage{xcolor}
+\usepackage{listings}
+
+\lstset
+{
+ language=[LaTeX]TeX,
+ breaklines=true,
+ basicstyle=\tt\scriptsize,
+ keywordstyle=\color{blue},
+ identifierstyle=\color{black},
+ extendedchars=true,
+ literate={á}{{\'a}}1 {ã}{{\~a}}1 {é}{{\'e}}1 {ó}{{\'o}}1 {ç}{{\c{c}}}1 {í}{{\'i}}1 {Ç}{{\c{C}}}1 {Ã}{{\~A}}1 {Â}{{\^A}}1 {ô}{{\^o}}1 {õ}{{\~o}}1,
+}
+
+\begin{document}
+
+
+\maketitle
+
+\begin{abstract}
+A formatação de um trabalho
+acadêmico é sempre uma tarefa árdua, mecânica e cansativa. Quando
+nos deparamos com um trabalho extenso e com diversas referências bibliográficas,
+semanas de trabalho se vão. A classe fcavTeX poupa o usuário de horas perdidas
+em frente a um editor de texto limitado que não irá garantir a padronização do
+seu documento. Com um conhecimento básico de \LaTeX \ é possível escrever toda a
+sua tese ou dissertação sem precisar se preocupar com tamanho de fonte, espaçamento, etc.
+Quantos espaços após o título? Será que esse título é em negrito? São perguntas
+que não merecem desperdício de tempo excessivo de um pesquisador.
+\end{abstract}
+
+\tableofcontents
+
+\listoftables
+
+% ------
+\section{Introdução}
+% ------
+
+O progresso da tecnologa é fascinante. A cada dia que passa aumentam as possiblilidades
+e os recursos que ela nos oferece. Se compararmos algumas tarefas que executamos hoje com a maneira
+com que eram desenvolvidas dez anos atrás veremos que há um progresso impressionante. Tomem como exemplo os \emph{smartphones}
+e como ficou fácil gerenciar a nossa agenda de compromissos, que além de tudo nos alerta quando esquecemos de algo,
+ao nosso alcance 24h por dia.
+
+E nós ainda estamos escrevendo nossos trabalhos acadêmicos como escrevíamos há 25 anos. Escrevemos um título, selecionamos
+e mudamos os atributos de fonte. Quando muito, temos estilos pré-definidos para essa tarefa, o que ajuda um pouco, mas
+não é suficiente. Digo que não é suficiente pois, se estamos fazendo um trabalho acadêmico, com certeza estamos seguindo
+diversas regras que nos são impostas. Regras essas que \emph{todos} os alunos deverão seguir.
+
+Pois bem, quando estava decidindo como escreveria minha tese de doutorado, tais pensamentos me vieram à mente. Depois
+de um tempo de reflexão cheguei à seguinte conclusão: ``Irei escrever minha tese utilizando o \LaTeX!!''. Dessa maneira,
+seria possível, além de garantir um nível de qualidade superior ao meu trabalho, transformar os padrões que
+desenvolveria em uma classe para que todos os alunos a pudessem utilizar e economizar muito tempo.
+
+E aqui está a fcavTeX. Espero que seja útil e me coloco a disposição para questionamentos e para que possamos melhorá-la.
+Tenho certeza de que, com um conhecimento básico de \LaTeX, muito tempo poderá ser economizado e a qualidade estética
+dos trabalhos de nossa universidade será melhorada consideravelmente.
+
+\section{Exemplo de utlilização} % (fold)
+\label{sec:exemplo_de_utliliza_o}
+O uso da classe é extremamente intuitivo. Os comandos são auto-decritivos e basta trocar o conteúdo entre as chaves dentro
+do seu arquivo .tex. Atualmente, somente a estrutura de tese em capítulos é suportada, mas o modelo convencional também será
+incluído. Todos os recursos apresentados pela classe estão em conformidade com as normas da universidade, que podem ser conferidas
+\href{http://www.fcav.unesp.br/Home/posgraduacao/normas_disss_tese.pdf}{aqui}. Segue o código do exemplo.
+
+\begin{lstlisting}
+ \documentclass{fcavtex}
+
+ \begin{document}
+
+ \titulo{ESTIMATIVA DA PRODUÇÃO DE CITROS USANDO IMAGENS DIGITAIS}
+ \tituloingles{Citrus yield estimation using digital images}
+ \autor{Walter Maldonado Jr}
+ \orientador{Prof. Dr. José Carlos Barbosa}
+ \qualificacaoautor{Engenheiro agrônomo}
+ \instituicao{UNIVERSIDADE ESTADUAL PAULISTA - UNESP\par CÂMPUS DE JABOTICABAL}
+ \tipodoc{Tese}
+ \titulopretendido{Doutor}
+ \programa{Agronomia (Produção Vegetal)}
+ \ano{2015}
+
+ \capa
+ \folhaderosto
+ \fichacatalografica
+ \certificadodeaprovacao
+ \dadoscurriculares{Dados curriculares aqui!}
+ \epigrafe{Epígrafe}
+ \dedicatoria{Dedicatória}
+ \agradecimentos{Agradecimentos aqui!}
+ \sumario
+ \include{resumo}
+ \abstract{}{}
+ \listadetabelas
+ \listadefiguras
+
+ \corpodotextoemcapitulos
+
+ \include{cap1}
+
+ \end{document}
+\end{lstlisting}
+
+O comando \emph{include} chama o arquivo \emph{cap1.tex}, que deverá ter o seguinte formato para que todas as citações feitas com
+os comandos \emph{\textbackslash cite} possam gerar a lista de referências da maneira correta.
+
+\begin{lstlisting}
+ \chapter{Considerações gerais}
+ \section{Introdução}
+
+ Texto texto texto texto.
+
+ \section{Revisão de Literatura}
+
+ Primeiro parágrado da seção Revisão de Literatura. Texto texto texto.
+
+ Segundo parágrafo.
+
+ \bibliography{meuarquivobibtex.bib}
+
+\end{lstlisting}
+
+% section exemplo_de_utliliza_o (end)
+
+\section{Overlead e shareLaTeX} % (fold)
+\label{sec:sharelatex}
+O Overlead e o shareLaTeX são serviços gratuitos (apresentando algumas versões aprimoradas pagas) que podem ser utilizados para gerar a sua dissertação ou tese. A principal vantagem desse serviço é que ele dispensa o download e instalação das pesadas distribuições LaTeX na sua máquina local. Sendo assim, basta você acessar o website \href{http://www.overleaf.com}{http://www.overleaf.com} ou \href{https://pt.sharelatex.com/}{https://pt.sharelatex.com/}, criar uma conta e gerar os seus documentos \LaTeX\ na hora!
+
+Foram disponibilizados projetos modelo para que seja possível checar como ocorre o processo de edição e compilação dos arquivos nos dois serviços citados. Eles podem ser acessados através dos links \href{https://www.overleaf.com/latex/templates/univeresidade-estadual-paulista-unesp-thesis-template/tgggvvxccvqv}{Overleaf} e \href{https://pt.sharelatex.com/project/558eb0eed8509a876d9e2e51}{shareLaTeX}.
+
+No momento da compilação, os utilitários do \LaTeX\ buscam pelos arquivos de classe e de estilos bibliográficos na mesma pasta do arquivo principal do seu projeto (\emph{.tex}). Portanto, basta adicionar os arquivos \emph{fcavtex.bst} e \emph{fcavtex.cls} na mesma pasta do seu projeto. Tal procedimento vale para uma pasta em seu computador local, caso tenha instalado uma distribuição \LaTeX\ ou para um novo projeto no shareLaTeX, onde os arquivos podem ser visualizados na lista à esquerda na tela. Tais arquivos podem ser obtidos no site de desenvolvimento da classe \href{https://github.com/waltermaldonado/fcavTeX}{https://github.com/waltermaldonado/fcavTeX} e submetidos ao seu projeto pela ferramenta apropriada.
+% section sharelatex (end)
+
+\section{A classe \emph{memoir}} % (fold)
+\label{sec:a_classe_memoir}
+A classe base para o desenvolvimento do projeto foi a \emph{memoir}. É uma classe muito conhecida, com recursos que facilitam a implementação das regras e que é vastamente documentada. Ao escrever o seu documento \LaTeX, você pode utililzar todos os recursos da classe, de acordo com a documentação disponível no link \href{http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf}{http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf}.
+% section a_classe_memoir (end)
+
+\section{Modificações da classe abnTeX2} % (fold)
+\label{sec:modifica_es_da_classe_abntex2}
+Não foi possível utilizar a classe abnTeX2 em sua forma original para o cumprimento das normas da FCAV/UNESP.\@ O único módulo utilizado foi o de estilos bibliográficos para citações do tipo autor, ano, listadas em ordem alfabética. Na seção 1.3.2.1 das normas são expostas as regras da lista de referências e algumas delas não estavam em concordância com o disponível pela classe. As modificações realizadas foram:
+\begin{description}
+ \item[Nomes iniciais dos autores não estavam sendo abreviados] Foi necessário corrigir esse comportamento para que os nomes inicias fossem abreviados.
+ \item[Citação de trabalho em evento, impresso, eletrônico e CD-ROM] Foi adicionado um recurso para a inclusão dos termos `Anais\ldots' e `Anais eletrônicos\ldots', além do ajuste da ordem dos elementos volume, ano, local de publicação e editor. Tais citações são originadas do tipo BibTeX \emph{inproceedings}, listado no Zotero como `Conferência'.
+ \item[Citação de capítulo em livro] O nome do livro nas citações do tipo \emph{inbook} ou \emph{incollection} foi alterado para todas as letras e maiúscula e o título do livro colocado em ênfase (negrito no caso, exigido pelas normas).
+ \item[Data de acesso do documento eletrônico] No caso dos documentos que possuem url e que a data de acesso está presente (\emph{urldate}), a classe abnTeX2 coloca como `Acesso em: 2015-06-27', por exemplo, apenas copiando os valores presentes no campo do registro. O registro deve ser preenchido com a data no formato do exemplo e o estilo foi alterado para corrigir essa ordem e colocar o nome abreviado do mês.
+\end{description}
+
+% section modifica_es_da_classe_abntex2 (end)
+
+\section{Colabore com o fcavTeX} % (fold)
+\label{sec:colabore_com_o_fcavtex}
+Você pode colaborar com o projeto através do site no GitHub. Há uma seção específica para o apontamento de bugs e sugestões (\emph{Issues}) e, se desejar, você pode clonar o nosso projeto em sua máquina, fazer as modificações que julgar necessárias e submete-las novamente. O git é um sistema de controle de versão, que permite a diversos colaboradores a modificação dos originais de um sistema e a incorporação dessas modificações mediante aprovação do responsável pelo projeto. Também é possível que um repositório git seja utilizado para criar um novo projeto.
+
+Na prática, o repositório git é uma pasta, na qual os arquivos do projeto residem. A cada vez que você modifica um arquivo nessa pasta, o git detecta essa ação e, quando você executa um \emph{commit}, essas alterações geram uma nova versão do sistema, passível de ser recuperada caso seja necessário após novos \emph{commits}. Essas alterações, por fim, são sincronizadas com um servidor (no caso o GitHub).
+
+Você pode também endereçar os seus comentários e sugestões para o e-mail disponível no início deste documento.
+% section colabore_com_o_fcavtex (end)
+
+
+\end{document}