summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-18 03:01:45 +0000
committerNorbert Preining <norbert@preining.info>2024-02-18 03:01:45 +0000
commita3b386e8476527e1b87ec71f7156cd7751f8f325 (patch)
treecd6442374d94f7e42f3d8e2c018a448aacedb846 /macros/latex
parent8886ad587a305595ce543a74b0fc779f0732a6e9 (diff)
CTAN sync 202402180301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/codedescribe/README.md5
-rw-r--r--macros/latex/contrib/codedescribe/doc/codedescribe.pdfbin252057 -> 252555 bytes
-rw-r--r--macros/latex/contrib/codedescribe/doc/codedescribe.tex17
-rw-r--r--macros/latex/contrib/codedescribe/latex/codedescribe.sty66
-rw-r--r--macros/latex/contrib/codedescribe/latex/codelisting.sty26
5 files changed, 60 insertions, 54 deletions
diff --git a/macros/latex/contrib/codedescribe/README.md b/macros/latex/contrib/codedescribe/README.md
index 218cb14202..e4fb229aa1 100644
--- a/macros/latex/contrib/codedescribe/README.md
+++ b/macros/latex/contrib/codedescribe/README.md
@@ -87,7 +87,10 @@ The Current Maintainer of this work is Alceu Frigeri
## Changelog
-* Version 1.3 (this)
+* Version 1.4 (this)
+ - The 'new', 'update' and 'info' keys can, now, be used multiple times when declaring a codedescribe environment. (see documentation).
+
+* Version 1.3
- Added \tsresult, a command to just show the result of a stored code (codelisting specific).
diff --git a/macros/latex/contrib/codedescribe/doc/codedescribe.pdf b/macros/latex/contrib/codedescribe/doc/codedescribe.pdf
index 45271b09d6..d2f654f7f7 100644
--- a/macros/latex/contrib/codedescribe/doc/codedescribe.pdf
+++ b/macros/latex/contrib/codedescribe/doc/codedescribe.pdf
Binary files differ
diff --git a/macros/latex/contrib/codedescribe/doc/codedescribe.tex b/macros/latex/contrib/codedescribe/doc/codedescribe.tex
index 94e9dd8ba4..519c48eb58 100644
--- a/macros/latex/contrib/codedescribe/doc/codedescribe.tex
+++ b/macros/latex/contrib/codedescribe/doc/codedescribe.tex
@@ -15,7 +15,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.3} (2023/05/16)
+%% This is version {1.4} {2024/02/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codedescribe
@@ -96,7 +96,7 @@ All \tsobj[code]{\tscode,\tsdemo} commands create a local group in which the \t
\end{tsremark}
\end{codedescribe}
-\begin{codedescribe}[code,new=2024-01-06]{\tscode*,\tsdemo*,\tsresult*}
+\begin{codedescribe}[code,update=2024/01/06]{\tscode*,\tsdemo*,\tsresult*}
\begin{codesyntax}%
\tsmacro{\tscode*}[code-keys]{st-name}
\tsmacro{\tsdemo*}[code-keys]{st-name}
@@ -106,7 +106,7 @@ All \tsobj[code]{\tscode,\tsdemo} commands create a local group in which the \t
\tsmacro{\tsdemo*}{} first typesets \tsobj[meta]{st-name}, as above, then it \emph{executes} said code. The non-start versions place them side-by-side, whilst the star versions places one following the other.
-(new) \tsmacro{\tsresult*}{} only \emph{executes} said code. The non-start versions centers it and use just half of the base line, whilst the star versions uses the full text width.
+(new 2024/01/06) \tsmacro{\tsresult*}{} only \emph{executes} said code. The non-start versions centers it and use just half of the base line, whilst the star versions uses the full text width.
\end{codedescribe}
@@ -261,7 +261,7 @@ Using \tsobj{\defgroupfmt} one can (re-)define custom \tsobj[arg]{format-groups}
\tsobj[keys]{color} was used in the list above just as a 'reminder' that a color is defined/associated with the given group.
\end{tsremark}
-\subsubsection{Object Types}
+\subsubsection{Object Types}\label{obj-types}
Using \tsobj{\defobjectfmt} one can (re-)define custom \tsobj[arg]{obj-types}.
Similarly, there is a set of predefined ones, as follow:
@@ -315,21 +315,20 @@ For instance, the many optional \tsobj[arg]{*arg} are defined as follow:
\subsection{Environments}
-\begin{codedescribe}[env,new=2023/05/01,update=2023/05/1,note={this is an example}]{codedescribe}
+\begin{codedescribe}[env,new=2023/05/01,update=2023/05/01,note={this is an example},update=2024/02/16]{codedescribe}
\begin{codesyntax}
\tsmacro{\begin{codedescribe}}[obj-type]{csv-list}
\ldots
\tsmacro{\end{codedescribe}}{}
\end{codesyntax}
-This is the main environment to describe \tsobj[env]{Macros, Functions, Variable, Environments, etc.} \tsobj[meta]{csv-list} is typeset in the margin. The optional \tsobj[oarg]{obj-type} defines the object-type format.
+This is the main environment to describe \tsobj[env]{Macros, Functions, Variable, Environments, etc.} \tsobj[meta]{csv-list} is typeset in the margin. The optional \tsobj[oarg]{obj-type} (see \ref{obj-type-def} and \ref{obj-types}) defines the object-type format.
\end{codedescribe}
\begin{tsremark}[Note~1:]
One can change the rule color with the key \tsobj[keys]{rulecolor}, for instance \tsmacro{\begin{codedescribe}[rulecolor=white]}{} will remove the rules.
\end{tsremark}
\begin{tsremark}[Note~2:]
-Besides that, one can use the keys \tsobj[keys]{new,update,note} to further customize it as: \tsverb{\begin{codedescribe} [new=2023/05/01, update=2023/05/1, note={this is an example}]}
+Besides that, one can use the keys \tsobj[keys]{new,update,note} to further customize it. (2024/02/16 these keys can also be used multiple times).
\end{tsremark}
-
\begin{tsremark}[Note~3:]
Finally, one can use \tsobj[key]{EXP,rEXP} to add a star \ding{72} or a hollow star \ding{73}, as per expl3/doc3 conventions (if expandable, restricted expandable or not).
\end{tsremark}
@@ -354,7 +353,7 @@ The \tsobj[env]{codesyntax} environment sets the fontsize and activates \tsmacro
For example, the code for \tsobj[env]{codedescribe} (entry above) is:
\begin{codestore}[demoD]
-\begin{codedescribe}[env,new=2023/05/01,update=2023/05/1,note={this is an example}]{codedescribe}
+\begin{codedescribe}[env,new=2023/05/01,update=2023/05/01,note={this is an example},update=2024/02/16]{codedescribe}
\begin{codesyntax}
\tsmacro{\begin{codedescribe}}[obj-type]{csv-list}
\ldots
diff --git a/macros/latex/contrib/codedescribe/latex/codedescribe.sty b/macros/latex/contrib/codedescribe/latex/codedescribe.sty
index 05058dc183..d807ba59b9 100644
--- a/macros/latex/contrib/codedescribe/latex/codedescribe.sty
+++ b/macros/latex/contrib/codedescribe/latex/codedescribe.sty
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.3} {2024/01/06}
+%% This is version {1.4} {2024/02/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codedescribe
@@ -22,8 +22,8 @@
\ProvidesExplPackage
{codedescribe}
- {2024/01/06}
- {1.3}
+ {2024/02/17}
+ {1.4}
{LaTeX Code Description/Documentation}
%%%%%%%
@@ -36,24 +36,16 @@
{
name .code:n = {codedescribe} ,
prefix .code:n = {codedesc} ,
- date .code:n = {2024/01/06} ,
- version .code:n = {1.3} ,
+ date .code:n = {2024/02/17} ,
+ version .code:n = {1.4} ,
description .code:n = {\LaTeX~Code~Description/Documentation}
}
-\cs_if_exist:NF \__codedesc_pkg_info:nn
+\cs_if_exist:NF \PkgInfo
{
- \cs_new_protected:Npn \__codedesc_pkg_info:nn #1#2
- { \keys_set:nn {#1 / pkg info}{#2} }
- }
-\cs_if_exist:NF \PkgInfo
- { \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} } }
-\cs_if_exist:NF \PkgDescription
- {
+ \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} }
\NewDocumentCommand \PkgDescription {m}
- {
- \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par
- }
- }
+ { \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par }
+ }
%%%%%%%
%%% End of cut-n-paste
%%%%%%%
@@ -483,7 +475,8 @@
{
\bool_set_true:N \l__codedesc_descnotes_bool
\bool_set_true:N \l__codedesc_descdate_new_bool
- \tl_set:Nn \l__codedesc_descdate_new_tl {#1}
+% \tl_set:Nn \l__codedesc_descdate_new_tl {#1}
+ \seq_put_right:Nn \l__codedesc_descdate_new_seq {#1}
},
update.usage:n = general,
@@ -491,7 +484,8 @@
{
\bool_set_true:N \l__codedesc_descnotes_bool
\bool_set_true:N \l__codedesc_descdate_update_bool
- \tl_set:Nn \l__codedesc_descdate_update_tl {#1}
+ %\tl_set:Nn \l__codedesc_descdate_update_tl {#1}
+ \seq_put_right:Nn \l__codedesc_descdate_update_seq {#1}
},
note.usage:n = general,
@@ -499,7 +493,8 @@
{
\bool_set_true:N \l__codedesc_descnotes_bool
\bool_set_true:N \l__codedesc_sidenote_bool
- \tl_set:Nn \l__codedesc_sidenote_tl {#1}
+% \tl_set:Nn \l__codedesc_sidenote_tl {#1}
+ \seq_put_right:Nn \l__codedesc_sidenote_seq {#1}
},
unknown.usage:n = general,
@@ -667,12 +662,14 @@
\bool_new:N \l__codedesc_descnotes_bool
\bool_new:N \l__codedesc_descdate_new_bool
-\tl_new:N \l__codedesc_descdate_new_tl
+%\tl_new:N \l__codedesc_descdate_new_tl
+\seq_new:N \l__codedesc_descdate_new_seq
\bool_new:N \l__codedesc_descdate_update_bool
-\tl_new:N \l__codedesc_descdate_update_tl
+%\tl_new:N \l__codedesc_descdate_update_tl
+\seq_new:N \l__codedesc_descdate_update_seq
\bool_new:N \l__codedesc_sidenote_bool
-\tl_new:N \l__codedesc_sidenote_tl
-
+%\tl_new:N \l__codedesc_sidenote_tl
+\seq_new:N \l__codedesc_sidenote_seq
\coffin_new:N \__codedesc_describe_coffin
\dim_new:N \__codedesc_describelabel_wd_dim
@@ -723,12 +720,27 @@
\\[-2.5ex]
\__codedesc_hline:nnnn {\color{black}}{0.5ex}{0.25}{0.25ex}
+%%% \bool_if:nT {\l__codedesc_descdate_new_bool}
+%%% {\scriptsize\color{black}new:~ \l__codedesc_descdate_new_tl\\[-1ex]}
\bool_if:nT {\l__codedesc_descdate_new_bool}
- {\scriptsize\color{black}new:~ \l__codedesc_descdate_new_tl\\[-1ex]}
+ {
+ \seq_map_inline:Nn \l__codedesc_descdate_new_seq
+ {\scriptsize\color{black}new:~ ##1\\[-1ex]}
+ }
+%%% \bool_if:nT {\l__codedesc_descdate_update_bool}
+%%% {\scriptsize\color{black}update:~ \l__codedesc_descdate_update_tl\\[-1ex]}
\bool_if:nT {\l__codedesc_descdate_update_bool}
- {\scriptsize\color{black}update:~ \l__codedesc_descdate_update_tl\\[-1ex]}
+ {
+ \seq_map_inline:Nn \l__codedesc_descdate_update_seq
+ {\scriptsize\color{black}update:~ ##1\\[-1ex]}
+ }
+%%% \bool_if:nT {\l__codedesc_sidenote_bool}
+%%% {\scriptsize\color{black}NB:~ \l__codedesc_sidenote_tl\\[-1ex]}
\bool_if:nT {\l__codedesc_sidenote_bool}
- {\scriptsize\color{black}NB:~ \l__codedesc_sidenote_tl\\[-1ex]}
+ {
+ \seq_map_inline:Nn \l__codedesc_sidenote_seq
+ {\scriptsize\color{black}NB:~ ##1\\[-1ex]}
+ }
\\[-1.5ex]
}
{
diff --git a/macros/latex/contrib/codedescribe/latex/codelisting.sty b/macros/latex/contrib/codedescribe/latex/codelisting.sty
index fa54237963..19c7fe854b 100644
--- a/macros/latex/contrib/codedescribe/latex/codelisting.sty
+++ b/macros/latex/contrib/codedescribe/latex/codelisting.sty
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version {1.3} {2024/01/06}
+%% This is version {1.4} {2024/02/17}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codedescribe
@@ -22,8 +22,8 @@
\ProvidesExplPackage
{codelisting}
- {2024/01/06}
- {1.3}
+ {2024/02/17}
+ {1.4}
{LaTeX Code Listing}
%%%%%%%
@@ -36,24 +36,16 @@
{
name .code:n = {codelisting} ,
prefix .code:n = {codelist} ,
- date .code:n = {2024/01/06} ,
- version .code:n = {1.3} ,
+ date .code:n = {2024/02/17} ,
+ version .code:n = {1.4} ,
description .code:n = {\LaTeX~Code~Listing}
}
-\cs_if_exist:NF \__codedesc_pkg_info:nn
+\cs_if_exist:NF \PkgInfo
{
- \cs_new_protected:Npn \__codedesc_pkg_info:nn #1#2
- { \keys_set:nn {#1 / pkg info}{#2} }
- }
-\cs_if_exist:NF \PkgInfo
- { \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} } }
-\cs_if_exist:NF \PkgDescription
- {
+ \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} }
\NewDocumentCommand \PkgDescription {m}
- {
- \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par
- }
- }
+ { \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par }
+ }
%%%%%%%
%%% End of cut-n-paste
%%%%%%%