Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bibtex/bib/abntex2/abntex2-options.bib
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,14 @@ @ABNT-options
key="aaaa"}
@ABNT-options{abnt-nbr6023=2000,
key="aaaa"}
@ABNT-options{abnt-nbr10520=2023,
abnt-cite-style="(Author, YEAR)",
abnt-and-type="e",
key="aaaa"}
@ABNT-options{abnt-nbr10520=2002,
abnt-cite-style="(AUTHOR, YEAR)",
abnt-and-type="e",
abnt-etal-text="et al.",
key="aaaa"}
@ABNT-options{abnt-nbr10520=2001,
abnt-cite-style="(AUTHOR, YEAR)",
Expand Down
20 changes: 14 additions & 6 deletions bibtex/bst/abntex2/abntex2-alf.bst
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ FUNCTION {bbl.ldots} %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {..
abnt.ldots.type #3 = {"{...}"} 'skip$ if$}
{""} %for #0 use nothing
if$}
FUNCTION {bbl.ldots.bracket} %NBR 10520:2023 - reticências entre colchetes
{abnt.ldots.type
{abnt.ldots.type #1 = {" [\ldots]"} 'skip$ if$
abnt.ldots.type #2 = {" [$\ldots$]"} 'skip$ if$
abnt.ldots.type #3 = {" [...]"} 'skip$ if$}
{""} %for #0 use nothing
if$}
FUNCTION {bbl.master} { "Mestrado" }
FUNCTION {bbl.missing.year}
{abnt.missing.year
Expand Down Expand Up @@ -1291,7 +1298,7 @@ FUNCTION {format.title.for.label}
s t = %title equals first word, dont use bbl.ldots
{t "}{" * t
abnt.cite.style #0 = {"u" change.case$ * } 'skip$ if$}
{t bbl.ldots * "}{" * t
{t abnt.cite.style #0 = {bbl.ldots} {bbl.ldots.bracket} if$ * "}{" * t
abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ * bbl.ldots *}
if$
}
Expand Down Expand Up @@ -1330,7 +1337,8 @@ FUNCTION {calc.extended.label}
{org-short empty$ not
{org-short * "}{" * org-short "u" change.case$ *}
{organization empty$ not
{organization * "}{" * organization "u" change.case$ *}
{organization * "}{" * organization
abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ *}
{title empty$ not
{title format.title.for.label *}
{"nada}{NADA" *}
Expand Down Expand Up @@ -2034,14 +2042,14 @@ FUNCTION {set.default.abnt.variables}
"$Revision: v<VERSION> $" extract.cvs.key 'abnt.bst.revision :=
#0 'abnt.and.type := % #0 "e"; #1 "&"
"\emph" 'abnt.emphasize :=
#0 'abnt.cite.style := %default norm version for NBR10520
%#0 \cite=(AUTHOR, YEAR)
%#1 \cite=(Author, YEAR)
#1 'abnt.cite.style := %default norm version for NBR10520:2023
%#0 \cite=(AUTHOR, YEAR) [NBR10520:2002]
%#1 \cite=(Author, YEAR) [NBR10520:2023]
#0 'abnt.experimental :=
abnt.doi.expand.to.url 'abnt.doi :=
#3 'abnt.etal.cite :=
#3 'abnt.etal.list :=
"et al." 'abnt.etal.text :=
"\textit{et al.}" 'abnt.etal.text :=
#0 'abnt.full.initials :=
#0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
#1 'abnt.ldots.type := %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
Expand Down
11 changes: 6 additions & 5 deletions bibtex/bst/abntex2/abntex2-num.bst
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,8 @@ FUNCTION {calc.extended.label}
{org-short empty$ not
{org-short * "}{" * org-short "u" change.case$ *}
{organization empty$ not
{organization * "}{" * organization "u" change.case$ *}
{organization * "}{" * organization
abnt.cite.style #0 = {"u" change.case$} 'skip$ if$ *}
{title empty$ not
{title format.title.for.label *}
{"nada}{NADA" *}
Expand Down Expand Up @@ -2034,14 +2035,14 @@ FUNCTION {set.default.abnt.variables}
"$Revision: v<VERSION> $" extract.cvs.key 'abnt.bst.revision :=
#0 'abnt.and.type := % #0 "e"; #1 "&"
"\emph" 'abnt.emphasize :=
#0 'abnt.cite.style := %default norm version for NBR10520
%#0 \cite=(AUTHOR, YEAR)
%#1 \cite=(Author, YEAR)
#1 'abnt.cite.style := %default norm version for NBR10520:2023
%#0 \cite=(AUTHOR, YEAR) [NBR10520:2002]
%#1 \cite=(Author, YEAR) [NBR10520:2023]
#0 'abnt.experimental :=
abnt.doi.expand.to.url 'abnt.doi :=
#3 'abnt.etal.cite :=
#3 'abnt.etal.list :=
"et al." 'abnt.etal.text :=
"\textit{et al.}" 'abnt.etal.text :=
#0 'abnt.full.initials :=
#0 'abnt.last.names := %#0 abnt-style, #1 bibtex-style
#1 'abnt.ldots.type := %#0 use nothing, #1 use \ldots, #2 use $\ldots$, 3# use {...}
Expand Down
2 changes: 1 addition & 1 deletion tex/latex/abntex2/abntex2.cls
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@
% ------------------------------------------------------------------------

% ---
% Citacao direta com mais de 3 linhas - ABNT NBR 10520/2002 - 5.3
% Citacao direta com mais de 3 linhas - ABNT NBR 10520/2023
\newlength{\ABNTEXcitacaorecuo}% recuo de 4 cm da margem esquerda
\ifthenelse{\equal{\ABNTEXistwocolumn}{true}}{%
\setlength{\ABNTEXcitacaorecuo}{1.8cm}
Expand Down
85 changes: 64 additions & 21 deletions tex/latex/abntex2/abntex2cite.sty
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,15 @@
\setboolean{ABNTversalete}{false}
\DeclareOption{versalete}{\setboolean{ABNTversalete}{true}}

% NBR 10520:2023 - autoria com inicial maiúscula em citações parentéticas
\newboolean{ABNTnbr10520v2023}
\setboolean{ABNTnbr10520v2023}{true}
\DeclareOption{nbr10520=2023}{\setboolean{ABNTnbr10520v2023}{true}}
\DeclareOption{nbr10520=2002}{%
\setboolean{ABNTnbr10520v2023}{false}%
\addtociteoptionlist{abnt-nbr10520=2002}%
}

% 10520:2002 does not allow (XX) or [XX] for superscript cites
\newboolean{ABNTstrictnumformat}

Expand Down Expand Up @@ -334,6 +343,12 @@
{}
{\AtBeginDocument{\citeoption{\citeoptionlist}}}

\def\ABNTciteparensuffix{IMPL}%
\ifthenelse{\boolean{ABNTnbr10520v2023}}{%
\def\ABNTciteparenstylecmd{\authorstyle}%
}{%
\def\ABNTciteparenstylecmd{\authorcapstyle}%
}

% \citeoption - equal to \nocite (I copied source from \nocite)
% but not complains about this option be obviously undefined
Expand Down Expand Up @@ -606,8 +621,8 @@
%
% \cite[optional]{list of keys}
%
% Implicit citation - author in capital letters and year;
% mechanism to deal with repeated names;
% Parenthetical citation - author and year;
% mechanism to deal with repeated names;
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -624,9 +639,8 @@
{%
\edef\@citekey{\expandafter\@firstofone\@citekey\@empty}%
%
% here, a tricky \let\@citename\"b@\@citekey++IMPL"
\expandafter\let\expandafter\@citename%
\csname b@\@citekey++IMPL\endcsname%
\csname b@\@citekey++\ABNTciteparensuffix\endcsname%
\expandafter\let\expandafter\@citeyear%
\csname b@\@citekey++YEAR\endcsname%
\ifx\@citeprevious\@empty%
Expand All @@ -640,7 +654,7 @@
% writing on aux file
\if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi%
% if undefined bibitem
\@ifundefined{b@\@citekey++IMPL}%
\@ifundefined{b@\@citekey++\ABNTciteparensuffix}%
{% if undefined
{\bfseries??}% echoing ?
\G@refundefinedtrue%
Expand All @@ -651,7 +665,7 @@
\ifx\@citename\@citeprevious%
{\yearstyle\@citeyear\@}\@%
\else%
{\authorcapstyle\@citename}, %
{\ABNTciteparenstylecmd\@citename}, %
{\yearstyle\@citeyear\@}%
\fi%
\let\@citeprevious\@citename%
Expand Down Expand Up @@ -966,7 +980,7 @@
%
% \citeauthor{list of keys}
%
% Implicit citation (capital letters)
% Author citation (parenthetical style)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Expand All @@ -980,11 +994,11 @@
\@for\@citekey:=#1\do %\@citekey contains the key
{%
% \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}%
\expandafter\let\expandafter\@citename\csname b@\@citekey++IMPL\endcsname%
\expandafter\let\expandafter\@citename\csname b@\@citekey++\ABNTciteparensuffix\endcsname%
% writing on aux file
\if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi%
% if undefined bibitem
\@ifundefined{b@\@citekey++IMPL}%
\@ifundefined{b@\@citekey++\ABNTciteparensuffix}%
{% if undefined
{\bfseries??}%
\G@refundefinedtrue%
Expand All @@ -998,7 +1012,7 @@
\else%
; % echoing "; "
\fi%
{\authorcapstyle\@citename\@}%
{\ABNTciteparenstylecmd\@citename\@}%
\fi%
\let\@citeprevious\@citename%
}%
Expand Down Expand Up @@ -1298,17 +1312,46 @@
}%
}

\newcommand{\apudname}{apud}
\newcommand{\Idemname}{Id.}
\newcommand{\Ibidemname}{Ibid.}
\newcommand{\opcitname}{op.\ cit.}
\newcommand{\passimname}{passim}
\newcommand{\loccitname}{loc.\ cit.}
\newcommand{\cfcitename}{Cf.}
\newcommand{\etseqname}{et seq.}

\DeclareRobustCommand{\footciteref}[1]{%
\footnote{\citetext{#1}}
\ifthenelse{\boolean{ABNTnbr10520v2023}}{%
\newcommand{\apudname}{\textit{apud}}%
\newcommand{\Idemname}{\textit{Id.}}%
\newcommand{\Ibidemname}{\textit{Ibid.}}%
\newcommand{\opcitname}{\textit{op.\ cit.}}%
\newcommand{\passimname}{\textit{passim}}%
\newcommand{\loccitname}{\textit{loc.\ cit.}}%
\newcommand{\cfcitename}{\textit{Cf.}}%
\newcommand{\etseqname}{\textit{et seq.}}%
}{%
\newcommand{\apudname}{apud}%
\newcommand{\Idemname}{Id.}%
\newcommand{\Ibidemname}{Ibid.}%
\newcommand{\opcitname}{op.\ cit.}%
\newcommand{\passimname}{passim}%
\newcommand{\loccitname}{loc.\ cit.}%
\newcommand{\cfcitename}{Cf.}%
\newcommand{\etseqname}{et seq.}%
}

% NBR 10520:2023 - reduced footnote references for subsequent citations
\newcommand{\ABNTlastfootcitekey}{}

\DeclareRobustCommand{\footciteref}[2][]{%
\ifthenelse{\boolean{ABNTnbr10520v2023}}{%
\@ifundefined{ABNTfootcited@#2}{%
\footnote{\citetext{#2}\ifthenelse{\equal{#1}{}}{}{, #1}}%
\expandafter\gdef\csname ABNTfootcited@#2\endcsname{}%
}{%
\ifthenelse{\equal{\ABNTlastfootcitekey}{#2}}{%
\footnote{\Ibidemname\ifthenelse{\equal{#1}{}}{}{, #1}}%
}{%
\footnote{\citeauthor{#2}, \citeyear{#2}%
\ifthenelse{\equal{#1}{}}{}{, #1}}%
}%
}%
\gdef\ABNTlastfootcitekey{#2}%
}{%
\footnote{\citetext{#2}\ifthenelse{\equal{#1}{}}{}{, #1}}%
}%
}

\newcommand{\apud}[3][]{(\citeauthor{#2}, \citeyear{#2} \apudname\ %
Expand Down