summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/abnt/abnt.sty
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/abnt.sty
parent2c20697e8a5301b61c59d752fd1cfa7499724eec (diff)
CTAN sync 201912150300
Diffstat (limited to 'macros/latex/contrib/abnt/abnt.sty')
-rw-r--r--macros/latex/contrib/abnt/abnt.sty37
1 files changed, 28 insertions, 9 deletions
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