From e713cc2bf72641ba4b55583d6a4eebb89f464937 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 15 Mar 2017 21:17:57 +0000 Subject: biblatex-abnt (15mar17) git-svn-id: svn://tug.org/texlive/trunk@43510 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/biblatex-abnt/abnt-brazilian.lbx | 2 +- .../tex/latex/biblatex-abnt/abnt-ibid.bbx | 2 +- .../tex/latex/biblatex-abnt/abnt-ibid.cbx | 113 +++++++++++++++++---- .../tex/latex/biblatex-abnt/abnt-numeric.bbx | 2 +- .../tex/latex/biblatex-abnt/abnt-numeric.cbx | 60 ++++++++++- Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx | 29 +++--- Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx | 76 +++++++++----- 7 files changed, 220 insertions(+), 64 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-abnt') diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx index 7a3798345cd..2249ed5f9af 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.lbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\space ABNT BibLaTeX citation style]% % Init >>> 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 1aa31d36df5..65db826e75a 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-ibid.bbx} -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\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 88941c28413..c2355bdccfd 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-ibid.cbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\space ABNT BibLaTeX citation style]% \newtoggle{sccite}% @@ -86,6 +86,7 @@ \providecommand*{\mkidem}[1]{#1}% \providecommand*{\mkibid}[1]{#1}% \providecommand*{\mkopcit}[1]{#1}% +\providecommand*{\mkloccit}[1]{#1}% \renewcommand*{\iffinalcitedelim}{% \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}% @@ -100,7 +101,7 @@ {\ExecuteBibliographyOptions{loccittracker=constrict}}% {\ExecuteBibliographyOptions{loccittracker=false}}}% -\DeclareBibliographyOption[string]{footcitepages}[permit]{% +\DeclareBibliographyOption[string]{citepages}[permit]{% \ifcsdef{cbx@opt@citepages@#1}% {\csuse{cbx@opt@citepages@#1}}% {\PackageError{biblatex}% @@ -175,7 +176,7 @@ opcittracker=constrict,% pagetracker,% autocite=footnote,% - footcitepages=permit,% + citepages=permit,% labeldateparts,% labeldate=year,% }% <<<2 @@ -204,13 +205,21 @@ \usebibmacro{footcite:idem}% }{% \ifboolexpr{% - test {\ifopcit}% + test {\ifloccit}% and% not test {\iffirstonpage}% }{% - \usebibmacro{footcite:opcit}% + \usebibmacro{footcite:loccit}% }{% - \usebibmacro{footcite:short}% + \ifboolexpr{% + test {\ifopcit}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:opcit}% + }{% + \usebibmacro{footcite:short}% + }% }% }% }% @@ -222,6 +231,48 @@ }% }% <<<2 +\newbibmacro*{footcitestar}{% >>>2 + \usebibmacro{footcite:citepages}% + \global\togglefalse{cbx:loccit}% + \iffieldundef{shorthand}{% + \ifboolexpr{% + test {\ifciteibid}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:ibid}% + }{% + \ifboolexpr{% + test {\ifciteidem}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:idem}% + }{% + \ifboolexpr{% + test {\ifloccit}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:loccit}% + }{% + \ifboolexpr{% + test {\ifopcit}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:opcit}% + }{% + \usebibmacro{footcite:short}% + }% + }% + }% + }% + }{% + \usebibmacro{footcite:shorthand}% + }% +}% <<<2 + \newbibmacro*{footcite:full}{% >>>2 \usebibmacro{footcite:full:citepages}% \printtext[bibhypertarget]{% @@ -248,6 +299,19 @@ }% }% <<<2 +\newbibmacro*{footcite:loccit}{% >>>2 + \ifnameundef{labelname}{% + \printtext[bibhyperref]{% + \printfield[citetitle]{labeltitle}% + }% + }{% + \printnames[LAST]{labelname}% + }% + \setunit*{\nameyeardelim}% + \printtext[bibhyperlink]{\bibstring[\mkloccit]{loccit}}% + \global\toggletrue{cbx:loccit} +}% <<<2 + \newbibmacro*{footcite:opcit}{% >>>2 \ifnameundef{labelname}{% \printtext[bibhyperref]{% @@ -258,9 +322,9 @@ }% \setunit*{\nameyeardelim}% \printtext[bibhyperlink]{\bibstring[\mkopcit]{opcit}}% -}% +}% <<<2 -\newbibmacro*{footcite:idem}{% +\newbibmacro*{footcite:idem}{% >>>2 \printtext[bibhyperlink]{\bibstring[\mkidem]{idem}}% \setunit*{\nameyeardelim}% \iffieldundef{labelyear}{% @@ -291,13 +355,21 @@ % Commands >>>1 -\DeclareCiteCommand{\cite}% >>>2 +\DeclareCiteCommand{\cite}[\mkbibfootnote]% >>>2 {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{footcite}}% {\multicitedelim}% {\usebibmacro{footcite:postnote}}% <<<2 +\DeclareCiteCommand*{\cite}[\mkbibfootnote]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite:citepages}% + \usebibmacro{footcite:short}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + \DeclareCiteCommand{\parencite}[\mkbibparens]% >>>2 {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% @@ -315,9 +387,7 @@ \DeclareCiteCommand*{\footcite}[\mkbibfootnote]% >>>2 {\usebibmacro{prenote}}% {\usebibmacro{citeindex}% - \usebibmacro{footcite:citepages}% - \global\togglefalse{cbx:loccit}% - \usebibmacro{footcite:short}}% + \usebibmacro{footcitestar}}% {\multicitedelim}% {\usebibmacro{footcite:postnote}}% <<<2 @@ -436,20 +506,21 @@ {}% {\usebibmacro{textcite:count}% \savefield{namehash}{\cbx@lasthash}}% - \ifnumequal{\value{footcitecount}}{\value{footcitetotal}}% - {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% + \ifnumequal{\value{citecount}}{\value{citetotal}}{% + \protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% \protected@xappto\cbx@footcite@args{% - [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}% - \iflastcitekey% - {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% - \protected@xappto\cbx@footcite@args{\nopunct}}% - {}}% - {}}% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}% + }% + \iflastcitekey{% + \protected@xappto\cbx@textcite@args{\thefield{postpunct}}% + \protected@xappto\cbx@footcite@args{\nopunct}% + }{}% + }{}}% {}% {}% <<<2 % textcite has nested \DeclareCiteCommand definitions for -% textcite and we want to use % the normal textcite context +% textcite and we want to use the normal textcite context \DeclareDelimcontextAlias{cbx@textcite}{textcite}% \newrobustcmd{\cbx@textcite@init}[3]{% >>>2 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 de9304d13a2..ac80d7c965b 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-numeric.bbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\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 f2e2777143e..6667fc69ac5 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-numeric.cbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\space ABNT BibLaTeX citation style]% \RequireCitationStyle{numeric} @@ -40,6 +40,16 @@ {\multicitedelim} {\usebibmacro{postnote}}% <<<2 +\DeclareCiteCommand{\cbx@textcite}% >>>2 + {\usebibmacro{textcite:init}% Mudar \multinamedelim e \finalnamedelim. + \boolfalse{cbx:parens}% + \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}% + \renewcommand*{\multinamedelim}{\addcomma\addspace}}% + {\usebibmacro{citeindex}% + \usebibmacro{textcite}} + {} + {\usebibmacro{textcite:postnote}}% <<<2 + \DeclareMultiCiteCommand{\cites}[\mkbibparens]{\cite}{\multicitedelim} \DeclareMultiCiteCommand{\parencites}% @@ -71,6 +81,54 @@ {}% \textcitedelim}}% <<<1 +% bibhyperref >>>1 + +\DeclareFieldFormat{citehyperref}{%% >>>2 + \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links + \bibhyperref{#1}% +}% <<<2 + +\DeclareFieldFormat{textcitehyperref}{%% >>>2 + \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links + \bibhyperref{% + #1% + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}}% +}% <<<2 + +\savebibmacro{cite}% +\savebibmacro{textcite}% + +\renewbibmacro*{cite}{%% >>>2 + \printtext[citehyperref]{% + \restorebibmacro{cite}% + \usebibmacro{cite}}% +}% <<<2 + +\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 + +% <<<1 + \endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx index 199eed988bb..ebd4316ac26 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx @@ -13,13 +13,16 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.bbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\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}% \RequireBibliographyStyle{standard}% @@ -538,7 +541,7 @@ \DeclareFieldFormat{illustrated}{\addspace #1\isdot}% -\DeclareFieldFormat{url}{\bibstring{url}\addcolon\addspace\url{<#1>}}% +\DeclareFieldFormat{url}{\bibstring{url}\addcolon\addspace<\url{#1}>}% \DeclareFieldFormat{urldate}{\bibstring{urlseen}\addcolon\addspace #1}% \DeclareFieldFormat*{note}{\addspace #1}% @@ -628,7 +631,7 @@ % <<< -\DeclareFieldFormat{noformat}{\normalfont{#1}}% +\DeclareFieldFormat{normalfont}{\normalfont{#1}}% % <<<2 @@ -770,9 +773,9 @@ test {\iffieldundef{related}}% }% {\printfield[titlecase]{title}}% - {\printfield[noformat]{title}}}% + {\printfield[normalfont]{title}}}% \normalfont{\setunit*{\subtitlepunct}% - \printfield[noformat]{subtitle}% + \printfield[normalfont]{subtitle}% \setunit{\addperiod\addspace}}}% \newunit}}% \printfield{titleaddon}% @@ -810,7 +813,7 @@ \printfield[titlecase]{booktitle}% }% \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{booksubtitle}}% + \printfield[normalfont]{booksubtitle}}% \newunit}% \printfield{booktitleaddon}% }%% <<<3 @@ -829,7 +832,7 @@ \printfield[titlecase]{maintitle}% }% \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{mainsubtitle}}% + \printfield[normalfont]{mainsubtitle}}% \newunit}% \printfield{maintitleaddon}% }%% <<<3 @@ -871,7 +874,7 @@ {\printtext[journaltitle]{% \printfield[titlecase]{journaltitle}% \setunit{\subtitlepunct}% - \printfield[noformat]{journalsubtitle}}}% + \printfield[normalfont]{journalsubtitle}}}% }%% <<<3 \newbibmacro{journal+section}{%% >>>3 @@ -901,12 +904,12 @@ \printtext[title]{% \unspace\printfield[upperfirst]{title}% \normalfont{\setunit*{\subtitlepunct}% - \printfield[noformat]{subtitle}}}% + \printfield[normalfont]{subtitle}}}% }% {\printtext[title]{% \printfield[titlecase]{title}% \normalfont{\setunit*{\subtitlepunct}% - \printfield[noformat]{subtitle}}}}% + \printfield[normalfont]{subtitle}}}}% }% }%% <<<3 @@ -1153,7 +1156,7 @@ {\printtext[issuetitle]{% \printfield[upperfirst]{issuetitle}% \setunit*{\subtitlepunct}% - \printfield[noformat]{issuesubtitle}}}% + \printfield[normalfont]{issuesubtitle}}}% }%% <<<3 \renewbibmacro*{issue+date}{%% >>>3 @@ -1219,7 +1222,7 @@ \printtext[parens]{% \printfield{series}% \setunit*{\addcomma\addspace}% - \printfield[noformat]{number}% + \printfield[normalfont]{number}% \newunit}% }% }%% <<<3 @@ -1848,7 +1851,7 @@ \setunit{\labelnamepunct}\newblock% \printfield[uppercase]{title}% \setunit*{\addcolon\addspace}% - \printfield[noformat]{subtitle}% + \printfield[normalfont]{subtitle}% \newunit% \printfield{titleaddon}% \newunit\newblock% diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx index afc7aeef0e9..5789a2a2557 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx @@ -13,7 +13,7 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.cbx}% -[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% +[2017/03/15\space v3.0.1\space ABNT BibLaTeX citation style]% % Init >>>1 @@ -125,9 +125,17 @@ \DeclareFieldFormat{citetitle}{%% >>>3 \iftoggle{sccite}{% - \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}% + \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}\ldots\isdot% }{% - \normalfont\MakeUppercase{\FirstWord{#1}}% + \normalfont\MakeUppercase{\FirstWord{#1}}\ldots\isdot% + }% +}%% <<<3 + +\DeclareFieldFormat{noname}{%% >>>3 + \iftoggle{sccite}{% + \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}\ldots\isdot% + }{% + \normalfont\MakeUppercase{\FirstWord{#1}}\ldots\isdot% }% }%% <<<3 @@ -335,39 +343,55 @@ % <<<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}{% + \iffieldequals{fullhash}{\cbx@lasthash}{% + \usebibmacro{cite:plabelyear+extrayear}% + }{% + \iffieldundef{shorthand}{% \ifnameundef{shortauthor}{% - \ifnameundef{holder}{% - \ifnameundef{labelname}{% - \iflistundef{organization}{% - \usebibmacro{cite:noname}% - }{% - \printlist[uppercase]{organization}% - }% - }{% - \printtext[bibhyperref]{\printnames[LAST]{labelname}}% - }% + \ifnameundef{holder}{% + \ifnameundef{labelname}{% + \iflistundef{organization}{% + \usebibmacro{cite:noname}% }{% - \printnames[LAST]{holder}% + \printlist[uppercase]{organization}% }% }{% - \printnames[LAST]{shortauthor}% + \printtext[bibhyperref]{\printnames[LAST]{labelname}}% }% + }{% + \printnames[LAST]{holder}% + }% }{% - \usebibmacro{cite:shorthand}% + \printnames[LAST]{shortauthor}% }% - \setunit{\nameyeardelim}% - \usebibmacro{cite:plabelyear+extrayear}% - \savefield{fullhash}{\cbx@lasthash}}% - \setunit{\multicitedelim}% + \setunit{\nameyeardelim}% + \usebibmacro{cite:plabelyear+extrayear}% + }{% + \usebibmacro{cite:shorthand}% + }% + \savefield{fullhash}{\cbx@lasthash}% + }% + \setunit{\multicitedelim}% }% <<<2 \renewbibmacro*{textcite}{%% >>>2 @@ -423,7 +447,7 @@ }% <<<2 \newbibmacro*{cite:noname}{%% >>>2 - \printfield[citetitle]{title}% + \printfield[noname]{title}% }% <<<2 \def\citeresetabnt{\global\let\cbx@abnt@names\@empty}% @@ -448,7 +472,7 @@ \newbibmacro*{cite:plabelyear+extrayear}{%% >>>2 \iffieldundef{labelyear}{}{% \printtext[bibhyperref]{% - \printfield[noformat]{origyear}% + \printfield[normalfont]{origyear}% \setunit*{\addslash}% \printfield{labelyear}% \printfield{extrayear}% @@ -461,7 +485,7 @@ \renewbibmacro*{cite:shorthand}{%% >>>2 \printtext[bibhyperref]{% - \emph{\printfield{shorthand}}% + \printfield{shorthand}% }% }% <<<2 -- cgit v1.2.3