From a564d92ef167ad6ad8dfe2009189e2a6da01066d Mon Sep 17 00:00:00 2001 From: Segcolt <9hmbzr275@mozmail.com> Date: Sat, 22 Nov 2025 21:51:13 -0300 Subject: [PATCH] Minimal working project with this. --- ABNT-FA.csl | 561 +++++++++++++++++++++++++++++++++++++++++++ abntex-o-matic.latex | 557 ++++++++++++++++++++++++++++++++++++++++++ build.sh | 9 + trabalho.md | 178 ++++++++++++++ 4 files changed, 1305 insertions(+) create mode 100644 ABNT-FA.csl create mode 100644 abntex-o-matic.latex create mode 100755 build.sh create mode 100644 trabalho.md diff --git a/ABNT-FA.csl b/ABNT-FA.csl new file mode 100644 index 0000000..6fc4edd --- /dev/null +++ b/ABNT-FA.csl @@ -0,0 +1,561 @@ + + diff --git a/abntex-o-matic.latex b/abntex-o-matic.latex new file mode 100644 index 0000000..de02f90 --- /dev/null +++ b/abntex-o-matic.latex @@ -0,0 +1,557 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% ABNTeX-o-matic % +% B.C.D.A. VASCONCELOS 2021 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% abreviacoes, abstract, advertencia, agradecimentos, ano, autor, autora, biblatex, biblatex-phi, biblatexoptions, biblio-style, biblio-title, bibliography, citecolor, citeproc, compilado, contracapa, creditos, curso, dedicatoria, epigrafe, fontfamily, fontfamilyoptions, glossary, glossaryfile, greekfont, greekfontoptions, include-after, indentarprimeiralinha, indentarprimeiralinhaem, index, instituicao, linhadepesquisa, linkcolor, lugar, mainfont, mainfontoptions, matematica, monofont, monofontoptions, natbib, natbiboptions, orientador, orientadora, printshorthands, resumo, sansfont, sansfontoptions, subtitulo, sumario, titulacao, titulo, trabalho, urlcolor + +\NeedsTeXFormat{LaTeX2e} +\documentclass[paper=a4, + oneside, + pagesize, + fontsize=12pt, + DIV=10, % TODO: Make configurable + BCOR=10mm, % TODO: Make configurable + cleardoublepage=empty, + numbers=noenddot, + titlepage, + toc=bibliography, + toc=index,]{scrbook} +\RequirePackage{ifpdf} +\RequirePackage{ifxetex} +\RequirePackage{ifluatex} +\newif\ifxetexorluatex +\ifxetex + \usepackage[protrusion=true]{microtype} + \usepackage[ngerman,french,english,brazil]{babel} + \xetexorluatextrue +\else + \ifluatex + \usepackage[expansion, protrusion=true]{microtype} +\usepackage[ngerman,french,greek,english,brazil]{babel} + \xetexorluatextrue + \else + \xetexorluatexfalse + \fi +\fi +\ifxetexorluatex +% \RequirePackage{fontspec} +\else + \RequirePackage[utf8]{inputenc} +\fi +% Makes it possible to switch between different languages in the text +% while keeping hyphenation rules correct. Should you add another one +% in the list, please ensure that `english` is the last one. The last +% language is used to control standard hyphenation. +\RequirePackage{csquotes} % Context-sensitive quotation marks +\RequirePackage{xspace} % For automatically "eating" spaces +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Multi-line comments +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\comment}[1]{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Tight-list +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Fonts & colours +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[usenames,dvipsnames]{xcolor} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Graphics +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{graphicx} +\graphicspath{% + {Figures/} + {./} +} +% Suppress warnings about page groups in PDFs. This is not justified +% in most of the cases. I am pretty sure I am including my images in +% the right manner. +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfsuppresswarningpagegroup\endcsname\relax +\else + \pdfsuppresswarningpagegroup=1\relax +\fi +\RequirePackage{subcaption} +% Make sub-references using \subref being typeset with parentheses. +% Otherwise, only the counter will be printed. +\captionsetup{subrefformat=parens} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Paragraph lists & compact enumerations +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[% + olditem, % Do not modify itemize environments by default + oldenum % Do not modify enumerate environments by default + ]{paralist} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Tables +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{booktabs} +\RequirePackage{multirow} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Proper typesetting of units +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[binary-units=true]{siunitx} +\sisetup{% + detect-all = true, + detect-family = true, + detect-mode = true, + detect-shape = true, + detect-weight = true, + detect-inline-weight = math, +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Penalties +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\clubpenalty = 10000 +\widowpenalty = 10000 +\displaywidowpenalty = 10000 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Headers +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage[singlespacing=true]{scrlayer-scrpage} +\pagestyle{scrheadings} +\renewcommand*{\chaptermarkformat}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Typefaces for parts, chapters, and sections +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\renewcommand{\partformat}{\huge\partname~\thepart\autodot} +\renewcommand{\raggedpart}{\flushleft} +\setkomafont{part}{\normalfont\huge\scshape} +\setkomafont{sectioning}{\normalfont\scshape} +\setkomafont{descriptionlabel}{\normalfont\bfseries} +\setkomafont{caption}{\small} +\setkomafont{captionlabel}{\usekomafont{caption}} + +% Redefine citeproc +\NewDocumentCommand\citeproctext{}{} +\NewDocumentCommand\citeproc{mm}{% + \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} +% avoid brackets around text for \cite: +\makeatletter + \def\@biblabel#1{} + \def\@cite#1#2{{#1\if@tempswa , #2\fi}} +\makeatother + +% Large number for chapter +\renewcommand*{\chapterformat}{% + \fontsize{30}{35}\selectfont\thechapter\autodot\enskip +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Paracol e multicol +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{multicol} %\begin{multicols}{2} +\usepackage{paracol} +\footnotelayout{m} + %\begin{paracol}{2} \switchcolumn \end{paracol} +\usepackage{array} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Fonte pequenas e espaçamento simples nas citações +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{etoolbox} +\AtBeginEnvironment{quote}{\singlespacing\small} +\renewenvironment{quote}{% + \list{}{% + \leftmargin4cm % this is the adjusting screw + \rightmargin0cm + } + \item\relax +} +{\endlist} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Espaçamento simples no ambiente paracol +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\AtBeginEnvironment{paracol}{\singlespacing\small} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Parte do original. Função? +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[binary-units=true]{siunitx} +\DeclareSIUnit\px{px} +\sisetup{% + detect-all = true, + detect-family = true, + detect-mode = true, + detect-shape = true, + detect-weight = true, + detect-inline-weight = math, +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Pacote para epígrafes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{epigraph} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Ajustes para o logo +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{metalogo} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Espaçamento +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[doublespacing]{setspace} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Schemata +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{schemata} + + +%%%---Set up clickable section headers---------- +% make headings back-links to TOC +% See https://tex.stackexchange.com/a/251964/73149, +% and https://tex.stackexchange.com/questions/412773/ +\makeatletter +% configure chapter back-links +\let\hyperchapter\chapter +\def\chapter{\@ifstar\starchapter\mychapter} +\def\starchapter{\hyperchapter*} +\newcommand{\mychapter}[2][\@empty]% #1=optional (toc and top of page), #2=title +{\ifx#1\@empty \hyperchapter[#2]{\hyperlink{toc.chapter.\thechapter}{#2}} + \else \hyperchapter[#1]{\hyperlink{toc.chapter.\thechapter}{#2}} + \fi} +% configure section back-links +\let\hypersection\section +\def\section{\@ifstar\starsection\mysection} +\def\starsection{\hypersection*} +\newcommand{\mysection}[2][\@empty]% #1=optional (toc), #2=title +{\ifx#1\@empty \hypersection[#2]{\hyperlink{toc.section.\thesection}{#2}} + \else \hypersection[#1]{\hyperlink{toc.section.\thesection}{#2}} + \fi} + % configure subsection back-links +\let\hypersubsection\subsection +\def\subsection{\@ifstar\starsubsection\mysubsection} +\def\starsubsection{\hypersubsection*} +\newcommand{\mysubsection}[2][\@empty]% #1=optional (toc), #2=title +{\ifx#1\@empty \hypersubsection[#2]{\hyperlink{toc.subsection.\thesubsection}{#2}} + \else \hypersubsection[#1]{\hyperlink{toc.subsection.\thesubsection}{#2}} + \fi} +% configure subsubsection back-links +\let\hypersubsubsection\subsubsection +\def\subsubsection{\@ifstar\starsubsubsection\mysubsubsection} +\def\starsubsubsection{\hypersubsubsection*} +\newcommand{\mysubsubsection}[2][\@empty]% #1=optional (toc), #2=title +{\ifx#1\@empty \hypersubsubsection[#2]{\hyperlink{toc.subsubsection.\thesubsubsection}{#2}} + \else \hypersubsubsection[#1]{\hyperlink{toc.subsubsection.\thesubsubsection}{#2}} + \fi} +% close out +\makeatother +%%%---End set up clickable section headers---------- + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Opções e ajustes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +$if(matematica)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Matemática +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{amsmath} +\RequirePackage{amsthm} +\RequirePackage{dsfont} +% Fix the spacing of \left and \right. Use these with the proper bracket +% in order to ensure that they scale automatically. +\let\originalleft\left +\let\originalright\right +\renewcommand{\left}{\mathopen{}\mathclose\bgroup\originalleft} +\renewcommand{\right}{\aftergroup\egroup\originalright} +\DeclareMathOperator*{\argmin} {arg\,min} +\DeclareMathOperator {\dist} {dist} +\DeclareMathOperator {\im} {im} +\newcommand{\domain}{\ensuremath{\mathds{D}}} +\newcommand{\real} {\ensuremath{\mathds{R}}} +% Proper differential operators +\newcommand{\diff}[1]{\ensuremath{\operatorname{d}\!{#1}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Ordinals +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand {\st}{\textsuperscript{\textup{st}}\xspace} +\newcommand {\rd}{\textsuperscript{\textup{rd}}\xspace} +\newcommand {\nd}{\textsuperscript{\textup{nd}}\xspace} +\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace} +$endif$ +$if(indentarprimeiralinha)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Indentação de parágrafo +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{indentfirst} +$if(indentarprimeiralinhaem)$ +\setlength{\parindent}{$indentarprimeiralinhaem$} +$endif$$endif$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Hyperlinks & bookmarks +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[% + colorlinks = true, + citecolor = $if(citecolor)$ $citecolor$ $else$ RoyalBlue $endif$, + linkcolor = $if(linkcolor)$ $linkcolor$ $else$ RoyalBlue $endif$, + urlcolor = $if(urlcolor)$ $urlcolor$ $else$ RoyalBlue $endif$, + ]{hyperref} +\usepackage{bookmark} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Polyglossia +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{polyglossia} +\newcommand{\familytype}{\l_xpg_familytype_tl} +\setdefaultlanguage[variant=brazilian]{portuguese} +\setotherlanguage[variant=ancient]{greek} + \newcommand{\pt}[1]{\textportuges{#1}} + \newcommand{\grc}[1]{\textgreek{#1}} + +%\newcommand{\grc}[1]{\selectlanguage{greek}\hyphenrules{polygreek}{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Bibliografia +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +$if(natbib)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Natbib +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BibLaTeX +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[$if(biblio-style)$style=$it$,$endif$$for(biblatexoptions)$$it$$sep$,$endfor$]{biblatex} +$endif$ +$if(biblatex-phi)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BibLaTeX-Phi +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[backend=biber, style=philosophy-modern, backref, url=false, publocformat=loccolonpub, volumeformat = romansc, scauthors = all, inbeforejournal=true, shorthandintro = false, latinemph=true]{biblatex} % configuração mais próxima possível da ABNT utilizando o pacote + +\defbibheading{FP}{\chapter*{Referências}\label{referencias}\addcontentsline{toc}{chapter}{Referências} + +% Separação entre fontes primárias e secundárias +\section*{Fontes Primárias\label{fontesprimarias}\addcontentsline{toc}{section}{Fontes Primárias}}} +\defbibheading{FS}{\section*{Fontes Secundárias\label{fontessecundarias}\addcontentsline{toc}{section}{Fontes Secundárias}}} + +\addbibresource{/Users/bcdav/Dropbox/Application Support/BBEdit/Pandoc/refs/Content.bib} +$endif$ +$for(bibliography)$ +% Arquivo de bibliografia +\addbibresource{$bibliography$} +$endfor$ +$if(csl-refs)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Pandoc Citeproc +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} + \newlength{\csllabelwidth} +\setlength{\csllabelwidth}{1em} +\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi + % set entry spacing + \ifnum #2 > 0 + \setlength{\parskip}{#2\baselineskip} + \fi + }% + {} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Fontes +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$else$ +\usepackage{lmodern} +$endif$ +$if(mainfont)$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +$endif$ +$if(sansfont)$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} +$endif$ +$if(monofont)$ + \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} +$endif$ +$if(greekfont)$ + \newfontfamily\greekfont[$for(greekfontoptions)$$greekfontoptions$$sep$,$endfor$]{$greekfont$} +$endif$ +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} +$endfor$ +$if(glossary)$ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Glossário +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[toc, style=altlisthypergroup]{glossaries} %todo: glossaries: get sorting right +\makeglossaries +%\glslink{