summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-28 03:01:08 +0000
committerNorbert Preining <norbert@preining.info>2023-07-28 03:01:08 +0000
commit1e45d661b659c3025746d3a41119300ab90d1dcd (patch)
tree9dfdc2d448c84ef1c1da6adef3145432703d179e /macros
parent1ee18e17580e3a6c28aa966924ce0be160ef3577 (diff)
CTAN sync 202307280301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/abntexto/README6
-rw-r--r--macros/latex/contrib/abntexto/abntexto-manual.pdfbin124830 -> 0 bytes
-rw-r--r--macros/latex/contrib/abntexto/abntexto.cls967
-rw-r--r--macros/latex/contrib/abntexto/abntexto.pdfbin0 -> 218718 bytes
-rw-r--r--macros/latex/contrib/abntexto/abntexto.tex431
-rw-r--r--macros/latex/contrib/circledsteps/circledsteps-manual.pdfbin429201 -> 431371 bytes
-rw-r--r--macros/latex/contrib/circledsteps/circledsteps-manual.tex82
-rw-r--r--macros/latex/contrib/circledsteps/circledsteps.sty4
-rw-r--r--macros/latex/contrib/mismath/README.md6
-rw-r--r--macros/latex/contrib/mismath/mismath.dtx846
-rw-r--r--macros/latex/contrib/mismath/mismath.pdfbin269577 -> 273395 bytes
-rw-r--r--macros/latex/contrib/textcase/textcase.dtx51
-rw-r--r--macros/latex/contrib/textcase/textcase.pdfbin220578 -> 231295 bytes
-rw-r--r--macros/luatex/latex/luanumint/README.txt5
-rw-r--r--macros/luatex/latex/luanumint/luanumint.pdfbin159784 -> 159787 bytes
-rw-r--r--macros/luatex/latex/luanumint/luanumint.sty30
16 files changed, 1324 insertions, 1104 deletions
diff --git a/macros/latex/contrib/abntexto/README b/macros/latex/contrib/abntexto/README
index bd658f4e98..1d1fd57131 100644
--- a/macros/latex/contrib/abntexto/README
+++ b/macros/latex/contrib/abntexto/README
@@ -1,8 +1,8 @@
Public Domain Software
-2023-01-31
-2.0.0-alpha
+2023-07-26
+3.0.0-alpha
Elayson
abntexto.classe at gmail.com
The abntexto is a LaTeX class for the elaboration of academic works according
-to the guidelines of the Associação Brasileira de Normas Técnicas (ABNT). \ No newline at end of file
+to the guidelines of the Associação Brasileira de Normas Técnicas (ABNT).
diff --git a/macros/latex/contrib/abntexto/abntexto-manual.pdf b/macros/latex/contrib/abntexto/abntexto-manual.pdf
deleted file mode 100644
index c168af6296..0000000000
--- a/macros/latex/contrib/abntexto/abntexto-manual.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/abntexto/abntexto.cls b/macros/latex/contrib/abntexto/abntexto.cls
index d731a37d2e..6cfcd2a27e 100644
--- a/macros/latex/contrib/abntexto/abntexto.cls
+++ b/macros/latex/contrib/abntexto/abntexto.cls
@@ -1,6 +1,6 @@
%! Public Domain Software
-%! 2023-01-31
-%! 2.0.0-alpha
+%! 2023-07-26
+%! 3.0.0-alpha
%! Elayson
%! abntexto.classe at gmail.com
@@ -21,42 +21,31 @@
% \sec RECOMENDAÇÕES
-% 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.
+% 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, |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}.
+% Identificação do formato \TeX\ e da classe, carregando a classe |article| e os únicos pacotes do |abntexto|.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{abntexto}[2023-01-31 2.0.0-alpha Preparation of works in ABNT standards]
+\ProvidesClass{abntexto}[2023-07-26 3.0.0-alpha Preparation of works in ABNT standards]
-\RequirePackage{keyval}
-% |ecode !------------------------------------------------
+\LoadClass{article}
+\RequirePackage{geometry}
+\RequirePackage{graphicx}
+% \end{code} !------------------------------------------------
-% Definição de um sistema \emph{chave=valor} pessoal e de macros auxiliares.
+% Um atalho para |\ClassError|.
-% |bcode !------------------------------------------------
-\def\tnba@key{\define@key{tnba@\tnba@keyfamily}}
-\def\tnba@setkeys#1{\setkeys{tnba@#1}}
-
-\def\tnba@addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
-
-\newif \iftnba@inbody
-\AddToHook{begindocument}{\tnba@inbodytrue}
-% |ecode !------------------------------------------------
-
-% Alertas, mensagens, \emph{debug}.
-
-% |bcode !------------------------------------------------
-\def\tnba@warning{\ClassWarningNoLine{abntexto}}
+% \begin{code} !------------------------------------------------
\def\tnba@error#1{\ClassError{abntexto}{#1}{}}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
-% Condicionais para identificação da extensão \TeX.
+% Condicionais para identificação da extensão TeX.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\newif \iftnba@PDFTEX
\newif \iftnba@XETEX
\newif \iftnba@LUATEX
@@ -65,30 +54,29 @@
\tnba@PDFTEXtrue \else
\tnba@XETEXtrue \fi \else
\tnba@LUATEXtrue \fi
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec FONTE TIPOGRÁFICA
-% Apenas o tamanho 12\,pt está definido. Defina outros usando \cs\definefontsize\cc{id}\hfil\break \cc{definições}.
+% Apenas o tamanho 12\,pt está definido. Defina outros usando |\definefontsize{<id>}{<definições>}|.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\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
+ \tnba@error{Tamanho de fonte "#1" desconhecido. Defina um novo usando \noexpand\definefontsize}\fi
}
+\@onlypreamble \definefontsize
\@onlypreamble \setfontsize
-\def\sizedef#1#2#3#4{\DeclareRobustCommand#1{\fontsize{#2}{#3}\selectfont#4}}
+\def\sizedef#1#2#3#4{\DeclareRobustCommand#1{\fontsize{#2}{#3}\selectfont#4\relax}}
\def\spacing#1{\def\currspacing{#1}%
\@tempdima=\f@size pt \baselineskip=#1\@tempdima \ignorespaces
}
\def\currspacing{1.5}
-\def\normalsize{}
\def\tnba@setfontsizehook{}
\AddToHook{begindocument}{%
@@ -100,481 +88,621 @@
\def\singlesp{\baselineskip=\normalbaselineskip}
\def\onehalfsp{\spacing{1.5}}
\def\doublesp{\spacing{2}}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec \emph{LAYOUT}
-% 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.
+% O estilo de página |\pretextual| omite a numeração de página e desliga o modo |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.
-% |bcode !------------------------------------------------
-\iftnba@LUATEX
- \protected\edef\pdfhorigin {\pdfvariable horigin}
- \protected\edef\pdfvorigin {\pdfvariable vorigin}
- \let\pdfpagewidth=\pagewidth
- \let\pdfpageheight=\pageheight
-\fi
+% A instrução |\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, |twoside| vai espelhar as margens horizontais.
-\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
- \headheight=12pt
- \headsep=1cm
- \advance\topmargin-\headheight \advance\topmargin-\headsep
- \advance\textwidth-\tnba@L \advance\textwidth-\tnba@R
- \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
- \pdfhorigin=0pt \pdfvorigin=0pt
- \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight
- \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.
-
-% 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{\setlayout{twoside=false}%
+% \begin{code} !------------------------------------------------
+\def\pretextual{%
+ \newgeometry{
+ twoside=false,
+ left = 3cm,
+ top = 3cm,
+ right = 2cm,
+ bottom = 2cm
+ }%
+ \spacing{1.5}%
\let\@oddhead=\empty
\let\@evenhead=\empty
\let\@oddfoot=\empty
\let\@evenfoot=\empty
}
-\def\textual{\setlayout{twoside=true}%
+\def\textual{%
+ \newgeometry{
+ twoside=true,
+ left = 3cm,
+ top = 3cm,
+ right = 2cm,
+ bottom = 2cm
+ }%
+ \spacing{1.5}%
\def\@oddhead{\hfil\small\thepage}%
\def\@evenhead{\small\thepage\hfil}%
\def\@oddfoot{}%
\def\@evenfoot{}%
\parindent=1.5cm
}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec SUMÁRIO
-% 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.
+% Aqui, a macro |\extline| foi baseada em |\@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}
+% \begin{code} !------------------------------------------------
\def\extpagenumwidth{1.55em}
\def\extrightmargin{2.55em}
-\def\extline#1#2#3#4#5{\vskip0pt plus.2pt
- \extlabelwidth=#2
+\def\extline#1#2#3#4#5{%
\begingroup
- \parindent=#1 \leftskip=#1
- \rightskip=\extrightmargin \parfillskip=-\rightskip
- \leavevmode #3{}\advance\leftskip\extlabelwidth \hskip-\leftskip #3{#4}\nobreak\extleaders\nobreak
+ \parindent=0pt \leftskip=#1
+ \rightskip=\extrightmargin\relax \parfillskip=-\rightskip
+ #3{\advance\leftskip#2\relax \hskip-#2\relax #4}%
+ \nobreak\extleaders\nobreak
\hbox to\extpagenumwidth{\hfil #5\kern-1pt\kern1pt}\nbpar
\endgroup
}
\def\extleaders{\leaders\hbox{$\mathsurround=0pt \mkern4.5mu\hbox{.}\mkern4.5mu$}\hfill}
-\def \l@toci #1#2{\addpenalty{351}\addvspace{1em plus1pt}%
- \extlabelwidth=\toclabelwidth
- \begingroup
- \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@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 !------------------------------------------------
+\def \l@part {\addpenalty{-300}\addvspace{2.25em plus1pt}%
+ \extline{0pt}{\toclabelwidth}{\def\extleaders{\hfil}\tocpartfont}}
+\def \l@chapter {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\toclabelwidth}{\def\extleaders{\hfil}\tocchapterfont}}
+\def \l@section {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\toclabelwidth}{\def\extleaders{\hfil}\tocsectionfont}}
+\def \l@subsection {\vskip0pt plus.2pt
+ \extline{0pt}{\toclabelwidth}{\tocsubsectionfont}}
+\def \l@subsubsection {\vskip0pt plus.2pt
+ \extline{0pt}{\toclabelwidth}{\tocsubsubsectionfont}}
+\def \l@paragraph {\vskip0pt plus.2pt
+ \extline{0pt}{\toclabelwidth}{\tocparagraphfont}}
+\def \l@subparagraph {\vskip0pt plus.2pt
+ \extline{0pt}{\toclabelwidth}{\tocsubparagraphfont}}
+
+\def\toclabelbox#1{\hbox to\toclabelwidth{#1\hss}}
+% \end{code} !------------------------------------------------
% \sec SECIONAMENTO
-% 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.
+% O comando |\hangfrom| é oriundo do kernel. Ele vai ser útil na formatação das seções.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\let\hangfrom=\@hangfrom
\def\nbpar{{\interlinepenalty=10000\par}}
-\def\advcount#1{\advance#1by1 }
-\def\addtotoc{\hreftocline\currsecname \addcontentsline{toc}}
-% |ecode !------------------------------------------------
+\def\trytextual{\textual \let\textual=\relax}
+% \end{code} !------------------------------------------------
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\newcount\countseclevel
+\newcount\countpart
+\newcount\countchapter
\newcount\countsection
\newcount\countsubsection
\newcount\countsubsubsection
\newcount\countparagraph
\newcount\countsubparagraph
+\def\thepart{\@Roman\countpart}
+\def\thechapter{\the\countchapter}
\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 !------------------------------------------------
+% \end{code} !------------------------------------------------
% Nesta parte estão definidos os comandos secionais. Nenhum destes comandos são internos, caso o leitor queira redefiní-los.
-% |bcode !------------------------------------------------
-\def\recountseci {\countsubsection=0 \recountsecii}
-\def\recountsecii {\countsubsubsection=0 \recountseciii}
-\def\recountseciii {\countparagraph=0 \recountseciv}
-\def\recountseciv {\countsubparagraph=0 }
+% \begin{code} !------------------------------------------------
+\def\recountchapter {\countsection=0 \recountsection}
+\def\recountsection {\countsubsection=0 \recountsubsection}
+\def\recountsubsection {\countsubsubsection=0 \recountsubsubsection}
+\def\recountsubsubsection {\countparagraph=0 \recountparagraph}
+\def\recountparagraph {\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\printpart#1{%
+ \begingroup
+ \centering\huge\bfseries Parte \thepart
+ \vskip20pt
+ \Huge\bfseries #1\nbpar
+ \endgroup
}
-\def\startsubsection#1{\advcount\countsubsection \recountsecii
- \hangfrom{\subsectionfont\thesubsection\quad}%
- {\subsectionfont{#1}\nbpar}%
- \tryindentfirst
+\def\printchapter#1{%
+ \begingroup
+ \raggedright\huge\bfseries Capítulo \thechapter
+ \vskip20pt
+ \Huge\bfseries #1\nbpar
+ \endgroup
}
-\def\startsubsubsection#1{\advcount\countsubsubsection \recountseciii
+\def\printsection#1{{%
+ \hangfrom{\sectionfont\thesection\quad}%
+ \sectionfont{#1}\nbpar
+}}
+\def\printsubsection#1{{%
+ \hangfrom{\subsectionfont\thesubsection\quad}%
+ \subsectionfont{#1}\nbpar
+}}
+\def\printsubsubsection#1{{%
\hangfrom{\subsubsectionfont\thesubsubsection\quad}%
- {\subsubsectionfont{#1}\nbpar}%
- \tryindentfirst
-}
-\def\startparagraph#1{\advcount\countparagraph \recountseciv
+ \subsubsectionfont{#1}\nbpar
+}}
+\def\printparagraph#1{{%
\hangfrom{\paragraphfont\theparagraph\quad}%
- {\paragraphfont{#1}\nbpar}%
- \tryindentfirst
-}
-\def\startsubparagraph#1{\advcount\countsubparagraph
+ \paragraphfont{#1}\nbpar
+}}
+\def\printsubparagraph#1{{%
\hangfrom{\subparagraphfont\thesubparagraph\quad}%
- {\subparagraphfont{#1}\nbpar}%
- \tryindentfirst
-}
-% |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 !------------------------------------------------
-\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}%
+ \subparagraphfont{#1}\nbpar
+}}
+% \end{code} !------------------------------------------------
+
+% A instrução |\setlabel| ensina a forma como |\label|'s devem ser referenciados. O comando |\setlabel| será útil em outros contextos.
+
+% \begin{code} !------------------------------------------------
+\def\partlevel {-1}
+\def\chapterlevel {0}
+\def\sectionlevel {1}
+\def\subsectionlevel {2}
+\def\subsubsectionlevel {3}
+\def\paragraphlevel {4}
+\def\subparagraphlevel {5}
+
+\def\setlabel#1{\def\@currentlabel{#1}}
+
+\def\cfpart {parte\,\thepart}
+\def\cfchapter {capítulo\,\thechapter}
+\def\cfsection {secão\,\thesection}
+\def\cfsubsection {subseção\,\thesubsection}
+\def\cfsubsubsection {subseçao\,\thesubsubsection}
+\def\cfparagraph {subseçao\,\theparagraph}
+\def\cfsubparagraph {subseçao\,\thesubparagraph}
+
+\def\part#1{\cleardoublepage\trytextual \leavevmode\vfil
+ \global\advance\countpart by1
+ \countseclevel=\partlevel\relax \setlabel\cfpart
+ \addtoext{toc}{part}{\protect\toclabelbox{\thepart}#1}%
+ \printpart{#1}%
+ \markpart{#1}%
+ \newpage
+}
+\def\chapter#1{\cleardoublepage\trytextual \leavevmode\vskip\abovechapter\relax
+ \global\advance\countchapter by1 {\globaldefs=1 \recountchapter}%
+ \countseclevel=\chapterlevel\relax \setlabel\cfchapter
+ \addtoext{toc}{chapter}{\protect\toclabelbox{\thechapter}#1}%
+ \printchapter{#1}%
+ \markchapter{#1}%
+ \par\nobreak \vskip\belowchapter\relax
+}
+\def\section#1{\trytextual \addpenalty{-300}\addvspace\abovesection
+ \global\advance\countsection by1 {\globaldefs=1 \recountsection}%
+ \countseclevel=\sectionlevel\relax \setlabel\cfsection
+ \addtoext{toc}{section}{\protect\toclabelbox{\thesection}#1}%
+ \printsection{#1}%
\marksection{#1}%
- \addtotoc{toci}{\protect\toclabelbox{\thesection}#1}%
- \par\nobreak \vskip\belowsection
+ \par\nobreak \vskip\belowsection\relax % Esse \par é necessário.
}
-\def\subsection#1{\par \addpenalty{351}\addvspace\abovesubsection
- \identifysubsection
- \startsubsection{#1}%
+\def\subsection#1{\addpenalty{-300}\addvspace\abovesubsection
+ \global\advance\countsubsection by1 {\globaldefs=1 \recountsubsection}%
+ \countseclevel=\subsectionlevel\relax \setlabel\cfsubsection
+ \addtoext{toc}{subsection}{\protect\toclabelbox{\thesubsection}#1}%
+ \printsubsection{#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 !------------------------------------------------
-
-% 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\toclabelbox#1{\hbox to\extlabelwidth{#1\hfil}}
+ \par\nobreak \vskip\belowsubsection\relax
+}
+\def\subsubsection#1{\addpenalty{-300}\addvspace\abovesubsubsection
+ \global\advance\countsubsubsection by1 {\globaldefs=1 \recountsubsubsection}%
+ \countseclevel=\subsubsectionlevel\relax \setlabel\cfsubsubsection
+ \addtoext{toc}{subsubsection}{\protect\toclabelbox{\thesubsubsection}#1}%
+ \printsubsubsection{#1}%
+ \par\nobreak \vskip\belowsubsubsection\relax
+}
+\def\paragraph#1{\addpenalty{-300}\addvspace\aboveparagraph
+ \global\advance\countparagraph by1 {\globaldefs=1 \recountparagraph}%
+ \countseclevel=\paragraphlevel\relax \setlabel\cfparagraph
+ \addtoext{toc}{paragraph}{\protect\toclabelbox{\theparagraph}#1}%
+ \printparagraph{#1}%
+ \par\nobreak \vskip\belowparagraph\relax
+}
+\def\subparagraph#1{\addpenalty{-300}\addvspace\abovesubparagraph
+ \global\advance\countsubparagraph by1 {\globaldefs=1 \recountsubparagraph}%
+ \countseclevel=\subparagraphlevel\relax \setlabel\cfsubparagraph
+ \addtoext{toc}{subparagraph}{\protect\toclabelbox{\thesubparagraph}#1}%
+ \printsubparagraph{#1}%
+ \par\nobreak \vskip\belowsubparagraph\relax
+}
+% \end{code} !------------------------------------------------
+
+% O |\@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, |\makeext| parece ter mais valor semântico.
+
+% \begin{code} !------------------------------------------------
+
+\def\begcorrprint#1{\begingroup
+ \addtoext{toc}{section}{#1}%
+ \def\section##1##2{\heading{##2}}%
+}
+\def\endcorrprint{\par\endgroup}
+
+\def\usechapters{%
+ \def\l@section{\extline{0pt}{\toclabelwidth}{\tocsectionfont}}%
+ \def\thesection{\thechapter.\the\countsection}%
+ \def\mainseclevel{\chapterlevel}%
+ \def\maintocfont{\tocchapterfont}%
+ \def\begcorrprint##1{\begingroup
+ \addtoext{toc}{chapter}{##1}%
+ \def\section####1####2{\heading{####2}}%
+ }%
+}
+\def\useparts{\usechapters
+ \def \l@chapter {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\toclabelwidth}{\tocchapterfont}}%
+}
+
\def\makeext#1{\@starttoc{#1}}
-\def\tocname{Sumário}
+\AddToHook{begindocument}{%
+ \pdfstringdefDisableCommands{\def\toclabelbox#1{#1 }}%
+}
+
+\def\markpart#1{}
+\def\markchapter#1{}
\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}%
-}
-
-\AddToHook{begindocument}{%
- \@ifpackageloaded{hyperref}{}{\let\hreftocline=\@gobble}%
+% \end{code} !------------------------------------------------
+
+% Os comandos a seguir são usados pelo |hyperref.sty| na criação de \emph{bookmarks} em PDFs.
+
+% \begin{code} !------------------------------------------------
+\def\toclevel@part {\partlevel}
+\def\toclevel@chapter {\chapterlevel}
+\def\toclevel@section {\sectionlevel}
+\def\toclevel@subsection {\subsectionlevel}
+\def\toclevel@subsubsection {\subsubsectionlevel}
+\def\toclevel@paragraph {\paragraphlevel}
+\def\toclevel@subparagraph {\subparagraphlevel}
+
+\def\mainseclevel{\sectionlevel}
+\def\toclevel@appendix {\mainseclevel}
+\def\toclevel@annex {\mainseclevel}
+% \end{code} !------------------------------------------------
+
+% A definição de |\addtoext| depende de o |hyperref.sty| estar presente ou não.
+
+% \begin{code} !------------------------------------------------
+\def\addtoext#1#2#3{\noindent % Esse \noindent é necessário.
+ \setcounter{section@level}{\countseclevel}%
+ \NR@gettitle{#3}%
+ \Hy@MakeCurrentHrefAuto{section*}%
+ \setlength{\Hy@SectionHShift}{0pt}%
+ \Hy@SectionAnchorHref{\@currentHref}%
+ \addcontentsline{#1}{#2}{#3}%
+}
+
+\AddToHook{begindocument/before}{%
+ \@ifpackageloaded{hyperref}{}{%
+ \def\addtoext#1#2#3{\addcontentsline{#1}{#2}{#3}}%
+ \let\pdfstringdefDisableCommands=\@gobble
+ }%
}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
-% A macro \cs\heading\ serve para produzir títulos não contados, como “Sumário”, “Lista de figuras”, “Apêndice” etc.
+% A macro |\heading| serve para produzir títulos não contados, como “Sumário”, “Lista de figuras”, “Apêndice” etc.
-% |bcode !------------------------------------------------
-\def\heading#1{\par {\centering \sectionfont{#1}\par}%
- \nobreak \vskip\belowsection
+% \begin{code} !------------------------------------------------
+\def\heading#1{{\centering \sectionfont{#1}\par}%
+ \vskip\belowsection\relax
}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
-% 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.
+% Aqui estão definidos |\appendix| e |\annex|.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\newcount\countappendix
\newcount\countannex
\def\theappendix{\@Alph\countappendix}
\def\theannex{\@Alph\countannex}
-\def\appendixlabelwidth{6.6em}
-\def\annexlabelwidth{6.2em}
+\def\appendixlabelbox#1{\hbox to\appendixlabelwidth{Apêndice~#1~---~\hss}}
+\def\annexlabelbox#1{\hbox to\annexlabelwidth{Anexo~#1~---~\hss}}
-\def\appendixlabelbox#1{\hbox to\appendixlabelwidth{Apêndice~#1~---~\hfil}}
-\def\annexlabelbox#1{\hbox to\annexlabelwidth{Anexo~#1~---~\hfil}}
+\AddToHook{begindocument}{\pdfstringdefDisableCommands{%
+ \def\appendixlabelbox#1{Apêndice #1 }%
+ \def\annexlabelbox#1{Anexo #1 }%
+}}
-\def\l@appendix{\l@toci}
-\def\l@annex{\l@toci}
+\def \l@appendix {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\appendixlabelwidth}{\def\extleaders{\hfil}\maintocfont}}
+\def \l@annex {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\annexlabelwidth}{\def\extleaders{\hfil}\maintocfont}}
-\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 !------------------------------------------------
+\def\appendix#1{\newpage \global\advance\countappendix by1
+ \addtoext{toc}{appendix}{\protect\appendixlabelbox{\theappendix}#1}%
+ \heading{Apêndice~\theappendix~---~#1}%
+}
+\def\annex#1{\newpage \global\advance\countannex by1
+ \addtoext{toc}{annex}{\protect\annexlabelbox{\theannex}#1}%
+ \heading{Anexo~\theannex~---~#1}%
+}
+% \end{code} !------------------------------------------------
+
+% Quando |\usechapters| está ativo, o LaTeX, por algum motivo, exige a criação do contador |\c@chapter|.
+
+% \begin{code} !------------------------------------------------
+\newcount\c@chapter
+% \end{code} !------------------------------------------------
% \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.
+% Se o pacote |csquotes| estiver carregado, ele definirá sua própria versão de |\enquote|, do contrário, o |abntexto| criará uma.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\AddToHook{begindocument}{%
\@ifpackageloaded{csquotes}{}{\protected\def\enquote#1{``#1''}}%
}
-\def\Enquote#1{\par\removelastskip
+\long\def\Enquote#1{\par\removelastskip
\vskip\baselineskip
{\noindent\leftskip=4cm \small #1\nbpar}%
\vskip\baselineskip
}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec ALÍNEAS
-% 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.
+% Estas linhas não foram baseadas no ambiente |list| do LaTeX, portanto não podem ser personalizadas por pacotes como |enumitem|, por exemplo.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\newcount\counttopicsdepth
\newcount\counttopics
+\newcount\countsubtopics
-\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\counttopics )}
+\def\thetopics{\@alph\counttopics}
+\def\thesubtopics{\the\countsubtopics}
+
+\def\topicslabeli{\thetopics)}
\def\topicslabelii{---}
-\def\topics{\par\penalty51 \advcount\counttopicsdepth
+\def\cftopics{alínea~\thetopics)}
+\def\cfsubtopics{subalínea~\thetopics\thesubtopics}
+
+\def\topics{\par \advance\counttopicsdepth by1
\ifnum\counttopicsdepth=1 \advance\leftskip\parindent \fi
\advance\leftskip\topicslabelwidth
- \edef\topicsmakelabel{\expandafter\noexpand\csname topicslabel\romannumeral\counttopicsdepth\endcsname}%
+ \edef\topicsmakelabel{\expandafter\noexpand
+ \csname topicslabel\romannumeral\counttopicsdepth\endcsname}%
\let\item=\topicsitem
- \tnba@addto\@esphack\ignorespaces
+ \expandafter\def \expandafter\@esphack \expandafter{\@esphack\ignorespaces}%
}
\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 !------------------------------------------------
+\def\topicsitem{\par
+ \ifnum\counttopicsdepth=1
+ \advance\counttopics by1 \setlabel\cftopics
+ \else
+ \advance\countsubtopics by1 \setlabel\cfsubtopics
+ \fi
+ \noindent \kern-\topicslabelwidth
+ \hbox to\topicslabelwidth{\topicsmakelabel\hfil}%
+ \ignorespaces
+}
+% \end{code} !------------------------------------------------
% \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 |article| o ambiente |table| inicia o modo flutuante, mas nesta classe ele é sinônimo de |tabular| porque faz mais sentido para min.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
+\let\table=\undefined \let\endtable=\undefined
\newenvironment{table}[1]{\begin{tabular}{#1}}{\end{tabular}}
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec ÁREAS DE LEGENDA
-% |bcode !------------------------------------------------
-\def\tnba@getprevdepth{\par\xdef\tnba@getprevdepthA{\the\prevdepth}}
-\def\tnba@useprevdepth{\par\prevdepth=\tnba@getprevdepthA}
-% |ecode !------------------------------------------------
+% \begin{code} !------------------------------------------------
+\def\definelegendplace#1#2#3#4{\expandafter\newcount\csname count#1\endcsname
+ \@namedef{#1name}{#2}%
+ \expandafter\edef\csname the#1\endcsname
+ {\noexpand\the\csname count#1\endcsname}%
+ \expandafter\edef\csname cf#1\endcsname
+ {\unexpanded{#3}\expandafter\noexpand\csname the#1\endcsname}%
+ \@namedef{#1ext}{#4}%
+ \expandafter\edef\csname l@#4i\endcsname
+ {\noexpand\extline{0pt}{\csname #4labelwidth\endcsname}{\expandafter\noexpand\csname #4ifont\endcsname}}%
+ \@namedef{#4labelwidth}{5.4em}%
+ \@namedef{#4labelbox}##1{\hbox to\csname #4labelwidth\endcsname{#2~##1~---\hss}}%
+ \AddToHook{begindocument}{%
+ \pdfstringdefDisableCommands{\@namedef{#4labelbox}##1{##1 }}%
+ }%
+ \@namedef{#4ifont}##1{##1}%
+ \@namedef{make#4}{\makeext{#4}}%
+}
+% \end{code} !------------------------------------------------
-% |bcode !------------------------------------------------
-\def\tnba@lastplacenum{0}
+% \begin{code} !------------------------------------------------
+\newdimen\placewidth \AddToHook{begindocument}{\placewidth=.43\linewidth}
+\newdimen\savedplacewidth
-\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{%\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}%
+\def\printlegend#1{\setbox0=\hbox{\legendlabel#1}%
+ \hfil \vtop{\hsize=\ifdim\wd0>\legendmaxwidth \legendmaxwidth\else\wd0 \fi
+ \hangfrom\legendlabel #1%
+ \par\xdef\savedprevdepth{\the\prevdepth}%
+ }%
+ \printlegendA
+ \par\nointerlineskip \nobreak\vskip\medskipamount
+}
+\def\printlegendA{%
+ \def \@tempa{\expandafter\noexpand \csname\csname\savedplace ext\endcsname labelbox\endcsname}%
+ \edef\@tempa{\noexpand\addtoext
+ {\csname \savedplace ext\endcsname}%
+ {\csname \savedplace ext\endcsname i}%
+ {\noexpand\protect \@tempa {\thelegend}\noexpand\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\printplace#1{\setbox0=\hbox{\ignorespaces#1\unskip}%
+ \global\savedplacewidth=\wd0
+ \hfil \unhbox0
+ \par\nointerlineskip \nobreak\vskip\medskipamount
+}
+\def\printsrc#1{\hfil \vbox{\hsize=\savedplacewidth
+ \raggedright\footnotesize\singlesp
+ \hangfrom\srclabel #1%
+}}
+
+\def\place#1{\par \vskip\aboveplace\relax
+ \parindent=0pt\parskip=0pt
+ \ifx\empty\savedplace\else \printlegend\savedlegend \fi
+ \printplace{#1}%
+ \printsrc\savedsrc
+ \resetplace
+ \vskip\belowplace\relax
+}
+\def\subplace#1{\leavevmode
+ \vtop{\hsize=\placewidth \linewidth=\hsize
+ \parindent=0pt\parskip=0pt
+ \ifx\empty\savedplace\else \printlegend\savedlegend \fi
+ \printplace{#1}%
+ \printsrc\savedsrc
+ \par\xdef\savedprevdepth{\the\prevdepth}%
+ }%
+ \resetplace
+ \ignorespaces
+}
+\def\resetplace{%
+ \let\savedplace=\empty
+ \let\savedlegend=\empty
+ \let\savedsrc=\empty
+ \setlabel{}%
+}
-\def\tnba@makesrc{\hbox to\hsize{\hfil\tnba@makesrcA\hfil}\tnba@useprevdepth}
-\def\tnba@makesrcA{\vtop{\hsize=\tnba@placewidth \srclabel
- \vtop{\setbox0=\hbox{\srclabel}\advance\hsize-\wd0 \tnba@savedsrc \tnba@getprevdepth}}%
+\def\legend#1#2{\ifdim\lastskip>0pt \vskip-\lastskip\fi
+ \def\savedplace{#1}%
+ \def\savedlegend{#2}%
+ \ifx\empty#1\else
+ \global\advance\csname count#1\endcsname by1
+ \setlabel{\csname cf#1\endcsname}%
+ \fi
+ \ignorespaces
+}
+\def\sublegend#1#2{\ifdim\lastskip>0pt \vskip-\lastskip\fi
+ \def\savedplace{#1}%
+ \def\savedlegend{#2}%
+ \ifx\empty#1\else
+ \global\advance\@tempcnta by1
+ \setlabel{\csname cf#1\endcsname \@alph\@tempcnta}%
+ \fi
+ \ignorespaces
}
-% |ecode !------------------------------------------------
-% |bcode !------------------------------------------------
-\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\src#1{\ifdim\lastskip>0pt \vskip-\lastskip\fi
+ \ifx\empty#1\else \def\savedsrc{#1}\fi
+ \ignorespaces
}
-\def\legendname{\csname \tnba@savedplace name\endcsname}
-\def\thelegend{\the\csname count\tnba@savedplace\endcsname}
+\def\legendname{\csname \savedplace name\endcsname}
+\def\thelegend{\the\csname count\savedplace\endcsname}
-\def\src#1{\removelastskip \def\tnba@savedsrc{#1}}
-% |ecode !------------------------------------------------
+\def\savedlegend{}
+\def\savedplace{}
+\def\savedsrc{}
-% |bcode !------------------------------------------------
-\let\tnba@savedplace=\empty
-\let\tnba@savedlegend=\empty
-\let\tnba@savedsrc=\empty
+\newenvironment{multiplace}{\par \ifdim\lastskip>0pt \vskip-\lastskip \fi
+ \vskip\aboveplace\relax
+ \ifx\savedlegend\empty \else
+ \printlegend\savedlegend \par\prevdepth=\savedprevdepth\relax
+ \fi
+ \noindent
+ \def\legendmaxwidth{\placewidth}%
+ \@tempcnta=0 \let\legend=\sublegend \let\legendlabel=\sublegendlabel
+ \let\printlegendA=\relax
+ \ignorespaces
+}{%
+ \unskip
+ \vskip\belowplace\relax
+ \par\prevdepth=\savedprevdepth\relax
+}
-\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
- \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=\empty
+\AddToHook{begindocument}{%
+ \def\LT@makecaption#1#2#3{\LT@mcol{\LT@cols}{c}{%
+ \hbox to\z@{\hss
+ \parbox[t]{\legendmaxwidth}{\def\savedplace{table}\global\setlabel\cftable
+ \legendlabel#3\endgraf\vskip\baselineskip}%
+ \hss}%
+ }}%
+ \def\LT@c@ption#1[#2]#3{%
+ \LT@makecaption#1\fnum@table{#3}%
+ \def\@tempa{#2}%
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addtoext{lot}{lofi}{\protect\lotlabelbox{\the\counttable}#2}}%
+ \fi
+ }%
}
-% |ecode !------------------------------------------------
+
+\AddToHook{begindocument}{\@ifpackageloaded{longtable}{\LTpre=\baselineskip \LTpost=\baselineskip}{}}
+
+\def\longlegend#1{%
+ \caption{#1} \\ \hline \endfirsthead
+ \caption*{#1}\\ \multicolumn{\LT@cols}{r}{\small (continuação)} \\ \hline \endhead
+}
+\def\longsrc#1{\LT@mcol{\LT@cols}{c}{%
+ \hbox to\z@{\hss \savedplacewidth=\legendmaxwidth
+ \parbox[b]{\legendmaxwidth}{\vskip\medskipamount \printsrc{#1\vskip-\baselineskip}}%
+ \hss}%
+}}
+
+\AddToHook{begindocument}{\let\c@table=\counttable}
+% \end{code} !------------------------------------------------
% \sec NOTAS DE RODAPÉ
% As notas de rodapé também foram modificadas.
-% |bcode !------------------------------------------------
-\let\footnotesize=\relax
+% \begin{code} !------------------------------------------------
\def\@makefnmark{\hbox{\@textsuperscript{\selectfont\@thefnmark}}}
\def\@makefntext#1{\hangfrom{\@makefnmark\kern2pt}\small #1}
\def\footnoterule{\kern18pt \hrule width5cm \kern2.6pt }
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec IDENTIFICAÇÃO DO TRABALHO
-% |bcode !------------------------------------------------
-\def\Enter{\@ifnextchar[\tnba@EnterS{\tnba@EnterS[]}}
-\def\tnba@EnterS[#1]{\vskip#1\baselineskip}
-
+% \begin{code} !------------------------------------------------
+\def\Enter{\@ifnextchar[\tnba@Enter{\tnba@Enter[]}}
+\def\tnba@Enter[#1]{\vskip#1\baselineskip}
\def\twonewpage{\newpage\leavevmode\newpage}
-\long\def\indexcard#1{\hbox{\vrule\vbox to7.5cm{\hsize=12.5cm \advance\hsize by-2cm \advance\hsize by-0.8pt
+\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\xindexcardbar\hrule}\vrule}%
}
-\long\def\indexcardA#1{\hbox spread2cm{\hss\vbox spread2cm{\vss\ttfamily#1\vss}\hss}%
+\long\def\indexcardA#1{\hbox spread2cm{\hss\vbox spread2cm{\vss
+ \ttfamily\small\parindent=1em #1%
+ \vss}\hss}%
}
\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 !------------------------------------------------
+\def\judgeline#1{{\centering \rule{.7\linewidth}{.6pt}\\ #1\par}\Enter[1.5]}
+% \end{code} !------------------------------------------------
% \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.
+% No Brasil e em outro lugares a vírgula é um separador decimal, portanto |$1,2$| deve produzir um resultado diferente de |$1, 2$|, por exemplo.
-% As linhas abaixo são uma cópia da implementação do pacote \pkg{icomma}.
+% As linhas abaixo são uma cópia da implementação do pacote |icomma|.
-% |bcode !------------------------------------------------
-{\catcode`,=\active
+% \begin{code} !------------------------------------------------
+{\catcode`,=13
\gdef,{\futurelet\@let@token\tnba@smartcomma}
}
\def\tnba@smartcomma{%
@@ -583,37 +711,37 @@
\tnba@mathcomma
}
-\mathchardef\tnba@mathcomma\mathcode`\,
-\mathcode`\,="8000
-% |ecode !------------------------------------------------
+\AddToHook{begindocument}{%
+ \mathchardef\tnba@mathcomma=\mathcode`\,%
+ \mathcode`\,="8000
+}
+% \end{code} !------------------------------------------------
-% Abaixo está definido um ajuste para que o \pkg{hyperref} não crie conflitos com \cs\MakeUppercase\ nas entradas do sumário.
+% Abaixo está definido um ajuste para que o |hyperref| não crie conflitos com |\MakeUppercase| nas entradas do sumário.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\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 !------------------------------------------------
+% \end{code} !------------------------------------------------
% \sec COMANDOS OBSOLETOS
-% O \pkg{abntexto} emitirá um aviso ou erro caso um destes comandos esteja obsoleto ou inexistente.
+% O |abntexto| emitirá um aviso ou erro caso um destes comandos esteja obsoleto ou inexistente.
-% |bcode !------------------------------------------------
+% \begin{code} !------------------------------------------------
\def\tnba@undefcmd#1{\def#1{\tnba@error{%
- O comando ''\string#1'' não existe mais. Linha \the\inputlineno
+ O comando "\noexpand#1" não existe mais%
}}}
\def\tnba@obscmd#1#2{\def#1{\tnba@error{%
- O comando ''\string#1'' é obsoleto, use ''\unexpanded{#2}'' ao invés. Linha \the\inputlineno
+ O comando "\noexpand#1" é obsoleto, use "\unexpanded{#2}" ao invés%
}}}
-\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@undefcmd \advcount
\tnba@obscmd \sectionuppercase {\def\sectionfont{\MakeUppercase}}
\tnba@obscmd \tociuppercase {\def\tocifont{\MakeUppercase}}
@@ -622,50 +750,43 @@
\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 !------------------------------------------------
+\tnba@obscmd \fontsizedef \definefontsize
+\tnba@obscmd \paper \setlayout
+\tnba@obscmd \papersizedef \definepapersize
+\tnba@obscmd \startseci \printsection
+\tnba@obscmd \startsecii \printsubsection
+\tnba@obscmd \startseciii \printsubsubsection
+\tnba@obscmd \startseciv \printparagraph
+\tnba@obscmd \startsecv \printsubparagraph
+\tnba@obscmd \qt \enquote
+\tnba@obscmd \quote \Enquote
+% \end{code} !------------------------------------------------
% \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.
-
-% |bcode !------------------------------------------------
-\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
-}
+% Aqui o |abntexto| define as configurações padrões. Note que |\pretextual| deve ser carregado após |\begin{document}| para evitar múltiplas chamadas deste, caso seja redefinido pelo usuário ou escritor de pacotes.
+% \begin{code} !------------------------------------------------
\definefontsize{12pt}{%
- \sizedef\normalsize{12pt}{14.5pt}{\setnormalsize}%
- \sizedef\small{10pt}{12pt}{\setsmall}%
+ \sizedef\normalsize{12pt}{14.5pt}{%
+ \abovedisplayskip=12pt plus3pt minus7pt
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=0pt plus3pt
+ \belowdisplayshortskip=6.5pt plus3.5pt minus3pt
+ }%
+ \sizedef\small{10pt}{12pt}{%
+ \abovedisplayskip=10pt plus2pt minus5pt
+ \belowdisplayskip=\abovedisplayskip
+ \abovedisplayshortskip=0pt plus3pt
+ \belowdisplayshortskip=6pt plus3pt minus3pt
+ }%
}
\setfontsize{12pt}
\spacing{1.5}
-\definepapersize{A4}{210mm}{297mm}
-
-\setlayout{
- paper=A4,
+\geometry{
+ a4paper,
left=3cm,
top=3cm,
right=2cm,
@@ -676,50 +797,58 @@
\parindent=0pt
\parskip=0pt
-\def\tocifont {\bfseries\MakeUppercase}
-\def\tociifont {\itshape}
-\def\tociiifont {\scshape}
-\def\tocivfont {}
-\def\tocvfont {}
+\def\maintocfont {\tocsectionfont}
+
+\def\tocpartfont #1{\bfseries\MakeUppercase{#1}}
+\def\tocchapterfont #1{\bfseries\MakeUppercase{#1}}
+\def\tocsectionfont #1{\bfseries\MakeUppercase{#1}}
+\def\tocsubsectionfont #1{\itshape#1}
+\def\tocsubsubsectionfont #1{\scshape#1}
+\def\tocparagraphfont #1{#1}
+\def\tocsubparagraphfont #1{#1}
-\def\sectionfont {\bfseries\MakeUppercase}
-\def\subsectionfont {\itshape}
-\def\subsubsectionfont {\scshape}
-\def\paragraphfont {}
-\def\subparagraphfont {}
+\def\sectionfont #1{\bfseries\MakeUppercase{#1}}
+\def\subsectionfont #1{\itshape#1}
+\def\subsubsectionfont #1{\scshape#1}
+\def\paragraphfont #1{#1}
+\def\subparagraphfont #1{#1}
+\def\abovechapter {50pt}
\def\abovesection {\baselineskip}
\def\abovesubsection {\baselineskip}
\def\abovesubsubsection {\baselineskip}
\def\aboveparagraph {\baselineskip}
\def\abovesubparagraph {\baselineskip}
+\def\belowchapter {40pt}
\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}
+\definelegendplace{figure}{Figura}{fig.\,}{lof}
+\definelegendplace{table}{Tabela}{tab.\,}{lot}
-\def\legendlabel{\legendname ~\thelegend ~---~}
-\def\srclabel{\raggedright\small Fonte:~}
-\def\legendmaxwidth{0.7\linewidth}
+\def\legendlabel{\legendname\ \thelegend\ ---~}
+\def\sublegendlabel{(\@alph\@tempcnta)~}
+\def\srclabel{Fonte:~}
+\def\legendmaxwidth{.7\linewidth}
\def\aboveplace{\baselineskip}
\def\belowplace{\baselineskip}
-\def\toclabelwidth{3.4ex}
-\def\maketoc{\heading{Sumário} \makeext{toc}\newpage}
+\def\toclabelwidth{2em}
+\def\lotlabelwidth{5.5em}
+\def\loflabelwidth{5.5em}
+\def\appendixlabelwidth{9.2em}
+\def\annexlabelwidth{7.3em}
-\def\topicslabelwidth{4ex}
-
-\arrayrulewidth=0.4pt
+\def\maketoc{\makeext{toc}}
-\topskip=12pt
+\def\topicslabelwidth{4ex}
\AddToHook{begindocument}{\pretextual}
\endinput
-% |ecode !------------------------------------------------
+% \end{code} !------------------------------------------------
diff --git a/macros/latex/contrib/abntexto/abntexto.pdf b/macros/latex/contrib/abntexto/abntexto.pdf
new file mode 100644
index 0000000000..0d3f208d3e
--- /dev/null
+++ b/macros/latex/contrib/abntexto/abntexto.pdf
Binary files differ
diff --git a/macros/latex/contrib/abntexto/abntexto.tex b/macros/latex/contrib/abntexto/abntexto.tex
index 2183e6ebf7..3f4491dc15 100644
--- a/macros/latex/contrib/abntexto/abntexto.tex
+++ b/macros/latex/contrib/abntexto/abntexto.tex
@@ -2,117 +2,105 @@
\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}]}}
+\usepackage[brazil]{babel}
+\usepackage{fontspec}
+\usepackage{unicode-math}
+\usepackage[colorlinks,linktoc=page]{hyperref}
+\usepackage{listings}
-\def\arg{\cc{arg}}
-\def\opt{\kk{opt}}
-\def\ccval#1{{\ttnoligs \{#1\}}}
-\def\kkval#1{{\ttnoligs [#1]}}
-\def\pkg#1{{\ttnoligs #1}}
+\makeatletter
% VERBATIM
% ================================================
+\newcount\verbcount
+\newdimen\hh \hh=6pt
+
\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 }
+\def\setverb{\def\do##1{\catcode`##1=12}\dospecials}
-{\catcode`\^^M=13
- \gdef\codepercent#1^^M{{\color{graycomment}\itshape\@percentchar#1^^M}}
+{\catcode`\^^M=13
+ \gdef\verbpercent#1^^M{{\bfseries\color{comment}\%#1}^^M}
}
-\long\def\codeon{\begingroup \codecatcodes
- \adef{\^^I}{\space\space\space}%
- \adef{\^^M}{\par\leavevmode}%
- \adef{\ }{\space}%
- \adef{\%}{\codepercent}%
- \startcode
+\def\makeverbcount{}
+
+\def\begverb{\par \begingroup\parindent=0pt\parskip=0pt
+ \setverb \catcode`\|=0
+ \adef{ }{\ }%
+ \adef{\^^I}{\ \ \ }%
+% \everypar={\makeverbcount}%
+ \def\par##1{\endgraf\ifx##1\par\leavevmode\fi ##1}%
+ \obeylines
+ \adef{'}{\textquotesingle}%
+% \adef{`}{\`{}}%
+ \adef{-}{-\kern0pt }%
+ \adef{\%}{\verbpercent}%
+ \startverb
}
-{\catcode`\ =13 \catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
- |gdef|startcode^^M#1^^M\codeoff{|codebox{#1}|par|endgroup |codereset}
+{\catcode`\^^M=13 \catcode`\|=0 \catcode`\\=12
+ |long|gdef|startverb#1\endverb{|verbbox{#1|endgraf}|endgroup|resetplace}
}
-\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\verbbox#1{\place{\verbframe{#1}}}
+\def\verbframe#1{%
+ \hbox{{\color{leftbar}\vrule width1pt}\kern\hh\vbox{%
+ \hbox{\vbox{\advance\hsize-1pt \advance\hsize-\hh \verbfont #1}}%
+ }}%
}
-\def\codereset{%
- \let\tnba@savedplace=\empty
- \let\tnba@savedlegend=\empty
- \let\tnba@savedsrc=\empty
- \let\@currentlabel=\empty
+\def\verbfont{\sloppy\ttfamily\small\singlesp}
+
+\def\verbchar#1{%
+ \ifx\savedttchar\undefined\else \catcode\savedttchar=\savedttcharc \fi
+ \chardef\savedttchar=`#1%
+ \chardef\savedttcharc=\catcode`#1%
+ \bgroup\lccode`\~=`#1%
+ \lowercase {\egroup\def~}{\leavevmode\hbox\bgroup\setverb\adef{ }{\ }%
+ \ttfamily\readverb}%
+ \bgroup\lccode`\~=`#1\lowercase{\egroup\def\readverb ##1~}{##1\egroup}%
+ \catcode`#1=13
}
-\def\codefont{\raggedright\leftskip=6pt\singlesp\small\ttnoligs\leftframed}
-\long\def\leftframed#1{\hbox{{\color{graybar}\kern1.5cm\vrule width1pt}\vtop{#1}}}
+\verbchar{|}
+
+\AddToHook{begindocument}{\adef{<}{\begingroup \setverb\startmeta}}
+\def\startmeta#1>{\ttfamily$\langle${\rmfamily\itshape #1\/}$\rangle$\endgroup}
% 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
-
+\definecolor{leftbar}{gray}{.75}
+\definecolor{comment}{gray}{.2}
+
+\setmainfont{texgyretermes}[
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ Extension = .otf
+]
+\setmonofont{InconsolataN-Regular.otf}
+\setmathfont{texgyretermes-math.otf}
+
+\def\tocsectionfont#1{\bfseries#1\mdseries}
+\def\sectionfont#1{\bfseries#1}
+\def\appendixlabelwidth{6.7em}
+\def \l@section {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\toclabelwidth}{\tocsectionfont}}
+\def \l@appendix {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\appendixlabelwidth}{\maintocfont}}
+\def \l@annex {\addpenalty{-300}\addvspace{1em plus1pt}%
+ \extline{0pt}{\annexlabelwidth}{\maintocfont}}
+
+\definelegendplace{code}{Código}{cód.\,}{loc}
+\def\me{o Autor.}
+
+\clubpenalty=10000
+\widowpenalty=10000
\let\cite=\textcite
-\def\bibfont{\singlesp}
-\erase
-\bibitemsep=18pt
-\enderase
+\def\bibfont{\bibitemsep=\baselineskip \singlesp}
\makeatother
@@ -127,121 +115,127 @@
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}
-
+ \today
+\par}
\vskip3in
-{\centering\large\ttfamily 2.0.0-alpha\par}
-
+{\centering\large\ttfamily 3.0.0-alpha\par}
\newpage
+\heading{Sumário}
\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).
+O |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.}.
+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.
+Já existe uma classe para aplicação das normas ABNT cujo nome é |abntex2|. Mas, diferente desta, o |abntexto| não depende do |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.
+As normas ABNT as quais o |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.
+O |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}.
+Digite as linhas em \ref{cd:início} e use |abntexto|.
\legend{code}{Início} \src\me
\label{cd:início}
-\codeon
+\begverb
% !TeX TS-program = lualatex
\documentclass{abntexto}
\usepackage[brazil]{babel}
\usepackage{fontspec}
-\setmainfont{TeX Gyre Termes}
+\setmainfont{texgyretermes}[
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ Extension = .otf
+]
\begin{document}
Texto
\end{document}
-\codeoff
+\endverb
\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.
+O tamanho da fonte é 12\,pt de imediato e pode ser configurado com o comando |\setfontsize{<id>}| sendo que 12\,pt é a única opção disponível. Além disso, com os seletores de tamanho |\normalsize| e |\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.
+Mas, se você deseja outro tamanho de fonte, crie-o usando |\definefontsize{<id>}{<definições>}| e |\sizedef<seletor>{<tamanho>}{<entrelinha natural>}|. Em <definições>, o seletor |\normalsize| deve estar presente por meio de |\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}.
+O espaçamento é de um e meio e pode ser alterado para dois com |\spacing{2}|, por exemplo. Os atalhos |\singlesp|, |\onehalfsp| e |\doublesp| estão disponíveis. Note que o espaçamento simples não tem o mesmo valor que o espaçamento um, portanto, |\singlesp| é diferente de |\spacing{1}|! Os atalhos |\onehalfsp| e |\doublesp| tem o mesmo significado de |\spacing{1.5}| e |\spacing{2}|.
-\section{\emph{Layout}}
+A limitação do comando |\spacing| é que ele só pode ser usado após um seletor de tamanho, porque este redefine a entrelinha. Por exemplo, |\small\onehalfsp| é correto e |\onehalfsp\small| ineficaz.
-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}}.
+\section{\emph{Layout}}
-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.
+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. As margens foram ajustadas com o pacote |geometry|.
-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.
+Existem dois comandos que configuram o \emph{layout} da página: |\pretextual| que, além de desabilitar o modo |twoside|, remove a numeração de página e é executado automaticamente logo após |\begin{document}| e o comando |\textual| que também é executado automaticamente logo antes da primeira chamada de |\section| por meio de |\trytextual|. Dessa forma, a numeração de página será posta no topo da página e as margens passarão 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}).
+Os comandos que mudam a fonte das entradas no ToC (Table of Contents) são |\tocsectionfont|, |\tocsubsectionfont|, \dots, |\tocsubparagraphfont| (ver \ref{cd:contents}).
\legend{code}{Aparência do sumário} \src\me
\label{cd:contents}
-\codeon
+\begverb
\documentclass{abntexto}
-\usepackage{color}
+\usepackage{xcolor}
-\def \tocifont {\color{red}\itshape\MakeUppercase}
-\def \tociifont {\color{blue}\bfseries}
+\def \tocsectionfont #1{\color{red}\itshape\MakeUppercase{#1}}
+\def \tocsubsectionfont #1{\color{blue}\bfseries#1}
\begin{document}
+ \heading{Sumário}
\maketoc
\section{Título}
\subsection{Título}
\end{document}
-\codeoff
+\endverb
\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}.
+A personalização das macros de seção (|\section|, |\subsection| etc.) é análoga a personalização do sumário e deve ser feita com |\sectionfont|, |\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.
+Também há como alterar o espaço vertical acima e abaixo das seções usando |\abovesection|, |\belowsection| e semelhantes. Por exemplo, |\def\abovesubsection{2cm}| insere um espaço de 2\,cm acima de |\subsection|.
\legend{code}{Aparência das seções} \src\me
\label{cd:sec}
-\codeon
+\begverb
\documentclass{abntexto}
-\usepackage{color}
+\usepackage{xcolor}
-\def \sectionfont {\color{blue}\scshape}
-\def \subsectionfont {\color{red}\itshape}
-\def \subsubsectionfont {\color{yellow}\sffamily}
+\def \sectionfont #1{\color{blue}\scshape#1}
+\def \subsectionfont #1{\color{red}\itshape#1}
+\def \subsubsectionfont #1{\color{yellow}\sffamily#1}
\begin{document}
+ \heading{Sumário}
\maketoc
\section{Texto}
\subsection{Texto}
\subsubsection{Texto}
\end{document}
-\codeoff
+\endverb
\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.
+Use o ambiente |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 |\label| após um item.
\legend{code}{Alíneas} \src\me
\label{cd:topics}
-\codeon
+\begverb
\begin{topics}
\item \label{al:x} 1
\begin{topics}
@@ -252,17 +246,15 @@ Use o ambiente \cs{topics} para criar alíneas. Ele dispõe de dois níveis send
\item \label{al:y} 2
\item 3
\end{topics}
-\codeoff
+\endverb
\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}.
+Use |\place{<obj>}| para inserir áreas de legenda como mostrado em \ref{cd:place}. Mas existem condições: |\place| deve vir por último e |\label| precisa estar depois de |\legend{<tipo de obj>}{<legenda>}|. Além disso, existe a possibilidade de alterar o espaço vertical acima e abaixo de uma área de legenda com |\def\aboveplace{<valor>}| e |\def\belowplace{<valor>}|.
\legend{code}{Áreas de legenda} \src\me
\label{cd:place}
-\codeon
-\usepackage{graphicx}
-
+\begverb
\begin{document}
\legend{figure}{Um título}
\src{\texttt{www.site.com.br}. Acesso em 01 jan. 2020.}
@@ -271,62 +263,51 @@ Use \cs\place\ para inserir áreas de legenda como mostrado em \ref{cd:place}. M
Ver \ref{fig:teste}.
\end{document}
-\codeoff
+\endverb
-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.
+O leitor pode querer definir uma nova área de legenda usando, por exemplo, a instrução |\definelegendplace{diagram}{Diagrama}{diag.\,#1}{lod}| criará o comando |\makelod| para escrever no documento as entradas do arquivo auxiliar .lod.
-\section{Formatação de {\ttfamily\protect\textbackslash cite} e referências}
+\section{Formatação de {\ttfamily\textbackslash\lowercase{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\}}.
+Até o momento o |abntexto| não possui macros para formatação de |\cite| e referências. Utilize |\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}}.
+Para inserir aspas em citações diretas use |\enquote{texto}\cite{<key>}|. Mas, se tratando de citações diretas com mais de três linhas, alterne para |\Enquote{texto \cite{<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}).
+Com os comandos |\appendix| e |\annex| você pode inserir apêndices e anexos junto dos 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
+\begverb
\begin{document}
- \appendix
- \section{Lorem}
- \section{Lipsum}
+ \appendix{Lorem}
+ \appendix{Lipsum}
- \annex
- \section{Lorem}
- \section{Lipsum}
+ \annex{Lorem}
+ \annex{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.
+\endverb
-%\end{document}
+Pode-se alterar a largura dos rótulos das entradas de apêndice/anexo no sumário redefinindo |\appendixlabelwidth|\,/\,|\annexlabelwidth|.
\newpage
-\erase
-\corrprinton
-\printbibliography
-\corrprintoff
-\enderase
+\begcorrprint{Referências}
+ \printbibliography
+\endcorrprint
\newpage
-\let\origsection=\section
-\appendix
+\appendix{Glossário}
-\section{Glossário}
+Você pode criar glossários com o pacote |glossaries|, como em \ref{cd:gloss}.
-%\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
+\legend{code}{Glossário} \src\me
+\label{cd:gloss}
+\begverb
\usepackage{lipsum}
\usepackage{glossaries}
@@ -339,18 +320,19 @@ Você pode criar glossários com o pacote \pkg{glossaries}.
\begin{document}
O \gls{metalism} e o \gls{lip}.
- \corrprinton
+ \begcorrprint{Glossário}
\printnoidxglossary
- \corrprintoff
+ \endcorrprint
\end{document}
-\codeoff
+\endverb
-\section{Lista de siglas}
+\appendix{Lista de siglas}
-O pacote \pkg{glossaries} também serve para criar uma lista de siglas.
+O |glossaries.sty| também serve para criar uma lista de siglas, conforme \ref{cd:acro}.
-\codeon
-\usepackage{lipsum}
+\legend{code}{Siglas} \src\me
+\label{cd:acro}
+\begverb
\usepackage[acronym]{glossaries}
\makenoidxglossaries
@@ -358,92 +340,65 @@ O pacote \pkg{glossaries} também serve para criar uma lista de siglas.
\newacronym{ibge}{IBGE}{Instituto Brasileiro de Geografia e Estatística}
\newacronym{html}{HTML}{Hypertext Markup Language}
+\def\acr#1{\gls{#1}}
+
\begin{document}
- 1ª chamada: \gls{ibge}, \gls{html}.
+ 1ª chamada: \acr{ibge}, \acr{html}.
- 2ª chamada: \gls{ibge}, \gls{html}.
+ 2ª chamada: \acr{ibge}, \acr{html}.
- \corrprinton
+ \begcorrprint{Lista de siglas}
\def\acronymname{Lista de siglas}
\printnoidxglossary[type=acronym]
- \corrprintoff
+ \endcorrprint
\end{document}
-\codeoff
+\endverb
-\section{\emph{Feedback}}
+\appendix{\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
+\appendix{Código-fonte}
-\definecolor{bg}{cmyk}{0,0.06,0,0}
+\definecolor{background}{cmyk}{0,0.08,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\addtoext#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\sec#1\par{\section{#1}}
+\def\verbfont{\raggedright\ttfamily\small\sloppy}
+\def\codesep{2mm}
+\def\leftsep{5mm}
+
+\lstnewenvironment{code}{\lstset{
+ frame=single,
+ framerule=0pt,
+ framesep=\codesep,
+ xleftmargin=\dimexpr\codesep+\leftsep,
+ xrightmargin=\codesep,
+ framexleftmargin=\leftsep,
+ firstnumber=last,
+ numbers=left,
+ numbersep=6pt,
+ numberstyle=\fontsize{8pt}{9pt}\selectfont,
+ basicstyle=\verbfont,
+ commentstyle=\color{blue}\bfseries,
+ comment=[l]{\%},
+ columns=fullflexible,
+ tabsize=3,
+ backgroundcolor=\color{background},
+ literate=
+ {\ }{ }1 {\^^M\%}{}2
+}}{}
+
+{\catcode`\!=14 \catcode`\%=9
+ \input abntexto.cls
}
-\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/circledsteps/circledsteps-manual.pdf b/macros/latex/contrib/circledsteps/circledsteps-manual.pdf
index 83892b759e..a86fc5f9c5 100644
--- a/macros/latex/contrib/circledsteps/circledsteps-manual.pdf
+++ b/macros/latex/contrib/circledsteps/circledsteps-manual.pdf
Binary files differ
diff --git a/macros/latex/contrib/circledsteps/circledsteps-manual.tex b/macros/latex/contrib/circledsteps/circledsteps-manual.tex
index d1599bb95c..1bdd352c91 100644
--- a/macros/latex/contrib/circledsteps/circledsteps-manual.tex
+++ b/macros/latex/contrib/circledsteps/circledsteps-manual.tex
@@ -10,17 +10,26 @@
cute inductors,
}
\usepackage{booktabs}
-\usepackage{hyperref}
-\hypersetup{colorlinks=true, % false: boxed links; true: colored links
- linkcolor=blue, % color of internal links
- urlcolor=blue, % color of external links
-}
\usepackage{showexpl}
+\usepackage{accsupp} % Thanks to Ulrike Fischer https://tex.stackexchange.com/a/57160/38080
+\newcommand{\emptyaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}%
+\lstset{explpreset={pos=l, overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,
+ rframe=single,numbers=left,numberstyle=\tiny,numbersep=.3em, xleftmargin=1em,
+ columns=flexible, language=[LaTeX]TEX,breaklines=true,
+ basicstyle=\small\ttfamily,tabsize=3, width=0.4\linewidth,
+ numberstyle=\tiny\color{gray}\emptyaccsupp}}
+% there must be a better way
\lstset{pos=l, overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,
rframe=single,numbers=left,numberstyle=\tiny,numbersep=.3em, xleftmargin=1em,
columns=flexible, language=[LaTeX]TEX,breaklines=true,
- basicstyle=\small\ttfamily,tabsize=3, width=0.4\linewidth}
+ basicstyle=\small\ttfamily,tabsize=3, width=0.4\linewidth,
+ numberstyle=\tiny\color{gray}\emptyaccsupp}
\usepackage{circledsteps}
+\usepackage{hyperref}
+\hypersetup{colorlinks=true, % false: boxed links; true: colored links
+ linkcolor=blue, % color of internal links
+ urlcolor=blue, % color of external links
+}
\title{The \texttt{circledsteps} package: circled numbers, circled steps and more}
\author{Romano Giannetti <romano.giannetti@gmail.com>}
@@ -40,13 +49,13 @@ The package loads (if not already loaded) the packages \texttt{pict2e}, \texttt{
The manual is for version~\cstepsversion. The main changes between version are listed below.
\begin{description}
- \item[v1.3] Minor fixes to the manual; added a warning in case the patching of \texttt{picture.sty} fails.
+ \item[v1.3.x] Fixes to the manual; added a warning in case the patching of \texttt{pict2e.sty} fails.
\item[v1.2] Added optional argument to the commands and make them sensitive to math mode (thanks to \texttt{@tallmarmot} for the suggestion and example code); fixed several bugs.
Added \texttt{fill color} for the circles background.
\item[v1.1] Default to normal colors; keep the ``red/blue'' theme as optional.
If you use the package option \texttt{redblue} or \texttt{legacy} you will have the same effect than
- \begin{lstlisting}[]
+ \begin{lstlisting}
\pgfkeys{/csteps/inner color=red, /csteps/outer color=blue}
\end{lstlisting}
\item[v1.0] Initial release.
@@ -86,15 +95,24 @@ The usage of the package is better explained with examples.
\begin{LTXexample}
-This is normal text: \Circled{1} is on the baseline, \CircledTop{2} is on top.\par
-This is more evident if you have descendents, like p: \Circled{p} and \CircledTop{p}.\par
-You can set options as optional arguments, like \Circled[inner color=red]{R} or \CircledTop[outer color=green]{g}.\par
-Math mode is detected too: \Circled{A} and $\Circled{A}^{\Circled{A}}$.
+This is normal text: \Circled{1} is on the
+baseline, \CircledTop{2} is on top.
+
+This is more evident if you have descenders,
+like p: \Circled{p} and \CircledTop{p}.
+
+You can set options as optional arguments,
+like \Circled[inner color=red]{R} or
+\CircledTop[outer color=green]{g}.
+
+Math mode is detected too: \Circled{A}
+and $\Circled{A}^{\Circled{A}}$.
\end{LTXexample}
\begin{LTXexample}
-For big horizontal things the circle becomes oval: \Circled{200} or \CircledTop{199}.
+For big horizontal things the circle becomes
+oval: \Circled{200} or \CircledTop{199}.
\end{LTXexample}
@@ -114,16 +132,16 @@ Inside \texttt{tikz} they work ok:
\pgfkeys{/csteps/inner ysep=10pt}
\pgfkeys{/csteps/inner xsep=10pt}
If you like more breathing space:
-\Circled{1} \Circled{2} \Circled{p} \Circled{200} \Circled{199}.
-\par\bigskip
+\Circled{1} \Circled{2} \Circled{p}
+\Circled{200} \Circled{199}.
\end{LTXexample}
\begin{LTXexample}
-\pgfkeys{/csteps/inner color=green}
+\pgfkeys{/csteps/inner color=green!50!black}
\pgfkeys{/csteps/outer color=gray}
If you want to change colors it's easy:
-\Circled{1} \Circled{2} \Circled{p} \Circled{200} \Circled{199}.
-\par\bigskip
+\Circled{1} \Circled{2} \Circled{p}
+\Circled{200} \Circled{199}.
\end{LTXexample}
\begin{LTXexample}
@@ -132,24 +150,34 @@ If you want to change colors it's easy:
\pgfkeys{/csteps/fill color=black}
And you can have filled circles and ovals:
\Circled{\textbf{1}} \Circled{\textbf{199}}.
-\par\bigskip
\end{LTXexample}
\begin{LTXexample}
-You can have inline numbers like \CircledText{1} or
-exponents\textsuperscript{\CircledText{2}} and so on.
-\textcolor{red}{They follow the current color: \CircledText{1} and \CircledText{2} automatically,} as you can see: \CircledText{$1+1\approx3$}. In-text circled numbers look better when a bit smaller, though, as you can see in {\small\CircledText{1}} for example.
+You can have inline numbers like \CircledText{1}
+or exponents\textsuperscript{\CircledText{2}}
+and so on.
+\textcolor{red}{They follow the current color:
+ \CircledText{1} and \CircledText{2}
+automatically,} as you can see here:
+\CircledText{$1+1\approx3$}.
+In-text circled numbers look better when
+they are a bit smaller, though, as you
+can see in {\small\CircledText{1}}
+for example.
\end{LTXexample}
You can have also quite nice math mode effects, thanks to suggestion from \texttt{@tallmarmot}:
\begin{LTXexample}
- \[\Circled[outer color=red]{x}\]
- \[\int\limits_{-1}^1\!\mathrm{d}x\,f_{\ell_1}(x)\]
- \[\Circled[outer color=blue]{\int\limits_{-1}^1}\!
- \Circled[outer color=orange]{\mathrm{d}x}
- f_{\Circled[outer color=red]{\ell}_{\Circled[outer color=cyan]{1}}}(x)\]
+\[\Circled[outer color=red]{x}\]
+\[\int\limits_{-1}^1\!
+ \mathrm{d}x\,f_{\ell_1}(x)\]
+\[\Circled[outer color=blue]{%
+ \int\limits_{-1}^1}\!
+ \Circled[outer color=orange]{\mathrm{d}x}
+f_{\Circled[outer color=red]{\ell}_{%
+ \Circled[outer color=cyan]{1}}}(x)\]
\end{LTXexample}
diff --git a/macros/latex/contrib/circledsteps/circledsteps.sty b/macros/latex/contrib/circledsteps/circledsteps.sty
index a8f769a3b1..20463070da 100644
--- a/macros/latex/contrib/circledsteps/circledsteps.sty
+++ b/macros/latex/contrib/circledsteps/circledsteps.sty
@@ -1,7 +1,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
-\ProvidesPackage{circledsteps}[2020/01/12 v1.3.1 Circled steps that you can reference]
-\def\cstepsversion{v1.3.1}
+\ProvidesPackage{circledsteps}[2023/07/27 v1.3.2 Circled steps that you can reference]
+\def\cstepsversion{v1.3.2}
% \end{macrocode}
%
% Copyright (c) 2019 Romano Giannetti
diff --git a/macros/latex/contrib/mismath/README.md b/macros/latex/contrib/mismath/README.md
index 449b929c51..2cb96b216e 100644
--- a/macros/latex/contrib/mismath/README.md
+++ b/macros/latex/contrib/mismath/README.md
@@ -5,12 +5,12 @@
The package provides some mathematical macros to typeset:
- mathematical constants e, i, pi in upright shape (automatically) as recommended by ISO 80000-2,
-- vectors with beautiful arrow and adjusted norm,
+- vectors with beautiful arrows and adjusted norm,
- tensors,
- some standard operator names,
-- improved spacings in mathematical formulas,
+- enhancing spacings in mathematical formulas,
- systems of equations and small matrices,
-- displaymath in double columns for long calculations.
+- displaymath in double columns for lengthy calculations.
## Installation
diff --git a/macros/latex/contrib/mismath/mismath.dtx b/macros/latex/contrib/mismath/mismath.dtx
index f8224c848f..108f3e1b75 100644
--- a/macros/latex/contrib/mismath/mismath.dtx
+++ b/macros/latex/contrib/mismath/mismath.dtx
@@ -20,7 +20,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{mismath}
- [2023/03/05 v2.7 .dtx mismath file]
+ [2023/07/27 v2.8 .dtx mismath file]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -69,7 +69,7 @@
%</driver>
% \fi
%
-% \CheckSum{618}
+% \CheckSum{624}
%
% \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
@@ -193,13 +193,17 @@
% - special (not generic) warning when loading babel with russian
% (\C will not be defined in that case)}
%
+% \changes{v2.8}{2023/07/26}{
+% - Some small changes in the documentation
+% - New macro `onlymathC' designed for using '\C' when Russian language is loaded}
+%
% \GetFileInfo{mismath.sty}
%
% \title{\textsf{mismath}\\ Miscellaneous mathematical macros\thanks{This document
% corresponds to \textsf{mismath}~\fileversion, dated \filedate.
% Thanks to François Bastouil for help in English translation.}}
% \author{Antoine Missier \\ \texttt{antoine.missier@ac-toulouse.fr}}
-% \date{March 5, 2023}
+% \date{July 27, 2023}
%
% \maketitle
% \tableofcontents
@@ -210,67 +214,68 @@
% superseded by ISO~80000-2:2009, mathematical constants $\e$, $\i$, $\pi$
% should be typeset in roman (upright shape) and not in italic (sloping shape) like
% variables (see~\cite{TYPMA}~\cite{NIST}~\cite{SI}~\cite{ICTNS}).
-% This package provides some tools to achieve this (automatically).
+% This package provides some tools to achieve this automatically.
%
% \medskip
-% Even if it is recommended to typeset vectors names
+% Even though it is recommended to typeset vectors names
% in bold italic style~\cite{NIST}~\cite{ICTNS},
% they are often represented with arrows
-% (particularly in school documents or in physics).
-% To draw pretty arrows above vectors, we use the \textsf{esvect} package
-% by Eddie Saudrais~\cite{VECT}
-% and we provide a few more macros related to vectors with arrows,
-% in particular to improve the typesetting of the norm: $\norm{\vect{AB}}$
+% (especially in school documents or in physics).
+% To draw visually appealing arrows above vectors, we use the \textsf{esvect} package
+% by Eddie Saudrais~\cite{VECT}.
+% Additionally we provide a few more macros related to vectors with arrows,
+% particularly to enhance the typesetting of the norm: $\norm{\vect{AB}}$
% instead of \LaTeX\ version $\lVert\vect{AB}\rVert$ which is not vertically adjusted,
-% or worse $\left\Vert \vect{AB} \right\Vert$ (and even ugly with Latin Modern font family).
+% or worse $\left\Vert \vect{AB} \right\Vert$.
%
% \smallskip
-% The package also provides other macros for:
+% The package also offers other macros for:
% \begin{itemize}
% \item tensors,
-% \item some standard operator names,
+% \item some common operator names,
% \item a few useful aliases,
-% \item improving some spacing in mathematical formulas,
+% \item enhancing spacing in mathematical formulas,
% \item systems of equations and small matrices,
-% \item displaymath in double columns for long calculation.
+% \item displaymath in double columns for lengthy calculations.
% \end{itemize}
%
-% To avoid incompatibility,
-% most of our macros will be defined only
-% if there is not another command with the same name in the packages loaded
+% To avoid compatibility issues,
+% most of our macros will only be defined
+% if there isn't already a command with the same name in the packages loaded
% before \textsf{mismath}. If a macro is already defined,
-% a warning message will be produced and the \textsf{mismath} definition
-% will simply be ignored. To keep the \textsf{mismath} command or the other one, use
-% |\let\|\meta{command}|\relax|, before loading \textsf{mismath}, or after.
-% If the other one is defined with |\AtBeginDocument|, do the same for
+% a warning message will be displayed and the \textsf{mismath} definition
+% will be ignored. If you wish to keep the existing command or the \textsf{mismath} command,
+% you can use |\let\|\meta{command}|\relax|, before loading \textsf{mismath}, or after.
+% If the other command is defined with |\AtBeginDocument|, you should do the same for
% |\let\|\meta{command}|\relax| and for loading mismath.
%
% \medskip
% \DescribeEnv{\oarg{options}}
-% The \textsf{amsmath} package is loaded by \textsf{mismath} without option.
-% For using \textsf{amsmath} with options (see~\cite{AMS}),
-% these options can be added when calling \textsf{mismath}, or
-% \textsf{amsmath} can be loaded
-% with the required options before \textsf{mismath}.
+% The \textsf{mismath} package loads the \textsf{amsmath} package without any options.
+% If you want to use \textsf{amsmath} with specific options (refer to~\cite{AMS}),
+% you can include these options when calling \textsf{mismath}, or
+% you can load \textsf{amsmath}
+% with the desired options before loading \textsf{mismath}.
%
% \medskip
-% \textsf{mismath} loads also the package
-% \textsf{mathtools} by Morten Høgholm and Lars Madsen~\cite{TOOL}.
-% It provides many useful macros and improvements of \textsf{amsmath} package.
+% In addition \textsf{mismath} loads the \textsf{mathtools} package
+% by Morten Høgholm and Lars Madsen~\cite{TOOL}.
+% This package offers numerous helpful macros and improvements of the \textsf{amsmath} package.
%
% \medskip
-% A recommendation, seldom observed, is to typeset uppercase Greek letters in italic shape
-% like other variables~\cite{ICTNS}. This is automatically done with the packages
-% \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
+% A recommendation, although rarely followed, is to typeset uppercase
+% Greek letters in italic shape,
+% similar to other variables~\cite{ICTNS}. This can be automatically achieved with packages
+% such as \textsf{fixmath} by Walter Schmidt~\cite{FIXM},
% \textsf{isomath} by Günter Milde~\cite{ISOM}
% or \textsf{pm-isomath} by Claudio Beccari~\cite{PMISO} and optionally with many others
-% (for instance \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}),
-% but this feature is not implemented here because this rule is conflicting
-% to the one used in France where all mathematics capitals
-% have to be typeset in upright shape
-% \footnote{The \textsf{frenchmath} package~\cite{FR}
-% takes this rule into account.}.
-% The choice of loading or not one of these packages remains thus to the user.
+% (such as \textsf{mathpazo} or \textsf{mathptmx} with the option \texttt{slantedGreek}).
+% However this feature is not implemented here due to a conflicting rule in France,
+% where all capital letters in mathematics
+% are required to be typeset in upright shape
+% \footnote{By using the \textsf{frenchmath} package~\cite{FR},
+% you can ensure that the recommended french rule is followed in your document.}.
+% The decision to load any of these packages is left to the user's discretion.
%
% \section{Usage}
%
@@ -278,154 +283,165 @@
%
% \DescribeMacro{\mathup}
% As for classic functions identifiers, \emph{predefined} mathematical constants
-% should be typeset in upright shape (generally in roman family),
-% even if this practice is not really common and tedious
-% to respect. First we provide the |\mathup| macro, which is better than |\mathrm|
-% \footnote{\texttt{\bslash mathup}
-% is based on \texttt{\bslash operatorfont}
-% (from \textsf{amsopn} package, automatically loaded by \textsf{amsmath}).
-% The \textsf{beamer}
-% package uses a default sans serif math font, but \texttt{\bslash mathrm}
-% produces a font with serif in \textsf{beamer}. Therefore
-% using \texttt{\bslash mathup} is better than \texttt{\bslash mathrm}.},
-% to set any math text in upright shape, so on can write
+% should be typeset in upright shape (typically in roman family),
+% even though this practice is not very common and can be tedious
+% to adhere to. A first solution is to use the |\mathup| macro,
+% which is superior to |\mathrm|
+% \footnote{The \texttt{\bslash mathup} macro is based on \texttt{\bslash operatorfont},
+% which comes from the
+% \textsf{amsopn} package, automatically loaded by \textsf{amsmath}.
+% In \textsf{beamer}, the default math font is sans serif,
+% but \texttt{\bslash mathrm} produces a font with serifs, which might not match the
+% overall style of the presentation. Hence, using \texttt{\bslash mathup} is indeed
+% a better choice in \textsf{beamer} presentations to ensure that mathematical
+% constants are typeset in upright shape and consistent
+% with the default sans serif math font.},
+% for setting any math text in upright shape. For example you can use
% |\mathup{e}| to get the Euler's number.
%
% \medskip
% \DescribeMacro{\e} \DescribeMacro{\i} \DescribeMacro{\j}
-% To avoid to stuff a document that contains many $\e$ or $\i$ constants
-% with |\mathup{e}| or |\mathup{i}|,
-% the package provides |\e| command for Euler's number
-% and |\i| or |\j| for imaginary numbers.
-% Let's notice that |\i| and |\j| already exist in \LaTeX:
-% using in LR mode, they produce `\extrafont{\i,\ \j}' without the point,
-% so you can place accents on them, and in mathematical mode they produce
-% ``\texttt{LaTeX Warning: Command \bslash i invalid in math mode on input line} \meta{line}''.
-% The new definition of |\i| and |\j| concerns only the mathematical mode.
+% To avoid cluttering a document that contains many occurrences of Euler's number (e)
+% or imaginary numbers (i) with |\mathup{e}| or |\mathup{i}|,
+% the package provides the |\e| command for Euler’s number
+% and |\i| or |\j| for imaginary numbers.
+% Let us notice that |\i| and |\j| already exist in LaTeX. In LR (left-to-right) mode,
+% they produce `\extrafont{\i,\ \j}' without the dot, allowing you to place accents on them.
+% However, in mathematical mode, they produce the warning
+% ``\texttt{LaTeX Warning: Command \bslash i invalid in math mode on input line}
+% \meta{line}''.
+% With the new definition provided by the package, |\i| and |\j| will be redefined
+% specifically for mathematical mode.
%
% \medskip
% \DescribeMacro{\MathUp}
-% Nevertheless, it can be tiresome to type a lot of backslashes
-% for these constants, in a document
-% with many formulas containing $\e$, $\i$ or $\j$.
-% So a way is proposed here to free of it with the macro
-% |\MathUp|\marg{char}.
-% For instance when |\MathUp{e}| is called,
-% any future occurrence of $\e$ will then automatically be set in roman,
-% without the need to type |\e|.
-% The effect is global or local if used inside an environment or braces.
-% This macro can also be called in the preamble for applying
-% from the beginning of the document.
-% Thanks to this powerful macro, you can bring a document up to the standards afterwards.
-% In fact |\MathUp| can apply to any valid but single character (we will see another
-% use of it with probability in section \ref{operators}).
+% Indeed, typing a lot of backslashes for constants like $\e$, $\i$, or $\j$
+% in a document with numerous formulas can become tiresome.
+% To alleviate this, the package proposes a powerful solution with the macro |\MathUp|\marg{char}.
+% For example, when |\MathUp{e}| is called, any subsequent occurrence of $\e$
+% will automatically be set in roman (upright shape),
+% without the need to type |\e| explicitly. The effect of this macro
+% can be either global or local, depending on whether it is used outside or inside an
+% environment or braces.
+% Furthermore, you can call this macro in the preamble to apply the change
+% from the beginning of the document. This powerful feature allows you
+% to bring a document up to the standards effortlessly.
+% In fact, |\MathUp| can be applied to any valid single character,
+% offering flexibility for various use cases (another use of it with probability
+% will be presented in section \ref{operators}).
%
% \medskip
% \DescribeMacro{\MathIt}
-% When there are other $\mathit{e}$, $\mathit{i}$ or $j$ as variables,
-% you can still get italicized
-% $\mathit{e}$, $\mathit{i}$ or $\mathit{j}$ with \LaTeX\ commands
-% |\mathit| or |\mathnormal|, useful for a single use.
-% But you can also use the inverse switch |\MathIt|\marg{char},
-% with a global effect, or a local one if used inside an environment or braces.
-% As |\MathUp|, it can be used for any single character.
+% When there are other occurrences of $\mathit{e}$, $\mathit{i}$ or $j$ as variables,
+% you can still obtain italicized $\mathit{e}$, $\mathit{i}$ or $\mathit{j}$ using \LaTeX\
+% commands |\mathit| or |\mathnormal|, which are useful for a single use.
+% However, you also have the option to use the inverse switch |\MathIt|\marg{char},
+% which has a global effect when used outside environments or braces,
+% or a local effect when used inside them.
+% Similar to |\MathUp|, |\MathIt| can be applied to any single character.
%
% \medskip
% \DescribeMacro{\MathNumbers} \DescribeMacro{\MathNormal}
-% These macros allow to set upright or normal typesetting for several letters
-% in a single command, \eg
-% |\MathNumbers{e,i}| is equivalent to |\MathUp{e}\MathUp{i}|.
-% In |\MathNumbers| the comma separator can be changed or deleted.
-% This macro has no effect on other letters than e, i or j.
-% On the other hand |\MathNormal| can be used for probability also
-% (see section \ref{operators})
-% and can take any comma separated list argument.
+% These macros enable you to set upright or normal (italic) typesetting
+% for multiple letters in a single command.
+% For instance, |\MathNumbers{e,i}| is equivalent to |\MathUp{e}\MathUp{i}|.
+% In |\MathNumbers|, the comma separator between letters can be modified
+% or removed as needed. In fact, this macro only affects the letters e, i, or j;
+% it has no effect on other characters.
+% On the other hand, |\MathNormal| can be utilized for probability as well
+% (refer to section \ref{operators}), and it accepts any comma-separated list of arguments.
+% This means you can apply the normal italic math mode typesetting to various letters
+% at once using |\MathNormal|.
%
% \medskip
% \DescribeMacro{\pinumber[\meta{command}]}
% The mathematical constant $\pi$ should also be typeset in upright shape
-% (see~\cite{TYPMA}, \cite{NIST}, \cite{ICTNS}), which differs from italicized $\itpi$.
-% This recommendation is even less observed than the one concerning
-% $\e$ and $\i$~\cite{TYPMA}.
-% Several packages allow to typeset mathematical Greek letters in upright shape,
-% let us mention \textsf{upgreek}~\cite{GREEK}, \textsf{mathdesign}~\cite{DESIGN}
-% (used here), \textsf{kpfonts}~\cite{KPF}, \textsf{fourier}~\cite{FOUR},
+% (see~\cite{TYPMA}, \cite{NIST}, \cite{ICTNS}), which is different from italicized $\itpi$.
+% However, this recommendation is even less commonly followed compared to the one
+% concerning $\e$ and $\i$~\cite{TYPMA}.
+% Several packages enable the typesetting of mathematical Greek letters in upright shape.
+% Notably, let us mention \textsf{upgreek}~\cite{GREEK}, \textsf{mathdesign}~\cite{DESIGN}
+% (used in the present document), \mbox{\textsf{kpfonts}}~\cite{KPF}, \textsf{fourier}~\cite{FOUR},
% \textsf{libertinust1math},
% \textsf{pxgreeks}, \textsf{txgreeks}, \textsf{libgreek}, etc.
-% A special mention for \textsf{lgrmath} of Jean-François Burnol~\cite{LGR}
-% which allow to use, in math mode, any Greek LGR-encoded font.
+% A special mention goes to \textsf{lgrmath} of Jean-François Burnol~\cite{LGR}
+% which allows the use of any Greek LGR-encoded font in math mode.
% These packages provide commands like |\uppi| (\textsf{upgreek}),
% |\piup| (\textsf{mathdesign}, \textsf{kpfonts}, \textsf{lgrmath}),
% |\otherpi| (\textsf{fourier}), etc.
% \footnote{They also have options to typeset all the Greek lowercase
% letters in upright shape by default, but this in not our goal here.}
-% To preserve default sloped lowercase Greek letters except for pi, and to
-% avoid typing a lot of |\uppi| or |\piup|, we provide the
+% To preserve default italic style for lowercase Greek letters,
+% with the exception of pi, and to
+% avoid the need to type a lot of |\uppi| or |\piup|, we offer the
% macro |\pinumber|[\meta{command}].
-% It redefines |\pi| to match
-% the optional command name given (without backslash), for instance |piup|,
-% assuming the appropriate package has been loaded before.
+% This macro redefines |\pi| to match
+% the optional command name provided (without a backslash), such as |piup|,
+% assuming that the appropriate package has been loaded beforehand.
%
-% By calling preliminary |\MathNumbers{ei}\pinumber[piup]|
-% (and with the \textsf{mathdesign} package loaded)
-% you can get for instance:
+% By using the preliminary code |\MathNumbers{ei}\pinumber[piup]|
+% (assuming the \textsf{mathdesign} package is loaded)
+% you can achieve the following result:
% \begin{center}
-% |$e^{i\pi} = -1$| \quad yields \quad $\e^{i\pi}=-1$.
+% |$e^{i\pi} = -1$| \quad which yields \quad $\e^{i\pi}=-1$.
% \end{center}
%
-% When calling |\pinumber| without argument
-% it defines |\pi| with the default LGR font encoding of Greek letters
-% to produce $\mypi$. In that case the appropriate option \texttt{LGR}
-% for the \textsf{fontenc} package will be automatically loaded,
-% provided that the command is called in the preamble (first).
-% The pi character will look the same as the one supplied with
+% When you call |\pinumber| without any argument,
+% it defines |\pi| using the default LGR font encoding for Greek letters,
+% resulting in the character $\mypi$. In this case the appropriate option \texttt{LGR}
+% for the \textsf{fontenc} package will be automatically loaded
+% if the |\pinumber| command is called in the preamble (at least the first time it is used).
+% The pi character obtained with this setting will look the same as the one provided by
% Günter Milde's \textsf{textalpha} package~\cite{ALPHA}.
-% This $\mypi$ is particularly suitable
+% This $\mypi$ character is particularly well-suited
% for use with the default Computer Modern or Latin Modern font family
-% \footnote{This default $\mypi$ doesn't fit well with many text fonts,
-% more bold than Computer Modern;
-% the \textsf{upgreek} package~\cite{GREEK} provides often a better $\uppi$
-% (with the \texttt{Symbol} option using Adobe Symbol font)
-% that fits well with several text fonts, for instance Times.}.
+% \footnote{This default $\mypi$ character may not always fit well with various text fonts,
+% especially those that are bolder or different from the default Computer Modern font.
+% The \textsf{upgreek} package~\cite{GREEK} provides a better $\uppi$ character
+% with the Symbol option, utilizing the Adobe Symbol font. This $\uppi$ character
+% matches well with several text fonts, such as Times.}.
%
% \medskip
% \DescribeMacro{\itpi}
-% When activating |\pinumber|, the original italic $\itpi$
-% is still available with |\itpi|.
+% When you activate |\pinumber|, the original italic $\itpi$
+% is still accessible using |\itpi|.
%
% \DescribeMacro{\pinormal}
-% In fact |\pinumber| acts as a switch and there is also an inverse switch,
-% |\pinormal|, that can be called anywhere.
+% In fact |\pinumber| acts as a switch, enabling the upright $\pi$.
+% Additionally, there is an inverse switch,
+% |\pinormal|, which you can call anywhere to revert to the original behavior
+% of the |\pi| command (italic $\itpi$).
%
% \subsection{Vectors (and tensors)}
%
% \DescribeMacro{\vect}
% By default, the |\vect| command
-% \footnote{As for many macros of this package,
-% the definition will take effect only if this macro is not defined before
-% by another package.},
+% \footnote{The definition of most macros in this package,
+% will only take effect if the macro has not been previously
+% defined by another package. This ensures compatibility and avoids conflicts
+% when using the \textsf{mismath} package with other \LaTeX\ packages.},
% produces vectors with arrows
-% (thanks to the \textsf{esvect} package of Eddie Saudrais
+% (thanks to the \textsf{esvect} package by Eddie Saudrais
% \footnote{\textsf{esvect} provides the \texttt{\bslash vv} macro
% used by \texttt{\bslash vect}.})
% which are more elegant than those produced by \LaTeX's |\overrightarrow| command.
% The \textsf{esvect} package has an optional argument
-% (one letter between \texttt{a} and \texttt{h}) defining
-% the required type of arrow (see~\cite{VECT}).
+% (a single letter between \texttt{a} and \texttt{h}) to define
+% the desired type of arrow (see~\cite{VECT}).
% In \textsf{mismath}, \textsf{esvect} is loaded with the option \texttt{b}:
% |\vect{AB}| gives $\vect{AB}$.
-% To choose another type of arrow, \textsf{esvect} must be called
-% with the required option \emph{before} \textsf{mismath},
-% \eg |\usepackage[d]{esvect}|
-% will give the arrows produced by default in~\cite{VECT}.
+% If you wish to use a different type of arrow, you must call \textsf{esvect}
+% with the appropriate option \emph{before} loading \textsf{mismath}.
+% For example, using |\usepackage[d]{esvect}|
+% will provide the arrows produced by default in~\cite{VECT}.
%
% \medskip
% \DescribeMacro{\boldvect}
-% The |\vect| macro allow to typeset vector's names using bold italic
-% (according to ISO recommendation~\cite{NIST}~\cite{SI}) rather than arrows.
-% For this, calling |\boldvect| will modify the behavior of |\vect|,
-% globally or locally, depending on where |\boldvect|
-% is placed:\\[1ex]
+% The |\vect| macro allows vector names to be typeset using bold italic font,
+% as recommended by ISO~\cite{NIST}~\cite{SI}, instead of using arrows.
+% By using the |\boldvect| command, you can modify the behavior of |\vect|
+% locally or globally, depending on its placement in the document (inside or outside
+% a group or an environment):\\[1ex]
% \begin{minipage}{8cm}
% \begin{verbatim}
%\[ \boldvect \vect{v}
@@ -438,44 +454,49 @@
%
% \DescribeMacro{\boldvectcommand}
% By default |\boldvect| uses the |\boldsymbol| command
-% \footnote{\texttt{\bslash mathbf} gives upright bold font,
-% even if used in combination with \texttt{\bslash mathit}.}
-% from \textsf{amsbsy} package, loaded by \textsf{amsmath}.
-% But other packages producing bold italic can be preferred, \eg
-% |\mathbold| from \textsf{fixmath}
-% package or |\mathbfit| from \textsf{isomath}
-% or \texttt{\bslash bm} from \textsf{bm} package.
-% For that, redefine |\boldvectcommand|, for instance, after loading \textsf{fixmath}:
+% \footnote{\texttt{\bslash mathbf} produces upright bold font,
+% even when used in combination with \texttt{\bslash mathit}.}
+% from the \textsf{amsbsy} package, which is automatically loaded by \textsf{amsmath}.
+% However, you may prefer other packages that produce bold italic fonts,
+% such as \textsf{fixmath} with the |\mathbold| command,
+% \textsf{isomath} with |\mathbfit|
+% or \textsf{bm} with the \texttt{\bslash bm} command.
+% To use an alternative command, redefine |\boldvectcommand|,
+% for instance after loading \textsf{fixmath}:
% \begin{center} |\renewcommand\boldvectcommand{\mathbold}|. \end{center}
%
-% According to ISO rules, symbols for matrices are also in bold italic,
-% so you can use the same |\boldvectcommand| or create another alias.
+% According to ISO rules, symbols for matrices are also in bold italic.
+% Therefore you can use the same |\boldvectcommand| or create another alias.
%
% \medskip
% \DescribeMacro{\arrowvect}
-% At any moment, you can get back to the default behavior with the inverse switch
+% At any moment, you can revert to the default behavior using the inverse switch
% |\arrowvect|.
-% These switches can be placed anywhere:
-% inside mathematical mode or inside an environment (with local effect) or outside
-% (with global effect).
+% These switches can be placed anywhere, whether
+% inside mathematical mode or within an environment (with a local effect) or outside
+% (with a global effect).
%
% \medskip
% \DescribeMacro{\hvect}
% When vectors with arrows are typeset side by side,
-% arrows can be set up a bit higher (with a vertical phantom box containing $t$)
-% to avoid inelegant effects:
+% the arrows can be set up slightly higher using |\hvect|
+% (which places a vertical phantom box containing ``$t$'')
+% to avoid inelegant effects. For example, writing
% \begin{itemize}
% \item $\vect{AB}=\hvect{u}+ \vect{AC}$, obtained with |\hvect{u}|,
% is better than $\vect{AB}=\vect{u}+ \vect{AC}$;
% \item $\hvect{a} \cdot \vect{b}=0$, obtained with |\hvect{a}|,
% is better thant $\vect{a} \cdot \vect{b}=0$.
% \end{itemize}
-% The |\boldvect| and |\arrowvect| switches have the same effect on |\hvect| than on |\vect|,
-% and so have \texttt{boldvect} and \texttt{arrowvect} options.
+% This adjustment ensures a more visually pleasing appearance when vectors
+% with arrows are combined in an equation.
+% The |\boldvect| and |\arrowvect| switches have the same effect on |\hvect|
+% as they do on |\vect|.
%
% \DescribeMacro{\hvec}
% In a similar way, |\hvec| raises the little arrow produced by
-% the \LaTeX\ command |\vec| (from height of $t$ letter):
+% the \LaTeX\ command |\vec|, to the height of the letter ``$t$''
+% (but |\boldvect| have no effect here):
% \begin{itemize}
% \item $\mathcal{P}=\vec{f}\cdot\hvec{v}$, obtained with |\hvec{v}|,
% is better than $\mathcal{P}=\vec{f}\cdot\vec{v}$.
@@ -484,36 +505,39 @@
% \end{itemize}
%
% \DescribeMacro{\norm}
-% The norm of a vector is classically produced by the delimiters |\lVert| and |\rVert|
-% (rather than \texttt{\bslash}$\mid$) or |\left\Vert| and |\right\Vert|
-% for delimiters adapting to the content. Unfortunately, these delimiters
+% The norm of a vector is conventionally represented using the delimiters |\lVert| and |\rVert|
+% (or \texttt{\bslash}$\mid$ unless a plus (+) or minus (-) sign follows the opening delimiter)
+% or |\left\Vert| and |\right\Vert|
+% for adaptive delimiters. Unfortunately, these delimiters
% are always vertically centered, relatively to the middle of the base line,
% whereas vectors with arrows are asymmetric objects.
% The code |$\norm{\vec{h}}$| raises a smaller double bar to produce $\norm{\vec{h}}$
% instead of $\left\Vert \vec{h} \right\Vert$.
% Let's notice that the height of the bars don't adjust to content,
% but however to context: main text, subscripts or exponents,
-% \eg $\e^{\norm{\vec{h}}}$.
+% \eg $\e^{\norm{\vec{h}}}$.
+% This macro is useful only for arguments of special height, such as $\vec{h}$ or $\vect{AB}$
+% and may give bad results in other situations.
%
% \medskip
% \DescribeMacro{\mathbfsfit}\DescribeMacro{\tensor}
-% For tensors symbols, ISO rules recommend to use
+% For tensors symbols, ISO rules recommend using
% sans serif bold italic, but there
-% is no such math alphabet in \TeX\ default mathematical style.
-% \textsf{mismath} defines this alphabet
-% (assuming the font encoding and package you use permits it),
+% is no such math alphabet in the default \TeX\ mathematical style.
+% However, the \textsf{mismath} package defines this alphabet
+% (assuming the font encoding and package you use permits it)
% and provides the macro |\mathbfsfit| or its alias |\tensor|.
-% So |\tensor{T}| produces $\tensor{T}$.
+% By using |\tensor{T}| you can produce $\tensor{T}$.
%
% \subsection{Standard operator names}\label{operators}
%
% \DescribeMacro{\di}
-% The \emph{differential} operator should be typeset in upright shape and not in
-% italic, to make it different from variables
+% The \emph{differential} operator should be typeset in upright shape, not in
+% italics, to distinguish it from variables
% (as mentioned in \cite{TYPMA}~\cite{NIST}~\cite{ICTNS}~\cite{LSHORT}).
-% For this, we provide the |\di| command.
-% See the following examples (notice the thin spaces before the d,
-% as for classic function's names): \\
+% To achieve this, we provide the |\di| command.
+% Take a look at the following examples (notice the thin spaces before the d,
+% just like with classic function's names): \\
% \begin{minipage}[t]{7cm}
% \begin{verbatim}
%\[ \iint xy\di x\di y \]
@@ -533,15 +557,15 @@
% \[m\frac{\di^2x}{\di t^2}+h\frac{\di x}{\di t}+kx=0\]
% \end{minipage}
%
-% This command can also stand for \emph{distance} (hence its name):
-% \[\lambda\di(A,\mathcal{F})+\mu\di(B,\mathcal{H}).\]
+% This command can also represent \emph{distance} (hence its name):
+% \[\lambda\di(A, \mathcal{F})+\mu\di(B, \mathcal{H}).\]
%
% \DescribeMacro{\P} \DescribeMacro{\E}
% To refer to probability
% \footnote{\LaTeX\ provides also \texttt{\bslash Pr} which gives $\Pr$.}
-% and expectation the proper use is to typeset capital letters $\P$, $\E$
-% in roman as for any standard function identifier.
-% This is obtained with |\P| and |\E|.
+% and expectation the proper use is to typeset the capital letters $\P$, $\E$
+% in roman just like any standard function identifier.
+% This can be achieved with |\P| and |\E| commands.
%
% \DescribeMacro{\Par}
% The |\P| command already existed to refer to the end of paragraph symbol \Par\
@@ -550,29 +574,29 @@
% \medskip
% \DescribeMacro{\V}
% Variance is generally denoted by $\var$ or $\Var$ (see table below),
-% but some authors prefer to use $\V$, produced by |\V|.
+% but some authors prefer to use $\V$, which can be produced using |\V|.
%
% \DescribeMacro{\MathProba}\DescribeMacro{\MathNormal}
% In the same way as for $\e$, $\i$ or $\j$, you can use |\MathUp{P}|, |\MathUp{E}|
% or |\MathUp{V}| to avoid typing many |\P|, |\E| or |\V|.
-% But you can also do that in a single command with |\MathProba|,
-% for example |\MathProba{P,E}| and we get the inverse switch with
+% However you can also achieve this in a single command with |\MathProba|,
+% for example |\MathProba{P,E}|. We get the inverse switch with
% |\MathIt| for any individual letter or |\MathNormal| for a list.
%
% \medskip
% \DescribeMacro{\probastyle}
-% Some authors use ``blackboard bold'' font
-% to represent probability, expectation and variance: $\mathbb{P}, \mathbb{E}, \mathbb{V}$.
-% The |\probastyle| macro sets the appearance of |\P|, |\E| and |\V|:
-% for instance |\renewcommand\probastyle{\mathbb}|
-% \footnote{As for \texttt{\bslash boldvect} and \texttt{\bslash arrowvect},
-% effect is local to the container environment.}
+% Some authors use ``blackboard bold'' font to represent probability, expectation
+% and variance: $\mathbb{P}, \mathbb{E}, \mathbb{V}$.
+% The |\probastyle| macro sets the appearance of |\P|, |\E| and |\V|.
+% For instance |\renewcommand\probastyle{\mathbb}|
+% \footnote{The effect of this redefinition is global or local to the container environment
+% in which it is used.}
% brings the previous ``openwork'' letters.
-% |\mathbb| comes from \textsf{amsfonts} package
-% (loaded by \textsf{amssymb}
-% but also available standalone)
-% which has to be called in the preamble.
+% The |\mathbb| command comes from \textsf{amsfonts} package
+% (loaded by \textsf{amssymb} but also available standalone)
+% which needs to be called in the preamble.
%
+% \medskip
% The following standard operator names are defined in \textsf{mismath}:
% \begin{center}
% \begin{tabular}{rlrlrl}
@@ -594,27 +618,29 @@
% $\boldvect \grad, \curl, \rot$.
% For the variance, the covariance and the identity function,
% two notations are proposed, with or without a first capital letter,
-% because they are both very common.
+% because both are very common.
% On the other hand, `$\im$' stands for the image of a linear transformation
% (like `$\ker$' for the kernel)
% whereas `$\Im$' is the imaginary part of a complex number.
-% Notice that |\div| already exist ($\div$) and |\span| is a \TeX\ primitive
+% Please note that |\div| already exists ($\div$) and |\span| is a \TeX\ primitive
% (used in |\multicolumn|);
-% they haven't been redefined, therefore the macros |\divg| (divergence)
-% and |\spa| (span of a set of vectors) ;
-% |\Z| is used for the set of integers (see \ref{aliases}), therefore we used |\Zu|,
+% they haven't been redefined. Therefore the provided macros are called |\divg| (divergence)
+% and |\spa| (span of a set of vectors).
+% Furthermore |\Z| is used to denote the set of integers (see \ref{aliases}),
+% which is why we used |\Zu|,
% to designate the center of a group: $\Zu(G)$ (from German Zentrum).
%
%\medskip
% \DescribeMacro{\oldRe} \DescribeMacro{\oldIm}
-% The |\Re| and |\Im| macros already existed, to refer to real and imaginary part
+% The |\Re| and |\Im| macros already existed to refer to real and imaginary part
% of a complex number, producing outdated symbols $\oldRe$ and $\oldIm$.
-% They have been redefined according to actual use, as mentioned in the above table,
-% but it's still possible to get the old symbols with |\oldRe| and |\oldIm|.
+% However, they have been redefined according to current usage,
+% as mentioned in the above table. Nevertheless,
+% it is still possible to obtain the old symbols with |\oldRe| and |\oldIm|.
%
% \medskip
-% Some (inverse) circular or hyperbolic functions, missing
-% in \LaTeX, are also provided by \textsf{mismath}:
+% The package \textsf{mismath} also provides some (inverse) circular or hyperbolic functions,
+% that are missing in \LaTeX:
% \begin{center}
% \begin{tabular}{rlrlrl}
% |\arccot| & $\arccot$\qquad\mbox{} & |\arsinh| & $\arsinh$\qquad\mbox{}
@@ -635,62 +661,70 @@
% that classic sets of numbers are typeset in bold roman:
% $\R, \C, \Z, \N, \Q$,
% whereas ``openwork'' letters ($\mathbb{R}, \mathbb{Z}, \ldots$)
-% are reserved for writing at blackboard~\cite{LSHORT};
-% and likewise to designate a field: $\F$ or $\K$ (Körper in German).
-% We get these symbols with the macros
-% \footnote{The \texttt{\bslash C} macro is incompatible with \texttt{russian} option
-% of \textsf{babel}; it will not be redefined in that case.}:
+% are reserved for writing at the blackboard~\cite{LSHORT}.
+% Similarly, to designate a field we use $\F$ or $\K$ (Körper in German).
+% We get obtain these symbols with the following macros:
% \begin{center}
% |\R|, |\C|, |\Z|, |\N|, |\Q|, |\F|, |\K|.
% \end{center}
%
% \DescribeMacro{\mathset}
-% The |\mathset| command enables to change the behavior of all these macros in a global way:
-% by default, |\mathset| is an alias for |\mathbf|, but if you prefer openwork letters,
-% just place |\renewcommand\mathset{\mathbb}| where you want, for instance in the preamble,
-% after loading \textsf{amsfonts} package (which provides the ``blackboard bold'' typeface,
+% The |\mathset| command enables you to change the behavior
+% of all these macros in a global way.
+% By default, |\mathset| is an alias for |\mathbf|, but if you prefer openwork letters,
+% you can simply place |\renewcommand\mathset{\mathbb}| where you want,
+% for instance in the preamble after loading the \textsf{amsfonts} package
+% (which provides the ``blackboard bold'' typeface,
% also loaded by \textsf{amssymb}).
%
+% \smallskip
+% \DescribeMacro{\onlymathC}
+% The macro |\onlymathC| is designed for cases when |\C| is already defined,
+% but only in text mode (usually when loading the Russian language with \textsf{babel}
+% or \textsf{polyglossia}). The macro preserves the original definition for text mode
+% and allows you to use |\C| for the complex number set in math mode.
+% For this purpose, simply call |\onlymathC| once in the preamble or anywhere in the document.
+%
% \medskip
% \DescribeMacro{\ds}
-% The |\displaystyle| command being very common, the |\ds| alias is provided.
-% Not only it eases typing but also it makes source code more readable.
+% The |\displaystyle| command is very common, so the |\ds| alias is provided.
+% Not only it eases typing but also it makes source code more readable.
%
% \medskip
% Symbols with limits behave differently for in-line formulas or for displayed equations.
-% In the latter case, ``limits'' are put under or above whereas for in-line math mode,
-% they are placed on the right, as subscript or exponent. Compare:
+% In the latter case, ``limits'' are placed under or above the symbol
+% whereas for in-line math mode,
+% they are placed on the right, as a subscript or exponent. Compare:
% $\zeta(s)=\sum_{n=1}^{\infty }\frac{1}{n^s}$ with
% \[\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}.\]
%
% \DescribeMacro{\dlim} \DescribeMacro{\dsum} \DescribeMacro{\dprod}
% \DescribeMacro{\dcup} \DescribeMacro{\dcap}
% With in-line math mode, displaymath behavior can be forced with |\displaystyle|
-% or its alias |\ds|, but then, all the rest of the current mathematical
-% environment will be set in displaymath mode too (in the previous example,
-% the fraction will be expanded).
-% Just as the \textsf{amsmath} command |\dfrac|
-% only transforms the required fraction in display style, we can limit
-% the display style effect to the affected symbol, by using the following macros:
+% or its alias |\ds|. However, when using these commands, all the rest of the current
+% mathematical environment will be set in displaymath mode
+% (as shown in the previous example, where the fraction will be expanded).
+% To limit the display style effect to the affected symbol only,
+% similar the the \textsf{amsmath} command |\dfrac|,
+% we can use the following macros:
% |\dlim|, |\dsum|, |\dprod|, |\dcup|, |\dcap|.
% So
% \begin{center}
-% |$\dlim_{x\to +\infty}\frac{1}{x}$| \quad gives \quad $\dlim_{x \to +\infty}\frac{1}{x}$.
+% |$\dlim_{x\to +\infty}\frac{1}{x}$| \quad yields \quad $\dlim_{x \to +\infty}\frac{1}{x}$.
% \end{center}
%
% \DescribeMacro{\lbar} \DescribeMacro{\hlbar}
% Large bars over expressions are obtained with |\overline|
-% or, shorter, its alias |\lbar|, to get for instance $\lbar{z_1z_2}$.
-% Such as for vectors, you can raise the bar (from the height of $h$) with
-% the |\hlbar| command, in order to correct uneven bars heights.
+% or its alias |\lbar|, to get for instance $\lbar{z_1z_2}$.
+% Similar to vectors, you can raise the bar (from the height of ``$h$'') with
+% the |\hlbar| command, to correct uneven bars heights.
% \begin{center}
% $\lbar{z+z'}=\hlbar{z}+\lbar{z'}$, obtained with |\hlbar{z}|,
% is better than $\lbar{z+z'}=\lbar{z}+\lbar{z'}$.
% \end{center}
%
-% \pagebreak
% \DescribeMacro{\eqdef} \DescribeMacro{\eqdef*}
-% The |\eqdef| macro writes equality symbol topped with `def'
+% The |\eqdef| macro writes the equality symbol topped with `def'
% or with `$\scriptstyle \Delta$' for |\eqdef*|
% (thanks to the \LaTeX\ command |\stackrel|):
%
@@ -718,9 +752,9 @@
% \DescribeMacro{\unbr}
% |\unbr| is an alias for |\underbrace|
% \footnote{The \textsf{mathtools} package by Morten Høgholm
-% and Lars Madsen~\cite{TOOL} provides a new improved version
-% of \texttt{\bslash underbrace} command (as many other usefull macros);
-% it is loaded by \textsf{mismath}.},
+% and Lars Madsen~\cite{TOOL} provides a new and improved version
+% of the \texttt{\bslash underbrace} command, along with many other usefull macros.
+% It is loaded by \textsf{mismath}.},
% making source code more compact.\\[2ex]
% \begin{minipage}{7.5cm}
% \begin{verbatim}
@@ -739,22 +773,22 @@
%
% \DescribeMacro{\then}
% The |\then| macro produces the symbol $\Longrightarrow$ surrounded by large spaces
-% as the standard macro |\iff| does it with $\Longleftrightarrow$.
-% In a similar way, |\txt|, \DescribeMacro{\txt}
+% just like the standard macro |\iff| does it with $\Longleftrightarrow$.
+% Similarly, the |\txt|, \DescribeMacro{\txt}
% based on the |\text| macro from the \textsf{amstext} package
% (loaded by \textsf{amsmath}),
% leaves em quad spaces (|\quad|) around the text. See the following example:
% \begin{center}
-% |\[ \ln x=a \then x=\e^a \txt{rather than}| \\
+% |\[ \ln x=a \then x=\e^a, \txt{rather than}| \\
% | \ln x=a \Longrightarrow x=\e^a \]| \\[1ex]
-% $ \ln x=a \then x=\e^a \txt{rather than} \ln x=a \Longrightarrow x=\e^a$
+% $ \ln x=a \then x=\e^a, \txt{rather than} \ln x=a \Longrightarrow x=\e^a$
% \end{center}
%
% \DescribeMacro{\mul}
-% The multiplication symbol obtained with |\times| produces the same spacing than addition
+% The multiplication symbol obtained with |\times| produces the same spacing as addition
% or subtraction operators, whereas division obtained with $/$ is closer to its operands.
-% This actually hides the priority of the multiplication on $+$ and $-$.
-% This is why we provide the |\mul| macro, behaving like $/$
+% This actually hides the priority of multiplication over $+$ and $-$.
+% That's why we provide the |\mul| macro, behaving like $/$
% (ordinary symbol) and leaving less space around than |\times|:
% \begin{center}
% $\lambda+\alpha \mul b-\beta \mul c$, obtained with |\mul|,
@@ -763,9 +797,9 @@
%
% When using |\mul| before a function name or around a |\left...\right| structure,
% the space may be too large on one side of |\mul|.
-% To get the same amount of space on the two sides of |\mul|,
+% To ensure the same amount of space on both sides of |\mul|,
% you can use thin negative spaces |\!|
-% or enclose the function or the structure with braces:
+% or enclose the function or structure with braces:
% \begin{center}
% $x\mul{\sin x}$, obtained with |x\mul{\sin x}|, is slightly better than $x\mul\sin x$.\\[1ex]
% |$\sin\!{\left( \frac{\pi}{3} \right)} \mul 2$| \quad gives\\
@@ -780,30 +814,31 @@
% \DescribeMacro{\pow}
% In the same way, when typesetting an exponent after a closing \emph{big}
% parenthesis produced by |\right)|,
-% the exponent is little to far from the parenthesis.
-% The command |\pow|\marg{expr}\marg{pow} sets
-% \meta{expr} between parentheses and puts the exponent \meta{pow}
+% the exponent appears to be a little to far from the parenthesis.
+% To address this issue, the |\pow|\marg{expr}\marg{pow} command is provided, which sets
+% \meta{expr} between parentheses and adjusts the positioning of the exponent \meta{pow}
% slightly closer to the right parenthesis
-% \footnote{This macro gives bad results with normal sized parenthesis.}.
+% \footnote{This macro gives bad results with normal-sized parenthesis.}.
% Compare:
-% \[ \e^a \sim\pow{1+\frac{a}{n}}{n} \txt{may be better than}
+% \[ \e^a \sim\pow{1+\frac{a}{n}}{n} \txt{which may be better than}
% \e^a \sim\left(1+\frac{a}{n}\right)^{n}.\]
%
% \DescribeMacro{\abs}
-% Absolute value (or modular for a complex number) should be typeset with
-% |\lvert| \ldots |\rvert| rather than $\mid$ which doesn't respect correct
-% spaces for delimiters; for bars whose height has to adapt to content,
-% we use |\left\vert| \ldots |\right\vert| or, more simply,
-% the |\abs|\{\ldots\} command which is equivalent
+% The correct typesetting of absolute value (or modular for a complex number) is achieved
+% using |\lvert| \ldots |\rvert|, rather than $\mid$, as the latter doesn't maintain
+% proper spacing in some situations (when a sign follows the open delimiter).
+% For bars whose height has to adapt to the content,
+% we can use |\left\vert| \ldots |\right\vert| or, more simply,
+% the |\abs|\{\ldots\} command, which is equivalent
% \footnote{Another solution is to define \texttt{\bslash abs}
-% with the \texttt{\bslash DeclarePairedDelimiter} command
+% using the \texttt{\bslash DeclarePairedDelimiter} command
% from the \textsf{mathtools} package~\cite{TOOL}.}.
%
% \medskip
% \DescribeMacro{\lfrac}
-% This macro behaves like |\frac|
-% but with thick spaces around the arguments,
-% so the corresponding fraction bar is perceptibly a little bit longer:\\
+% The |\lfrac| macro behaves like |\frac|
+% but with thicker spaces around the arguments,
+% making the corresponding fraction bar slightly longer:\\
% \begin{minipage}[t]{8cm}
% \begin{verbatim}
%\[ \lbar{Z} =
@@ -816,18 +851,18 @@
%
% \medskip
% \DescribeMacro{[ibrackets]}
-% Open intervals are usually represented with parenthesis, \eg $(0, +\infty)$,
-% but sometimes we find also
-% square brackets, for example in French mathematics.
-% In that case the space around them is often unsuitable,
-% \eg $x \in \mathclose{]} 0, +\infty[$.
-% We have redefined brackets in the \textsf{ibrackets} package~\cite{BRACKET}
+% Open intervals are commonly represented with parenthesis, \eg $(0, +\infty)$,
+% but sometimes square brackets are used, especially in French mathematics: $]0, +\infty[$.
+% In that specific case, the space around the square brackets is often inappropriate,
+% as in the expression $x \in \mathclose{]} 0, +\infty[$.
+% To address this issue, we have redefined the brackets in the \textsf{ibrackets}
+% package~\cite{BRACKET}
% which can be optionally
% \footnote{This functionality is optional because it causes
-% error when using a command defined by
+% errors when using a command defined by
% \texttt{\bslash DeclarePairedDelimiter}~\cite{TOOL} with square brackets.}
-% loaded by \textsf{mismath} with \texttt{ibrackets} package option
-% \footnote{It's the only option of the \textsf{mismath} package.}.
+% loaded by \textsf{mismath} using the \texttt{ibrackets} package option
+% \footnote{It is the only option specific to the \textsf{mismath} package.}.
%
% Simply type |$x\in ]-\pi,0[ \cup ]2\pi,3\pi[$| to get
% \begin{align*}
@@ -836,34 +871,38 @@
% x\in \mathclose{]}-\pi, 0 \mathopen{[} \cup \mathclose{]} 2\pi, 3\pi \mathopen{[}
% &\mbox{\quad without \textsf{ibrackets}}.
% \end{align*}
-% In our code, $[$ and $]$ symbols become ``active''
+% In our code, the symbols $[$ and $]$
% and are not defined by default as delimiters.
-% Thereby a line break could occur between the two brackets, but
+% Therefore, a line break could occur between the two brackets. However,
% it is always possible to transform them
-% into delimiters with |\left| and |\right|.
+% into delimiters using |\left| and |\right|.
%
-% With \textsf{ibrackets}: a bracket becomes an ordinary character
-% but an open delimiter when it is immediately followed by a + or - character.
-% Thus, when the left bound contains an operator sign,
+% With the \textsf{ibrackets} package, brackets are set as ``active'' characters,
+% behaving like ordinary characters in most cases.
+% However, when a bracket is \emph{immediately} followed by a + or - character,
+% it becomes an open delimiter.
+% Therefore, when the left bound contains an operator sign,
% \emph{you don't have to leave a space between the first bracket and the sign},
-% otherwise, the spaces surrounding the operator will be too large:
-% \eg |$x \in ] -\infty, 0]$| yields $x \in ] -\infty, 0]$.
-% Contrariwise, when you want to write algebra on intervals then
+% otherwise, the spaces surrounding the operator will be too large.
+% For example if you write |$x \in ] -\infty, 0]$|, it yields $x \in ] -\infty, 0]$
+% instead of $x \in ]-\infty, 0]$.
+% Conversely, when dealing with algebraic expressions involving intervals,
% \emph{you must leave a blank space between the second bracket and the} +/-
-% \emph{operations},
-% \eg |$[a, b] + [c, d]$| yields $[a, b] + [c, d]$
+% \emph{operations}.
+% For instance |$[a, b] + [c, d]$| yields $[a, b] + [c, d]$
% but |$[a, b]+ [c, d]$| yields $[a, b]+ [c, d]$.
%
-% Let us also mention other approaches with the |\interval| macro
+% Besides, there are other approaches, for example the |\interval| macro
% from the \textsf{interval} package~\cite{INT},
% or |\DeclarePairedDelimiters| from the \textsf{mathtools} package~\cite{TOOL}
% (but the latter is incompatible with \textsf{ibrackets}
-% for brackets management).
+% for managing brackets).
%
% \subsection{Environments for systems of equations and small matrices}
%
% \DescribeEnv{system}
-% The \texttt{system} environment produces a system of equations:\\
+% The \texttt{system} environment, defined in the \textsf{mismath} package,
+% is used to represent a system of equations:\\
% \begin{minipage}[t]{6.5cm}
% \begin{verbatim}
%$\begin{system}
@@ -877,22 +916,28 @@
%
% \medskip
% \DescribeMacro{\systemsep}
-% This first example could also have been produced with \texttt{cases} environment
-% from \textsf{amsmath} package, although \texttt{cases} places mathematical expressions
-% closer to the bracket (which makes sense considering it's use).
-% |\systemsep| enables to set the gap between the bracket and the expressions,
-% set by default to |\medspace|. This gap may be reduced, for instance:
-% |\renewcommand{\systemsep}{\thinspace}|,
-% or enlarged with |\thickspace| (and with |\renewcommand\systemsep}{}|
-% we obtain what \texttt{cases} do).
+% This first example could also have been achieved using the \texttt{cases} environment
+% from the \textsf{amsmath} package, although \texttt{cases} places mathematical expressions
+% closer to the bracket.
+% The |\systemsep| command allows you to adjust the gap between
+% the bracket and the expressions.
+% By default, the gap is set to |\medspace|. You can reduce the gap by redefining the command,
+% for instance: |\renewcommand{\systemsep}{\thinspace}|.
+% Alternatively you can increase the gap using |\thickspace|
+% (and with |\renewcommand\systemsep}{}| you can achieve the same spacing as the
+% \texttt{cases} environment).
+% The |\systemsep| command allows for greater flexibility in adjusting the spacing
+% within the \texttt{system} environment.
%
% \medskip
% \DescribeEnv{system\oarg{coldef}}
% By default, a system is written like an \texttt{array} environment with only one column,
-% left aligned. The environment has an optional argument to create several columns,
-% specifying their alignment, with the same syntax than the \texttt{array} environment of
-% \LaTeX : |\begin{system}[cl]| produces a two-column system, the first one being centered,
-% the second being left aligned, such as in the following example:\\
+% left aligned. However the \texttt{system} environment has an optional
+% argument that allows to create systems with multiple columns,
+% specifying their alignment using the same syntax as the \texttt{array} environment in
+% \LaTeX. For instance, using |\begin{system}[cl]| will produce a two-column system,
+% with the first column centered and
+% the second column left-aligned, as shown in the following example:\\
% \begin{minipage}[t]{7cm}
% \begin{verbatim}
%$\begin{system}[cl]
@@ -906,13 +951,16 @@
% \end{minipage}
%
% \DescribeMacro{\systemstretch}
-% Default spacing between the lines of a \texttt{system} environment has been slightly
-% enlarged compared to the one from \texttt{array} environments (from 1.2 factor).
-% This spacing may be changed by typing |\renewcommand{\systemstretch}|\marg{stretch},
-% inside the current mathematical environment (for a local change) or outside
-% (for a global change). By default, stretch's value is 1.2.
-% In addition we can use the end of line with a spacing option such
-% as it has been done above with |\\[1ex]|.
+% The default spacing between the lines of a \texttt{system} environment has been slightly
+% enlarged compared to the one used in \texttt{array} environments (using a factor of 1.2).
+% This can be adjusted by using
+% |\renewcommand{\systemstretch}|\marg{stretch}, where \meta{stretch} is the desired value
+% for the spacing. You can place this command
+% inside the current mathematical environment for a local change, or outside
+% for a global change. The default value for is 1.2.
+% Furthermore you can also use the end of the line with a spacing option, as
+% demonstrated above with |\\[1ex]|, to control the spacing between specific lines in
+% the system.
%
% Another example with |\begin{system}[rl@{\quad}l]|
% \footnote{\texttt{@\{\ldots\}} sets inter-column space.}:
@@ -928,41 +976,45 @@
% \end{system}
% \end{equation*}
%
-% Let's mention the \textsf{systeme} package~\cite{SYST} which deals with linear systems
-% with a lighter syntax and automatic alignments on $+$, $-$, $=$,
-% and also the \textsf{spalign} package~\cite{SPAL} which moreover produces nice alignments
-% for matrices (with spaces and semi­colons as de­lim­iters).
+% Let's also mention the \textsf{systeme} package~\cite{SYST} which provides
+% a lighter syntax and automatic alignments for linear systems.
+% Additionally, there is the \textsf{spalign} package~\cite{SPAL},
+% which offers a convenient and easy syntax for systems and matrices with
+% visually appealing alignments.
%
% \medskip
% \DescribeEnv{spmatrix}
-% The \textsf{amsmath} package provides various environments to typeset matrices:
-% for instance \texttt{pmatrix} surrounds the matrix with parenthesis
-% or \texttt{smallmatrix} typesets a small matrix that can even be inserted
-% in a text line. We provide a combination of the two with \texttt{spmatrix}:\\
+% The \textsf{amsmath} package offers several environments to typeset matrices :
+% For example, the \texttt{pmatrix} environment surrounds the matrix with parenthesis,
+% and the \texttt{smallmatrix} environment creates a smaller matrix suitable for insertion
+% within a text line. We provide a combination of the these both
+% functionalities with the \texttt{spmatrix} environment:
% |$\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$| yielding
% $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$.
%
-% The \textsf{mathtools} package enhance \textsf{amsmath} matrices environments
-% and provides also a small matrix environment with parenthesis.
-% Furthermore, with starred version |\begin{psmallmatrix*}|\oarg{col},
+% The \textsf{mathtools} package enhances the \textsf{amsmath} matrix environments
+% and also provides a small matrix environment with parenthesis: \texttt{psmallmatrix}.
+% Moreover, with the starred version |\begin{psmallmatrix*}|\oarg{col},
% you can choose the alignment inside the columns (\texttt{c}, \texttt{l} or \texttt{r}).
-% But sadly, the space before the left parenthesis is too narrow
-% regarding to the space inside the parenthesis.
-% Compare previous $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$
-% with $\vec{u}\begin{psmallmatrix}-1\\2\end{psmallmatrix}$.
+% However, the space before the left parenthesis is unfortunately too narrow
+% compared to the space inside the parenthesis.
+% To illustrate this, consider the following comparison:
+% $\vec{u}\begin{spmatrix}-1\\2\end{spmatrix}$ (using \textsf{mismath}'s \texttt{spmatrix})
+% vs.\@ $\vec{u}\begin{psmallmatrix}-1\\2\end{psmallmatrix}$
+% (using \textsf{mathtools} \texttt{psmallmatrix}).
%
% \medskip
-% For typesetting various kind of matrices, let's mention the awesome
+% For typesetting various kinds of matrices, let's mention the excellent
% \textsf{nicematrix} package by François Pantigny~\cite{NMATX}.
%
% \subsection{Displaymath in double columns}
%
% \DescribeEnv{mathcols}
-% The \texttt{mathcols} environment enables to arrange
-% ``long'' calculation in double columns, separated with a central rule,
+% The \texttt{mathcols} environment allows you to arrange
+% ``long'' calculations in double columns, separated with a central rule,
% as shown in the following example.
-% But the \textsf{multicol} package must be loaded in the preamble.
-% It activates the mathematical mode
+% However, to use this feature, the \textsf{multicol} package must be loaded in the preamble.
+% The \texttt{mathcols} environment activates mathematical mode
% in display style and with an \texttt{aligned} environment.
% \begin{mathcols}
% & \frac{1}{2 \mul {\pow{\frac{1}{4}}{n}} + 1} \geq 0.999 \\
@@ -976,8 +1028,9 @@
% \end{mathcols}
%
% \DescribeMacro{\changecol}
-% The |\changecol| macro causes a change of column;
-% alignment is produced using the classic delimiters |&| and |\\|.
+% The |\changecol| macro is used to switch to the next column,
+% and an alignment within the column is done using the classic delimiters
+% |&| to separate entries and |\\| to start a new row.
%
% \begin{verbatim}
%\begin{mathcols}
@@ -995,12 +1048,14 @@
% \vspace{-4ex}
% \subsection{Deprecated commands}
%
-% Here we present a summary table of deprecated commands, used until version 2.2.
-% They produce a warning message but are still working and will be maintained for now.
-% These deprecated commands
-% worked only in the preamble, globally, and there was no inverse switch.
-% Therefore they are replaced by the more powerful and more general
-% macro |\MathUp| which can be placed anywhere and has an inverse switch |\MathIt|.
+% Here is a summary table of the deprecated commands that were used until version 2.2.
+% These commands are still functional and will be maintained for the time being,
+% but they do produce a warning message.
+% They used to work only in the preamble, affecting the entire document globally,
+% and lacked an inverse switch.
+% As a result, these deprecated commands are now being replaced by the more
+% versatile and powerful |\MathUp| macro, which can be used anywhere
+% in the document or preamble and has an inverse switch |\MathIt|.
%
% \begin{center}
% \setlength{\extrarowheight}{1pt}
@@ -1017,16 +1072,18 @@
% \end{center}
%
% \medskip
-% |\MathNumbers| may be used instead of |\MathUp| with an argument containing
+% You can also utilize|\MathNumbers| instead of |\MathUp| with an argument containing
% all the constants you want to be typeset in roman (among `e, i, j').
-% And |\MathProba{P,E}| may be used instead of |\MathUp{P}\MathUp{E}|
-% and you can add also V in its argument to refer to variance.
+% Additionally |\MathProba{P,E}| can be used instead of |\MathUp{P}\MathUp{E}|,
+% and you can include V in its argument to refer to variance.
%
% \medskip
-% In version 2.3 we tried a way to replace these deprecated commands
-% by package options based on keyval. This less efficient method is abandoned.
-% And thus the command |\mismathset| is obsolete.
-% Another command, |\paren|, used before version 2.0, is no longer supported.
+% In version 2.3 we attempted to replace these deprecated commands
+% with package options based on keyval. However, we found that this method was
+% less efficient and have decided to abandon it.
+% As a result, the command |\mismathset| is now obsolete.
+% Additionally, the command, |\paren|, which was used before version 2.0,
+% is no longer supported.
%
% \StopEventually{}
% \section{Implementation}
@@ -1046,14 +1103,15 @@
\ifmm@ibrackets\RequirePackage{ibrackets}\fi
% \end{macrocode}
-% The above conditional packages loading avoids ``option clash'' errors if these packages
-% have been previously loaded with other options.
+% The above conditional packages loading prevents ``option clash'' errors in case
+% these packages have been previously loaded previously with different options.
%
% \medskip
% \DescribeMacro{\bslash}
-% The |\bslash| macro comes from Frank Mittelbach's \textsf{doc.sty} package.
-% It can also be used in other documents instead of |\textbackslash|
-% (which doesn't work inside warnings).
+% The |\bslash| macro originates from Frank Mittelbach's \textsf{doc.sty} package.
+% It can be employed in other documents as an alternative to |\textbackslash|,
+% especially in situations where |\textbackslash| does not work correctly, such as
+% inside warning messages.
% \begin{macrocode}
{\catcode`\|=\z@ \catcode`\\=12 |gdef|bslash{\}} % \bslash command
@@ -1061,9 +1119,9 @@
%
% \medskip
% \DescribeMacro{\mm@warning} \DescribeMacro{\mm@macro} \DescribeMacro{\mm@operator}
-% The three following internal macros are meta commands for
-% conditional macro definition with a warning message if the macro already exists.
-% They should be useful in other packages.
+% The next three internal macros serve as meta commands for
+% conditionally defining macros while providing a warning message if the macro already exists.
+% These macros can be useful in other packages as well.
% \medskip
% \begin{macrocode}
\newcommand\mm@warning[1]{
@@ -1085,10 +1143,10 @@
%
% To produce the correct upright shape font when working
% with the \textsf{beamer} package, you don't have to use |\mathrm|
-% but |\mathup| (based on |\operatorfont| from the \textsf{amsopn} package).
-% This command works also fine with other sans serif fonts like \textsf{cmbright}.
+% but rather |\mathup| (based on |\operatorfont| from the \textsf{amsopn} package).
+% This command also works fine with other sans serif fonts like \textsf{cmbright}.
%
-% Moreover for \textsf{beamer}, which changes the family default font (sans serif)
+% Moreover for \textsf{beamer}, which changes the default font family (sans serif)
% |\e|, |\i|, |\j| have no effect without |\AtBeginDocument|.
%
% |\AtBeginDocument| is also necessary to redefine |\i| when calling
@@ -1103,16 +1161,16 @@
% \end{macrocode}
%
-% The following macros are switches that transform in roman vs italic any chosen letter
-% in math mode. They can be used anywhere.
-% To get a letter in roman instead of italic, we have to change the
-% digit of mathcode that represent the family: 1 to 0.
+% The following macros are switches that transform any chosen letter in math mode
+% to roman or italic style. These switches can be used anywhere in the document or preamble.
+% To obtain a letter in roman style instead of italic, we need to change the
+% mathcode digit that represents the font family: 1 to 0.
%
% For example, except for \LuaLaTeX, mathcode of the `e' letter is:
-% `e="7165 (decimal 29029), the second digit `1' meaning ``italic''.
-% To get a roman `e', we have to change his mathcode in "7065.
+% `e="7165 (decimal 29029), with the second digit `1' indicating ``italic'' style.
+% To get a roman `e', we need to change its mathcode to "7065.
%
-% When called in the preamble, |\AtBeginDocument| is necessary
+% When used in the preamble, it is necessary to call |\AtBeginDocument|
% for using with the \textsf{beamer} package.
% In the preamble, |\math@family{#1}{0}| is equivalent to \\
% |\DeclareMathSymbol{#1}{\mathalpha}{operators}{`#1}|.
@@ -1165,15 +1223,17 @@
\newcommand*\MathIt[1]{\MathFamily{#1}{1}}
% \end{macrocode}
-% On the same model we could also create some other macros to set any letter
-% in bold or sans serif, but unfortunately there is no family number associated by default
-% to these typefaces. It depends on the font package that is loaded and
-% it can also depend on which |\DeclareSymbolFont| is used.
+% With a similar approach we could also create additional macros to set any letter
+% in bold or sans serif. However, there is no default family number associated
+% with these typefaces. The family number depends on the font package being loaded and
+% may vary depending on specific |\DeclareSymbolFont| used.
+% Therefore, setting letters in bold or sans serif requires additional consideration
+% and may not have a straightforward solution.
%
% \medskip
-% In complement to |\MathUp| and |\MathIt|, we provide the two following commands
-% to set in roman a group of letters among `e, i, j' for mathematical constants
-% or `P, E, V' for probability operators.
+% In addition to |\MathUp| and |\MathIt|, we also offer the following two commands
+% to set a group of letters in roman typeface: one for for mathematical constants,
+% among `e, i, j', and the other for probability operators, among or `P, E, V'.
%
% \medskip
% \begin{macrocode}
@@ -1191,18 +1251,20 @@
% \end{macrocode}
% \DescribeMacro{\apply}
-% The inverse global switch |\MathNormal| acts on any comma separated list
-% thanks to the |\apply| macro which works as follows:
-% |\apply\macro{comma,list}| expands to |\macro{comma}\macro{list}|.
-% We could also use |\apply\MathUp{e,i,j}| instead of |\MathNumbers{e,i,j}|.
-% I found this macro on Tex RSSing.com by searching
+% With the inverse global switch |\MathNormal|, you can apply the normal (italic) style
+% on any comma-separated list of characters. This is achieved using
+% the |\apply| macro, for example |\apply\macro{arg1,arg2}|
+% expands to |\macro{arg1}\macro{arg2}|.
+% So using |\apply\MathUp{e,i,j}| is equivalent to |\MathUp{e}\MathUp{i}\MathUp{j}|.
+% I discovered this powerfull macro on Tex RSSing.com by searching for
% ``TeX How to iterate over a comma separated list?''
-% The answer was given by ``wipet'' on 2021/02/26.
-% I don't know who is wipet but I thank him for this powerful macro!
-% Unfortunately usual loop instructions like |\@for| or |\foreach| do not work
-% and produce the error message ``!~Improper alphabetic constant''.
-% Indeed |\def\letter{A} \MathUp{\letter}| fails,
-% the control sequence |\letter| is not considered as the single character `A'.
+% The answer was provided by a user named ``wipet'' on 2021/02/26.
+% I don't know who is wipet but I am grateful for his contribution,
+% as this macro allows us to accomplish the task that
+% usual loop instructions like |\@for| or |\foreach| cannot achieve due to
+% errors like ``!~Improper alphabetic constant''.
+% For instance, if you try |\def\letter{A} \MathUp{\letter}| it will fail
+% because the control sequence |\letter| is not considered as the single character `A'.
%
% \medskip
% \begin{macrocode}
@@ -1218,10 +1280,10 @@
% \end{macrocode}
%
% The following commands are deprecated but still work.
-% They were intended to set some letters in upright shape by default
-% in math mode, but worked only in the preamble.
-% This is now managed by the more powerful |\MathUp| command.
-% The old commands are maintained for now for compatibility reasons.
+% They were intended to set some letters in upright shape
+% in math mode, but only worked in the preamble.
+% This is now managed by the more powerful |\MathUp| command, and
+% the old commands are maintained for compatibility reasons.
% \medskip
%
% \begin{macrocode}
@@ -1252,11 +1314,11 @@
% \end{macrocode}
%
-% The Greek letter pi must be managed in a different way. The switches are called
+% The Greek letter pi must be handled differently. The switches are called
% |\pinumber| and |\pinormal|.
-% When given without argument, |\pinumber| uses the LGR font encoding.
+% When given without an argument, |\pinumber| uses the LGR font encoding.
% A particularity of the \textsf{fontenc} package is that it can be loaded
-% several times with different options without ``option clash'' error.
+% several times with different options without triggering an ``option clash'' error.
% \medskip
% \begin{macrocode}
\newcommand*\pinumber[1][]{
@@ -1277,16 +1339,16 @@
\let\savedpi\pi
\fi
}{
- \@ifundefined{#1}{
- \PackageWarning{mismath}{%
- Value #1 must be a valid
- command name\MessageBreak for pinumber,
- but command \bslash #1\space
- is undefined.\MessageBreak
- Perhaps a missing package}
- }{\renewcommand{\pi}{%
- \csname #1\endcsname}
- }
+ \@ifundefined{#1}{
+ \PackageWarning{mismath}{%
+ Value #1 must be a valid
+ command name\MessageBreak for pinumber,
+ but command \bslash #1\space
+ is undefined.\MessageBreak
+ Perhaps a missing package}
+ }{\renewcommand{\pi}{%
+ \csname #1\endcsname}
+ }
}
}
@@ -1327,7 +1389,7 @@
% \end{macrocode}
%
-% And now all the other commands.
+% Classic identifiers are presented below.
% \medskip
% \begin{macrocode}
\mm@macro{di}{\mathop{}\!\mathup{d}}
@@ -1381,13 +1443,20 @@
\mm@operator[bigo]{\bigo}{O}
\mm@operator[lito]{\lito}{o}
+% \end{macrocode}
+% And finally we present the remaining macros.
+%
+% With Cyrillic languages, the command |\C| may already be defined (only for text mode).
+% Thus, it will not be redefined by \textsf{mismath}. However, one may still want
+% to use our |\C| macro only for math mode without interfering the definition of
+% the text |\C|, therefore the |\onlymathC| macro.
+% \medskip
+% \begin{macrocode}
\mm@macro{mathset}{\mathbf}
\mm@macro{R}{\mathset{R}}
-\@ifpackagewith{babel}{russian}{
- \PackageWarningNoLine{mismath}{Option russian of babel
- is loaded\MessageBreak
- Command \bslash C will not be redefined}
- }{\mm@macro{C}{\mathset{C}}}
+\mm@macro{C}{\mathset{C}}
+\providecommand\onlymathC{\let\oldC\C
+ \renewcommand{\C}{\TextOrMath{\oldC}{\mathset{C}}} }
\mm@macro{N}{\mathset{N}}
\mm@macro{Z}{\mathset{Z}}
\mm@macro{Q}{\mathset{Q}}
@@ -1412,9 +1481,10 @@
\mm@macro{iif}{if and only if\xspace}
% \end{macrocode}
-% We used |\mathurm| before |\Delta| in the case of defining capital Greek letters
-% in italic (for example with the \textsf{fixmath} package).
-% Without |\mbox{}|, space produced by |\| in macro |\then| would be suppressed in tables.
+% Above, we have used |\mathrm| before |\Delta| in case of defining capital Greek letters
+% in italics (for example with the \textsf{fixmath} package).
+% The use of |\mbox{}| ensures that the space produced by |\| in the |\then| macro
+% is not suppressed in tables.
% \medskip
% \begin{macrocode}
\mm@macro{then}{\ \Longrightarrow \ \mbox{} }
diff --git a/macros/latex/contrib/mismath/mismath.pdf b/macros/latex/contrib/mismath/mismath.pdf
index 2fe670309c..0ba40a0458 100644
--- a/macros/latex/contrib/mismath/mismath.pdf
+++ b/macros/latex/contrib/mismath/mismath.pdf
Binary files differ
diff --git a/macros/latex/contrib/textcase/textcase.dtx b/macros/latex/contrib/textcase/textcase.dtx
index f857700c81..3d8ab3997e 100644
--- a/macros/latex/contrib/textcase/textcase.dtx
+++ b/macros/latex/contrib/textcase/textcase.dtx
@@ -1,6 +1,6 @@
% \iffalse
%% Source File: textcase.dtx
-%% Copyright 1997 1998 2019 2022 David Carlisle
+%% Copyright 1997 1998 2019 2022 2023 David Carlisle
%%
%% This file may be distributed under the terms of the LPPL.
%% See 00readme.txt for details.
@@ -13,7 +13,7 @@
%<driver> \ProvidesFile{textcase.drv}
% \fi
% \ProvidesFile{textcase.dtx}
- [2022/07/10 v1.03 Text only upper/lower case changing (DPC)]
+ [2023/07/27 v1.04 Text only upper/lower case changing (DPC)]
%
% \iffalse
%<*driver>
@@ -61,10 +61,13 @@
%
% \subsection*{This package is obsolete with the June 2022 \LaTeX\ release.}
% \begin{sloppypar}
-% With new formats |\MakeUppercase| supports the extensions provided
-% here, with improved support for UTF-8 input. So now the package just defines
-% |\MakeTextUppercase| and |\MakeTextLowercase| as aliases for the
-% standard |\MakeUppercase| and |\MakeLowercase|.
+% With new formats |\MakeUppercase| supports the extensions provided
+% here, with improved support for UTF-8 input. So now the package
+% just defines |\MakeTextUppercase| and |\MakeTextLowercase| as
+% aliases for the standard |\MakeUppercase| and
+% |\MakeLowercase|\footnote{Since v1.04, not quite alises, one
+% grouping level is dropped for compatibility, required by
+% \textsf{amsart}.}.
% \end{sloppypar}
%
%
@@ -234,15 +237,45 @@
\DeclareOption{overload}{}
\ProcessOptions
\PackageInfo{textcase}{Defining Legacy names}
- \let\MakeTextUppercase\MakeUppercase
- \let\MakeTextLowercase\MakeLowercase
+% \end{macrocode}
+% \changes{v1.04}{2023/07/27}
+% {define without outer group}
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_set_protected:Npn \reserved@a #1
+ {
+ \cs_generate_variant:cn { text_ \str_lowercase:n {#1} case:nn } { V }
+ \ExpandArgs { cnx } \NewExpandableDocumentCommand
+ { MakeText#1case }
+ { O{} +m }
+ { \exp_not:c { MakeText#1case \c_space_tl \c_space_tl \c_space_tl }
+ [####1] {####2} }
+ }
+\reserved@a { Upper }
+\reserved@a { Lower }
+\cs_new_protected:cpn {
+ MakeTextLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {%{
+ \let \OE \oe
+ \@@text@case@aux { lower } {#1} {#2}
+ }%}
+\cs_new_protected:cpn {
+ MakeTextUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
+ {%{
+ \let \oe \OE
+ \@@text@case@aux { upper } {#1} {#2}
+ }%}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \begin{macrocode}
\expandafter\endinput
\fi
% \end{macrocode}
%
% \begin{macro}{\@uclcnotmath}
% This is the main macro of this package. It is basically
-% a copy of |\MakeTextUppercase| and |\MakeTextLowercase|
+% a copy of |\MakeUppercase| and |\MakeLowercase|
% from the \LaTeX\ kernel, modified slightly so that they
% can share code (that modification could be done to the
% standard versions as well) and then further changed to
diff --git a/macros/latex/contrib/textcase/textcase.pdf b/macros/latex/contrib/textcase/textcase.pdf
index 4466ef1c08..9cc4365d35 100644
--- a/macros/latex/contrib/textcase/textcase.pdf
+++ b/macros/latex/contrib/textcase/textcase.pdf
Binary files differ
diff --git a/macros/luatex/latex/luanumint/README.txt b/macros/luatex/latex/luanumint/README.txt
index 808a1c0f83..ffb6056f14 100644
--- a/macros/luatex/latex/luanumint/README.txt
+++ b/macros/luatex/latex/luanumint/README.txt
@@ -1,3 +1,8 @@
+# The luanumint package
+# version 1.1
+# Authors: Chetan Shirore and Ajit Kumar
+# Email: mathsbeauty@gmail.com
+
# Introduction
The luanumint package is developed using Lua to find the numerical integration of real-valued functions of a real variable over closed and bounded intervals. The package provides commands to find numerical integration using the mid-point, trapezoidal, and Simpson's one-third and three-eighth rules. The loadstring command is used to load and evaluate functions at different points in the mathematics environment of Lua. The package also provides commands to find numerical integration with step-by-step calculations. The package's commands have an optional argument to round off the numbers to the desired number of decimal places. The breqn package is loaded to display and align step-by-step calculations properly. Advanced users can customize the code to achieve the desired formatting of step-by-step computations. The package can assist in creating various problems on numerical integration with their solutions. The results obtained using different methods of numerical integration can be compared. It can save users' efforts of doing computations involving numerical integration in external software and copying them inside LaTeX documents.
diff --git a/macros/luatex/latex/luanumint/luanumint.pdf b/macros/luatex/latex/luanumint/luanumint.pdf
index fec3d14c07..cf0fd4476f 100644
--- a/macros/luatex/latex/luanumint/luanumint.pdf
+++ b/macros/luatex/latex/luanumint/luanumint.pdf
Binary files differ
diff --git a/macros/luatex/latex/luanumint/luanumint.sty b/macros/luatex/latex/luanumint/luanumint.sty
index aca4de0215..95eccf22bb 100644
--- a/macros/luatex/latex/luanumint/luanumint.sty
+++ b/macros/luatex/latex/luanumint/luanumint.sty
@@ -1,9 +1,9 @@
% The luanumint package
-% version 1.0
+% version 1.1
% Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt.
%Authors: Chetan Shirore and Ajit Kumar
-\ProvidesPackage{luanumint}[1.0]
+\ProvidesPackage{luanumint}[1.1]
\RequirePackage{luacode,breqn,xkeyval}
\begin{luacode*}
function checksign(x)
@@ -215,11 +215,11 @@ end
\end{luacode*}
% ========= KEY DEFINITIONS =========
-\define@key{someop}{a}{\def\mop@one{#1}}%
-\define@key{someop}{b}{\def\mop@two{#1}}%
-\define@key{someop}{n}{\def\mop@three{#1}}%
-\define@key{someop}{func}{\def\mop@four{#1}}%
-\define@key{someop}{trun}{\def\mop@five{#1}}%
+\define@key{someop}{a}{\def\mop@onex{#1}}%
+\define@key{someop}{b}{\def\mop@twox{#1}}%
+\define@key{someop}{n}{\def\mop@threex{#1}}%
+\define@key{someop}{func}{\def\mop@fourx{#1}}%
+\define@key{someop}{trun}{\def\mop@fivex{#1}}%
% ========= KEY DEFAULTS =========
\setkeys{someop}{a=0}%
\setkeys{someop}{b=1}%
@@ -232,7 +232,7 @@ end
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)()
-tex.print(luamidpt(f,\mop@one,\mop@two,\mop@three,\mop@five))
+tex.print(luamidpt(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex))
}%
}%
}%
@@ -242,7 +242,7 @@ tex.print(luamidpt(f,\mop@one,\mop@two,\mop@three,\mop@five))
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luamidptSteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luamidptSteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex))
}%
\endgroup}%
@@ -251,7 +251,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)(
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)()
-tex.print(luatrapz(f,\mop@one,\mop@two,\mop@three,\mop@five))
+tex.print(luatrapz(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex))
}%
}%
}%
@@ -260,7 +260,7 @@ tex.print(luatrapz(f,\mop@one,\mop@two,\mop@three,\mop@five))
\setkeys{someop}{#1}%
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luatrapzsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luatrapzsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex))
}%
\endgroup}%
@@ -268,7 +268,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)(
\setkeys{someop}{#1}%
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsononethird(f,\mop@one,\mop@two,\mop@three,\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsononethird(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex))
}%
}%
}%
@@ -277,7 +277,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)(
\setkeys{someop}{#1}%
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsononethirdsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsononethirdsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex))
}%
\endgroup}%
@@ -286,7 +286,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)(
\setkeys{someop}{#1}%
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsonthreight(f,\mop@one,\mop@two,\mop@three,\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.print(luasimpsonthreight(f,\mop@onex,\mop@twox,\mop@threex,\mop@fivex))
}%
}%
}%
@@ -295,7 +295,7 @@ local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)(
\setkeys{someop}{#1}%
\directlua{%
tempsubexp = "("..\luastring{#2}..")"
-local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsonthreightsteps(f,\mop@one,\mop@two,\mop@three,'\mop@four',\mop@five))
+local f = load("return function(x) return " ..tempsubexp.. "end",nil,"t",math)() tex.sprint(luasimpsonthreightsteps(f,\mop@onex,\mop@twox,\mop@threex,'\mop@fourx',\mop@fivex))
}%
\endgroup}%
\endinput \ No newline at end of file