From 522996c475e205d116d3820b985f5eb16d0f47fa Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 28 Apr 2020 21:11:08 +0000 Subject: abnt (28apr20) git-svn-id: svn://tug.org/texlive/trunk@54927 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/abnt/abnt.sty | 113 +++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 35 deletions(-) (limited to 'Master/texmf-dist/tex/latex/abnt') diff --git a/Master/texmf-dist/tex/latex/abnt/abnt.sty b/Master/texmf-dist/tex/latex/abnt/abnt.sty index d3cdd42b4b0..a29009e1ad7 100644 --- a/Master/texmf-dist/tex/latex/abnt/abnt.sty +++ b/Master/texmf-dist/tex/latex/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