summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-abnt
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-11-12 22:33:34 +0000
committerKarl Berry <karl@freefriends.org>2017-11-12 22:33:34 +0000
commit8b0f1a5b31ade27d7398b917d6d6434e5af9cc95 (patch)
treeb4e5cb479d7e208c654d993bf335c92348972c31 /Master/texmf-dist/tex/latex/biblatex-abnt
parenteabfbd28a620feb1e4b7080f0701f2831b9a55ad (diff)
biblatex-abnt
git-svn-id: svn://tug.org/texlive/trunk@45765 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-abnt')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx6
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx180
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx6
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx22
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx336
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx858
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/brazil-abnt.lbx21
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/brazilian-abnt.lbx (renamed from Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx)134
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/english-abnt.lbx (renamed from Master/texmf-dist/tex/latex/biblatex-abnt/abnt-english.lbx)6
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/portuges-abnt.lbx21
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/portuguese-abnt.lbx21
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-abnt/spanish-abnt.lbx (renamed from Master/texmf-dist/tex/latex/biblatex-abnt/abnt-spanish.lbx)6
12 files changed, 992 insertions, 625 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx
index 820d296218f..7ef794856ad 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,10 +10,10 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt-ibid.bbx}
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
\RequireBibliographyStyle{abnt}
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx
index 094adc0bb4e..cff248116d2 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,67 +10,144 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt-ibid.cbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
-\newtoggle{sccite}%
+% Init >>>1
+
+\RequirePackage{xparse}%
+\RequirePackage{xpatch}%
+\RequirePackage{expl3}%
+\RequirePackage{l3regex}%
+
+% <<<1
% Format >>>1
-\DeclareFieldFormat{citetitle}{%% >>>2
+\newcommand*{\UpperOrSCCite}[1]{% >>>2
\iftoggle{sccite}{%
- \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}%
+ \textsc{\MakeLowercase{#1}}%
}{%
- \normalfont\MakeUppercase{\FirstWord{#1}}%
+ \MakeUppercase{#1}%
}%
-}%% <<<2
+}% <<<2
+
+\newcommand*{\NormalOrSCCite}[1]{% >>>2
+ \iftoggle{sccite}{%
+ \textsc{\MakeLowercase{#1}}%
+ }{%
+ #1%
+ }%
+}% <<<2
-\DeclareNameFormat{LAST}{%% >>>2
+% \IfInitial >>>2
+
+\ExplSyntaxOn
+
+\NewDocumentCommand{\IfInitial}{mmm}{%
+ \regex_match:nVTF {\w\.} \namepartgiven {#2} {#3}%
+}
+\cs_generate_variant:Nn \regex_match:nnTF { nV }
+
+\ExplSyntaxOff
+
+% <<<2
+
+\renewbibmacro*{name:family}[4]{% >>>2
+ \ifuseprefix
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifdefvoid{#3}{}{%
+ \ifcapital{%
+ \iftoggle{sccite}{%
+ \mkbibnameprefix{#3}\isdot%
+ }{%
+ \mkbibnameprefix{\MakeCapital{#3}}\isdot%
+ }
+ }{%
+ \mkbibnameprefix{#3}\isdot%
+ }%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \mkbibnamefamily{#1}\isdot
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}% <<<2
+
+\DeclareNameFormat{labelname}{% >>>2
+ % Use family-given instead of given-family
\ifcase\value{uniquename}%
\usebibmacro{name:family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
{\namepartsuffix}%
\or%
\ifuseprefix%
- {\usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffixi}}%
- {\usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiveni}%
{\namepartprefixi}%
{\namepartsuffixi}}%
\or%
- \usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ \usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
{\namepartsuffix}%
\fi%
- \usebibmacro{name:andothers}%
+ \usebibmacro{name:andothers}}% <<<2
+
+\let\origmkbibnamefamily\mkbibnamefamily%
+\let\origmkbibnamegiven\mkbibnamegiven%
+\let\origmkbibnameprefix\mkbibnameprefix%
+\let\origmkbibnamesuffix\mkbibnamesuffix%
+
+\renewcommand*{\mkbibnamefamily}[1]{% >>>2
+ \UpperOrSCCite{#1}%
+}% <<<2
+\renewcommand*{\mkbibnamegiven}[1]{% >>>2
+ \ifnumequal{\value{uniquename}}{2}{%
+ \IfInitial{#1}{\NormalOrSCCite{#1}}{#1}%
+ }{%
+ \NormalOrSCCite{#1}%
+ }%
+}% <<<2
+\renewcommand*{\mkbibnameprefix}[1]{% >>>2
+ \ifuseprefix{%
+ \UpperOrSC{#1}%
+ }{%
+ \ifnumequal{\value{uniquename}}{2}{#1}{\NormalOrSCCite{#1}}%
+ }
+}% <<<2
+\renewcommand*{\mkbibnamesuffix}[1]{% >>>2
+ \UpperOrSCCite{#1}%
}% <<<2
-% \DeclareDelimFormat{nameyeardelim}{\addcomma\addspace}%
+\DeclareFieldFormat{firstword}{%% >>>2
+ \iftoggle{sccite}{%
+ \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}%
+ }{%
+ \normalfont\MakeUppercase{\FirstWord{#1}}%
+ }%
+}%% <<<2
+
\renewcommand*{\nameyeardelim}{\addcomma\addspace}%
% <<<1
% Options >>>1
+\newtoggle{sccite}%
+
\DeclareBibliographyOption{sccite}[true]{
\settoggle{sccite}{#1}%
}
@@ -285,7 +362,7 @@
\newbibmacro*{footcite:short}{%
\ifnameundef{labelname}{%
\printtext[bibhyperref]{%
- \printfield[citetitle]{labeltitle}%
+ \printfield[firstword]{labeltitle}%
}%
}{%
\printnames[LAST]{labelname}%
@@ -295,7 +372,7 @@
}{%
\printtext[bibhyperlink]{%
\printfield{labelyear}%
- \printfield{extrayear}%
+ \printfield{extradate}%
}%
}%
}% <<<2
@@ -303,7 +380,7 @@
\newbibmacro*{footcite:loccit}{% >>>2
\ifnameundef{labelname}{%
\printtext[bibhyperref]{%
- \printfield[citetitle]{labeltitle}%
+ \printfield[firstword]{labeltitle}%
}%
}{%
\printnames[LAST]{labelname}%
@@ -316,7 +393,7 @@
\newbibmacro*{footcite:opcit}{% >>>2
\ifnameundef{labelname}{%
\printtext[bibhyperref]{%
- \printfield[citetitle]{labeltitle}%
+ \printfield[firstword]{labeltitle}%
}%
}{%
\printnames[LAST]{labelname}%
@@ -332,7 +409,7 @@
}{%
\printtext[bibhyperlink]{%
\printfield{labelyear}%
- \printfield{extrayear}%
+ \printfield{extradate}%
}%
}%
}% <<<2
@@ -423,24 +500,16 @@
\space}%
}% <<<2
-\newcommand{\addand}{%% >>>2
- \renewcommand*{\multicitedelim}{%
- \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
- {\space\bibstring{and}}%
- {\addsemicolon}%
- \space}%
- \renewcommand*{\textcitedelim}{%
- \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
- {\addspace\bibstring{and}}%
- {\addsemicolon}%
- \space}%
-}% <<<2
-
-\DeclareCiteCommand{\@apud}[\mkbibfootnote]% >>>2
- {\iffieldundef{prenote}%
- {}%
- {\printfield[uppercasecite]{prenote}%
- \addspace\bibstring{apud}\addspace}}%
+\DeclareCiteCommand{\@apud}% >>>2
+ {\iffieldundef{prenote}{}{%
+ \ifnumgreater{\value{multicitetotal}}{1}{%
+ \usebibmacro{prenote}%
+ }{%
+ \printfield[uppercasecite]{prenote}%
+ \isdot\addspace\bibstring{apud}\addspace%
+ }%
+ }%
+ }%
{\usebibmacro{citeindex}%
\usebibmacro{footcite:short}}%
{\setunit{\multicitedelim}}%
@@ -455,9 +524,9 @@
% textcite >>>1
-\renewbibmacro*{textcite}{% >>>2
+\newbibmacro*{textcite}{% >>>2
\ifnameundef{labelname}%
- {\printfield[citetitle]{labeltitle}}%
+ {\printfield[firstword]{labeltitle}}%
{\printnames{labelname}}}% <<<2
\newbibmacro*{textcite:init}{% >>>2
@@ -542,6 +611,15 @@
\renewbibmacro{multiprenote}{}%
\renewbibmacro{multipostnote}{}}}{}{}% <<<2
+\xpretobibmacro{textcite}{% >>>3
+ \let\multinamedelim\multinamedelimorig%
+ \let\finalnamedelim\finalnamedelimorig%
+ \let\mkbibnamefamily\origmkbibnamefamily%
+ \let\mkbibnamegiven\origmkbibnamegiven%
+ \let\mkbibnameprefix\origmkbibnameprefix%
+ \let\mkbibnamesuffix\origmkbibnamesuffix%
+}{}{}% <<<3
+
% <<<1
\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
index 0b9d4de7a30..e9abff8e976 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,10 +10,10 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt-numeric.bbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
\RequireBibliographyStyle{abnt}
\ExecuteBibliographyOptions{labelnumber}
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx
index da68c224e94..4cf86a0cc19 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,13 +10,29 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt-numeric.cbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
\RequireCitationStyle{numeric}
+\renewbibmacro*{name:family}[4]{% >>>1
+ \ifuseprefix
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifdefvoid{#3}{}{%
+ \ifcapital
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
+ {\mkbibnameprefix{#3}\isdot}%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \mkbibnamefamily{#1}\isdot
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}% <<<1
+
% Cite commands >>>1
\DeclareCiteCommand{\cite}[\mkbibparens]% >>>2
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx
index 110c6d09357..5e91e59ef02 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,29 +10,31 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt.bbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
% Init >>>1
\RequireBiber[3]%
-\DeclareLanguageMapping{brazil}{abnt-brazilian}%
-\DeclareLanguageMapping{brazilian}{abnt-brazilian}%
-\DeclareLanguageMapping{portuguese}{abnt-brazilian}%
-\DeclareLanguageMapping{portuges}{abnt-brazilian}%
-\DeclareLanguageMapping{spanish}{abnt-spanish}%
-\DeclareLanguageMapping{english}{abnt-english}%
+
+\RequirePackage{xparse}%
+\RequirePackage{xpatch}%
+\RequirePackage{expl3}%
+
+\DeclareLanguageMappingSuffix{-abnt}
\RequireBibliographyStyle{standard}%
\ExecuteBibliographyOptions{%
- block=none,
- urldate=long,
- pagetracker,
- uniquename=false,
+ language=brazil,%
+ block=none,%
+ urldate=long,%
+ pagetracker,%
+ uniquename=false,%
+ sorting=nty,%
}%
\InitializeBibliographyStyle{\global\undef\bbx@lasthash}%
@@ -40,6 +42,10 @@
\let\origbibsetup\bibsetup%
\appto{\bibsetup}{\raggedright}%
+\setcounter{biburlnumpenalty}{3000}%
+\setcounter{biburllcpenalty}{6000}%
+\setcounter{biburlucpenalty}{9000}%
+
% <<<1
@@ -170,30 +176,46 @@
}{}}%
% <<<2
-% Show extrayear in bibliography >>>2
-\newtoggle{extrayear}%
+% Show extradate in bibliography >>>2
+\newtoggle{extradate}%
+\DeclareBibliographyOption{extradate}[true]{%
+ \settoggle{extradate}{#1}}%
+\DeclareEntryOption[boolean]{extradate}[true]{%
+ \settoggle{extradate}{#1}}%
\DeclareBibliographyOption{extrayear}[true]{%
- \settoggle{extrayear}{#1}}%
+ \settoggle{extradate}{#1}}%
\DeclareEntryOption[boolean]{extrayear}[true]{%
- \settoggle{extrayear}{#1}}%
+ \settoggle{extradate}{#1}}%
% <<<2
% Justify text >>>2
\DeclareBibliographyOption{justify}[true]{%
- \ExecuteBibliographyOptions{block=space}%
+ % \ExecuteBibliographyOptions{block=space}%
\renewcommand*{\bibsetup}{\origbibsetup}%
}%
% <<<2
% Make it pretty >>>2
\DeclareBibliographyOption{pretty}[true]{%
- \ExecuteBibliographyOptions{%
- ittitles,
- sccite,
- scbib,
- indent,
- justify,
- }%
+ \ifstrequal{#1}{true}{%
+ \ExecuteBibliographyOptions{%
+ ittitles,%
+ sccite,%
+ scbib,%
+ indent,%
+ justify,%
+ }%
+ }{}%
+}%
+% <<<2
+
+% Show count in backref >>>2
+\newtoggle{citecount}%
+\DeclareBibliographyOption{citecount}[true]{%
+ \settoggle{citecount}{#1}%
+ \ifstrequal{#1}{true}{%
+ \ExecuteBibliographyOptions{backref, citecounter}%
+ }{}%
}%
% <<<2
@@ -202,7 +224,7 @@
% Data model and sorting >>>1
-\DeclareSortingScheme{nty}{%% >>>2
+\DeclareSortingTemplate{nty}{%% >>>2
\sort{%
\field{presort}%
}%
@@ -314,23 +336,19 @@
% Capitalization commands >>>2
-\renewcommand*{\mkbibacro}[1]{%
- \iftoggle{scbib}{%
- \textsc{\MakeLowercase{#1}}%
- }{\MakeUppercase{#1}}%
-}%
-
-\newcommand\FirstWordUpper[1]{\@firstwordupper#1 \@nil}%
+\newcommand\FirstWordUpper[1]{\@firstwordupper#1 \@nil}% >>>3
\newcommand\@firstwordupper{}%
-\def\@firstwordupper#1 #2\@nil{\MakeUppercase{#1} #2\unskip}%
+\def\@firstwordupper#1 #2\@nil{\MakeUppercase{#1} #2\unskip}% <<<3
-\newcommand\FirstWordSC[1]{\@firstwordsc#1 \@nil}%
+\newcommand\FirstWordSC[1]{\@firstwordsc#1 \@nil}% >>>3
\newcommand\@firstwordsc{}%
-\def\@firstwordsc#1 #2\@nil{\textsc{#1} #2\unskip}%
+\def\@firstwordsc#1 #2\@nil{\textsc{#1} #2\unskip}% <<<3
-\newcommand\FirstWordLCSC[1]{\@firstwordlcsc#1 \@nil}%
+\newcommand\FirstWordLCSC[1]{\@firstwordlcsc#1 \@nil}% >>>3
\newcommand\@firstwordlcsc{}%
-\def\@firstwordlcsc#1 #2\@nil{\textsc{\MakeLowercase{#1}} #2\unskip}%
+\def\@firstwordlcsc#1 #2\@nil{\textsc{\MakeLowercase{#1}} #2\unskip}% <<<3
+
+% Helper macros >>>3
\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}%
@@ -354,78 +372,103 @@
}%
\def\traceparamE\end{}%
-\def\smartuppercase#1{%
+% <<<3
+
+\def\smartuppercase#1{% >>>3
\bgroup %
\traceparam{#1}%
\MakeUppercase{\paramL}%
\egroup%
-}%
+}% <<<3
-\def\smartlowercase#1{%
+\def\smartlowercase#1{% >>>3
\bgroup %
\traceparam{#1}%
\MakeLowercase{\paramL}%
\egroup%
-}%
+}% <<<3
-\def\smartlcsc#1{%
+\def\smartlcsc#1{% >>>3
\bgroup %
\traceparam{#1}%
\textsc{\MakeLowercase{\paramL}}%
\egroup%
-}%
+}% <<<3
-\def\smartsc#1{%
+\def\smartsc#1{% >>>3
\bgroup %
\traceparam{#1}%
\textsc{\paramL}%
\egroup%
-}%
-
-% <<<2
+}% <<<3
-% Name format >>>2
-
-% Name delimiters >>>3
-\newtoggle{byeditor+others}%
+\renewcommand*{\mkbibacro}[1]{% >>>3
+ \iftoggle{scbib}{%
+ \textsc{\MakeLowercase{#1}}%
+ }{\MakeUppercase{#1}}%
+}% <<<3
-\renewcommand*{\multinamedelim}{%
- \iftoggle{byeditor+others}{%
- \addcomma\addspace%
+\newcommand*{\UpperOrSC}[1]{% >>>3
+ \let\MakeCapital\relax%
+ \iftoggle{scbib}{%
+ \textsc{\MakeLowercase{#1}}%
}{%
- \addsemicolon\addspace%
+ \MakeUppercase{#1}%
}%
-}%
+}% <<<3
-\renewcommand*{\finalnamedelim}{%
- \iftoggle{byeditor+others}{%
- \addspace\bibstring{and}\addspace%
+\newcommand*{\NormalOrSC}[1]{% >>>3
+ \iftoggle{scbib}{%
+ \textsc{\MakeLowercase{#1}}%
}{%
- \addsemicolon\addspace%
+ #1%
}%
+}% <<<3
+
+% <<<2
+
+% \IfGivenIsInitial >>>2
+
+\ExplSyntaxOn%
+
+\ProvideDocumentCommand{\IfGivenIsInitial}{mm}{%
+ \regex_match:nVTF {\w\.} \namepartgiven {#1} {#2}%
}%
-% <<<
+\cs_generate_variant:Nn \regex_match:nnTF { nV }%
+
+\ExplSyntaxOff%
+
+% <<<2
+
+% Name format >>>2
\DeclareNameFormat{LAST-first}{%% >>>3
+ \renewcommand*{\mkbibnamefamily}[1]{\UpperOrSC{##1}}%
+ \renewcommand*{\mkbibnamegiven}[1]{\ifgiveninits{\NormalOrSC{##1}}{##1}}%
+ \renewcommand*{\mkbibnamegiven}[1]{%
+ \ifgiveninits{%
+ \NormalOrSC{##1}%
+ }{%
+ \IfGivenIsInitial{\NormalOrSC{##1}}{##1}%
+ }%
+ }%
+ \renewcommand*{\mkbibnameprefix}[1]{%
+ \ifuseprefix{%
+ \UpperOrSC{##1}%
+ }{%
+ \ifgiveninits{\NormalOrSC{##1}}{##1}%
+ }%
+ }%
+ \renewcommand*{\mkbibnamesuffix}[1]{\UpperOrSC{##1}}%
\ifgiveninits{%
- \usebibmacro{name:family-given}{%
- \iftoggle{scbib}{%
- \textsc{\namepartfamily}%
- }{%
- \MakeUppercase{\namepartfamily}%
- }%
- }%
+ \usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffix}%
}{%
- \usebibmacro{name:family-given}{%
- \iftoggle{scbib}{%
- \textsc{\MakeLowercase{\namepartfamily}}%
- }{%
- \MakeUppercase{\namepartfamily}%
- }%
- }%
+ \usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
{\namepartsuffix}%
@@ -433,6 +476,8 @@
\usebibmacro{name:andothers}%
}% <<<
+\DeclareNameAlias{default}{LAST-first}%
+
\DeclareNameFormat{full}{%% >>>3
\usebibmacro{name:given-family}%
{\namepartfamily}%
@@ -441,8 +486,6 @@
{\namepartsuffix}%
}% <<<
-\DeclareNameAlias{default}{LAST-first}%
-
\DeclareNameAlias{byauthor}{full}%
\DeclareNameAlias{bybookauthor}{byauthor}%
\DeclareNameAlias{byeditor}{full}%
@@ -461,6 +504,29 @@
\DeclareBibliographyAlias{jurisdiction}{article}%
\DeclareBibliographyAlias{legal}{article}%
+% Name delimiters >>>3
+\newtoggle{byeditor+others}%
+
+\let\multinamedelimorig\multinamedelim%
+\let\finalnamedelimorig\finalnamedelim%
+
+\renewcommand*{\multinamedelim}{%
+ \iftoggle{byeditor+others}{%
+ \addcomma\addspace%
+ }{%
+ \addsemicolon\addspace%
+ }%
+}%
+
+\renewcommand*{\finalnamedelim}{%
+ \iftoggle{byeditor+others}{%
+ \addspace\bibstring{and}\addspace%
+ }{%
+ \addsemicolon\addspace%
+ }%
+}%
+% <<<
+
% <<<2
% Field format >>>2
@@ -590,7 +656,7 @@
\bibstring{monography}\addspace\printtext[parens]{#1}%
}%% <<<
-\DeclareFieldFormat{origlanguage}{%% >>>4
+\DeclareListFormat{origlanguage}{%% >>>4
\ifbibstring{#1}%
{\bibxstring{#1}}%
{\ifbibstring{from#1}%
@@ -1123,11 +1189,11 @@
% Publisher, location, date, issue >>>2
\renewbibmacro*{date}{%
- \iftoggle{extrayear}{%
+ \iftoggle{extradate}{%
\printdateextra%
}{%
\printdate%
- }
+ }%
\printunit{\addperiod\addspace}%
}%
@@ -1248,7 +1314,7 @@
% <<<2
-% Misc >>>
+% Misc >>>2
\renewbibmacro*{volume+number+eid}{%% >>>3
\printfield{volume}%
@@ -1268,17 +1334,6 @@
}%
}%% <<<3
-\renewbibmacro*{pageref}{%% >>>3
- \iflistundef{pageref}%
- {}%
- {\printunit{\addperiod\addspace}
- \printtext{% \printtext[parens]{%
- \ifnumgreater{\value{pageref}}{1}%
- {\bibstring{backrefpages}\ppspace}%
- {\bibstring{backrefpage}\ppspace}%
- \printlist[pageref][-\value{listtotal}]{pageref}}}%
-}%% <<<3
-
\renewbibmacro*{url+urldate}{%% >>>3
\usebibmacro{url}%
\iffieldundef{urlyear}%
@@ -1307,11 +1362,11 @@
\ifboolexpr{%
test {\iflistundef{language}}%
or%
- test {\iffieldundef{origlanguage}}%
+ test {\iflistundef{origlanguage}}%
}%
{}%
{%
- \printtext{\printlist{language}\addspace\printfield{origlanguage}}%
+ \printtext{\printlist{language}\addspace\printlist{origlanguage}}%
}%
}%% <<<3
@@ -1329,15 +1384,45 @@
{}}%
\renewbibmacro*{related:init}{}%
\DeclareNameAlias{sortname}{default}%
- \ifbibmacroundef{date+extrayear}%
+ \ifbibmacroundef{date+extradate}%
{}%
- {\renewbibmacro*{date+extrayear}{}%
+ {\renewbibmacro*{date+extradate}{}%
\renewbibmacro*{date}{\printdate}}%
\renewbibmacro*{pageref}{}}%
{\thefield{entrytype}}}%
}%% <<<3
-% <<<
+\renewbibmacro*{pageref}{% >>>3
+ \iftoggle{citecount}{%
+ \printunit{\addperiod\addspace}%
+ \iflistundef{pageref}{%
+ \bibstring{citecountnopage}%
+ }{%
+ \printtext{%
+ \ifnumgreater{\value{pageref}}{1}{%
+ \bibstring{citecountpages}\ppspace%
+ }{%
+ \bibstring{citecountpage}\ppspace%
+ }%
+ \printlist[pageref][-\value{listtotal}]{pageref}%
+ }%
+ }%
+ }{%
+ \iflistundef{pageref}{}{%
+ \printunit{\addperiod\addspace}%
+ \printtext{%
+ \ifnumgreater{\value{pageref}}{1}{%
+ \bibstring{backrefpages}\ppspace%
+ }{%
+ \bibstring{backrefpage}\ppspace%
+ }%
+ \printlist[pageref][-\value{listtotal}]{pageref}%
+ }%
+ }%
+ }%
+}% <<<3
+
+% <<<2
% <<<1
@@ -1395,9 +1480,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1464,9 +1550,11 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1520,9 +1608,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1587,9 +1676,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1648,9 +1738,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1717,9 +1808,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1772,9 +1864,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1839,9 +1932,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1900,9 +1994,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -1951,9 +2046,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2028,9 +2124,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2078,9 +2175,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2145,9 +2243,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2207,9 +2306,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2291,9 +2391,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2355,9 +2456,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2406,9 +2508,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
@@ -2476,9 +2579,10 @@
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{addendum+pubstate}%
- \printunit{\bibpagerefpunct}%
+ \setunit*{\bibpagerefpunct}%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usebibmacro{pageref}%
+ \setunit*{\addperiod\addspace}%
\newunit%
\newblock%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iftoggle{bbx:related}%
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx
index 0b11b4ca496..91535ec688a 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,88 +10,148 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt.cbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
-
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
% Init >>>1
\RequireBiber[3]%
-\RequireCitationStyle{authoryear}%
-\RequireCitationStyle{abnt-ibid}%
+\RequireCitationStyle{authoryear-comp}%
\RequirePackage{xparse}%
+\RequirePackage{xpatch}%
+\RequirePackage{expl3}%
+
+\ExecuteBibliographyOptions{% >>>2
+ pagetracker,%
+ block=none,%
+ urldate=long,%
+ uniquename=full,%
+ sortcites=false,%
+}% <<<2
-\renewcommand*{\iffinalcitedelim}{\iflastcitekey}
-
-\DeclareLabeldate{%
- \field{date}
- \field{year}
- \field{eventdate}
- \field{eventyear}
- \field{origdate}
- \field{urldate}
- \literal{nodate}
-}
-
-\ExecuteBibliographyOptions{%
- block=none,
- urldate=long,
- pagetracker,
- uniquename=false,
- sorting=nty,
-}%
+\DeclareLabelname{% >>>2
+ \field{shortauthor}%
+ \field{author}%
+ \field{holder}%
+ \field{shorteditor}%
+ \field{editor}%
+ \field{translator}%
+}% <<<2
+\newtoggle{sccite}% >>>2
+\DeclareBibliographyOption{sccite}[true]{%
+ \settoggle{sccite}{#1}%
+}% <<<2
% <<<1
-
% Format >>>1
% Name format >>>2
-\DeclareNameFormat{LAST}{%% >>>3
+\newcommand*{\UpperOrSCCite}[1]{% >>>3
+ \iftoggle{sccite}{%
+ \textsc{\MakeLowercase{#1}}%
+ }{%
+ \MakeUppercase{#1}%
+ }%
+}% <<<3
+
+\newcommand*{\NormalOrSCCite}[1]{% >>>3
+ \let\MakeCapital\relax%
+ \iftoggle{sccite}{%
+ \textsc{\MakeLowercase{#1}}%
+ }{%
+ #1%
+ }%
+}% <<<3
+
+% \mkbibname* >>>3
+
+% \IfGivenIsInit >>>4
+
+\ExplSyntaxOn%
+
+\NewDocumentCommand{\IfGivenIsInit}{mm}{%
+ \regex_match:nVTF {\w\.} \namepartgiven {#1} {#2}%
+}%
+\cs_generate_variant:Nn \regex_match:nnTF { nV }%
+
+\ExplSyntaxOff%
+
+% <<<4
+
+\let\origmkbibnamefamily\mkbibnamefamily%
+\let\origmkbibnamegiven\mkbibnamegiven%
+\let\origmkbibnameprefix\mkbibnameprefix%
+\let\origmkbibnamesuffix\mkbibnamesuffix%
+
+\renewcommand*{\mkbibnamefamily}[1]{% >>>4
+ \UpperOrSCCite{#1}%
+}% <<<4
+\renewcommand*{\mkbibnamegiven}[1]{% >>>4
+ \ifnumequal{\value{uniquename}}{2}{%
+ \IfGivenIsInit{\NormalOrSCCite{#1}}{#1}%
+ }{%
+ \NormalOrSCCite{#1}%
+ }%
+}% <<<4
+\renewcommand*{\mkbibnameprefix}[1]{% >>>4
+ \ifuseprefix{%
+ \UpperOrSCCite{#1}%
+ }{%
+ \ifnumequal{\value{uniquename}}{2}{#1}{\NormalOrSCCite{#1}}%
+ }%
+}% <<<4
+\renewcommand*{\mkbibnamesuffix}[1]{% >>>4
+ \UpperOrSCCite{#1}%
+}% <<<4
+
+\AtBeginBibliography{%
+ \let\mkbibnamefamily\origmkbibnamefamily%
+ \let\mkbibnamegiven\origmkbibnamegiven%
+ \let\mkbibnameprefix\origmkbibnameprefix%
+ \let\mkbibnamesuffix\origmkbibnamesuffix%
+}%
+
+% <<<3
+
+\DeclareNameFormat{labelname}{% >>>3
+ % Use family-given instead of given-family
\ifcase\value{uniquename}%
\usebibmacro{name:family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
{\namepartsuffix}%
\or%
\ifuseprefix%
- {\usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffixi}}%
- {\usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ {\usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiveni}%
{\namepartprefixi}%
{\namepartsuffixi}}%
\or%
- \usebibmacro{name:given-family}%
- {\iftoggle{sccite}%
- {\textsc{\MakeLowercase{\namepartfamily}}}%
- {\MakeUppercase{\namepartfamily}}}%
+ \usebibmacro{name:family-given}%
+ {\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
{\namepartsuffix}%
\fi%
- \usebibmacro{name:andothers}%
-}% <<<3
+ \usebibmacro{name:andothers}}% <<<3
-\DeclareNameFormat{fullcite}{%% >>>3
+\DeclareNameFormat{textlabelname}{% >>>3
+ % Use given-family instead of family-given
\ifcase\value{uniquename}%
- \usebibmacro{name:given-family}%
+ \usebibmacro{name:family}%
{\namepartfamily}%
{\namepartgiven}%
{\namepartprefix}%
@@ -100,14 +160,14 @@
\ifuseprefix%
{\usebibmacro{name:given-family}%
{\namepartfamily}%
- {\namepartgiveni}%
+ {\namepartgiven}%
{\namepartprefix}%
- {\namepartsuffixi}}%
+ {\namepartsuffix}}%
{\usebibmacro{name:given-family}%
{\namepartfamily}%
- {\namepartgiveni}%
- {\namepartprefixi}%
- {\namepartsuffixi}}%
+ {\namepartgiven}%
+ {\namepartprefix}%
+ {\namepartsuffix}}%
\or%
\usebibmacro{name:given-family}%
{\namepartfamily}%
@@ -115,8 +175,24 @@
{\namepartprefix}%
{\namepartsuffix}%
\fi%
- \usebibmacro{name:andothers}%
-}% <<<3
+ \usebibmacro{name:andothers}}% <<<3
+
+\renewbibmacro*{name:family}[4]{% >>>3
+ % Add the suffix too
+ \ifuseprefix%
+ {\usebibmacro{name:delim}{#3#1}%
+ \usebibmacro{name:hook}{#3#1}%
+ \ifdefvoid{#3}{}{%
+ \ifcapital%
+ {\mkbibnameprefix{\MakeCapital{#3}}\isdot}%
+ {\mkbibnameprefix{#3}\isdot}%
+ \ifprefchar{}{\bibnamedelimc}}%
+ \mkbibnamefamily{#1}\isdot%
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}%
+ {\usebibmacro{name:delim}{#1}%
+ \usebibmacro{name:hook}{#1}%
+ \mkbibnamefamily{#1}\isdot%
+ \ifdefvoid{#4}{}{\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}}% <<<3
% <<<2
@@ -132,15 +208,7 @@
\def\@removesemicolon#1;#2\@nil{#1}%
% <<<3
-\DeclareFieldFormat{citetitle}{%% >>>3
- \iftoggle{sccite}{%
- \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}\ldots\isdot%
- }{%
- \normalfont\MakeUppercase{\FirstWord{#1}}\ldots\isdot%
- }%
-}%% <<<3
-
-\DeclareFieldFormat{noname}{%% >>>3
+\DeclareFieldFormat{firstword}{%% >>>3
\iftoggle{sccite}{%
\normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}\ldots\isdot%
}{%
@@ -158,153 +226,297 @@
% <<<2
+% Delimiter format >>>2
+
+\renewcommand*{\nameyeardelim}{\addcomma\addspace}%
+\renewcommand*{\nonameyeardelim}{\addcomma\addspace}%
+\renewcommand*{\multicitedelim}{\addsemicolon\addspace}%
+
+% <<<2
+
% <<<1
+% Macros and commands >>>1
-% Cite commands >>>1
+% \cite >>>2
-\DeclareCiteCommand{\cite}[\mkbibparens]% >>>2
+\renewbibmacro*{cite}{% >>>3
+ \iffieldundef{shorthand}%
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}%
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}%
+ {\iffieldequals{namehash}{\cbx@lasthash}%
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND%
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}%
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}%
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}%
+ {% Use `bibhyperref` for the `labelname`
+ \printtext[bibhyperref]{\printnames{labelname}}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}%
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}% <<<3
+
+\DeclareCiteCommand{\cite}[\mkbibparens]% >>>3
{\usebibmacro{cite:init}%
- \usebibmacro{prenote}}%
+ \usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
\usebibmacro{cite}}%
{}%
- {\usebibmacro{postnote}}%
+ {\usebibmacro{postnote}}% <<<3
-\DeclareCiteCommand*{\cite}%
+\DeclareCiteCommand*{\cite}[\mkbibparens]% >>>3
{\usebibmacro{cite:init}%
- \usebibmacro{prenote}}%
+ \usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
+ \usebibmacro{citeyear}}%
{}%
- {\usebibmacro{postnote}}%
+ {\usebibmacro{postnote}}% <<<3
\DeclareMultiCiteCommand{\cites}[\mkbibparens]%
- {\cite}%
- {\setunit{\multicitedelim}}% <<<2
+ {\cite}{\setunit{\multicitedelim}}%
-\DeclareCiteCommand{\textcite}% >>>2
- {\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}}%
+% <<<2
-\DeclareCiteCommand*{\textcite}%
- {\usebibmacro{cite:init}%
- \boolfalse{cbx:parens}%
- \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}%
- \renewcommand*{\multinamedelim}{\addcomma\addspace}}%
+% \textcite >>>2
+
+\renewbibmacro*{textcite}{% >>>3
+ \iffieldequals{namehash}{\cbx@lasthash}%
+ {\iffieldundef{shorthand}%
+ {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND%
+ \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}%
+ {\setunit{\addcomma}%
+ \usebibmacro{cite:extradate}}%
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{labelyear}{\cbx@lastyear}}}%
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}%
+ {\ifnameundef{labelname}%
+ {\iffieldundef{shorthand}%
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nonameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \usebibmacro{cite:labeldate+extradate}}%
+ {\usebibmacro{cite:shorthand}}}%
+ {% Use `bibhyperref` so that the names are also hyperlinked
+ \printtext[bibhyperref]{\printnames[textlabelname]{labelname}}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \printdelim{nameyeardelim}\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}%
+ {\usebibmacro{prenote}}%
+ {}%
+ \iffieldundef{shorthand}%
+ {\iffieldundef{labelyear}%
+ {\usebibmacro{cite:label}}%
+ {\usebibmacro{cite:labeldate+extradate}}%
+ \savefield{labelyear}{\cbx@lastyear}}%
+ {\usebibmacro{cite:shorthand}%
+ \global\undef\cbx@lastyear}}%
+ \stepcounter{textcitecount}%
+ \savefield{namehash}{\cbx@lasthash}}%
+ \setunit{%
+ \ifbool{cbx:parens}%
+ {\bibcloseparen\global\boolfalse{cbx:parens}}%
+ {}%
+ % Use `\bibstring{and}` before the last name and commas before the rest
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}{%
+ \finalnamedelim%
+ }{%
+ \multinamedelim%
+ }}}% <<<3
+
+\xpretobibmacro{textcite}{% >>>3
+ \let\multinamedelim\multinamedelimorig%
+ \let\finalnamedelim\finalnamedelimorig%
+ \let\mkbibnamefamily\origmkbibnamefamily%
+ \let\mkbibnamegiven\origmkbibnamegiven%
+ \let\mkbibnameprefix\origmkbibnameprefix%
+ \let\mkbibnamesuffix\origmkbibnamesuffix%
+}{}{}% <<<3
+
+% <<<2
+
+% \footcite >>>2
+
+\newbibmacro*{footcite}{% >>>3
+ \let\multinamedelim\multinamedelimorig%
+ \let\finalnamedelim\finalnamedelimorig%
+ \let\mkbibnamefamily\origmkbibnamefamily%
+ \let\mkbibnamegiven\origmkbibnamegiven%
+ \let\mkbibnameprefix\origmkbibnameprefix%
+ \let\mkbibnamesuffix\origmkbibnamesuffix%
+ \usebibmacro{prenote}%
+ \ifnameundef{labelname}%
+ {\iffieldundef{shorthand}%
+ {\usebibmacro{cite:label}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \usebibmacro{cite:labeldate+extradate}}%
+ {\usebibmacro{cite:shorthand}}}%
+ {\printtext[bibhyperref]{\printnames{labelname}}%
+ \setunit{%
+ \global\booltrue{cbx:parens}%
+ \addspace\bibopenparen}%
+ \usebibmacro{citeyear}}}% <<<3
+
+\newbibmacro*{footcite:postnote}{% >>>3
+ \iffieldundef{postnote}%
+ {\ifbool{cbx:parens}%
+ {\bibcloseparen}%
+ {}}%
+ {\ifbool{cbx:parens}%
+ {\setunit{\postnotedelim}}%
+ {\setunit{\extpostnotedelim\bibopenparen}}%
+ \printfield{postnote}\bibcloseparen}}% <<<3
+
+\DeclareCiteCommand{\footcite}[\mkbibfootnote]% >>>3
+ {\boolfalse{cbx:parens}}%
{\usebibmacro{citeindex}%
- \iffirstcitekey%
- {\setcounter{textcitetotal}{1}}%
+ \iffirstcitekey
+ {\setcounter{textcitetotal}{1}}
{\stepcounter{textcitetotal}%
- \textcitedelim}%
- \usebibmacro{textcitefull}}%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\addspace\bibstring{and}}%
+ {\addcomma}%
+ \space}%
+ \usebibmacro{footcite}}%
{\ifbool{cbx:parens}%
{\bibcloseparen\global\boolfalse{cbx:parens}}%
{}}%
- {\usebibmacro{textcite:postnote}}
+ {\usebibmacro{footcite:postnote}}% <<<3
-\DeclareMultiCiteCommand{\textcites}{\textcite}{}% <<<2
+\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{}%
+% <<<2
-\DeclareCiteCommand{\parencite}[\mkbibparens]% >>>2
- {\usebibmacro{cite:init}%
- \usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
- {}%
- {\usebibmacro{postnote}}% <<<2
+% \citetitle >>>2
-\DeclareCiteCommand{\citeauthor}[\mkbibparens]% >>>2
- {\boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\ifciteindex%
- {\indexnames{labelname}}%
- {}%
- \printtext[bibhyperref]{\printnames[LAST]{labelname}}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
+% \citetitle is pretty much a copy of authoryear-comp's \textcite that uses
+% labeltitle instead of labelname
-\DeclareCiteCommand*{\citeauthor}%
- {\boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\ifciteindex%
- {\indexnames{labelname}}%
- {}%
- \printtext[bibhyperref]{\printnames{labelname}}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}% <<<2
+\newbibmacro*{citetitle}{% >>>3
+ \printtext[bibhyperref]{\printfield[labeltitle]{labeltitle}}%
+ \setunit{\global\booltrue{cbx:parens}\addspace\bibopenparen}%
+ \ifnumequal{\value{citecount}}{1}{\usebibmacro{prenote}}{}%
+ \iffieldundef{shorthand}{%
+ \usebibmacro{cite:labeldate+extradate}%
+ }{%
+ \usebibmacro{cite:shorthand}%
+ }%
+ \stepcounter{textcitecount}%
+ \setunit{%
+ \ifbool{cbx:parens}{\bibcloseparen\global\boolfalse{cbx:parens}}{}%
+ % Use `\bibstring{and}` before the last name and commas before the rest
+ \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}{%
+ \finalnamedelim%
+ }{%
+ \multinamedelim%
+ }%
+ }%
+}% <<<3
-\DeclareCiteCommand{\citetitle}[\mkbibparens]% >>>2
- {\usebibmacro{cite:init}%
- \boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\ifciteindex%
- {\indexfield{indextitle}}%
+\DeclareCiteCommand{\cbx@citetitle}% >>>3
+ {\usebibmacro{cite:init}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{citetitle}}%
+ {}%
+ {\usebibmacro{textcite:postnote}}% <<<3
+
+\DeclareCiteCommand{\citetitle}[\cbx@textcite@init\cbx@citetitle]% >>>3
+ {\gdef\cbx@savedkeys{}%
+ \citetrackerfalse%
+ \pagetrackerfalse%
+ \DeferNextCitekeyHook%
+ \usebibmacro{cite:init}}%
+ {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}%
+ {\protected@xappto\cbx@savedcites{()(\thefield{multipostnote})}%
+ \global\clearfield{multipostnote}}%
{}%
- \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
-
-\DeclareCiteCommand*{\citetitle}%
- {\usebibmacro{cite:init}%
- \boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\ifciteindex%
- {\indexfield{indextitle}}%
+ \xappto\cbx@savedkeys{\thefield{entrykey},}%
+ \iffieldequals{namehash}{\cbx@lasthash}%
{}%
- \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}% <<<2
+ {\stepcounter{textcitetotal}%
+ \savefield{namehash}{\cbx@lasthash}}}%
+ {}%
+ {\protected@xappto\cbx@savedcites{%
+ [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}% <<<3
-\DeclareCiteCommand{\citeyear}[\mkbibparens]% >>>2
- {\boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\printfield[bibhyperref]{year}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}%
+% <<<2
-\DeclareCiteCommand*{\citeyear}%
- {\boolfalse{citetracker}%
- \boolfalse{pagetracker}%
- \usebibmacro{prenote}}%
- {\printfield[bibhyperref]{year}}%
- {\multicitedelim}%
- {\usebibmacro{postnote}}% <<<2
+% \apud >>>2
-% apud >>>2
+\newbibmacro*{apud}{% >>>3
+ \iffieldundef{shorthand}%
+ {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}%
+ {\usebibmacro{cite:label}%
+ \setunit{\printdelim{nonameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \usebibmacro{cite:reinit}}%
+ {\iffieldequals{namehash}{\cbx@lasthash}%
+ {\setunit{\compcitedelim}%
+ \usebibmacro{cite:labeldate+extradate}}%
+ {\printtext[bibhyperref]{\printnames{labelname}}%
+ \setunit{\printdelim{nameyeardelim}}%
+ \usebibmacro{cite:labeldate+extradate}%
+ \savefield{namehash}{\cbx@lasthash}%
+ \savefield{labelyear}{\cbx@lastyear}}}}%
+ {\usebibmacro{cite:shorthand}%
+ \usebibmacro{cite:reinit}}%
+ \setunit{\multicitedelim}}% <<<3
+
+\newcommand{\addapud}{%% >>>3
+ \renewcommand*{\compcitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\space\bibstring{apud}}%
+ {\addsemicolon}%
+ \space}%
+ \renewcommand*{\multicitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\space\bibstring{apud}}%
+ {\addsemicolon}%
+ \space}%
+ \renewcommand*{\textcitedelim}{%
+ \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}%
+ {\addspace\bibstring{apud}}%
+ {\addsemicolon}%
+ \space}%
+}% <<<3
\DeclareCiteCommand{\@apud}% >>>3
{\usebibmacro{cite:init}%
- \iffieldundef{prenote}%
- {}%
- {\printfield[uppercasecite]{prenote}%
- \addspace\bibstring{apud}\addspace}}%
+ \iffieldundef{prenote}{}{%
+ \ifnumgreater{\value{multicitetotal}}{1}{%
+ \usebibmacro{prenote}%
+ }{%
+ \printfield[uppercasecite]{prenote}%
+ \isdot\addspace\bibstring{apud}\addspace%
+ }%
+ }%
+ }%
{\usebibmacro{citeindex}%
- \usebibmacro{cite}}%
+ \usebibmacro{apud}}%
{\setunit{\multicitedelim}}%
{\usebibmacro{postnote}}% <<<3
\DeclareMultiCiteCommand{\apud}[\addapud\mkbibparens]% >>>3
{\@apud}%
- {\setunit{\multicitedelim}%
-}% <<<3
+ {\setunit{\multicitedelim}}% <<<3
\DeclareCiteCommand{\plaincite}% >>>3
{\usebibmacro{cite:init}%
@@ -318,7 +530,11 @@
{\usebibmacro{cite:init}%
\boolfalse{citetracker}%
\boolfalse{pagetracker}%
- \usebibmacro{prenote}
+ \usebibmacro{prenote}%
+ \let\mkbibnamefamily\origmkbibnamefamily%
+ \let\mkbibnamegiven\origmkbibnamegiven%
+ \let\mkbibnameprefix\origmkbibnameprefix%
+ \let\mkbibnamesuffix\origmkbibnamesuffix%
\renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}%
\renewcommand*{\multinamedelim}{\addcomma\addspace}}%
{\ifciteindex%
@@ -329,260 +545,100 @@
{\usebibmacro{postnote}}% <<<3
\NewDocumentCommand{\textapud}{o o m o o m}{%% >>>3
- \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}%
- }%
- }%
-}%% <<<3
-
-% <<<2
-
-\DeclareCiteCommand*{\footcite}[\mkbibfootnote]% >>>2
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{footcite}}%
- {\multicitedelim}%
- {\usebibmacro{footcite:postnote}}% <<<2
-
-\DeclareCiteCommand{\footcite}[\mkbibfootnote]% >>>2
- {\usebibmacro{prenote}}%
- {\usebibmacro{citeindex}%
- \usebibmacro{footcitestar}}%
- {\multicitedelim}%
- {\usebibmacro{footcite:postnote}}% <<<2
-
-% <<<1
-
-
-% Macros >>>1
-
-\renewbibmacro*{cite}{%% >>>2
- \iffieldequals{fullhash}{\cbx@lasthash}{%
- \usebibmacro{cite:plabelyear+extrayear}%
- }{%
- \iffieldundef{shorthand}{%
- \ifnameundef{shortauthor}{%
- \ifnameundef{holder}{%
- \ifnameundef{labelname}{%
- \iflistundef{organization}{%
- \usebibmacro{cite:noname}%
- }{%
- \printlist[uppercase]{organization}%
- }%
+ \citelastname{#3}\addspace%
+ \mkbibparens{%
+ \IfNoValueTF{#2}{%
+ \IfNoValueTF{#1}{%
+ \citeyearorsh*{#3}%
+ }{%
+ \citeyearorsh*[#1]{#3}%
+ }%
+ }{%
+ \citeyearorsh*[#1][#2]{#3}%
+ }\addspace%
+ \IfNoValueTF{#5}{%
+ \IfNoValueTF{#4}{%
+ \plaincite[\blx@imc@bibxstring{apud}][]{#6}%
}{%
- \printtext[bibhyperref]{\printnames[LAST]{labelname}}%
+ \plaincite[\blx@imc@bibxstring{apud}][#4]{#6}%
}%
- }{%
- \printnames[LAST]{holder}%
- }%
}{%
- \printnames[LAST]{shortauthor}%
+ \cite[\blx@imc@bibxstring{apud} #4][#5]{#6}%
}%
- \setunit{\nameyeardelim}%
- \usebibmacro{cite:plabelyear+extrayear}%
- }{%
- \usebibmacro{cite:shorthand}%
- }%
- \savefield{fullhash}{\cbx@lasthash}%
}%
- \setunit{\multicitedelim}%
-}% <<<2
-
-\renewbibmacro*{textcite}{%% >>>2
- \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}}}%
- {\printtext[bibhyperref]{\printnames{labelname}}%
- \setunit{%
- \global\booltrue{cbx:parens}%
- \addspace\bibopenparen}%
- \ifnumequal{\value{citecount}}{1}%
- {\usebibmacro{prenote}}%
- {}%
- \usebibmacro{citeyear}}%
-}% <<<2
-
-\newbibmacro*{textcitefull}{%% >>>2
- \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}}}%
- {\printtext[bibhyperref]{\printnames[fullcite]{labelname}}%
- \setunit{%
- \global\booltrue{cbx:parens}%
- \addspace\bibopenparen}%
- \ifnumequal{\value{citecount}}{1}%
- {\usebibmacro{prenote}}%
- {}%
- \usebibmacro{citeyear}}%
-}% <<<2
-
-\newbibmacro*{cite:init}{%% >>>2
- \global\undef\cbx@lasthash%
-}% <<<2
-
-\newbibmacro*{cite:author}{%% >>>2
- \printtext[bibhyperref]{\printfield{author}}%
-}% <<<2
-
-\newbibmacro*{cite:noname}{%% >>>2
- \printfield[noname]{title}%
-}% <<<2
+}%% <<<3
-\def\citeresetabnt{\global\let\cbx@abnt@names\@empty}%
-\citeresetabnt%
-\def\cbx@abnt@ifnamesaved{%
- \xifinlist{\thefield{fullhash}}{\cbx@abnt@names}%
- {\@firstoftwo}%
- {\@secondoftwo}}%
+% <<<2
\renewbibmacro*{cite:label}{%% >>>2
\iffieldundef{label}{%
- \printtext[bibhyperref]{%
- \printfield[uppercasecite]{labeltitle}%
- }%
+ \printtext[bibhyperref]{\printfield[firstword]{labeltitle}}%
}{%
- \printtext[bibhyperref]{%
- \printfield{label}%
- }%
- }%
-}% <<<2
-
-\newbibmacro*{cite:plabelyear+extrayear}{%% >>>2
- \iffieldundef{labelyear}{}{%
- \printtext[bibhyperref]{%
- \printfield[normalfont]{origyear}%
- \setunit*{\addslash}%
- \printfield{labelyear}%
- \printfield{extrayear}%
- }%
- }%
- % \iffieldundef{issue}{}{%
- % \addcomma\addspace\printfield{issue}%
- % }%
-}% <<<2
-
-\renewbibmacro*{cite:shorthand}{%% >>>2
- \printtext[bibhyperref]{%
- \printfield{shorthand}%
- }%
-}% <<<2
-
-\newbibmacro*{citeyearpunct}{%% >>>2
- \iffieldundef{labelyear}{%
- \usebibmacro{cite:init}%
- }{% else
- \iffieldequals{fullhash}{\cbx@lasthash}{%
- \setunit{\compcitedelim}%
- \usebibmacro{cite:plabelyear+extrayear}%
- }{% else
- \usebibmacro{cite:plabelyear+extrayear}%
- \savefield{fullhash}{\cbx@lasthash}%
- }%
+ \printtext[bibhyperref]{\printfield[uppercasecite]{label}}%
}%
- \setunit{\multicitedelim}%
}% <<<2
-% <<<1
-
-
-% bibhyperref >>>1
-
-\DeclareFieldFormat{citehyperref}{%% >>>2
- \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
- \bibhyperref{#1}%
-}% <<<2
+\DeclareCiteCommand{\smartcite}[\mkbibparens]% >>>2
+ {\usebibmacro{cite:init}%
+ \usebibmacro{prenote}}%
+ {\usebibmacro{citeindex}%
+ \usebibmacro{cite}}%
+ {}%
+ {\usebibmacro{postnote}}% <<<2
-\DeclareFieldFormat{textcitehyperref}{%% >>>2
- \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
- \bibhyperref{%
- #1%
- \ifbool{cbx:parens}%
- {\bibcloseparen\global\boolfalse{cbx:parens}}%
- {}}%
-}% <<<2
+\DeclareCiteCommand{\citeauthor}[\mkbibparens]% >>>2
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\ifciteindex%
+ {\indexnames{labelname}}%
+ {}%
+ \printtext[bibhyperref]{\printnames{labelname}}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}%
-\savebibmacro{cite}%
-\savebibmacro{textcite}%
-\savebibmacro{textcitefull}%
+\DeclareCiteCommand*{\citeauthor}%
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\ifciteindex%
+ {\indexnames{labelname}}%
+ {}%
+ \printtext[bibhyperref]{\printnames{labelname}}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}% <<<2
-\renewbibmacro*{cite}{%% >>>2
- \printtext[citehyperref]{%
- \restorebibmacro{cite}%
- \usebibmacro{cite}}%
-}% <<<2
+\DeclareCiteCommand{\citeyear}[\mkbibparens]% >>>2
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\printfield[bibhyperref]{year}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}%
-\renewbibmacro*{textcite}{%% >>>2
- \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}}%
-}% <<<2
+\DeclareCiteCommand*{\citeyear}%
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\printfield[bibhyperref]{year}}%
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}% <<<2
-\renewbibmacro*{textcitefull}{%% >>>2
- \ifboolexpr{%
- ( not test {\iffieldundef{prenote}} and%
- test {\ifnumequal{\value{citecount}}{1}} )%
- or%
- ( not test {\iffieldundef{postnote}} and%
- test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )%
+\DeclareCiteCommand*{\citeyearorsh}%
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}%
+ {\iffieldundef{shorthand}{%
+ \printfield[bibhyperref]{year}%
+ }{%
+ \printfield[bibhyperref]{shorthand}%
+ }%
}%
- {\DeclareFieldAlias{textcitehyperref}{noformat}}%
- {}%
- \printtext[textcitehyperref]{%
- \restorebibmacro{textcitefull}%
- \usebibmacro{textcitefull}}%
-}% <<<2
+ {\multicitedelim}%
+ {\usebibmacro{postnote}}% <<<2
% <<<1
-
\endinput%
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/brazil-abnt.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/brazil-abnt.lbx
new file mode 100644
index 00000000000..b119c7f6aa7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/brazil-abnt.lbx
@@ -0,0 +1,21 @@
+%% Copyright 2016 Daniel Ballester 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 Ballester Marques.
+
+\ProvidesFile{brazil-abnt.lbx}
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
+
+\InheritBibliographyExtras{brazilian-abnt}
+\InheritBibliographyStrings{brazilian-abnt}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/brazilian-abnt.lbx
index e810b56374f..be2de9ac3d6 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/brazilian-abnt.lbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,10 +10,10 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
\ProvidesFile{abnt-brazilian.lbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
% Init >>>
@@ -45,45 +45,91 @@
% Publication details >>>1
-\NewBibliographyString{%
+\NewBibliographyString{% >>>2
apud,%
sineloco,%
sinenomine,%
sheet,%
sheets,%
+ sheettotal,%
+ sheettotals,%
illustrated,%
monography,%
recensionof,%
-}%
+}% <<<2
-\DeclareBibliographyStrings{%
- apud = {{apud}{apud}},%
- idem = {{idem}{id\adddot}},%
- volume = {{volume}{v\adddot}},%
- volumes = {{volumes}{v\adddot}},%
- number = {{n\'umero}{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}},%
- urlfrom = {{dispon\'ivel em}{dispon\'ivel em}},%
- urlseen = {{acesso em}{acesso em}},%
- sheet = {{folha}{f\adddot}},%
- sheets = {{folhas}{f\adddot}},%
- backrefpage = {{citado na p\'agina}{citado na p\adddot}},%
- backrefpages = {{citado nas p\'aginas}{citado nas pp\adddot}},%
- illustrated = {{ilustrado}{il\adddot}},%
- monography = {{monografia}{monografia}},%
- phdthesis = {{Tese (Doutorado)}{Tese (Doutorado)}},%
- mathesis = {{Disserta\c{c}\~ao (Mestrado)}{Diss. (Mestrado)}},%
- reprintfrom = {{separata de}{separata de}},%
- recensionof = {{recens\~ao de}{recens\~ao de}},%
- reviewof = {{resenha de}{resenha de}},%
-}%
+\DeclareBibliographyStrings{% >>>2
+ apud = {{apud}{apud}},%
+ idem = {{idem}{id\adddot}},%
+ volume = {{volume}{v\adddot}},%
+ volumes = {{volumes}{v\adddot}},%
+ number = {{n\'umero}{n\adddot}},%
+ pages = {{p\'aginas}{p\adddot}},%
+ pagetotals = {{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}},%
+ urlfrom = {{dispon\'ivel em}{dispon\'ivel em}},%
+ urlseen = {{acesso em}{acesso em}},%
+ sheet = {{folha}{f\adddot}},%
+ sheets = {{folhas}{f\adddot}},%
+ sheettotal = {{folha}{f\adddot}},%
+ sheettotals = {{folhas}{f\adddot}},%
+ backrefpage = {{citado na p\'agina}{citado na p\adddot}},%
+ backrefpages = {{citado nas p\'aginas}{citado nas pp\adddot}},%
+ illustrated = {{ilustrado}{il\adddot}},%
+ monography = {{monografia}{monografia}},%
+ phdthesis = {{Tese (Doutorado)}{Tese (Doutorado)}},%
+ mathesis = {{Disserta\c{c}\~ao (Mestrado)}{Diss. (Mestrado)}},%
+ reprintfrom = {{separata de}{separata de}},%
+ recensionof = {{recens\~ao de}{recens\~ao de}},%
+ reviewof = {{resenha de}{resenha de}},%
+}% <<<2
-% <<<
+% <<<1
+
+% citecounter >>>1
+
+\NewBibliographyString{% >>>2
+ citecountpage,%
+ citecountpages,%
+ citecountnopage,%
+}% <<<2
+
+\DeclareBibliographyStrings{% >>>2
+ citecountpage = {{%
+ \ifnumgreater{\value{citecounter}}{1}{%
+ Citado \arabic{citecounter} vezes na p\'agina%
+ }{%
+ Citado \arabic{citecounter} vez na p\'agina%
+ }%
+ }{%
+ \ifnumgreater{\value{citecounter}}{1}{%
+ Citado \arabic{citecounter} vezes na p\'agina%
+ }{%
+ Citado \arabic{citecounter} vez na p\'agina%
+ }%
+ }},%
+ citecountpages = {{%
+ \ifnumgreater{\value{citecounter}}{1}{%
+ Citado \arabic{citecounter} vezes nas p\'aginas%
+ }{%
+ Citado \arabic{citecounter} vez nas p\'aginas%
+ }%
+ }{%
+ \ifnumgreater{\value{citecounter}}{1}{%
+ Citado \arabic{citecounter} vezes nas p\'aginas%
+ }{%
+ Citado \arabic{citecounter} vez nas p\'aginas%
+ }%
+ }},%
+ citecountnopage = {{Nenhuma cita\c{c}\~ao no texto}%
+ {Nenhuma cita\c{c}\~ao no texto}}
+}% <<<2
+
+% <<<1
% Languages >>>1
@@ -134,7 +180,9 @@
% <<<
-% Roles expressed as functions >>>1
+% Roles >>>1
+
+% Roles expressed as functions >>>2
\NewBibliographyString{%
organizer,%
@@ -155,9 +203,9 @@
coordinators = {{coordenadores}{coord\adddot}},%
}%
-% <<<
+% <<<2
-% Roles expressed as objects >>>1
+% Roles expressed as objects >>>2
\DeclareBibliographyStrings{%
withcommentator = {{coment\'ario\addcolon}{coment\'ario\addcolon}},%
@@ -167,11 +215,11 @@
withafterword = {{posf\'acio\addcolon}{posf\'acio\addcolon}},%
}%
-% <<<
+% <<<2
-% Roles expressed as actions >>>1
+% Roles expressed as actions >>>2
-\NewBibliographyString{% >>>2
+\NewBibliographyString{% >>>3
byorganizer,%
byorganizerfo,%
bytechrev,%
@@ -192,9 +240,9 @@
byinterpreter,%
byillustrator,%
bytechrev,%
-}% <<<
+}% <<<3
-\DeclareBibliographyStrings{% >>>2
+\DeclareBibliographyStrings{% >>>3
bycoeditor = {{co-edi\c{c}\~ao\addcolon}%
{co-edi\c{c}\~ao\addcolon}},%
bydirector = {{dire\c{c}\~ao\addcolon}%
@@ -327,9 +375,11 @@
{tradu\c{c}\~ao, notas e pref\'acio\addcolon}},%
bytranslatoranaf = {{tradu\c{c}\~ao, notas e posf\'acio\addcolon}%
{tradu\c{c}\~ao, notas e posf\'acio\addcolon}},%
-}% <<<
+}% <<<3
-% <<<
+% <<<2
+
+% <<<1
\endinput%
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-english.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/english-abnt.lbx
index 5c5d32f9f81..52095dcb487 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-english.lbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/english-abnt.lbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,12 +10,12 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
%%
%% Tradução para o espanhol de Juan-Ernesto Sepúlveda. Obrigado!
\ProvidesFile{abnt-english.lbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
% Init >>>
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/portuges-abnt.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/portuges-abnt.lbx
new file mode 100644
index 00000000000..0ed37774b08
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/portuges-abnt.lbx
@@ -0,0 +1,21 @@
+%% Copyright 2016 Daniel Ballester 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 Ballester Marques.
+
+\ProvidesFile{portuges-abnt.lbx}
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
+
+\InheritBibliographyExtras{brazilian-abnt}
+\InheritBibliographyStrings{brazilian-abnt}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/portuguese-abnt.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/portuguese-abnt.lbx
new file mode 100644
index 00000000000..2d0b5aa8393
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/portuguese-abnt.lbx
@@ -0,0 +1,21 @@
+%% Copyright 2016 Daniel Ballester 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 Ballester Marques.
+
+\ProvidesFile{portuguese-abnt.lbx}
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
+
+\InheritBibliographyExtras{brazilian-abnt}
+\InheritBibliographyStrings{brazilian-abnt}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-spanish.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/spanish-abnt.lbx
index e7dac8b4e0c..eb51559d359 100644
--- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-spanish.lbx
+++ b/Master/texmf-dist/tex/latex/biblatex-abnt/spanish-abnt.lbx
@@ -1,4 +1,4 @@
-%% Copyright 2016 Daniel B. Marques
+%% Copyright 2016 Daniel Ballester Marques
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -10,12 +10,12 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Daniel B. Marques.
+%% The Current Maintainer of this work is Daniel Ballester Marques.
%%
%% Tradução para o espanhol de Juan-Ernesto Sepúlveda. Obrigado!
\ProvidesFile{abnt-spanish.lbx}%
-[2017/07/28\space v3.1\space ABNT BibLaTeX citation style]%
+[2017/11/09\space v3.2\space ABNT BibLaTeX citation style]%
% Init >>>