%%%============================================================================== %% Copyright 2022 by Alceu Frigeri %% %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% 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”. %% %% The Current Maintainer of this work is Alceu Frigeri %% %% This is version 1.0 (2022/09/01) %% %% %% This work consists of the files %% %% ufrgscca.cls main class (bundle) %% %% ufrgscca-abnt.sty abnt page geometry, and chapter/sectioning/etc. settings %% ufrgscca-core.sty core macros (students related data, advisor, work title, etc.) %% ufrgscca-cover.sty cover pages macros %% ufrgscca-lists.sty New float environments (for code listing, for instance) %% ufrgscca-gen.sty a switch/case macro construct and %% 'macro factory', for instance to create commands used in the .def files. %% ufrgscca-forms.sty forms creation macros (course specific) %% ufrgscca-coord.sty student work coordenation related macros (course specific) %% ufrgscca-ppc.sty ppc specific macros (ppc stands for Course Pedagogic Project) %% ufrgscca-curr.sty curricula specific macros (as a set of semesters and class dependency lists) %% ufrgscca-curr-tab.sty curricula tabular macros (to display the curricula as tables) %% ufrgscca-curr-graph.sty curricula graph macros (to display the curricula as a dependency graph) %% %% ufrgscca-en-base.def locale, English, base def's (for babel) %% ufrgscca-en-core.def locale, English, for -core.sty %% ufrgscca-en-forms.def locale, English, for -forms.sty %% ufrgscca-en-coord.def locale, English, for -coord.sty %% %% ufrgscca-ptBR-base.def locale, Portuguese, base def`s (for babel) %% ufrgscca-ptBR-core.def locale, Portuguese, for -core.sty %% ufrgscca-ptBR-forms.def locale, Portuguese, for -forms.sty %% ufrgscca-ptBR-coord.def locale, Portuguese, for -coord.sty %% %% README.md quick introduction %% %% ufrgscca.tex LaTeX documentation %% ufrgscca.pdf documentation in PDF form %% %% UFRGS stands for "Federal University of Rio Grande do Sul" in south Brazil %% EE stands for "Engineering School" %% CCA stands for "Control and Automation Engineering Course" (Portuguese acronym) %% %%%============================================================================== \NeedsTeXFormat{LaTeX2e}[2022/06/01] \def\tc@tmp@packname{ufrgscca-abnt} \def\tc@tmp@altpackname{ufrgsccaabnt} \def\tc@tmp@packdesc{UFRGS/CCA ABNT layout} \def\tc@tmp@packdate{2022/09/01} \def\tc@tmp@packversion{1.0} \let\@exp\expandafter \@exp\edef\csname\tc@tmp@altpackname version\endcsname{\tc@tmp@packversion} \@exp\@exp\@exp\ProvidesPackage\@exp\@exp\@exp{\@exp\tc@tmp@packname\@exp}\@exp[\tc@tmp@packdate\space v\tc@tmp@packversion\space\tc@tmp@packdesc] \def\tc@tocdepth{3} % Table of Contents depth \def\tc@secdepth{4} % Sectioning numbers depth (3 -> subsubsection) \DeclareKeys[ufrgscca-abnt]{ strict-abnt.usage = load, strict-abnt.if = tcif@strictabnt, chapternopagenum.usage = load, chapternopagenum.if = tcif@chapternopagenum, english.usage = load, english.if = tcif@english, relnum.usage = load, relnum.if = tcif@relnum, repeatfields.usage = load, repeatfields.if = tcif@repeatfields, showframes.usage = load, showframes.if = tcif@showframes, showlabels.usage = load, showlabels.if = tcif@showlabels, tocdepth.usage = load, tocdepth.store = \tc@tocdepth, secdepth.usage = load, secdepth.store = \tc@secdepth, nomicrotype.usage = load, nomicrotype.if = tcif@nomicrotype, dctools.usage = load, dctools.if = tcif@dctools, } \ProcessKeyOptions[ufrgscca-abnt]\relax %%%%%%%%%%%%%%%%%%%%% %%% Packages Loading %%%%%%%%%%%%%%%%%%%%% \RequirePackage[english,brazilian]{babel}% \RequirePackage{csquotes}% \iftcif@strictabnt \RequirePackage[a4paper,inner=2cm,outer=3cm,top=3cm,bottom=2cm,twoside]{geometry} \else \iftcif@dctools \RequirePackage[a4paper,margin=5cm,right=2cm,marginparwidth=4.5cm,asymmetric,top=2.5cm,bottom=1.5cm]{geometry} \else \RequirePackage[a4paper,inner=2.5cm,outer=2.5cm,top=3cm,bottom=2cm,twoside]{geometry} \fi \fi \RequirePackage[toc,page,title]{appendix} \RequirePackage[pagestyles,clearempty]{titlesec} \RequirePackage{titletoc} \RequirePackage[inline]{enumitem} \RequirePackage{chngcntr} \def\tc@captionwidth{0.75\textwidth} \def\tc@notewidth{0.635\textwidth} %% 0.84666667\tc@captionwidth \RequirePackage[position=above,font=small,labelfont=bf,textfont=md,textfont+=sl,width=\tc@captionwidth]{caption}% %%% %%% commands for 'floats' %%% % \NewDocumentCommand{\sourcecitation}{m}{{\small{\sourcename\ #1}}}% % \newlength{\noteindent}%%auxiliary length \NewDocumentCommand{\note}{O{}+m}{{\footnotesize\settowidth{\noteindent}{\notename#1:}\addtolength{\noteindent}{3pt}\begin{center}\begin{minipage}{\tc@notewidth}{\parindent=-\the\noteindent\notename#1:\hspace{2.9pt}#2}\end{minipage}\end{center}}}%% % % %%%%%%%%%%%%%%%%%%%%% %%% Packages Loading %%%%%%%%%%%%%%%%%%%%% \RequirePackage{array} \RequirePackage{nicematrix} \NiceMatrixOptions{cell-space-limits = 1pt} \newcolumntype{P}[1]{>{\raggedleft\arraybackslash}p{#1}} \newcolumntype{B}[1]{>{\raggedleft\arraybackslash\bfseries}p{#1}} \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} \newcolumntype{J}[1]{>{\arraybackslash}p{#1}} %%%%%%%%%%%%%%%%%%%%% %%% Packages Loading %%%%%%%%%%%%%%%%%%%%% \WarningFilter{biblatex}{File 'brazilian-abnt-abnt.lbx'}% \WarningFilter{biblatex}{Conflicting options}% \iftcif@repeatfields% \RequirePackage[backend=biber,style=abnt,pretty,giveninits,extrayear,repeatfields]{biblatex}% \else% \RequirePackage[backend=biber,style=abnt,pretty,giveninits,extrayear]{biblatex}% \fi% %% %%% %%% Language selection {package babel} %%% \iftcif@english%% \selectlanguage{english}% \AtBeginDocument{\selectlanguage{english}}% \else \selectlanguage{brazilian}% \AtBeginDocument{\selectlanguage{brazilian}}% \fi% %%% %%% typeset adjusting {package microtype} %%% \iftcif@nomicrotype\else\RequirePackage[tracking,kerning,spacing,babel]{microtype}\fi% % % pdftex native protruding % \pdfprotrudechars=2 \pdfadjustspacing=2 %%% %%% \so \ul command {package soul}... contour is just to make a fancy underline %%% \RequirePackage{contour} \RequirePackage{soul} \iftcif@showframes% \RequirePackage{showframe}%% \fi %% \iftcif@showlabels% \RequirePackage{showlabels}%% \showlabels{cite}%% \showlabels{textcite}%% \RenewDocumentCommand{\showlabelfont}{}{\tiny\ttfamily\color{blue}}%% \fi%% %%% %%% ToC and Headings format. {package titlesec/titletoc/titleps} %%% \setcounter{tocdepth}{\tc@tocdepth} % Table of Contents depth \setcounter{secnumdepth}{\tc@secdepth} % Sectioning numbers depth (3 -> subsubsection) \NewDocumentEnvironment{tocless}{}% {\setcounter{secnumdepth}{-1}\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}\ignorespaces}}% {\setcounter{secnumdepth}{\tc@secdepth}\addtocontents{toc}{\protect\setcounter{tocdepth}{\tc@tocdepth}\ignorespaces}}% \def\notoc#1#2{\begin{tocless}#1{#2}\end{tocless}} \NewDocumentEnvironment{numberless}{}{\setcounter{secnumdepth}{-1}}{\setcounter{secnumdepth}{\tc@secdepth}} \def\nonum#1#2{\begin{numberless}#1{#2}\end{numberless}} %%% %%% ToC definitions {package titletoc} %%% \def\tc@lblmargin{22mm} \contentsmargin{2.2em} \def\tc@dotspacing{0.5pc} \titlecontents{chapter}[\tc@lblmargin]{\vspace{3mm}\normalfont\scshape\selectfont}{\contentslabel{\tc@lblmargin}}{\hspace{-\tc@lblmargin}}{\titlerule*[\tc@dotspacing]{.}\normalsize\normalfont\contentspage} \titlecontents{section}[\tc@lblmargin]{\vspace{1mm}}{\contentslabel{\tc@lblmargin}}{\hspace{-\tc@lblmargin}}{\titlerule*[\tc@dotspacing]{.}\contentspage} \dottedcontents{subsection}[\tc@lblmargin]{}{\tc@lblmargin}{\tc@dotspacing} \dottedcontents{subsubsection}[\tc@lblmargin]{}{\tc@lblmargin}{\tc@dotspacing} \dottedcontents{figure}[\tc@lblmargin]{}{\tc@lblmargin}{\tc@dotspacing} \dottedcontents{table}[\tc@lblmargin]{}{\tc@lblmargin}{\tc@dotspacing} \RenewDocumentEnvironment{appendix}{O{\defappendixpagename}O{\defappendixname}}{% \titleformat{\chapter}{\bfseries\Large\sffamily}{#2 \thechapter\hspace{1.5ex}-}{2ex}{\MakeUppercase}% \titlecontents{chapter}[\tc@lblmargin]{\vspace{3mm}\sc}{\hspace{-\tc@lblmargin}{#2~\thecontentslabel\ -\enspace}}{\hspace{-\tc@lblmargin}}{\titlerule*[\tc@dotspacing]{.}\normalsize\normalfont\contentspage} \def\appendixname{#2}% \def\appendixpagename{#1}% \def\appendixtocname{#1}% \begin{appendices}% \let\tc@appendixautorefname@tmp\appendixautorefname \def\appendixautorefname{#2} }% {\let\appendixautorefname\tc@appendixautorefname@tmp\end{appendices}} \NewDocumentEnvironment{annex}{O{\defannexpagename}O{\defannexname}}{\begin{appendix}[#1][#2]}{\end{appendix}} %%% %%% Headings definitions {package titlesec} %%% %\RenewDocumentCommand{\thechapter}{}{\arabic{chapter}} \titleformat{\chapter}{\sffamily\bfseries\selectfont\Large}{\thechapter}{2ex}{\MakeUppercase} \titleformat{name=\chapter,numberless}{\sffamily\bfseries\selectfont\Large\center}{}{0pt}{\MakeUppercase} \titlespacing{\chapter}{0pt}{\tc@chapbefore}{\tc@chapafter} %\def\tc@chapbefore{18pt plus 3pt minus 6pt} %\def\tc@chapafter{9pt plus 3pt minus 3pt} %\def\tc@secbefore{12pt plus 6pt minus 3pt} %\def\tc@secafter{6pt plus 2pt minus 2pt} \def\tc@chapbefore{70pt plus 12pt minus 8pt} \def\tc@chapafter{36pt plus 8pt minus 8pt} \def\tc@secbefore{27pt plus 6pt minus 6pt} \def\tc@secafter{18pt plus 4pt minus 4pt} \titleformat{\section}[hang]{\normalfont\scshape\selectfont\large}{\thesection}{.5em}{} \titlespacing{\section}{0pt}{\tc@secbefore}{\tc@secafter} \titleformat{name=\section,numberless}[hang]{\normalfont\large\bfseries\scshape\selectfont\center}{}{0pt}{} \titlespacing{name=\section,numberless}{0pt}{\tc@secbefore}{\tc@secafter} \titleformat{\subsection}[hang]{\normalfont\sffamily\bfseries\slshape\selectfont}{\thesubsection}{.5em}{} \titlespacing{\subsection}{0pt}{\tc@secbefore}{\tc@secafter} \titleformat{\subsubsection}[hang]{\normalfont\sffamily\slshape\selectfont}{\thesubsubsection}{.5em}{} \titlespacing{\subsubsection}{0pt}{\tc@secbefore}{\tc@secafter} \titleformat{\paragraph}[hang]{\normalfont\sffamily\selectfont}{\theparagraph}{.5em}{\tightul} \titlespacing{\paragraph}{0pt}{\tc@secbefore}{\tc@secafter} \titleformat{\subparagraph}[hang]{\normalfont\sffamily\selectfont}{\thesubparagraph}{.5em}{\tightul} \titlespacing{\subparagraph}{0pt}{\tc@secbefore}{\tc@secafter} %%% %%% Relative/Absolute counters... {package chngcntr} %%% \iftcif@dctools \else \iftcif@relnum% \counterwithin{figure}{chapter}% \counterwithin{table}{chapter}% \else% \counterwithout{figure}{chapter}% \counterwithout{table}{chapter}% \fi \fi %%% %%% Page Heading format {titlesec/titleps} %%% \renewpagestyle{plain}{\sethead[\ifthechapter{\sffamily\thepage}{}][][]{}{}{\ifthechapter{\sffamily\thepage}{}}} \newpagestyle{main}{\sethead[\ifthechapter{\sffamily\thepage}{}][][]{}{}{\ifthechapter{\sffamily\thepage}{}}} \newpagestyle{bibliography}{\sethead[\sffamily\thepage][][]{}{}{\sffamily\thepage}} \pagestyle{main} \iftcif@chapternopagenum\renewpagestyle{plain}{\sethead[][][]{}{}{}}\fi \let\tc@temp@printbibliography\printbibliography \defbibheading{bibliography}[\refname]{\nonum\chapter{#1}\pagestyle{bibliography}} \let\tc@temp@listoffigures\listoffigures \def\listoffigures{\tc@temp@listoffigures\addcontentsline{toc}{chapter}{\MakeUppercase\listfigurename}} %% \let\tc@temp@listoftables\listoftables \def\listoftables{\tc@temp@listoftables\addcontentsline{toc}{chapter}{\MakeUppercase\listtablename}} %% \newlength{\tc@lblwidth} \NewDocumentCommand{\NewChapListEnv}{mm}{ \NewDocumentEnvironment{#1}{O{}m}{% \settowidth{\tc@lblwidth}{##2***}% \nonum\chapter{\MakeUppercase{#2}}% \begin{description}[tcc,noindent,leftmargin=\tc@lblwidth,labelwidth=!,##1]% }{\end{description}} } \NewChapListEnv{listofabbrv}{\listabbrvname} \NewChapListEnv{listofsymbols}{\listsymbolname} %%% %%% lists formating {package enumitem} %%% \def\tc@enumbase{6mm} \def\tc@enummarging{12mm} \def\tc@enummargingB{18mm} \def\tc@enumlabelsep{2.5mm} \setlength{\parindent}{\tc@enummarging} \SetEnumitemValue{label}{arabic}{\arabic*.} \SetEnumitemValue{label}{roman}{\roman*.} \SetEnumitemValue{label}{alpha}{\alph*.} \SetEnumitemValue{label}{bullet}{\hfill\textopenbullet} \SetEnumitemKey{ppc}{leftmargin=\tc@enummarging,labelindent=\tc@enumbase,labelsep=\tc@enumlabelsep,labelwidth=!,style=nextline} \SetEnumitemKey{tcc}{leftmargin=\tc@enummarging,labelindent=\tc@enumbase,labelsep=\tc@enumlabelsep,labelwidth=!,style=nextline} % \SetEnumitemKey{parindent}{leftmargin=\tc@enummargingB,labelindent=\tc@enummarging,labelwidth=!} \SetEnumitemKey{noindent}{labelindent=0pt,labelwidth=!} \SetEnumitemKey{tight}{leftmargin=0pt,listparindent=5mm,labelwidth=5mm} % \SetEnumitemKey{miditemsep}{parsep=0ex,itemsep=0.4ex} %\SetEnumitemKey{ppctight}{leftmargin=0pt,listparindent=5mm,labelwidth=5mm} \SetEnumitemKey{arabic}{label=\arabic*.} \SetEnumitemKey{arabic)}{label=\arabic*)} \SetEnumitemKey{(arabic)}{label=(\arabic*)} \SetEnumitemKey{arabic*}{label*=\arabic*.} \SetEnumitemKey{arabic*)}{label*=\arabic*)} \SetEnumitemKey{roman}{label=\roman*.} \SetEnumitemKey{roman)}{label=\roman*)} \SetEnumitemKey{(roman)}{label=(\roman*)} \SetEnumitemKey{roman*}{label*=\roman*.} \SetEnumitemKey{roman*)}{label*=\roman*)} \SetEnumitemKey{Roman}{label=\Roman*.} \SetEnumitemKey{Roman)}{label=\Roman*)} \SetEnumitemKey{(Roman)}{label=(\Roman*)} \SetEnumitemKey{Roman*}{label*=\Roman*.} \SetEnumitemKey{Roman*)}{label*=\Roman*)} \SetEnumitemKey{alpha}{label=\alph*.} \SetEnumitemKey{alpha)}{label=\alph*)} \SetEnumitemKey{(alpha)}{label=(\alph*)} \SetEnumitemKey{alpha*}{label*=\alph*.} \SetEnumitemKey{alpha*)}{label*=\alph*)} \SetEnumitemKey{Alpha}{label=\Alph*.} \SetEnumitemKey{Alpha)}{label=\Alph*)} \SetEnumitemKey{(Alpha)}{label=(\Alph*)} \SetEnumitemKey{Alpha*}{label*=\Alph*.} \SetEnumitemKey{Alpha*)}{label*=\Alph*)} \SetEnumitemKey{bullet}{label=\hfill\textopenbullet} %%% %%% tight underline {packages soul, countour} %%% \contourlength{0.17ex}% \contournumber{96}% \NewDocumentCommand{\tightul}{m}{% \setul{0.355ex}{0.075ex}% \ul{{\phantom{{#1}}}}% \llap{\contour{white}{#1}}% } %%% %%% keyword command definition (for abstract) %%% \newcounter{tc@kwcounter}% \NewDocumentCommand{\keyword}{m}{%% \stepcounter{tc@kwcounter}%% \expandafter\gdef\csname keyw\alph{tc@kwcounter}\endcsname{#1}%% }% \NewDocumentCommand{\tcabnt@abstractkw}{}{%% \@ifundefined{keywa}{}{\expandafter\MakeUppercase\keywa}%% \@ifundefined{keywb}{}{, \keywb}%% \@ifundefined{keywc}{}{, \keywc}%% \@ifundefined{keywd}{}{, \keywd}% \@ifundefined{keywe}{}{, \keywe}% \@ifundefined{keywf}{}{, \keywf}% \@ifundefined{keywg}{}{, \keywg}% \@ifundefined{keywh}{}{, \keywh}% \@ifundefined{keywi}{}{, \keywi}% \@ifundefined{keywj}{}{, \keywj}% }% \let\tc@org@abstract\abstract \let\tc@org@endabstract\endabstract \RenewDocumentEnvironment{abstract}{}{%% \notoc\chapter{\abstractname}% }{%% \par\vspace{2ex} %\vfill% \noindent\textbf{\keywordsname:} \tcabnt@abstractkw.% }% \NewDocumentEnvironment{otherabstract}{O{english}m}{%% \gdef\tc@otherkeywords{#2}%% \begin{otherlanguage}{#1}% \notoc\chapter{\abstractname}% }{% \par\vspace{2ex} %\vfill% \noindent\textbf{\keywordsname:} \tc@otherkeywords.% \end{otherlanguage}% }% %==============================================================================% % date redefinition (separated month and year) %==============================================================================% \RenewDocumentCommand{\date}{O{\number\day}mm}{% \gdef\tc@publmonth{#2}% \gdef\tc@publyear{#3}% \gdef\tc@publday{\ifnum #1<10 0\fi #1}% }% \date{\monthname}{\number\year}% %for english% \@namedef{captionsenglish}{%% \input{ufrgscca-en-base.def}%% }% \@namedef{dateenglish}{%% \def\today{\monthname\space\number\day,\space\number\year}%% \def\monthname{%% \ifcase\month\or%% January\or February\or March\or April\or%% May\or June\or July\or August\or September\or%% October\or November\or December%% \fi%% }%% \def\tc@date{\tc@publmonth~\tc@publyear}%% }% % %para portugues% \@namedef{captionsbrazilian}{%% \input{ufrgscca-ptBR-base.def}%% }% \@namedef{datebrazilian}{%% \def\today{\number\day\space de\space\monthname\space de\space\number\year}%% \def\monthname{%% \ifcase\month\or%% Janeiro\or Fevereiro\or Março\or Abril\or%% Maio\or Junho\or Julho\or Agosto\or Setembro\or%% Outubro\or Novembro\or Dezembro%% \fi%% }%% \def\tc@date{\tc@publmonth\ de~\tc@publyear}%% }% % % % Mainly for 'cover pages' \def\tc@pagebreak{\if@openright\cleardoublepage\else\clearpage\fi}