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 | 70 |
1 files changed, 67 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx index 7deb3e81993..f958454c0ec 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx @@ -46,6 +46,11 @@ \settoggle{sccite}{#1}% }% <<<2 +\newtoggle{accite}% >>>2 +\DeclareBibliographyOption{accite}[true]{% + \settoggle{accite}{#1}% +}% <<<2 + % <<<1 % Format >>>1 @@ -69,6 +74,18 @@ }% }% <<<3 +\newcommand*{\NormalOrACCiteOrSCCite}[1]{% >>>3 + \iftoggle{accite}{% + \MakeUppercase{#1}% + }{% + \iftoggle{sccite}{% + \textsc{\MakeLowercase{#1}}% + }{% + \MakeCapital{#1}% + }% + }% +}% <<<3 + % \mkbibname* >>>3 % \IfGivenIsInit >>>4 @@ -90,7 +107,7 @@ \let\origmkbibnamesuffix\mkbibnamesuffix% \renewcommand*{\mkbibnamefamily}[1]{% >>>4 - \UpperOrSCCite{#1}% + \NormalOrACCiteOrSCCite{#1}% }% <<<4 \renewcommand*{\mkbibnamegiven}[1]{% >>>4 \ifnumequal{\value{uniquename}}{2}{% @@ -101,13 +118,13 @@ }% <<<4 \renewcommand*{\mkbibnameprefix}[1]{% >>>4 \ifuseprefix{% - \UpperOrSCCite{#1}% + \NormalOrACCiteOrSCCite{#1}% }{% \ifnumequal{\value{uniquename}}{2}{#1}{\NormalOrSCCite{#1}}% }% }% <<<4 \renewcommand*{\mkbibnamesuffix}[1]{% >>>4 - \UpperOrSCCite{#1}% + \NormalOrACCiteOrSCCite{#1}% }% <<<4 \AtBeginBibliography{% @@ -518,6 +535,27 @@ }% }% <<<3 +\newbibmacro*{citetitlestar}{% >>>3 + \printtext[bibhyperref]{\textit{\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{\cbx@citetitle}% >>>3 {\usebibmacro{cite:init}}% {\usebibmacro{citeindex}% @@ -525,6 +563,13 @@ {}% {\usebibmacro{textcite:postnote}}% <<<3 +\DeclareCiteCommand{\cbx@citetitlestar}% >>>3 + {\usebibmacro{cite:init}}% + {\usebibmacro{citeindex}% + \usebibmacro{citetitlestar}}% + {}% + {\usebibmacro{textcite:postnote}}% <<<3 + \DeclareCiteCommand{\citetitle}[\cbx@textcite@init\cbx@citetitle]% >>>3 {\gdef\cbx@savedkeys{}% \citetrackerfalse% @@ -544,6 +589,25 @@ {\protected@xappto\cbx@savedcites{% [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}% <<<3 +\DeclareCiteCommand*{\citetitle}[\cbx@textcite@init\cbx@citetitlestar]% >>>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}}% + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash}% + {}% + {\stepcounter{textcitetotal}% + \savefield{namehash}{\cbx@lasthash}}}% + {}% + {\protected@xappto\cbx@savedcites{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}}% <<<3 + % <<<2 % \apud >>>2 |