summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/abnt/abnt.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-04-29 03:03:01 +0000
committerNorbert Preining <norbert@preining.info>2020-04-29 03:03:01 +0000
commit817ecb96eab4ed6494ddb6b8d0f17c2947a91196 (patch)
treee224845d8908ce3e353eee67b768525a2f65097a /macros/latex/contrib/abnt/abnt.sty
parent7f8fffa1c8b5b30f8e2a9fd4b76778147dbb9128 (diff)
CTAN sync 202004290303
Diffstat (limited to 'macros/latex/contrib/abnt/abnt.sty')
-rw-r--r--macros/latex/contrib/abnt/abnt.sty113
1 files changed, 78 insertions, 35 deletions
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 <ycherem(at)gmail.com>, 2019
+%% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 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