summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/abntexto/README (renamed from macros/latex/contrib/abntexto/README.txt)4
-rw-r--r--macros/latex/contrib/abntexto/abntexto-manual.pdfbin246005 -> 124830 bytes
-rw-r--r--macros/latex/contrib/abntexto/abntexto-manual.tex353
-rw-r--r--macros/latex/contrib/abntexto/abntexto.bib30
-rw-r--r--macros/latex/contrib/abntexto/abntexto.cls829
-rw-r--r--macros/latex/contrib/abntexto/abntexto.tex449
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/README.md4
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.pdfbin655136 -> 631666 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex56
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-leftframetitle.pdfbin314951 -> 318798 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-sidebar.pdfbin329247 -> 344913 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-test.pdfbin315595 -> 320313 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/tex/beamerthemeAmurmaple.sty102
-rw-r--r--macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdfbin66197 -> 66201 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/externalize.pdfbin29246 -> 29245 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdfbin26848 -> 26849 bytes
-rw-r--r--macros/latex/contrib/todonotes/img/AlteredAppearenceOfListOfTodos.pngbin0 -> 7854 bytes
-rw-r--r--macros/latex/contrib/todonotes/todonotes.dtx142
-rw-r--r--macros/latex/contrib/todonotes/todonotes.pdfbin336972 -> 356267 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdfbin456766 -> 458337 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex46
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdfbin571900 -> 572738 bytes
-rw-r--r--macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex42
-rw-r--r--macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty62
24 files changed, 1222 insertions, 897 deletions
diff --git a/macros/latex/contrib/abntexto/README.txt b/macros/latex/contrib/abntexto/README
index 850a1cd3f3..bd658f4e98 100644
--- a/macros/latex/contrib/abntexto/README.txt
+++ b/macros/latex/contrib/abntexto/README
@@ -1,6 +1,6 @@
Public Domain Software
-2022-10-12
-1.2.1-alpha
+2023-01-31
+2.0.0-alpha
Elayson
abntexto.classe at gmail.com
diff --git a/macros/latex/contrib/abntexto/abntexto-manual.pdf b/macros/latex/contrib/abntexto/abntexto-manual.pdf
index 79ea6ff35f..c168af6296 100644
--- a/macros/latex/contrib/abntexto/abntexto-manual.pdf
+++ b/macros/latex/contrib/abntexto/abntexto-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/abntexto/abntexto-manual.tex b/macros/latex/contrib/abntexto/abntexto-manual.tex
deleted file mode 100644
index 7d9d2b3153..0000000000
--- a/macros/latex/contrib/abntexto/abntexto-manual.tex
+++ /dev/null
@@ -1,353 +0,0 @@
-\documentclass{abntexto}
-
-\makeatletter
-
-\usepackage[brazil]{babel}
-\usepackage[T1]{fontenc}
-\usepackage{newtxtext}
-\usepackage{newtxmath}
-\usepackage{lipsum} \def\lip{\lipsum[1][1-2]}
-\usepackage{graphicx}
-\usepackage[cmyk]{xcolor}
-\usepackage[style=abnt]{biblatex} \addbibresource{abntexto.bib}
-\usepackage[colorlinks]{hyperref}
-%\let\href=\relax \newdimen\bibitemsep \def\textcite#1{{\bfseries#1}}
-
-% MARKUP
-% ================================================
-
-\def\ttnoligs{\ttfamily\@noligs}
-
-\def\cs#1{{\ttnoligs \string#1}}
-\def\meta#1{{\ttnoligs <#1>}} % ⟨⟩
-\def\cc#1{{\ttnoligs \{\meta{#1}\}}}
-\def\kk#1{{\ttnoligs [\meta{#1}]}}
-
-\def\arg{\cc{arg}}
-\def\opt{\kk{opt}}
-\def\ccval#1{{\ttnoligs \{#1\}}}
-\def\kkval#1{{\ttnoligs [#1]}}
-\def\pkg#1{{\ttnoligs #1}}
-
-% VERBATIM
-% ================================================
-
-\def\adef#1{\catcode`#1=13 \begingroup \lccode`\~=`#1\lowercase{\endgroup\def~}}
-\def\dodef#1{\catcode`#1=12 }
-\def\verbcatcodes{\let\do=\dodef \dospecials \catcode`\|=0 }
-
-{\catcode`\^^M=13
- \gdef\verbpercent#1^^M{{\color{graycomment}\itshape\@percentchar#1^^M}}
-}
-
-\long\def\codeon{\par\begingroup \verbcatcodes
- \adef{\^^I}{\ \ \ }%
- \adef{\^^M}{\par\leavevmode}%
- \adef{ }{\ }%
- \adef{\%}{\verbpercent}%
- \startverb
-}
-{\catcode`\ =13 \catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
- |gdef|startverb^^M#1^^M\codeoff{|verbbox{#1}|par|endgroup |verbreset}
-}
-\def\verbbox#1{\def\tnba@placewidth{\hsize \advance\hsize-3cm}%
- \vskip\placeabovespace
- \parindent=0pt
- \ifx\tnba@savedplace\empty\else\tnba@makelegend\fi
- \nobreak\nointerlineskip\vskip10pt
- {\verbfont{#1}}%
- \nobreak\nointerlineskip\vskip8pt
- \ifx\tnba@savedsrc\empty\else\tnba@makesrc\fi
- \vskip\placebelowspace
-}
-\def\verbreset{%
- \let\tnba@savedplace=\empty
- \let\tnba@savedlegend=\empty
- \let\tnba@savedsrc=\empty
- \let\@currentlabel=\empty
-}
-\def\verbfont{\raggedright\leftskip=6pt\singlesp\small\ttnoligs\leftframed}
-\long\def\leftframed#1{\setbox0=\vtop{#1}%
- \hbox{{\color{graybar}\kern1.5cm\vrule width1pt}\box0}%
-}
-
-% MISC
-% ================================================
-
-\sizeselectordef\large{14.4pt}{17pt}
-\sizeselectordef\Large{20.74pt}{25pt}
-\sizeselectordef\LARGE{25pt}{30pt}
-
-\definecolor{graybar}{gray}{0.75}
-\definecolor{graycomment}{gray}{.2}
-
-\legendplacedef{code}{Código}{Lista de códigos}{cód.\,#1}{loc}
-\def\loclabelwidth{10.6ex}
-\def\me{o autor.}
-
-\tocilowercase
-\sectionlowercase
-
-\clubpenalty=10000
-\widowpenalty=10000
-
-\let\cite=\textcite
-\def\bibfont{\singlesp}
-\bibitemsep=18pt
-
-\def\corrprinton{\begingroup \def\section##1##2{\heading{##2}}}
-\def\corrprintoff{\par\endgroup}
-
-\makeatother
-
-
-
-\begin{document}
-
-\leavevmode\vskip1.9in
-
-{\centering \LARGE\sffamily\bfseries
- abntexto\\[0.4em] \Large\itshape\mdseries
- Classe para {\upshape\LaTeX}\\[2em] \normalfont\large
- Elayson\\[1ex]
- \href{mailto:abntexto.classe@gmail.com}{abntexto.classe at gmail.com}\\[2.5ex]
- \today\par}
-
-\vskip3in
-
-{\centering \large\ttfamily 1.2.1-alpha\par}
-
-\newpage
-
-\maketoc
-
-\textual
-
-\section{Apresentação}
-
-O \pkg{abntexto} é uma classe do \LaTeX\ criada para facilitar a utilização das normas da Associação Brasileira de Normas Técnicas (ABNT) em trabalhos acadêmicos (monografias, dissertações, teses).
-
-Este \emph{não} é um manual sobre \LaTeX\ (ou \TeX, a ferramenta que o constitui) nem tampouco uma descrição detalhada sobre as normas ABNT. Para aprender sobre \LaTeX\ leia \cite{viaexemplos} ou \cite{latex2eunnoficial}, disponível também em francês. Além disso, também se pode ler \cite{texbytopic} para aprender sobre o sistema \TeX\footnote{Note que os livros referenciados não foram realmente citados e isso não é aceito na Norma, no entanto este não é um trabalho acadêmico real, mas um manual.}.
-
-Já existe uma classe para aplicação das normas ABNT cujo nome é \pkg{abntex2}. Mas, diferente desta, o \pkg{abntexto} não depende do \pkg{memoir}, uma classe de código-fonte e manual extensos e que implementa funções as quais, em sua maioria, não são pertinentes a um documento que use as diretrizes da ABNT.
-
-As normas ABNT as quais o \pkg{abntexto} se propõe a seguir são aquelas em vigor até o momento da criação deste manual.
-
-\section{Chamando a classe}
-
-Digite as linhas em \ref{vb:início} e use \pkg{abntexto}.
-
-\legend{code}{Início} \src\me
-\label{vb:início}
-\codeon
-\documentclass{abntexto}
-
-\usepackage[brazil]{babel} % para obter os padrões de hifenização corretos
-\usepackage[T1]{fontenc}
-\usepackage{newtxtext} % fontes New TX, semelhantes a Times
-\usepackage{newtxmath}
-
-\begin{document}
- Texto
-\end{document}
-\codeoff
-
-\section{Fonte tipográfica}
-
-O tamanho da fonte é 12\,pt de imediato e pode ser configurado com o comando \cs\setfontsize\cc{size} sendo que 12\,pt é a única opção disponível. Mas, se você deseja outro tamanho de fonte, crie-o usando \cs\fontsizedef\cc{size}\cc{defs}. Além disso, com os seletores de tamanho \cs\normalsize\ e \cs\small\ que configuram 12\,pt e 10\,pt, nessa ordem, é possível mudar o tamanho da fonte no corpo do documento.
-
-O espaçamento é de um e meio e pode ser alterado para dois com \cs\spacing\ccval{2}, por exemplo. Os atalhos \cs\singlesp, \cs\onehalfsp\ e \cs\doublesp\ estão disponíveis. Note que o espaçamento simples não tem o mesmo valor que o espaçamento um, portanto, \cs\singlesp\ é diferente de \cs\spacing\ccval{1}! Os atalhos \cs\onehalfsp\ e \cs\doublesp\ tem o mesmo significado de \cs\spacing\ccval{1.5} e \cs\spacing\ccval{2}.
-
-\section{\emph{Layout}}
-
-A folha é A4 por padrão e as margens esquerda e direita são de 3\,cm, 2\,cm para páginas ímpares e de 2\,cm, 3\,cm para páginas pares, respectivamente. Além disso, as margens superior e inferior têm, nessa ordem, 3\,cm, 2\,cm para todo o documento. Todas essas medidas podem ser alteradas com a macro \cs\paper\ que deve ser usada assim: \cs\paper\ccval{left=0cm, right=0cm, top=0cm, botttom=0cm}.
-
-Além das chaves anteriores também existe \cs{twoside} que é booleana, ou seja, aceita os valores \cs{true} ou \cs{false} e serve para ativar o modo de impressão em duas folhas aonde as medidas das margens horizontais se invertem nas páginas pares. Ao não informar um valor para \cs{twoside} subentende-se que seja \cs{true}, portanto \cs\paper\ccval{twoside} equivale a \cs\paper\ccval{twoside=true} e esse princípio também se aplica a outras chaves booleanas.
-
-\section{Sumário}
-
-Os comandos que mudam a fonte das entradas no ToC (Table of Contents, em inglês) são \cs\tocifont, \cs\tociifont, \dots, \cs\tocvfont\ (ver \ref{vb:contents}).
-
-\legend{code}{Aparência do sumário} \src\me
-\label{vb:contents}
-\codeon
-\documentclass{abntexto}
-
-\usepackage{color}
-
-\tocifont{\color{red}\itshape}
-\tociifont{\color{blue}\bfseries}
-
-\begin{document}
- \maketoc
-
- \section{Título}
- \subsection{Título}
-\end{document}
-\codeoff
-
-\section{Secionamento}
-
-A personalização das macros de seção (\cs\section, \cs\subsection\ etc.) é análoga a personalização do sumário e deve ser feita com \cs\sectionfont, \cs\subsectionfont, etc. como exemplificado em \ref{vb:sec}.
-
-Também há como alterar o espaço vertical acima e abaixo das seções usando \cs\sectionspaces, \cs\subsectionspaces, etc. Por exemplo, \cs\sectionspaces\ccval{2ex}\ccval{1cm} insere um espaço de 2\,ex acima de \cs\section\ e de 1\,cm abaixo.
-
-\legend{code}{Aparência das seções} \src\me
-\label{vb:sec}
-\codeon
-\documentclass{abntexto}
-
-\usepackage{color}
-
-\sectionfont{\color{blue}\scshape}
-\subsectionfont{\color{red}\slshape}
-\subsubsectionfont{\color{yellow}\sffamily}
-
-\begin{document}
- \maketoc
-
- \section{Texto}
- \subsection{Texto}
- \subsubsection{Texto}
-\end{document}
-\codeoff
-
-\section{Alíneas}
-
-Use o ambiente \cs{topics} para criar alíneas. Ele dispõe de dois níveis sendo que o segundo usa um travessão como marcador conforme o exemplo em \ref{vb:topics}. Naturalmente o uso de \cs\label\ é permitido.
-
-\legend{code}{Alíneas} \src\me
-\label{vb:topics}
-\codeon
-\begin{topics}
- \item \label{al:x} 1
- \begin{topics}
- \item x
- \item y
- \item z
- \end{topics}
- \item \label{al:y} 2
- \item 3
-\end{topics}
-\codeoff
-
-\section{Áreas de legenda}
-
-Use \cs\place\ para inserir áreas de legenda como mostrado em \ref{vb:place}. Mas existem condições: \cs\place\ deve vir por último e \cs\label\ precisa estar depois de \cs\legend. Além disso, existe a possibilidade de alterar o espaço vertical acima e abaixo de uma área de legenda com \cs\placespaces\cc{aboveskip}\cc{belowskip}.
-
-\legend{code}{Áreas de legenda} \src\me
-\label{vb:place}
-\codeon
-\usepackage{graphicx}
-
-\begin{document}
- \legend{figure}{Um título}
- \src{\texttt{www.site.com.br}. Acesso em 01 jan. 2020.}
- \label{fig:teste}
- \place{\includegraphics[width=0.4\linewidth]{example-image}}
-
- Ver \ref{fig:teste}.
-\end{document}
-\codeoff
-
-O leitor pode querer definir uma nova área de legenda usando, por exemplo, a instrução: \cs\legendplacedef\ccval{diagram}\ccval{Diagrama}\ccval{Lista de diagramas}\ccval{diag.\cs\,\cs#1}\ccval{lod} que vai criar o comando \cs\makelod\ para escrever no documento as entradas do arquivo auxiliar .lod.
-
-%*
-
-\section{Formatação de {\ttfamily\protect\textbackslash cite} e referências}
-
-Até o momento o \pkg{abntexto} não possui macros para formatação de \cs\cite\ e referências. Utilize \cs{\usepackage[style=abnt]\{biblatex\}}.
-
-\section{Citações}
-
-Para inserir aspas em citações diretas use \cs\qt\ccval{texto}. Mas, se tratando de citações diretas com mais de três linhas, alterne para \cs\quote\ccval{texto \cs\cite\cc{key}}.
-
-\newpage
-
-\corrprinton
-%\printbibliography
-\corrprintoff
-
-\newpage
-\appendix
-
-\section{\emph{Feedback}}
-Sugestões, relatos de \emph{bugs} e doações são bem-vindas.
-
-\section{Código-fonte}
-
-\makeatletter
-\newcount\seccount \def\thesec{\the\seccount}
-\def\extlabelwidth{4ex}
-\def\extlabelbox#1{\hbox to\extlabelwidth{#1~---~\hfil}}
-\def\l@subsection#1#2{\smartaboveskip{\penalty351}{\vskip1em plus1pt}%
- \begingroup
- \usetocifont \nobreak
- \extlineshape \relax
- \hskip-\leftskip \maybeuctoc{#1}\nobreak\hfil\nobreak
- \hbox to1.55em{\hss #2\kern-1pt\kern1pt}\par
- \endgroup
-}
-\def\subsection#1{\par \smartaboveskip{\penalty351}{\vskip\subsectionabove}\noindent
- \advancecount\seccount
- \setbox0=\hbox{\usesubsectionfont \thesec\quad}%
- {\usesubsectionfont \hangindent=\wd0 \box0 #1\tnba@nbpar}%
- \nobreak \smartbelowskip{\vskip\subsectionbelow}%
-}
-\makeatother
-
-% SOURCE MACROS
-% ================================================
-
-\makeatletter
-
-\definecolor{bg}{cmyk}{0,0.06,0,0}
-\definecolor{comment}{cmyk}{0.9,0,0,0.1}
-
-\def\sec#1\par{\subsection{#1}}
-
-\newdimen\hhkern \hhkern=12pt
-\newdimen\vvkern \vvkern=12pt
-
-\def\hh{\kern\hhkern}
-\def\vv{\kern\vvkern}
-
-{\catcode`\^^M=13
- \gdef\verbpercent#1^^M{{\bfseries\color{comment}\@percentchar#1^^M}}
-}
-
-\def\srccatcodes{\catcode`\!=14 \catcode`\%=9 \catcode`\|=0 }
-\def\codecatcodes{\let\do=\dodef \dospecials}
-
-\long\def\bcode{\par\begingroup \codecatcodes
- \adef{\^^I}{\ \ \ }%
- \adef{\^^M}{\par\leavevmode}%
- \adef{ }{\ }%
- \adef{\%}{\verbpercent}%
-% \def\par##1{\endgraf\ifx##1\par\leavevmode\fi##1}\obeylines
- \startcode
-}
-{\catcode`\%=13 \catcode`\ =13 \catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
- |long|gdef|startcode #1% |ecode{|codefont{#1}|par|endgroup}
-}
-
-\def\codefont{\raggedright\small\ttnoligs\bgbox}
-
-\long\def\bgbox#1{\setbox0=\vbox{\advance\hsize-24pt \vv#1\vv}%
- \ifdim\ht0>\dimexpr \pagegoal - \pagetotal \relax
- \setbox2=\vsplit0 to\dimexpr \pagegoal - \pagetotal -24pt \relax
- \fi
- \vskip8pt minus2pt
- \drawbg2\par \drawbg0%
- \vskip8pt minus2pt
-}
-\def\drawbg#1{\leavevmode
- \rlap{{\color{bg} \vrule width\dimexpr\wd#1+24pt\relax height\ht#1 depth\dp#1}}%
- \hbox{\hh\box#1\hh}%
-}
-
-\def\inputsrc#1{\begingroup \parskip=0pt \srccatcodes \input #1\endgroup}
-
-\inputsrc{abntexto.cls}
-
-\end{document}
diff --git a/macros/latex/contrib/abntexto/abntexto.bib b/macros/latex/contrib/abntexto/abntexto.bib
index 6e58d2d95f..7110e1db1d 100644
--- a/macros/latex/contrib/abntexto/abntexto.bib
+++ b/macros/latex/contrib/abntexto/abntexto.bib
@@ -1,24 +1,24 @@
@book{texbytopic,
- author = {Viktor Eijkhout},
- title = {\TeX\ by topic: a \TeX nician’s reference},
- location = {England},
+ author = {Viktor Eijkhout},
+ title = {\TeX\ by topic: a \TeX nician’s reference},
+ location = {England},
publisher = {Addison-Wesley},
- date = {1992},
- url = {https://www.ctan.org/pkg/texbytopic},
- urldate = {2022-09-28}
+ date = {1992},
+ url = {https://www.ctan.org/pkg/texbytopic},
+ urldate = {2022-09-28}
}
@book{viaexemplos,
- author = {Sadao Massago},
- title = {\LaTeXe\ Via Exemplos},
+ author = {Sadao Massago},
+ title = {\LaTeXe\ Via Exemplos},
location = {São Paulo},
- date = {2022-05-17},
- url = {https://www.ctan.org/pkg/latex-via-exemplos},
- urldate = {2022-09-28}
+ date = {2022-05-17},
+ url = {https://www.ctan.org/pkg/latex-via-exemplos},
+ urldate = {2022-09-28}
}
@book{latex2eunnoficial,
- author = {Torsten Martinsen and Stephen Gilmore and Karl Berry},
- title = {\LaTeXe: An unofficial reference manual},
- date = {2022-05},
- url = {https://www.ctan.org/pkg/latex2e-help-texinfo},
+ author = {Torsten Martinsen and Stephen Gilmore and Karl Berry},
+ title = {\LaTeXe: An unofficial reference manual},
+ date = {2022-05},
+ url = {https://www.ctan.org/pkg/latex2e-help-texinfo},
urldate = {2022-09-28}
}
diff --git a/macros/latex/contrib/abntexto/abntexto.cls b/macros/latex/contrib/abntexto/abntexto.cls
index 4ae9b0ade6..d731a37d2e 100644
--- a/macros/latex/contrib/abntexto/abntexto.cls
+++ b/macros/latex/contrib/abntexto/abntexto.cls
@@ -1,17 +1,10 @@
%! Public Domain Software
-%! 2022-10-12
-%! 1.2.1-alpha
+%! 2023-01-31
+%! 2.0.0-alpha
%! Elayson
%! abntexto.classe at gmail.com
-%! ANNOUNCEMETS
-
-%!> Changed the manual's typographic font to a serif because they are better for reading long texts — although the manual is purposely short.
-
-%!> Removal of \srcname macro because it is useless.
-
-%! SUMÁRIO
-
+%! RECOMENDAÇÕES
%! PRÉ-CONFIGURAÇÕES
%! FONTES
%! LAYOUT
@@ -22,77 +15,87 @@
%! TABELAS
%! ÁREAS DE LEGENDA
%! NOTAS DE RODAPÉ
-%! UTILIDADES
%! IDENTIFICAÇÃO DO TRABALHO
%! A VÍRGULA COMO SEPARADOR DECIMAL
%! INICIALIZAÇÃO
-% |sec RECOMENDAÇÕES
-% !=======================================================
+% \sec RECOMENDAÇÕES
-% Macros internas não podem ser modificadas ou usadas diretamente. Isso é porque essas macros podem ser redefinidos ou até renomeados em futuras versões desta classe. Por macros internas entende-se aquelas com prefixo do pacote em questão, neste caso, \cs{tnba@}. Se você precisa de algum comando interno, defina outro sem anexar o prefixo.
+% Macros internas não podem ser modificadas ou usadas diretamente. Isso é porque essas macros podem ser redefinidas ou até renomeadas em futuras versões desta classe. Por macros internas entende-se aquelas com o prefixo do pacote em questão, neste caso, \cs{tnba@}. Se você precisa de algum comando interno, defina outro sem anexar o prefixo.
% \sec PRÉ-CONFIGURAÇÕES
-% !=======================================================
% Identificação do formato \TeX\ e da classe. Apenas o pacote \pkg{keyval} é carregado no \pkg{abntexto}.
% |bcode !------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{abntexto}[2022-10-12 1.2.1-alpha Preparation of works in ABNT standards]
+\ProvidesClass{abntexto}[2023-01-31 2.0.0-alpha Preparation of works in ABNT standards]
\RequirePackage{keyval}
% |ecode !------------------------------------------------
-% Definição de um sistema \emph{chave=valor} pessoal e de macros auxiliares. Perceba que \cs{\tnba@bodyhook} não pode ser igual a \cs\relax, mas \cs\empty\ ao invés.
+% Definição de um sistema \emph{chave=valor} pessoal e de macros auxiliares.
% |bcode !------------------------------------------------
-\def\tnba@keyprefix{tnba}
-
-\def\tnba@key{\define@key{\tnba@keyprefix @\tnba@keyfamily}}
-\def\tnba@setkeys{\setkeys{\tnba@keyprefix @\tnba@keyfamily}}
-\def\tnba@setmacrokeys#1{\setkeys{\tnba@keyprefix @#1}}
+\def\tnba@key{\define@key{tnba@\tnba@keyfamily}}
+\def\tnba@setkeys#1{\setkeys{tnba@#1}}
-\def\advancecount#1{\global\advance#1by1 }
\def\tnba@addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
-\def\tnba@tobody{\tnba@addto\tnba@bodyhook}
-\let\tnba@bodyhook=\empty
-\AddToHook{begindocument}{\def\tnba@body{}\tnba@bodyhook}
+\newif \iftnba@inbody
+\AddToHook{begindocument}{\tnba@inbodytrue}
% |ecode !------------------------------------------------
-% Comando de \emph{debug}.
+% Alertas, mensagens, \emph{debug}.
% |bcode !------------------------------------------------
-\def\tnba@error{\ClassError{abntexto}}
+\def\tnba@warning{\ClassWarningNoLine{abntexto}}
+\def\tnba@error#1{\ClassError{abntexto}{#1}{}}
% |ecode !------------------------------------------------
-% \sec FONTE TIPOGRÁFICA
-% !=======================================================
+% Condicionais para identificação da extensão \TeX.
-% Apenas o tamanho 12\,pt está definido. Defina outros usando \cs\fontsizedef\cc{size}\cc{defs}.
+% |bcode !------------------------------------------------
+\newif \iftnba@PDFTEX
+\newif \iftnba@XETEX
+\newif \iftnba@LUATEX
+
+\ifx\directlua\undefined \ifx\XeTeXversion\undefined
+ \tnba@PDFTEXtrue \else
+ \tnba@XETEXtrue \fi \else
+ \tnba@LUATEXtrue \fi
+% |ecode !------------------------------------------------
+
+% \sec FONTE TIPOGRÁFICA
-% Diferentemente de outras âncoras, \cs{\tnba@setfontsizehook} deve ser executado antes de \cs\begin\ccval{document} para evitar o alerta sobre \cs\normalsize\ não estar definido.
+% Apenas o tamanho 12\,pt está definido. Defina outros usando \cs\definefontsize\cc{id}\hfil\break \cc{definições}.
% |bcode !------------------------------------------------
-\def\fontsizedef#1#2{\@namedef{tnba@fontsize@#1}{#2}}
-\def\sizeselectordef#1#2#3{\DeclareRobustCommand#1{\@setfontsize#1{#2}{#3}}}
-\def\normalsizedef#1#2{\def\normalsize{\@setfontsize\normalsize{#1}{#2}}}
+\def\definefontsize#1#2{\@namedef{tnba@fontsize@#1}{#2}}
+
\def\setfontsize#1{\ifcsname tnba@fontsize@#1\endcsname
- \def\tnba@setfontsizehook{\csname tnba@fontsize@#1\endcsname} \else
- \let\normalsize=\relax
- \tnba@error{Tamanho de fonte *#1* desconhecido}{}\relax \fi
+ \def\tnba@setfontsizehook{\csname tnba@fontsize@#1\endcsname}\else
+ \let\normalsize=\relax \tnba@error{Tamanho de fonte ''#1'' desconhecido}\relax \fi
}
-\AddToHook{begindocument/before}{\tnba@setfontsizehook}
+\@onlypreamble \setfontsize
+
+\def\sizedef#1#2#3#4{\DeclareRobustCommand#1{\fontsize{#2}{#3}\selectfont#4}}
\def\spacing#1{\def\currspacing{#1}%
- \ifx\tnba@body\undefined
- \tnba@tobody{\tnba@spacing{#1}} \else
- \tnba@spacing{#1}\fi \ignorespaces
+ \@tempdima=\f@size pt \baselineskip=#1\@tempdima \ignorespaces
+}
+
+\def\currspacing{1.5}
+\def\normalsize{}
+\def\tnba@setfontsizehook{}
+
+\AddToHook{begindocument}{%
+ \tnba@setfontsizehook
+ \normalsize
+ \@tempdima=\f@size pt \baselineskip=\currspacing\@tempdima
}
-\def\tnba@spacing#1{\dimen0=\f@size pt \dimen0=#1\dimen0 \baselineskip=\dimen0}
\def\singlesp{\baselineskip=\normalbaselineskip}
\def\onehalfsp{\spacing{1.5}}
@@ -100,63 +103,52 @@
% |ecode !------------------------------------------------
% \sec \emph{LAYOUT}
-% !=======================================================
-% |bcode !------------------------------------------------
-\def\tnba@keyfamily{paper}
+% Se você precisa de configurações de página mais avançadas use o pacote \pkg{geometry}, mas não use \cs\setlayout\ e \cs\geometry\ simultaneamente.
-\def\papersizedef#1(#2,#3){\def\tnba@keyfamily{paper}%
- \tnba@key{#1}[]{\def\tnba@W{#2}\def\tnba@H{#3}}%
-}
-
-\tnba@key{width} {\def\tnba@W{#1}}
-\tnba@key{height} {\def\tnba@H{#1}}
-\tnba@key{left} {\def\tnba@L{#1}}
-\tnba@key{right} {\def\tnba@R{#1}}
-\tnba@key{top} {\def\tnba@T{#1}}
-\tnba@key{bottom} {\def\tnba@B{#1}}
-\tnba@key{twoside}[true]{\def\tnba@twoside{#1}}
+% |bcode !------------------------------------------------
+\iftnba@LUATEX
+ \protected\edef\pdfhorigin {\pdfvariable horigin}
+ \protected\edef\pdfvorigin {\pdfvariable vorigin}
+ \let\pdfpagewidth=\pagewidth
+ \let\pdfpageheight=\pageheight
+\fi
-\def\paper#1{\tnba@setmacrokeys{paper}{#1}%
- \paperwidth=\tnba@W
- \paperheight=\tnba@H
- \oddsidemargin=\tnba@L
- \evensidemargin=\tnba@R
+\def \tnba@keyfamily {setlayout}
+
+\tnba@key{paper} {\csname tnba@papersize@#1\endcsname}
+\tnba@key{width} {\def\tnba@W{#1}}
+\tnba@key{height} {\def\tnba@H{#1}}
+\tnba@key{left} {\def\tnba@L{#1}}
+\tnba@key{right} {\def\tnba@R{#1}}
+\tnba@key{top} {\def\tnba@T{#1}}
+\tnba@key{bottom} {\def\tnba@B{#1}}
+\tnba@key{twoside}[true]{\csname @twoside#1\endcsname}
+
+\def \setlayout #1{\tnba@setkeys{setlayout}{#1}%
+ \paperwidth=\tnba@W \paperheight=\tnba@H
+ \oddsidemargin=\tnba@L \evensidemargin=\tnba@R
+ \textwidth=\paperwidth \textheight=\paperheight
\topmargin=\tnba@T
- \textwidth=\paperwidth
- \textheight=\paperheight
\headheight=12pt
\headsep=1cm
- \advance\topmargin-\headheight \advance\topmargin-\headsep
+ \advance\topmargin-\headheight \advance\topmargin-\headsep
\advance\textwidth-\tnba@L \advance\textwidth-\tnba@R
- \advance\textheight-\tnba@T \advance\textheight-\tnba@B
- \setbox0=\hbox{\@setfontsize\@tempa{10pt}{12pt}\@tempa 1}%
- \advance\headsep-\ht0
- \ifx\pdfpagewidth\undefined
- \ifx\pagewidth\undefined
- \tnba@error{O comando \@backslashchar paper só suporta saída em PDF.
- Use o formato PDF ou carregue o pacote *geometry*}\expandafter\enddocument\relax \else
- \horigin=0pt
- \vorigin=0pt
- \pagewidth=\paperwidth
- \pageheight=\paperheight
- \fi
+ \advance\textheight-\tnba@T \advance\textheight-\tnba@B
+ \tnba@setlayoutA
+}
+
+\def \tnba@setlayoutA {%
+ \iftnba@XETEX
+ \advance\oddsidemargin-1in \advance\evensidemargin-1in \advance\topmargin-1in
+ \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight
\else
- \ifx\pdfhorigin\undefined
- \advance\oddsidemargin-1in
- \advance\topmargin-1in
- \pdfpagewidth=\paperwidth
- \pdfpageheight=\paperheight
- \else
- \pdfhorigin=0pt
- \pdfvorigin=0pt
- \pdfpagewidth=\paperwidth
- \pdfpageheight=\paperheight
- \fi
+ \pdfhorigin=0pt \pdfvorigin=0pt
+ \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight
\fi
- \ifx\tnba@twoside\undefined \else
- \csname @twoside\tnba@twoside\endcsname \fi
}
+
+\def\definepapersize#1#2#3{\@namedef{tnba@papersize@#1}{\def\tnba@W{#2}\def\tnba@H{#3}}}
% |ecode !------------------------------------------------
% O estilo de página \cs\pretextual\ omite a numeração de página e desliga o modo \cs{twoside} porque os elementos pré-textuais que compreendem as folhas da capa à do sumário, devem constar no anverso da página, ou seja, na “frente” da folha.
@@ -164,323 +156,338 @@
% A instrução \cs\textual\ põe a numeração de página no topo direito nas páginas ímpares e no topo esquerdo em paginas pares. Além disso, \cs{twoside} vai espelhar as margens horizontais.
% |bcode !------------------------------------------------
-\def\pretextual{\paper{twoside=false}%
+\def\pretextual{\setlayout{twoside=false}%
\let\@oddhead=\empty
\let\@evenhead=\empty
\let\@oddfoot=\empty
\let\@evenfoot=\empty
}
-\def\textual{\paper{twoside=true}%
- \def\@oddhead{{\itshape\rightmark}\hfil{\small\thepage}}%
- \def\@evenhead{{\small\thepage}\hfil\itshape\leftmark}%
- \let\@oddfoot=\empty
- \let\@evenfoot=\empty
- \justifying
+\def\textual{\setlayout{twoside=true}%
+ \def\@oddhead{\hfil\small\thepage}%
+ \def\@evenhead{\small\thepage\hfil}%
+ \def\@oddfoot{}%
+ \def\@evenfoot{}%
\parindent=1.5cm
}
% |ecode !------------------------------------------------
% \sec SUMÁRIO
-% !=======================================================
-% Aqui, \cs\extline\ foi baseado em \cs\@dottedtocline, do kernel do LaTeX. Ele não é uma instrução privada, ou seja, com prefixo interno, pois existe a chance de o leitor querer redefiní-lo (o mesmo vale para \cs\extlineshape).
+% Aqui, a macro \cs\extline\ foi baseada em \cs\@dottedtocline, do kernel do \LaTeX. Ela não é uma instrução privada, ou seja, com prefixo interno, porque existe a chance de o leitor querer redefiní-la.
% |bcode !------------------------------------------------
+\newdimen\extlabelwidth
+
\def\thepage{\the\c@page}
-\def\extline#1#2#3#4{%
+\def\extpagenumwidth{1.55em}
+\def\extrightmargin{2.55em}
+
+\def\extline#1#2#3#4#5{\vskip0pt plus.2pt
+ \extlabelwidth=#2
\begingroup
- \csname use#1\romannumeral#2font\endcsname \nobreak
- \extlineshape \relax
- \hskip-\leftskip {#3}\nobreak
- \leaders\hbox{$\m@th \mkern4.5mu\hbox{.}\mkern4.5mu$}\hfil\nobreak
- \hbox to1.55em{\hss #4\kern-1pt\kern1pt}\par
+ \parindent=#1 \leftskip=#1
+ \rightskip=\extrightmargin \parfillskip=-\rightskip
+ \leavevmode #3{}\advance\leftskip\extlabelwidth \hskip-\leftskip #3{#4}\nobreak\extleaders\nobreak
+ \hbox to\extpagenumwidth{\hfil #5\kern-1pt\kern1pt}\nbpar
\endgroup
}
-\def\extlineshape{%
- \parindent=0pt
- \leftskip=\extlabelwidth
- \rightskip=2.55em
- \parfillskip=-\rightskip
- \interlinepenalty=10000
- \leavevmode
-}
+\def\extleaders{\leaders\hbox{$\mathsurround=0pt \mkern4.5mu\hbox{.}\mkern4.5mu$}\hfill}
-\def\l@section#1#2{\smartaboveskip{\penalty351}{\vskip1em plus1pt}%
+\def \l@toci #1#2{\addpenalty{351}\addvspace{1em plus1pt}%
+ \extlabelwidth=\toclabelwidth
\begingroup
- \usetocifont \nobreak
- \extlineshape \relax
- \hskip-\leftskip \maybeuctoc{#1}\nobreak\hfil\nobreak
- \hbox to1.55em{\hss #2\kern-1pt\kern1pt}\par
+ \parindent=0pt \rightskip=\extrightmargin \parfillskip=-\rightskip
+\leavevmode \tocifont{}\advance\leftskip\extlabelwidth
+ \hskip-\leftskip \tocifont{#1}\nobreak\hfil\nobreak
+ \hbox to\extpagenumwidth{\hfil #2\kern-1pt\kern1pt}\par
\endgroup
}
-\def\l@subsection {\extline{toc}{2}}
-\def\l@subsubsection {\extline{toc}{3}}
-\def\l@paragraph {\extline{toc}{4}}
-\def\l@subparagraph {\extline{toc}{5}}
-% |ecode !------------------------------------------------
-
-% Comandos de personalização do ToC (sumário).
-% |bcode !------------------------------------------------
-\def\tociuppercase{\def\maybeuctoc{\MakeUppercase}}
-\def\tocilowercase{\let\maybeuctoc=\relax}
-
-\def\tocifont#1{\def\usetocifont{#1}}
-\def\tociifont#1{\def\usetociifont{#1}}
-\def\tociiifont#1{\def\usetociiifont{#1}}
-\def\tocivfont#1{\def\usetocivfont{#1}}
-\def\tocvfont#1{\def\usetocvfont{#1}}
+\def \l@tocii {\extline{0pt}{\toclabelwidth}{\tociifont}}
+\def \l@tociii {\extline{0pt}{\toclabelwidth}{\tociiifont}}
+\def \l@tociv {\extline{0pt}{\toclabelwidth}{\tocivfont}}
+\def \l@tocv {\extline{0pt}{\toclabelwidth}{\tocvfont}}
% |ecode !------------------------------------------------
% \sec SECIONAMENTO
-% !=======================================================
-% As linhas abaixo são basicamente uma cópia da funcionalidade do formato OpTeX. O par \cs\smartaboveskip, \cs\smartbelowskip, em especial, serve para eliminar \cs\vskip’s redundantes.
+% O comando \cs\hangfrom\ foi retirado do kernel. Ele vai ser útil na formatação das seções.
+
+% \cs\hreftocline\ habilita hyperlinks no sumário se o \pkg{hyperref} estiver carregado.
+
+% |bcode !------------------------------------------------
+\let\hangfrom=\@hangfrom
+\def\nbpar{{\interlinepenalty=10000\par}}
+\def\advcount#1{\advance#1by1 }
+\def\addtotoc{\hreftocline\currsecname \addcontentsline{toc}}
+% |ecode !------------------------------------------------
% |bcode !------------------------------------------------
-\def\tnba@nbpar{\interlinepenalty=10000\par}
-\def\noindentfirst{\global\everypar={\tnba@wipeepar \setbox7=\lastbox}}
-\def\tnba@wipeepar{\global\everypar={}}
+\newcount\countseclevel
+
+\newcount\countsection
+\newcount\countsubsection
+\newcount\countsubsubsection
+\newcount\countparagraph
+\newcount\countsubparagraph
+
+\def\thesection{\the\countsection}
+\def\thesubsection{\thesection .\the\countsubsection}
+\def\thesubsubsection{\thesubsection .\the\countsubsubsection}
+\def\theparagraph{\thesubsubsection .\the\countparagraph}
+\def\thesubparagraph{\theparagraph .\the\countsubparagraph}
+% |ecode !------------------------------------------------
-\newskip\savedtitleskip
-\newskip\savedlastskip
+% Nesta parte estão definidos os comandos secionais. Nenhum destes comandos são internos, caso o leitor queira redefiní-los.
-\def\smartaboveskip#1#2{\savedlastskip=\lastskip
- \ifdim\lastskip>\z@ \vskip-\lastskip \fi
- \ifnum\lastpenalty=11333 \vskip-\savedtitleskip \else #1\fi
- \ifdim\savedlastskip>\z@ \setbox0=\vbox{#2\global\dimen0=\lastskip}%
- \else \dimen0=\maxdimen \fi
- \ifdim\savedlastskip>\dimen0 \vskip\savedlastskip \else #2\fi
+% |bcode !------------------------------------------------
+\def\recountseci {\countsubsection=0 \recountsecii}
+\def\recountsecii {\countsubsubsection=0 \recountseciii}
+\def\recountseciii {\countparagraph=0 \recountseciv}
+\def\recountseciv {\countsubparagraph=0 }
+
+\def\noindentfirst{\global\everypar={\global\everypar={}\setbox7=\lastbox}}
+\def\tryindentfirst{}
+
+\def\startsection#1{\advcount\countsection \recountseci
+ \hangfrom{\sectionfont\thesection\quad}%
+ {\sectionfont{#1}\nbpar}%
+ \tryindentfirst
+}
+\def\startsubsection#1{\advcount\countsubsection \recountsecii
+ \hangfrom{\subsectionfont\thesubsection\quad}%
+ {\subsectionfont{#1}\nbpar}%
+ \tryindentfirst
+}
+\def\startsubsubsection#1{\advcount\countsubsubsection \recountseciii
+ \hangfrom{\subsubsectionfont\thesubsubsection\quad}%
+ {\subsubsectionfont{#1}\nbpar}%
+ \tryindentfirst
+}
+\def\startparagraph#1{\advcount\countparagraph \recountseciv
+ \hangfrom{\paragraphfont\theparagraph\quad}%
+ {\paragraphfont{#1}\nbpar}%
+ \tryindentfirst
+}
+\def\startsubparagraph#1{\advcount\countsubparagraph
+ \hangfrom{\subparagraphfont\thesubparagraph\quad}%
+ {\subparagraphfont{#1}\nbpar}%
+ \tryindentfirst
}
-\def\smartbelowskip#1{#1\global\savedtitleskip=\lastskip \penalty11333}
% |ecode !------------------------------------------------
+% A instrução \cs\setcurrlabel\ ensina a forma como \cs\label's devem ser referenciados. Esse comando pode ser útil em outros contextos.
+
% |bcode !------------------------------------------------
-\newcount\sectioncount
-\newcount\subsectioncount
-\newcount\subsubsectioncount
-\newcount\paragraphcount
-\newcount\subparagraphcount
-
-\def\thesection{\the\sectioncount}
-\def\thesubsection{\thesection .\the\subsectioncount}
-\def\thesubsubsection{\thesubsection .\the\subsubsectioncount}
-\def\theparagraph{\thesubsubsection .\the\paragraphcount}
-\def\thesubparagraph{\theparagraph .\the\subparagraphcount}
-
-\def\sectionmark#1{}
-\def\subsectionmark#1{}
-\def\subsubsectionmark#1{}
-\def\paragraphmark#1{}
-\def\subparagraphmark#1{}
+\def\setcurrlabel#1{\def\@currentlabel{#1}}
+
+\def\cfsection {\setcurrlabel{secão\,\thesection}}
+\def\cfsubsection {\setcurrlabel{subseção\,\thesubsection}}
+\def\cfsubsubsection {\setcurrlabel{subseçao\,\thesubsubsection}}
+\def\cfparagraph {\setcurrlabel{subseçao\,\theparagraph}}
+\def\cfsubparagraph {\setcurrlabel{subseçao\,\thesubparagraph}}
+
+\def\identifysection {\def\currsecname{section}\countseclevel=1 \cfsection}
+\def\identifysubsection {\def\currsecname{subsection}\countseclevel=2 \cfsubsection}
+\def\identifysubsubsection {\def\currsecname{subsubsection}\countseclevel=3 \cfsubsubsection}
+\def\identifyparagraph {\def\currsecname{paragraph}\countseclevel=4 \cfparagraph}
+\def\identifysubparagraph {\def\currsecname{subparagraph}\countseclevel=5 \cfsubparagraph}
+
+\def\section#1{\par \addpenalty{351}\addvspace\abovesection
+ \identifysection
+ \startsection{#1}%
+ \marksection{#1}%
+ \addtotoc{toci}{\protect\toclabelbox{\thesection}#1}%
+ \par\nobreak \vskip\belowsection
+}
+\def\subsection#1{\par \addpenalty{351}\addvspace\abovesubsection
+ \identifysubsection
+ \startsubsection{#1}%
+ \marksubsection{#1}%
+ \addtotoc{tocii}{\protect\toclabelbox{\thesubsection}#1}%
+ \par\nobreak \vskip\belowsubsection
+}
+\def\subsubsection#1{\par \addpenalty{351}\addvspace\abovesubsubsection
+ \identifysubsubsection
+ \startsubsubsection{#1}%
+ \marksubsubsection{#1}%
+ \addtotoc{tociii}{\protect\toclabelbox{\thesubsubsection}#1}%
+ \par\nobreak \vskip\belowsubsubsection
+}
+\def\paragraph#1{\par \addpenalty{351}\addvspace\aboveparagraph
+ \identifyparagraph
+ \startparagraph{#1}%
+ \markparagraph{#1}%
+ \addtotoc{tociv}{\protect\toclabelbox{\theparagraph}#1}%
+ \par\nobreak \vskip\belowparagraph
+}
+\def\subparagraph#1{\par \addpenalty{351}\addvspace\abovesubparagraph
+ \identifysubparagraph
+ \startsubparagraph{#1}%
+ \marksubparagraph{#1}%
+ \addtotoc{tocv}{\protect\toclabelbox{\thesubparagraph}#1}%
+ \par\nobreak \vskip\belowsubparagraph
+}
% |ecode !------------------------------------------------
-% Nesta parte estão definidos os comandos secionais.
+% O \cs\@starttoc\ pode ser usado não apenas para criar sumários, mas, também, listas em geral, como listas de figuras, tabelas etc. as quais são armazenadas em arquivos de extensão predefinida, a saber, .toc, .lof, .lot entre outros. Portanto, \cs\makeext\ parece ter mais valor semântico.
% |bcode !------------------------------------------------
-\def\section#1{\par \smartaboveskip{\penalty351}{\vskip\sectionabove}\noindent
- \advancecount\sectioncount
- \def\@currentlabel{seção~\thesection}%+/
- \setbox0=\hbox{\usesectionfont \thesection\quad}%
- {\usesectionfont \hangindent=\wd0 \box0 \maybeucsec{#1}\tnba@nbpar}%
-% \noindentfirst
- \hreftocline{section}%
- \addcontentsline{toc}{section}{\protect\extlabelbox{\thesection\hss}#1}%
- \nobreak \smartbelowskip{\vskip\sectionbelow}%
-}
-\def\subsection#1{\par \smartaboveskip{\penalty351}{\vskip\subsectionabove}\noindent
- \advancecount\subsectioncount
- \setbox0=\hbox{\usesubsectionfont \thesubsection\quad}%
- {\usesubsectionfont \hangindent=\wd0 \box0 #1\tnba@nbpar}%
-% \noindentfirst
- \hreftocline{subsection}%
- \addcontentsline{toc}{subsection}{\protect\extlabelbox{\thesubsection\hss}#1}%
- \nobreak \smartbelowskip{\vskip\subsectionbelow}%
-}
-\def\subsubsection#1{\par \smartaboveskip{\penalty351}{\vskip\subsubsectionabove}\noindent
- \advancecount\subsubsectioncount
- \setbox0=\hbox{\usesubsubsectionfont \thesubsubsection\quad}%
- {\usesubsubsectionfont \hangindent=\wd0 \box0 #1\tnba@nbpar}%
-% \noindentfirst
- \hreftocline{subsubsection}%
- \addcontentsline{toc}{subsubsection}{\protect\extlabelbox{\thesubsubsection\hss}#1}%
- \nobreak \smartbelowskip{\vskip\subsubsectionbelow}%
-}
-\def\paragraph#1{\par \smartaboveskip{\penalty351}{\vskip\paragraphabove}\noindent
- \advancecount\paragraphcount
- \setbox0=\hbox{\useparagraphfont \theparagraph\quad}%
- {\useparagraphfont \hangindent=\wd0 \box0 #1\tnba@nbpar}%
-% \noindentfirst
- \hreftocline{paragraph}%
- \addcontentsline{toc}{paragraph}{\protect\extlabelbox{\theparagraph\hss}#1}%
- \nobreak \smartbelowskip{\vskip\paragraphbelow}%
-}
-\def\subparagraph#1{\par \smartaboveskip{\penalty351}{\vskip\subparagraphabove}\noindent
- \advancecount\subparagraphcount
- \setbox0=\hbox{\subsubparagraphfont \thesubparagraph\quad}%
- {\usesubparagraphfont \hangindent=\wd0 \box0 #1\tnba@nbpar}%
-% \noindentfirst
- \hreftocline{subparagraph}%
- \addcontentsline{toc}{subparagraph}{\protect\extlabelbox{\thesubparagraph\hss}#1}%
- \nobreak \smartbelowskip{\vskip\subparagraphbelow}%
+\def\toclabelbox#1{\hbox to\extlabelwidth{#1\hfil}}
+\def\makeext#1{\@starttoc{#1}}
+\def\tocname{Sumário}
+
+\def\marksection#1{\markboth
+ {\MakeUppercase{\thesection\quad #1}}%
+ {}%
}
+\def\marksubsection#1{\markright{\MakeUppercase{\thesubsection\quad #1}}}
\def\hreftocline#1{\Hy@MakeCurrentHrefAuto{#1}%
\Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend}%
}
-\tnba@tobody{\ifx\hypertarget\undefined \let\hreftocline=\@gobble \fi}
-% |ecode !------------------------------------------------
-% A macro \cs\heading, em particular, serve para produzir títulos não contados, como “Sumário”, “Lista de figuras”, “Apêndice” etc.
-
-% |bcode !------------------------------------------------
-\def\heading#1{\noindent
- {\usesectionfont \centering \maybeucsec{#1}\tnba@nbpar}%
- \nobreak \vskip\sectionbelow
+\AddToHook{begindocument}{%
+ \@ifpackageloaded{hyperref}{}{\let\hreftocline=\@gobble}%
}
% |ecode !------------------------------------------------
-% Comandos de personalização de seções.
+% A macro \cs\heading\ serve para produzir títulos não contados, como “Sumário”, “Lista de figuras”, “Apêndice” etc.
% |bcode !------------------------------------------------
-\def\sectionuppercase{\def\maybeucsec{\MakeUppercase}}
-\def\sectionlowercase{\let\maybeucsec=\relax}
-
-\def\sectionfont#1{\def\usesectionfont{#1}}
-\def\subsectionfont#1{\def\usesubsectionfont{#1}}
-\def\subsubsectionfont#1{\def\usesubsubsectionfont{#1}}
-\def\paragraphfont#1{\def\useparagraphfont{#1}}
-\def\subparagraphfont#1{\def\usesubparagraphfont{#1}}
-
-\def\sectionspaces#1#2{\def\sectionabove{#1}\def\sectionbelow{#2}}
-\def\subsectionspaces#1#2{\def\subsectionabove{#1}\def\subsectionbelow{#2}}
-\def\subsubsectionspaces#1#2{\def\subsubsectionabove{#1}\def\subsubsectionbelow{#2}}
-\def\paragraphspaces#1#2{\def\paragraphabove{#1}\def\paragraphbelow{#2}}
-\def\subparagraphspaces#1#2{\def\subparagraphabove{#1}\def\subparagraphbelow{#2}}
-
-\def\toclabelwidth{3.4ex}
-\def\toclabelbox#1{\hbox to\extlabelwidth{#1\hfil}}
+\def\heading#1{\par {\centering \sectionfont{#1}\par}%
+ \nobreak \vskip\belowsection
+}
% |ecode !------------------------------------------------
-% Após a chamada da instrução \cs\appendix, \cs\section\ vai ser alterado para produzir títulos centralizados com o prefixo “Apêndice”. O mesmo vale para \annex.
+% Após a chamada da instrução \cs\appendix, \cs\section\ vai ser alterado para produzir títulos centralizados com o prefixo “Apêndice”. O mesmo vale para \cs\annex.
% |bcode !------------------------------------------------
-\newcount\appendixcount
-\newcount\annexcount
+\newcount\countappendix
+\newcount\countannex
+
+\def\theappendix{\@Alph\countappendix}
+\def\theannex{\@Alph\countannex}
-\def\theappendix{\@Alph\appendixcount}
-\def\theannex{\@Alph\annexcount}
\def\appendixlabelwidth{6.6em}
\def\annexlabelwidth{6.2em}
-\def\l@appendix{\let\extlabelwidth=\appendixlabelwidth
- \def\extlabelbox##1{\hbox to\extlabelwidth{Apêndice~##1~---~\hfil}}%
- \l@section
-}
-\def\l@annex{\let\extlabelwidth=\annexlabelwidth
- \def\extlabelbox##1{\hbox to\extlabelwidth{Anexo~##1~---~\hfil}}%
- \l@section
-}
-
-\def\appendix{\def\section##1{\newpage\noindent \advance\appendixcount by1
- {\usesectionfont \centering \maybeucsec{Apêndice~\theappendix~---~##1}\tnba@nbpar}%
- \hreftocline{appendix}%
- \addcontentsline{toc}{appendix}{\protect\extlabelbox{\theappendix}##1}%
- \nobreak \vskip\sectionbelow
- }%
-}
-\def\annex{\def\section##1{\newpage\noindent \advance\annexcount by1
- {\usesectionfont \centering \maybeucsec{Anexo~\theannex~---~##1}\tnba@nbpar}%
- \hreftocline{annex}%
- \addcontentsline{toc}{annex}{\protect\extlabelbox{\theannex}##1}%
- \nobreak \vskip\sectionbelow
- }%
-}
+\def\appendixlabelbox#1{\hbox to\appendixlabelwidth{Apêndice~#1~---~\hfil}}
+\def\annexlabelbox#1{\hbox to\annexlabelwidth{Anexo~#1~---~\hfil}}
+
+\def\l@appendix{\l@toci}
+\def\l@annex{\l@toci}
+
+\def\appendix{\def\section##1{\newpage \global\advcount\countappendix
+ {\centering \sectionfont{Apêndice~\theappendix~---~##1}\par}%
+ \addcontentsline{toc}{appendix}{\protect\appendixlabelbox{\theappendix}##1}%
+ \nobreak \vskip\belowsection
+}}
+\def\annex{\def\section##1{\newpage \global\advcount\countannex
+ {\centering \sectionfont{Anexo~\theannex~---~##1}\par}%
+ \addcontentsline{toc}{annex}{\protect\annexlabelbox{\theannex}##1}%
+ \nobreak \vskip\belowsection
+}}
% |ecode !------------------------------------------------
% \sec CITAÇÕES
-% !=======================================================
+
+% Se o pacote \pkg{csquotes} estiver carregado, ele definirá sua própria versão de \cs\enquote, do contrário, o \pkg{abntexto} criará uma.
% |bcode !------------------------------------------------
-\def\qt#1{``#1''}
+\AddToHook{begindocument}{%
+ \@ifpackageloaded{csquotes}{}{\protected\def\enquote#1{``#1''}}%
+}
-\def\quote#1{\smartaboveskip{\penalty351}{\vskip\baselineskip}%
- \hbox to\hsize{\hfil\vtop{\advance\hsize-4cm \noindent\small #1\tnba@getprevdepth}}\tnba@useprevdepth
- \smartbelowskip{\vskip\baselineskip}%
+\def\Enquote#1{\par\removelastskip
+ \vskip\baselineskip
+ {\noindent\leftskip=4cm \small #1\nbpar}%
+ \vskip\baselineskip
}
% |ecode !------------------------------------------------
% \sec ALÍNEAS
-% !=======================================================
-% Estas linhas não foram baseadas no ambiente \cs{list} do LaTeX, portanto, não podem ser personalizadas pelo pacote \cs{enumitem}, por exemplo.
+% Estas linhas não foram baseadas no ambiente \cs{list} do LaTeX, portanto, não podem ser personalizadas por pacotes como \cs{enumitem}, por exemplo.
% |bcode !------------------------------------------------
-\newcount\topicsdepth
-\newcount\topicscount
+\newcount\counttopicsdepth
+\newcount\counttopics
-\def\topicsitem{\par\leavevmode\noindent \advance\topicscount by1
- \def\@currentlabel{alínea~\@alph\topicscount )}%
- \kern\dimexpr-\parindent-\topicslabelwidth\relax
+\def\topicsitem{\par\leavevmode \advcount\counttopics
+ \setcurrlabel{alínea~\@alph\counttopics )}%
+ \noindent \kern \dimexpr -\parindent-\topicslabelwidth \relax
\hbox to\topicslabelwidth{\topicsmakelabel\hfil}%
\ignorespaces
}
-\def\topicslabeli{\@alph\topicscount )}
+\def\topicslabeli{\@alph\counttopics )}
\def\topicslabelii{---}
-\def\topics{\par \advance\topicsdepth by1
- \ifnum\topicsdepth=1 \advance\leftskip\parindent \fi
+\def\topics{\par\penalty51 \advcount\counttopicsdepth
+ \ifnum\counttopicsdepth=1 \advance\leftskip\parindent \fi
\advance\leftskip\topicslabelwidth
- \edef\topicsmakelabel{\expandafter\noexpand\csname topicslabel\romannumeral\topicsdepth\endcsname}%
+ \edef\topicsmakelabel{\expandafter\noexpand\csname topicslabel\romannumeral\counttopicsdepth\endcsname}%
\let\item=\topicsitem
\tnba@addto\@esphack\ignorespaces
}
-\let\endtopics=\par
+\def\endtopics{\par}
+% |ecode !------------------------------------------------
+
+% |bcode !------------------------------------------------
+
+\newenvironment{description}
+ {\list{}{\labelwidth=0pt \leftmargin=2em \itemindent=-\leftmargin \let\makelabel=\descriptionlabel}}
+ {\endlist}
+
+\def\descriptionlabel#1{\bfseries #1\hskip.5em }
% |ecode !------------------------------------------------
% \sec TABELAS
-% !=======================================================
-% Na classe \cs{article} o ambiente \cs{table} inicia o modo flutuante. Mas nesta classe ele é sinônimo de \cs{tabular} porque faz mais sentido para min.
+% Na classe \cs{article} o ambiente \cs{table} inicia o modo flutuante, mas nesta classe ele é sinônimo de \cs{tabular} porque faz mais sentido para min.
% |bcode !------------------------------------------------
\newenvironment{table}[1]{\begin{tabular}{#1}}{\end{tabular}}
% |ecode !------------------------------------------------
% \sec ÁREAS DE LEGENDA
-% !=======================================================
+
+% |bcode !------------------------------------------------
+\def\tnba@getprevdepth{\par\xdef\tnba@getprevdepthA{\the\prevdepth}}
+\def\tnba@useprevdepth{\par\prevdepth=\tnba@getprevdepthA}
+% |ecode !------------------------------------------------
% |bcode !------------------------------------------------
\def\tnba@lastplacenum{0}
-\def\legendplacedef#1#2#3#4#5{\expandafter\newcount\csname c@#1\endcsname
- \@namedef{#1name}{#2}
- \@namedef{p@#1}##1{#4}
- \@namedef{ext@#1}{#5}
- \@namedef{l@#1}{\extline{#5}{1}}
- \expandafter\edef\csname the#1\endcsname{\expandafter\noexpand\the\csname c@#1\endcsname}
- \@namedef{#5labelwidth}{10.4ex}
- \@namedef{#5labelbox}##1{\hbox to\extlabelwidth{#2 ##1 ---\hfil}}
- \@namedef{make#5}{\heading{#3}%
- \expandafter\let\expandafter\extlabelwidth\csname #5labelwidth\endcsname
- \expandafter\let\expandafter\extlabelbox\csname #5labelbox\endcsname
- \@starttoc{#5}\twonewpage
- }
+\def\definelegendplace#1#2#3#4#5{\expandafter\newcount\csname count#1\endcsname
+ \@namedef{#1name}{#2}%
+ \@namedef{p@#1}##1{#4}%
+ \@namedef{ext@#1}{#5}%
+ \@namedef{l@#5i}{\extline{0pt}{\csname #5labelwidth\endcsname}{\csname #5ifont\endcsname}}%
+ \expandafter\edef\csname the#1\endcsname{\expandafter\noexpand\the\csname count#1\endcsname}%
+ \@namedef{#5labelwidth}{10.4ex}%
+ \@namedef{#5labelbox}##1{\hbox to\extlabelwidth{#2~##1~---\hfil}}%
+ \@namedef{#5ifont}{}%
+ \@namedef{make#5}{\heading{#3} \makeext{#5}\twonewpage}%
}
% |ecode !------------------------------------------------
% |bcode !------------------------------------------------
\def\tnba@makelegend{\hbox to\hsize{\hfil\tnba@makelegendA\hfil}}
-\def\tnba@makelegendA{\advancecount{\csname c@\tnba@savedplace\endcsname}%
+\def\tnba@makelegendA{%\global\advance\csname count\tnba@savedplace\endcsname by1
+ \global\advcount{\csname count\tnba@savedplace\endcsname}%
\vtop{\setbox0=\hbox{\legendlabel \tnba@savedlegend}%
\ifdim\wd0>\legendmaxwidth \hsize=\legendmaxwidth \else \hsize=\wd0 \fi
\legendlabel
\vtop{\setbox0=\hbox{\legendlabel}\advance\hsize-\wd0 \tnba@savedlegend}%
}%
- \addcontentsline{\csname ext@\tnba@savedplace\endcsname}%
- {\tnba@savedplace}%
- {\protect\extlabelbox\thelegend \tnba@savedlegend}%
+ \edef\@tempa{\expandafter\noexpand\csname \csname ext@\tnba@savedplace\endcsname labelbox\endcsname}%
+ \edef\@tempa{\noexpand\addcontentsline{\expandafter\noexpand\csname ext@\tnba@savedplace\endcsname}%
+ {\expandafter\noexpand\csname ext@\tnba@savedplace\endcsname i}%
+ {\noexpand\protect\expandafter\noexpand\@tempa{\noexpand\thelegend}\noexpand\tnba@savedlegend}}%
+ \@tempa
}
\def\tnba@makesrc{\hbox to\hsize{\hfil\tnba@makesrcA\hfil}\tnba@useprevdepth}
@@ -490,23 +497,17 @@
% |ecode !------------------------------------------------
% |bcode !------------------------------------------------
-\def\legend#1#2{%
- \ifdim\lastskip<0pt \else
- \ifnum\lastpenalty=11333 \vskip-\placeabovespace \else
- \removelastskip \fi\fi
- \def\tnba@savedplace{#1}\def\tnba@savedlegend{#2}%
- \def\@currentlabel{\csname p@#1\expandafter\endcsname
- \the\expandafter\numexpr\csname c@#1\endcsname+1}%
+\def\legend#1#2{\removelastskip
+ \def\tnba@savedplace{#1}%
+ \def\tnba@savedlegend{#2}%
+ \setcurrlabel{\csname p@#1\expandafter\endcsname
+ \the\expandafter\numexpr\csname count#1\endcsname+1}%
}
+
\def\legendname{\csname \tnba@savedplace name\endcsname}
-\def\thelegend{\the\csname c@\tnba@savedplace\endcsname}
+\def\thelegend{\the\csname count\tnba@savedplace\endcsname}
-\def\src#1{%
- \ifdim\lastskip<0pt \else
- \ifnum\lastpenalty=11333 \vskip-\placeabovespace \else
- \removelastskip \fi\fi
- \def\tnba@savedsrc{#1}%
-}
+\def\src#1{\removelastskip \def\tnba@savedsrc{#1}}
% |ecode !------------------------------------------------
% |bcode !------------------------------------------------
@@ -514,78 +515,59 @@
\let\tnba@savedlegend=\empty
\let\tnba@savedsrc=\empty
-\long\def\place#1{\setbox0=\hbox{\ignorespaces#1}\edef\tnba@placewidth{\the\wd0}%
- \vskip\placeabovespace
+\long\def\place#1{\vskip\aboveplace
\begingroup
+ \setbox0=\hbox{\ignorespaces#1\unskip}\edef\tnba@placewidth{\the\wd0}%
\parindent=0pt
\ifx\tnba@savedplace\empty\else\tnba@makelegend\fi
- \nointerlineskip\nobreak\vskip10pt
- \hbox to\hsize{\hfil\box0\hfil}%
- \nointerlineskip\nobreak\vskip8pt
- \tnba@makesrc
- \vskip\placebelowspace
+ \par\nointerlineskip\nobreak\vskip10pt
+ \hbox to\hsize{\hfil\box0 \hfil}%
+ \par\nointerlineskip\nobreak\vskip8pt
+ \tnba@makesrc \par
\endgroup
+ \vskip\belowplace
\let\tnba@savedplace=\empty
\let\tnba@savedlegend=\empty
\let\tnba@savedsrc=\empty
- \let\@currentlabel=\empy
+ \let\@currentlabel=\empty
}
-\def\placespaces#1#2{\def\placeabovespace{#1}\def\placebelowspace{#2}}
% |ecode !------------------------------------------------
% \sec NOTAS DE RODAPÉ
-% !=======================================================
% As notas de rodapé também foram modificadas.
% |bcode !------------------------------------------------
\let\footnotesize=\relax
\def\@makefnmark{\hbox{\@textsuperscript{\selectfont\@thefnmark}}}
-\def\@makefntext#1{\leavevmode \setbox0=\hbox{\@makefnmark\kern2pt}%
-\hangindent=\wd0 \box0 \small #1}
-\def\footnoterule{\kern18pt\hrule width5cm\kern2.6pt}
+\def\@makefntext#1{\hangfrom{\@makefnmark\kern2pt}\small #1}
+\def\footnoterule{\kern18pt \hrule width5cm \kern2.6pt }
% |ecode !------------------------------------------------
-% \sec UTILIDADES
-% !=======================================================
-
-% Algumas macros úteis foram definidos aqui como \cs\Enter\ que serve para produzir um espaço vertical equivalente àquele produzido com a tecla Enter em editores de texto como MS Word.
+% \sec IDENTIFICAÇÃO DO TRABALHO
% |bcode !------------------------------------------------
-\def\tnba@getprevdepth{\par\xdef\tnba@getprevdepthA{\the\prevdepth}}
-\def\tnba@useprevdepth{\par\prevdepth=\tnba@getprevdepthA}
-
-\long\def\sizedpar#1{\leavevmode\vtop{\ignorespaces#1\tnba@getprevdepth}\tnba@useprevdepth}
-
-\def\justifying{\let\\=\tnba@origcr
- \leftskip=0pt \rightskip=0pt
- \finalhyphendemerits=5000
- \parfillskip=0pt plus1fil
-}
-\let\tnba@origcr=\\
-
\def\Enter{\@ifnextchar[\tnba@EnterS{\tnba@EnterS[]}}
\def\tnba@EnterS[#1]{\vskip#1\baselineskip}
\def\twonewpage{\newpage\leavevmode\newpage}
-% |ecode !------------------------------------------------
-
-% \sec IDENTIFICAÇÃO DO TRABALHO
-% !=======================================================
-% |bcode !------------------------------------------------
\long\def\indexcard#1{\hbox{\vrule\vbox to7.5cm{\hsize=12.5cm \advance\hsize by-2cm \advance\hsize by-0.8pt
- \hrule\indexcardA{#1}\vss\indexcardbar\hrule}\vrule}%
+ \hrule\indexcardA{#1}\vss\xindexcardbar\hrule}\vrule}%
}
\long\def\indexcardA#1{\hbox spread2cm{\hss\vbox spread2cm{\vss\ttfamily#1\vss}\hss}%
}
-\def\indexcardbar{\hrule\kern1cm}
-\def\judgeline#1{\par{\centering \rule{.7\linewidth}{.6pt}\\ #1\Enter[1.5]}}
+\def\xindexcardbar{}
+\def\indexcardbar{\def\xindexcardbar{\hrule\kern1cm}}
+
+\def\judgeline#1{\par {\centering \rule{.7\linewidth}{.6pt}\\ #1\Enter[1.5]}}
+
+\def\corrprinton{\begingroup \def\section##1##2{\heading{##2}}}
+\def\corrprintoff{\par\endgroup}
% |ecode !------------------------------------------------
% \sec A VÍRGULA COMO SEPARADOR DECIMAL
-% !=======================================================
% No Brasil e em outro lugares a vírgula é um separador decimal, portanto \verb+$1,2$+ deve produzir um resultado diferente de \verb+$1, 2$+, por exemplo.
@@ -605,31 +587,85 @@
\mathcode`\,="8000
% |ecode !------------------------------------------------
+% Abaixo está definido um ajuste para que o \pkg{hyperref} não crie conflitos com \cs\MakeUppercase\ nas entradas do sumário.
+
% |bcode !------------------------------------------------
-\ifx\XeTeXversion\undefined
-\AddToHook{begindocument/before}{
- \let\tnba@hyper@linkstart=\hyper@linkstart
- \protected\def\hyper@linkstart#1#2{\lowercase{\tnba@hyper@linkstart{#1}{#2}}}
-}
+\iftnba@XETEX \else
+ \AddToHook{begindocument/before}{
+ \let\tnba@hyper@linkstart=\hyper@linkstart
+ \protected\def\hyper@linkstart#1#2{\lowercase{\tnba@hyper@linkstart{#1}{#2}}}
+ }
\fi
% |ecode !------------------------------------------------
+% \sec COMANDOS OBSOLETOS
+
+% O \pkg{abntexto} emitirá um aviso ou erro caso um destes comandos esteja obsoleto ou inexistente.
+
+% |bcode !------------------------------------------------
+\def\tnba@undefcmd#1{\def#1{\tnba@error{%
+ O comando ''\string#1'' não existe mais. Linha \the\inputlineno
+}}}
+\def\tnba@obscmd#1#2{\def#1{\tnba@error{%
+ O comando ''\string#1'' é obsoleto, use ''\unexpanded{#2}'' ao invés. Linha \the\inputlineno
+}}}
+\def\tnba@switchcmd#1#2{\def#1{\tnba@warning{%
+ O comando ''\string#1'' é obsoleto, use ''\string#2'' ao invés. Linha \the\inputlineno
+}#2}}
+
+\tnba@undefcmd \extlineshape
+
+\tnba@obscmd \sectionuppercase {\def\sectionfont{\MakeUppercase}}
+\tnba@obscmd \tociuppercase {\def\tocifont{\MakeUppercase}}
+\tnba@obscmd \sectionspaces {\def\abovesection{valor}\def\belowsection{valor}}
+\tnba@obscmd \subsectionspaces {\def\abovesubsection{valor}\def\belowsubsection{valor}}
+\tnba@obscmd \subsubsectionspaces {\def\abovesubsubsection{valor}\def\belowsubsubsection{valor}}
+\tnba@obscmd \paragraphspaces {\def\aboveparagraph{valor}\def\belowparagraph{valor}}
+\tnba@obscmd \subparagraphspaces {\def\abovesubparagraph{valor}\def\belowsubparagraph{valor}}
+
+\tnba@switchcmd \fontsizedef \definefontsize
+\tnba@switchcmd \advancecount \advcount
+\tnba@switchcmd \paper \setlayout
+\tnba@switchcmd \papersizedef \definepapersize
+\tnba@switchcmd \makeseci \startsection
+\tnba@switchcmd \makesecii \startsubsection
+\tnba@switchcmd \makeseciii \startsubsubsection
+\tnba@switchcmd \makeseciv \startparagraph
+\tnba@switchcmd \makesecv \startsubparagraph
+\tnba@switchcmd \qt \enquote
+\tnba@switchcmd \quote \Enquote
+% |ecode !------------------------------------------------
+
% \sec INICIALIZAÇÃO
-% !=======================================================
-% Aqui o \pkg{abntexto} define as configurações padrões. Note que \cs\pretextual\ deve ser carregado após \cs{\begin{document}} para evitar múltiplas chamadas deste caso seja redefinido pelo usuário ou escritor de pacotes.
+% Aqui o \pkg{abntexto} define as configurações padrões. Note que \cs\pretextual\ deve ser carregado após \cs{\begin\{document\}} para evitar múltiplas chamadas deste, caso seja redefinido pelo usuário ou escritor de pacotes.
% |bcode !------------------------------------------------
-\fontsizedef{12pt}{
- \normalsizedef{12pt}{14.5pt}
- \sizeselectordef\small{10pt}{12pt}
+\def\setnormalsize{%
+ \abovedisplayskip=12pt plus3pt minus7pt
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=0pt plus3pt
+ \belowdisplayshortskip=6.5pt plus3.5pt minus3pt
}
+\def\setsmall{%
+ \abovedisplayskip=10pt plus2pt minus5pt
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=0pt plus3pt
+ \belowdisplayshortskip=6pt plus3pt minus3pt
+}
+
+\definefontsize{12pt}{%
+ \sizedef\normalsize{12pt}{14.5pt}{\setnormalsize}%
+ \sizedef\small{10pt}{12pt}{\setsmall}%
+}
+
\setfontsize{12pt}
\spacing{1.5}
-\papersizedef{A4}(210mm,297mm)
-\paper{
- A4,
+\definepapersize{A4}{210mm}{297mm}
+
+\setlayout{
+ paper=A4,
left=3cm,
top=3cm,
right=2cm,
@@ -640,41 +676,42 @@
\parindent=0pt
\parskip=0pt
-\tociuppercase
-\sectionuppercase
-
-\tocifont {\bfseries}
-\tociifont {\itshape}
-\tociiifont {\scshape}
-\tocivfont {}
-\tocvfont {}
-
-\sectionfont {\bfseries}
-\subsectionfont {\itshape}
-\subsubsectionfont {\scshape}
-\paragraphfont {}
-\subparagraphfont {}
-
-\sectionspaces {\baselineskip}{\baselineskip}
-\subsectionspaces {\baselineskip}{\baselineskip}
-\subsubsectionspaces {\baselineskip}{\baselineskip}
-\paragraphspaces {\baselineskip}{\baselineskip}
-\subparagraphspaces {\baselineskip}{\baselineskip}
-
-\legendplacedef{figure}{Figura}{Lista de figuras}{fig.\,#1}{lof}
-\legendplacedef{table}{Tabela}{Lista de tabelas}{tab.\,#1}{lot}
+\def\tocifont {\bfseries\MakeUppercase}
+\def\tociifont {\itshape}
+\def\tociiifont {\scshape}
+\def\tocivfont {}
+\def\tocvfont {}
+
+\def\sectionfont {\bfseries\MakeUppercase}
+\def\subsectionfont {\itshape}
+\def\subsubsectionfont {\scshape}
+\def\paragraphfont {}
+\def\subparagraphfont {}
+
+\def\abovesection {\baselineskip}
+\def\abovesubsection {\baselineskip}
+\def\abovesubsubsection {\baselineskip}
+\def\aboveparagraph {\baselineskip}
+\def\abovesubparagraph {\baselineskip}
+
+\def\belowsection {\baselineskip}
+\def\belowsubsection {\baselineskip}
+\def\belowsubsubsection {\baselineskip}
+\def\belowparagraph {\baselineskip}
+\def\belowsubparagraph {\baselineskip}
+
+\definelegendplace{figure}{Figura}{Lista de figuras}{fig.\,#1}{lof}
+\definelegendplace{table}{Tabela}{Lista de tabelas}{tab.\,#1}{lot}
\def\legendlabel{\legendname ~\thelegend ~---~}
\def\srclabel{\raggedright\small Fonte:~}
\def\legendmaxwidth{0.7\linewidth}
-\placespaces{\baselineskip}{\baselineskip}
+\def\aboveplace{\baselineskip}
+\def\belowplace{\baselineskip}
-\def\maketoc{\heading{Sumário}
- \let\extlabelwidth=\toclabelwidth
- \let\extlabelbox=\toclabelbox
- \@starttoc{toc}\newpage
-}
+\def\toclabelwidth{3.4ex}
+\def\maketoc{\heading{Sumário} \makeext{toc}\newpage}
\def\topicslabelwidth{4ex}
diff --git a/macros/latex/contrib/abntexto/abntexto.tex b/macros/latex/contrib/abntexto/abntexto.tex
new file mode 100644
index 0000000000..2183e6ebf7
--- /dev/null
+++ b/macros/latex/contrib/abntexto/abntexto.tex
@@ -0,0 +1,449 @@
+% !TeX TS-program = lualatex
+
+\documentclass{abntexto}
+
+\makeatletter
+
+\def\erase{}\def\enderase{}
+\long\def\rewrite#1\endrewrite{}
+\def\lightmode{\long\def\erase##1\enderase{} \def\rewrite{}\def\endrewrite{}}
+%\lightmode
+
+\erase
+\usepackage[brazil]{babel}
+\usepackage{fontspec}
+\enderase
+\usepackage{lipsum} \def\lip{\lipsum[1][1-2]} \def\lipp{\lipsum[1]}
+\usepackage{graphicx}
+\usepackage[cmyk]{xcolor}
+\erase
+\usepackage[style=abnt]{biblatex} \addbibresource{abntexto.bib}
+\usepackage[colorlinks,linkcolor=blue]{hyperref}
+\enderase
+
+\rewrite
+\let\href=\relax \def\textcite#1{{\bfseries#1}} \def\today{}
+\endrewrite
+
+% MARKUP
+% ================================================
+
+\def\ttnoligs{\ttfamily\@noligs}
+
+\def\cs#1{{\ttnoligs \string#1}}
+\def\meta#1{{\ttnoligs <\/{\itshape#1\/}>}} % ⟨⟩
+\def\cc#1{{\ttnoligs \{\meta{#1}\}}}
+\def\kk#1{{\ttnoligs [\meta{#1}]}}
+
+\def\arg{\cc{arg}}
+\def\opt{\kk{opt}}
+\def\ccval#1{{\ttnoligs \{#1\}}}
+\def\kkval#1{{\ttnoligs [#1]}}
+\def\pkg#1{{\ttnoligs #1}}
+
+% VERBATIM
+% ================================================
+
+\def\adef#1{\catcode`#1=13 \begingroup \lccode`\~=`#1\lowercase{\endgroup\def~}}
+\def\dodef#1{\catcode`#1=12 }
+\def\codecatcodes{\let\do=\dodef \dospecials \catcode`\|=0 }
+
+{\catcode`\^^M=13
+ \gdef\codepercent#1^^M{{\color{graycomment}\itshape\@percentchar#1^^M}}
+}
+
+\long\def\codeon{\begingroup \codecatcodes
+ \adef{\^^I}{\space\space\space}%
+ \adef{\^^M}{\par\leavevmode}%
+ \adef{\ }{\space}%
+ \adef{\%}{\codepercent}%
+ \startcode
+}
+
+{\catcode`\ =13 \catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
+ |gdef|startcode^^M#1^^M\codeoff{|codebox{#1}|par|endgroup |codereset}
+}
+\def\codebox#1{\def\tnba@placewidth{\hsize \advance\hsize-3cm}%
+ \vskip\aboveplace
+ \parindent=0pt
+ \ifx\tnba@savedplace\empty\else\tnba@makelegend\fi
+ \nobreak\nointerlineskip\vskip10pt
+ {\codefont{#1}}%
+ \nobreak\nointerlineskip\vskip8pt
+ \ifx\tnba@savedsrc\empty\else\tnba@makesrc\fi
+ \vskip\belowplace
+}
+\def\codereset{%
+ \let\tnba@savedplace=\empty
+ \let\tnba@savedlegend=\empty
+ \let\tnba@savedsrc=\empty
+ \let\@currentlabel=\empty
+}
+\def\codefont{\raggedright\leftskip=6pt\singlesp\small\ttnoligs\leftframed}
+\long\def\leftframed#1{\hbox{{\color{graybar}\kern1.5cm\vrule width1pt}\vtop{#1}}}
+
+% MISC
+% ================================================
+
+\definecolor{mono}{cmyk}{0,0,0,.73}
+\definecolor{graybar}{gray}{.75}
+\definecolor{graycomment}{gray}{.2}
+
+\erase
+\setmainfont{TeX Gyre Termes}
+\setmonofont{Inconsolatazi4-Regular}[Color=mono]
+%\newfontfamily\bgfont{Inconsolatazi4-Regular}[Color=bgfontcolor]
+\enderase
+
+\def\tocifont{\bfseries}
+\def\sectionfont{\bfseries}
+
+\sizedef \large {14.4pt}{17pt}{}
+\sizedef \Large {20.74pt}{25pt}{}
+\sizedef \LARGE {25pt}{30pt}{}
+
+\definelegendplace{code}{Código}{Lista de códigos}{cód.\,#1}{loc}
+\def\me{o autor.}
+
+\clubpenalty=10000
+\widowpenalty=10000
+
+\let\cite=\textcite
+\def\bibfont{\singlesp}
+\erase
+\bibitemsep=18pt
+\enderase
+
+\makeatother
+
+
+
+\begin{document}
+
+\leavevmode\vskip1.9in
+
+{\centering \LARGE\sffamily\bfseries
+ abntexto\\[0.4em] \Large\itshape\mdseries
+ Classe para {\upshape\LaTeX}\\[2em] \normalfont\large
+ Elayson\\[1ex]
+ \href{mailto:abntexto.classe@gmail.com}{abntexto.classe at gmail.com}\\[2.5ex]
+ 2023-01-31\par}
+
+\vskip3in
+
+{\centering\large\ttfamily 2.0.0-alpha\par}
+
+\newpage
+
+\maketoc
+
+\textual
+
+\section{Apresentação}
+
+O \pkg{abntexto} é uma classe do \LaTeX\ criada para facilitar a utilização das normas da Associação Brasileira de Normas Técnicas (ABNT) em trabalhos acadêmicos (monografias, dissertações, teses).
+
+Este \emph{não} é um manual sobre \LaTeX\ (ou \TeX, a ferramenta que o constitui) nem tampouco uma descrição detalhada sobre as normas ABNT. Para aprender sobre \LaTeX\ leia \cite{viaexemplos} ou \cite{latex2eunnoficial}, disponível também em francês. Além disso, também se pode ler \cite{texbytopic} para aprender sobre o sistema \TeX\footnote{Note que os livros referenciados não foram realmente citados e isso não é aceito na Norma, no entanto este não é um trabalho acadêmico real, mas um manual.}.
+
+Já existe uma classe para aplicação das normas ABNT cujo nome é \pkg{abntex2}. Mas, diferente desta, o \pkg{abntexto} não depende do \pkg{memoir}, uma classe de código-fonte e manual extensos e que implementa funções as quais, em sua maioria, não são pertinentes a um documento que use as diretrizes da ABNT.
+
+As normas ABNT as quais o \pkg{abntexto} se propõe a seguir são aquelas em vigor até o momento da criação deste manual.
+
+O \pkg{abntexto} ainda está em estágio \emph{alpha} e seu uso em documentos sérios não é recomendado, uma vez que \emph{bugs} são esperados.
+
+\section{Chamando a classe}
+
+Digite as linhas em \ref{cd:início} e use \pkg{abntexto}.
+
+\legend{code}{Início} \src\me
+\label{cd:início}
+\codeon
+% !TeX TS-program = lualatex
+\documentclass{abntexto}
+
+\usepackage[brazil]{babel}
+\usepackage{fontspec}
+
+\setmainfont{TeX Gyre Termes}
+
+\begin{document}
+ Texto
+\end{document}
+\codeoff
+
+\section{Fonte tipográfica}
+
+O tamanho da fonte é 12\,pt de imediato e pode ser configurado com o comando\\ \cs\setfontsize\cc{id} sendo que 12\,pt é a única opção disponível. Além disso, com os seletores de tamanho \cs\normalsize\ e \cs\small\ que configuram 12\,pt e 10\,pt, nessa ordem, é possível mudar o tamanho da fonte no corpo do documento.
+
+Mas, se você deseja outro tamanho de fonte, crie-o usando \cs\definefontsize\cc{id}\hfil\break \cc{definições} e \cs\sizedef\cs\ \unskip\meta{seletor}\cc{tamanho}\cc{entrelinha natural}. Em\hfil\break \cc{definições}, o seletor \cs\normalsize\ deve estar presente por meio de \cs\sizedef, caso contrário, a classe mostrará um erro.
+
+O espaçamento é de um e meio e pode ser alterado para dois com \cs\spacing\ccval{2}, por exemplo. Os atalhos \cs\singlesp, \cs\onehalfsp\ e \cs\doublesp\ estão disponíveis. Note que o espaçamento simples não tem o mesmo valor que o espaçamento um, portanto, \cs\singlesp\ é diferente de \cs\spacing\ccval{1}! Os atalhos \cs\onehalfsp\ e \cs\doublesp\ tem o mesmo significado de \cs\spacing\ccval{1.5} e \cs\spacing\ccval{2}.
+
+\section{\emph{Layout}}
+
+A folha é A4 por padrão e as margens esquerda e direita são de 3\,cm, 2\,cm para páginas ímpares e de 2\,cm, 3\,cm para páginas pares, respectivamente. Além disso, as margens superior e inferior têm, nessa ordem, 3\,cm, 2\,cm para todo o documento. Todas essas medidas podem ser alteradas com a macro \cs\setlayout\ que deve ser usada assim: \cs\setlayout\ccval{left=\meta{medida}, right=\meta{medida}, top=\meta{medida}, botttom=\meta{medida}}.
+
+Além das chaves anteriores também existe \cs{twoside} que é booleana, ou seja, aceita os valores \cs{true} ou \cs{false} e serve para ativar o modo de impressão em duas folhas onde as medidas das margens horizontais se invertem nas páginas pares. Ao não informar um valor para \cs{twoside} subentende-se que seja \cs{true}, portanto \cs\setlayout\ccval{twoside} equivale a \cs\setlayout\ccval{twoside=true} e esse princípio também se aplica a outras chaves booleanas.
+
+Existem dois comandos que configuram o \emph{layout} da página: \cs\pretextual\ que, além de desabilitar o modo \cs{twoside}, remove a numeração de página e é executado automaticamente logo após \cs{\begin\{document\}} e o comando \cs\textual\ que deve ser executado manualmente logo antes da primeira chamada de \cs\section\ para que a numeração de página seja posta no topo da página e as margens passem a ser espelhadas.
+
+\section{Sumário}
+
+Os comandos que mudam a fonte das entradas no ToC (Table of Contents, em inglês) são \cs\tocifont, \cs\tociifont, \dots, \cs\tocvfont\ (ver \ref{cd:contents}).
+
+\legend{code}{Aparência do sumário} \src\me
+\label{cd:contents}
+\codeon
+\documentclass{abntexto}
+
+\usepackage{color}
+
+\def \tocifont {\color{red}\itshape\MakeUppercase}
+\def \tociifont {\color{blue}\bfseries}
+
+\begin{document}
+ \maketoc
+
+ \section{Título}
+ \subsection{Título}
+\end{document}
+\codeoff
+
+\section{Secionamento}
+
+A personalização das macros de seção (\cs\section, \cs\subsection\ etc.) é análoga a personalização do sumário e deve ser feita com \cs\sectionfont, \cs\subsectionfont, etc. como exemplificado em \ref{cd:sec}.
+
+Também há como alterar o espaço vertical acima e abaixo das seções usando \cs\abovesection, \cs\belowsection\ e derivados. Por exemplo, \cs\def\cs\abovesubsection\ccval{2cm} insere um espaço de 2\,cm acima de \cs\subsection.
+
+\legend{code}{Aparência das seções} \src\me
+\label{cd:sec}
+\codeon
+\documentclass{abntexto}
+
+\usepackage{color}
+
+\def \sectionfont {\color{blue}\scshape}
+\def \subsectionfont {\color{red}\itshape}
+\def \subsubsectionfont {\color{yellow}\sffamily}
+
+\begin{document}
+ \maketoc
+
+ \section{Texto}
+ \subsection{Texto}
+ \subsubsection{Texto}
+\end{document}
+\codeoff
+
+\section{Alíneas}
+
+Use o ambiente \cs{topics} para criar alíneas. Ele dispõe de dois níveis sendo que o segundo usa um travessão como marcador conforme o exemplo em \ref{cd:topics}. Naturalmente, é permitido usar \cs\label\ após um item.
+
+\legend{code}{Alíneas} \src\me
+\label{cd:topics}
+\codeon
+\begin{topics}
+ \item \label{al:x} 1
+ \begin{topics}
+ \item x
+ \item y
+ \item z
+ \end{topics}
+ \item \label{al:y} 2
+ \item 3
+\end{topics}
+\codeoff
+
+\section{Áreas de legenda}
+
+Use \cs\place\ para inserir áreas de legenda como mostrado em \ref{cd:place}. Mas existem condições: \cs\place\ deve vir por último e \cs\label\ precisa estar depois de \cs\legend. Além disso, existe a possibilidade de alterar o espaço vertical acima e abaixo de uma área de legenda com \cs\def\cs\aboveplace\cc{valor}\ e \cs\def\cs\belowplace\cc{valor}.
+
+\legend{code}{Áreas de legenda} \src\me
+\label{cd:place}
+\codeon
+\usepackage{graphicx}
+
+\begin{document}
+ \legend{figure}{Um título}
+ \src{\texttt{www.site.com.br}. Acesso em 01 jan. 2020.}
+ \label{fig:teste}
+ \place{\includegraphics[width=0.4\linewidth]{example-image}}
+
+ Ver \ref{fig:teste}.
+\end{document}
+\codeoff
+
+O leitor pode querer definir uma nova área de legenda usando, por exemplo, a instrução: \cs\definelegendplace\ccval{diagram}\ccval{Diagrama}\ccval{Lista de diagramas}\ccval{diag.\cs\,\cs#1}\ccval{lod} que vai criar o comando \cs\makelod\ para escrever no documento as entradas do arquivo auxiliar .lod.
+
+\section{Formatação de {\ttfamily\protect\textbackslash cite} e referências}
+
+Até o momento o \pkg{abntexto} não possui macros para formatação de \cs\cite\ e referências. Utilize \cs{\usepackage[style=abnt]\{biblatex\}}.
+
+\section{Citações}
+
+Para inserir aspas em citações diretas use \cs\enquote\ccval{texto}\cs\cite\cc{key}. Mas, se tratando de citações diretas com mais de três linhas, alterne para \cs\Enquote\ccval{texto \cs\cite\cc{key}}.
+
+\section{Apêndice e anexo}
+
+Com os comandos \cs\appendix\ e \cs\annex\ as próximas seções serão formatadas com os indicativos desejados: “Apêndice 1 --- \dots” ou “Anexo 1 --- \dots” (ver \ref{cd:appendix}).
+
+\legend{code}{Anexos e apêndices} \src\me
+\label{cd:appendix}
+\codeon
+\begin{document}
+ \appendix
+ \section{Lorem}
+ \section{Lipsum}
+
+ \annex
+ \section{Lorem}
+ \section{Lipsum}
+\end{document}
+\codeoff
+
+Pode-se alterar a largura dos rótulos das entradas de apêndice/anexo no sumário redefinindo \cs\appendixlabelwidth \,/\,\cs\annexlabelwidth.
+
+%\end{document}
+
+\newpage
+
+\erase
+\corrprinton
+\printbibliography
+\corrprintoff
+\enderase
+
+\newpage
+
+\let\origsection=\section
+\appendix
+
+\section{Glossário}
+
+%\countsection=0
+%\def\sec#1{{\def\addcontentsline##1##2##3{}\origsection{#1}}}
+%\sec{Glossário}
+
+Você pode criar glossários com o pacote \pkg{glossaries}.
+
+\codeon
+\usepackage{lipsum}
+\usepackage{glossaries}
+
+\makenoidxglossaries
+
+\newglossaryentry{metalism}{name=metalismo,description={Tipo de sistema monetário cujo valor da moeda, geralmente de uma nação ou de um país, é determinado pela quantidade constante de certo metal (ouro ou prata), desta forma se estabelece um valor fixo de troca entre esses metais e o próprio dinheiro}}
+
+\newglossaryentry{lip}{name=lipsum,description={\lipsum[1]}}
+
+\begin{document}
+ O \gls{metalism} e o \gls{lip}.
+
+ \corrprinton
+ \printnoidxglossary
+ \corrprintoff
+\end{document}
+\codeoff
+
+\section{Lista de siglas}
+
+O pacote \pkg{glossaries} também serve para criar uma lista de siglas.
+
+\codeon
+\usepackage{lipsum}
+\usepackage[acronym]{glossaries}
+
+\makenoidxglossaries
+
+\newacronym{ibge}{IBGE}{Instituto Brasileiro de Geografia e Estatística}
+\newacronym{html}{HTML}{Hypertext Markup Language}
+
+\begin{document}
+ 1ª chamada: \gls{ibge}, \gls{html}.
+
+ 2ª chamada: \gls{ibge}, \gls{html}.
+
+ \corrprinton
+ \def\acronymname{Lista de siglas}
+ \printnoidxglossary[type=acronym]
+ \corrprintoff
+\end{document}
+\codeoff
+
+\section{\emph{Feedback}}
+Sugestões, relatos de \emph{bugs} e doações são bem-vindas.
+
+\section{Código-fonte}
+
+% MACROS PARA O CÓDIGO-FONTE
+% ================================================
+
+\makeatletter
+
+\definecolor{bg}{cmyk}{0,0.06,0,0}
+\definecolor{comment}{cmyk}{0.9,0,0,0.1}
+\definecolor{letter}{cmyk}{0,0,0,.8}
+
+\parskip=0pt plus.2ex minus.1ex
+
+\countsection=0
+\def\addcontentsline#1#2#3{}
+\def\sectionfont{\itshape}
+\def\sec#1\par{\origsection{#1}}
+
+{\catcode`\^^M=13
+ \gdef\codepercent#1^^M{{\bfseries\color{comment}\@percentchar#1^^M}}
+}
+
+\def\codecatcodes{\let\do=\dodef \dospecials}
+
+\long\def\bcode{\par\begingroup \codecatcodes
+ \adef{\^^I}{\space\space\space}%
+ \adef{\^^M}{\par\leavevmode}%
+ \adef{\ }{\space}%
+ \adef{\%}{\codepercent}%
+ \startcode
+}
+{\catcode`\%=13 \catcode`\ =13 \catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
+ |long|gdef|startcode #1^^M% |ecode{|codefont{#1}|par|endgroup}
+}
+
+\def\codefont{\raggedright\fontsize{9pt}{10pt}\selectfont\ttnoligs\addfontfeature{Color=letter}\bgbox}
+
+\newdimen\tmpdim
+\newdimen\coloronwd \coloronwd=\hsize
+\newdimen\hh \hh=3pt \def\hhkern{\kern\hh}
+\newdimen\vv \vv=4pt \def\vvkern{\kern\vv}
+
+\splitmaxdepth=4pt
+
+\def\coloron#1{\leavevmode \setbox0=\vbox{\vvkern \hsize=\coloronwd \advance\hsize-2\hh
+ \hbox{\hhkern\vbox{#1}\hhkern}\vvkern}%
+ \coloronA \box0
+}
+\def\coloronA{\rlap{\color{bg}\vrule width\wd0 height\ht0 depth\dp0}}
+
+\def\splitcoloron{\tmpdim=\pagegoal \advance\tmpdim by-2\vv
+ \setbox4=\vsplit2 to\tmpdim
+ \coloron{\unvbox4}\par
+ \coloron{\unvbox2}%
+}
+\long\def\bgbox#1{\par \vskip\medskipamount
+ \setbox0=\vbox{\vvkern \hsize=\coloronwd \advance\hsize-2\hh
+ \hbox{\hhkern\vbox{#1}\hhkern}\vvkern}%
+ \ifdim \ht0>\pagegoal
+ \setbox2=\vbox{\advance\hsize-2\hh #1}%
+ \splitcoloron
+ \else
+ \coloron{#1}%
+ \fi
+ \par \vskip\smallskipamount
+}
+
+\def\srccatcodes{\catcode`\!=14 \catcode`\%=9 \catcode`\|=0 }
+
+\begingroup \raggedbottom \parskip=0pt \srccatcodes
+\input abntexto.cls%
+\par\endgroup
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/README.md b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/README.md
index 60a13236aa..76cab58637 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/README.md
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/README.md
@@ -22,12 +22,12 @@ Paste the file `beamerthemeAmurmaple.sty` in your local `~/texmf/tex/latex/contr
## Licence
-Copyright (C) 2022 by Maxime CHUPIN
+Copyright (C) 2023 by Maxime CHUPIN
<chupin at ceremade.dauphine.fr>
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 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](http://www.latex-project.org/lppl.txt) and version 1.3 or later is part of all distributions of LaTeXversion 2005/12/01 or later.
%
## Author:
-Maxime CHUPIN chupin at ceremade.dauphine.fr
+Maxime CHUPIN: chupin at ceremade.dauphine.fr
This work has the LPPL maintenance status "author-maintained".
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.pdf
index 4c97107a1f..2a3e760726 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.pdf
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex
index c389f6479e..9dcd18f6da 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-doc.tex
@@ -22,7 +22,6 @@
\usepackage{luamesh}
\usepackage{babel}
-\usepackage{pgfpages}
\usepackage{tcolorbox}
\usepackage{biblatex}
\usepackage{cleveref}
@@ -114,10 +113,10 @@ delaunay,
\title[Amurmaple documentation]{Amurmaple Beamer Theme}
\author[M.~Chupin]{Maxime Chupin}
-\subtitle{documentation\quad v.1.1}
+\subtitle{documentation\quad v.1.2}
\institute[CNRS]{CNRS\\
University of Paris-Dauphine}
-\date{September 10, 2022}
+\date{January 30, 2023}
\titlegraphic{\includegraphics[width=4cm]{logo.png}}
\mail{chupin@ceremade.dauphine.fr}
\webpage{www.ceremade.dauphine.fr/~chupin/}
@@ -179,7 +178,8 @@ theme.
\item \lstinline+xparse+;
\item \lstinline+xfp+;
\item \lstinline+expl3+;
- \item \lstinline+iftex+.
+ \item \lstinline+iftex+;
+ \item \lstinline+tikz+.
\end{itemize}
\end{multicols}
\end{itemize}
@@ -192,21 +192,25 @@ theme.
\begin{description}
\item[nogauge:] that suppresses the gauge at the top of the vertical side bar
of the current slide ;
- \item[nomail:] that suppresses the mail in the vertical side bar of
- the current slide ;
+ \item[nomail:] that suppresses the mail in the right margin of
+ the current slide\footnote{Since the v1.2, the mail is not in the left sidebar but in the right margin.} ;
\item[delaunay:] that produces a Delaunay mesh of random points in
the ``structure'' slides (title, section, etc.). \alert{This option can only be
used with \hologo{LuaLaTeX}} and depends on the
package~\lstinline{luamesh}\footfullcite{Luamesh};
\framebreak
\item[sidebar:] that provides a \emph{sidebar} as shown below\footnote{In
- general, we strongly recommend the use of the \texttt{aspectratio=169} option of
- beamer, but even more strongly with the \texttt{sidebar} option.}.
+ general, we strongly recommend the use of the \texttt{aspectratio=169}
+ option of beamer, but even more strongly with the \texttt{sidebar}
+ option.}.
\begin{center}
\includegraphics[width=0.5\linewidth,page=13]{beamer-amurmaple-sidebar}
\end{center}
- \item[sidebarwidth=\meta{value} (with dimension):] when using the sidebar option, you can
- adjust the sidebar width (default 58pt).
+ \item[sidebarwidth=\meta{value} (with dimension):] when using the sidebar
+ option, you can adjust the sidebar width (default 58pt).
+ \item[toplogo:] that puts the logo at the top of the sidebar (option
+ available if the sidebar option is used). By default, the logo, if sets, is
+ at the bottom of the sidebar.
\framebreak
\item[rule:] that add a rule between the color areas in the different
slides: title (see p.~\cref{title}), section and part (see p.~\ref{sectionpart}),
@@ -248,6 +252,7 @@ theme.
\definecolor{AmurmapleOrange}{RGB}{230,108,17}
\definecolor{AmurmapleBlue}{RGB}{55,119,231}
\definecolor{AmurmapleGreen}{rgb}{0.1,0.4,0.1}
+\definecolor{AmurmapleRemarkColor}{rgb}{0.2,0.2,0.2}
\end{Code}
\textcolor{AmurmapleRed}{\lstinline+AmurmapleRed+} is used to redefine the \lstinline+structure+
@@ -255,9 +260,9 @@ Beamer color\footnote{So if you redefine the \lstinline+structure+ color, the Am
theme should change correctly.}, \textcolor{AmurmapleOrange}{\lstinline+AmurmapleOrange+} is used to redefine
the \lstinline+text alerted+ Beamer color, \textcolor{AmurmapleGreen}{\lstinline+AmurmapleGreen+} is
used for the math definition (see slide~\ref{sl:definition}) and for the
-\lstinline+block title example+ Beamer color, and the
-\textcolor{AmurmapleBlue}{\lstinline+AmurmapleBlue+} for the new environnement
-\lstinline+information+ (see slide~\ref{sl:information}).
+\lstinline+block title example+ Beamer color, the
+\textcolor{AmurmapleBlue}{\lstinline+AmurmapleBlue+} for the new environment
+\lstinline+information+ (see slide~\ref{sl:information}) and \textcolor{AmurmapleRemarkColor}{\lstinline+AmurmapleRemarkColor+} for the \lstinline+remark+ environment (see slide~\pageref{sl:remark}).
\framebreak
\framesection{Color Theme Option}\label{sl:color}
@@ -273,10 +278,12 @@ In fact, internally, four colors are defined: \lstinline+Amurmaple@structure+,
\lstinline+Amurmaple@alert+, \lstinline+Amurmaple@info+ and
\lstinline+Amurmaple@example+.
-The color theme option is used as follow
+The color theme option is used as follows
\begin{Code}
\usetheme[amurmapleblue]{amurmaple}
\end{Code}
+
+Note that the \lstinline+AmurmapleRemarkColor+ is not modified.
\end{frame}
\subsection{Classical commands}
@@ -297,7 +304,7 @@ The color theme option is used as follow
\tableofcontents
\end{frame}
-\subsection{Classical environnement}
+\subsection{Classical environments}
\begin{frame}[allowframebreaks,fragile]{Classical Beamer environments}
\framesection{Block environments}
@@ -380,7 +387,7 @@ can see below
The standard \texttt{section page} and \texttt{part page} have been modified.
The following code produce the next slide (the part slide is not generated
- because this document does not use part sectionning).
+ because this document does not use part sectioning).
\usebox{\codebox}
@@ -392,7 +399,7 @@ can see below
\subsection{Maths}
-\begin{frame}[fragile,allowframebreaks]{Maths environnement}
+\begin{frame}[fragile,allowframebreaks]{Maths environments}
\begin{itemize}
\item \lstinline+\begin{theorem}+\oarg{Title of th. (optional)}\lstinline+...\end{theorem}+
\begin{theorem}[Title of th. (optional)]
@@ -432,7 +439,7 @@ can see below
The new commands are :
\begin{itemize}
\item \lstinline+\mail+\marg{mail}: that is used to provide the mail. Without the theme option
- \lstinline+nomail+, it is also added on the vertical side bar on the current
+ \lstinline+nomail+, it is also added on the vertical sidebar on the current
slide.
\item \lstinline+\webpage+\marg{webpage}: that is used to provide the personal webpage of
the speaker (or the project website).
@@ -443,7 +450,7 @@ can see below
The \lstinline+\logo+ command can be used to add a logo to each slide. In the
standard theme, the logo is put in the bottom right corner of the slide, just
above the page numbering. When the option \lstinline+sidebar+, the logo is put
- a the bottom of the side bar (above the gauge if it is used).
+ at the bottom of the sidebar (above the gauge if it is used).
\framebreak
@@ -470,7 +477,7 @@ University of Paris-Dauphine}
\begin{frame}[fragile]{\texttt{sepframe} command}\label{sepframe}
\bigskip
\begin{docCommand}{sepframe}{\oarg{title=\meta{mytitle},image=\meta{my image}}}
-The newcommand \lstinline+\sepframe+ is provided by the Amurmaple theme. This
+The new command \lstinline+\sepframe+ is provided by the Amurmaple theme. This
command allows you to generate a slide in the manner of a section page but with
a slight improvement. In the red part below is generated the table of contents
(with depth 1).
@@ -500,7 +507,7 @@ The result is the next frame.
\begin{frame}[fragile]{\texttt{thanksframe} command}\label{thanks}
\begin{docCommand}{thanksframe}{\marg{thanking message}}
- The newcommand \lstinline+\thanksframe+ is provided by the Amurmaple
+ The new command \lstinline+\thanksframe+ is provided by the Amurmaple
theme. This command allows you to generate a slide to thank the audience.
The text written to thank is a mandatory argument (e.g. ``\emph{The end}'')
and the optional argument allows to change the default image which is the
@@ -570,6 +577,12 @@ Because this environment is built with a \texttt{tcolorbox}, to use a footnote i
\begin{docEnvironment}{remark}{\oarg{title complement}}
The Amurmaple theme provides a remark environment with an optional
argument to add a comment in the title (as for the theorem environment).
+
+ The colors of \lstinline+colframe+ and and \lstinline+colback+ are respectively \lstinline+AmurmapleRemarkColor+ and \lstinline+AmurmapleRemarkColor!10+.
+\label{sl:remark}
+
+Because this environment is built with a \texttt{tcolorbox}, to use a footnote in it, you have to use \lstinline+\footnote[frame]{...}+.
+
\begin{Code}
\begin{remark}[Some complement]
This is a capital remark.
@@ -579,7 +592,6 @@ The Amurmaple theme provides a remark environment with an optional
This is a capital remark.
\end{remark}
-Because this environment is built with a \texttt{tcolorbox}, to use a footnote in it, you have to use \lstinline+\footnote[frame]{...}+.
\end{docEnvironment}
\end{frame}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-leftframetitle.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-leftframetitle.pdf
index edc42d6790..23c39a39bb 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-leftframetitle.pdf
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-leftframetitle.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-sidebar.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-sidebar.pdf
index 0b6905d5d8..3d24e70165 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-sidebar.pdf
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-sidebar.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-test.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-test.pdf
index 4cf71ff44f..77ee04f0e6 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-test.pdf
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/doc/beamer-amurmaple-test.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/tex/beamerthemeAmurmaple.sty b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/tex/beamerthemeAmurmaple.sty
index f908d772f1..99f6b58c89 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/tex/beamerthemeAmurmaple.sty
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemeamurmaple/tex/beamerthemeAmurmaple.sty
@@ -1,4 +1,4 @@
-% Copyright (C) 2022 by Maxime CHUPIN
+% Copyright (C) 2023 by Maxime CHUPIN
% <chupin at ceremade.dauphine.fr>
% -------------------------------------------------------
%
@@ -16,7 +16,7 @@
% This work has the LPPL maintenance status "author-maintained".
\NeedsTeXFormat{LaTeX2e}[2021-11-15]
-\ProvidesPackage{beamerthemeAmurmaple}[2022/09/10 v.1.1 Theme for the Beamer
+\ProvidesPackage{beamerthemeAmurmaple}[2023/01/30 v.1.2 Theme for the Beamer
class]%
@@ -25,6 +25,7 @@ class]%
\definecolor{AmurmapleOrange}{RGB}{230,108,17}
\definecolor{AmurmapleBlue}{RGB}{55,119,231}
\definecolor{AmurmapleGreen}{rgb}{0.1,0.4,0.1}
+\definecolor{AmurmapleRemarkColor}{rgb}{0.2,0.2,0.2}
\colorlet{Amurmaple@structure}{AmurmapleRed}
\colorlet{Amurmaple@alert}{AmurmapleOrange}
@@ -53,6 +54,9 @@ class]%
\beamer@am@sidebarfalse
\DeclareOptionBeamer{sidebarwidth}{\def\amurmaple@sidebarwidth{#1}}
\DeclareOptionBeamer{sidebar}{\beamer@am@sidebartrue}
+\newif\ifbeamer@am@toplogo
+\beamer@am@toplogofalse
+\DeclareOptionBeamer{toplogo}{\beamer@am@toplogotrue}
\newif\ifbeamer@am@leftframetitle
\beamer@am@leftframetitlefalse
\DeclareOptionBeamer{leftframetitle}{\beamer@am@leftframetitletrue}
@@ -68,6 +72,7 @@ class]%
\RequirePackage{xfp}
\RequirePackage{expl3}
\RequirePackage{iftex}
+\RequirePackage{pgfpages}
@@ -81,6 +86,40 @@ class]%
%sidebar
\ifbeamer@am@sidebar
\useoutertheme[height=0pt,width=\amurmaple@sidebarwidth,hideothersubsections]{sidebar}
+ \setbeamertemplate{sidebar left}{%
+ \ifbeamer@am@toplogo
+ \hskip -0.03cm%
+ \hbox to \beamer@sidebarwidth{
+ \hfil \hbox{\insertlogo} \hfil
+ }
+ \fi
+ \beamer@tempdim=\beamer@sidebarwidth%
+ %\advance\beamer@tempdim by -6pt%
+ {\usebeamerfont{title in sidebar}%
+ \vskip1.5em%
+ \hskip3pt%
+ \usebeamercolor[fg]{title in sidebar}%
+ \insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
+ \vskip1.em%
+ }%
+ {%
+ \hskip3pt%
+ \usebeamercolor[fg]{author in sidebar}%
+ \usebeamerfont{author in sidebar}%
+ \insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
+ \vskip1.25em%
+ }%
+ \insertverticalnavigation{\beamer@sidebarwidth}%
+ \vfill
+ \ifx\beamer@sidebarside\beamer@lefttext%
+ \else%
+ \usebeamercolor{normal text}%
+ \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
+ \vskip2pt%
+ \fi%
+ }%
+ % Margins
+ \setbeamersize{text margin left=0.5cm,text margin right=0.5cm}
\fi
% dimensions
@@ -90,7 +129,7 @@ class]%
\else
\dim_const:Nn \c_amurmaple_barre_dim { 15pt }
\fi
-\dim_const:Nn \c_amurmaple_margin {10pt}
+\dim_const:Nn \c_amurmaple_margin {15pt}
\ifbeamer@am@sidebar
\tl_set:Nx \l_amurmaple_margin_left { \dim_eval:n {\c_amurmaple_margin } }
\else
@@ -221,9 +260,9 @@ class]%
\setbeamercolor{title in sidebar}{fg=white}
\setbeamercolor{section in sidebar}{bg=black!30!structure,fg=white}
\setbeamercolor{subsection in sidebar}{bg=black!30!structure,fg=white}
- \setbeamerfont{subsection in sidebar}{size=\scriptsize}
- \setbeamerfont{subsection in sidebar}{size=\tiny}
- \setbeamerfont{title in sidebar}{size=\small}
+ \setbeamerfont{section in sidebar}{size=\fontsize{6}{6}\selectfont}
+ \setbeamerfont{subsection in sidebar}{size=\fontsize{4}{6}\selectfont}
+ \setbeamerfont{title in sidebar}{size=\scriptsize}
\setbeamerfont{author in sidebar}{size=\tiny}
\fi
\ExplSyntaxOn
@@ -239,13 +278,13 @@ class]%
([xshift=\c_amurmaple_barre_dim]current~page.south~west) rectangle ([xshift=\c_amurmaple_barre_dim+1pt]current~%
page.north~west);%
\fi
- \ifbeamer@am@sidebar%
- \node[anchor=south,color=black!40] at ($(current~page.south)+(0.5\c_amurmaple_barre_dim,0)$)%
- (title) {\small%
- \ifbeamer@am@nomail%
+ \ifbeamer@am@nomail%
+ \node[anchor=south,color=black!40,rotate=90] at ($(current~page.east)$)%
+ (title) {\tiny%
\texttt{\amurmaple@printmail}%
- \fi%
};%
+ \fi%
+ \ifbeamer@am@sidebar%
\ifbeamer@am@nogauge%
\ifnum\insertframenumber>\insertmainframenumber % gauge only in main part
\else%
@@ -257,15 +296,15 @@ class]%
\fi%
\ifx\logo\empty%
\else%
- \node [anchor=south~west,inner~sep=0pt] at ($(current~page.south~west)+(0,0.5)$)%
- (logo) {\insertlogo};%
+ \ifbeamer@am@toplogo%
+ \else%
+ \node [anchor=south~west,inner~sep=0pt] at ($(current~page.south~west)+(0,0.5)$)%
+ (logo) {\insertlogo};%
+ \fi
\fi%
\else%
\node[anchor=north~west,rotate=90,color=white] at (current~page.south~west)%
(title) {\scriptsize\insertshorttitle\quad---\quad \insertshortauthor%
- \ifbeamer@am@nomail%
- \quad \texttt{\amurmaple@printmail}%
- \fi%
};%
\ifbeamer@am@nogauge%
\ifnum\insertframenumber>\insertmainframenumber % gauge only in main part%
@@ -356,6 +395,8 @@ class]%
\bgroup
\setbeamertemplate{background}%
{}
+ \setbeamertemplate{navigation~symbols}{}
+ \setbeamercolor{background~canvas}{bg=white}
\begin{tikzpicture}[remember~picture,overlay]
\fill[white]
([yshift=15pt]current~page.west) rectangle (current~page.north~
@@ -418,19 +459,9 @@ class]%
}
\ExplSyntaxOff
-\renewcommand{\maketitle}{%
- \begingroup
- \setbeamertemplate{background}%
- {}
- \setbeamertemplate{navigation symbols}{}
- \setbeamercolor{background canvas}{bg=white}
- \begin{frame}[noframenumbering,plain]
- \titlepage
- \end{frame}
- \endgroup
-}
-% section page
+
+ % section page
\setbeamertemplate{section page}{
\hypersetup{linkcolor=structure}
\begin{tikzpicture}[remember picture,overlay]
@@ -671,11 +702,12 @@ class]%
{%
\IfNoValueTF{#1}{%
}{
- \begin{flushright}
- \normalfont #1
- \end{flushright}
- \end{tcolorbox}%
- }%
+ \begin{flushright}%
+ \normalfont #1%
+ \end{flushright}%
+ }
+ \end{tcolorbox}%
+ %
}
\newcommand\amurmaple@info{\raisebox{-1mm}{\tikz{\node[circle,fill=Amurmaple@info,align=center,text
@@ -703,9 +735,9 @@ class]%
\NewDocumentEnvironment{remark}{o}{
\tcbset{%
- arc=0pt,outer arc=0pt,colback=gray!10!white,colframe=gray!60!white,
+ arc=0pt,outer arc=0pt,colback=AmurmapleRemarkColor!10,colframe=AmurmapleRemarkColor,
boxsep=0pt,left=10pt,right=10pt,top=8pt,bottom=10pt, bottomtitle = 3pt, toptitle=3pt,
- boxrule=0pt,bottomrule=0.5pt,toprule=0.5pt
+ boxrule=0pt
}
\smallskip
\begin{tcolorbox}[fonttitle=\bfseries,title={\translate{Remark} \IfNoValueF{#1}{(#1)}}]}%
diff --git a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
index 055636b008..f9dab08c08 100644
--- a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
+++ b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/externalize.pdf b/macros/latex/contrib/todonotes/examples/externalize.pdf
index 09cbb36711..0da152998f 100644
--- a/macros/latex/contrib/todonotes/examples/externalize.pdf
+++ b/macros/latex/contrib/todonotes/examples/externalize.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
index 84f5b07aa3..47387ae6a4 100644
--- a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
+++ b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/img/AlteredAppearenceOfListOfTodos.png b/macros/latex/contrib/todonotes/img/AlteredAppearenceOfListOfTodos.png
new file mode 100644
index 0000000000..bcb2773b1b
--- /dev/null
+++ b/macros/latex/contrib/todonotes/img/AlteredAppearenceOfListOfTodos.png
Binary files differ
diff --git a/macros/latex/contrib/todonotes/todonotes.dtx b/macros/latex/contrib/todonotes/todonotes.dtx
index 9bea77d925..d9ddd09a35 100644
--- a/macros/latex/contrib/todonotes/todonotes.dtx
+++ b/macros/latex/contrib/todonotes/todonotes.dtx
@@ -20,14 +20,14 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{todonotes}
%<*package>
- [2021/06/04 v1.1.5 Todonotes source and documentation.]
+ [2023/01/31 v1.1.6 Todonotes source and documentation.]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{wrapfig}
\usepackage[colorlinks, linkcolor=black, urlcolor=blue]{hyperref}
-\usepackage[colorinlistoftodos, loadshadowlibrary]{todonotes}[2021/06/04]
+\usepackage[colorinlistoftodos, loadshadowlibrary]{todonotes}[2023/01/31]
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{soul}
@@ -45,7 +45,7 @@
%</driver>
% \fi
%
-% \CheckSum{734}
+% \CheckSum{760}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -213,6 +213,9 @@
% shadows. Actually use the tickmarkheight option as suggested by
% José Francisco Loff library by default. Described a workaround for using
% the standalone document class.}
+% \changes{1.1.6}{2023/01/31}{Fix issue 64 by adding the command definetodostyle and
+% the format option to the todo and missingfigure commands.
+% Pull request by rzach.}
% \GetFileInfo{todonotes.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -241,11 +244,14 @@
% \newpage
% \section{Introduction}
%
-% The |todonotes| package makes three commands available to the
+% The |todonotes| package makes four commands available to the
% user: |\todo[]{}|, |\missingfigure{}| and |\listoftodos|.
% |\todo[]{}| and |\missingfigure{}| makes it possible to insert
% notes in your document about things that has to be done later
-% (todonotes \ldots).
+% (todonotes \ldots).
+% The |\todostyle| command allows the user to
+% define named custom styles as abbreviations for lists of other
+% options that can be given to the |\todo| command.
% I developed the basic functionality of the package while I worked
% on my bachelor project.
%
@@ -315,6 +321,19 @@
% list of todos. The command should be placed right before the
% |\listoftodos| command.
%
+% \DescribeMacro{\todostyle\marg{name}\marg{style}}
+% The |\todostyle| command defines a new optional argument to the
+% |\todo| command \meta{name} which sets the options given by
+% \meta{style}. For instance, after issuing
+% \begin{verbatim}
+% \todostyle{red}{color=red,shadow}\end{verbatim}
+% the command |\todonote[red]{Stuff}| has the same effect as:
+% \begin{verbatim}
+% \todonote[color=red,shadow]{Stuff}\end{verbatim}
+% Defined styles should be used
+% as the first optional argument to |\todo|, as they reset all
+% predefined options to their defaults.
+%
% \subsection{Package options}
% \label{subsecPackageOptions}
% \DescribeMacro{disable}
@@ -385,8 +404,9 @@
%
% \DescribeMacro{textwidth}
% |textwidth=length| sets the width of a todo item in the margin to
-% |length|. The width of inline todonotes will allways be the same
-% as the current line width.
+% |length|. The width of inline todonotes defaults to the width of the
+% current |\linewidth| but can be adjusted using the
+% |inlinewidth| option.
%
% \DescribeMacro{textsize}
% |textsize=value| sets the default text size of the inserted
@@ -794,6 +814,11 @@
%
% \subsubsection{Todonotes in footnotes}
% Placing todonotes in footnotes throws a lot of errors.
+% However inline notes seems to work fine, as shown here
+% \footnote{Note \todo[inline]{description}}:
+% \begin{verbatim}
+% \footnote{Note \todo[inline]{description}}
+% \end{verbatim}
% Richard Stanton comes with the following work around.
% \begin{verbatim}
% \renewcommand{\marginpar}{\marginnote}
@@ -857,7 +882,17 @@
% \end{document}
% \end{verbatim}
%
+% \subsubsection{Issues with user-defined styles}
+%
+% Using an option defined using |\todostyle| will reset all predefined
+% options to their defaults. For instance,
+% |\todo[inline,newstyle]{Stuff}| will not be inline; however
+% |\todo[newstyle,inline]{Stuff}| will be.
%
+% |\todostyle| does not check if the name of the defined style is
+% already one of the defined options, so, e.g.,
+% |\todostyle{inline}{color=red}| will redefine the |inline| option
+% to produce red marginal notes.
%
% \subsection{Things to improve}
% This is a list of things I consider to improve sometime in the
@@ -937,6 +972,15 @@
% This \todoredefined[color=green]{Test of newly defined command, requesting a green color.}
% can be done with all the accepted options for the |\todo| command.
%
+% If only available options to the |\todo| command are desired in the
+% defined command, a similar effect can be achieved by defining a new style.
+% For instance,
+% \begin{verbatim}
+% \todostyle{red}{color=red}
+% \todo[red,inline]{A red to do}\end{verbatim}
+% \todostyle{red}{color=red}%
+% will produce a note like this:\todo[red,inline]{A todo with user-defined
+% style \emph{red}}
%
%
% \subsubsection{Enumerate todonotes}
@@ -1296,6 +1340,38 @@
% \tododone[disable]{Testing}
%
%
+% \subsubsection{Notes in both left and right margin}
+%
+% If you want to add many todonotes in your document, it can be beneficial to
+% use both the left and right margins for the inserted notes.
+% This can be achieved by defining a helper function the following way.
+% The main drawback is that notes inserted using the \verb!marginnote!
+% command does not float and thus they can get to overlap.
+% This idea was suggested by
+% \href{https://github.com/henrikmidtiby/todonotes/issues/56}{FranzAtGithub}.
+%
+% \begin{verbatim}
+% \usepackage{marginnote}
+% \usepackage{etoolbox}
+%
+% \newtoggle{lmargin}
+% \newcommand{\alternatingtodo}[2][]{%
+% \iftoggle{lmargin}%
+% {%
+% \todo[#1]{#2}
+% \togglefalse{lmargin}
+% }{%
+% {%
+% \let\marginpar\marginnote%
+% \reversemarginpar%
+% \todo[#1]{#2}%
+% }%
+% \toggletrue{lmargin}%
+% }%
+% }%
+% \end{verbatim}
+%
+%
%
% \iffalse
% \StopEventually{\PrintChanges\PrintIndex}
@@ -1307,7 +1383,7 @@
%
% Identifies the package and loads the packages dependences.
% \begin{macrocode}
-\ProvidesPackage{todonotes}[2021/06/04]
+\ProvidesPackage{todonotes}[2023/01/31]
\RequirePackage{ifthen}
\RequirePackage{xkeyval}
\RequirePackage{xcolor}
@@ -1533,6 +1609,17 @@ prior to loading the todonotes package.} \else\fi%
\define@key{todonotes.sty}%
{textwidth}{\renewcommand{\@todonotes@textwidth}{#1}}
% \end{macrocode}
+% Make the formatting of a note an option.
+% Notes are formatted using |\todoformat|, which by default does
+% nothing.
+% If the option |format=cmd| is given, notes are formatted using
+% |\cmd| instead.
+% Default formatting can also be changed by redefining |\todoformat|.
+% \begin{macrocode}
+\newcommand{\todoformat}[1]{#1}
+\define@key{todonotes.sty}%
+ {format}{\renewcommand{\todoformat}{\@nameuse{#1}}}
+% \end{macrocode}
% Make the text size as an option, accept both |size| and |textsize|.
% \begin{macrocode}
\define@key{todonotes.sty}%
@@ -1625,6 +1712,14 @@ prior to loading the todonotes package.} \else\fi%
\define@key{todonotes}{tickmarkheight}{%
\renewcommand{\@todonotes@tickmarkheight}{#1}}%
% \end{macrocode}
+% Make formatting of notes a per-note option as well, by redefining
+% the internal |\@todonotes@format| command, which is then used in
+% formatting the actual note.
+% \begin{macrocode}
+\newcommand{\@todonotes@format}{\todoformat}%
+\define@key{todonotes}{format}{%
+ \renewcommand{\@todonotes@format}{\@nameuse{#1}}}%
+% \end{macrocode}
% Set a relative font size
% \begin{macrocode}
\newcommand{\@todonotes@sizecommand}{}%
@@ -1720,6 +1815,7 @@ prior to loading the todonotes package.} \else\fi%
backgroundcolor=\@todonotes@backgroundcolor,%
textcolor=\@todonotes@textcolor,%
bordercolor=\@todonotes@bordercolor,%
+ format=todoformat,%
tickmarkheight=\@todonotes@defaulttickmarkheight,%
nofancyline,%
nodisable,%
@@ -1931,9 +2027,10 @@ prior to loading the todonotes package.} \else\fi%
\end{tikzpicture}%
\if@todonotes@inlinepar\par\fi}%
\if@todonotes@authorgiven%
- {\noindent \@todonotes@useSizeCommand \@todonotes@author:\,\@todonotes@text}%
+ {\noindent \@todonotes@useSizeCommand \@todonotes@author:\,\@todonotes@format{\@todonotes@text}}%
\else%
- {\noindent \@todonotes@useSizeCommand \@todonotes@text}%
+ {\noindent \@todonotes@useSizeCommand%
+ \@todonotes@format{\@todonotes@text}}%
\fi
{\if@todonotes@inlinepar\par\noindent\fi%
\begin{tikzpicture}[remember picture]%
@@ -1945,9 +2042,10 @@ prior to loading the todonotes package.} \else\fi%
\begin{tikzpicture}[remember picture]%
\draw node[inlinenotestyle,font=\@todonotes@useSizeCommand]{%
\if@todonotes@authorgiven%
- {\noindent \@todonotes@author:\,\@todonotes@text}%
+ {\noindent \@todonotes@author:\,%
+ \@todonotes@format{\@todonotes@text}}%
\else%
- {\noindent \@todonotes@text}%
+ {\noindent \@todonotes@format{\@todonotes@text}}%
\fi};%
\end{tikzpicture}%
\if@todonotes@inlinepar\par\fi}%
@@ -1964,9 +2062,10 @@ prior to loading the todonotes package.} \else\fi%
\end{tikzpicture}\\%
\begin{minipage}{\@todonotes@textwidth}%
\if@todonotes@authorgiven%
- \@todonotes@useSizeCommand \@todonotes@author \@todonotes@text%
+ \@todonotes@useSizeCommand \@todonotes@author:\,
+ \@todonotes@format{\@todonotes@text}%
\else%
- \@todonotes@useSizeCommand \@todonotes@text%
+ \@todonotes@useSizeCommand\@todonotes@format{\@todonotes@text}%
\fi%
\end{minipage}\\%
\begin{tikzpicture}[remember picture]%
@@ -1982,10 +2081,10 @@ prior to loading the todonotes package.} \else\fi%
{\@todonotes@author};%
\node(Y)[below=of X]{};%
\draw node[notestyle,font=\@todonotes@useSizeCommand,anchor=north] (inNote) at (X.south)%
- {\@todonotes@text};%
+ {\@todonotes@format{\@todonotes@text}};%
\else%
\draw node[notestyle,font=\@todonotes@useSizeCommand,anchor=north] (inNote) at (X.north)%
- {\@todonotes@text};%
+ {\@todonotes@format{\@todonotes@text}};%
\fi%
\end{tikzpicture}%
\hbadness \originalHbadness%
@@ -2111,6 +2210,17 @@ prior to loading the todonotes package.} \else\fi%
\newif\if@todonotes@vmode
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\todostyle}
+% Define the |\todostyle| macro. |\todostyle|\marg{name}\marg{style}
+% defines an |xkeyval| option \meta{name} that, when called in a
+% |\todo| or |\missingfigure| command, sets the preset options
+% followed by \meta{style}.
+% \begin{macrocode}
+\newcommand*{\todostyle}[2]{%
+ \define@key{todonotes}{#1}[]{%
+ \setkeys{todonotes}{#2}}}
+% \end{macrocode}
+% \end{macro}
% \appendix
% \newpage
% \Finale
diff --git a/macros/latex/contrib/todonotes/todonotes.pdf b/macros/latex/contrib/todonotes/todonotes.pdf
index 3ef4000da6..e3558ce6e9 100644
--- a/macros/latex/contrib/todonotes/todonotes.pdf
+++ b/macros/latex/contrib/todonotes/todonotes.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
index 4a040de3b9..113d469a38 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
index e03e735fa8..739738cd0f 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-en.tex
@@ -45,8 +45,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.1}
-\def\TPdate{20/01/2023}
+\def\TPversion{0.1.2}
+\def\TPdate{30/01/2023}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -125,7 +125,7 @@
\end{EnvGrid}
\end{center}
-\begin{EnvGrid}[NumSquares=24x5,Margin=1,Enlarge=2/2,Grid=Seyes]<Plum!75/LightSteelBlue!50>
+\begin{EnvGrid}[NumSquares=24x5,Margin=1,Enlarge=2/2,Grid=Seyes]<\ColSeyes>
\WriteLine[Scale=1.5]{\textcolor{red}{my text on line 1\ldots}}
\WriteLine[Scale=1.5]{\textcolor{blue}{my text on line 2\ldots}}
\WriteLine[Scale=1.5,OffsetH=-1]{$1+\frac{1}{2}=\frac32$ et $(1+x)^2=1+2x+x^2$ on line 3\ldots}
@@ -218,14 +218,26 @@ For example, a $5\times5$ grid :
\draw[ForestGreen,thick] (0,0) rectangle ({0.5*24},{-0.5*5}) ;
\end{tikzpicture}
-\vspace{1.5cm}
+\vspace{1.25cm}
The \texttt{tikzpicture} is \textit{bounded} by the \textcolor{ForestGreen}{\textit{border}}, in order to specify overtakings or alignment.
-\medskip
+\smallskip
Le left-border of the \textcolor{ForestGreen}{\textit{border}} is aligned on the left-margin of the page, so take care of the \texttt{\textbackslash parindent}.
+\subsection{Predefined colors}
+
+The package \textsf{WriteOnGrid} proposes "shortcuts" for classic colors !
+
+\begin{PresentationCode}{listing only}
+\definecolor{TyrianPurple}{rgb}{0.4,0.01,0.24}
+%Colors for Seyes
+\def\ColSeyes{Plum!75/LightSteelBlue!50}
+%Colors for Ruled
+\def\ColRuled{LightSteelBlue!50/TyrianPurple}
+\end{PresentationCode}
+
\pagebreak
\section{Commands, keys and options}
@@ -254,31 +266,31 @@ The first argument, \textit{optional}, between \texttt{[...]} give the \Cle{keys
The second argument, \textit{optional}, between \texttt{<...>} is the color(s) of the grid :
\begin{itemize}
- \item by \Cle{Color} (\Cle{lightgray!50} by default) for $5\times5$ or Ruled ;
- \item by \Cle{ColorA/ColorB} (\Cle{lightgray!50/lightgray!25} by default) for Seyes.
+ \item by \Cle{Color} (\Cle{lightgray!50} by default) for $5\times5$ ;
+ \item by \Cle{ColorA/ColorB} (\Cle{lightgray!50/lightgray!25} by default) for Seyes or Ruled.
\end{itemize}
\medskip
\begin{PresentationCode}{listing only}
-%18x4 big squares, w/o overtaking, 3-margin
-\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<Plum!75/LightSteelBlue!50>
+%18x4 big squares, w/o overtaking, Seyes colors, 3-margin
+\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<\ColSeyes>
\end{EnvGrid}
%36x8 small squares, overtakings 3/3, LightSteelBlue color
\begin{EnvGrid}[NumSquares=36x8,Enlarge=3/3]<LightSteelBlue>
\end{EnvGrid}
-%12x3 lines "Ruled", w/o overtakins, orange!50 color, centered, with 2-margin
+%12x3 lines "Ruled", w/o overtakins, Ruled colors, centered, with 2-margin
\begin{center}
- \begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<orange!50>
+ \begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled>
\end{EnvGrid}
\end{center}
\end{PresentationCode}
\medskip
-\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<Plum!75/LightSteelBlue!50>
+\begin{EnvGrid}[NumSquares=18x4,Grid=Seyes,Margin=3]<\ColSeyes>
\end{EnvGrid}
\smallskip
@@ -289,7 +301,7 @@ The second argument, \textit{optional}, between \texttt{<...>} is the color(s) o
\smallskip
\begin{center}
- \begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<orange!50>
+ \begin{EnvGrid}[NumSquares=12x3,Grid=Ruled,Margin=2]<\ColRuled>
\end{EnvGrid}
\end{center}
@@ -351,14 +363,14 @@ Le third argument, \textit{mandatory} and between \texttt{\{...\}} is the text,
\end{EnvGrid}
\begin{PresentationCode}{listing only}
-\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]
+\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]<\ColRuled>
\WriteLine[Scale=1.5]{\textcolor{red}{red text on line 1\ldots}}
\WriteLine[Scale=1.15,OffsetH=1]{$(1+x)^2=1+2x+x^2$ on line 2, with 1-square offset\ldots}
\WriteLine[OffsetH=-1]{\textcolor{blue}{blue text, back to left, on line 3\ldots}}
\end{EnvGrid}
\end{PresentationCode}
-\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]
+\begin{EnvGrid}[NumSquares=16x4,Margin=2,Grid=Ruled]<\ColRuled>
\WriteLine[Scale=1.5]{\textcolor{red}{red text on line 1\ldots}}
\WriteLine[Scale=1.15,OffsetH=1]{$(1+x)^2=1+2x+x^2$ on line 2, with 1-square offset\ldots}
\WriteLine[OffsetH=-1]{\textcolor{blue}{blue text, back to left, on line 3\ldots}}
@@ -374,7 +386,7 @@ There's few other possibilities with the package\textsf{WorkOnGrid}, but for the
\smallskip
-To sum up, they create full paper grid, with the ability to write paragraph.
+To sum up, they create full paper grid (by preference for \texttt{\textbf{a4paper}}), with the ability to write paragraph.
\section{Example}
@@ -417,6 +429,8 @@ To sum up, they create full paper grid, with the ability to write paragraph.
\part*{History}
+\verb|v0.1.2|~:~~~~Shortcuts for default colors + small bugfixes
+
\verb|v0.1.1|~:~~~~Best color choice
\verb|v0.1.0|~:~~~~Initial version
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
index cb3fe7aade..add8699922 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
index 37b3191cc7..6ed93fa269 100644
--- a/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
+++ b/macros/latex/contrib/writeongrid/doc/WriteOnGrid-doc-fr.tex
@@ -48,8 +48,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.1.1}
-\def\TPdate{20 Janvier 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{30 Janvier 2023}
\usepackage[most]{tcolorbox}
\tcbuselibrary{minted}
@@ -132,7 +132,7 @@
\end{EnvQuadrillage}
\end{center}
-\begin{EnvQuadrillage}[NbCarreaux=24x5,Marge=1,Elargir=2/2,Grille=Seyes]<Plum!75/LightSteelBlue!50>
+\begin{EnvQuadrillage}[NbCarreaux=24x5,Marge=1,Elargir=2/2,Grille=Seyes]<\CoulSeyes>
\EcrireLigne[Echelle=1.5]{\textcolor{red}{mon texte sur la ligne 1\ldots}}
\EcrireLigne[Echelle=1.5]{\textcolor{blue}{mon texte sur la ligne 2\ldots}}
\EcrireLigne[Echelle=1.5,DecalH=-1]{$1+\frac{1}{2}=\frac32$ et $(1+x)^2=1+2x+x^2$ sur la ligne 3\ldots}
@@ -234,10 +234,22 @@ Ci-dessous on représente une grille $5\times5$ :
Il est à noter que le figure \texttt{tikzpicture} est \textit{délimitée} par le \textcolor{ForestGreen}{\textit{cadre}}, afin de pouvoir gérer les débordements et l'alignement de l'environnement !
-\medskip
+\smallskip
De plus, le bord gauche du \textcolor{ForestGreen}{\textit{cadre}} est aligné sur la marge gauche de la page, donc la position du quadrillage dépend en partie de la configuration de \texttt{\textbackslash parindent}.
+\subsection{Couleurs prédéfinies}
+
+Le package \textsf{WriteOnGrid} définit également des couleurs pour une saisie plus facile !
+
+\begin{PresentationCode}{listing only}
+\definecolor{TyrianPurple}{rgb}{0.4,0.01,0.24}
+%Couleurs adaptées pour le Seyes
+\def\CoulSeyes{Plum!75/LightSteelBlue!50}
+%Couleurs adaptées pour le Ruled
+\def\CoulRuled{LightSteelBlue!50/TyrianPurple}
+\end{PresentationCode}
+
\pagebreak
\section{Grilles individuelles}
@@ -267,8 +279,8 @@ Le premier argument, \textit{optionnel}, entre \texttt{[...]} propose les \Cle{c
Le second argument, \textit{optionnel}, entre \texttt{<...>} correspond quant à lui à la couleur de base du quadrillage :
\begin{itemize}
- \item sous la forme \Cle{Couleur} (\Cle{lightgray!50} par défaut) pour le quadrillage $5\times5$ ou Ruled ;
- \item sous la forme \Cle{CouleurP/CouleurS} (\Cle{lightgray!50/lightgray!25} par défaut) pour le Seyes.
+ \item sous la forme \Cle{Couleur} (\Cle{lightgray!50} par défaut) pour le quadrillage $5\times5$ ;
+ \item sous la forme \Cle{CouleurP/CouleurS} (\Cle{lightgray!50/lightgray!25} par défaut) pour le Seyes ou le Ruled.
\end{itemize}
\medskip
@@ -277,23 +289,23 @@ Le second argument, \textit{optionnel}, entre \texttt{<...>} correspond quant à
%des cadres ont été rajoutés pour la sortie
%18x4 grands carreaux, sans dépassement, couleurs adaptées, marge de 3 carreaux
-\begin{EnvQuadrillage}[NbCarreaux=18x4,Grille=Seyes,Marge=3]<Plum!75/LightSteelBlue!50>
+\begin{EnvQuadrillage}[NbCarreaux=18x4,Grille=Seyes,Marge=3]<\CoulSeyes>
\end{EnvQuadrillage}
%36x8 petits carreaux, avec débordements 3/3, couleur LightSteelBlue!50
\begin{EnvQuadrillage}[NbCarreaux=36x8,Elargir=3/3]<LightSteelBlue!50>
\end{EnvQuadrillage}
-%12x3 lignes "Ruled", sans débordements, couleur orange!50, centré, avec marge
+%12x3 lignes "Ruled", sans débordements, couleur Ruled, centré, avec marge
\begin{center}
- \begin{EnvQuadrillage}[NbCarreaux=12x3,Elargir=2/2,Grille=Ruled,Marge=2]<orange!50>
+ \begin{EnvQuadrillage}[NbCarreaux=12x3,Elargir=2/2,Grille=Ruled,Marge=2]<\CoulRuled>
\end{EnvQuadrillage}
\end{center}
\end{PresentationCode}
\medskip
-\begin{EnvQuadrillage}[NbCarreaux=18x4,Grille=Seyes,Marge=3]<Plum!75/LightSteelBlue!50>
+\begin{EnvQuadrillage}[NbCarreaux=18x4,Grille=Seyes,Marge=3]<\CoulSeyes>
\end{EnvQuadrillage}
\smallskip
@@ -302,7 +314,7 @@ Le second argument, \textit{optionnel}, entre \texttt{<...>} correspond quant à
\end{EnvQuadrillage}
\begin{center}
- \begin{EnvQuadrillage}[NbCarreaux=12x3,Grille=Ruled,Marge=2]<orange!50>
+ \begin{EnvQuadrillage}[NbCarreaux=12x3,Grille=Ruled,Marge=2]<\CoulRuled>
\end{EnvQuadrillage}
\end{center}
@@ -339,7 +351,7 @@ Le deuxième argument, \textit{optionnel}, entre \texttt{<...>} permet de spéci
\medskip
-Le troisième argument, \textit{mandataire} et entre \texttt{\{...\}} est quant à lui le texte à saisir, avec possibilité de spécifier taille, couleur, fonte, etc
+Le troisième argument, \textit{obligatoire} et entre \texttt{\{...\}} est quant à lui le texte à saisir, avec possibilité de spécifier taille, couleur, fonte, etc
\begin{PresentationCode}{listing only}
\begin{EnvQuadrillage}[NbCarreaux=36x8]
@@ -447,7 +459,7 @@ Le troisième argument, \textit{optionnel} et entre \texttt{(...)}, permet de po
\smallskip
-Le dernier argument, \textit{mandataire} et entre \texttt{\{...\}} est le texte à placer, avec les options classiques en langage \TeX{} !
+Le dernier argument, \textit{obligatoire} et entre \texttt{\{...\}} est le texte à placer, avec les options classiques en langage \TeX{} !
\subsection{Une commande pour un cadre de note}
@@ -488,7 +500,7 @@ Le troisième argument, \textit{optionnel} et entre \texttt{(...)}, permet de po
\smallskip
-Le dernier argument, \textit{mandataire} et entre \texttt{\{...\}} est le paragraphe à placer, avec les options classiques en langage \TeX{}, et le passage à la ligne effectué par \texttt{\textbackslash\textbackslash} !
+Le dernier argument, \textit{obligatoire} et entre \texttt{\{...\}} est le paragraphe à placer, avec les options classiques en langage \TeX{}, et le passage à la ligne effectué par \texttt{\textbackslash\textbackslash} !
\subsection{Exemple \og détaillé \fg}
@@ -680,6 +692,8 @@ Les exemples des pages suivantes ont été obtenus de la même manière que celu
\section{Historique}
+\verb|v0.1.2|~:~~~~Ajustement au niveau des couleurs + raccourcis couleurs par défaut
+
\verb|v0.1.1|~:~~~~Meilleure gestion des couleurs du quadrillage + Ajout pages complètes
\verb|v0.1.0|~:~~~~Version initiale
diff --git a/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty b/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
index 3592416885..d0b82ea5c1 100644
--- a/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
+++ b/macros/latex/contrib/writeongrid/tex/WriteOnGrid.sty
@@ -2,8 +2,9 @@
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{WriteOnGrid}[2023/01/20 v0.1.1 package to write on grid lines]
-% 0.1.1 Ajout de la couleur + modifications mineures + grille "ruled" + grilles pleine page !
+\ProvidesPackage{WriteOnGrid}[2023/01/30 v0.1.2 package to write on grid lines]
+% 0.1.2 Modification locale des couleurs + raccourcis couleurs Seyes / Ruled
+% 0.1.1 Ajout de la couleur + modifications mineures + grille "Ruled" + grilles pleine page !
% 0.1.0 Version initiale [fr] & [en]
%------Packages utiles
@@ -17,6 +18,11 @@
%------Variables
\newcounter{lgquadri}%compteur des lignes, qui sera incrémenté
+\definecolor{TyrianPurple}{rgb}{0.4,0.01,0.24}
+\def\CoulSeyes{Plum!75/LightSteelBlue!50}
+\def\CoulRuled{LightSteelBlue!50/TyrianPurple}
+\def\ColSeyes{Plum!75/LightSteelBlue!50}
+\def\ColRuled{LightSteelBlue!50/TyrianPurple}
%------Commandes [fr]
\newcommand\PasseLigne{\addtocounter{lgquadri}{1}}%passer une ligne
@@ -86,7 +92,7 @@
{%
\foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; }
%\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college
- \draw[thin,\QuadCoulA] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college
+ \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadrill]{Marge}},0) -- ({\ValeurCarreau*\useKV[Quadrill]{Marge}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college
}%
{}%
\ifboolKV[Quadrill]{Cadre}%cadre pour visualiser la "marge" (officielle)
@@ -152,7 +158,7 @@
{%
\foreach \LLL in {0,1,...,\QuadNbLig} {\draw[,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},{-\LLL*\ValeurCarreau}) -- ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\LLL}) ; }
%\draw[xstep={\ValeurCarreau*\QuadNbCol},ystep=0.9,thin,\QuadCoulA] ({-\ValeurCarreau*\QuadElarG},0) grid ({\ValeurCarreau*\QuadNbCol+\ValeurCarreau*\QuadElarD},{-\ValeurCarreau*\QuadNbLig}) ;%grille college
- \draw[thin,\QuadCoulA] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college
+ \draw[thick,\QuadCoulB] ({\ValeurCarreau*\useKV[Quadril]{Margin}},0) -- ({\ValeurCarreau*\useKV[Quadril]{Margin}},{-\ValeurCarreau*\QuadNbLig}) ;%barre college
}%
{}%
\ifboolKV[Quadril]{Border}%cadre pour la "marge"
@@ -182,10 +188,10 @@
\setKV[SeyesFull]{#1}
\begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm]
%grille secondaire
- \foreach \L in {0,1,...,125} {\draw[\SeyesFullCoulS] ($(current page.north west)+(0,{-2.4-\L*0.2})$)--++(21,0) ;}
+ \foreach \L in {0,1,...,125} {\draw[\SeyesFullCoulS] ($(current page.north west)+(0,{-2.4-\L*0.2})$)--++({\paperwidth},0) ;}
%grille principale
\foreach \C in {1,2,...,21} {\draw[\SeyesFullCoulP] ($(current page.north west)+({4+0.8*\C},0)$)--($(current page.south west)+({4+0.8*\C},0)$) ;}
- \foreach \L in {0,1,...,30} {\draw[\SeyesFullCoulP] ($(current page.north west)+(0,{-3-\L*0.8})$)--++(21,0) ;}
+ \foreach \L in {0,1,...,30} {\draw[\SeyesFullCoulP] ($(current page.north west)+(0,{-3-\L*0.8})$)--++({\paperwidth},0) ;}
%marge
\draw[\SeyesFullCoulM,thick] ($(current page.north west)+(4,0)$)--($(current page.south west)+(4,0)$) ;
\coordinate (SeyesOrigine) at ($(current page.north west)+(4,-3)$) ;
@@ -201,9 +207,9 @@
\newcommand\CadreNoteSeyes[2][3]{%on précise la {ligne de début} + [hauteur]
%cadre de note
- \draw[thick] ($(SeyesOrigine)+(0,{(-#2+1)*0.8})$) --++ ({17},{0}) ;
+ \draw[thick] ($(SeyesOrigine)+(0,{(-#2+1)*0.8})$) --++ ({\paperwidth-4cm},{0}) ;
\draw[thick] ($(SeyesOrigine)+(0,{(-#2+1)*0.8})$) --++ ({0},{-#1*0.8}) ;
- \draw[thick] ($(SeyesOrigine)+(0,{(-#2+1-#1)*0.8})$) --++ ({17},{0}) ;
+ \draw[thick] ($(SeyesOrigine)+(0,{(-#2+1-#1)*0.8})$) --++ ({\paperwidth-4cm},{0}) ;
\draw[thick] ($(SeyesOrigine)+(0,{(-#2+1)*0.8})$) rectangle++ ({#1.*0.8},{-#1*0.8}) ;
\draw[thick] ($(SeyesOrigine)+(0,{(-#2+1-#1)*0.8})$) --++ ({#1.*0.8},{#1*0.8}) ;
}
@@ -224,7 +230,7 @@
\NewDocumentCommand\LignePapierSeyes{ O{} D<>{left} D(){0,0} m }{%
\useKVdefault[SeyesLigne]
\setKV[SeyesLigne]{#1}
- \node[\SeyesLigneCouleur,text width=\fpeval{\SeyesLigneLarg/\SeyesLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\SeyesLigneEchelle] at ($(SeyesOrigine)+(0.025,{-(\SeyesLigne-1)*0.8})+(#3)$) {#4} ;
+ \node[\SeyesLigneCouleur,text width=\fpeval{\SeyesLigneLarg/\SeyesLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\SeyesLigneEchelle] at ($(SeyesOrigine)+(0.05,{-(\SeyesLigne-1)*0.8})+(#3)$) {#4} ;
}
\defKV[SeyesPar]{%
@@ -245,7 +251,7 @@
\NewDocumentCommand\ParagraphePapierSeyes{ O{} D<>{justify} D(){0,0} m }{%
\useKVdefault[SeyesPar]
\setKV[SeyesPar]{#1}
- \node[\SeyesParCouleur,text width=\SeyesParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\SeyesParEchelle}{\SeyesParBase}\selectfont] at ($(SeyesOrigine)+(0.025,{-(\SeyesPar-1)*0.8})+(#3)$) {#4} ;
+ \node[\SeyesParCouleur,text width=\SeyesParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\SeyesParEchelle}{\SeyesParBase}\selectfont] at ($(SeyesOrigine)+(0.05,{-(\SeyesPar-1)*0.8})+(#3)$) {#4} ;
}
%------page entière 5x5
@@ -255,7 +261,7 @@
}
\setKVdefault[CxCFull]{%
Couleur=lightgray!50,%
- CouleurMarge=gray,
+ CouleurMarge=gray,%
NumLignes=false
}
@@ -265,7 +271,7 @@
\setKV[CxCFull]{#1}
\begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm]
%lignes horizontales
- \foreach \L in {0,1,...,58} {\draw[\CCFullCoul] ($(current page.north west)+(0,{-0.3-\L*0.5})$)--++(21,0) ;}
+ \foreach \L in {0,1,...,58} {\draw[\CCFullCoul] ($(current page.north west)+(0,{-0.3-\L*0.5})$)--++({\paperwidth},0) ;}
%lignes verticales
\foreach \C in {0,1,...,41} {\draw[\CCFullCoul] ($(current page.north west)+({0.2+0.5*\C},0)$)--($(current page.south west)+({0.2+0.5*\C},0)$) ;}
%marge
@@ -283,9 +289,9 @@
\newcommand\CadreNoteCinqCinq[2][3]{%on précise la {ligne de début} + [hauteur]
%cadre de note
- \draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1)*0.5})$) --++ ({19.3},{0}) ;
+ \draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1)*0.5})$) --++ ({\paperwidth-1.7cm},{0}) ;
\draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1)*0.5})$) --++ ({0},{-#1*0.5}) ;
- \draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1-#1)*0.5})$) --++ ({19.3},{0}) ;
+ \draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1-#1)*0.5})$) --++ ({\paperwidth-1.7cm},{0}) ;
\draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1)*0.5})$) rectangle++ ({#1.*0.5},{-#1*0.5}) ;
\draw[thick] ($(CinqCinqOrigine)+(0,{(-#2+1-#1)*0.5})$) --++ ({#1.*0.5},{#1*0.5}) ;
}
@@ -306,7 +312,7 @@
\NewDocumentCommand\LignePapierCinqCinq{ O{} D<>{left} D(){0,0} m }{%
\useKVdefault[CCLigne]
\setKV[CCLigne]{#1}
- \node[\CCLigneCouleur,text width=\fpeval{\CCLigneLarg/\CCLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\CCLigneEchelle] at ($(CinqCinqOrigine)+(0.025,{-(\CCLigne-1)*0.5})+(#3)$) {#4} ;
+ \node[\CCLigneCouleur,text width=\fpeval{\CCLigneLarg/\CCLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\CCLigneEchelle] at ($(CinqCinqOrigine)+(0.05,{-(\CCLigne-1)*0.5})+(#3)$) {#4} ;
}
\defKV[CCPar]{%
@@ -321,21 +327,23 @@
Ligne=1,%
TaillePolice=11,%
Espacement=28.5,%
- Largeur=18.7
+ Largeur=18.75
}
\NewDocumentCommand\ParagraphePapierCinqCinq{ O{} D<>{justify} D(){0,0} m }{%
\useKVdefault[CCPar]
\setKV[CCPar]{#1}
- \node[\CCParCouleur,text width=\CCParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\CCParEchelle}{\CCParBase}\selectfont] at ($(CinqCinqOrigine)+(0.025,{-(\CCPar-1)*0.5})+(#3)$) {#4} ;
+ \node[\CCParCouleur,text width=\CCParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\CCParEchelle}{\CCParBase}\selectfont] at ($(CinqCinqOrigine)+(0.05,{-(\CCPar-1)*0.5})+(#3)$) {#4} ;
}
%------page entière ruled
\defKV[RuledFull]{%
- Couleur=\xdef\RuledFullCoul{#1}
+ Couleur=\xdef\RuledFullCoul{#1},%
+ CouleurMarge=\xdef\RuledFullCoulMarge{#1}
}
\setKVdefault[RuledFull]{%
- Couleur=lightgray,%
+ Couleur=LightSteelBlue!50,%
+ CouleurMarge=TyrianPurple,%
NumLignes=false
}
@@ -345,9 +353,11 @@
\setKV[RuledFull]{#1}
\begin{tikzpicture}[remember picture,overlay,x=1cm,y=1cm]
%lignes horizontales
- \foreach \L in {1.5,2.4,...,27.6} {\draw[\RuledFullCoul] ($(current page.north west)+(0,{-\L})$)--++(21,0) ;}
+ \foreach \L in {1.5,2.4,...,27.6} {\draw[\RuledFullCoul] ($(current page.north west)+(0,{-\L})$)--++({\paperwidth},0) ;}
%lignes verticales
- \foreach \C in {3,18} {\draw[\RuledFullCoul] ($(current page.north west)+({\C},0)$)--($(current page.south west)+({\C},0)$) ;}
+ \draw[thick,\RuledFullCoulMarge] ($(current page.north west)+(3,0)$)--($(current page.south west)+(3,0)$) ;
+ \draw[thick,\RuledFullCoulMarge] ($(current page.north east)+(-3,0)$)--($(current page.south east)+(-3,0)$) ;
+ %\foreach \C in {3} {\draw[thick,\RuledFullCoulMarge] ($(current page.north west)+({\C},0)$)--($(current page.south west)+({\C},0)$) ;}
%origine
\coordinate (RuledOrigine) at ($(current page.north west)+(3,-1.5)$) ;
\ifboolKV[RuledFull]{NumLignes}%
@@ -362,10 +372,10 @@
\newcommand\CadreNoteRuled[2][3]{%on précise la {ligne de début} + [hauteur]
%cadre de note
- \draw[thick] ($(RuledOrigine)+(0,{(-#2+1)*0.9})$) --++ ({15},{0}) ;
+ \draw[thick] ($(RuledOrigine)+(0,{(-#2+1)*0.9})$) --++ ({\paperwidth-6cm},{0}) ;
\draw[thick] ($(RuledOrigine)+(0,{(-#2+1)*0.9})$) --++ ({0},{-#1*0.9}) ;
- \draw[thick] ($(RuledOrigine)+(15,{(-#2+1)*0.9})$) --++ ({0},{-#1*0.9}) ;
- \draw[thick] ($(RuledOrigine)+(0,{(-#2+1-#1)*0.9})$) --++ ({15},{0}) ;
+ \draw[thick] ($(RuledOrigine)+({\paperwidth-6},{(-#2+1)*0.9})$) --++ ({0},{-#1*0.9}) ;
+ \draw[thick] ($(RuledOrigine)+(0,{(-#2+1-#1)*0.9})$) --++ ({\paperwidth-6cm},{0}) ;
\draw[thick] ($(RuledOrigine)+(0,{(-#2+1)*0.9})$) rectangle++ ({#1.*0.9},{-#1*0.9}) ;
\draw[thick] ($(RuledOrigine)+(0,{(-#2+1-#1)*0.9})$) --++ ({#1.*0.9},{#1*0.9}) ;
}
@@ -386,7 +396,7 @@
\NewDocumentCommand\LignePapierRuled{ O{} D<>{left} D(){0,0} m }{%
\useKVdefault[RuledLigne]
\setKV[RuledLigne]{#1}
- \node[\RuledLigneCouleur,text width=\fpeval{\RuledLigneLarg/\RuledLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\RuledLigneEchelle] at ($(RuledOrigine)+(0.025,{-(\RuledLigne-1)*0.9})+(#3)$) {#4} ;
+ \node[\RuledLigneCouleur,text width=\fpeval{\RuledLigneLarg/\RuledLigneEchelle}cm,align=#2,inner sep=0pt,anchor=base west,scale=\RuledLigneEchelle] at ($(RuledOrigine)+(0.05,{-(\RuledLigne-1)*0.9})+(#3)$) {#4} ;
}
\defKV[RuledPar]{%
@@ -407,7 +417,7 @@
\NewDocumentCommand\ParagraphePapierRuled{ O{} D<>{justify} D(){0,0} m }{%
\useKVdefault[RuledPar]
\setKV[RuledPar]{#1}
- \node[\RuledParCouleur,text width=\RuledParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\RuledParEchelle}{\RuledParBase}\selectfont] at ($(RuledOrigine)+(0.025,{-(\RuledPar-1)*0.9})+(#3)$) {#4} ;
+ \node[\RuledParCouleur,text width=\RuledParLarg cm,align=#2,inner sep=0pt,anchor=base west,font=\fontsize{\RuledParEchelle}{\RuledParBase}\selectfont] at ($(RuledOrigine)+(0.05,{-(\RuledPar-1)*0.9})+(#3)$) {#4} ;
}
\endinput \ No newline at end of file