summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/abnt
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-12-15 03:00:40 +0000
committerNorbert Preining <norbert@preining.info>2019-12-15 03:00:40 +0000
commit6a10e5334a233fe321991967f0d9dfd930303a46 (patch)
tree8cefd5aaed1203e74693312b5ff76e03b3423d42 /macros/latex/contrib/abnt
parent2c20697e8a5301b61c59d752fd1cfa7499724eec (diff)
CTAN sync 201912150300
Diffstat (limited to 'macros/latex/contrib/abnt')
-rw-r--r--macros/latex/contrib/abnt/README.md2
-rw-r--r--macros/latex/contrib/abnt/abnt-doc.pdfbin97368 -> 116620 bytes
-rw-r--r--macros/latex/contrib/abnt/abnt-doc.tex107
-rw-r--r--macros/latex/contrib/abnt/abnt.sty37
4 files changed, 123 insertions, 23 deletions
diff --git a/macros/latex/contrib/abnt/README.md b/macros/latex/contrib/abnt/README.md
index 5e30fe9d13..9903f258c1 100644
--- a/macros/latex/contrib/abnt/README.md
+++ b/macros/latex/contrib/abnt/README.md
@@ -2,7 +2,7 @@
This package implements rules to typeset Brazilian academic texts.
-Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2018
+Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2019
This file is part of the abnt LaTeX2e package.
This work may be distributed and/or modified under the conditions of
diff --git a/macros/latex/contrib/abnt/abnt-doc.pdf b/macros/latex/contrib/abnt/abnt-doc.pdf
index 0f4f6084cc..4a46b94fb2 100644
--- a/macros/latex/contrib/abnt/abnt-doc.pdf
+++ b/macros/latex/contrib/abnt/abnt-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/abnt/abnt-doc.tex b/macros/latex/contrib/abnt/abnt-doc.tex
index 4d4b0a80aa..4b19c0e001 100644
--- a/macros/latex/contrib/abnt/abnt-doc.tex
+++ b/macros/latex/contrib/abnt/abnt-doc.tex
@@ -1,5 +1,6 @@
\documentclass{ltxdoc}
\usepackage[svgnames,dvipsnames]{xcolor}
+\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont{Warnock Pro}
\setsansfont{Cronos Pro}
@@ -7,26 +8,27 @@
\usepackage{polyglossia}
\setmainlanguage{brazil}
\usepackage{tcolorbox}
-\tcbuselibrary{listings,skins,xparse}
+\tcbuselibrary{listings,skins,xparse,breakable}
\usepackage{tikz}
\usetikzlibrary{positioning,shapes,snakes}
-\newtcblisting[auto counter,list inside=codigo]{codigo}[2][]{%
- %title={Código~\thetcbcounter:~#2},
- title=#2,
- hbox,
+\newtcblisting[auto counter,list inside=codigo,number within=chapter]{codigo}[2][]{%
+ %title={Exemplo~\thetcbcounter:~#2},
+ %list entry={\protect\numberline{\thetcbcounter}#2},
+ title={#2},
center,
- colback=green!30,
+ colback=green!20,
colbacktitle=green!50,
colframe=green,
- listing only,fonttitle=\bfseries\sffamily\large,coltitle=black,titlerule=0pt,enhanced,drop fuzzy shadow%halign title=center
- }
+ listing only,
+ fonttitle=\bfseries\sffamily\large,coltitle=black,titlerule=0pt,enhanced,drop fuzzy shadow,breakable,#1%halign title=center
+}
\title{\tikz \node[inner sep=0pt,remember picture,overlay] at (0,1){\includegraphics[height=3cm,width=0.4\textwidth,keepaspectratio]{icone}};\\O pacote <<\texttt{abnt}>>}
\author{Youssef Cherem}
-\date{2018}
+\date{2019}
\begin{document}
\frenchspacing
@@ -34,7 +36,7 @@
\begin{center}
\tikz\node[diamond,shape aspect=1.2,%draw=green,ultra thick,
remember picture,overlay,%minimum size=0.6\textwidth,
- left color=SpringGreen,shading angle=45,align=center] at (0,0){\includegraphics[height=3cm,width=0.4\textwidth,keepaspectratio]{icone}\\{\Large O pacote <<\texttt{abnt}>>}\\[10pt]\large Youssef Cherem\\[6pt]2018};
+ left color=SpringGreen,shading angle=45,align=center] at (0,0){\includegraphics[height=3cm,width=0.4\textwidth,keepaspectratio]{icone}\\{\Large O pacote <<\texttt{abnt}>>}\\[10pt]\large Youssef Cherem\\[6pt]2019};
\end{center}
\vspace{4cm}
@@ -45,9 +47,9 @@
%\tcblistof[\section*]{codigo}{Lista de Códigos}
O pacote \tcboxverb[blank,fuzzy halo=.5mm with green]{abnt} é uma interpretação suficiente, mas não exaustiva, das normas da ABNT. É uma implementação concisa das normas, proporcionando \textit{facilidade} e \textit{flexibilidade} ao usuário. O uso deste pacote não dispensa conhecimento básico de \LaTeX, e não há qualquer garantia de que será aceito pela sua instituição sem nenhuma modificação. Seu objetivo é reduzir ao mínimo a interferência de comandos alheios às classes comuns.
-Sugere-se seu emprego com a classe \texttt{book}, mas também pode, porventura, funcionar com outras classes.
+Sugere-se seu emprego com a classe \tcboxverb[blank,fuzzy halo=.5mm with teal]{book} ou com a classe \tcboxverb[blank,fuzzy halo=.5mm with red]{scrbook}.
-Seus comandos são:
+Comandos para elementos na capa e folha de rosto:
\begin{codigo}{}
\orientador{} \orientadora{} \coorientador{} \coorientadora{}
@@ -61,6 +63,14 @@ Para mudar as fontes dos elementos:
\titlefont{} \authorfont{} \localfont{} \datefont{}
\end{codigo}
+Para elementos pré-textuais (sem números de página) e textuais (com números de página):
+
+\begin{codigo}{}
+\pretextual \textual
+\end{codigo}
+
+Esses comandos não são obrigatórios nem aplicados por padrão. O usuário pode redefinir o cabeçalho como quiser, usando os comandos do pacote \tcboxverb[blank,fuzzy halo=.5mm with green]{scrlayer-scrpage}.
+
Também são disponibilizados ambientes e listas para quadros e mapas, além das usuais figuras e tabelas. Assim, podem ser inseridas listas de “quadros” e “mapas”:
\begin{codigo}{}
@@ -99,6 +109,77 @@ Aqui, definimos um novo ambiente “escultura”, com um arquivo de lista de ext
Todos os outros comandos são os usuais das classes padrão. Recomenda-se o uso do pacote \texttt{biblatex-abnt} para as normas de citação e referências bibliográficas segundo a ABNT.
-Se porventura o usuário necessitar alterações, sugere-se empregar os pacotes \texttt{titlesec} e \texttt{sectsty}, para títulos, e o pacote \texttt{scrlayer-scrpage} para cabeçalhos, e o pacote \texttt{tocstyle} para listas e sumário, ou então redefinir os comandos de sua classe (p. ex., \texttt{book.cls}).
+Se o usuário necessitar alterações, uma das formas mais simples é usar os comandos das classes
+\tcboxverb[blank,fuzzy halo=.5mm with red]{KOMA-Script}:
+
+ \begin{codigo}{}
+ \documentclass[footsepline=true,headsepline=true]{scrbook}
+ \usepackage{abnt}
+ \usepackage{xcolor,xcolor-material}
+ \usepackage[sfdefault,lf]{FiraSans}
+
+ %se quiser linha no rodapé
+ \ModifyLayer[addvoffset=-.8ex]{scrheadings.foot.above.line}
+ \ModifyLayer[addvoffset=-.8ex]{plain.scrheadings.foot.above.line}
+
+%\pagestyle{scrheadings}
+%\clearscrheadfoot
+%\ihead{\headmark}
+%\ohead{\pagemark}
+% pretextual já faz isso.
+
+\setkomafont{footsepline}{\color{orange}}
+\setkomafont{headsepline}{\color{teal!50!yellow}}
+\setkomafont{pagenumber}{\normalfont\bfseries\sffamily\color{red}}
+
+\renewcommand*{\chapterpagestyle}{scrheadings} %not needed
+
+\RedeclareSectionCommands
+[beforeskip=\baselineskip, afterskip=\baselineskip,font=\normalsize\bfseries]
+{part,chapter,
+section,subsection,paragraph,subparagraph}
+
+\setkomafont{chapter}{\color{orange}} \setkomafont{section}{\color{teal}}
+\setkomafont{subsection}{\color{green!50!black}}
+
+ %\setkomafont{disposition}{\normalsize} %doesn't work
+
+ \KOMAoptions{headsepline=2pt:\textwidth,footsepline=2pt:\textwidth}
+
+%medidas
+\DeclareNewLayer[
+ background,
+ %outermargin,
+ %topmargin,
+ contents=\layercontentsmeasure
+ ]{measurelayer}
+\AddLayersToPageStyle{@everystyle@}{measurelayer}
+\usepackage{showframe}
+
+\begin{document}
+
+\pretextual
+
+\textual
+
+\chapter{Capítulo}
+\section{Seção}
+\subsection{Subseção}
+
+\chapter{Capítulo}
+\section{Seção}
+\subsection{Subseção}
+\newpage
+\subsection{title}
+\end{document}
+
+\end{codigo}
+
+
+\begin{tcolorbox}[center,width=.8\textwidth]
+\centering
+\includegraphics[width=\linewidth]{koma}
+\end{tcolorbox}
+
\end{document}
diff --git a/macros/latex/contrib/abnt/abnt.sty b/macros/latex/contrib/abnt/abnt.sty
index 4c89246eba..d3cdd42b4b 100644
--- a/macros/latex/contrib/abnt/abnt.sty
+++ b/macros/latex/contrib/abnt/abnt.sty
@@ -1,5 +1,5 @@
%% abnt.sty
-%% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2018
+%% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2019
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -14,7 +14,7 @@
% The Current Maintainer of this work is Youssef Cherem.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{abnt}[2018/11/19]
+\ProvidesPackage{abnt}[2019/12/14]
\RequirePackage[left=3cm,top=3cm,right=2cm,bottom=2cm]{geometry}
\RequirePackage{setspace}
\RequirePackage[automark,markcase=used]{scrlayer-scrpage}
@@ -27,7 +27,7 @@
\lehead*{\pagemark}
}
-\RequirePackage{emptypage}
+
\RequirePackage{etoolbox}%\ifdefempty{def}{true}{false}
@@ -129,17 +129,39 @@ linefill=\TOCLineLeaderFill,
\newcommand{\@tipotrabalho}{}
\newcommand{\tipotrabalho}[1]{\gdef\@tipotrabalho{#1}}
+
+%titlefont, @authorfont and @datefont defined by koma classes
+
+\@ifundefined{KOMAClassName}{%
+ \typeout{Usando uma classe padrão}
+% if not koma
+\RequirePackage{emptypage}
\newcommand*{\@titlefont}{\bfseries}
\newcommand*{\titlefont}[1]{\gdef\@titlefont{#1}}
-
\newcommand*{\@authorfont}{\normalfont}
\newcommand*{\authorfont}[1]{\gdef\@authorfont{#1}}
+\newcommand*{\@datefont}{\normalfont}
+\newcommand*{\datefont}[1]{\gdef\@datefont{#1}}
+}
+{% if koma
+\typeout{Usando KOMA-Sript.}
+%\KOMAoptions{cleardoublepage=empty} not needed in koma version 3.0 and later
+\newcommand*{\@titlefont}{\bfseries}
+\renewcommand*{\titlefont}[1]{\gdef\@titlefont{#1}}
+\renewcommand*{\@authorfont}{\normalfont}
+\newcommand*{\authorfont}[1]{\gdef\@authorfont{#1}}
+\renewcommand*{\@datefont}{\normalfont}
+\newcommand*{\datefont}[1]{\gdef\@datefont{#1}}
+}
+
+
+\@ifclassloaded{scrbook}{%
+\typeout{Usando a classe scrbook}
+}{}
\newcommand*{\@localfont}{\normalfont}
\newcommand*{\localfont}[1]{\gdef\@localfont{#1}}
-\newcommand*{\@datefont}{\normalfont}
-\newcommand*{\datefont}[1]{\gdef\@datefont{#1}}
\newcommand*{\@instituicaofont}{\normalfont}
\newcommand*{\instituicaofont}[1]{\gdef\@instituicaofont{#1}}
@@ -197,7 +219,4 @@ linefill=\TOCLineLeaderFill,
-\onehalfspacing
-
-
\endinput \ No newline at end of file