From 817ecb96eab4ed6494ddb6b8d0f17c2947a91196 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 29 Apr 2020 03:03:01 +0000 Subject: CTAN sync 202004290303 --- macros/latex/contrib/abnt/README.md | 2 +- macros/latex/contrib/abnt/abnt-doc.pdf | Bin 116620 -> 119879 bytes macros/latex/contrib/abnt/abnt-doc.tex | 36 +++++++++-- macros/latex/contrib/abnt/abnt.sty | 113 +++++++++++++++++++++++---------- 4 files changed, 108 insertions(+), 43 deletions(-) (limited to 'macros/latex/contrib/abnt') diff --git a/macros/latex/contrib/abnt/README.md b/macros/latex/contrib/abnt/README.md index 9903f258c1..28a27ccf94 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 , 2019 +Copyright (c) Youssef Cherem , 2020. 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 4a46b94fb2..3b82b51321 100644 Binary files a/macros/latex/contrib/abnt/abnt-doc.pdf and b/macros/latex/contrib/abnt/abnt-doc.pdf differ diff --git a/macros/latex/contrib/abnt/abnt-doc.tex b/macros/latex/contrib/abnt/abnt-doc.tex index 4b19c0e001..389bd6c5ea 100644 --- a/macros/latex/contrib/abnt/abnt-doc.tex +++ b/macros/latex/contrib/abnt/abnt-doc.tex @@ -28,7 +28,7 @@ \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{2019} +\date{2020} \begin{document} \frenchspacing @@ -107,12 +107,31 @@ within=none]{escultura} Aqui, definimos um novo ambiente “escultura”, com um arquivo de lista de extensão \texttt{loe} e nome “Lista de Figuras”, cujo contador não recomeça em todos os capítulos (\texttt{within=none}). \verb|\l@escultura| serve para redefinir os espaços na lista. Para alternativas de formatação, referir-se à documentação dos pacotes \texttt{newfloat} e \texttt{caption}. +Uma alternativa simplificada para essas definições está disponível ao utilizar uma das classes \tcboxverb[blank,fuzzy halo=.5mm with red]{KOMA-Script} (\texttt{scrbook}, \texttt{scrartcl} e \texttt{scrreport}): + +\begin{codigo}{} +\DeclareNewTOC[% +type=exercicio,% +types=exercicios,% +float,% define a floating environment +floattype=4,% +name=Exercício,% +%counterwithin=chapter, +listname={Lista de Exercícios}, +%tocentryindent=0pt,% <- added +tocentrydynnumwidth,% <- added +tocentrynumsep=0pt% <- added +]{loe} +\setuptoc{loe}{chapteratlist} + +\BeforeStartingTOC[loe]{\def\autodot{\hfill~--~\hfill}} +\end{codigo} + + 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 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}{} + \begin{codigo}{Exemplo com a classe scrbook} \documentclass[footsepline=true,headsepline=true]{scrbook} \usepackage{abnt} \usepackage{xcolor,xcolor-material} @@ -132,17 +151,20 @@ Se o usuário necessitar alterações, uma das formas mais simples é usar os co \setkomafont{headsepline}{\color{teal!50!yellow}} \setkomafont{pagenumber}{\normalfont\bfseries\sffamily\color{red}} -\renewcommand*{\chapterpagestyle}{scrheadings} %not needed +%\renewcommand*{\chapterpagestyle}{scrheadings} %não necessário - já implementado +%todos esses elementos iguais \RedeclareSectionCommands [beforeskip=\baselineskip, afterskip=\baselineskip,font=\normalsize\bfseries] {part,chapter, -section,subsection,paragraph,subparagraph} +section,subsection,subsubsection} + \setkomafont{chapter}{\color{orange}} \setkomafont{section}{\color{teal}} \setkomafont{subsection}{\color{green!50!black}} - %\setkomafont{disposition}{\normalsize} %doesn't work + %\setkomafont{disposition}{\normalsize} % não funciona, redefinição com + %\RedeclareSectionCommand ou \RedeclareSectionCommands \KOMAoptions{headsepline=2pt:\textwidth,footsepline=2pt:\textwidth} diff --git a/macros/latex/contrib/abnt/abnt.sty b/macros/latex/contrib/abnt/abnt.sty index d3cdd42b4b..a29009e1ad 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 , 2019 +%% Copyright (c) Youssef Cherem , 2020 % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -9,12 +9,12 @@ % 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'. +% This work has the LPPL maintenance status `author-maintained'. % % The Current Maintainer of this work is Youssef Cherem. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{abnt}[2019/12/14] +\ProvidesPackage{abnt}[2020/04/14] \RequirePackage[left=3cm,top=3cm,right=2cm,bottom=2cm]{geometry} \RequirePackage{setspace} \RequirePackage[automark,markcase=used]{scrlayer-scrpage} @@ -55,42 +55,13 @@ }} - - -\RequirePackage{newfloat} -\DeclareFloatingEnvironment[fileext=lom,listname={Lista de mapas},within=none]{mapa} -\DeclareFloatingEnvironment[fileext=loq,listname={Lista de quadros},within=none]{quadro} - -\RequirePackage{caption} - -%\DeclareCaptionListFormat{list}{#1#2~--} -%\DeclareCaptionListFormat{list}{#1#2~--} -\DeclareCaptionListFormat{listafigura}{\figurename\ #1#2\hfill--\hfill}%\hfill--\hfill -\DeclareCaptionListFormat{listamapa}{\mapaname\ #1#2\hfill--\hfill} -\DeclareCaptionListFormat{listaquadro}{\quadroname\ #1#2\hfill--\hfill} -\DeclareCaptionListFormat{listatabela}{\tablename\ #1#2\hfill--\hfill} -\captionsetup[figure]{listformat=listafigura} -\captionsetup[mapa]{listformat=listamapa} -\captionsetup[quadro]{listformat=listaquadro} -\captionsetup[table]{listformat=listatabela} -\captionsetup{labelsep=endash} - \RequirePackage{chngcntr} \counterwithout{figure}{chapter} \counterwithout{table}{chapter} - -\renewcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{5.5em}} -\renewcommand*{\l@table}{\@dottedtocline{1}{1.5em}{5.5em}} -\renewcommand*{\l@mapa}{\@dottedtocline{1}{1.5em}{5.5em}} -\renewcommand*{\l@quadro}{\@dottedtocline{1}{1.5em}{6em}} -%\renewcommand{\p@table}{\tablename~} -%\renewcommand*{\p@figure}{\figurename~} %=\DeclareCaptionListFormat{listafigura}{\figurename\#1#2~--} -%\renewcommand*{\p@mapa}{\mapaname~} -%\renewcommand*{\p@quadro}{\quadroname~} - + +%all with dots, even for non-koma classes \usepackage{tocbasic} - \DeclareTOCStyleEntry[ linefill=\TOCLineLeaderFill, %entryformat=%\large\textbf, @@ -142,6 +113,35 @@ linefill=\TOCLineLeaderFill, \newcommand*{\authorfont}[1]{\gdef\@authorfont{#1}} \newcommand*{\@datefont}{\normalfont} \newcommand*{\datefont}[1]{\gdef\@datefont{#1}} + + +%% floating environments +\RequirePackage{newfloat} +\DeclareFloatingEnvironment[fileext=lom,listname={Lista de mapas},within=none]{mapa} +\DeclareFloatingEnvironment[fileext=loq,listname={Lista de quadros},within=none]{quadro} + +\RequirePackage{caption} + +%\DeclareCaptionListFormat{list}{#1#2~--} +%\DeclareCaptionListFormat{list}{#1#2~--} +\DeclareCaptionListFormat{listafigura}{\figurename\ #1#2\hfill--\hfill}%\hfill--\hfill +\DeclareCaptionListFormat{listamapa}{\mapaname\ #1#2\hfill--\hfill} +\DeclareCaptionListFormat{listaquadro}{\quadroname\ #1#2\hfill--\hfill} +\DeclareCaptionListFormat{listatabela}{\tablename\ #1#2\hfill--\hfill} +\captionsetup[figure]{listformat=listafigura} +\captionsetup[mapa]{listformat=listamapa} +\captionsetup[quadro]{listformat=listaquadro} +\captionsetup[table]{listformat=listatabela} +\captionsetup{labelsep=endash} + +%%% commented on 29/12/19 +%%% for new lists with koma with \DeclareNewTOC, none of this is needed +\renewcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{5.5em}} +\renewcommand*{\l@table}{\@dottedtocline{1}{1.5em}{5.5em}} +\renewcommand*{\l@mapa}{\@dottedtocline{1}{1.5em}{5.5em}} +\renewcommand*{\l@quadro}{\@dottedtocline{1}{1.5em}{6em}} + + } {% if koma \typeout{Usando KOMA-Sript.} @@ -152,6 +152,49 @@ linefill=\TOCLineLeaderFill, \newcommand*{\authorfont}[1]{\gdef\@authorfont{#1}} \renewcommand*{\@datefont}{\normalfont} \newcommand*{\datefont}[1]{\gdef\@datefont{#1}} + + +%%% floating environments, easier with koma + +\DeclareNewTOC[% +type=mapa,% +types=mapas,% +float,% define a floating environment +floattype=4,% +name=Mapa,% +%counterwithin=chapter, +listname={Lista de Mapas}, +%tocentryindent=0pt,% <- added +tocentrydynnumwidth,% <- added +tocentrynumsep=0pt% <- added +]{lom} +\setuptoc{lom}{chapteratlist} + +\DeclareNewTOC[% +type=quadro,% +types=quadros,% +float,% define a floating environment +floattype=4,% +name=Quadro,% +%counterwithin=chapter, +listname={Lista de Quadros}, +%tocentryindent=0pt,% <- added +tocentrydynnumwidth,% <- added +tocentrynumsep=0pt% <- added +]{loq} +\setuptoc{loq}{chapteratlist} + + +%prepagenumber ? + +\BeforeStartingTOC[lof]{\def\autodot{\hfill~--~\hfill}} +\BeforeStartingTOC[lot]{\def\autodot{\hfill~--~\hfill}} +\BeforeStartingTOC[lom]{\def\autodot{\hfill~--~\hfill}} +\BeforeStartingTOC[loq]{\def\autodot{\hfill~--~\hfill}} + +\KOMAoptions{listof=entryprefix} +\renewcommand*{\captionformat}{~--~} + } @@ -219,4 +262,4 @@ linefill=\TOCLineLeaderFill, -\endinput \ No newline at end of file +\endinput -- cgit v1.2.3