texlive[68937] Master/texmf-dist: codedescribe (22nov23)
commits+karl at tug.org
commits+karl at tug.org
Wed Nov 22 22:50:32 CET 2023
Revision: 68937
https://tug.org/svn/texlive?view=revision&revision=68937
Author: karl
Date: 2023-11-22 22:50:31 +0100 (Wed, 22 Nov 2023)
Log Message:
-----------
codedescribe (22nov23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/codedescribe/README.md
trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.pdf
trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.tex
trunk/Master/texmf-dist/tex/latex/codedescribe/codedescribe.sty
trunk/Master/texmf-dist/tex/latex/codedescribe/codelisting.sty
Modified: trunk/Master/texmf-dist/doc/latex/codedescribe/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/codedescribe/README.md 2023-11-22 21:49:47 UTC (rev 68936)
+++ trunk/Master/texmf-dist/doc/latex/codedescribe/README.md 2023-11-22 21:50:31 UTC (rev 68937)
@@ -86,7 +86,11 @@
## Changelog
-* Version 1.1 (this)
+
+* Version 1.2 (this)
+ - Added of format key: basicstyle
+
+* Version 1.1
- Added two commands to allow <obj-types> customization
- requiring (now) pifont for EXP/rEXP <format-keys>
- Added a date command (auxiliary command)
Modified: trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.tex 2023-11-22 21:49:47 UTC (rev 68936)
+++ trunk/Master/texmf-dist/doc/latex/codedescribe/codedescribe.tex 2023-11-22 21:50:31 UTC (rev 68937)
@@ -197,7 +197,14 @@
When typesetting the 'code demo' (\tsobj{\tsdemo}) a set of rules is drawn. The Default, 1, equals to \tsobj{\arrayrulewidth} (usually 0.4pt).
\end{codedescribe}
+\begin{codedescribe}[key,new=2023/11/18]{basicstyle}%-very-long-long-long,xyz,xyh,kjh,ljd,kls}
+\begin{codesyntax} %
+ \tsobj[key]{basicstyle}
+\end{codesyntax}
+Sets the base font style used when typesetting the 'code demo', default being \tsobj{\footnotesize\ttfamily}
+\end{codedescribe}
+
\section{codedescribe Package}
This package aims at minimizing the number of commands, having the object kind (if a macro, or a function, or environment, or variable, or key ...) as a parameter, allowing for a simple 'extension mechanism': other object types can be easily introduced without having to change, or add commands.
@@ -309,17 +316,17 @@
\tsmacro{\begin{codedescribe}}[obj-type]{csv-list}
\ldots
\tsmacro{\end{codedescribe}}{}
-\end{codesyntax}[Note 1:]
+\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.
\end{codedescribe}
-\begin{tsremark}
+\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}]}
+\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}]}
\end{tsremark}
-\begin{tsremark}[Note 3:]
+\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}
@@ -421,10 +428,10 @@
\tsmacro{\typesetverb}[obj-type]{verbatim text}
\tsmacro{\tsverb}[obj-type]{verbatim text}
\end{codesyntax}
- Typesets \tsobj[marg]{verbatim text} as is (verbatim...). \tsobj[oarg]{obj-type} defines the used format. The difference with \tsverb{\tsobj[verb]{something}} is that \tsmeta{something} can contain commas (which, otherwise, would be interpreted as a list separator in \tsobj{\tsobj}.
+ Typesets \tsobj[marg]{verbatim text} as is (verbatim...). \tsobj[oarg]{obj-type} defines the used format. The difference with \tsverb{\tsobj[verb]{something}} is that \tsmeta{verbatim text} can contain commas (which, otherwise, would be interpreted as a list separator in \tsobj{\tsobj}.
\end{codedescribe}
\begin{tsremark}
-This is meant to short expressions, and not multi-line, complex code (one is better of, then, using \ref{codelist}). \tsobj[meta]{verbatim text} must be balanced ! otherwise, some low level \TeX\ errors may pop out.
+This is meant for short expressions, and not multi-line, complex code (one is better of, then, using \ref{codelist}). \tsobj[meta]{verbatim text} must be balanced ! otherwise, some low level \TeX\ errors may pop out.
\end{tsremark}
Modified: trunk/Master/texmf-dist/tex/latex/codedescribe/codedescribe.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/codedescribe/codedescribe.sty 2023-11-22 21:49:47 UTC (rev 68936)
+++ trunk/Master/texmf-dist/tex/latex/codedescribe/codedescribe.sty 2023-11-22 21:50:31 UTC (rev 68937)
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version 1.1 (2023/05/16)
+%% This is version {1.2} {2023/11/18}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codedescribe
@@ -19,11 +19,11 @@
%%
%%%==============================================================================
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\RequirePackage{ expl3 }
+
\ProvidesExplPackage
{codedescribe}
- {2023/05/16}
- {1.1}
+ {2023/11/18}
+ {1.2}
{LaTeX Code Description/Documentation}
%%%%%%%
@@ -34,11 +34,11 @@
%%%%%%%
\keys_define:nn { codedescribe / pkg info}
{
- name .code:n = codedescribe ,
- prefix .code:n = codedesc ,
- date .code:n = 2023/05/16 ,
- version .code:n = 1.1 ,
- description .code:n = \LaTeX~Code~Description/Documentation
+ name .code:n = {codedescribe} ,
+ prefix .code:n = {codedesc} ,
+ date .code:n = {2023/11/18} ,
+ version .code:n = {1.2} ,
+ description .code:n = {\LaTeX~Code~Description/Documentation}
}
\cs_if_exist:NF \__codedesc_pkg_info:nn
{
@@ -47,6 +47,13 @@
}
\cs_if_exist:NF \PkgInfo
{ \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} } }
+\cs_if_exist:NF \PkgDescription
+ {
+ \NewDocumentCommand \PkgDescription {m}
+ {
+ \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par
+ }
+ }
%%%%%%%
%%% End of cut-n-paste
%%%%%%%
Modified: trunk/Master/texmf-dist/tex/latex/codedescribe/codelisting.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/codedescribe/codelisting.sty 2023-11-22 21:49:47 UTC (rev 68936)
+++ trunk/Master/texmf-dist/tex/latex/codedescribe/codelisting.sty 2023-11-22 21:50:31 UTC (rev 68937)
@@ -12,7 +12,7 @@
%%
%% The Current Maintainer of this work is Alceu Frigeri
%%
-%% This is version 1.1 (2023/05/16)
+%% This is version {1.2} {2023/11/18}
%%
%% The list of files that compose this work can be found in the README.md file at
%% https://ctan.org/pkg/codedescribe
@@ -19,11 +19,11 @@
%%
%%%==============================================================================
\NeedsTeXFormat{LaTeX2e}[2022/06/01]
-\RequirePackage{ expl3 }
+
\ProvidesExplPackage
{codelisting}
- {2023/05/16}
- {1.1}
+ {2023/11/18}
+ {1.2}
{LaTeX Code Listing}
%%%%%%%
@@ -34,11 +34,11 @@
%%%%%%%
\keys_define:nn { codelisting / pkg info}
{
- name .code:n = codelisting ,
- prefix .code:n = codelist ,
- date .code:n = 2023/05/16 ,
- version .code:n = 1.1 ,
- description .code:n = \LaTeX~Code~Listing
+ name .code:n = {codelisting} ,
+ prefix .code:n = {codelist} ,
+ date .code:n = {2023/11/18} ,
+ version .code:n = {1.2} ,
+ description .code:n = {\LaTeX~Code~Listing}
}
\cs_if_exist:NF \__codedesc_pkg_info:nn
{
@@ -47,6 +47,13 @@
}
\cs_if_exist:NF \PkgInfo
{ \NewDocumentCommand \PkgInfo {mm} { \keys_set:nn {#1 / pkg info}{#2} } }
+\cs_if_exist:NF \PkgDescription
+ {
+ \NewDocumentCommand \PkgDescription {m}
+ {
+ \noindent Package~ \textbf{\PkgInfo{#1}{name}}~Version:~\PkgInfo{#1}{version}~ -~ \PkgInfo{#1}{date}\par \emph{\PkgInfo{#1}{description}}~\par
+ }
+ }
%%%%%%%
%%% End of cut-n-paste
%%%%%%%
@@ -262,6 +269,12 @@
ruleht .usage:n = general,
ruleht .code:n = { \tl_set:Nn \l__codelist_ruleheight_tl {#1} },
ruleht .default:n = 1,
+
+ basicstyle .usage:n = general,
+ basicstyle .code:n = { \tl_set:Nn \l__codelist_basicstyle_tl {#1} },
+ basicstyle .default:n = \footnotesize\ttfamily ,
+
+ \l__codelist_basicstyle_tl
default .usage:n = general,
default .meta:n = {
@@ -280,7 +293,8 @@
numbers , numberstyle ,
parindent ,
codeprefix , resultprefix ,
- ruleht ,
+ ruleht ,
+ basicstyle ,
},
}
@@ -414,7 +428,7 @@
frame = none,
aboveskip = 0pt,%-2ex,
belowskip = 0pt,%-2ex,
- basicstyle = \footnotesize\ttfamily ,
+ basicstyle = {\l__codelist_basicstyle_tl}, %%\footnotesize\ttfamily ,
rulesep = 0pt,
breaklines = true,
breakindent = 3em,
More information about the tex-live-commits
mailing list.