summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/abntex2/abntex2.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/abntex2/abntex2.cls')
-rw-r--r--Master/texmf-dist/tex/latex/abntex2/abntex2.cls190
1 files changed, 154 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/abntex2/abntex2.cls b/Master/texmf-dist/tex/latex/abntex2/abntex2.cls
index dc802bdd67c..161a1081735 100644
--- a/Master/texmf-dist/tex/latex/abntex2/abntex2.cls
+++ b/Master/texmf-dist/tex/latex/abntex2/abntex2.cls
@@ -1,4 +1,4 @@
-%% abntex2.cls, v-1.8 laurocesar
+%% abntex2.cls, v-1.9 laurocesar
%% Copyright 2012-2013 by abnTeX2 group at http://abntex2.googlecode.com/
%%
%% This work may be distributed and/or modified under the
@@ -17,6 +17,20 @@
%%
%% This work consists of the file abntex2.cls.
%%
+%% 2013.10.26 17h45 laurocesar
+%% Adiciona a marcro \phantompart
+%% Revisa código do sumário 6027-2012
+%%
+%% 2013.10.24 09h53 laurocesar
+%% Revisa as alterações de quinto nível
+%%
+%% 2013.10.11 07h27 sggranja
+%% Adiciona opções sumario=abnt-6027-2012 e sumario=tradicional
+%%
+%% 2013.10.02 11h00 carlini
+%% Adiciona suporte a subsubsubsection (utilizando paragraph)
+%% e adiciona a opcao subsubsubsection=TITLE.
+%%
%% 2013.8.19 07h27 sggranja
%% Adiciona macros \IBGEtab e \fonte
%%
@@ -128,7 +142,7 @@
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{abntex2}[2013/09/01 v1.8 abnTeX2]
+\ProvidesClass{abntex2}[2013/10/26 v1.9 abnTeX2]
\RequirePackage{ifthen}
%
% Captura as options article e twocolumn
@@ -151,15 +165,30 @@
\newboolean{ABNTEXuppersection} %true=titles of sections in uppercase
\newboolean{ABNTEXuppersubsection} %true=titles of subsections in uppercase
\newboolean{ABNTEXuppersubsubsection} %true=titles of subsubsections in uppercase
+\newboolean{ABNTEXuppersubsubsubsection} %true=titles of subsubsubsections in uppercase
\setboolean{ABNTEXupperchapter}{false}
\setboolean{ABNTEXuppersection}{false}
\setboolean{ABNTEXuppersubsection}{false}
\setboolean{ABNTEXuppersubsubsection}{false}
+\setboolean{ABNTEXuppersubsubsubsection}{false}
\DeclareOption{chapter=TITLE}{\setboolean{ABNTEXupperchapter}{true}}
\DeclareOption{section=TITLE}{\setboolean{ABNTEXuppersection}{true}}
\DeclareOption{subsection=TITLE}{\setboolean{ABNTEXuppersubsection}{true}}
\DeclareOption{subsubsection=TITLE}{\setboolean{ABNTEXuppersubsubsection}{true}}
-
+\DeclareOption{subsubsubsection=TITLE}{\setboolean{ABNTEXuppersubsubsubsection}{true}}
+%
+% Opções de diagramação de sumários
+% sumario=tradicional : Sumário tradicional do LaTeX/Memoir
+% sumario=abnt-6027-2012 : Sumário conforme recomendação da ABNT NBR 6027:2012
+\newboolean{ABNTEXsumario-tradicional} %true=titles of chapter/appendix in uppercase
+\newboolean{ABNTEXsumario-abnt-6027-2012}
+\setboolean{ABNTEXsumario-tradicional}{false}
+\setboolean{ABNTEXsumario-abnt-6027-2012}{true}
+\DeclareOption{sumario=tradicional}{%
+ \setboolean{ABNTEXsumario-tradicional}{true}%
+ \setboolean{ABNTEXsumario-abnt-6027-2012}{false}}
+\DeclareOption{sumario=abnt-6027-2012}{%
+ \setboolean{ABNTEXsumario-abnt-6027-2012}{true}}
%
% Repassa demais opcoes a memoir
%
@@ -186,6 +215,7 @@
\newcommand{\ABNTEXsectionupperifneeded}{\ifthenelse{\boolean{ABNTEXuppersection}}{\MakeTextUppercase}{}}
\newcommand{\ABNTEXsubsectionupperifneeded}{\ifthenelse{\boolean{ABNTEXuppersubsection}}{\MakeTextUppercase}{}}
\newcommand{\ABNTEXsubsubsectionupperifneeded}{\ifthenelse{\boolean{ABNTEXuppersubsubsection}}{\MakeTextUppercase}{}}
+\newcommand{\ABNTEXsubsubsubsectionupperifneeded}{\ifthenelse{\boolean{ABNTEXuppersubsubsubsection}}{\MakeTextUppercase}{}}
% ---
% ------------------------------------------------------------------------
@@ -245,7 +275,7 @@
\renewcommand{\sectionautorefname}{se{\c c}\~ao}
\renewcommand{\subsectionautorefname}{subse{\c c}\~ao}
\renewcommand{\subsubsectionautorefname}{subse{\c c}\~ao}
- \renewcommand{\paragraphautorefname}{par\'agrafo}
+ \renewcommand{\paragraphautorefname}{subse{\c c}\~ao}
}
\addto\captionsenglish{% ingles
%% adjusts names from abnTeX2
@@ -271,7 +301,7 @@
\renewcommand{\sectionautorefname}{section}
\renewcommand{\subsectionautorefname}{subsection}
\renewcommand{\subsubsectionautorefname}{subsubsection}
- \renewcommand{\paragraphautorefname}{paragraph}
+ \renewcommand{\paragraphautorefname}{subsubsubsection}
}
% ---
@@ -332,6 +362,9 @@
\newcommand{\ABNTEXsubsubsectionfont}{\ABNTEXsubsectionfont}
\newcommand{\ABNTEXsubsubsectionfontsize}{\normalsize}
+
+\newcommand{\ABNTEXsubsubsubsectionfont}{\ABNTEXsubsectionfont}
+\newcommand{\ABNTEXsubsubsubsectionfontsize}{\normalsize}
% ---
% ------------------------------------------------------------------------
@@ -419,6 +452,7 @@
% Para uso com pacotes subfig e caption dentro do memoir se estes forem carregados ou não.
% É necessário para que os comandos \IBGEtab e \fonte funcionem
% independente do carregamento de pacotes externos ao memoir que tratam captions.
+\newcommand{\IBGEtabfontsize}{\ABNTEXfontereduzida}
\AtBeginDocument{%
% comandos auxiliares para manipular os captions dentro do comando \IBGEtab.
\newcommand{\configurecaptions}{\captionstyle[\raggedright]{}}
@@ -428,15 +462,14 @@
\newsavebox{\myptabbox}
\newlength{\myptabboxwidth}
\newcommand{\IBGEtab}[3]{%
- \savebox{\myptabbox}{{#2}}%
+ \savebox{\myptabbox}{{\IBGEtabfontsize #2}}%
\settowidth{\myptabboxwidth}{\usebox{\myptabbox}}%
\centering%
\parbox{\myptabboxwidth}{%
\configurecaptions
#1%
\par%
- %\usebox{\myptabbox}%
- {\ABNTEXfontereduzida%
+ {\IBGEtabfontsize%
#2%
}%
\par%
@@ -490,23 +523,92 @@
% -----
% Configuracoes do TOC
% -----
-% nivel de profundidade
-\setsecnumdepth{subsubsection}
-\settocdepth{subsubsection} %\maxtocdepth{subsubsection}
+% nivel de profundidade (implementa o quinto nivel - subsubsubsection)
+\setsecnumdepth{paragraph}
+\settocdepth{paragraph}
+\setcounter{tocdepth}{5}
+\setcounter{secnumdepth}{5}
+\maxsecnumdepth{paragraph}
+
+% redefine os comandos *paragraph* para *subsubsubsection* ****
+\newcommand{\subsubsubsection}{\paragraph}
+\newcommand{\cftbeforesubsubsubsectionskip}{\cftbeforeparagraphskip}
+\newcommand{\cftsubsubsubsectionfont}{\cftparagraphfont}
+\newcommand{\setsubsubsubsecheadstyle}{\setparaheadstyle}
+
+\setafterparaskip{1.0\onelineskip plus 0.5\onelineskip minus 0.2\onelineskip}
+\setparaheadstyle{\normalfont\sffamily\raggedright}%
% lista de ilustracoes
\renewcommand{\cftfigurename}{\figurename\space}
-\renewcommand*{\cftfigureaftersnum}{~~--}
+\renewcommand*{\cftfigureaftersnum}{\hfill--\hfill}
% lista de tabelas
\renewcommand{\cfttablename}{\tablename\space}
-\renewcommand*{\cfttableaftersnum}{~~--}
+\renewcommand*{\cfttableaftersnum}{\hfill--\hfill}
% fonte das partes e do capitulo do TOC
\renewcommand{\tocheadstart}{\ABNTEXchapterfont}
% leaders para os capitulos
\renewcommand*{\cftchapterdotsep}{\cftdotsep}
+
+% suprime espaço entre os itens de listings de diferentes capítulos
+\setlength{\cftbeforechapterskip}{0pt plus 0pt}
+\renewcommand*{\insertchapterspace}{}
+
+% macros para configurar o Sumário conforme 6027-2012 ou tradicional cft
+\ifthenelse{\boolean{ABNTEXsumario-tradicional}}{\cftinsertcode{A}}{}
+
+\newlength{\cftlastnumwidth}
+\setlength{\cftlastnumwidth}{\cftsubsubsectionnumwidth+1em}
+
+\newcommand{\tocprintchapter}{}
+\newcommand{\tocinnonumchapter}{}
+\newcommand{\tocprintchapternonum}{}
+\newcommand{\tocpartapendices}{}
+\newcommand{\tocpartanexos}{}
+
+\ifthenelse{\boolean{ABNTEXsumario-abnt-6027-2012}}{%
+ \cftinsertcode{A}{\renewcommand{\cftchapteraftersnum}{\hfill--\hfill}}
+
+ \cftsetindents{part}{0em}{\cftlastnumwidth}
+ \cftsetindents{chapter}{0em}{\cftlastnumwidth}
+ \cftsetindents{section}{0em}{\cftlastnumwidth}
+ \cftsetindents{subsection}{0em}{\cftlastnumwidth}
+ \cftsetindents{subsubsection}{0em}{\cftlastnumwidth}
+ \cftsetindents{paragraph}{0em}{\cftlastnumwidth}
+ \cftsetindents{subparagraph}{0em}{\cftlastnumwidth}
+ %
+ \renewcommand{\tocprintchapter}{%
+ \addtocontents{toc}{\cftsetindents{chapter}{0em}{\cftlastnumwidth}}}
+ %
+ \renewcommand{\tocinnonumchapter}{%
+ \addtocontents{toc}{\cftsetindents{chapter}{\cftlastnumwidth}{2em}}%
+ \cftinserthook{toc}{A}}
+ %
+ \renewcommand{\tocprintchapternonum}{%
+ \addtocontents{toc}{\cftsetindents{chapter}{\cftlastnumwidth}{2em}}}
+ %
+ \renewcommand{\tocpartapendices}{%
+ \addtocontents{toc}{\cftsetindents{part}{\cftlastnumwidth}{2em}}
+ \cftinserthook{toc}{A}}
+ %
+ \renewcommand{\tocpartanexos}{%
+ \addtocontents{toc}{\cftsetindents{part}{\cftlastnumwidth}{2em}}
+ \cftinserthook{toc}{A}}
+ %
+ \setlength{\cftbeforechapterskip}{0.5em}
+}{}
+
+% Comando que simula a finalizacao de uma parte no bookmark e
+% adiciona espaco de \part no sumario
+\newcommand{\phantompart}{%
+ \bookmarksetup{startatroot}%
+ \phantomsection%
+ \ifthenelse{\boolean{ABNTEXsumario-abnt-6027-2012}}{%
+ \addtocontents{toc}{\vspace{\cftbeforepartskip}}}{}%
+}
% -----
% ---
@@ -536,10 +638,11 @@
\renewcommand{\partnumfont}{\ABNTEXpartfont\ABNTEXpartfontsize}
\renewcommand{\partnamefont}{\ABNTEXpartfont\ABNTEXpartfontsize}
- % tamanhos de fontes de section, subsection e subsubsection
+ % tamanhos de fontes de section, subsection, subsubsection e subsubsubsection
\setsecheadstyle{\ABNTEXsectionfont\ABNTEXsectionfontsize\ABNTEXsectionupperifneeded}
\setsubsecheadstyle{\ABNTEXsubsectionfont\ABNTEXsubsectionfontsize\ABNTEXsubsectionupperifneeded}
\setsubsubsecheadstyle{\ABNTEXsubsubsectionfont\ABNTEXsubsubsectionfontsize\ABNTEXsubsubsectionupperifneeded}
+ \setsubsubsubsecheadstyle{\ABNTEXsubsubsubsectionfont\ABNTEXsubsubsubsectionfontsize\ABNTEXsubsubsubsectionupperifneeded}
% impressao do numero do capitulo
\renewcommand{\chapternamenum}{}
@@ -554,25 +657,35 @@
\def\printchaptertitle##1{%
\chaptitlefont%
\ifthenelse{\boolean{abntex@innonumchapter}}{\centering\ABNTEXchapterupperifneeded{##1}}{%
- % else
- \settowidth{\chapternamenumlength}{\printchaptername\printchapternum\afterchapternum}%
- \parbox[t]{\columnwidth-\chapternamenumlength}{\ABNTEXchapterupperifneeded{##1}}%
- }
+ % else
+ \ifthenelse{\boolean{abntex@apendiceousecao}}{\centering%
+ \settowidth{\chapternamenumlength}{\printchaptername\printchapternum\afterchapternum}%
+ %\parbox[t]{\columnwidth-\chapternamenumlength}
+ \ABNTEXchapterupperifneeded{##1}%
+ }{%
+ \settowidth{\chapternamenumlength}{\printchaptername\printchapternum\afterchapternum}%
+ \parbox[t]{\columnwidth-\chapternamenumlength}{\ABNTEXchapterupperifneeded{##1}}}%
+ % \settowidth{\chapternamenumlength}{\printchaptername\printchapternum\afterchapternum}%
+ % \parbox[t]{\columnwidth-\chapternamenumlength}{\ABNTEXchapterupperifneeded{##1}}%
+ }
}
% impressao do numero do capitulo
\renewcommand{\printchapternum}{%
+ \tocprintchapter
\setboolean{abntex@innonumchapter}{false}
\chapnumfont%
\space\thechapter\space%
\ifthenelse{\boolean{abntex@apendiceousecao}}{%
- --\space%
+ \tocinnonumchapter
+ \space--\space%
}{} % else
}
\renewcommand{\afterchapternum}{}
% impressao do capitulo nao numerado
\renewcommand\printchapternonum{%
+ \tocprintchapternonum
\setboolean{abntex@innonumchapter}{true}%
}
}
@@ -624,9 +737,7 @@
% ---
% Configura layout para elementos pos-textuais
-\newcommand{\postextual}{%
- \bookmarksetup{startatroot}%
-}
+\newcommand{\postextual}{\phantompart}
\renewcommand{\backmatter}{\postextual}
% -----
@@ -645,6 +756,8 @@
\newcommand{\imprimirautor}{\theauthor}
% Comandos de dados - data
+\let\olddate\date
+\renewcommand{\date}[1]{\AtBeginDocument{\olddate{#1}}}
\newcommand{\data}[1]{\date{#1}}
\newcommand{\imprimirdata}{\thedate}
@@ -754,7 +867,7 @@
\setlength\absrightindent{0cm}
% Garante que a fonte do texto do abstract será a mesma do documento, pois
% na classe memoir está \small
- \abstracttextfont{\normalfont\normalsize}
+ \renewcommand{\abstracttextfont}{\normalfont\normalsize}
}
% A norma não diz nada sobre identação e separação entre parágrafos no abstract,
@@ -878,9 +991,13 @@
% atalhos para \partpage ou \appendixpage*
\makeatletter
-\newcommand{\partapendices}{\@ifstar{\appendixpage*}{\partpage}}
+\newcommand{\partapendices}{%
+\tocpartapendices%
+\@ifstar{\appendixpage*}{\partpage}}
-\newcommand{\partanexos}{\@ifstar{\appendixpage*}{\partpage}}
+\newcommand{\partanexos}{%
+\tocpartanexos%
+\@ifstar{\appendixpage*}{\partpage}}
\makeatother
% ---
@@ -963,16 +1080,15 @@
\newcommand{\imprimircapa}{%
\begin{capa}%
\center
- %\vspace*{1cm}
- {\ABNTEXchapterfont\large\imprimirautor}
+ \ABNTEXchapterfont\large\imprimirautor
- \vspace*{\fill}
- {\ABNTEXchapterfont\bfseries\LARGE\imprimirtitulo}
- \vspace*{\fill}
+ \vfill
+ \ABNTEXchapterfont\bfseries\LARGE\imprimirtitulo
+ \vfill
- {\large\imprimirlocal}
- \par
- {\large\imprimirdata}
+ \large\imprimirlocal
+
+ \large\imprimirdata
\vspace*{1cm}
\end{capa}
@@ -997,11 +1113,13 @@
%\vspace*{1cm}
{\ABNTEXchapterfont\large\imprimirautor}
-
+
\vspace*{\fill}\vspace*{\fill}
- {\ABNTEXchapterfont\bfseries\Large\imprimirtitulo}
+ \begin{center}
+ \ABNTEXchapterfont\bfseries\Large\imprimirtitulo
+ \end{center}
\vspace*{\fill}
-
+
\abntex@ifnotempty{\imprimirpreambulo}{%
\hspace{.45\textwidth}
\begin{minipage}{.5\textwidth}