diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/abntex2/abntex2.cls | 660 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/abntex2/abntex2abrev.sty | 151 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/abntex2/abntex2cite.sty | 1358 |
3 files changed, 2169 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/abntex2/abntex2.cls b/Master/texmf-dist/tex/latex/abntex2/abntex2.cls new file mode 100644 index 00000000000..fc1bec15a52 --- /dev/null +++ b/Master/texmf-dist/tex/latex/abntex2/abntex2.cls @@ -0,0 +1,660 @@ +%% abntex2.cls +%% Copyright 2012-2013 by abnTeX2 group at http://code.google.com/p/abntex2/ +%% +%% 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 the abnTeX2 team, led +%% by Lauro César Araujo. Further information are available on +%% http://code.google.com/p/abntex2/ +%% +%% This work consists of the file abntex2.cls. + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Declaração da classe abntex2 como uma extensão da classe report +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{abntex2}[2013/02/01 v1.0 abnTeX2] + +% +% Repassa todos os parâmetros à report +% +\DeclareOption*{% + \PassOptionsToClass{\CurrentOption}{memoir}% +} +\ProcessOptions\relax +\LoadClass{memoir} + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Pacotes e customizações gerais do memoir +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Hifenação e caracteres especiais +% português-brasil e inglês +% --- +\RequirePackage[brazil]{babel} +\addto\captionsbrazil{% + \renewcommand{\bibname}{Refer\^encias} + \renewcommand{\indexname}{\'Indice} + \renewcommand{\listfigurename}{Lista de ilustra\c{c}\~{o}es} +} +% --- + +% --- +% Controla as referências internas do PDF +\RequirePackage{hyperref} +% --- + +% --- +% Controla os bookmarks do PDF +\RequirePackage{bookmark} +% --- + +% --- +% Customiza listas +\RequirePackage{enumitem} +% --- + +% --- +% Pacote de if/them/else +\RequirePackage{ifthen} +\newcommand{\abntex@ifnotempty}[2]{\ifthenelse{\not\equal{#1}{}}{#2}{}} +% --- + +% --- +% Pacote que permite realizar operacoes matematicas no codigo TeX +\RequirePackage{calc} +% --- + +% --- +% Margens - NBR 14724/2011 - 5.1 Formato +% --- +\setlrmarginsandblock{3cm}{2cm}{*} +\setulmarginsandblock{3cm}{2cm}{*} +\checkandfixthelayout +% --- + +% --- +% Espaçamento entre linhas - NBR 14724/2011 - 5.2 Espaçamento +% --- +\OnehalfSpacing +% --- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos públicos +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% ``Tamanho menor e uniforme'' ditada pela NBR 14724/2011 - 5.1 +% --- +\newcommand{\ABNTEXfontereduzida}{\footnotesize} +% --- + +% --- +% Nomes constantes +\newcommand{\folhaderostoname}{Folha de rosto} +\newcommand{\epigraphname}{Ep\'igrafe} +\newcommand{\dedicatorianame}{Dedicat\'oria} +\newcommand{\errataname}{Errata} +\newcommand{\agradecimentosname}{Agradecimentos} +\newcommand{\anexoname}{ANEXO} +\newcommand{\anexosname}{Anexos} +\newcommand{\apendicename}{AP\^ENDICE} +\newcommand{\apendicesname}{Ap\^endices} +\newcommand{\orientadorname}{Orientador:} +\newcommand{\coorientadorname}{Coorientador:} +\newcommand{\folhadeaprovacaoname}{Folha de aprova\c{c}\~ao} +% --- + +% --- +% abnTeX2 name +\newcommand{\abnTeX}{abn\TeX2} +% --- + +% --- +% Fontes padrões de part, chapter, section, subsection e subsubsection +\newcommand{\ABNTEXchapterfont}{\fontfamily{cmss}\fontseries{sbc}\selectfont} +\newcommand{\ABNTEXchapterfontsize}{\Huge} + +\newcommand{\ABNTEXpartfont}{\ABNTEXchapterfont} +\newcommand{\ABNTEXpartfontsize}{\ABNTEXchapterfontsize} + +\newcommand{\ABNTEXsectionfont}{\ABNTEXchapterfont} +\newcommand{\ABNTEXsectionfontsize}{\Large} + +\newcommand{\ABNTEXsubsectionfont}{\ABNTEXsectionfont} +\newcommand{\ABNTEXsubsectionfontsize}{\large} + +\newcommand{\ABNTEXsubsubsectionfont}{\ABNTEXsubsectionfont} +\newcommand{\ABNTEXsubsubsectionfontsize}{\normalsize} +% --- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos e variaveis privadas +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Comando para registro do bookmark interno +\newcounter{abntex@bookmarkcounter} +\setcounter{abntex@bookmarkcounter}{0} +\newcommand{\PRIVATEbookmarkthis}[1]{% + \addtocounter{abntex@bookmarkcounter}{1}% + \phantomsection\pdfbookmark[0]{#1}{chapterb\arabic{abntex@bookmarkcounter}} +} + +% --- +% Comando que cria capítulos não numerados já com bookmark anotado +% --- +\newcommand{\pretextualchapter}[1]{% + \addtocounter{abntex@bookmarkcounter}{1} + \PRIVATEbookmarkthis{#1} + \chapter*{#1} + } +\provideboolean{abntex@apendiceousecao} +\setboolean{abntex@apendiceousecao}{false} +% --- + + + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Configurações de layout +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Notas de rodapé - NBR 14724/2011 - 5.2.1 +\makeatletter +\renewcommand\@makefntext[1]{\leftskip=0.7cm\hskip-0.2cm\@makefnmark#1} +\makeatother +% --- + +% --- +% Numeração contínua das figuras +\counterwithout{figure}{chapter} +\counterwithout{table}{chapter} +% --- + +% --- +% Estilos de caption +\captiondelim{\space--\space} +% --- + +% ----- +% Configurações do TOC +% ----- +% nível de profundidade +\setsecnumdepth{subsubsection} +\settocdepth{subsubsection} %\maxtocdepth{subsubsection} + +% lista de ilustrações +\renewcommand{\cftfigurename}{\figurename\space} +%\renewcommand{\cftfigureaftersnum}{\space--\space} + +% lista de tabelas +\renewcommand{\cfttablename}{\tablename\space} +%\renewcommand{\cfttableaftersnum}{\space--\space} + +% espaços à esqueda para comportar os números romanos das partes +\newcommand{\ABNTEXtocitemnumberhspace}{0.2cm} +\addtolength\cftpartnumwidth{\ABNTEXtocitemnumberhspace} +\addtolength\cftchapternumwidth{\ABNTEXtocitemnumberhspace} +\addtolength\cftsectionindent{\ABNTEXtocitemnumberhspace} +\addtolength\cftsubsectionindent{\ABNTEXtocitemnumberhspace} +\addtolength\cftsubsubsectionindent{\ABNTEXtocitemnumberhspace} + +% fonte das partes e do captítulo do TOC +\renewcommand{\tocheadstart}{\ABNTEXchapterfont} +% ----- + +% --- +% Configuração dos títulos dos capítulos +% Novo estido do memoir +% ABNT NBR 14724-2011 - 5.2.2-5.2.4; ABNT NBR 6024-2003 - 3.1-3.8 +\provideboolean{abntex@innonumchapter} +\setboolean{abntex@innonumchapter}{true} +\makechapterstyle{abnt}{% + \newlength{\chapternamenumlength} + + % tamanhos de fontes de chapter e part + \renewcommand{\chaptitlefont}{\ABNTEXchapterfont\ABNTEXchapterfontsize} + \renewcommand{\chapnumfont}{\chaptitlefont} + \renewcommand{\parttitlefont}{\ABNTEXpartfont\ABNTEXpartfontsize} + \renewcommand{\partnumfont}{\ABNTEXpartfont\ABNTEXpartfontsize} + \renewcommand{\partnamefont}{\ABNTEXpartfont\ABNTEXpartfontsize} + + % tamanhos de fontes de section, subsection e subsubsection + \setsecheadstyle{\ABNTEXchapterfont\ABNTEXsectionfontsize} + \setsubsecheadstyle{\ABNTEXsubsectionfont\ABNTEXsubsectionfontsize} + \setsubsubsecheadstyle{\ABNTEXsubsubsectionfont\ABNTEXsubsubsectionfontsize} + + % impressao do numero do capitulo + \renewcommand{\chapternamenum}{} + + % impressao do nome do capitulo + \renewcommand{\printchaptername}{% + \chaptitlefont + \ifthenelse{\boolean{abntex@apendiceousecao}}{\appendixname}{}% + } + + % impressao do titulo do capitulo + \def\printchaptertitle##1{% + \chaptitlefont% + \ifthenelse{\boolean{abntex@innonumchapter}}{\centering##1}{% else + \settowidth{\chapternamenumlength}{\printchaptername\printchapternum\afterchapternum}% + \parbox[t]{\textwidth-\chapternamenumlength}{##1}% + } + } + + % impressao do numero do capitulo + \renewcommand{\printchapternum}{% + \setboolean{abntex@innonumchapter}{false} + \chapnumfont% + \space\thechapter\space% + \ifthenelse{\boolean{abntex@apendiceousecao}}{% + --\space% + }{} % else + } + \renewcommand{\afterchapternum}{} + \renewcommand{\beforechapskip}{0cm} + + % impressao do capitulo nao numerado + \renewcommand\printchapternonum{% + \setboolean{abntex@innonumchapter}{true}% + } +} +\chapterstyle{abnt} +% --- + +% ----- +% Declarações de cabeçalhos e de rodapé +% ----- +% Cabeçalho padrão +\makepagestyle{abntheadings} +\makeevenhead{abntheadings}{\ABNTEXfontereduzida\thepage}{}{\ABNTEXfontereduzida\textit\leftmark} +\makeoddhead{abntheadings}{\ABNTEXfontereduzida\textit\rightmark}{}{\ABNTEXfontereduzida\thepage} +\makeheadrule{abntheadings}{\textwidth}{\normalrulethickness} + +% Cabeçalho do início do capítulo +\makepagestyle{abntchapfirst} +\makeoddhead{abntchapfirst}{}{}{\ABNTEXfontereduzida\thepage} +% --- + +% --- +% Configura layout para elementos pré-textuais +\newcommand{\pretextual}{% + \aliaspagestyle{chapter}{empty}% customizing chapter pagestyle + \pagestyle{empty} + \aliaspagestyle{cleared}{empty} + \aliaspagestyle{part}{empty} +} +\renewcommand{\frontmatter}{\pretextual} + +% por default, inicializa o documento com elementos \pretextuais +\AtBeginDocument{\frontmatter} +% --- + +% --- +% Configura layout para elementos textuais +\newcommand{\textual}{% + \pagestyle{abntheadings} + \aliaspagestyle{chapter}{abntchapfirst}% customizing chapter pagestyle + \nouppercaseheads +} +\renewcommand{\mainmatter}{\textual} +% --- + +% --- +% Configura layout para elementos pós-textuais +\newcommand{\postextual}{} +\renewcommand{\backmatter}{\postextual} +% ----- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos de dados para CAPA e FOLHA DE ROSTO +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% Comandos de dados - título do documento +\providecommand{\imprimirtitulo}{} +\newcommand{\titulo}[1]{\renewcommand{\imprimirtitulo}{#1}} + +% Comandos de dados - autor (use \and para múltiplos autores) +\providecommand{\imprimirautor}{} +\newcommand{\autor}[1]{\renewcommand{\imprimirautor}{#1}} + +% Comandos de dados - data +\providecommand{\imprimirdata}{} +\newcommand{\data}[1]{\renewcommand{\imprimirdata}{#1}\date{#1}} + +% Comandos de dados - instituição +\providecommand{\imprimirinstituicao}{} +\newcommand{\instituicao}[1]{\renewcommand{\imprimirinstituicao}{#1}} + +% Comandos de dados - local +\providecommand{\imprimirlocal}{} +\newcommand{\local}[1]{\renewcommand{\imprimirlocal}{#1}} + +% Comandos de dados - preâmbulo +\providecommand{\imprimirpreambulo}{} +\newcommand{\preambulo}[1]{\renewcommand{\imprimirpreambulo}{#1}} + +% Comandos de dados - orientador +\providecommand{\imprimirorientadorRotulo}{} +\providecommand{\imprimirorientador}{} +\newcommand{\orientador}[2][\orientadorname]% + {\renewcommand{\imprimirorientadorRotulo}{#1}% + \renewcommand{\imprimirorientador}{#2}} + +% Comandos de dados - coorientador +\providecommand{\imprimircoorientadorRotulo}{} +\providecommand{\imprimircoorientador}{} +\newcommand{\coorientador}[2][\coorientadorname]% + {\renewcommand{\imprimircoorientadorRotulo}{#1}% + \renewcommand{\imprimircoorientador}{#2}} + +% Comandos de dados - tipo de trabalho +\providecommand{\imprimirtipotrabalho}{} +\newcommand{\tipotrabalho}[1]{\renewcommand{\imprimirtipotrabalho}{#1}} + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos e ambientes de editoração PRÉ-TEXTUAIS +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Ambiente para definição da Capa +\newenvironment{capa}{\begin{titlingpage}}{\end{titlingpage}\cleardoublepage} +% --- + +% --- +% Ficha catalográfica (Dados internacionais de +% catalogação-na-publicação) +\newenvironment{fichacatalografica}{% + \thispagestyle{empty} + \begin{SingleSpacing} + \ABNTEXfontereduzida +}{% + \end{SingleSpacing}% +}% +% --- + +% --- +% Errata +\newenvironment{errata}[1][\errataname]{% + \pretextualchapter{#1} + }{\cleardoublepage} +% --- + +% --- +% Folha de aprovação - NBR 14724/2011 - 4.2.1.3 +\newenvironment{folhadeaprovacao}[1][\folhadeaprovacaoname]{% + \clearpage% + \PRIVATEbookmarkthis{#1}% + \begin{Spacing}{1.0} +}{\end{Spacing}\cleardoublepage} +% --- + +% --- +% Dedicatória +\newenvironment{dedicatoria}[1][]{% + \ifthenelse{\equal{#1}{}}{% + \PRIVATEbookmarkthis{\dedicatorianame} + }{\pretextualchapter{#1}} + }{\cleardoublepage} +% --- + +% --- +% Agradecimentos +\newenvironment{agradecimentos}[1][\agradecimentosname]{% + \pretextualchapter{#1} + }{\cleardoublepage} +% --- + +% --- +% Epigrafe +\newenvironment{epigrafe}[1][]{% + \ifthenelse{\equal{#1}{}}{% + \PRIVATEbookmarkthis{\epigraphname} + }{\pretextualchapter{#1}} + }{\cleardoublepage} +% --- + +% --- +% Resumo e abstracts em diferentes idiomas - NBR 14724/2011 +\newenvironment{resumo}[1][\abstractname]{% + \SingleSpacing + \pretextualchapter{#1} + }{\cleardoublepage} +% --- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos e ambientes de editoração APENDICES e ANEXOS +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Definicoes compartilhadas entre Apendices e Anexos +% --- +\makeatletter +\newcommand\@switch[1]{ \@writefile{toc}{\renewcommand*{\cftappendixname}{#1 \space}} } +\newcommand{\switchchapname}[1]{ \protected@write \@auxout {}{\string\@switch{#1} }} +\makeatother + +\newcommand{\PRIVATEapendiceconfig}[2]{% + \setboolean{abntex@apendiceousecao}{true}% + \renewcommand{\appendixname}{#1} + \renewcommand{\appendixpagename}{#2} + \renewcommand{\appendixtocname}{#2} + + \switchchapname{#1}% Corrected from \switchapname -> \switchchapname + \renewcommand*{\cftappendixname}{#1 \space} +} +% --- + +% --- +% Apendices - comando +\newcommand{\apendices}{% + \PRIVATEapendiceconfig{\apendicename}{\apendicesname} + \appendix +} +% Apendices - ambiente +\newenvironment{apendicesenv}{% + \PRIVATEapendiceconfig{\apendicename}{\apendicesname} + \begin{appendix} +}{ + \end{appendix} + \setboolean{abntex@apendiceousecao}{false} +} +% --- + +% --- +% Anexos - comando +\newcommand{\anexos}{% + \PRIVATEapendiceconfig{\anexoname}{\anexosname} + \appendix + \renewcommand\theHchapter{anexochapback.\arabic{chapter}} +} +% Anexos - ambiente +\newenvironment{anexosenv}{% + \PRIVATEapendiceconfig{\anexoname}{\anexosname} + \begin{appendix} + \renewcommand\theHchapter{anexochapback.\arabic{chapter}} +}{ + \end{appendix} + \setboolean{abntex@apendiceousecao}{false} +} +% --- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% Comandos e ambientes de editoração CITACAO, ALINEA, INCISO, ASSINATURA +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Citacao direta com mais de 3 linhas - ABNT NBR 10520/2002 - 5.3 +\newenvironment*{citacao}[1][]{% + \begin{SingleSpace}% + \ABNTEXfontereduzida% + \addtolength{\leftskip}{4cm}% % recuo de 4 cm da margem esquerda + \noindent% + }{% + \normalsize% + \end{SingleSpace}} +% --- + +% --- +% Ambiente para alineas e e subalineas (incisos) +% ABNT NBR 6024/2012 - 4.2 e 4.3 +\newlist{alineas}{enumerate}{2} +\setlist[alineas,1]{label={\alph*)},topsep=0pt,itemsep=0pt,leftmargin=\parindent+\labelwidth-\labelsep}% +\setlist[alineas,2]{label={---},topsep=0pt,itemsep=0pt,leftmargin=*} +\newlist{subalineas}{enumerate}{1} +\setlist[subalineas,1]{label={---},topsep=0pt,itemsep=0pt,leftmargin=*}% +\newlist{incisos}{enumerate}{1} +\setlist[incisos,1]{label={---},topsep=0pt,itemsep=0pt,leftmargin=*}% +% --- + +% --- +% Comando \assinatura for signature + % width of the line and text under the line +\newlength{\ABNTEXsignwidth} +\setlength{\ABNTEXsignwidth}{8cm} + % thickness of the line +\newlength{\ABNTEXsignthickness} +\setlength{\ABNTEXsignthickness}{1pt} + % ammount of space left between previous text and th signature line +\newlength{\ABNTEXsignskip} +\setlength{\ABNTEXsignskip}{1cm} + % \assinatura{name} -> types a line with name under the line, centralized + % \assinatura*{name} -> Creates the box with the line and name under + % it, but the box has no position assigned. However the line and the + % name are centralized with respect to each other. +\makeatletter +\newcommand{\assinatura}{\@ifstar{\ABNTEXsign}{\ABNTEXcsign}} +\makeatother + % assinatura com estrela +\newcommand{\ABNTEXsign}[1]{% + \parbox[t]{\ABNTEXsignwidth}{\SingleSpacing\vspace*{\ABNTEXsignskip}\centering% + \rule{\ABNTEXsignwidth}{\ABNTEXsignthickness}\\% + \nopagebreak #1\par}% +} + % assinatura sem estrela +\newcommand{\ABNTEXcsign}[1]% + {\begingroup\par\centering\ABNTEXsign{#1}\par\endgroup} +% --- + +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ +% IMPRESSOES PADROES DE CAPA E FOLHA DE ROSTO +% ------------------------------------------------------------------------ +% ------------------------------------------------------------------------ + +% --- +% Impressão da Capa +\newcommand{\imprimircapa}{% + \begin{capa}% + \center + \vspace*{1cm} + {\ABNTEXchapterfont\large\imprimirautor} + + \vspace*{\fill} + {\ABNTEXchapterfont\LARGE\imprimirtitulo} + \vspace*{\fill} + + {\large\imprimirlocal} + \par + {\large\imprimirdata} + + \vspace*{1cm} + \end{capa} +} +% --- + + +% --- +% Folha de rosto +% usar \imprimirfolhaderosto* casodeseje imprimir algo no verso da +% página no caso de estar no modo twoside. Útil para imprimir a Ficha +% Bibliográfica. Porém, se estiver no modo oneside, a versão sem estrela +% é idêntica. +\newenvironment{folhaderosto}[1][\folhaderostoname]{\clearpage\PRIVATEbookmarkthis{#1}}{\cleardoublepage} +\newenvironment{folhaderosto*}[1][\folhaderostoname]{\clearpage\PRIVATEbookmarkthis{#1}}{\newpage}% + +% --- +% Conteudo padrao da Folha de Rosto +\makeatletter +\newcommand{\folhaderostocontent}{ + \begin{center} + + \vspace*{1cm} + {\ABNTEXchapterfont\large\imprimirautor} + + \vspace*{\fill}\vspace*{\fill} + {\ABNTEXchapterfont\Large\imprimirtitulo} + \vspace*{\fill} + + \abntex@ifnotempty{\imprimirpreambulo}{% + \hspace{.45\textwidth} + \begin{minipage}{.5\textwidth} + \SingleSpacing + \imprimirpreambulo + \end{minipage}% + \vspace*{\fill} + }% + + {\large\imprimirorientadorRotulo~\imprimirorientador\par} + \abntex@ifnotempty{\imprimircoorientador}{% + {\large\imprimircoorientadorRotulo~\imprimircoorientador}% + }% + \vspace*{\fill} + + {\abntex@ifnotempty{\imprimirinstituicao}{\imprimirinstituicao\vspace*{\fill}}} + + {\large\imprimirlocal} + \par + {\large\imprimirdata} + \vspace*{1cm} + + \end{center} +} +\makeatother + +\newcommand{\imprimirfolhaderostostar}[1]{% + \begin{folhaderosto*}{#1} + \folhaderostocontent + \end{folhaderosto*}} + +\newcommand{\imprimirfolhaderostonostar}[1]{% + \begin{folhaderosto}{#1} + \folhaderostocontent + \end{folhaderosto}} + +\makeatletter +\newcommand{\imprimirfolhaderosto}[1][\folhaderostoname]{% + \@ifstar + \imprimirfolhaderostostar + \imprimirfolhaderostonostar +} +\makeatother +% ---
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/abntex2/abntex2abrev.sty b/Master/texmf-dist/tex/latex/abntex2/abntex2abrev.sty new file mode 100644 index 00000000000..063f8026a20 --- /dev/null +++ b/Master/texmf-dist/tex/latex/abntex2/abntex2abrev.sty @@ -0,0 +1,151 @@ +%% abntex2abrev.sty, v 1.0 2013/01/01 laurocesar +%% Copyright 2012-2013 by abnTeX2 group at http://code.google.com/p/abntex2/ +%% +%% 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 the abnTeX2 team, led +%% by Lauro César Araujo. Further information are available on +%% http://code.google.com/p/abntex2/ +%% +%% Creator and original mantainer: Gerald Weber <gweber@codigolivre.org.br> +%% Copyright 2003 by the abnTeX group at http://abntex.codigolivre.org.br +%% +%% +%% Revision history: +%% +%% 2012/12/12 22h22 laurocesar +%% Fork of the version v 1.3 2003/10/13 09:41:21 gweber created by gweber +%% Change file name to from abntex-abrev.sty to abntex2abrev.sty +%% Removed CVS revision automation +%% Incorporating file nbr10522-1988.def from abntex1 (the NBR 10522:1988 was +%% canceled in 2003) +%% +%% The original revision history is the following: +%% +%% $Log: abntex-abrev.sty,v $ +%% Revision 1.3 2003/10/13 09:41:21 gweber +%% Passa a usar cvs-id.def para gerar informações sobre data e versão. +%% +%% Revision 1.2 2003/10/10 10:08:09 gweber +%% Passa a usar cvs-id.def para gerar informações sobre data e versão. +%% +%% Revision 1.1 2003/06/27 13:49:21 gweber +%% Estilo principal que implementa abreviações para o projeto abntex. +%% O arquivo pode ser usado sozinho ou em conjunto com classes e estilos bibliográficos. +%% Ele carrega um aquivo com traduções portugês-inglês abntex-abrev-pt_BR.def e um arquivo +%% com as definições da norma 10522/1988. +%% + + +\NeedsTeXFormat{LaTeX2e} + +\RequirePackage{ifthen} + +\newcommand{\NoAbrevending}{\let\Abrevending\@empty} + +% Incorporating file nbr10522-1988.def from abntex1 +\newcommand{\@NBR@A@abril}{abr} +\newcommand{\@NBR@A@acompanhamento}{acomp} +\newcommand{\@NBR@A@adaptacao}{adapt} +\newcommand{\@NBR@A@adaptado}{adapt} +\newcommand{\@NBR@A@adaptada}{adapt} +\newcommand{\@NBR@A@adaptador}{adapt} +\newcommand{\@NBR@A@adaptadora}{adapt} +\newcommand{\@NBR@A@agosto}{ago} +\newcommand{\@NBR@A@ampliado}{ampl} +\newcommand{\@NBR@A@ampliada}{ampl} +\newcommand{\@NBR@A@capitulo}{cap} +\newcommand{\@NBR@A@capitulos}{cap} +\newcommand{\@NBR@A@citacao}{cit} +\newcommand{\@NBR@A@edicao}{ed} +\newcommand{\@NBR@A@editado}{ed} +\newcommand{\@NBR@A@editada}{ed} +\newcommand{\@NBR@A@editor}{ed} +\newcommand{\@NBR@A@editora}{ed} +\newcommand{\@NBR@A@fevereiro}{fev} +\newcommand{\@NBR@A@dezembro}{dez} +\newcommand{\@NBR@A@ilustracao}{il} +\newcommand{\@NBR@A@ilustrado}{il} +\newcommand{\@NBR@A@ilustrada}{il} +\newcommand{\@NBR@A@ilustrador}{il} +\newcommand{\@NBR@A@ilustradora}{il} +\newcommand{\@NBR@A@janeiro}{jan} +\newcommand{\@NBR@A@junho}{jun} +\newcommand{\@NBR@A@julho}{jul} +\newcommand{\@NBR@A@marco}{mar} +\newcommand{\@NBR@A@maio}{maio\NoAbrevending} +\newcommand{\@NBR@A@novembro}{nov} +\newcommand{\@NBR@A@outubro}{out} +\newcommand{\@NBR@A@oeste}{O\NoAbrevending} +\newcommand{\@NBR@A@setembro}{set} +\newcommand{\@NBR@A@pagina}{p} +% end of nbr10522-1988.def + +\newcommand{\@NBR}{@NBR@A@} +\newcommand{\@PREF@}[1]{\csname \@NBR#1\endcsname} + +% Incorporating file abntex-abrev-pt_BR.def from abntex1 +\providecommand{\@PREF@}{} +\newcommand{\@TR@adaptation}{\@PREF@{adaptacao}} +\newcommand{\@TR@adapted}{\@PREF@{adaptado}} +\newcommand{\@TR@adapter}{\@PREF@{adaptador}} +\newcommand{\@TR@april}{\@PREF@{abril}} +\newcommand{\@TR@august}{\@PREF@{agosto}} +\newcommand{\@TR@chapter}{\@PREF@{capitulo}} +\newcommand{\@TR@chapters}{\@PREF@{capitulos}} +\newcommand{\@TR@citation}{\@PREF@{citacao}} +\newcommand{\@TR@extended}{\@PREF@{ampliado}} +\newcommand{\@TR@edited}{\@PREF@{editado}} +\newcommand{\@TR@edition}{\@PREF@{edicao}} +\newcommand{\@TR@editor}{\@PREF@{editor}} +\newcommand{\@TR@february}{\@PREF@{fevereiro}} +\newcommand{\@TR@december}{\@PREF@{dezembro}} +\newcommand{\@TR@illustrated}{\@PREF@{ilustrado}} +\newcommand{\@TR@illustration}{\@PREF@{ilustracao}} +\newcommand{\@TR@illustrator}{\@PREF@{ilustrador}} +\newcommand{\@TR@january}{\@PREF@{janeiro}} +\newcommand{\@TR@june}{\@PREF@{junho}} +\newcommand{\@TR@jule}{\@PREF@{julho}} +\newcommand{\@TR@march}{\@PREF@{marco}} +\newcommand{\@TR@may}{\@PREF@{maio}} +\newcommand{\@TR@november}{\@PREF@{novembro}} +\newcommand{\@TR@october}{\@PREF@{outubro}} +\newcommand{\@TR@september}{\@PREF@{setembro}} +\newcommand{\@TR@west}{\@PREF@{oeste}} +\newcommand{\@TR@page}{\@PREF@{pagina}} +% end of abntex-abrev-pt_BR.def + + +\ProcessOptions + +\newcommand{\@TR@}{@TR@} +\newcommand{\Capitalize}[1]{\uppercase{#1}} + +%para testar, coloca os resultados em forma mais explícita +\newcommand{\TESTabrev}[1]{% +\@ifundefined{@TR@#1}{pt(#1):\csname \@NBR#1\endcsname}{en(#1):\csname \@TR@#1\endcsname}} + +%controla como termina a abreviação +\newcommand{\abrevending}{.} +\newcommand{\Abrevending}{} +%comando para usuários, pode ser portugês ou inglês +\newcommand{\abrev}[1]{\let\Abrevending\abrevending% +\@ifundefined{@TR@#1}{\csname \@NBR#1\endcsname\Abrevending}{\csname \@TR@#1\endcsname\Abrevending}} + +%comando para usuários, pode ser portugês ou inglês +\newcommand{\Abrev}[1]{\expandafter\Capitalize\abrev{#1}} + +%comando para desenvolvedores, só inglês sem finalização, ou seja sem ponto +\newcommand{\ABNTEXabrev}[1]{\@ifundefined{@TR@#1}{#1}{\csname \@TR@#1\endcsname}} + +%comando para desenvolvedores, só inglês com finalização, ou seja com ponto +\newcommand{\ABNTEXabrevp}[1]{\let\Abrevending\abrevending +\ABNTEXabrev{#1}\Abrevending}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/abntex2/abntex2cite.sty b/Master/texmf-dist/tex/latex/abntex2/abntex2cite.sty new file mode 100644 index 00000000000..09a140b121a --- /dev/null +++ b/Master/texmf-dist/tex/latex/abntex2/abntex2cite.sty @@ -0,0 +1,1358 @@ +%% abntex2cite.sty, v 1.0 2013/01/01 laurocesar +%% Copyright 2012-2013 by abnTeX2 group at http://code.google.com/p/abntex2/ +%% +%% 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 the abnTeX2 team, led +%% by Lauro César Araujo. Further information are available on +%% http://code.google.com/p/abntex2/ +%% +%% Creator and original mantainer: Gerald Weber <gweber@codigolivre.org.br> +%% Copyright 2001-2002 by the abnTeX group at http://abntex.codigolivre.org.br +%% +%% +%% Revision history: +%% +%% 2012/12/13 22h31 laurocesar +%% Fork of the version v 1.26 2003/10/13 09:40:41 gweber created by gweber +%% Changed file name to from abntcite.sty to abntex2cite.sty +%% Removed CVS revision automation +%% Changed referentes of abnt-options.bib to abntex2-options.bib +%% +%% The original revision history is the following: +%% +%% 2012/04/26 20h20 laurocesar +%% Incluída as contribuições de compatibilização com o pacote backref de +%% Alan Wilter Sousa da Silva (AWSS), desenvolvida em 2005-06-26 23:13:59 GMT +%% http://comments.gmane.org/gmane.comp.tex.brazilian/11158 +%% http://mtc-m18.sid.inpe.br/col/sid.inpe.br/iris@1905/2005/08.25.14.01/doc/abntcite.sty +%% +%% $Log: abntcite.sty,v $ +%% Revision 1.26 2003/10/13 09:40:41 gweber +%% Passa a usar cvs-id.def para gerar informações sobre data e versão. +%% +%% Revision 1.25 2003/10/10 16:42:51 gweber +%% Passa a usar cvs-id.def para gerar informações sobre data e versão. +%% +%% Revision 1.24 2003/10/07 16:21:55 gweber +%% Informação sobre o pacote (comando \ProvidesPackage) automáticamente atualizado via +%% CVS Id tags. +%% +%% Revision 1.23 2003/09/16 12:13:16 gweber +%% A partir desta versão abntcite carrega os arquivos nbr10520-*.def com as definições +%% espeçificas destas normas. Esta alteração cumpre em parte a tarefa 931. +%% +%% Revision 1.22 2003/07/22 16:38:32 gweber +%% Implementada a aopção abnt-substyle=COPPE que ativa a opção de mesmo nome em +%% abnt-option.bib e define o comando \bibtextitlecommand de acordo. +%% +%% Revision 1.21 2003/06/05 14:48:12 gweber +%% Citations are now treated correctly if hyperref is loaded. This solves bugs 51 and 82 +%% which are now closed. +%% +%% Revision 1.20 2003/06/04 13:42:10 gweber +%% The presence of the package hyperref is now autodetected and +%% the citeoption abnt-url-package=hyperref is loaded. In this way +%% whenever the user loads hyperref all url's given in the bibliografic +%% database are shown as links and can be navigated to. Note that +%% running as pdflatex loads hyperref also. +%% +%% Revision 1.19 2003/04/10 11:29:46 gweber +%% \citenumstyle redefined to \relax instead of \large. According to +%% the norm 6023/2000 the number label in the bibliography list is +%% of the same font size as the remaining entry. +%% +%% Revision 1.18 2003/04/08 00:38:43 gweber +%% further commands \loccit, \passim, \etseq and new behaviour of \citeauthor for num +%% +%% Revision 1.17 2003/04/07 12:22:55 gweber +%% The command \hiddenbibitem was implemented. It creates an entry which +%% does not appear in the bibliography list but creates all necessary keys +%% for citation. This is for use with the new \apud and \apudonline commands. +%% Further new commands: \Idem, \Ibidem, \opcit, \cfcite. +%% +%% + +% How this package is organized: +% ------------------------------ +% - Implementing `search for substring' +% - \AfterTheBibliography{} hook +% - Options declaration (search for substring needed here) +% alf, num (default) +% alfantigo, experimental (default) +% biblabel-on-margin +% sem-bibtex (apply settings without count with code in .bbl) +% no-abnt-option-file (in case one defines its own options file) +% recuo (then makes bibitem indent 1.8em) (default: NO indentation) +% recuo=<length> (sets custom indentation) +% indent is an alias for recuo (indent or indent=<length>) +% other options are considered "\citeoption's" (mechanism includes a +% list that stores non defined options, and in \AtBeginDocument, +% \citeoption acts over this list) +% - allocing auxiliar variables +% - \citeoption +% Similar to \nocite, but does not complain about obviously not defined +% citations. Intented to access options of abnTeX's bibtex styles. +% - \bibliography +% extra care to auto include abnt-options as bibliography database (if +% needed) +% - \bibliographystyle +% if none is given, the style correspondent to the package style in +% use (alf or num) is given. +% - Style customization +% \authorcapstyle, \authorstyle, \yearstyle, \optionaltextstyle +% (detail: \authorcapstyle's default setting uses \smaller from relsize +% package, but only if package is present.) +% - \bibitem +% defines action of \bibitem by its subcommands. Comatibility with old +% abnt-alf is present. +% - \hiddenbibitem +% creates an empty bibliography entry buts creates all labels. +% - \abntrefinfo +% From the creation of abntcite, options are present as a separated +% command. This enables compatibility with any bibtex style. +% +% - \cite +% This command depends on if the style is alf or num +% If alf, then \cite produces (<explicit (capital)>, <year>) +% If num, then \cite produces a superscript with [<implicit (lowercase)>] +% - \citeonline +% This command depends on if the style is alf or num +% If alf, \citeonline produces <implicit (lowercase)>, (<year>) +% If num, \citeonline then produces <implicit (lowercase)> +% - \citeyear +% Produces <year> +% - \citeauthor +% Produces <explicit (capital) author> +% - \citeauthoronline +% Produces <implicit (lowercase) author> +% - \apud[comments]{First}{Second} +% Produces a double citation: (FIRST, YEAR apud SECOND, YEAR<, comments>) +% - \apudonline[comments]{First]{Second] +% Produces a double citation: First (apud SECOND, YEAR<, comments>) +% - \Idem[comments]{Author} +% Produces: Id., YEAR<, comments> +% - \Ibidem[comments]{Author} +% Produces: Ibid.<, comments> +% - \opcit[comments]{Author} +% Produces: AUTHOR, op. cit.<, comments> +% - \cfcite[comments]{Author} +% Produces: Cf. AUTHOR, YEAR<, comments> +% +% - implementing `recuo' (bibindent style) +% - Macros for output sorted and compressed numerical citations +% [9,2,3,1,4,11,7,10] becames [1--4,7,9--11] + +\NeedsTeXFormat{LaTeX2e} +%\input{cvs-id.def} +%\CVSExtract$Id: abntcite.sty,v 1.26 2003/10/13 09:40:41 gweber Exp $ +%\CVSPackage{abntcite}{\space Chamadas de referencias no texto (NBR10520)} %substitui \ProvidesPackage (replaces \ProvidesPackage) + +\RequirePackage{ifthen} +\RequirePackage{calc} +\RequirePackage{abntex2abrev} + +%%%%%% Options Declaration %%%%%% + + +%---------------------------------------------------------------- +% Extracted from substr.sty (2000-06-15) +%---------------------------------------------------------------- +% Copyright 2000 Harald Harders <h.harders@tu-bs.de> +% Look at www.ctan.org for original package +% +% Commands: +% +% \IfSubStringInString{substring}{string}{true part}{false part} +% This command searches <substring> in <string> and executes the +% <true part> if it is and else the <else part> + +% expands the first and second argument with +% \protected@edef and calls #3 with them: +\newcommand{\su@ExpandTwoArgs}[3]{% + \protected@edef\su@SubString{#1}% + \protected@edef\su@String{#2}% + \expandafter\expandafter\expandafter#3% + \expandafter\expandafter\expandafter{% + \expandafter\su@SubString\expandafter + }\expandafter{\su@String}% +} +%% +%% tests if #1 in #2. If yes execute #3, else #4 +\newcommand*{\IfSubStringInString}[2]{% + \su@ExpandTwoArgs{#1}{#2}\su@IfSubStringInString +} +%% +\newcommand*{\su@IfSubStringInString}[2]{% + \def\su@compare##1#1##2\@nil{% + \def\su@param{##2}% + \ifx\su@param\@empty + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + }% + \su@compare#2#1\@nil +} + +%---------------------------------------------------------------- + + +% alf, num: main options +\newboolean{ABCItextondemand} + +\DeclareOption{alf}{\def\AbntCitetype{alf}\setboolean{ABCItextondemand}{true}} +\DeclareOption{num}{\def\AbntCitetype{num}} +\ExecuteOptions{num} + +% references on page foot +\newboolean{ABCIfoot} +\DeclareOption{foot}{\setboolean{ABCIfoot}{true}% + \setboolean{ABCItextondemand}{false}} +\DeclareOption{not-foot}{\setboolean{ABCIfoot}{false}% + \setboolean{ABCItextondemand}{true}} +\ExecuteOptions{not-foot} + +% cite text on demand (defaults depends on foot or not-foot) +% (also recall that options are executed in order of definition at +% \ProcessOptions) +\DeclareOption{load-text-on-demand}{\setboolean{ABCItextondemand}{true}} +\DeclareOption{load-text}{\setboolean{ABCItextondemand}{false}} + +% compatibility with old abnt-alf.bst +\newboolean{ABCIcompoldalf} +\DeclareOption{alfantigo}{\setboolean{ABCIcompoldalf}{true}} +\DeclareOption{experimental}{\setboolean{ABCIcompoldalf}{false}} +\ExecuteOptions{experimental} + +% biblabel-on-margin +\newboolean{ABCIbibjustif} +\DeclareOption{bibjustif}{\setboolean{ABCIbibjustif}{true}} +\DeclareOption{bibleftalign}{\setboolean{ABCIbibjustif}{false}} +\ExecuteOptions{bibleftalign} + +% biblabel-on-margin +\newboolean{ABCIbiblabelonmargin} +\DeclareOption{biblabel-on-margin} + {\setboolean{ABCIbiblabelonmargin}{true}} +\DeclareOption{biblabel-not-on-margin} + {\setboolean{ABCIbiblabelonmargin}{false}} +\ExecuteOptions{biblabel-not-on-margin} + +% \bibliography includes abnt-options automatically unless next option is used +\newboolean{ABCIauto-abntoptions} +\DeclareOption{abnt-option-file}{\setboolean{ABCIauto-abntoptions}{true}} +\DeclareOption{no-abnt-option-file}{\setboolean{ABCIauto-abntoptions}{false}} +\ExecuteOptions{abnt-option-file} + +% recuo : compatibility with old norms +\setlength{\bibindent}{0em} +\DeclareOption{recuo}{\setlength{\bibindent}{1.8em}} + +% indent : an alias to recuo +\DeclareOption{indent}{\setlength{\bibindent}{1.8em}} + +\newcommand{\citebrackets}[2]{\def\citeopen{#1}\def\citeclose{#2}} +\newcommand{\setcitebrackets}{\citebrackets()} +% 10520:2002 now defines only two numerical styles +\newboolean{ABNTovercite} +\DeclareOption{overcite}{\setboolean{ABNTovercite}{true}} +\DeclareOption{inlinecite}{\setboolean{ABNTovercite}{false}} + + +% 10520:2002 does not allow (XX) or [XX] for superscript cites +\newboolean{ABNTstrictnumformat} + +% Incorpora o arquivo nbr10520-2002.def do abntex1 +% A norma NBR 10520:2002 removeu as opções [] e () para citações +% em superscrito +\ifx\AbntCitetype\AbntCitetypeALF +\else +\renewcommand{\setcitebrackets}{ +\ifthenelse{\boolean{ABNTovercite}}{\citebrackets{}{}}{\citebrackets()}} +\fi + +% +% Allocing variables +% + +% used for \@biblabel in num +\newlength{\minimumbiblabelwidth} +\newlength{\ABCIauxlen} + +% auxiliar counters used in `sort and group' mechanism +\newcounter{ABCIaux} +\newcounter{ABCImax} + +% Here I define a LaTeX list that will contain all options not defined +% before. +% +% A LaTeX list is a command containing a comma separated list of +% itens. The list is processed by command \@for, as in \citeoption. +\def\citeoptionlist{} +% This command adds a string to the list. +\newcommand{\addtociteoptionlist}[1]{ + \ifthenelse{\equal{\citeoptionlist}{}} + {\edef\citeoptionlist{#1}} + {\edef\citeoptionlist{\citeoptionlist,#1}} +} + + +% suporting options in a keyval style +% recuo=<length> gives indentation of \bibitem +% other options: passed thought \citeoption (stored now in \citeoptionlist +% and after (in \AtBeginDocument hook) \citeoption will act on it) + +% To grab 6 letters. (recuo=) +\newcommand{\grabsix}[6]{} + +% To grab 7 letters. (indent=) +\newcommand{\grabseven}[7]{} + +\DeclareOption{abnt-substyle=COPPE} + {\newcommand{\bibtextitlecommand}[2]{``#2''}% + \addtociteoptionlist{abnt-substyle=COPPE}} + +\DeclareOption*{ + \IfSubStringInString{recuo=}{\CurrentOption} + {\setlength{\bibindent}{\expandafter\grabsix\CurrentOption}} + {\IfSubStringInString{indent=}{\CurrentOption} + {\setlength{\bibindent}{\expandafter\grabseven\CurrentOption}} + {\addtociteoptionlist{\CurrentOption}}} +} + +\provideboolean{ABNThyperref} + +\@ifpackageloaded{hyperref}{% +\addtociteoptionlist{abnt-url-package=hyperref} +\setboolean{ABNThyperref}{true} +}{\setboolean{ABNThyperref}{false}} + +\provideboolean{ABNTbackref} %By AWSS + +\@ifpackageloaded{backref}{% %By AWSS +\setboolean{ABNTbackref}{true} %By AWSS +}{\setboolean{ABNTbackref}{false}} %By AWSS + +\ProcessOptions + +% really foot? +\ifthenelse{\boolean{ABCIfoot}\and\equal{\AbntCitetype}{num}} + {\setboolean{ABCIfoot}{true}} + {\setboolean{ABCIfoot}{false}} + +% Now, after all options are processed, \citeoption process the list of +% options given as package options. +% +\ifthenelse{\equal{\citeoptionlist}{}} + {} + {\AtBeginDocument{\citeoption{\citeoptionlist}}} + + +% \citeoption - equal to \nocite (I copied source from \nocite) +% but not complains about this option be obviously undefined +\newboolean{ABCIciteoptionwasused} +\setboolean{ABCIciteoptionwasused}{false} +\def\citeoption#1{\@bsphack + \@for\@citekey:=#1\do{% + % next line eliminates white space before citation name + \edef\@citekey{\expandafter\@firstofone\@citekey}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi + }% + \@esphack% + \setboolean{ABCIciteoptionwasused}{true}% +} + + +% +% \bibliography{list of files .bib to be processed by bibTeX} +% +% I had to redefine this command such that abnt-options.bib is +% automatically used in case that some \citeoption was given as package +% option. An entry +% \bibliography{abnt-options,abnt-options,..} +% produces an error in bibTeX. So I had to check if user already +% includes abnt-options by (him/her)self. +% +% implementation: +% +% \citeoption was used? +% If YES, (abnt-options must be given to bibtex!) +% checks for abnt-options into parameter given to \bibliography +% if present +% user have included, so I don't add it once more +% not present +% I add necessary abnt-options +% If NO +% no changes to \bibliography + +\def\bibliography#1{% + \ifthenelse{\boolean{ABCIciteoptionwasused} + \and\boolean{ABCIauto-abntoptions}} + { + % this system of checking is not good... + \IfSubStringInString{abntex2-options}{#1} + {\if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi} + {\if@filesw\immediate\write\@auxout{\string\bibdata{abntex2-options,#1}}\fi} + } + { + \if@filesw + \immediate\write\@auxout{\string\bibdata{#1}}% + \fi + } + \@input@{\jobname.bbl}} + + +% +% The next piece of code looks if bibtexstyle is used or not, and if not, +% includes the respective style from the abntcite mode (alf or num) + +\newboolean{ABCIbibtexstyleused} +\setboolean{ABCIbibtexstyleused}{false} + +% +\def\bibliographystyle#1{% + \ifx\@begindocumenthook\@undefined\else + \expandafter\AtBeginDocument + \fi + {\if@filesw + \immediate\write\@auxout{\string\bibstyle{#1}}% + \fi} + \setboolean{ABCIbibtexstyleused}{true} + } + +% \AtEndDocument is the last chace for include bibliography style.. +\AtEndDocument{ + \ifthenelse{\not\boolean{ABCIbibtexstyleused}} + {\bibliographystyle{abntex2-\AbntCitetype}} + {} +} + + +% relsize used in \authorcapstyle. If package not present, \smaller=\relax +\IfFileExists{relsize.sty} + {\RequirePackage{relsize}} + {\let\smaller\relax} + +%%%%%%%%%%%%%% Style %%%%%%%%%%%%%%%%% + + + +\newcommand{\authorcapstyle}{\smaller} +\newcommand{\authorstyle}{\relax} +\newcommand{\yearstyle}{\relax} +\newcommand{\optionaltextstyle}{\relax} +\newcommand{\citenumstyle}{\relax} + +\newlength{\biblabelsep} +\setlength{\biblabelsep}{1ex} + +%%%%%%%%%%%%%%%%%%%%% Implementation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +% automatic care for commas inside references +\providecommand{\ABCIccomma}{} +\newcommand{\ABCIcitecommadefault}{,\penalty\@m\ } +\newcommand{\ABCIcitecomma}{\ABCIccomma\let\ABCIccomma\ABCIcitecommadefault} +\newcommand{\ABCIinitcitecomma}{\def\ABCIccomma{}} +\newcommand{\ABCIcitecolondefault}{; }%{;\penalty\@m\ } + + +% How \bibitem works? +% definition of \bibitem +% \def\bibitem{\@ifnextchar\@lbibitem\@bibitem} + +\ifthenelse{\boolean{ABCIcompoldalf}\and\equal{\AbntCitetype}{alf}} +{ + +% In the old mplementation on abnt-alf, the command \bibitem should be +% \bibitem[{explicit}{implicit}{year}]{key} + + % if \bibitem has optional parameter, uses it (three pieces of data + % stored into .aux file) + + \def\@lbibitem[#1#2#3]#4{ + \gdef\abntnextkey{#4} + \item[\@biblabel{#1}\hfill]% + \if@filesw + { + \let\protect\noexpand + \immediate\write\@auxout{\string\bibcite{#4++EXPL}{#1}} + \immediate\write\@auxout{\string\bibcite{#4++IMPL}{#2}} + \immediate\write\@auxout{\string\bibcite{#4++YEAR}{#3}} + } + \fi% + \ignorespaces + } + + % if no optional is used, uses a list counter (stores its value into .aux) + \def\@bibitem#1{ + \gdef\abntnextkey{#1} + \item% + \if@filesw + {\immediate\write\@auxout{\string\bibcite{#1}{\the\value{\@listctr}}}} + \fi% + \ignorespaces + } + +} +{ %if normal mode (non-compatible with old alf) + + \ifthenelse{\boolean{ABCIfoot}} + { + % foot-num mode + + \def\@lbibitem[#1]#2{\gdef\abntnextkey{#2}} + + \def\@bibitem#1{\gdef\abntnextkey{#1}} + + } + { + \def\@lbibitem[#1]#2{ + \gdef\abntnextkey{#2} + \item[\@biblabel{#1}\hfill]% + \ifthenelse{\boolean{ABNThyperref}}{% + \hyper@anchorstart{cite.#2}\relax\hyper@anchorend}{}% + \if@filesw + { + \let\protect\noexpand + \immediate\write\@auxout{\string\bibcite{#2}{#1}} + } + \fi% + \ignorespaces + } + + \def\@bibitem#1{ + \gdef\abntnextkey{#1} + % \ifthenelse{}{\item}{\item} + \item% + \ifthenelse{\boolean{ABNThyperref}}{% + \hyper@anchorstart{cite.#1}\relax\hyper@anchorend}{}% + \if@filesw + {\immediate\write\@auxout{\string\bibcite{#1}{\the\value{\@listctr}}}} + \fi% + \ignorespaces + } + } +} + +\newcommand{\hiddenbibitem}[2][]{\gdef\abntnextkey{#2}} + +\newcommand{\ABCIgetcitetext}[1]{ + \if@filesw + {\let\protect\noexpand + \immediate\write\@auxout{\string\bibcite{\abntnextkey++TEXT}{#1}}}% + \fi} + +\newcommand{\ABCIgetcitetextecho}[1]{\ABCIgetcitetext{#1}#1} + +%we are repeating \bibcite command as defined in hyperref.sty +%so that we have it all together at one place. +\ifthenelse{\boolean{ABNThyperref}}{% +\renewcommand{\bibcite}[2]{% + \@newl@bel{b}{#1}{\hyper@@link[cite]{}{cite.#1}{#2}}}% +\newcommand{\bibciteEXPL}[2]{% + \@newl@bel{b}{#1++EXPL}{\hyper@@link[cite]{}{cite.#1}{#2}}}% +\newcommand{\bibciteIMPL}[2]{% + \@newl@bel{b}{#1++IMPL}{\hyper@@link[cite]{}{cite.#1}{#2}}}% +\newcommand{\bibciteYEAR}[2]{% + \@newl@bel{b}{#1++YEAR}{\hyper@@link[cite]{}{cite.#1}{#2}}}% +}{} + +\newcommand{\abntrefinfo}[3]{% + \if@filesw + {% + \let\protect\noexpand + \ifthenelse{\boolean{ABNThyperref}}{% + \immediate\write\@auxout{\string\bibciteEXPL{\abntnextkey}{#1}}% + \immediate\write\@auxout{\string\bibciteIMPL{\abntnextkey}{#2}}% + \immediate\write\@auxout{\string\bibciteYEAR{\abntnextkey}{#3}}}{% + \immediate\write\@auxout{\string\bibcite{\abntnextkey++EXPL}{#1}}% + \immediate\write\@auxout{\string\bibcite{\abntnextkey++IMPL}{#2}}% + \immediate\write\@auxout{\string\bibcite{\abntnextkey++YEAR}{#3}}}% + }% + \fi + \ifthenelse{\boolean{ABCIfoot}} + {\ifthenelse{\boolean{ABCItextondemand}} + {\@ifundefined{ABCIdemand@\abntnextkey} + {\let\ABCIprocesscitetext\@gobble} + {\let\ABCIprocesscitetext\ABCIgetcitetext}} + {\let\ABCIprocesscitetext\ABCIgetcitetext}} + {\ifthenelse{\boolean{ABCItextondemand}} + {\@ifundefined{ABCIdemand@\abntnextkey} + {\let\ABCIprocesscitetext\relax} + {\let\ABCIprocesscitetext\ABCIgetcitetextecho}} + {\let\ABCIprocesscitetext\ABCIgetcitetextecho}}% + \ABCIprocesscitetext +} + + +\newcommand{\ABCIdemand}[1]{\expandafter\gdef\csname ABCIdemand@#1\endcsname{}} + + +\def\AbntCitetypeALF{alf} + +\let\ABCInewblock\newblock +\DeclareRobustCommand{\newblock}{\ABCInewblock} + + +%%%%%%%%%%%%%%%%%%%% abnt-alf %%%%%%%%%%%%%%%%%%%%%%% + +% the next line was before \ifthenelse{\equal{\AbntCitetype}{alf}} + +\setcitebrackets + +\ifx\AbntCitetype\AbntCitetypeALF % if alf + + \renewcommand{\@biblabel}[1]{} + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % \cite[optional]{list of keys} + % + % Implicit citation - author in capital letters and year; + % mechanism to deal with repeated names; + % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \renewcommand{\@cite}[2]% + {\citeopen{#1\ifthenelse{\equal{#2}{}}{}{, + {\optionaltextstyle#2}}}\citeclose} + + \DeclareRobustCommand{\cite}[2][]{% + % + \leavevmode + \let\@citeprevious\@empty% + \@cite{% + \@for\@citekey:=#2\do% \@citekey contains the key + {% + \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + % + % here, a tricky \let\@citename\"b@\@citekey++IMPL" + \expandafter\let\expandafter\@citename% + \csname b@\@citekey++IMPL\endcsname% + \expandafter\let\expandafter\@citeyear% + \csname b@\@citekey++YEAR\endcsname% + \ifx\@citeprevious\@empty% + \else% + \ifx\@citename\@citeprevious% + \ABCIcitecommadefault% echoing ", " + \else% + \ABCIcitecolondefault% echoing "; " + \fi% + \fi% + % writing on aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + % if undefined bibitem + \@ifundefined{b@\@citekey++IMPL}% + {% if undefined + {\bfseries??}% echoing ? + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if already defined + \ifx\@citename\@citeprevious% + {\yearstyle\@citeyear\@}\@% + \else% + {\authorcapstyle\@citename}, % + {\yearstyle\@citeyear\@}% + \fi% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#2}}{}% By AWSS: put backref + }% end for + }{#1}% + } + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % \citeonline[optional]{list of keys} + % + % Inline (explicit) citation - author in "inline style" and year; + % mechanism to deal with repeated names; + % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \newcommand{\@citeonline}[2]% + {{#1\ifthenelse{\equal{#2}{}}{}{, {\optionaltextstyle#2}}}\citeclose} + + \DeclareRobustCommand{\citeonline}[2][]{% + % + \leavevmode + \let\@citeprevious\@empty% + \@citeonline{% + \@for\@citekey:=#2\do%\@citekey contains the key + {% + \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + % + % here, a tricky \let\@citename\"b@\@citekey++UP" :-) + \expandafter\let\expandafter\@citename% + \csname b@\@citekey++EXPL\endcsname% + \expandafter\let\expandafter\@citeyear% + \csname b@\@citekey++YEAR\endcsname% + \ifx\@citeprevious\@empty% + \else% + \ifx\@citename\@citeprevious% + \ABCIcitecommadefault% echoing ", " + \else% + \citeclose, % echoing "), " + \fi% + \fi% + % writing in aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + \@ifundefined{b@\@citekey++EXPL}% + {% if undefined + {\bfseries??}% echoing ? + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if really defined + \ifx\@citename\@citeprevious% + \else% + {\authorstyle\@citename\@{}} \citeopen% + \fi% + {\yearstyle\@citeyear\@}% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#2}}{}% By AWSS: put backref + }% end for + }{#1}% + } + + % "overcite" compatibility + \let\citen\citeonline + \let\citenum\citeonline + +% end alf +% +% +%%%%%%%%%%%%%%%%%%%%%%%%% abnt-num %%%%%%%%%%%%%%%%%%%%%%%%%% +% +% + +\else % if not alf, + + \ifABCIfoot + + \renewenvironment{thebibliography}[1]{}{} + + \citebrackets{}{} + + \let\ABCIscriptfont\scriptsize + \renewcommand{\newblock}{} + + \def\ABCI@cite#1#2{\raisebox{.8ex}% + {\ABCIscriptfont\citeopen{#1\if@tempswa, #2\fi}\citeclose}} + + \def\ABCI@citeonline#1#2{{#1\if@tempswa, #2\fi}} + + \DeclareRobustCommand\cite{% + \let\@cite\ABCI@cite% + \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} + + \DeclareRobustCommand\citeonline{% + \leavevmode\let\@cite\ABCI@citeonline% + \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} + + \def\@citex[#1]#2{% + \def\@safe@activesfalse{}% + \ABCIinitcitecomma% + \def\ABCIcitelist{}% + \def\ABCIaftercitex{}% to put the footnotes + \@cite{% + \@for\@citeb:=#2\do% + {% + \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi% + \@ifundefined{b@\@citeb++IMPL}% + {% + {\bfseries??}% + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citeb' on page \thepage \space undefined}% + }% + {% + \@ifundefined{b@\@citeb} + {% + \stepcounter{footnote}% + \expandafter\xdef\csname b@\@citeb\endcsname{\thefootnote}% + \ABCItoken=\expandafter{\ABCIaftercitex}% + \xdef\ABCIaftercitex% + {\the\ABCItoken\noexpand\footnotetext% + {\noexpand\citetext{\@citeb}}}% + } + {}% + \expandafter\let\expandafter\ABCIcitation% + \csname b@\@citeb\endcsname% + % test for positive number + \ifcat _\ifnum\z@<0\ABCIcitation _\else A\fi + \ABCIaddtocitelist{\ABCIcitation}% + \else% else \ifcat + \ABCIcitecomma\hbox{\ABCIcitation}% + \fi% end \ifcat + }% + }% + \ABCIoutputgroupedcitelist% + }{#1}% + \ABCIaftercitex% + } + + \newcommand{\citeifnotcited}[1]{% + \def\ABCIcitelist{}% + \@for\@citeb:=#1\do% + {% + \@ifundefined{b@\@citeb} + {\ABCIaddtocitelist{\@citeb}} + {}% + }% + \expandafter\cite\expandafter{\ABCIcitelist}% + } + + \newcommand{\citeonlineifnotcited}[1]{% + \def\ABCIcitelist{}% + \@for\@citeb:=#1\do% + {% + \@ifundefined{b@\@citeb} + {\ABCIaddtocitelist{\@citeb}} + {}% + }% + \expandafter\citeonline\expandafter{\ABCIcitelist}% + } + + \newcommand{\ABCIaddtocitelist}[1]{% + \ifthenelse{\equal{\ABCIcitelist}{}}% + {\edef\ABCIcitelist{#1}} + {\edef\ABCIcitelist{\ABCIcitelist,#1}}% + }% + + \newcommand{\ifcited}[3]{\@ifundefined{b@#1}{#3}{#2}} + + \else % if num and NOT foot + + % this only works with proper settings in \ABCIthebibliformat + \ifthenelse{\boolean{ABCIbiblabelonmargin}} + { + \renewcommand{\@biblabel}[1]% + {\ifthenelse{\equal{#1}{}}{}{{\citenumstyle #1\hspace{\biblabelsep}}}} + } + { + \renewcommand{\@biblabel}[1]% + {% + \ifthenelse{\equal{#1}{}} + {} + {% + \def\biblabeltext{{\citenumstyle #1\hspace{\biblabelsep}}}% + \settowidth{\ABCIauxlen}{\biblabeltext}% + \ifthenelse{\lengthtest{\ABCIauxlen<\minimumbiblabelwidth}} + {\setlength{\ABCIauxlen}{\minimumbiblabelwidth-\ABCIauxlen}} + {\setlength{\ABCIauxlen}{0cm}}% + {\biblabeltext\hspace{\ABCIauxlen}}% + }% + }% + } + + \let\ABCIscriptfont\scriptsize + + \ifthenelse{\boolean{ABNTovercite}}{% + \def\ABCI@cite#1#2{\raisebox{1ex}% + {\ABCIscriptfont\citeopen{#1\if@tempswa, #2\fi}\citeclose}}}{% + \def\ABCI@cite#1#2{\citeopen{#1\if@tempswa, #2\fi}\citeclose}} + + \def\ABCI@citeonline#1#2{{#1\if@tempswa, #2\fi}} + + \DeclareRobustCommand\cite{% + \let\@cite\ABCI@cite% + \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} + + \DeclareRobustCommand\citeonline{% + \leavevmode\let\@cite\ABCI@citeonline% + \@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}} + +% \renewcommand{\@openbib@code}% +% {\setlength{\leftmargin}{0pt}\addtolength{\itemindent}{\labelsep}} + + + \def\@citex[#1]#2{% + \def\@safe@activesfalse{}% + \ABCIinitcitecomma% + \def\ABCIcitelist{}% + \@cite{% + \@for\@citeb:=#2\do% + {% + \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi% + \@ifundefined{b@\@citeb}% + {% + {\bfseries??}% + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citeb' on page \thepage \space undefined}% + }% + {% + \expandafter\let\expandafter\ABCIcitation% + \csname b@\@citeb\endcsname% + % test for positive number + \ifcat _\ifnum\z@<0\ABCIcitation _\else A\fi + \ABCIaddtocitelist{\ABCIcitation}% + \else% else \ifcat + \ABCIcitecomma\hbox{\ABCIcitation}% + \fi% end \ifcat + }% + }% + \ABCIoutputgroupedcitelist% + }{#1}% + } + + \newcommand{\ABCIaddtocitelist}[1]{% + \ifthenelse{\equal{\ABCIcitelist}{}}% + {\edef\ABCIcitelist{#1}} + {\edef\ABCIcitelist{\ABCIcitelist,#1}}% + }% + + + \fi +\fi % end if alf + +\providecommand{\citeifnotcited}[1]{} +\providecommand{\citeonlineifnotcited}[1]{} +\providecommand{\ifcited}[3]{} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \citeyear{list of keys} +% +% Citation by year +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DeclareRobustCommand{\citeyear}[1]{% +% +% \let\@safe@activesfalse\@empty% + \leavevmode + \let\@citeprevious\@empty% + \@for\@citekey:=#1\do %\@citekey contains the key + {% +% \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + \expandafter\let\expandafter\@citename% + \csname b@\@citekey++YEAR\endcsname% + %compare previous name with current name and decide the punctuation marks + %if first use do nothing + \ifx\@citeprevious\@empty% + \else% + , % echoing ", + \fi% + % writing on aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + % if undefined bibitem + \@ifundefined{b@\@citekey++YEAR}% + {% if undefined + {\bfseries??}% echoing ? + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if already defined + \ifx\@citename\@citeprevious% + \else% + {\@citename\@}% + \fi% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#1}}{}% By AWSS: put backref + }% end for +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \citeauthor{list of keys} +% +% Implicit citation (capital letters) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + +\DeclareRobustCommand{\citeauthor}[1]{% +% +% \let\@safe@activesfalse\@empty% + \leavevmode + \let\@citeprevious\@empty% + \@for\@citekey:=#1\do %\@citekey contains the key + {% +% \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + \expandafter\let\expandafter\@citename\csname b@\@citekey++IMPL\endcsname% + % writing on aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + % if undefined bibitem + \@ifundefined{b@\@citekey++IMPL}% + {% if undefined + {\bfseries??}% + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if already defined + \ifx\@citename\@citeprevious% + \else% + \ifx\@citeprevious\@empty% + \else% + ; % echoing "; " + \fi% + {\authorcapstyle\@citename\@}% + \fi% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#1}}{}% By AWSS: put backref + }% end for +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \citeauthoronline{list of keys} +% +% Explicit citation (non capital letter) +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\DeclareRobustCommand{\citeauthoronline}[1]{% +% +% \let\@safe@activesfalse\@empty% + \leavevmode + \let\@citeprevious\@empty% + \@for\@citekey:=#1\do %\@citekey contains the key + {% +% \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + \expandafter\let\expandafter\@citename\csname b@\@citekey++EXPL\endcsname% + % writing on aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + % if undefined bibitem + \@ifundefined{b@\@citekey++EXPL}% + {% if undefined + {\bfseries??}% + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if already defined + \ifx\@citename\@citeprevious% + \else% + \ifx\@citeprevious\@empty% + \else% + ; % echoing "; " + \fi% + {\authorstyle\@citename\@}% + \fi% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#1}}{}% By AWSS: put backref + }% end for +} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% \citetext{list of keys} +% +% Text of the reference +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\DeclareRobustCommand{\citetext}[1]{% +% +% \let\@safe@activesfalse\@empty% + \leavevmode + \let\@citeprevious\@empty% + \@for\@citekey:=#1\do %\@citekey contains the key + {% +% \edef\@citekey{\expandafter\@firstofone\@citekey\@empty}% + \expandafter\let\expandafter\@citename\csname b@\@citekey++TEXT\endcsname% + % writing on aux file + \if@filesw\immediate\write\@auxout{\string\citation{\@citekey}}\fi% + \if@filesw\immediate\write\@auxout{\string\ABCIdemand{\@citekey}}\fi% + % if undefined bibitem + \@ifundefined{b@\@citekey++TEXT}% + {% if undefined + {\bfseries??}% + \G@refundefinedtrue% + \@latex@warning% + {Citation `\@citekey' on page \thepage \space undefined}% + }% + {% if already defined + \ifx\@citename\@citeprevious% + \else% + \relax + \ifx\@citeprevious\@empty% + \else% + ; % echoing "; " + \fi% + {\@citename}% + \fi% + \let\@citeprevious\@citename% + }% + \ifthenelse{\boolean{ABNTbackref}}{\Hy@backout{#1}}{}% By AWSS: put backref + }% end for +} + + +% +% Setting up `recuo' (=indent in Portuguese) +% + +% To ensure that the margin settings of this package works, \leftmargin +% (inside thebibliography) must be 0cm. \@openbib@code is a hook inside +% thebibliography. +\let\@openbib@codeBACKUP\@openbib@code +\def\@openbib@code{\@openbib@codeBACKUP\setlength{\leftmargin}{0cm}} + + +% adding things after \begin{thebibliography}{} + +\let\thebibliographyBkUp\thebibliography +\def\thebibliography#1{\thebibliographyBkUp{#1}\ABCIthebibliformat} + +% +% \AfterTheBibliography{} hook +% + +\newtoks\ABCItoken + +\newcommand{\ABCIthebiblihook}{} + +\newcommand{\AfterTheBibliography}[1]{ + \ABCItoken=\expandafter{\ABCIthebiblihook} + \expandafter\def\expandafter\ABCIthebiblihook\expandafter{\the\ABCItoken#1} +} + + +\ifthenelse{\boolean{ABCIbibjustif}} + {} + {\AfterTheBibliography{\setlength{\rightskip}{0pt plus 2cm}}} + +\ifthenelse{\equal{\AbntCitetype}{alf}} + {% mode alf + \newcommand{\ABCIthebibliformat}{ + \setlength{\leftskip}{\bibindent} + \setlength{\labelwidth}{0cm} + \setlength{\labelsep}{0cm} + \setlength{\itemindent}{-\bibindent} + \setlength{\listparindent}{0cm} + \ABCIthebiblihook + } + } + {% mode num + \ifthenelse{\boolean{ABCIbiblabelonmargin}} + { + \newcommand{\ABCIthebibliformat}{ + \setlength{\leftskip}{\bibindent} + \setlength{\labelwidth}{10cm} + \setlength{\labelsep}{0cm} + \setlength{\itemindent}{-\bibindent} + \setlength{\listparindent}{0cm} + \setlength{\biblabelsep}{1.5ex} + \ABCIthebiblihook + } + } + { + \newcommand{\ABCIthebibliformat}{ + \setlength{\leftskip}{\bibindent} + \setlength{\labelwidth}{0cm} + \setlength{\labelsep}{0cm} + \setlength{\itemindent}{-\bibindent} + \setlength{\listparindent}{0cm} + \setlength{\minimumbiblabelwidth}{\leftskip} + \ABCIthebiblihook + } + \AfterTheBibliography{ + \ifthenelse{\lengthtest{\minimumbiblabelwidth=0pt}} + {\setlength{\biblabelsep}{1.8ex}} + {\setlength{\biblabelsep}{1ex}} + } + } + } + + + + +%---------------------------------------------------------------% +% Macros for output sorted and compressed numerical citations % +%---------------------------------------------------------------% + + +% Store to maximum of a given list to the counter "ABCImax" +\newcommand{\maximuminlist}[1]{% + \setcounter{ABCImax}{0}% + \@for\ABCIaux:=#1\do% + {% + \setcounter{ABCIaux}{\ABCIaux}% + \ifnum \value{ABCIaux}>\value{ABCImax}% + \setcounter{ABCImax}{\value{ABCIaux}}% + \fi% + }% +} + +% It takes a command containing a comma separeted list of +% positive numbers and redefines the original command with +% the list without its maximum element. +\newcommand{\ABCIlistwithoutmaximum}[1]{% + \maximuminlist{#1}% + \let\ABCItemplist#1% + \def#1{}% + \def\ABCIcomma{}% + \@for\ABCIaux:=\ABCItemplist\do% + {% + \ifnum\ABCIaux<\value{ABCImax}% + \edef#1{#1\ABCIcomma\ABCIaux}% + \def\ABCIcomma{,}% + \fi% + }% +} + +% It requires a command containing a comma separeted list of +% positive numbers. It redefines that command with the same +% list, but sorted. +\newcommand{\ABCIsortlist}[1]{% + \edef\ABCItempslist{#1}% + \def#1{}% + \def\ABCIcomma{}% + \whiledo{\not\equal{\ABCItempslist}{}}% + {% + \maximuminlist{\ABCItempslist}% + \edef#1{\arabic{ABCImax}\ABCIcomma#1}% + \def\ABCIcomma{,}% + \ABCIlistwithoutmaximum{\ABCItempslist}% + }% +} + +% \ifconsecutive{num1}{num2}{block1}{block2} +% executes block1 if num1 = num2+1 and block2 otherwise. +\newcommand{\ifconsecutive}[4]{% + \@tempcnta#1% + \@tempcntb#2% + \advance\@tempcntb 1 % + \ifnum\@tempcnta=\@tempcntb#3\else#4\fi% +} + +% +% It sorts and outputs in grouped way the list \ABCIcitelist generated in +% \cite when in `num' mode. +% +\newcommand{\ABCIoutputgroupedcitelist}{% + \ifthenelse{\equal{\ABCIcitelist}{}}% + {}% + {% + \ABCIsortlist{\ABCIcitelist}% + \setcounter{ABCIaux}{0}% + \@for \ABCIaux:=\ABCIcitelist\do% + {% + \ifthenelse{\value{ABCIaux}=0}% + {% + \let\ABCIfirst\ABCIaux% + \let\ABCIlast\ABCIaux% + \setcounter{ABCIaux}{1}% + }% + {% + \ifconsecutive{\ABCIaux}{\ABCIlast}% + {% + \let\ABCIlast\ABCIaux% + \addtocounter{ABCIaux}{1}% + }% + {% + \ifthenelse{\value{ABCIaux}=1}% + {% + \ABCIcitecomma\ABCIfirst% + }% + {% + \ifthenelse{\value{ABCIaux}=2}% + {% + \ABCIcitecomma\ABCIfirst% + \ABCIcitecomma\ABCIlast% + }% + {% + \ABCIcitecomma\ABCIfirst--\ABCIlast% + }% + }% + \let\ABCIfirst\ABCIaux% + \let\ABCIlast\ABCIaux% + \setcounter{ABCIaux}{1}% + }% + }% + }% + \ifthenelse{\value{ABCIaux}=1}% + {% + \ABCIcitecomma\ABCIfirst% + }% + {% + \ifthenelse{\value{ABCIaux}=2}% + {% + \ABCIcitecomma\ABCIfirst% + \ABCIcitecomma\ABCIlast% + }% + {% + \ABCIcitecomma\ABCIfirst--\ABCIlast% + }% + }% + }% +} + +\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.} + +\newcommand{\apud}[3][]{(\citeauthor{#2}, \citeyear{#2} \apudname\ % +\citeauthor{#3}, \citeyear{#3}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1})} + +\newcommand{\apudonline}[3][]{\citeauthoronline{#2} (\apudname\ % +\citeauthor{#3}, \citeyear{#3}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1})} + +\newcommand{\Idem}[2][]{\Idemname, \citeyear{#2}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}} + +\newcommand{\Ibidem}[2][]{\Ibidemname% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}} + +\newcommand{\opcit}[2][]{\citeauthor{#2}, \opcitname% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}} + +\newcommand{\passim}[2][]{\citeauthor{#2}, \citeyear{#2}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}, \passimname} + +\newcommand{\loccit}[2][]{\citeauthor{#2}, \citeyear{#2}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}, \loccitname} + +\newcommand{\cfcite}[2][]{\cfcitename\ \citeauthor{#2}, \citeyear{#2}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}} + +\newcommand{\etseq}[2][]{\citeauthor{#2}, \citeyear{#2}% +\ifthenelse{\equal{#1}{\empty}}{}{, #1}, \etseqname} + +\ifthenelse{\equal{\AbntCitetype}{num}}% +{\renewcommand{\citeauthor}[1]{\citeauthoronline{#1}\cite{#1}}}{} + + +\endinput + + |