diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx | 858 |
1 files changed, 457 insertions, 401 deletions
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% |