summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-08-08 21:10:47 +0000
committerKarl Berry <karl@freefriends.org>2016-08-08 21:10:47 +0000
commit8b010bf175fc702c012330bbeb23459abfa08ebd (patch)
tree55115abddbb293d6477492e5322b3653e1a738b8 /Master/texmf-dist/tex
parentf911b110d65d1bc8b33b9ad28d4ead401cf0bae3 (diff)
biblatex-abnt
git-svn-id: svn://tug.org/texlive/trunk@41824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx253
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx67
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx69
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx1886
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx514
5 files changed, 2789 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx
new file mode 100644
index 00000000000..65eae35ba75
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx
@@ -0,0 +1,253 @@
+%% Copyright 2016 Daniel B. Marques
+%%
+%% 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 Daniel B. Marques.
+
+\ProvidesFile{abnt.lbx}%
+[2016/07/06\space v2.0.1\space ABNT biblatex citation style]%
+
+\InheritBibliographyExtras{brazilian}
+
+% Remove preposition between month and year in longdates
+\DeclareBibliographyExtras{
+ \protected\def\mkbibdatelong#1#2#3{%
+ \iffieldundef{#3}
+ {}
+ {\stripzeros{\thefield{#3}}%
+ \iffieldundef{#2}{}{\addspace}}%
+ \iffieldundef{#2}
+ {}
+ {\mkbibmonth{\thefield{#2}}%
+ \iffieldundef{#1}{}{\addspace}}%
+ \thefield{#1}}%
+}
+
+\NewBibliographyString{sineloco}
+\NewBibliographyString{sinenomine}
+
+\NewBibliographyString{sheet}
+\NewBibliographyString{sheets}
+
+\NewBibliographyString{organizer}
+\NewBibliographyString{organizers}
+\NewBibliographyString{byorganizer}
+\NewBibliographyString{byorganizerfo}
+
+\NewBibliographyString{photographer}
+\NewBibliographyString{byphotographer}
+
+\NewBibliographyString{artisticdirector}
+\NewBibliographyString{byartisticdirector}
+
+\NewBibliographyString{recorder}
+\NewBibliographyString{byrecorder}
+
+\NewBibliographyString{interviewer}
+\NewBibliographyString{byinterviewer}
+
+\NewBibliographyString{generalorganizer}
+\NewBibliographyString{bygeneralorganizer}
+\NewBibliographyString{bygeneralorganizerfo}
+
+\NewBibliographyString{bycoeditor}
+\NewBibliographyString{bydirector}
+\NewBibliographyString{bygeneraldirector}
+\NewBibliographyString{bycoordinator}
+\NewBibliographyString{byproducer}
+\NewBibliographyString{byscreenwriter}
+\NewBibliographyString{byinterpreter}
+\NewBibliographyString{byillustrator}
+\NewBibliographyString{bytechnicalreviser}
+
+\NewBibliographyString{illustrated}
+\NewBibliographyString{monography}
+
+\NewBibliographyString{recensionof}
+
+\NewBibliographyString{apud}
+
+\DeclareBibliographyStrings{%
+ apud = {{apud}{apud}},
+ volume = {{volume}{v\adddot}},
+ volumes = {{volumes}{v\adddot}},
+ number = {{número}{n\adddot}},
+ pages = {{p\'aginas}{p\adddot}},
+ involumes = {{in}{in}},
+ in = {{in}{in}},
+ inseries = {{in}{in}},
+ sineloco = {{sine loco}{s\adddot l\adddot}},
+ sinenomine = {{sine nomine}{s\adddot n\adddot}},
+ url = {{disponível em}{disponível em}},
+ urlseen = {{acesso em}{acesso em}},
+ sheet = {{folha}{f.}},
+ sheets = {{folhas}{f.}},
+ backrefpage = {{citado na p\'agina}{citado na p\adddot}},
+ backrefpages = {{citado nas p\'aginas}{citado nas pp\adddot}},
+ illustrated = {{ilustrado}{il.}},
+ monography = {{monografia}{monografia}},
+ phdthesis = {{Tese (Doutorado)}{Tese (Doutorado)}},
+ mathesis = {{Tese (Mestrado)}{Tese (Mestrado)}},
+ reprintfrom = {{separata de}{separata de}},
+ recensionof = {{recensão de}{recensão de}},
+ bycoeditor = {{co-edição de}{co-edição de}},
+ bydirector = {{direção de}{direção de}},
+ bygeneraldirector = {{direção geral de}{direção geral de}},
+ bycoordinator = {{coordenação de}{coordenação de}},
+ byproducer = {{produção de}{produção de}},
+ byscreenwriter = {{roteiro de}{roteiro de}},
+ byinterpreter = {{interpretação de}{interpretação de}},
+ byillustrator = {{ilustrações de}{ilustrações de}},
+ photographer = {{fotógrafo}{fot.}},
+ byphotographer = {{fotografia de}{fotografia de}},
+ recorder = {{gravador}{gravador}},
+ byrecorder = {{gravação de}{gravação de}},
+ interviewer = {{entrevistador}{entrevistador}},
+ byinterviewer = {{entrevista por}{entrevista por}},
+ artisticdirector = {{diretor artístico}{dir. art.}},
+ byartisticdirector = {{direção artística de}{direção artística de}},
+ organizer = {{organização}{org\adddot}},
+ organizers = {{organização}{org\adddot}},
+ generalorganizer = {{organização geral}{org\adddot geral}},
+ byorganizer = {{organização de}{organização de}},
+ bygeneralorganizer = {{organização geral de}{organização geral de}},
+ byauthor = {{por}{por}},
+ byeditor = {{edição de}{edição de}},
+ bycompiler = {{compilação de}{compilação de}},
+ byredactor = {{redigido por}{redigido por}},
+ byreviser = {{revisão de}{revisão de}},
+ bytechnicalreviser = {{revisão técnica de}{revisão técnica de}},
+ byreviewer = {{resenha de}{resenha de}},
+ byfounder = {{fundado por}{fundado por}},
+ bycontinuator = {{continuado por}{continuado por}},
+ bycollaborator = {{em colabora\c{a}\~o com}{em colabora\c{a}\~o com}},
+ bytranslator = {{tradução de}{tradução de}},
+ bycommentator = {{comentário de}{comentário de}},
+ byannotator = {{notas de}{notas de}},
+ withcommentator = {{coment\'ario de}{coment\'ario de}},
+ withannotator = {{notas de}{notas de}},
+ withintroduction = {{introdu\c{c}\~ao de}{introdu\c{c}\~ao de}},
+ withforeword = {{pref\'acio de}{pref\'acio de}},
+ withafterword = {{posf\'acio de}{posf\'acio de}},
+ byorganizerfo = {{organização e prefácio de}{organização e prefácio de}},
+ bygeneralorganizerfo = {{organização geral e prefácio de}{organização geral e prefácio de}},
+ byeditortr = {{edição e tradução de}%
+ {edição e tradução de}},
+ byeditorco = {{edição e comentário de}%
+ {edição e comentário de}},
+ byeditoran = {{edição e notas de}%
+ {edição e notas de}},
+ byeditorin = {{edição e introdução de}%
+ {edição e introdução de}},
+ byeditorfo = {{edição e prefácio de}%
+ {edição e prefácio de}},
+ byeditoraf = {{edição e posfácio de}%
+ {edição e posfácio de}},
+ byeditortrco = {{edição, tradução e comentário de}%
+ {edição, tradução e comentário de}},
+ byeditortran = {{edição, tradução e notas de}%
+ {edição, tradução e notas de}},
+ byeditortrin = {{edição, tradução e introdução de}%
+ {edição, tradução e introdução de}},
+ byeditortrfo = {{edição, tradução e prefácio de}%
+ {edição, tradução e prefácio de}},
+ byeditortraf = {{edição, tradução e posfácio de}%
+ {edição, tradução e posfácio de}},
+ byeditorcoin = {{edição, comentário e introdução de}%
+ {edição, comentário e introdução de}},
+ byeditorcofo = {{edição, comentário e prefácio de}%
+ {edição, comentário e prefácio de}},
+ byeditorcoaf = {{edição, comentário e posfácio de}%
+ {edição, comentário e posfácio de}},
+ byeditoranin = {{edição, introdução e notas de}%
+ {edição, introdução e notas de}},
+ byeditoranfo = {{edição, prefácio e notas de}%
+ {edição, prefácio e notas de}},
+ byeditoranaf = {{edição, posfácio e notas de}%
+ {edição, posfácio e notas de}},
+ byeditortrcoin = {{edição, tradução, comentário e introdução de}%
+ {edição, tradução, comentário e introdução de}},
+ byeditortrcofo = {{edição, tradução, comentário e prefácio de}%
+ {edição, tradução, comentário e prefácio de}},
+ byeditortrcoaf = {{edição, tradução, comentário e posfácio de}%
+ {edição, tradução, comentário e posfácio de}},
+ byeditortranin = {{edição, tradução, notas e introdução de}%
+ {edição, tradução, notas e introdução de}},
+ byeditortranfo = {{edição, tradução, notas e prefácio de}%
+ {edição, tradução, notas e prefácio de}},
+ byeditortranaf = {{edição, tradução, notas e posfácio de}%
+ {edição, tradução, notas e posfácio de}},
+ bytranslatorco = {{tradução e comentário de}%
+ {tradução e comentário de}},
+ bytranslatoran = {{tradução e notas de}%
+ {tradução e notas de}},
+ bytranslatorin = {{tradução e introdução de}%
+ {tradução e introdução de}},
+ bytranslatorfo = {{tradução e prefácio de}%
+ {tradução e prefácio de}},
+ bytranslatoraf = {{tradução e posfácio de}%
+ {tradução e posfácio de}},
+ bytranslatorcoin = {{tradução, comentário e introdução de}%
+ {tradução, comentário e introdução de}},
+ bytranslatorcofo = {{tradução, comentário e prefácio de}%
+ {tradução, comentário e prefácio de}},
+ bytranslatorcoaf = {{tradução, comentário e posfácio de}%
+ {tradução, comentário e posfácio de}},
+ bytranslatoranin = {{tradução, notas e introdução de}%
+ {tradução, notas e introdução de}},
+ bytranslatoranfo = {{tradução, notas e prefácio de}%
+ {tradução, notas e prefácio de}},
+ bytranslatoranaf = {{tradução, notas e posfácio de}%
+ {tradução, notas e posfácio de}},
+ langamerican = {{versão americana}{versão americana}},
+ langbrazilian = {{versão brasileira}{versão brasileira}},
+ langcatalan = {{versão catalã}{versão catalã}},
+ langcroatian = {{versão croata}{versão croata}},
+ langczech = {{versão tcheca}{versão tcheca}},
+ langdanish = {{versão dinamarquesa}{versão dinamarquesa}},
+ langdutch = {{versão holandesa}{versão holandesa}},
+ langenglish = {{versão inglesa}{versão inglesa}},
+ langfinnish = {{versão finlandesa}{versão finlandesa}},
+ langfrench = {{versão francesa}{versão francesa}},
+ langgerman = {{versão alem\~a}{versão alem\~a}},
+ langgreek = {{versão grega}{versão grega}},
+ langitalian = {{versão italiana}{versão italiana}},
+ langlatin = {{versão latina}{versão latina}},
+ langnorwegian = {{versão norueguesa}{versão norueguesa}},
+ langpolish = {{versão polonesa}{versão polonesa}},
+ langportuguese = {{versão portuguesa}{versão portuguesa}},
+ langrussian = {{versão russa}{versão russa}},
+ langslovene = {{versão eslovena}{versão eslovena}},
+ langspanish = {{versão espanhola}{versão espanhola}},
+ langswedish = {{versão sueca}{versão sueca}},
+ fromamerican = {{do original ingl\^es}{do original ingl\^es}},
+ frombrazilian = {{do original portugu{\^e}s}{do original portugu{\^e}s}},
+ fromcatalan = {{do original catalão}{do original catalão}},
+ fromcroatian = {{do original croata}{do original croata}},
+ fromczech = {{do original tcheco}{do original tcheco}},
+ fromdanish = {{do original dinamarqu\^es}{do original dinamarqu\^es}},
+ fromdutch = {{do original holand{\^e}s}{do original holand{\^e}s}},
+ fromenglish = {{do original ingl\^es}{do original ingl\^es}},
+ fromfinnish = {{do original finland\^es}{do original finland\^es}},
+ fromfrench = {{do original franc\^es}{do original franc\^es}},
+ fromgerman = {{do original alem\~ao}{do original alem\~ao}},
+ fromgreek = {{do original grego}{do original grego}},
+ fromitalian = {{do original italiano}{do original italiano}},
+ fromlatin = {{do original em latim}{do original em latim}},
+ fromnorwegian = {{do original noruegu\^es}{do original noruegu\^es}},
+ frompolish = {{do original polonês}{do original polonês}},
+ fromportuguese = {{do original portugu{\^e}s}{do original portugu{\^e}s}},
+ fromrussian = {{do original russo}{do original russo}},
+ fromslovene = {{do original esloveno}{do original esloveno}},
+ fromspanish = {{do original espanhol}{do original espanhol}},
+ fromswedish = {{do original sueco}{do original sueco}},
+}
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx
new file mode 100644
index 00000000000..55b1581520b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx
@@ -0,0 +1,67 @@
+%% Copyright 2016 Daniel B. Marques
+%%
+%% 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 Daniel B. Marques.
+
+\ProvidesFile{abnt-numeric.bbx}%
+[2016/07/06\space v2.0.1\space ABNT biblatex citation style]%
+
+\RequireBibliographyStyle{abnt}
+\ExecuteBibliographyOptions{labelnumber}
+
+\providebool{bbx:subentry}
+
+\DeclareBibliographyOption[boolean]{subentry}[true]{%
+ \setbool{bbx:subentry}{#1}}
+
+\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
+
+\defbibenvironment{bibliography}
+ {\list
+ {\printtext[labelnumberwidth]{%
+ \printfield{labelprefix}%
+ \printfield{labelnumber}}}
+ {\setlength{\labelwidth}{\labelnumberwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}}%
+ \renewcommand*{\makelabel}[1]{\hss##1}}
+ {\endlist}
+ {\item}
+
+\defbibenvironment{shorthand}
+ {\list
+ {\printfield[shorthandwidth]{shorthand}}
+ {\setlength{\labelwidth}{\shorthandwidth}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{\biblabelsep}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{\bibitemsep}%
+ \setlength{\parsep}{\bibparsep}%
+ \renewcommand*{\makelabel}[1]{\hss##1}}}
+ {\endlist}
+ {\item}
+
+\DeclareBibliographyDriver{set}{%
+ \entryset
+ {\ifbool{bbx:subentry}
+ {\printfield[bibentrysetcount]{entrysetcount}%
+ \printunit*{\addnbspace}}
+ {}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{setpageref}%
+ \finentry}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx
new file mode 100644
index 00000000000..20d8d66181f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx
@@ -0,0 +1,69 @@
+%% Copyright 2016 Daniel B. Marques
+%%
+%% 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 Daniel B. Marques.
+
+\ProvidesFile{abnt-numeric.cbx}%
+[2016/07/06\space v2.0.1\space ABNT biblatex citation style]%
+
+\RequireCitationStyle{numeric}
+
+\DeclareCiteCommand{\cite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\usebibmacro{prenote}}
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareMultiCiteCommand{\cites}[\mkbibparens]{\cite}{\multicitedelim}
+\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim}
+\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]
+ {\smartcite}{\multicitedelim}
+
+
+\renewbibmacro*{textcite}{%
+ \iffieldequals{namehash}{\cbx@lasthash}
+ {\setunit{\multicitedelim}}
+ {\ifnameundef{labelname}
+ {\printfield[citetitle]{labeltitle}}
+ {\printnames{labelname}}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{namelabeldelim}\bibopenparen}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \ifnumequal{\value{citecount}}{1}
+ {\usebibmacro{prenote}}
+ {}%
+ \usebibmacro{cite}%
+ \setunit{%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}%
+ \textcitedelim}}
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx
new file mode 100644
index 00000000000..01fb395227a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx
@@ -0,0 +1,1886 @@
+%% Copyright 2016 Daniel B. Marques
+%%
+%% 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 Daniel B. Marques.
+
+\ProvidesFile{abnt.bbx}%
+[2016/07/06\space v2.0.1\space ABNT biblatex citation style]%
+
+\RequireBiber[3]%
+\DeclareLanguageMapping{brazilian}{abnt-brazilian}%
+
+\RequireBibliographyStyle{standard}%
+
+\ExecuteBibliographyOptions{block=none,urldate=long,pagetracker}%
+
+\InitializeBibliographyStyle{\global\undef\bbx@lasthash}%
+
+
+% ----------
+% Options
+% ----------
+
+% Option to make titles bold.
+\newtoggle{bftitles}%
+\DeclareBibliographyOption{bftitles}[true]{%
+ \settoggle{bftitles}{#1}}%
+
+% Option to use small caps in the bibliography.
+\newtoggle{scbib}%
+\DeclareBibliographyOption{scbib}[true]{%
+ \settoggle{scbib}{#1}}%
+
+% Option to hide "[s.l.]".
+\newtoggle{nosl}%
+\DeclareBibliographyOption{nosl}[true]{%
+ \settoggle{nosl}{#1}}%
+\DeclareEntryOption[boolean]{nosl}[true]{%
+ \settoggle{nosl}{#1}}%
+
+% Option to hide "[s.n.]".
+\newtoggle{nosn}%
+\DeclareBibliographyOption{nosn}[true]{%
+ \settoggle{nosn}{#1}}%
+\DeclareEntryOption[boolean]{nosn}[true]{%
+ \settoggle{nosn}{#1}}%
+
+% Option to hide "[S.l.: sn]".
+\newtoggle{noslsn}%
+\DeclareBibliographyOption{noslsn}[true]{%
+ \settoggle{noslsn}{#1}%
+ \settoggle{nosl}{#1}%
+ \settoggle{nosn}{#1}}%
+\DeclareEntryOption[boolean]{noslsn}[true]{%
+ \settoggle{noslsn}{#1}%
+ \settoggle{nosl}{#1}%
+ \settoggle{nosn}{#1}}%
+
+\newtoggle{repeattitle}%
+\DeclareBibliographyOption[boolean]{repeattitles}[true]{%
+ \settoggle{repeattitle}{#1}%
+ \ifstrequal{#1}{true}{%
+ \newbibmacro*{bbx:savetitle}{}%
+ \newbibmacro*{bbx:savesubtitle}{}%
+ }{%
+ \ExecuteBibliographyOptions{pagetracker}%
+ \newbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}%
+ \newbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}%
+ }%
+}%
+\DeclareEntryOption[boolean]{repeattitle}[true]{%
+ \settoggle{repeattitle}{#1}%
+}%
+\DeclareEntryOption[boolean]{repeattitles}[true]{%
+ \settoggle{repeattitle}{#1}%
+}%
+
+\newtoggle{repeatfields}%
+\DeclareBibliographyOption[boolean]{repeatfields}[true]{%
+ \settoggle{repeatfields}{#1}%
+ \ifstrequal{#1}{true}{%
+ \renewbibmacro*{bbx:savehash}{}%
+ \renewbibmacro*{bbx:saveorg}{}%
+ \renewbibmacro*{bbx:savetitle}{}%
+ \renewbibmacro*{bbx:savesubtitle}{}%
+ }{%
+ \ExecuteBibliographyOptions{pagetracker}%
+ \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}%
+ \renewbibmacro*{bbx:saveorg}{\savelist{organization}{\bbx@lasthash}}%
+ \renewbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}%
+ \renewbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}%
+ }%
+}%
+\DeclareEntryOption[boolean]{repeatfields}[true]{%
+ \settoggle{repeatfields}{#1}%
+}%
+
+% Option to use the original dashes instead of underscores.
+\DeclareBibliographyOption[boolean]{usedashes}[true]{%
+ \ifstrequal{#1}{true}%
+ {\renewcommand*{\bibnamedash}{%
+ \ifdimless{\leftmargin}{0.75em}%
+ {\mbox{\textemdash\addspace}}%
+ {\makebox[\leftmargin][l]{%
+ \ifdimless{\leftmargin}{1.25em}%
+ {\textendash}%
+ {\textemdash}}}}}{}}%
+
+% Option to use hanging indentation.
+\setlength{\bibhang}{0pt}%
+\DeclareBibliographyOption{indent}[true]{%
+ \ifstrequal{#1}{true}%
+ {\setlength{\bibhang}{\ifnumequal{\parindent}{0}{1em}{\parindent}}}%
+ {}}%
+
+
+% ----------
+% DeclareSortingScheme
+% ----------
+
+\DeclareSortingScheme{nty}{%
+ \sort{%
+ \field{presort}%
+ }%
+ \sort[final]{%
+ \field{sortkey}%
+ }%
+ \sort{%
+ \field{sortname}%
+ \field{holder}%
+ \field{author}%
+ \field{editor}%
+ \field{organization}%
+ \field{sorttitle}%
+ \field{issuetitle}%
+ \field{title}%
+ \field{subtitle}%
+ }%
+ \sort{%
+ \field{nameaddon}%
+ \field{sorttitle}%
+ \field{issuetitle}%
+ \field{title}%
+ \field{subtitle}%
+ }%
+ \sort{%
+ \field{sorttitle}%
+ \field{issuetitle}%
+ \field{title}%
+ \field{subtitle}%
+ }%
+ \sort{%
+ \field{sortyear}%
+ \field{year}%
+ }%
+ \sort{%
+ \field[padside=left,padwidth=4,padchar=0]{volume}%
+ \literal{0000}%
+ }%
+}%
+
+
+% ----------
+% DeclareSourcemap
+% ----------
+
+% This maps some fields used in abntex2cite to biblatex fields.
+\DeclareSourcemap{%
+ \maps[datatype=bibtex]{%
+ \map{%
+ \step[fieldsource=conference-number,fieldtarget=number]%
+ \step[fieldsource=conference-year,fieldtarget=eventdate]%
+ \step[fieldsource=conference-location,fieldtarget=venue]%
+ \step[fieldsource=conference-number,fieldtarget=number]%
+ \step[fieldsource=org-short,fieldtarget=shortauthor]%
+ \step[fieldsource=urlaccessdate,fieldtarget=urldate]%
+ \step[fieldsource=year-presented,fieldtarget=eventyear]%
+ \step[fieldsource=furtherresp,fieldtarget=titleaddon]%
+ \step[typesource=journalpart,typetarget=supperiodical]%
+ }%
+ \map[overwrite=false]{%
+ \step[fieldsource=reprinted-from, final]%
+ \step[fieldset=related, origfieldval]%
+ }%
+ \map[overwrite=false]{%
+ \step[fieldsource=reprinted-text, final]%
+ \step[fieldset=relatedtype, fieldvalue={reprintfrom}]%
+ }%
+ \map{%
+ \pertype{patent}% Use the organization as sourcekey for patents
+ \step[fieldsource=organization, final]%
+ \step[fieldset=sortkey, origfieldval]%
+ }%
+ \map[overwrite=false]{%
+ \pertype{phdthesis}%
+ \pertype{mastersthesis}%
+ \pertype{monography}%
+ \step[fieldset=bookpagination, fieldvalue={sheet}]%
+ }%
+ }%
+}%
+
+\DeclareDatamodelFields[type=field,datatype=literal]{%
+ section,%
+ illustrated,%
+ dimensions,%
+ reprinted-text,%
+}%
+
+\DeclareDatamodelEntryfields[monography]{%
+ location,%
+ author,%
+ chapter%
+ pages,%
+ pagetotal,%
+ bookpagination,%
+ institution,%
+ title,%
+ type,%
+ note,%
+ isbn,%
+ doi,%
+ eprint,%
+ url,%
+ addendum,%
+ pubstate,%
+ pageref,%
+ date}%
+
+
+% ----------
+% newcommand
+% ----------
+
+\newcommand{\abntnum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}}%
+
+% Use "John Doe, Jack Roe and Joe Blow" for byeditor+others,
+% "Doe; Roe; Blow" everywhere else.
+\newtoggle{byeditor+others}%
+\renewcommand*{\multinamedelim}{\iftoggle{byeditor+others}{\addcomma\addspace}{\addsemicolon\addspace}}%
+\renewcommand*{\finalnamedelim}{\iftoggle{byeditor+others}{\addspace\bibstring{and}\addspace}{\addsemicolon\addspace}}%
+
+\renewcommand*{\nameyeardelim}{\addcomma\addspace}%
+
+\renewcommand*{\subtitlepunct}{\addcolon\addspace}%
+
+% Use a period to separate the backref from what comes before
+% E.g.: "1973. p. 33–79. Ver p. 2."
+\renewcommand*{\bibpagerefpunct}{\addperiod\addspace}%
+
+% A command to make the first word in a sentence uppercase,
+% used for the title when a book has no author.
+\newcommand\FirstWordUpper[1]{\@firstwordupper#1 \@nil}%
+\newcommand\@firstwordupper{}%
+\def\@firstwordupper#1 #2\@nil{\MakeUppercase{#1} #2\unskip}%
+
+% A command to print the first word in a sentence in small caps,
+% used for the title when a book has no author.
+\newcommand\FirstWordSC[1]{\@firstwordsc#1 \@nil}%
+\newcommand\@firstwordsc{}%
+\def\@firstwordsc#1 #2\@nil{\textsc{#1} #2\unskip}%
+
+% A command to print the first word in a sentence in lowercase and in small caps.
+\newcommand\FirstWordLCSC[1]{\@firstwordlcsc#1 \@nil}%
+\newcommand\@firstwordlcsc{}%
+\def\@firstwordlcsc#1 #2\@nil{\textsc{\MakeLowercase{#1}} #2\unskip}%
+
+% This has to do with the dashed option
+\newbool{bbx@inset}%
+
+% This replaces repeated authors' names.
+\renewcommand*{\bibnamedash}{\underline{\hspace*{4em}}\addperiod\addspace}%
+
+% Use or not small caps for acronyms, depending on the scbib option.
+\renewcommand*{\mkbibacro}[1]{%
+ \iftoggle{scbib}%
+ {\textsc{\MakeLowercase{#1}}}%
+ {#1}}%
+
+
+% ----------
+% DeclareNameFormat
+% ----------
+
+\DeclareNameFormat{LAST-first}{%
+ \ifgiveninits{%
+ \usebibmacro{name:family-given}{%
+ \iftoggle{scbib}{%
+ \textsc{\namepartfamily}%
+ }{%
+ \MakeUppercase{\namepartfamily}%
+ }%
+ }%
+ {\namepartgiveni}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ }{%
+ \usebibmacro{name:family-given}{%
+ \iftoggle{scbib}{%
+ \textsc{\MakeLowercase{\namepartfamily}}%
+ }{%
+ \MakeUppercase{\namepartfamily}%
+ }%
+ }%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ }%
+ \usebibmacro{name:andothers}%
+}%
+
+\DeclareNameFormat{full}{%
+ \usebibmacro{name:given-family}%
+ {\namepartfamily}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}}%
+
+\DeclareNameAlias{default}{LAST-first}%
+
+\DeclareNameAlias{byauthor}{full}%
+\DeclareNameAlias{bybookauthor}{byauthor}%
+\DeclareNameAlias{byeditor}{full}%
+\DeclareNameAlias{byeditora}{byeditor}%
+\DeclareNameAlias{byeditorb}{byeditor}%
+\DeclareNameAlias{byeditorc}{byeditor}%
+\DeclareNameAlias{bytranslator}{full}%
+
+\DeclareNameAlias{withcommentator}{given-family}%
+\DeclareNameAlias{withannotator}{given-family}%
+\DeclareNameAlias{withintroduction}{given-family}%
+\DeclareNameAlias{withforeword}{given-family}%
+\DeclareNameAlias{withafterword}{given-family}%
+
+% ----------
+% DeclareFieldFormat
+% ----------
+
+% Use bold or italics for the main titles, depending on what the user chose.
+\DeclareFieldFormat{journaltitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+\DeclareFieldFormat{issuetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+\DeclareFieldFormat{maintitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+\DeclareFieldFormat{booktitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+\DeclareFieldFormat{citetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+\DeclareFieldFormat*{title}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}%
+
+\DeclareFieldFormat{authortype}{\bibsentence#1}
+\DeclareFieldFormat{editortype}{\bibsentence#1}
+
+% Use normal text for the title in these entries.
+\DeclareFieldFormat%
+ [article, inbook, incollection, bookinbook, inproceedings, unpublished]%
+ {title}{\addspace #1\isdot}%
+
+\DeclareNumChars*{,-/}% Strings with these characters will still be considered numbers.
+
+% Add "n." and "v." abbreviations and make them, along with "p.", always lowercase,
+% even if preceded by a period. E.g.: "London: Routledge, 2009. p. 235–250."
+\DeclareFieldFormat*{number}{%
+ \ifnumerals{#1}%
+ {\addspace \MakeLowercase{\bibstring{number}}~\abntnum{#1}}%
+ {\addspace #1\isdot}}%
+
+\DeclareFieldFormat[book, proceedings, inproceedings, misc]{number}{\addcomma\addspace #1}%
+
+\DeclareFieldFormat*{volume}{%
+ \ifnumerals{#1}%
+ {\addspace \MakeLowercase{\bibstring{volume}}~#1}%
+ {\addspace #1\isdot}}%
+
+\DeclareFieldFormat*{chapter}{%
+ \ifnumerals{#1}%
+ {\addspace \MakeLowercase{\bibstring{chapter}~#1}}%
+ {\addspace #1\isdot}}%
+
+\DeclareFieldFormat{edition}{%
+ \ifnumerals{#1}%
+ {\addspace #1\adddot\addspace\bibstring{edition}}%
+ {\addspace #1\isdot}}%
+
+\DeclareFieldFormat*{pages}{\MakeLowercase{\mkpageprefix[bookpagination]{#1}}}%
+\DeclareFieldFormat*{pagetotal}{\MakeLowercase{\mkpagetotal[bookpagination]{#1}}}%
+% Always use "f." for the pagination in thesis.
+%\DeclareFieldFormat[thesis]{pagetotal}{\MakeLowercase{#1 \bibstring{sheet}}}%
+
+\DeclareFieldFormat{illustrated}{\addspace #1\isdot}%
+
+\DeclareFieldFormat{url}{\bibstring{url}\addcolon\addspace\url{<#1>}}%
+\DeclareFieldFormat{urldate}{\bibstring{urlseen}\addcolon\addspace #1}%
+
+\DeclareFieldFormat*{note}{\addspace #1\addperiod\addspace}%
+
+\DeclareFieldFormat{mathesis}{\bibstring{mathesis}}%
+\DeclareFieldFormat{phdthesis}{\bibstring{phdthesis}}%
+
+\DeclareFieldFormat[monography]{type}{\bibstring{monography}\addspace\printtext[parens]{#1}}%
+
+\DeclareFieldFormat{uppercase}{\iftoggle{scbib}{\textsc{\smartlowercase{#1}}}{\smartuppercase{#1}}}%
+\DeclareFieldFormat{lowercase}{\smartlowercase{#1}}%
+\DeclareFieldFormat{upperfirst}{%
+ \iftoggle{scbib}{%
+ \ifgiveninits{%
+ \normalfont\FirstWordSC{#1}%
+ }{%
+ \normalfont\FirstWordLCSC{#1}%
+ }%
+ }{%
+ \normalfont\FirstWordUpper{#1}%
+ }%
+}%
+\DeclareFieldFormat{noformat}{\normalfont{#1}}%
+
+\DeclareFieldFormat{nameaddon}{\addspace #1}%
+
+\DeclareFieldFormat{relatedstring:reprintfrom}{\addspace #1\addcolon\addspace}%
+\DeclareFieldFormat{relatedstring:default}{\addspace #1\addcolon\addspace}%
+
+\DeclareFieldFormat{origlanguage}{%
+ \ifbibstring{#1}%
+ {\bibxstring{#1}}%
+ {\ifbibstring{from#1}%
+ {\bibxstring{from#1}}%
+ {#1}}%
+}%
+
+\DeclareListFormat{uppercase}{%
+ \usebibmacro{list:delim}{#1}%
+ \iftoggle{scbib}{%
+ \ifgiveninits{%
+ \normalfont\smartsc{#1}%
+ }{%
+ \normalfont\smartlcsc{#1}%
+ }%
+ }{%
+ \normalfont\smartuppercase{#1}%
+ }%
+ \isdot%
+ \usebibmacro{list:andothers}}%
+
+\DeclareListFormat{upperfirst}{%
+ \usebibmacro{list:delim}{#1}%
+ \iftoggle{scbib}{%
+ \ifgiveninits{%
+ \normalfont\FirstWordSC{#1}%
+ }{%
+ \normalfont\FirstWordLCSC{#1}%
+ }%
+ }{%
+ \normalfont\FirstWordUpper{#1}%
+ }%
+ \isdot%
+ \usebibmacro{list:andothers}%
+}%
+
+
+% ----------
+% newbibmacro
+% ----------
+
+% Always use a period after the year.
+\renewbibmacro*{date}{\printdate\addperiod}%
+
+% Use a comma after journal volumes.
+\renewbibmacro*{volume+number+eid}{%
+ \printfield{volume}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{number}%
+ \setunit{\addcomma\addspace}%
+ \printfield{eid}}%
+
+% Don't use parenthesis around the date.
+\renewbibmacro*{issue+date}{%
+ \iffieldundef{issue}%
+ {\usebibmacro{date}}%
+ {\printfield{issue}%
+ \setunit*{\addspace}%
+ \usebibmacro{date}}%
+ \newunit}%
+
+% Add a comma after journal names and remove the date.
+\renewbibmacro*{journal+issuetitle}{%
+ \usebibmacro{journal}%
+ \setunit*{\addcomma\addspace}%
+ \iffieldundef{series}%
+ {}%
+ {\newunit%
+ \printfield{series}%
+ \setunit{\addspace}}%
+ \usebibmacro{volume+number+eid}%
+ \newunit}%
+
+% Remove the parenthesis around the backref.
+\renewbibmacro*{pageref}{%
+ \iflistundef{pageref}%
+ {}%
+ {\printtext{% \printtext[parens]{%
+ \ifnumgreater{\value{pageref}}{1}%
+ {\bibstring{backrefpages}\ppspace}%
+ {\bibstring{backrefpage}\ppspace}%
+ \printlist[pageref][-\value{listtotal}]{pageref}}}}%
+
+\newbibmacro*{titleiskey}[2]{%
+\ifboolexpr{%
+ test {\ifnameundef{author}}%
+ and%
+ test {\ifcsundef{saveded}}%
+ and%
+ test {\ifcsundef{savedorg}}%
+ and%
+ test {\iffieldundef{eventtitle}}%
+}%
+ {#1}%
+ {#2}}%
+
+\renewbibmacro*{title}{%
+ \ifboolexpr{%
+ test {\iffieldundef{title}}%
+ and%
+ test {\iffieldundef{subtitle}}%
+ }%
+ {\global\undef\bbx@lasttitle%
+ \global\undef\bbx@lastsubtitle}%
+ {\usebibmacro{bbx:titledashcheck}%
+ {\unspace\bibnamedash}%
+ {\usebibmacro{bbx:savetitle}%
+ \usebibmacro{bbx:savesubtitle}%
+ \printtext[title]{%
+ \usebibmacro{titleiskey}%
+ {\unspace\printfield[upperfirst]{title}}%
+ {\iffieldundef{maintitle}%
+ {\printfield[titlecase]{title}}%
+ {\printfield[noformat]{title}}}%
+ \normalfont{\setunit*{\subtitlepunct}%
+ \printfield[noformat]{subtitle}%
+ \setunit{\addperiod\addspace}}}%
+ \newunit}}%
+ \printfield{titleaddon}}%
+
+\newbibmacro*{inmaintitle}{%
+ \iffieldundef{maintitle}{}{%
+ \usebibmacro{in:}%
+ \iftoggle{repeatfields}%
+ {\addspace\usebibmacro{author/editor+others}}%
+ {\addspace\bibnamedash}%
+ \newunit\newblock%
+ \usebibmacro{maintitle}%
+ }%
+}%
+
+\renewbibmacro*{maintitle+booktitle}{%
+ \iffieldundef{maintitle}%
+ {}%
+ {\usebibmacro{maintitle}%
+ \newunit\newblock%
+ \iffieldundef{volume}%
+ {}%
+ {\printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcolon\addspace}}}%
+ \usebibmacro{booktitle}%
+ \newunit}%
+
+\newbibmacro*{maintitle/booktitle}{%
+ \iffieldundef{maintitle}%
+ {\usebibmacro{booktitle}}%
+ {\usebibmacro{maintitle}}%
+}%
+
+\renewbibmacro*{booktitle}{%
+ \ifboolexpr{%
+ test {\iffieldundef{booktitle}}%
+ and%
+ test {\iffieldundef{booksubtitle}}%
+ }%
+ {}%
+ {\printtext[booktitle]{%
+ \printfield[titlecase]{booktitle}%
+ \normalfont{\setunit*{\subtitlepunct}}%
+ \printfield[noformat]{booksubtitle}}%
+ \newunit}%
+ \printfield{booktitleaddon}}%
+
+\renewbibmacro*{maintitle}{%
+ \ifboolexpr{%
+ test {\iffieldundef{maintitle}}%
+ and%
+ test {\iffieldundef{mainsubtitle}}%
+ }%
+ {}%
+ {\printtext[maintitle]{%
+ \printfield[titlecase]{maintitle}%
+ \normalfont{\setunit*{\subtitlepunct}}%
+ \printfield[noformat]{mainsubtitle}}%
+ \newunit}%
+ \printfield{maintitleaddon}}%
+
+\newbibmacro*{publisher}{%
+ \iflistundef{publisher}%
+ {\iftoggle{nosn}{}{\printtext[brackets]{\bibstring{sinenomine}}}}%
+ {\printlist{publisher}}}%
+
+\newbibmacro*{location}{%
+ \iflistundef{location}%
+ {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}%
+ {\printlist{location}}}%
+
+\newbibmacro*{venue}{%
+ \iffieldundef{venue}%
+ {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}%
+ {\printfield{venue}}}%
+
+\renewbibmacro*{location+date}{%
+ \usebibmacro{location}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \newunit%
+}%
+
+\renewbibmacro*{series+number}{%
+ \iffieldundef{series}{}{%
+ \printtext[parens]{%
+ \printfield{series}%
+ \setunit*{\addspace}%
+ \printfield{number}%
+ \newunit}%
+ }%
+ }%
+
+% Add s.l. and s.n. when fields are missing.
+\renewbibmacro*{publisher+location+date}{%
+ \ifboolexpr{%
+ test {\iflistundef{publisher}}%
+ and%
+ test {\iflistundef{location}}%
+ and%
+ not test {\iftoggle{nosl}}%
+ and%
+ not test {\iftoggle{nosn}}%
+ }%
+ {\printtext[brackets]{\bibstring{sineloco}%
+ \setunit{\addcolon\addnbspace}%
+ \bibstring{sinenomine}}}%
+ {\ifboolexpr{%
+ test {\ifnameundef{author}}%
+ and%
+ test {\ifnameundef{editor}}%
+ and%
+ test {\iflistundef{publisher}}%
+ and%
+ not test {\iflistundef{organization}}%
+ }%
+ {\usebibmacro{location}}%
+ {\usebibmacro{location}%
+ \setunit*{\addcolon\addspace}%
+ \usebibmacro{publisher}}}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \newunit}%
+
+\renewbibmacro*{url+urldate}{%
+ \usebibmacro{url}%
+ \iffieldundef{urlyear}%
+ {}%
+ {\setunit*{\addperiod\addspace}%
+ \usebibmacro{urldate}}}%
+
+\newbibmacro*{mathesis}{%
+ \iffieldundef{type}{%
+ \bibstring{dissertation}\addspace\printtext[parens]{\bibstring{mathesis}}%
+ }{%
+ \bibstring{dissertation}\addspace\printtext[parens]{\printfield{type}}%
+ }%
+}%
+
+\newbibmacro*{phdthesis}{%
+ \iffieldundef{type}{%
+ \bibstring{thesis}\addspace\printtext[parens]{\bibstring{phdthesis}}%
+ }{%
+ \bibstring{thesis}\addspace\printtext[parens]{\printfield{type}}%
+ }%
+}%
+
+\newbibmacro*{inbookauthor+others}{%
+ \usebibmacro{in:}%
+ \ifboolexpr{%
+ test {\ifnameundef{author}}%
+ and%
+ test {\ifcsundef{saveded}}%
+ and%
+ test {\ifcsundef{savedorg}}%
+ }%
+ {}%
+ {\ifboolexpr{%
+ test {\ifnameundef{bookauthor}}%
+ or%
+ test {\ifnamesequal{author}{bookauthor}}%
+ }%
+ {\iftoggle{repeatfields}%
+ {\usebibmacro{author/editor+others}}%
+ {\bibnamedash}}%
+ {\printnames{bookauthor}}}%
+}%
+
+% For @bookinbook entries: use the bookauthor when available,
+% else use editor+others.
+\newbibmacro*{bookauthor/editor+others}{%
+ \ifnameundef{bookauthor}{%
+ \usebibmacro{editor+others}}%
+ {\printnames{bookauthor}}}%
+
+\renewbibmacro*{periodical}{%
+ \iffieldundef{title}%
+ {}%
+ {\iffieldundef{issue}{%
+ \printtext[title]{%
+ \unspace\printfield[upperfirst]{title}%
+ \normalfont{\setunit*{\subtitlepunct}%
+ \printfield[noformat]{subtitle}}}%
+ }%
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \normalfont{\setunit*{\subtitlepunct}%
+ \printfield[noformat]{subtitle}}}}%
+ }%
+}%
+
+\renewbibmacro*{issue}{%
+ \iffieldundef{issuetitle}%
+ {}%
+ {\printtext[issuetitle]{%
+ \printfield[upperfirst]{issuetitle}%
+ \setunit*{\subtitlepunct}%
+ \printfield[noformat]{issuesubtitle}}}}%
+
+\newbibmacro*{organization}{%
+ \iflistundef{organization}%
+ {\global\undef\bbx@lastorg}%
+ {\usebibmacro{bbx:dashcheck}%
+ {\bibnamedash}%
+ {\usebibmacro{bbx:saveorg}%
+ \printlist[uppercase]{organization}}%
+ \savelistcs*{organization}{savedorg}%
+ \clearlist{organization}%
+ \newunit\newblock%
+ \printfield{nameaddon}}%
+}%
+
+\renewbibmacro*{author}{%
+ \ifboolexpr{%
+ test \ifuseauthor%
+ and%
+ not test {\ifnameundef{author}}%
+ }{%
+ \usebibmacro{bbx:dashcheck}{%
+ \bibnamedash%
+ }{%
+ \usebibmacro{bbx:savehash}%
+ \printnames{author}%
+ }%
+ \addspace%
+ \usebibmacro{authorstrg}%
+ \newunit\newblock%
+ \printfield{nameaddon}%
+ }{%
+ \global\undef\bbx@lasthash%
+ }%
+}%
+
+\renewbibmacro*{editor+others}{%
+ \ifboolexpr{%
+ test \ifuseeditor%
+ and%
+ not test {\ifnameundef{editor}}%
+ }{%
+ \usebibmacro{bbx:dashcheck}{%
+ \bibnamedash%
+ }{%
+ \usebibmacro{bbx:savehash}%
+ \printnames{editor}%
+ \setunit{\addspace}%
+ \printtext[parens]{\usebibmacro{editor+othersstrg}}%
+ }%
+ \savenamecs*{editor}{saveded}%
+ \clearname{editor}%
+ }{%
+ \global\undef\bbx@lasthash%
+ \usebibmacro{organization}%
+ }%
+}%
+
+\newbibmacro*{in:editor+others}{%
+ \usebibmacro{in:}%
+ \addspace%
+ \ifnameundef{editor}{%
+ \printlist[uppercase]{organization}%
+ }{%
+ \printnames{editor}%
+ \setunit*{\addspace}%
+ \printtext[parens]{\usebibmacro{editor+othersstrg}}%
+ \clearname{editor}%
+ }%
+}%
+
+\newbibmacro*{in:eventtitle/organization/editor}{%
+ \usebibmacro{in:}%
+ \iffieldundef{eventtitle}{%
+ \ifnameundef{editor}{%
+ \printlist[uppercase]{organization}%
+ \clearlist{organization}%
+ }{%
+ \printnames{editor}%
+ }%
+ }{%
+ \printfield[uppercase]{eventtitle}%
+ }%
+}%
+
+\newbibmacro*{editor+others/organization}{%
+ \ifnameundef{editor}%
+ {\usebibmacro{organization}}%
+ {\usebibmacro{editor+others}}}%
+
+\newbibmacro*{author/organization}{%
+ \ifnameundef{author}%
+ {\usebibmacro{organization}}%
+ {\usebibmacro{author}}}%
+
+\newbibmacro*{organization/eventtitle}{%
+ \iffieldundef{eventtitle}%
+ {\usebibmacro{organization}}%
+ {\printfield[uppercase]{eventtitle}}}%
+
+\renewbibmacro*{byeditor+others}{%
+ \toggletrue{byeditor+others}%
+ \ifnameundef{editor}%
+ {}%
+ {\usebibmacro{byeditor+othersstrg}%
+ \setunit*{\addspace}%
+ \printnames[byeditor]{editor}%
+ \clearname{editor}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}}%
+ \togglefalse{byeditor+others}%
+
+\renewbibmacro*{related:reprintfrom}[1]{%
+ \entrydata*{#1}{%
+ \usedriver%
+ {\ifnameundef{savedauthor}%
+ {\ifnameundef{savededitor}%
+ {}%
+ {\ifnamesequal{editor}{savededitor}%
+ {\clearname{editor}}%
+ {}}}%
+ {\ifnamesequal{author}{savedauthor}%
+ {\clearname{author}}%
+ {}}%
+ \renewbibmacro*{related:init}{}%
+ \DeclareNameAlias{sortname}{default}%
+ \ifbibmacroundef{date+extrayear}%
+ {}%
+ {\renewbibmacro*{date+extrayear}{}%
+ \renewbibmacro*{date}{\printdate}}%
+ \renewbibmacro*{pageref}{}}%
+ {\thefield{entrytype}}}}%
+
+\newbibmacro*{language}{%
+ \ifboolexpr{%
+ test {\iflistundef{language}}%
+ or%
+ test {\iffieldundef{origlanguage}}%
+ }%
+ {}%
+ {%
+ \printtext{\printlist{language}\addspace\printfield{origlanguage}}%
+ }%
+}%
+
+\newbibmacro{journal+section}{%
+ \usebibmacro{journal}%
+ \iffieldundef{section}%
+ {}%
+ {\setunit{\addspace\textendash\addspace}%
+ \printfield{section}}%
+}%
+
+\newbibmacro*{bbx:savehash}{%
+ \savefield{fullhash}{\bbx@lasthash}}%
+
+\newbibmacro*{bbx:saveorg}{%
+ \savelist{organization}{\bbx@lastorg}}%
+
+\newbibmacro*{bbx:savetitle}{%
+ \savefield{title}{\bbx@lasttitle}}%
+
+\newbibmacro*{bbx:savesubtitle}{%
+ \savefield{subtitle}{\bbx@lastsubtitle}}%
+
+\newtoggle{isdashed}%
+
+\newbibmacro*{bbx:dashcheck}[2]{%
+ \ifboolexpr{%
+ (%
+ test {\iffieldequals{fullhash}{\bbx@lasthash}}%
+ or%
+ test {\iflistequals{organization}{\bbx@lastorg}}%
+ )%
+ and%
+ not test \iffirstonpage%
+ and%
+ not test {\iftoggle{repeatfields}}%
+ and%
+ (%
+ not bool {bbx@inset}%
+ or%
+ test {\iffieldequalstr{entrysetcount}{1}}%
+ )%
+ }%
+ {\settoggle{isdashed}{true}#1}%
+ {\settoggle{isdashed}{false}#2}}%
+
+\newbibmacro*{bbx:titledashcheck}[2]{%
+ \iftoggle{isdashed}{%
+ \ifboolexpr{%
+ test {\iffieldequals{title}{\bbx@lasttitle}}%
+ and
+ (%
+ test {\iffieldequals{subtitle}{\bbx@lastsubtitle}}%
+ or%
+ test {\iffieldundef{subtitle}}%
+ )
+ and%
+ not test {\iftoggle{repeattitle}}
+ }%
+ {#1}%
+ {#2}%
+ }{%
+ #2%
+ }%
+}%
+
+\renewbibmacro*{begrelated}{%
+ \booltrue{bbx@inset}}%
+
+
+% ----------
+% Drivers
+% ----------
+
+\DeclareBibliographyDriver{article}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/organization}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit%
+ \usebibmacro{bytranslator+others}%
+ \newunit\newblock%
+ \printfield{version}%
+ \newunit\newblock%
+ \iffieldundef{relatedtype}{}{%
+ \bibstring{\strfield{relatedtype}}}%
+ \setunit*{\addcolon\addspace}%
+ \usebibmacro{journal+section}%
+ \setunit*{\addcomma\addspace}%
+ \printlist{publisher}%
+ \setunit*{\addcomma\addspace}%
+ \printlist{location}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{volume+number+eid}%
+ \setunit{\addcomma\addspace}%
+ \printfield{pages}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pagetotal}%
+ \setunit{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \newunit%
+ \printfield{note}%
+ \setunit{\addcolon\addspace}%
+ \usebibmacro{issue}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{issn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{mvbook}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{inmaintitle}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \printfield{volumes}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit\newblock%
+ \printfield{pagetotal}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{illustrated}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{dimensions}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \usebibmacro{language}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{book}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{inmaintitle}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcomma\addspace}%
+ \printfield{chapter}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pages}%
+ \newunit\newblock%
+ \printfield{pagetotal}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{illustrated}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{dimensions}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \usebibmacro{language}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{inbook}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \usebibmacro{inbookauthor+others}%
+ \newunit\newblock%
+ \usebibmacro{maintitle/booktitle}%
+ \newunit%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit%
+ \printfield{volume}%
+ \printfield{part}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{chapter+pages}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{mvcollection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{inmaintitle}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \printfield{volumes}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit\newblock%
+ \printfield{pagetotal}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{illustrated}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{dimensions}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \usebibmacro{language}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{collection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{inmaintitle}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \printfield{volume}%
+ \printfield{part}%
+ \setunit{\addcomma\addspace}%
+ \printfield{chapter}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pages}%
+ \newunit\newblock%
+ \printfield{pagetotal}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{illustrated}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{dimensions}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \usebibmacro{language}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{incollection}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{in:editor+others}%
+ \newunit\newblock%
+ \usebibmacro{maintitle/booktitle}%
+ \newunit%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit%
+ \printfield{volume}%
+ \printfield{part}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{periodical}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor+others/organization}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byeditor}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{issn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+ %
+\DeclareBibliographyDriver{supperiodical}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{issue}%
+ \setunit*{\addperiod\addspace}%
+ \usebibmacro{periodical}%
+ \setunit*{\addperiod\addspace}%
+ \usebibmacro{location}%
+ \setunit*{\addcolon\addspace}%
+ \usebibmacro{publisher}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{volume}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{number}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pages}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \printfield{type}%
+ \newunit%
+ \printfield{version}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{pagetotal}%
+ \newunit%
+ \printfield{note}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+% TODO: For now there is no way to make just part of the%
+% organization name uppercase (C.f. 10520-2002:6.3-6)
+\DeclareBibliographyDriver{manual}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{maintitle+title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \printfield{type}%
+ \newunit%
+ \printfield{version}%
+ \newunit\newblock%
+ \usebibmacro{location+date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{proceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{organization/eventtitle}%
+ \setunit{\addcomma\addspace}%
+ \printfield{number}%
+ \setunit*{\adddot\addcomma\addspace}%
+ \printeventdate%
+ \setunit{\addcomma\addspace}%
+ \usebibmacro{venue}%
+ \newunit%
+ \usebibmacro{maintitle+title}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \iffieldundef{maintitle}%
+ {\printfield{volume}%
+ \printfield{part}}%
+ {}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \printlist{organization}% This has to be printed conditionally
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{inproceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{in:eventtitle/organization/editor}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{number}%
+ \setunit*{\adddot\addcomma\addspace}%
+ \printeventdate%
+ \setunit*{\addcomma\addspace}%
+ \printfield{venue}%
+ \newunit\newblock%
+ \usebibmacro{maintitle+booktitle}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit%
+ \ifboolexpr{%
+ test {\iffieldundef{booktitle}}%
+ and%
+ test {\iffieldundef{maintitle}}%
+ }%
+ {}%
+ {\usebibmacro{publisher+location+date}}%
+ \newunit\newblock%
+ \iffieldundef{maintitle}%
+ {\printfield{volume}%
+ \printfield{part}}%
+ {}%
+ \newunit%
+ \printfield{volumes}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printlist{organization}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{thesis}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \usebibmacro{date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \printfield{type}%
+ \setunit*{\addspace\textendash\addspace}%
+ \printlist{institution}%
+ \setunit*{\addcomma\addspace}%
+ \printlist{location}%
+ \setunit*{\addcomma\addspace}%
+ \printeventdate%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{monography}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \usebibmacro{date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \printfield{type}%
+ \setunit*{\addspace\textendash\addspace}%
+ \printlist{institution}%
+ \setunit*{\addcomma\addspace}%
+ \printlist{location}%
+ \setunit*{\addcomma\addspace}%
+ \printeventdate%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{booklet}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{maintitle+title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{type}%
+ \newunit%
+ \printfield{version}%
+ \newunit\newblock%
+ \usebibmacro{location+date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{note}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{patent}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \ifnameundef{holder}{%
+ \iflistundef{organization}{%
+ \usebibmacro{author/editor+others}%
+ }{%
+ \usebibmacro{organization}
+ \ifnameundef{author}{%
+ \printnames[given-family]{editor}%
+ }{%
+ \printnames[given-family]{author}
+ }%
+ }
+ }{%
+ \printnames{holder}
+ \ifnameundef{author}{%
+ \printnames[given-family]{editor}%
+ }{%
+ \printnames[given-family]{author}
+ }%
+ }
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printlist{location}%
+ \setunit*{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{number}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \printfield{type}%
+ \newunit%
+ \printfield{version}%
+ \newunit%
+ \printfield{note}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{report}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{maintitle+title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit%
+ \iffieldundef{maintitle}%
+ {\printfield{volume}%
+ \printfield{part}}%
+ {}%
+ \newunit%
+ \printfield{volumes}%
+ \newunit\newblock%
+ \usebibmacro{location+date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+\DeclareBibliographyDriver{misc}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/editor+others}%
+ \setunit{\labelnamepunct}\newblock%
+ \usebibmacro{maintitle+title}%
+ \newunit%
+ \printlist{language}%
+ \newunit\newblock%
+ \usebibmacro{byauthor}%
+ \newunit\newblock%
+ \usebibmacro{byeditor+others}%
+ \newunit\newblock%
+ \printfield{edition}%
+ \newunit%
+ \iffieldundef{maintitle}%
+ {\printfield{volume}%
+ \printfield{part}}%
+ {}%
+ \newunit%
+ \printfield{volumes}%
+ \newunit\newblock%
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock%
+ \usebibmacro{chapter+pages}%
+ \newunit%
+ \printfield{pagetotal}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{dimensions}%
+ \newunit\newblock%
+ \printfield{howpublished}%
+ \newunit\newblock%
+ \usebibmacro{series+number}%
+ \newunit\newblock%
+ \printfield{note}%
+ \newunit\newblock%
+ \iftoggle{bbx:isbn}%
+ {\printfield{isbn}}%
+ {}%
+ \newunit\newblock%
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock%
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock%
+ \usebibmacro{pageref}%
+ \newunit\newblock%
+ \iftoggle{bbx:related}%
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}%
+ {}%
+ \usebibmacro{finentry}}%
+
+% I copied this from authoryear.bbx for the dashed option.
+\DeclareBibliographyDriver{set}{%
+ \booltrue{bbx@inset}%
+ \entryset{}{}%
+ \newunit\newblock%
+ \usebibmacro{setpageref}%
+ \finentry}%
+
+
+% ----------
+% Helper commands
+% ----------
+
+\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}%
+
+\def\traceparam#1{\def\paramL{}\traceparamA #1\end}%
+\def\traceparamA{\futurelet\next\traceparamB}%
+\def\traceparamB{%
+ \let\nexts=\undefined%
+ \expandafter\ifx\space\next \let\nexts=\traceparamS \fi%
+ \ifx\bgroup\next \let\nexts=\traceparamD \fi%
+ \ifx\end\next \let\nexts=\traceparamE \fi%
+ \ifx\nexts\undefined \let\nexts=\traceparamC\fi%
+ \nexts%
+}%
+\def\traceparamS{\addto\paramL{ }\afterassignment\traceparamA \let\next= }%
+\def\traceparamC#1{\addto\paramL{#1}\traceparamA}%
+\def\traceparamD#1{%
+ \expandafter\addto\expandafter\paramL\expandafter%
+ {\expandafter\noexpand\csname ll:\detokenize{#1}\endcsname}%
+ \expandafter\def\csname ll:\detokenize{#1}\endcsname{\normalfont #1}%
+ \traceparamA%
+}%
+\def\traceparamE\end{}%
+
+\def\smartuppercase#1{%
+ \bgroup %
+ \traceparam{#1}%
+ \MakeUppercase{\paramL}%
+ \egroup%
+}%
+
+\def\smartlowercase#1{%
+ \bgroup %
+ \traceparam{#1}%
+ \MakeLowercase{\paramL}%
+ \egroup%
+}%
+
+\def\smartlcsc#1{%
+ \bgroup %
+ \traceparam{#1}%
+ \textsc{\MakeLowercase{\paramL}}%
+ \egroup%
+}%
+
+\def\smartsc#1{%
+ \bgroup %
+ \traceparam{#1}%
+ \textsc{\paramL}%
+ \egroup%
+}%
+
+
+\endinput%
+
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx
new file mode 100644
index 00000000000..856e75a2b0d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx
@@ -0,0 +1,514 @@
+%% Copyright 2016 Daniel B. Marques
+%%
+%% 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 Daniel B. Marques.
+
+\ProvidesFile{abnt.cbx}%
+[2016/07/06\space v2.0.1\space ABNT biblatex citation style]%
+
+\RequireBiber[3]
+\RequireCitationStyle{authoryear}
+
+\RequirePackage{xparse}
+
+\newcommand{\addapud}{%
+ \renewcommand*{\multicitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\space\bibstring{apud}}%
+ {\addsemicolon}%
+ \space}%
+ \renewcommand*{\textcitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\addspace\bibstring{apud}}%
+ {\addsemicolon}%
+ \space}%
+}
+
+\newcommand{\addand}{%
+ \renewcommand*{\multicitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\space\bibstring{and}}%
+ {\addsemicolon}%
+ \space}%
+ \renewcommand*{\textcitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\addspace\bibstring{and}}%
+ {\addsemicolon}%
+ \space}%
+}
+
+\DeclareFieldFormat{uppercasecite}{%
+ \iftoggle{sccite}{%
+ \textsc{\smartlowercase{#1}}%
+ }{%
+ \smartuppercase{#1}%
+ }%
+}
+
+% ----------
+% Options
+% ----------
+
+% Option to use small caps in the citations.
+\newtoggle{sccite}
+\DeclareBibliographyOption{sccite}[true]{%
+ \settoggle{sccite}{#1}}
+
+
+% ----------
+% DeclareNameFormat
+% ----------
+
+\DeclareNameFormat{LAST}{%
+ \ifcase\value{uniquename}%
+ \usebibmacro{name:family}%
+ {\iftoggle{sccite}%
+ {\textsc{\MakeLowercase{\namepartfamily}}}%
+ {\MakeUppercase{\namepartfamily}}}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ \or%
+ \ifuseprefix%
+ {\usebibmacro{name:given-family}%
+ {\iftoggle{sccite}%
+ {\textsc{\MakeLowercase{\namepartfamily}}}%
+ {\MakeUppercase{\namepartfamily}}}%
+ {\namepartgiveni}%
+ {\namepartprefix}%
+ {\namepartsuffixi}}%
+ {\usebibmacro{name:given-family}%
+ {\iftoggle{sccite}%
+ {\textsc{\MakeLowercase{\namepartfamily}}}%
+ {\MakeUppercase{\namepartfamily}}}%
+ {\namepartgiveni}%
+ {\namepartprefixi}%
+ {\namepartsuffixi}}%
+ \or%
+ \usebibmacro{name:given-family}%
+ {\iftoggle{sccite}%
+ {\textsc{\MakeLowercase{\namepartfamily}}}%
+ {\MakeUppercase{\namepartfamily}}}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ \fi%
+ \usebibmacro{name:andothers}}
+
+\DeclareNameFormat{fullcite}{%
+ \ifcase\value{uniquename}%
+ \usebibmacro{name:given-family}%
+ {\namepartfamily}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ \or%
+ \ifuseprefix%
+ {\usebibmacro{name:given-family}%
+ {\namepartfamily}%
+ {\namepartgiveni}%
+ {\namepartprefix}%
+ {\namepartsuffixi}}%
+ {\usebibmacro{name:given-family}%
+ {\namepartfamily}%
+ {\namepartgiveni}%
+ {\namepartprefixi}%
+ {\namepartsuffixi}}%
+ \or%
+ \usebibmacro{name:given-family}%
+ {\namepartfamily}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}%
+ \fi%
+ \usebibmacro{name:andothers}}
+
+
+% ----------
+% DeclareFieldFormat
+% ----------
+
+\DeclareFieldFormat{emphtitle}{\emph{#1}}
+
+\DeclareFieldFormat{citetitle}{%
+ \iftoggle{sccite}{%
+ \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}%
+ }{%
+ \normalfont\MakeUppercase{\FirstWord{#1}}%
+ }%
+}%
+
+
+% ----------
+% DeclareCiteCommand
+% ----------
+
+\NewDocumentCommand{\textapud}{o o m o o m}{%
+ \citelastname{#3}
+ \mkbibparens{%
+ \IfNoValueTF{#2}
+ {%
+ \IfNoValueTF{#1}
+ {\citeyear*{#3}}
+ {\citeyear*[#1]{#3}}%
+ }
+ {%
+ \citeyear*[#1][#2]{#3}%
+ }
+ \IfNoValueTF{#5}
+ {%
+ \IfNoValueTF{#4}
+ {\plaincite[\blx@imc@bibxstring{apud}][]{#6}}
+ {\plaincite[\blx@imc@bibxstring{apud}][#4]{#6}}%
+ }
+ {%
+ \cite[\blx@imc@bibxstring{apud} #4][#5]{#6}%
+ }%
+ }}
+
+\DeclareMultiCiteCommand{\apud}[\addapud\mkbibparens]
+ {\@apud}
+ {\setunit{\multicitedelim}}
+
+\DeclareCiteCommand{\@apud}
+ {\usebibmacro{cite:init}%
+ \iffieldundef{prenote}%
+ {}%
+ {\printfield[uppercasecite]{prenote}%
+ \addspace\bibstring{apud}\addspace}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {\setunit{\multicitedelim}}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\parencite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\cite}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {}%
+ {\usebibmacro{postnote}}
+
+\DeclareMultiCiteCommand{\cites}[\mkbibparens]
+ {\cite}%
+ {\setunit{\multicitedelim}}
+
+\DeclareCiteCommand*{\cite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\plaincite}
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\textcite}
+ {\usebibmacro{cite:init}%
+ \boolfalse{cbx:parens}%
+ \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}%
+ \renewcommand*{\multinamedelim}{\addcomma\addspace}}%
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey%
+ {\setcounter{textcitetotal}{1}}%
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcite}}%
+ {\ifbool{cbx:parens}%
+ {\bibcloseparen\global\boolfalse{cbx:parens}}%
+ {}}%
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand*{\textcite}
+ {\usebibmacro{cite:init}%
+ \boolfalse{cbx:parens}%
+ \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}%
+ \renewcommand*{\multinamedelim}{\addcomma\addspace}}%
+ {\usebibmacro{citeindex}%
+ \iffirstcitekey%
+ {\setcounter{textcitetotal}{1}}%
+ {\stepcounter{textcitetotal}%
+ \textcitedelim}%
+ \usebibmacro{textcitefull}}%
+ {\ifbool{cbx:parens}%
+ {\bibcloseparen\global\boolfalse{cbx:parens}}%
+ {}}%
+ {\usebibmacro{textcite:postnote}}
+
+\DeclareCiteCommand{\citetitle}[\mkbibparens]
+ {\usebibmacro{cite:init}%
+ \boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\ifciteindex%
+ {\indexfield{indextitle}}%
+ {}%
+ \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citetitle}
+ {\usebibmacro{cite:init}%
+ \boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\ifciteindex%
+ {\indexfield{indextitle}}%
+ {}%
+ \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\citelastname}
+ {\usebibmacro{cite:init}%
+ \boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\ifciteindex%
+ {\indexnames{labelname}}%
+ {}%
+ \printtext[bibhyperref]{\printnames{labelname}}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\citeauthor}[\mkbibparens]
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printtext[bibhyperref]{\printnames[LAST]{labelname}}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citeauthor}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printtext[bibhyperref]{\printnames{labelname}}}%
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand{\citeyear}[\mkbibparens]
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\printfield[bibhyperref]{year}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citeyear}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\printfield[bibhyperref]{year}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+
+% ----------
+% newbibmacro
+% ----------
+
+\newbibmacro*{cite:noname}{%
+ \printfield[citetitle]{title}}
+
+\newbibmacro*{cite:init}{%
+ \global\undef\cbx@lasthash}
+
+\newbibmacro*{cite:author}{%
+ \printtext[bibhyperref]{\printfield{author}}}
+
+\renewbibmacro*{textcite}{%
+ \ifnameundef{labelname}%
+ {\iffieldundef{shorthand}%
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \nonameyeardelim\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:shorthand}}}%
+ {\printnames{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \usebibmacro{citeyear}}}
+
+\newbibmacro*{textcitefull}{%
+ \ifnameundef{labelname}%
+ {\iffieldundef{shorthand}%
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \nonameyeardelim\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \usebibmacro{cite:labelyear+extrayear}}%
+ {\usebibmacro{cite:shorthand}}}%
+ {\printnames[fullcite]{labelname}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \usebibmacro{citeyear}}}
+
+\renewbibmacro*{cite}{%
+ \iffieldequals{fullhash}{\cbx@lasthash}%
+ {\usebibmacro{cite:plabelyear+extrayear}}%
+ {\iffieldundef{shorthand}{%
+ \ifnameundef{shortauthor}{%
+ \ifnameundef{holder}{%
+ \ifnameundef{labelname}{%
+ \iflistundef{organization}{%
+ \usebibmacro{cite:noname}%
+ }{%
+ \printlist[uppercase]{organization}%
+ }
+ }{%
+ \printtext[bibhyperref]{\printnames[LAST]{labelname}}%
+ }
+ }{%
+ \printnames[LAST]{holder}%
+ }
+ }{%
+ \printnames[LAST]{shortauthor}%
+ }
+ }{%
+ \usebibmacro{cite:shorthand}
+ }
+ \setunit{\nameyeardelim}%
+ \usebibmacro{cite:plabelyear+extrayear}%
+ \savefield{fullhash}{\cbx@lasthash}}%
+ \setunit{\multicitedelim}}
+
+\def\citeresetabnt{\global\let\cbx@abnt@names\@empty}
+\citeresetabnt
+\def\cbx@abnt@ifnamesaved{%
+ \xifinlist{\thefield{fullhash}}{\cbx@abnt@names}
+ {\@firstoftwo}
+ {\@secondoftwo}}
+
+\renewbibmacro*{cite:label}{%
+ \iffieldundef{label}
+ {\printtext[bibhyperref]{\printfield[uppercasecite]{labeltitle}}}%
+ {\printtext[bibhyperref]{\printfield{label}}}}
+
+\newbibmacro*{cite:plabelyear+extrayear}{%
+ \iffieldundef{labelyear}%
+ {}%
+ {\printtext[bibhyperref]{%
+ \printfield[noformat]{origyear}\setunit*{\addslash}%
+ \printfield{labelyear}\printfield{extrayear}}}%
+ \iffieldundef{issue}%
+ {}%
+ {\addcomma\addspace\printfield{issue}}}
+
+\renewbibmacro*{cite:shorthand}{%
+ \printtext[bibhyperref]{\emph{\printfield{shorthand}}}}
+
+\newbibmacro*{citeyearpunct}{%
+ \iffieldundef{labelyear}%
+ {\usebibmacro{cite:init}}%
+ {\iffieldequals{fullhash}{\cbx@lasthash}%
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:plabelyear+extrayear}}%
+ {\usebibmacro{cite:plabelyear+extrayear}%
+ \savefield{fullhash}{\cbx@lasthash}}}%
+ \setunit{\multicitedelim}}
+
+
+% Get the whole thing inside bibhyperref (including punctuation)
+
+\DeclareFieldFormat{citehyperref}{%
+ \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
+ \bibhyperref{#1}}
+
+\DeclareFieldFormat{textcitehyperref}{%
+ \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
+ \bibhyperref{%
+ #1%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+
+\savebibmacro{cite}
+\savebibmacro{textcite}
+\savebibmacro{textcitefull}
+
+\renewbibmacro*{cite}{%
+ \printtext[citehyperref]{%
+ \restorebibmacro{cite}%
+ \usebibmacro{cite}}}
+
+\renewbibmacro*{textcite}{%
+ \ifboolexpr{
+ ( not test {\iffieldundef{prenote}} and
+ test {\ifnumequal{\value{citecount}}{1}} )
+ or
+ ( not test {\iffieldundef{postnote}} and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
+ }
+ {\DeclareFieldAlias{textcitehyperref}{noformat}}
+ {}%
+ \printtext[textcitehyperref]{%
+ \restorebibmacro{textcite}%
+ \usebibmacro{textcite}}}
+
+\renewbibmacro*{textcitefull}{%
+ \ifboolexpr{
+ ( not test {\iffieldundef{prenote}} and
+ test {\ifnumequal{\value{citecount}}{1}} )
+ or
+ ( not test {\iffieldundef{postnote}} and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
+ }
+ {\DeclareFieldAlias{textcitehyperref}{noformat}}
+ {}%
+ \printtext[textcitehyperref]{%
+ \restorebibmacro{textcitefull}%
+ \usebibmacro{textcitefull}}}
+
+
+\newcommand\FirstWord[1]{\@firstword#1 \@nil}%
+\def\@firstword#1 #2\@nil{\@removecomma#1,\@nil}%
+\def\@removecomma#1,#2\@nil{\@removeperiod#1.\@nil}
+\def\@removeperiod#1.#2\@nil{\@removesemicolon#1;\@nil}
+\def\@removesemicolon#1;#2\@nil{#1}
+
+\endinput