diff options
author | Norbert Preining <norbert@preining.info> | 2022-09-30 03:01:38 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-09-30 03:01:38 +0000 |
commit | d3a49f9b97d78b3719e84b2e704c59f0491190d5 (patch) | |
tree | bd50be75a1198c8104d7d3aa428106844ac69ad6 /macros/latex/contrib/abntexto | |
parent | d7ca45f66f34e5ca724a739f420c99a7c9960a89 (diff) |
CTAN sync 202209300301
Diffstat (limited to 'macros/latex/contrib/abntexto')
-rw-r--r-- | macros/latex/contrib/abntexto/README | 9 | ||||
-rw-r--r-- | macros/latex/contrib/abntexto/abntexto-manual.pdf | bin | 148750 -> 134196 bytes | |||
-rw-r--r-- | macros/latex/contrib/abntexto/abntexto-manual.tex | 86 | ||||
-rw-r--r-- | macros/latex/contrib/abntexto/abntexto.bib | 25 | ||||
-rw-r--r-- | macros/latex/contrib/abntexto/abntexto.cls | 285 |
5 files changed, 263 insertions, 142 deletions
diff --git a/macros/latex/contrib/abntexto/README b/macros/latex/contrib/abntexto/README index 1ca1cc0bee..48f906c50f 100644 --- a/macros/latex/contrib/abntexto/README +++ b/macros/latex/contrib/abntexto/README @@ -1,7 +1,8 @@ Public Domain Software -2022-09-25 -1.0.0-alpha +2022-09-29 +1.1.0-alpha Elayson -elaysonabreu@gmail.com +abntexto dot classe at gmail dot com -abntexto is a LaTeX class for the elaboration of academic works according to the guidelines of the Associação Brasileira de Normas Técnicas (ABNT).
\ No newline at end of file +The abntexto is a LaTeX class for the elaboration of academic works according +to the guidelines of the Associação Brasileira de Normas Técnicas (ABNT).
\ No newline at end of file diff --git a/macros/latex/contrib/abntexto/abntexto-manual.pdf b/macros/latex/contrib/abntexto/abntexto-manual.pdf Binary files differindex 236d447268..a2282e2fd7 100644 --- a/macros/latex/contrib/abntexto/abntexto-manual.pdf +++ b/macros/latex/contrib/abntexto/abntexto-manual.pdf diff --git a/macros/latex/contrib/abntexto/abntexto-manual.tex b/macros/latex/contrib/abntexto/abntexto-manual.tex index 2038eed5d1..20ecc91f12 100644 --- a/macros/latex/contrib/abntexto/abntexto-manual.tex +++ b/macros/latex/contrib/abntexto/abntexto-manual.tex @@ -4,20 +4,24 @@ \usepackage[brazil]{babel} \usepackage[T1]{fontenc} -\usepackage[varqu,varl,scale=0.85]{inconsolata} -\usepackage[matchlowercase]{tgheros} \renewcommand\familydefault\sfdefault +\usepackage[scale=0.85]{inconsolata} +\usepackage[matchlowercase]{tgheros} \def\familydefault{\sfdefault} \usepackage{lipsum} \def\lip{\lipsum[1][1-2]} \usepackage{graphicx} \usepackage{xcolor} +\usepackage[style=abnt]{biblatex} \addbibresource{abntexto.bib} \usepackage[colorlinks]{hyperref} +%\let\href=\relax -% MARKUP DEFS +% MARKUP % ================================================ -\def\cs#1{{\ttfamily \string#1}} -\def\meta#1{\textsf{⟨\textit{\fontseries{c}\selectfont #1}⟩}} % ⟨#1⟩ -\def\cc#1{{\ttfamily \{\meta{#1}\}}} -\def\kk#1{{\ttfamily [\meta{#1}]}} +\def\ttnoligs{\ttfamily\@noligs} + +\def\cs#1{{\ttnoligs \string#1}} +\def\meta#1{{\ttnoligs <#1>}} % ⟨⟩ +\def\cc#1{{\ttnoligs \{\meta{#1}\}}} +\def\kk#1{{\ttnoligs [\meta{#1}]}} \def\arg{\cc{arg}} \def\opt{\kk{opt}} @@ -27,51 +31,50 @@ \def\opti{\kk{opti}} \def\optii{\kk{optii}} \def\optiii{\kk{optiii}} -\def\ccval#1{{\ttfamily \{#1\}}} -\def\kkval#1{{\ttfamily [#1]}} -\def\cls#1{\textsf{\textit{#1}}} -\def\pkg#1{\texttt{#1}} +\def\ccval#1{{\ttnoligs \{#1\}}} +\def\kkval#1{{\ttnoligs [#1]}} +\def\pkg#1{{\ttnoligs #1}} % VERBATIM % ================================================ \def\adef#1{\catcode`#1=13 \begingroup \lccode`\~=`#1\lowercase{\endgroup\def~}} \def\dodef#1{\catcode`#1=12 } -\def\verbcatcodes{\let\do=\dodef \dospecials\obeyspaces\catcode`\%=14 } +\def\verbcatcodes{\let\do=\dodef \dospecials \catcode`\%=14 \catcode`\|=0 } -\long\def\verbon{\par\begingroup \verbcatcodes - \catcode`\|=0 % escape char - \adef\^^I{\space\space\space\space}\adef\^^M{\par\leavevmode}% +\long\def\verbon{\par\begingroup \verbcatcodes\obeyspaces + \adef\^^I{\space\space\space}% + \adef\^^M{\par\leavevmode}% \startverb } {\catcode`\|=0 \catcode`\\=12 - |long|gdef|startverb#1\verboff{|verbbox{#1}|par|endgroup |verbreset} + |gdef|startverb#1\verboff{|verbbox{#1}|par|endgroup |verbreset} } \def\verbbox#1{\def\tnba@placewidth{\hsize \advance\hsize-3cm}% - \ifx\tnba@savedplace\empty \else \vskip\placeabovespace \fi + \ifx\tnba@savedplace\empty\else\vskip\placeabovespace\fi \parindent=0pt \ifx\tnba@savedplace\empty\else\tnba@makelegend\fi - \nobreak\par\nointerlineskip \kern10pt + \nobreak\nointerlineskip\vskip10pt {\verbfont{#1}}% - \nobreak\nointerlineskip - \ifx\tnba@savedsrc\empty \else \tnba@makesrc \vskip\placebelowspace \fi + \nobreak\nointerlineskip\vskip8pt + \ifx\tnba@savedsrc\empty\else\tnba@makesrc\vskip\placebelowspace\fi } \def\verbreset{% \let\tnba@savedplace=\empty \let\tnba@savedlegend=\empty \let\tnba@savedsrc=\empty - \let\@currentlabel=\relax + \let\@currentlabel=\empty } -\long\def\verbfont{\raggedright\leftskip=6pt \singlesp\ttfamily\@noligs\leftframed} +\def\verbfont{\raggedright\leftskip=6pt\singlesp\ttnoligs\leftframed} \long\def\leftframed#1{\setbox0=\vtop{#1}% \hbox{{\color{graybar}\kern1.5cm\vrule width1pt}\box0}% } -% PERSONAL DEFS +% MISC % ================================================ -\sizeselectordef\large{14pt}{17pt} -\sizeselectordef\Large{22pt}{25pt} +\sizeselectordef\large{14.4pt}{17pt} +\sizeselectordef\Large{20.74pt}{25pt} \sizeselectordef\LARGE{25pt}{30pt} \definecolor{graybar}{gray}{0.75} @@ -87,6 +90,9 @@ \clubpenalty=10000 \widowpenalty=10000 +\let\cite=\textcite +\def\appendixlabelwidth{7em} + \makeatother @@ -99,12 +105,12 @@ abntexto\\[0.4em] \Large\itshape\mdseries Classe para {\upshape\LaTeX}\\[2em] \normalfont\large Elayson\\[1ex] - \href{mailto:elaysonabreu@gmail.com}{elaysonabreu@gmail.com}\\[2.5ex] + \href{mailto:abntexto.classe@gmail.com}{abntexto dot classe at gmail dot com}\\[2.5ex] \today\par} \vskip3in -{\centering \large\ttfamily 1.0.0-alpha\par} +{\centering \large\ttfamily 1.1.0-alpha\par} \newpage @@ -114,17 +120,17 @@ \section{Apresentação} -O \cls{abntexto} é uma classe do \LaTeX\ criada para facilitar a utilização das normas da Associação Brasileira de Normas Técnicas (ABNT) em trabalhos acadêmicos (monografias, dissertações, teses). +O \pkg{abntexto} é uma classe do \LaTeX\ criada para facilitar a utilização das normas da Associação Brasileira de Normas Técnicas (ABNT) em trabalhos acadêmicos (monografias, dissertações, teses). -Este \emph{não} é um manual sobre \LaTeX\ (ou \TeX, a ferramenta que o constitui) nem tampouco uma descrição detalhada sobre as normas ABNT. Para aprender sobre \LaTeX\ leia \href{https://www.ctan.org/pkg/latex-via-exemplos}{\LaTeXe\ Via Exemplos} ou \href{https://www.ctan.org/pkg/latex2e-help-texinfo}{\LaTeXe: An unofficial reference manual}, disponível também em francês. Além disso, também se pode ler \href{https://www.ctan.org/pkg/texbytopic}{\TeX\ by Topic} para aprender sobre o sistema \TeX. +Este \emph{não} é um manual sobre \LaTeX\ (ou \TeX, a ferramenta que o constitui) nem tampouco uma descrição detalhada sobre as normas ABNT. Para aprender sobre \LaTeX\ leia \cite{viaexemplos} ou \cite{latex2eunnoficial}, disponível também em francês. Além disso, também se pode ler \cite{texbytopic} para aprender sobre o sistema \TeX\footnote{Note que os livros referenciados não foram realmente citados e isso não é aceito na Norma, no entanto este não é um trabalho acadêmico real, mas um manual.}. -Já existe uma classe para aplicação das normas ABNT cujo nome é \cls{abntex2}. Mas, diferente desta, o \cls{abntexto} não depende do \cls{memoir}, uma classe de código-fonte e manual extensos e que implementa funções as quais, em sua maioria, não são pertinentes a um documento que use as diretrizes da ABNT. +Já existe uma classe para aplicação das normas ABNT cujo nome é \pkg{abntex2}. Mas, diferente desta, o \pkg{abntexto} não depende do \pkg{memoir}, uma classe de código-fonte e manual extensos e que implementa funções as quais, em sua maioria, não são pertinentes a um documento que use as diretrizes da ABNT. -As normas ABNT as quais o \cls{abntexto} se propõe a seguir são aquelas em vigor até o momento da criação deste manual. +As normas ABNT as quais o \pkg{abntexto} se propõe a seguir são aquelas em vigor até o momento da criação deste manual. \section{Chamando a classe} -Digite as linhas em \ref{vb:início} e use \cls{abntexto}. +Digite as linhas em \ref{vb:início} e use \pkg{abntexto}. \legend{verb}{Início} \src\me \label{vb:início} @@ -209,13 +215,13 @@ Use o ambiente \cs{topics} para criar alíneas. Ele dispõe de dois níveis send \label{vb:topics} \verbon \begin{topics} - \item \label{alínea:x} 1 + \item \label{al:x} 1 \begin{topics} \item x \item y \item z \end{topics} - \item \label{alínea:y} 2 + \item \label{al:y} 2 \item 3 \end{topics}% \verboff @@ -241,11 +247,19 @@ Use \cs\place\ para inserir áreas de legenda como mostrado em \ref{vb:place}. M \section{Formatação de {\ttfamily\protect\textbackslash cite} e referências} -Até o momento esta classe não possui macros para formatação de \cs\cite\ e referências. Utilize \cs{\usepackage\{abnt2cite\}} ou \cs{\usepackage[style=abnt]\{biblatex\}}. +Até o momento o \pkg{abntexto} não possui macros para formatação de \cs\cite\ e referências. Utilize \cs{\usepackage\{abnt2cite\}} ou \cs{\usepackage[style=abnt]\{biblatex\}}. \section{Citações} -Para inserir aspas em citações diretas use \cs\qt\cc{texto}. Mas, se tratando de citações diretas com mais de três linhas, alterne para \cs\quote\ccval{enquoted text \cs\cite\cc{key}}. +Para inserir aspas em citações diretas use \cs\qt\ccval{texto}. Mas, se tratando de citações diretas com mais de três linhas, alterne para \cs\quote\ccval{texto \cs\cite\cc{key}}. + +\newpage + +{\def\section#1#2{\heading{#2}}% + \printbibliography\par} + +\newpage +\appendix \section{Código-fonte} diff --git a/macros/latex/contrib/abntexto/abntexto.bib b/macros/latex/contrib/abntexto/abntexto.bib new file mode 100644 index 0000000000..84b0e4d98d --- /dev/null +++ b/macros/latex/contrib/abntexto/abntexto.bib @@ -0,0 +1,25 @@ +@book{texbytopic, +author = {Viktor Eijkhout}, +title = {\TeX\ by topic: a \TeX nician’s reference}, +location = {England}, +publisher = {Addison-Wesley}, +date = {1992}, +url = {https://www.ctan.org/pkg/texbytopic}, +urldate = {2022-09-28} +} +@book{viaexemplos, +author = {Sadao Massago}, +title = {\LaTeXe\ Via Exemplos}, +location = {São Paulo}, +date = {2022-05-17}, +url = {https://www.ctan.org/pkg/latex-via-exemplos}, +urldate = {2022-09-28} +} +@book{latex2eunnoficial, +author = {Torsten Martinsen and Stephen Gilmore and Karl Berry}, +title = {\LaTeXe: An unofficial reference manual}, +date = {2022-05}, +url = {https://www.ctan.org/pkg/latex2e-help-texinfo}, +urldate = {2022-09-28} +} + diff --git a/macros/latex/contrib/abntexto/abntexto.cls b/macros/latex/contrib/abntexto/abntexto.cls index 09e3cf9750..9fa14dca86 100644 --- a/macros/latex/contrib/abntexto/abntexto.cls +++ b/macros/latex/contrib/abntexto/abntexto.cls @@ -1,8 +1,24 @@ %! Public Domain Software -%! 2022-09-25 -%! 1.0.0-alpha +%! 2022-09-29 +%! 1.1.0-alpha %! Elayson -%! elaysonabreu@gmail.com +%! abntexto dot classe at gmail dot com + +% ANNOUNCEMENT + +% The implementation of legend areas has been improved. + +% Inclusion of the \appendix and \annex macros. + +% Removal of \noprotrusion and \extfile macros. + +% Better compatibility with the hyperref package. + +% The functionality of topics has been improved. + +% Footnotes have been adjusted according to the Standard. + +% Additions to the manual. %! SUMÁRIO @@ -15,6 +31,7 @@ %! ALÍNEAS %! TABELAS %! ÁREAS DE LEGENDA +%! NOTAS DE RODAPÉ %! UTILIDADES %! IDENTIFICAÇÃO DO TRABALHO %! PATCHS, HOOKS @@ -23,26 +40,17 @@ % |sec PRÉ-CONFIGURAÇÕES % !======================================================= -% Identificação do formato |TeX| e da classe. Apenas o pacote |pkg=keyval= é carregado nesta classe. +% Identificação do formato |TeX| e da classe. Apenas o pacote |pkg keyval | é carregado no |pkg abntexto . % |bcode !------------------------------------------------ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{abntexto}[2022-09-25 1.0.0-alpha Preparation of works in ABNT standards] +\ProvidesClass{abntexto}[2022-09-29 1.1.0-alpha Preparation of works in ABNT standards] \RequirePackage{keyval} % |ecode !------------------------------------------------ -% Macros auxiliares e sistema |dest=<key|eq val>=. - -\ifx\csstring\undefined - \def\tnba@csstring#1{\expandafter\tnba@csstringA\string#1//} - \def\tnba@csstringA#1#2//{#2} -\else - \let\tnba@csstring=\csstring -\fi - -% Definição do sistema |dest=keyval= e de um comando de |dest=debug=. +% Definição do sistema |emph chave|eq%valor | e de um comando de |emph debug . % |bcode !------------------------------------------------ \def\tnba@keyprefix{tnba} @@ -52,36 +60,24 @@ \def\tnba@setmacrokeys#1{\setkeys{\tnba@keyprefix @#1}} \def\advancecount#1{\global\advance#1by1 } -\edef\tnba@bslash{\tnba@csstring\\} -\def\tnba@addto#1#2{\expandafter\def\expandafter#1\expandafter {#1#2}} +\def\tnba@addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} \def\tnba@tobdocument{\tnba@addto\tnba@bdocumenthook} -\AddToHook{begindocument}{\def\tnba@bdocument{}} +\let\tnba@bdocumenthook=\empty +\AddToHook{begindocument}{\def\tnba@inbody{}\tnba@bdocumenthook} \def\tnba@error{\ClassError{abntexto}} % |ecode !------------------------------------------------ -% |sec FONTES -% !================================================ - -\def\tnba@inputfonts#1{\@namedef{tnba@fonts@#1}} - -\tnba@inputfonts{Latin Modern}{\usepackage{amssymb,lmodern,bm}} - -\tnba@inputfonts{helvetica-clone}{\def\sfdefault{qhv}\def\familydefault{\sfdefault}} -\tnba@inputfonts{palatino-clone}{\usepackage{newpxtext,newpxmath,bm}} -\tnba@inputfonts{timesnewroman-clone}{\usepackage{newtxtext,newtxmath,bm}} - -\def\fonts#1{\ifcsname tnba@fonts@#1\endcsname - \csname tnba@fonts@#1\endcsname \else - \tnba@error{Fonte *#1* desconhecida}\relax \fi -} +% |sec FONTE TIPOGRÁFICA +% !======================================================= -% Apenas o tamanho 12|,pt está definido. Defina outros usando |cs=fontsizedef=|metac=size=|metac=defs=. +% Apenas o tamanho 12|,pt está definido. Defina outros usando |cs fontsizedef |metac size |metac defs . % |bcode !------------------------------------------------ \def\fontsizedef#1#2{\@namedef{tnba@fontsize@#1}{#2}} \def\sizeselectordef#1#2#3{\DeclareRobustCommand#1{\@setfontsize#1{#2}{#3}}} +\def\normalsizedef#1#2{\def\normalsize{\@setfontsize\normalsize{#1}{#2}}} \def\setfontsize#1{\ifcsname tnba@fontsize@#1\endcsname \def\tnba@setfontsizehook{\csname tnba@fontsize@#1\endcsname} \else \let\normalsize=\relax @@ -89,9 +85,8 @@ } \AddToHook{begindocument/before}{\tnba@setfontsizehook} -% |ecode !------------------------------------------------ -\def\spacing#1{\ifx\tnba@bdocument\undefined +\def\spacing#1{\ifx\tnba@inbody\undefined \def\tnba@spacinghook{\tnba@spacing{#1}} \else \tnba@spacing{#1}\fi \ignorespaces } @@ -102,10 +97,12 @@ \def\doublesp{\spacing{2}} \AddToHook{begindocument}{\csname tnba@spacinghook\endcsname} +% |ecode !------------------------------------------------ -% LAYOUT -% ================================================ +% |sec |emph LAYOUT +% !======================================================= +% |bcode !------------------------------------------------ \def\tnba@keyfamily{paper} \def\papersizedef#1(#2,#3){\def\tnba@keyfamily{paper}% @@ -136,7 +133,7 @@ \advance\headsep-\fontcharht\font`1 \ifx\pdfpagewidth\undefined \ifx\pagewidth\undefined - \tnba@error{O comando \tnba@bslash paper só suporta saída em PDF. Use o formato PDF ou carregue o pacote *geometry*}\expandafter\enddocument\relax \else + \tnba@error{O comando \@backslashchar paper só suporta saída em PDF. Use o formato PDF ou carregue o pacote *geometry*}\expandafter\enddocument\relax \else \horigin=0pt \vorigin=0pt \pagewidth=\paperwidth @@ -158,7 +155,9 @@ \ifx\tnba@twoside\undefined \else \csname @twoside\tnba@twoside\endcsname \fi } +% |ecode !------------------------------------------------ +% |bcode !------------------------------------------------ \def\pretextual{\paper{twoside=false}% \let\@oddhead=\empty \let\@evenhead=\empty @@ -173,13 +172,13 @@ \justifying \parindent=1.5cm } +% |ecode !------------------------------------------------ -% SUMÁRIO -% ================================================ +% |sec SUMÁRIO +% !======================================================= +% |bcode !------------------------------------------------ \def\thepage{\the\c@page} -\def\noprotrusion{\kern-1pt\kern1pt} -\def\extfile#1{\@starttoc{#1}} \def\extline#1#2#3#4{% \begingroup @@ -187,7 +186,7 @@ \extlineshape \hskip-\leftskip {#3}\nobreak \leaders\hbox{$\m@th \mkern4.5mu\hbox{.}\mkern4.5mu$}\hfil\nobreak - \hbox to1.55em{\hss #4\noprotrusion}\par + \hbox to1.55em{\hss #4\kern-1pt\kern1pt}\par \endgroup } \def\extlineshape{% @@ -204,7 +203,7 @@ \usetocifont \nobreak \extlineshape \hskip-\leftskip \maybeuctoc{#1}\nobreak\hfil\nobreak - \hbox to1.55em{\hss #2\noprotrusion}\par + \hbox to1.55em{\hss #2\kern-1pt\kern1pt}\par \endgroup } \def\l@subsection {\extline{toc}{2}} @@ -217,10 +216,12 @@ \def\tociiifont#1{\def\usetociiifont{#1}} \def\tocivfont#1{\def\usetocivfont{#1}} \def\tocvfont#1{\def\usetocvfont{#1}} +% |ecode !------------------------------------------------ -% SECIONAMENTO -% ================================================ +% |sec SECIONAMENTO +% !======================================================= +% |bcode !------------------------------------------------ \def\tnba@nbpar{\interlinepenalty=10000\par} \def\noindentfirst{\global\everypar={\tnba@wipeepar \setbox7=\lastbox}} \def\tnba@wipeepar{\global\everypar={}} @@ -236,7 +237,9 @@ \ifdim\savedlastskip>\dimen0 \vskip\savedlastskip \else #2\fi } \def\smartbelowskip#1{#1\global\savedtitleskip=\lastskip \penalty11333} +% |ecode !------------------------------------------------ +% |bcode !------------------------------------------------ \newcount\sectioncount \newcount\subsectioncount \newcount\subsubsectioncount @@ -254,12 +257,16 @@ \def\subsubsectionmark#1{} \def\paragraphmark#1{} \def\subparagraphmark#1{} +% |ecode !------------------------------------------------ +% |bcode !------------------------------------------------ \def\section#1{\par \smartaboveskip{\penalty351}{\vskip\sectionabove}\noindent \advancecount\sectioncount + \def\@currentlabel{seção~\thesection}% \setbox0=\hbox{\usesectionfont \thesection\quad}% {\usesectionfont \hangindent=\wd0 \box0 \maybeucsec{#1}\tnba@nbpar}% % \noindentfirst + \hreftocline{section}% \addcontentsline{toc}{section}{\protect\extlabelbox{\thesection\hss}#1}% \nobreak \smartbelowskip{\vskip\sectionbelow}% } @@ -268,6 +275,7 @@ \setbox0=\hbox{\usesubsectionfont \thesubsection\quad}% {\usesubsectionfont \hangindent=\wd0 \box0 #1\tnba@nbpar}% % \noindentfirst + \hreftocline{subsection}% \addcontentsline{toc}{subsection}{\protect\extlabelbox{\thesubsection\hss}#1}% \nobreak \smartbelowskip{\vskip\subsectionbelow}% } @@ -276,6 +284,7 @@ \setbox0=\hbox{\usesubsubsectionfont \thesubsubsection\quad}% {\usesubsubsectionfont \hangindent=\wd0 \box0 #1\tnba@nbpar}% % \noindentfirst + \hreftocline{subsubsection}% \addcontentsline{toc}{subsubsection}{\protect\extlabelbox{\thesubsubsection\hss}#1}% \nobreak \smartbelowskip{\vskip\subsubsectionbelow}% } @@ -284,6 +293,7 @@ \setbox0=\hbox{\useparagraphfont \theparagraph\quad}% {\useparagraphfont \hangindent=\wd0 \box0 #1\tnba@nbpar}% % \noindentfirst + \hreftocline{paragraph}% \addcontentsline{toc}{paragraph}{\protect\extlabelbox{\theparagraph\hss}#1}% \nobreak \smartbelowskip{\vskip\paragraphbelow}% } @@ -292,17 +302,23 @@ \setbox0=\hbox{\subsubparagraphfont \thesubparagraph\quad}% {\usesubparagraphfont \hangindent=\wd0 \box0 #1\tnba@nbpar}% % \noindentfirst + \hreftocline{subparagraph}% \addcontentsline{toc}{subparagraph}{\protect\extlabelbox{\thesubparagraph\hss}#1}% \nobreak \smartbelowskip{\vskip\subparagraphbelow}% } \def\heading#1{\noindent {\usesectionfont \centering \maybeucsec{#1}\tnba@nbpar}% -% \noindentfirst \nobreak \vskip\sectionbelow -% \addcontentsline{toc}{section}{\hbox to\extlabelwidth{}\maybeuctoc{#1}}% } +\def\hreftocline#1{\Hy@MakeCurrentHrefAuto{#1}% + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}% +} +\tnba@tobdocument{\ifx\hypertarget\undefined \let\hreftocline=\@gobble \fi} +% |ecode !------------------------------------------------ + +% |bcode !------------------------------------------------ \def\tociuppercase{\def\maybeuctoc{\MakeUppercase}} \def\tocilowercase{\let\maybeuctoc=\relax} \def\sectionuppercase{\def\maybeucsec{\MakeUppercase}} @@ -319,27 +335,61 @@ \def\subsubsectionspaces#1#2{\def\subsubsectionabove{#1}\def\subsubsectionbelow{#2}} \def\paragraphspaces#1#2{\def\paragraphabove{#1}\def\paragraphbelow{#2}} \def\subparagraphspaces#1#2{\def\subparagraphabove{#1}\def\subparagraphbelow{#2}} +% |ecode !------------------------------------------------ + +% |bcode !------------------------------------------------ +\newcount\appendixcount +\newcount\annexcount + +\def\theappendix{\@Alph\appendixcount} +\def\theannex{\@Alph\annexcount} +\def\appendixlabelwidth{8em} +\def\annexlabelwidth{6.2em} + +\def\l@appendix{% + \let\extlabelwidth=\appendixlabelwidth + \def\extlabelbox##1{\hbox to\extlabelwidth{Apêndice~##1~---~\hfil}}% + \l@section +} +\def\l@annex{% + \let\extlabelwidth=\annexlabelwidth + \def\extlabelbox##1{\hbox to\extlabelwidth{Anexo~##1~---~\hfil}}% + \l@section +} + +\def\appendix{\def\section##1{\noindent \advance\appendixcount by1 + {\usesectionfont \centering \maybeucsec{Apêndice~\theappendix~---~##1}\tnba@nbpar}% + \addcontentsline{toc}{appendix}{\protect\extlabelbox{\theappendix}##1}% + \nobreak \vskip\sectionbelow + }% +} +\def\annex{\def\section##1{\noindent \advance\annexcount by1 + {\usesectionfont \centering \maybeucsec{Anexo~\theannex~---~##1}\tnba@nbpar}% + \addcontentsline{toc}{annex}{\protect\extlabelbox{\theannex}##1}% + \nobreak \vskip\sectionbelow + }% +} +% |ecode !------------------------------------------------ -% CITAÇÕES -% ================================================ +% |sec CITAÇÕES +% !======================================================= +% |bcode !------------------------------------------------ \def\qt#1{``#1''} \def\quote#1{\smartaboveskip{\penalty351}{\vskip\baselineskip}% -\hfill\vtop{\advance\hsize-4cm \noindent\small #1\getprev}\useprev + \hbox to\hsize{\hfil\vtop{\advance\hsize-4cm \noindent\small #1\getprev}}\useprev \smartbelowskip{\vskip\baselineskip}% } +% |ecode !------------------------------------------------ -% ALÍNEAS -% ================================================ +% |sec ALÍNEAS +% !======================================================= +% |bcode !------------------------------------------------ \newcount\topicsdepth \newcount\topicscount -\def\topicsindenti{\advance\leftskip\topicslabelwidth} -\def\topicsindentii{\advance\leftskip\topicslabelwidth \advance\leftskip\topicslabelwidth} -\def\topicslabelwidth{4ex} - \def\topicsitem{\par\leavevmode\noindent \advance\topicscount by1 \def\@currentlabel{alínea~\@alph\topicscount )}% \kern\dimexpr-\parindent-\topicslabelwidth\relax @@ -350,23 +400,26 @@ \def\topicslabelii{---} \def\topics{\par \advance\topicsdepth by1 - \leftskip=\parindent - \csname topicsindent\romannumeral\topicsdepth\endcsname + \ifnum\topicsdepth=1 \advance\leftskip\parindent \fi + \advance\leftskip\topicslabelwidth \edef\topicsmakelabel{\expandafter\noexpand\csname topicslabel\romannumeral\topicsdepth\endcsname}% \let\item=\topicsitem \tnba@addto\@esphack\ignorespaces } - \let\endtopics=\par +% |ecode !------------------------------------------------ % |sec TABELAS -% ! ================================================ +% !======================================================= +% |bcode !------------------------------------------------ \newenvironment{table}[1]{\begin{tabular}{#1}}{\end{tabular}} +% |ecode !------------------------------------------------ -% ÁREAS DE LEGENDA -% ================================================ +% |sec ÁREAS DE LEGENDA +% !======================================================= +% |bcode !------------------------------------------------ %\long\def\@makecaption#1#2{\sbox0{#1~—~#2}% % \ifdim\wd0>\hsize % #1~—~#2\par \else @@ -389,24 +442,28 @@ % \@nameedef{ftype@#1}{\the\numexpr\tnba@lastplacenum+1} % \@namedef{fnum@#1}{\csname #1name\endcsname ~\csname the#1\csname} } +% |ecode !------------------------------------------------ -\def\tnba@makelegend{\advancecount{\csname c@\tnba@savedplace\endcsname}% - \hfil \hbox{\vtop{\setbox0=\hbox{\legendlabel \tnba@savedlegend}% +% |bcode !------------------------------------------------ +\def\tnba@makelegend{\hbox to\hsize{\hfil\tnba@makelegendA\hfil}} +\def\tnba@makelegendA{\advancecount{\csname c@\tnba@savedplace\endcsname}% + \vtop{\setbox0=\hbox{\legendlabel \tnba@savedlegend}% \ifdim\wd0>\legendmaxwidth \hsize=\legendmaxwidth \else \hsize=\wd0 \fi - \setbox0=\hbox{\legendlabel}\legendlabel - \vtop{\advance\hsize-\wd0 \tnba@savedlegend}% - }}% + \legendlabel + \vtop{\setbox0=\hbox{\legendlabel}\advance\hsize-\wd0 \tnba@savedlegend}% + }% \addcontentsline{\csname ext@\tnba@savedplace\endcsname}% - {\tnba@savedplace}% - {\protect\extlabelbox\thelegend \tnba@savedlegend}% + {\tnba@savedplace}% + {\protect\extlabelbox\thelegend \tnba@savedlegend}% } -\def\tnba@makesrc{\vskip8pt - \hfil \hbox{\vtop{\hsize=\tnba@placewidth - \setbox0=\hbox{\srclabel}\srclabel - \vtop{\advance\hsize-\wd0 \tnba@savedsrc\getprev}% - }}\useprev + +\def\tnba@makesrc{\hbox to\hsize{\hfil\tnba@makesrcA\hfil}\useprev} +\def\tnba@makesrcA{\vtop{\hsize=\tnba@placewidth \srclabel + \vtop{\setbox0=\hbox{\srclabel}\advance\hsize-\wd0 \tnba@savedsrc \getprev}}% } +% |ecode !------------------------------------------------ +% |bcode !------------------------------------------------ \def\legend#1#2{% \ifdim\lastskip<0pt \else \ifnum\lastpenalty=11333 \vskip-\placeabovespace \else @@ -425,33 +482,49 @@ \def\tnba@savedsrc{#1}% } \def\srcname{Fonte} +% |ecode !------------------------------------------------ -\def\placespaces#1#2{\def\placeabovespace{#1}\def\placebelowspace{#2}} - +% |bcode !------------------------------------------------ \let\tnba@savedplace=\empty \let\tnba@savedlegend=\empty \let\tnba@savedsrc=\empty -\long\def\place#1{% - \ifx\tnba@savedplace\empty \else \vskip\placeabovespace \fi - \begingroup \setbox0=\hbox{\ignorespaces#1}\edef\tnba@placewidth{\the\wd0}% +\long\def\place#1{\setbox0=\hbox{\ignorespaces#1}\edef\tnba@placewidth{\the\wd0}% + \vskip\placeabovespace + \begingroup \parindent=0pt - \ifx\tnba@savedplace\empty\else\tnba@makelegend\fi - \nobreak\par\nointerlineskip - \hbox to\hsize{\hss\box0\hss}% - \nobreak\par\nointerlineskip - \ifx\tnba@savedsrc\empty \else \tnba@makesrc \vskip\placebelowspace \fi -\par + \ifx\tnba@savedplace\empty\else\tnba@makelegend\fi + \nointerlineskip\nobreak\vskip10pt + \hbox to\hsize{\hfil\box0\hfil}% + \nointerlineskip\nobreak\vskip8pt + \tnba@makesrc + \vskip\placebelowspace \endgroup \let\tnba@savedplace=\empty \let\tnba@savedlegend=\empty \let\tnba@savedsrc=\empty - \let\@currentlabel=\relax + \let\@currentlabel=\empy } +\def\placespaces#1#2{\def\placeabovespace{#1}\def\placebelowspace{#2}} +% |ecode !------------------------------------------------ + +% |sec NOTAS DE RODAPÉ +% !======================================================= + +% As notas de rodapé também foram modificadas. -% UTILIDADES -% ================================================ +% |bcode !------------------------------------------------ +\let\footnotesize=\relax +\def\@makefnmark{\hbox{\@textsuperscript{\selectfont\@thefnmark}}} +\def\@makefntext#1{\leavevmode \setbox0=\hbox{\@makefnmark\kern2pt}% +\hangindent=\wd0 \box0 \small #1} +\def\footnoterule{\kern18pt\hrule width5cm\kern2.6pt} +% |ecode !------------------------------------------------ + +% |sec UTILIDADES +% !======================================================= +% |bcode !------------------------------------------------ \def\getprev{\par\xdef\tnba@getprevA{\the\prevdepth}} \def\useprev{\par\prevdepth=\tnba@getprevA} @@ -468,10 +541,12 @@ \def\tnba@EnterS[#1]{\vskip#1\baselineskip} \def\twonewpage{\newpage\leavevmode\newpage} +% |ecode !------------------------------------------------ -% IDENTIFICAÇÃO DO TRABALHO -% ================================================ +% |sec IDENTIFICAÇÃO DO TRABALHO +% !======================================================= +% |bcode !------------------------------------------------ %\long\def\indexcarddebug#1{\hbox{\vrule\vbox to7.5cm{\hsize=\hsize %\advance\hsize-2cm \advance\hsize-0.8pt % \hrule\indexcardA{#1}\vss\indexcardbar\hrule}\vrule}% %} @@ -487,14 +562,15 @@ \def\indexcardbar{\hrule\kern1cm} \def\judgeline#1{\par{\centering \rule{.7\linewidth}{.6pt}\\ #1\Enter[1.5]}} +% |ecode !------------------------------------------------ -% |sec ? -% ! ================================================ +% |sec A VÍRGULA COMO SEPARADOR DECIMAL +% !======================================================= +% |bcode !------------------------------------------------ {\catcode`,=\active \gdef,{\futurelet\next\tnba@smartcomma} } - \def\tnba@smartcomma{% \ifx\next\@sptoken \else \ifx\next\space \else \mathord \fi\fi @@ -503,20 +579,23 @@ \mathchardef\tnba@mathcomma\mathcode`\, \mathcode`\,="8000 +% |ecode !------------------------------------------------ +% |bcode !------------------------------------------------ \ifx\XeTeXversion\undefined \AddToHook{begindocument/before}{ \let\tnba@hyper@linkstart=\hyper@linkstart \protected\def\hyper@linkstart#1#2{\lowercase{\tnba@hyper@linkstart{#1}{#2}}} } \fi +% |ecode !------------------------------------------------ % |sec INICIALIZAÇÃO -% ! ================================================ +% !======================================================= % |bcode !------------------------------------------------ \fontsizedef{12pt}{ - \sizeselectordef\normalsize{12pt}{14.5pt} + \normalsizedef{12pt}{14.5pt} \sizeselectordef\small{10pt}{12pt} } \setfontsize{12pt} @@ -568,19 +647,21 @@ \def\makelof{\heading{Lista de figuras} \def\extlabelwidth{12.5ex}% \def\extlabelbox##1{\hbox to\extlabelwidth{Figura ##1 ---\hfil}}% - \extfile{lof}\newpage + \@starttoc{lof}\twonewpage } \def\makelot{\heading{Lista de tabelas} - \def\extlabelwidth{12.5ex} + \def\extlabelwidth{12.5ex}% \def\extlabelbox##1{\hbox to\extlabelwidth{Tabela ##1 ---\hfil}}% - \extfile{lot}\newpage + \@starttoc{lot}\twonewpage } \def\maketoc{\heading{Sumário} - \def\extlabelwidth{4ex} + \def\extlabelwidth{4ex}% \def\extlabelbox##1{\hbox to\extlabelwidth{##1\hfil}}% - \extfile{toc}\newpage + \@starttoc{toc}\newpage } +\def\topicslabelwidth{4ex} + \arrayrulewidth=0.4pt \topskip=12pt |