texlive[64287] Master: democodetools (4sep22)

commits+karl at tug.org commits+karl at tug.org
Sun Sep 4 22:49:03 CEST 2022


Revision: 64287
          http://tug.org/svn/texlive?view=revision&revision=64287
Author:   karl
Date:     2022-09-04 22:49:03 +0200 (Sun, 04 Sep 2022)
Log Message:
-----------
democodetools (4sep22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/democodetools/
    trunk/Master/texmf-dist/doc/latex/democodetools/README.md
    trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf
    trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.tex
    trunk/Master/texmf-dist/tex/latex/democodetools/
    trunk/Master/texmf-dist/tex/latex/democodetools/democodelisting.sty
    trunk/Master/texmf-dist/tex/latex/democodetools/democodetools.sty
    trunk/Master/tlpkg/tlpsrc/democodetools.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/democodetools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/democodetools/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/democodetools/README.md	2022-09-04 20:49:03 UTC (rev 64287)
@@ -0,0 +1,42 @@
+%%%==============================================================================
+%% Copyright 2022 by Alceu Frigeri
+%%
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status “maintained”.
+%% 
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version 1.0beta (2022/09/01)
+%%
+%%
+%% This work consists of the files 
+%%
+%% democodelisting.sty          set of macros to typeset and demonstrate LaTeX code
+%% democodetools.sty            set of macros to document LaTeX packages
+%%
+%% README.md (this file)        quick introduction
+%%
+%% democode.tex                 LaTeX documentation
+%% democode.pdf                 documentation in PDF form
+%%
+%%%==============================================================================
+
+This is 'yet another doc/docx/doc3' package for LaTeX code documetation (and demonstration). 
+It is designed to be 'as class independent as possible', 
+meaning: it makes no assumption about page layout (besides 'having a marginpar') or underline macros. 
+Furthermore, it's assumed that \maketitle and the abstract environment 
+were modified by the underline class, so alternatives (based on the article class) are provided. 
+
+For more details, see the documentation, democodetools.pdf (source code: democodetools.tex)
+
+The main idea is to be able to document  a package/class loading it first and then this package, 
+making it possible not only to document the 'syntax' 
+but also to show the end result 'as is' when using that other specific class/package.


Property changes on: trunk/Master/texmf-dist/doc/latex/democodetools/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf	2022-09-04 20:47:46 UTC (rev 64286)
+++ trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf	2022-09-04 20:49:03 UTC (rev 64287)

Property changes on: trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.tex	2022-09-04 20:49:03 UTC (rev 64287)
@@ -0,0 +1,355 @@
+%%%==============================================================================
+%% Copyright 2022 by Alceu Frigeri
+%%
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status “maintained”.
+%%
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version 1.0beta (2022/09/01)
+%%
+%%
+%% This work consists of the files
+%%
+%% democodelisting.sty          set of macros to typeset and demonstrate LaTeX code
+%% democodetools.sty            set of macros to document LaTeX packages
+%%
+%% README.md                    quick introduction
+%%
+%% democodetools.tex            LaTeX documentation (this file)
+%% democodetools.pdf            documentation in PDF form
+%%
+%%%==============================================================================
+\makeatletter
+\def\tc at tmp@packname{democodetoolsdoc}
+\def\tc at tmp@altpackname{democodetoolsdoc}
+\def\tc at tmp@packdesc{Demo Code Tools Documentantion}
+\def\tc at tmp@packdate{2022/09/01}
+\def\tc at tmp@packversion{1.0beta}
+\let\@exp\expandafter
+\@exp\edef\csname\tc at tmp@altpackname version\endcsname{\tc at tmp@packversion}
+\makeatother
+
+\documentclass[dctools,english]{ufrgscca}
+\usepackage{democodetools}
+
+\dcTitle{The democodetools and democodelisting Packages - Version \democodetoolsversion}
+\dcAuthor{Alceu Frigeri}
+\dcDate{September 2022}
+
+\begin{document}
+
+\dcMakeTitle
+
+\begin{dcAbstract}
+This is `yet another doc/docx/doc3' package. It is designed to be `as class independent as possible', meaning: it makes no assumption about page layout (besides `having a marginpar') or underline macros. Furthermore, it's assumed that \Macro{\maketitle}{} and the \Key{abstract} environment were modified by the underline class, so alternatives (based on the article class) are provided. The main idea is to be able to document  a package/class loading it first and then this, so that it is possible not only to document the `syntax' but also to show the end result `as is' when using that other specific class/package.
+
+\end{dcAbstract}
+
+\tableofcontents
+
+\section{Introduction}
+The packages/classes doc/docx/doc3 (and for that matter doctools) where designed to be used with dtx files, which is handy for package developers, as long as one is fine with the `default article' format (which is true most of the time). This came to be from the willingness of having the `new look and feel' used in doc3, but, instead of having to rely on a standard class, being able to use any class as the base one, which allows to `demonstrate the documented commands with the final layout'.\\
+
+\Pack{democodelisting} defines a few macros to display and demonstrate \LaTeX~ code verbatim (using \Pack{listings} and \Pack{scontents}), whilst \Pack{democodetools} defines a series of macros to display/enumerate macros and environments (somewhat resembling the \Pack{doc3} style).\\
+\subsection{Current Version}
+This doc regards to \Pack{democodelisting} version \democodelistingversion~ and \Pack{democodetools} version \democodetoolsversion. Those two packages are 'usable' but they haven't been thoroughly tested, nor should  anyone consider them stable (they might be considered more or less stable but more due the 'maintainer'  lack of time than anything else. Use it at your own risk.)
+
+\section{democodelisting Package}
+
+It requires two packages: \Pack{listings} and \Pack{scontents}\\
+Defines an environment: \Env{stcode} and\\
+ 4 commands: \Macro{\DemoCode}{}, \Macro{\DisplayCode}{},  \Macro{\TabbedDisplayCode}{} and \Macro{\setdclisting}{}.
+
+\subsection{In Memory Code Storage}
+Thanks to \Pack{scontents} (\Pack{expl3} based) it's possible to store \LaTeX~ code snippets in a \Pack{expl3} key.
+
+\begin{Envs}{stcode}
+	\begin{Syntax}%
+		\Macro{\begin{stcode}}[keys]{} \Macro{\end{stcode}}{}
+	\end{Syntax}
+This environment is an alias to \Env{scontents} environment (from \Pack{scontents} package), all \Pack{scontents} keys are valid, with an additional one: \Key{st} which is an alias to the \Key{store-env} key.
+The environment body is stored verbatim in the \Key{st} named key.
+\end{Envs}
+
+\subsection{Code Display/Demo}
+\begin{Macros}{\DisplayCode,\DemoCode,\TabbedDemoCode}
+	\begin{Syntax}%
+		\Macro{\DisplayCode}[dclisting-keys]{st-name}
+		\Macro{\DemoCode}[dclisting-keys]{st-name}
+		\Macro{\TabbedDemoCode}[dclisting-keys]{st-name}
+	\end{Syntax}
+\end{Macros}
+\Macro{\DisplayCode}{} just typesets \Arg{st-name} (the key-name created with \Env{stcode}), in verbatim mode with syntax highlight.\\
+\Macro{\DemoCode}{} first typesets \Arg{st-name}, as above, then it \emph{executes} said code.
+Finally \Macro{\TabbedDemoCode}{} does the same, but typesetting it, and executed code, side by side. N.B. Both typeset  and executed code are placed inside a \Env{minipage} so that, when \emph{executing} the code, one can have, for instance, 'normal' paragraph indentation.\\
+For Example:
+
+\begin{stcode}[st=demostcode]
+	\begin{stcode}[st=stmeta]
+		Some \LaTeX~coding, for example: \ldots.
+\end{stcode}
+This will just typesets \Key{stmeta}:
+
+ \DisplayCode{stmeta}
+
+and this will demonstrate it, side by side with source code:
+
+\TabbedDemoCode[numbers=left,codeprefix={inner code},resultprefix={inner result}]{stmeta}
+\end{stcode}
+
+\DemoCode[emph={DisplayCode,TabbedDemoCode},keywd2={stcode}]{demostcode}
+
+\begin{Macros}{\setdclisting}
+	\begin{Syntax}%
+		\Macro{\setdclisting}{dclisting-keys}
+	\end{Syntax}
+Instead of setting/defining \Meta{dclisting-keys} per \Macro{\Demo}{}/\Macro{\Display}{} call, one can set those \emph{globally}, better said, \emph{in the called context group} .\\
+N.B.: All \Macro{\Display}{}/\Macro{\Demo}{} commands create a local group (\Macro{\begingroup}{}) in which the \Meta{dclisting-keys} are defined, and discarded once said local group is closed. \Macro{\setdclisting}{} defines those keys in the \emph{current} context/group (\Macro{\def}{}, \Macro{\edef}{})
+\end{Macros}
+
+\subsubsection{\Meta{dclisting-keys}}
+Using a \Key{key}\,=\Value{value} syntax, one can fine tune \Pack{listings} syntax highlight.
+\begin{Args}
+\DescribeArg{dclisting-keys}
+\begin{Syntax} %
+	\Keylst{settexcs,settexcs2,settexcs3}
+	\Keylst{texcs,texcs2,texcs3}
+	\Keylst{texcsstyle,texcs2style,texcs3style}
+\end{Syntax}Those define sets of \LaTeX~commands (csnames), the \Key{set} variants initialize/redefine those sets (an empty list, clears the set), while the others extend those sets. The \Key{style} ones redefines the command display style (an empty \Meta{par} resets the style to it's default).\\
+
+\begin{Syntax}	%
+	\Keylst{setkeywd,setkeywd2,setkeywd3}
+	\Keylst{keywd,keywd2,keywd3}
+	\Keylst{keywdstyle,keywd2style,keywd3style}
+\end{Syntax}
+Same for other \emph{keywords} sets.\\
+
+\begin{Syntax}	%
+	\Keylst{setemph,setemph2,setemph3}
+	\Keylst{emph,emph2,emph3}
+	\Keylst{emphstyle,emph2style,emph3style}
+\end{Syntax}
+for some extra emphasis sets.\\
+
+\begin{Syntax} %
+	\Keylst{numbers,numberstyle}
+\end{Syntax}
+\Key{numbers} possible values are \Value{none} (default) and \Value{left} (to add tinny numbers to the left of the listing). With \Key{numberstyle} one can redefine the numbering style.\\
+
+\begin{Syntax} %
+	\Keylst{stringstyle,commentstyle}
+\end{Syntax}
+to redefine \Key{strings} and \Key{comments} formatting style.\\
+
+\begin{Syntax} %
+	\Key{bckgndcolor}
+\end{Syntax}
+to change the listing background's color.\\
+
+\begin{Syntax} %
+	\Keylst{codeprefix,resultprefix}
+\end{Syntax}
+those set the \Key{codeprefix} (default: \LaTeX~Code:) and \Key{resultprefix} (default: \LaTeX~Result:)
+\end{Args}
+
+\section{democodetools Package}
+
+
+
+
+\subsection{Environments}
+\begin{Envs}{Macros,Envs}
+\begin{Syntax}%
+\Macro{\begin{Macros}}{macrolist}
+\Macro{\begin{Envs}}{envlist}
+\end{Syntax}
+Those are the two main environments to describe \Env{Macros} and \Env{Environments}. Both typeset \Arg{macrolist} (csv list) or \Arg{envlist} (csv list) in the margin. N.B. Each element of the list gets \Macro{\detokenize}{}
+\end{Envs}
+
+\begin{Envs}{Syntax}
+\begin{Syntax}%
+\Macro{\begin{Syntax}}{}
+\end{Syntax}
+The \Env{Syntax} environment sets the fontsize and activates \Macro{\obeylines}{}, so one can list macros/cmds/keys use, one per line.
+
+\begin{stcode}[st=demoD]
+\begin{Envs}{Macros,Envs}
+\begin{Syntax}%
+\Macro{\begin{Macros}}{macrolist}
+\Macro{\begin{Envs}}{envlist}
+\end{Syntax}
+Those are the two main ...
+\end{Envs}
+\end{stcode}
+\DisplayCode{demoD}
+
+\end{Envs}
+
+
+\begin{Envs}{Args,Keys,Values,Options}
+\begin{Syntax}%
+\Macro{\begin{Args}}{}
+\Macro{\begin{Args+}}{}
+\Macro{\begin{Keys}}{}
+\Macro{\begin{Keys+}}{}
+\Macro{\begin{Values}}{}
+\Macro{\begin{Values+}}{}
+\Macro{\begin{Options}}{}
+\Macro{\begin{Options+}}{}
+\end{Syntax}
+
+Those environments are all the same, starting a dedicated \emph{description list}. Together with the many \Macro{\Description...}{} commands, one can list all \Keylst{Options, Args, Keys, Values} as needed. The \Key{+} form are meant to be used with the \Macro{\Description...+}{} forms, for \emph{in text} lists. The non \Key{+} form are meant to have the many \emph{'descriptors'} in the \emph{margin par}.
+\end{Envs}
+
+\subsection{Describe Commands}
+\begin{Macros}{\DescribeMacro}
+\begin{Syntax}%
+\Macro!{\DescribeMacro}<*!+>{\marg{csname}\oarg{oarglist}\marg{marglist}}
+\end{Syntax}
+\begin{Args+}
+\DescribeKey+{*} typesets the macro name in bold face.
+\DescribeKey+{!} \Arg{marglist} is treated as an expandable code, 'as is'.
+\DescribeKey+{+} the macro name is typeseted in text.
+\DescribeArg+{csname} macro name (\Macro{\detokenize}{})
+\DescribeArg+{oarglist} csv list of optional args.
+\DescribeArg+{marglist} csv list of mandatory args.
+\end{Args+}
+\end{Macros}
+
+\begin{Macros}{\DescribeArg,\DescribeKey,\DescribeValue,\DescribeOption,\DescribePackage,}
+\begin{Syntax}%
+\Macro{\DescribeArg}<*+>[type]{arg}
+\Macro{\DescribeKey}<*+>[type]{arg}
+\Macro{\DescribeValue}<*+>[type]{arg}
+\Macro{\DescribeOption}<*+>[type]{arg}
+\Macro{\DescribePackage}<*+>[type]{arg}
+\end{Syntax}
+\begin{Args+}
+\DescribeKey+{*} typesets it in bold face.
+\DescribeKey+{+} typesets in text (not in marginpar)
+\DescribeArg+{type} key/arg/... format
+\DescribeArg+{arg} key/arg/... name.
+\end{Args+}
+\end{Macros}
+
+
+\subsection{Macros Typeset}
+\begin{Macros}{\Macro}
+	\begin{Syntax}%
+		\Macro!{\Macro}{\marg{csname}\xarg{embl}\oarg{olist}\marg{mlist}}
+		\Macro!{\Macro}<!>{\marg{csname}\xarg{embl}\marg{par.desc.}}
+	\end{Syntax}
+	When describing a macro \Arg{csname} (Command Sequence, csname) the \Arg{olist} and \Arg{mlist} are comma separated lists (csv) of optional and mandatory arguments. \Arg{embl} are optional, single char,  'embellishment' tokens, like {\bfseries * ! +}. Finally, in the {\bfseries !} form, the \Arg{par.desc.} is any text representing the macro parameter list (for non regular, non usual, cases).
+
+	\begin{stcode}[st=demoB]
+		\Macro
+		{\Macro}<*!>[opt1,opt2]{arg3}
+		\Macro!
+		{\Macro}<!>{\xarg{embl}\marg{par.desc.}}
+\end{stcode}
+	\TabbedDemoCode{demoB}
+\end{Macros}
+
+\subsection{Args  Typeset}
+\begin{Macros}{\oarg,\marg,\parg,\xarg,\Arg,\Meta}
+	\begin{Syntax}%
+		\Macro{\oarg}[type]{arg}
+		\Macro{\marg}[type]{arg}
+		\Macro{\parg}[type]{arg}
+		\Macro{\xarg}[type]{arg}
+		\Macro{\Arg}[type]{arg}
+		\Macro{\Meta}{arg}
+	\end{Syntax}
+	Those are meant to typeset the diverse kinds of 'command's arguments' (mandatory, optional, parenthesis . . .). \Macro{\Meta{arg}}{} typesets \emph{arg} as \Meta{arg}.
+	\begin{Args}
+		\DescribeArg{type} defaults to \Value{Meta} (it's the csname of any valid formatting command, like Meta, textbf, etc.)
+		\DescribeArg{arg} the argument name itself.
+	\end{Args}
+	\begin{stcode}[st=demoA]
+		\oarg{fam}
+		\parg{xtra}
+		\marg[textbf]{text}
+		\xarg{x-text}
+\end{stcode}
+	\TabbedDemoCode{demoA}
+\end{Macros}
+
+\subsection{Keys  Typeset}
+\begin{Macros}{\Key,\Keylst,\KeyUse}
+	\begin{Syntax}%
+		\Macro{\Key}[pre]{key}
+		\Macro{\Keylst}[default]{keylst}
+		\Macro{\KeyUse}{key}{value}
+	\end{Syntax}
+	To typeset a \Arg{Key} or \Arg{keylst} (csv list). \Arg{pre} is just prepended to \Arg{key} whilst \Arg{default} is the default key value. \Macro{\KeyUse}{} is just a short-cut for a, possible, common construction.
+
+	\begin{stcode}[st=demoC]
+		\Key{Akey}
+
+		\Keylst[Bkey]{Akey,Bkey}
+
+		\KeyUse{keyA}{arg}
+\end{stcode}
+	\TabbedDemoCode{demoC}
+
+\end{Macros}
+
+\begin{Macros}{\Env,\Pack,\Value}
+	\begin{Syntax}%
+		\Macro{\Env}[pre]{key}
+		\Macro{\Pack}[pre]{key}
+		\Macro{\Value}[pre]{key}
+	\end{Syntax}
+	Similar to \Macro{\Key}{} above, they will typeset a \Arg{Key}. \Arg{pre} is just prepended to \Arg{key} whilst \Arg{default} is the default key value.
+
+
+\end{Macros}
+
+
+\subsection{Others}
+\begin{Macros}{\MetaFmt}
+	\begin{Syntax}%
+		\Macro{\MetaFmt}<*>[type]{}
+	\end{Syntax}
+It sets the font size, series, face as defined by \Meta{type}, \Meta{type} being one of \Keylst{Oarg,Marg,Parg,Xarg,Macro,Code,Key,KeyVal,Option,Value,Default}. The star version uses bold.
+\end{Macros}
+
+
+\begin{Macros}{\MarginNote}
+	\begin{Syntax}%
+		\Macro{\MarginNote}{text}
+	\end{Syntax}
+As the name implies, to add small margin notes.
+\end{Macros}
+
+
+\begin{Macros}{\dcAuthor,\dcDate,\dcTitle,\dcMakeTitle}
+	\begin{Syntax}%
+		\Macro{\dcAuthor}{name}
+		\Macro{\dcDate}{date}
+		\Macro{\dcTitle}{title}
+		\Macro{\dcMakeTitle}{}
+	\end{Syntax}
+Those allow one to define (as in standard article, book, report classes) the document \emph{author}, \emph{date} and \emph{date} \Macro{\dcMakeTitle}{} will write a typical title+author heading (as in the article class).
+\end{Macros}
+
+\begin{Envs}{dcAbstract}
+	\begin{Syntax}%
+		\Macro{\begin{dcAbstract}}{}  		\Macro{\end{dcAbstract}}{}
+	\end{Syntax}
+Same as above, for the abstract.
+\end{Envs}
+
+
+
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/democodetools/democodetools.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/democodetools/democodelisting.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/democodetools/democodelisting.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/democodetools/democodelisting.sty	2022-09-04 20:49:03 UTC (rev 64287)
@@ -0,0 +1,522 @@
+%%%==============================================================================
+%% Copyright 2022 by Alceu Frigeri
+%%
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status “maintained”.
+%%
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version 1.0beta (2022/09/01)
+%%
+%%
+%% This work consists of the files
+%%
+%% democodelisting.sty          set of macros to typeset and demonstrate LaTeX code
+%% democodetools.sty            set of macros to document LaTeX packages
+%%
+%% README.md                    quick introduction
+%%
+%% democodetools.tex            LaTeX documentation
+%% democodetools.pdf            documentation in PDF form
+%%
+%%%==============================================================================
+\NeedsTeXFormat{LaTeX2e}[2022/06/01]
+\def\tc at tmp@packname{democodelisting}
+\def\tc at tmp@altpackname{democodelisting}
+\def\tc at tmp@packdesc{Demo Code Listing}
+\def\tc at tmp@packdate{2022/09/01}
+\def\tc at tmp@packversion{1.0beta}
+\let\@exp\expandafter
+\@exp\edef\csname\tc at tmp@altpackname version\endcsname{\tc at tmp@packversion}
+\@exp\@exp\@exp\ProvidesPackage\@exp\@exp\@exp{\@exp\tc at tmp@packname\@exp}\@exp[\tc at tmp@packdate\space v\tc at tmp@packversion\space\tc at tmp@packdesc]
+
+\RequirePackage{listings}
+\RequirePackage{scontents}
+
+\newlength{\dc at demo@parindent}
+\newlength{\dc at org@parindent}
+\setlength\dc at org@parindent{\parindent}
+\setlength\parindent{0pt}
+
+
+\colorlet{dc at lightcyan}{white!97!cyan}
+\colorlet{dc at lightgray}{white!97!black}
+\definecolor{dc at grayblack}{rgb}{0.8,0.8,0.8}
+
+\colorlet{dc at darkgreen}{green!45!black!100}
+\colorlet{dc at darkteal}{teal!45!black!100}
+\colorlet{dc at darkblue}{blue!40!black!100}
+\colorlet{dc at darkred}{red!45!black!100}
+
+\colorlet{dc at blueishblack}{blue!75!black!100}
+\colorlet{dc at reddishblack}{red!60!black!100}
+\colorlet{dc at greenishblack}{green!45!black!100}
+
+\def\dc at lstbckgndcolordefault{dc at lightgray}%
+\def\dc at lststringcolordefault{dc at darkteal}
+\def\dc at lstcommentcolordefault{dc at darkgreen}
+\def\dc at lsttexcscolordefault{dc at darkblue}
+\def\dc at lstkeywdcolordefault{dc at darkblue}
+
+\def\dc at lsttexcsBcolordefault{dc at blueishblack}
+\def\dc at lstkeywdBcolordefault{dc at greenishblack}
+\def\dc at lstemphcolordefault{dc at reddishblack}
+
+\colorlet{dc at lstnumbercolordefault}{white!50!black!100}
+
+\def\dc at lstrulecolordefault{gray}
+\def\dc at lstnumbercolordefault{gray}
+
+\DeclareKeys[dclisting]{
+  settexcs.usage = general,
+  settexcs.code = {\ifblank{#1}{\def\dc at lsttexcs{}}{\def\dc at lsttexcs{#1}}},
+  texcs.usage = general,
+  texcs.code = {\ifblank{#1}{}{\edef\dc at lsttexcs{\dc at lsttexcs,#1}}},
+  texcsstyle.usage = general,
+  texcsstyle.code = {\ifblank{#1}{\def\dc at lsttexcsstyle{\bfseries\color{\dc at lsttexcscolordefault}}}{\def\dc at lsttexcsstyle{#1}}},
+
+  settexcs2.usage = general,
+  settexcs2.code = {\ifblank{#1}{\def\dc at lsttexcsB{}}{\def\dc at lsttexcsB{#1}}},
+  texcs2.usage = general,
+  texcs2.code = {\ifblank{#1}{}{\edef\dc at lsttexcsB{\dc at lsttexcsB,#1}}},
+  texcs2style.usage = general,
+  texcs2style.code = {\ifblank{#1}{\def\dc at lsttexcsBstyle{\bfseries\color{\dc at lsttexcsBcolordefault}}}{\def\dc at lsttexcsBstyle{#1}}},
+
+  settexcs3.usage = general,
+  settexcs3.code = {\ifblank{#1}{\def\dc at lsttexcsC{}}{\def\dc at lsttexcsC{#1}}},
+  texcs3.usage = general,
+  texcs3.code = {\ifblank{#1}{}{\edef\dc at lsttexcsC{\dc at lsttexcsC,#1}}},
+  texcs3style.usage = general,
+  texcs3style.code = {\ifblank{#1}{\def\dc at lsttexcsCstyle{\bfseries\color{\dc at lsttexcsBcolordefault}}}{\def\dc at lsttexcsCstyle{#1}}},
+
+  setkeywd.usage = general,
+  setkeywd.code = {\ifblank{#1}{\def\dc at lstkeywd{}}{\def\dc at lstkeywd{#1}}},
+  keywd.usage = general,
+  keywd.code = {\ifblank{#1}{}{\edef\dc at lstkeywd{\dc at lstkeywd,#1}}},
+  keywdstyle.usage = general,
+  keywdstyle.code = {\ifblank{#1}{\def\dc at lstkeywdstyle{\bfseries\color{\dc at lstkeywdcolordefault}}}{\def\dc at lstkeywdstyle{#1}}},
+
+  setkeywd2.usage = general,
+  setkeywd2.code = {\ifblank{#1}{\def\dc at lstkeywdB{}}{\def\dc at lstkeywdB{#1}}},
+  keywd2.usage = general,
+  keywd2.code = {\ifblank{#1}{}{\edef\dc at lstkeywdB{\dc at lstkeywdB,#1}}},
+  keywd2style.usage = general,
+  keywd2style.code = {\ifblank{#1}{\def\dc at lstkeywdBstyle{\bfseries\color{\dc at lstkeywdBcolordefault}}}{\def\dc at lstkeywdBstyle{#1}}},
+
+  setkeywd3.usage = general,
+  setkeywd3.code = {\ifblank{#1}{\def\dc at lstkeywdC{}}{\def\dc at lstkeywdC{#1}}},
+  keywd3.usage = general,
+  keywd3.code = {\ifblank{#1}{}{\edef\dc at lstkeywdC{\dc at lstkeywdC,#1}}},
+  keywd3style.usage = general,
+  keywd3style.code = {\ifblank{#1}{\def\dc at lstkeywdCstyle{\bfseries\color{\dc at lstkeywdBcolordefault}}}{\def\dc at lstkeywdCstyle{#1}}},
+
+  setemph.usage = general,
+  setemph.code = {\ifblank{#1}{\def\dc at lstemph{}}{\def\dc at lstemph{#1}}},
+  emph.usage = general,
+  emph.code = {\ifblank{#1}{}{\edef\dc at lstemph{\dc at lstemph,#1}}},
+  emphstyle.usage = general,
+  emphstyle.code = {\ifblank{#1}{\def\dc at lstemphstyle{\bfseries\color{\dc at lstemphcolordefault}}}{\def\dc at lstemphstyle{#1}}},
+
+  setemph2.usage = general,
+  setemph2.code = {\ifblank{#1}{\def\dc at lstemphB{}}{\def\dc at lstemphB{#1}}},
+  emph2.usage = general,
+  emph2.code = {\ifblank{#1}{}{\edef\dc at lstemphB{\dc at lstemphB,#1}}},
+  emph2style.usage = general,
+  emph2style.code = {\ifblank{#1}{\def\dc at lstemphBstyle{\bfseries\color{\dc at lstemphcolordefault}}}{\def\dc at lstemphBstyle{#1}}},
+
+  setemph3.usage = general,
+  setemph3.code = {\ifblank{#1}{\def\dc at lstemphC{}}{\def\dc at lstemphC{#1}}},
+  emph3.usage = general,
+  emph3.code = {\ifblank{#1}{}{\edef\dc at lstemphC{\dc at lstemphC,#1}}},
+  emph3style.usage = general,
+  emph3style.code = {\ifblank{#1}{\def\dc at lstemphCstyle{\bfseries\color{\dc at lstemphcolordefault}}}{\def\dc at lstemphCstyle{#1}}},
+
+  stringstyle.usage = general,
+  stringstyle.code = {\ifblank{#1}{\def\dc at lststringstyle{\color{\dc at lststringcolordefault}}}{\def\dc at lststringstyle{#1}}},
+
+  commentstyle.usage = general,
+  commentstyle.code = {\ifblank{#1}{\def\dc at lstcommentstyle{\color{\dc at lstcommentcolordefault}}}{\def\dc at lstcommentstyle{#1}}},
+
+  bckgndcolor.usage = general,
+  bckgndcolor.code = {\ifblank{#1}{\def\dc at lstbckgndcolor{\color{\dc at lstbckgndcolordefault}}}{\def\dc at lstbckgndcolor{#1}}},
+
+  rulecolor.usage = general,
+  rulecolor.code = {\ifblank{#1}{\def\dc at lstrulecolor{\color{\dc at lstrulecolordefault}}}{\def\dc at lstrulecolor{#1}}},
+
+  numbers.usage = general,
+  numbers.code = {\ifblank{#1}{\def\dc at lstnumbers{none}}{\def\dc at lstnumbers{#1}}},
+
+  numberstyle.usage = general,
+  numberstyle.code = {\ifblank{#1}{\def\dc at lstnumberstyle{\tiny\color{\dc at lstnumbercolordefault}}}{\def\dc at lstnumberstyle{#1}}},
+
+  parindent.usage = general,
+  parindent.code = {\setlength\dc at demo@parindent{\parindent}\setdcpar{#1}},
+
+  default.usage = general,
+  default.code = {\dc at lstkeysdefault},
+}
+\NewDocumentCommand{\setdclisting}{m}{\SetKeys[dclisting]{#1}}
+\NewDocumentCommand{\dc at lstkeysdefault}{}{%
+    \setdclisting{%
+		    settexcs,texcsstyle,settexcs2,texcs2style,settexcs3,texcs3style,%
+		    setkeywd,keywdstyle,setkeywd2,keywd2style,setkeywd3,keywd3style,%
+		    setemph,emphstyle,setemph2,emph2style,setemph3,emph3style,%
+		    stringstyle,commentstyle,bckgndcolor,rulecolor,%
+		    numbers,numberstyle,%
+		}%
+}
+\setdclisting{default}
+
+\DeclareKeys[dcpar]{
+	org.usage = general,
+	org.code = {\setlength\dc at demo@parindent\dc at org@parindent},
+	default.usage = general,
+	default.code = {\setlength\dc at demo@parindent\parindent},
+}
+\DeclareUnknownKeyHandler[dcpar]{\ifblank{#1}{\setlength\dc at demo@parindent\dc at org@parindent}{\setlength\dc at demo@parindent{#1}}}
+
+\NewDocumentCommand{\setdcpar}{m}{\SetKeys[dcpar]{#1}}
+
+\DeclareKeys[dclisting]{
+	codeprefix.usage = general,
+	codeprefix.code = {\ifblank{#1}{\def\dc at codeprefix{\LaTeX~Code:}}{\def\dc at codeprefix{#1}}},
+
+	resultprefix.usage = general,
+	resultprefix.code = {\ifblank{#1}{\def\dc at resultprefix{\LaTeX~Result:}}{\def\dc at resultprefix{#1}}},
+
+	defaulttools.usage = general,
+	defaulttools.code = {\SetKeys[dclisting]{codeprefix,resultprefix}} ,
+}
+%\DeclareUnknownKeyHandler[dclisting]{\setdclisting{#1={#2}}}
+
+%\NewDocumentCommand{\setdctools}{m}{\SetKeys[dctools]{#1}}
+\SetKeys[dclisting]{defaulttools}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%
+%%%
+%%%  From doctools.dtx file
+%%% lstlistings 'definitions'
+%%%
+%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%
+
+%%% listings
+%
+\lstdefinestyle{lstStyleDefault}{
+%%% appearance
+   ,basicstyle=\small\ttfamily % Standardschrift
+%%%  Space and placement
+   ,floatplacement=tbp    % is used as float place specifier
+   ,aboveskip=\medskipamount % define the space above and
+   ,belowskip=\medskipamount % below displayed listings.
+   ,lineskip=0pt          % specifies additional space between lines in listings.
+   ,boxpos=c              % c,b,t
+%%% The printed range
+   ,showlines=false       % prints empty lines at the end of listings
+%%% characters
+   ,extendedchars=true   % allows or prohibits extended characters
+                         % in listings, that means (national)
+                         % characters of codes 128-255.
+   ,upquote=true         % determines printing of quotes
+   ,tabsize=2,           % chars of tab
+   ,showtabs=false       % do not show tabs
+   ,showspaces=false     % do not show spaces
+   ,showstringspaces=false % do not show blank spaces in string
+%%% Line numbers
+   ,numbers=none         % left, right, none
+%%% Captions
+   ,numberbychapter=true %
+   ,captionpos=b         % t,b
+   ,abovecaptionskip=\smallskipamount % the vertical space respectively above
+   ,belowcaptionskip=\smallskipamount % or below each caption
+%%% Margins and line shape
+   ,linewidth=\linewidth % defines the base line width for listings.
+   ,xleftmargin=0pt      % extra margins
+   ,xrightmargin=0pt     %
+   ,resetmargins=false   % indention from list environments like enumerate
+                         % or itemize is reset, i.e. not used.
+   ,breaklines=true      % line breaking of long lines.
+   ,breakatwhitespace=false % allows line breaks only at white space.
+   ,breakindent=0pt     % is the indention of the second, third, ...
+                         % line of broken lines.
+   ,breakautoindent=true % apply intendation
+   ,columns=flexible     %
+   ,keepspaces=true      %
+}
+
+
+\lstdefinestyle{lstDocStyleBase}{
+%%% base style
+%
+   ,style=lstStyleDefault
+%%% appearance
+   ,commentstyle=\slshape
+%%% Line numbers
+   ,numbers=left         % left, right, none
+   ,stepnumber=1         % seperation between numbers
+   ,numberfirstline=false % number first line always
+   ,numberstyle={\dc at lstnumberstyle}    % style of numbers
+   ,numbersep=5pt        % distance to text
+   ,numberblanklines=true %
+%%% language
+   ,language = [LaTeX]TeX
+%%% commands
+   % LaTeX programming
+   ,moretexcs={setlength,usepackage,newcommand,renewcommand,providecommand,RequirePackage,SelectInputMappings,ifpdftex,ifpdfoutput,AtBeginEnvironment,ProvidesPackage},
+   % other commands
+   ,moretexcs={maketitle,text,includegraphics,chapter,section,subsection,
+     subsubsection,paragraph,textmu,enquote,blockquote,ding,mathds,ifcsdef,Bra,Ket,Braket,subcaption,lettrine,mdfsetup,captionof,listoffigures,listoftables,tableofcontents,appendix}
+   % tables
+   ,moretexcs={newcolumntype,rowfont,taburowcolors,rowcolor,rowcolors,bottomrule,
+     toprule,midrule,}
+   % hyperref
+   ,moretexcs={hypersetup}
+   % glossaries
+   ,moretexcs={gls,printglossary,glsadd,newglossaryentry,newacronym}
+   % Koma
+   ,moretexcs={mainmatter,frontmatter,geometry,KOMAoptions,setkomafont,addtokomafont}
+   % SI, unit
+   ,moretexcs={si,SI,sisetup,unit,unitfrac,micro}
+   % biblatex package
+   ,moretexcs={newblock,ExecuteBibliographyOptions,addbibresource}
+   % math packages
+   ,moretexcs={operatorname,frac,sfrac,dfrac,DeclareMathOperator,mathcal,underset}
+   % demo package
+   ,moretexcs={democodefile,package,cs,command,env,DemoError,PrintDemo}
+   % tablestyles
+   ,moretexcs={theadstart,tbody,tsubheadstart,tsubhead,tend}
+   % code section package
+   ,moretexcs={DefineCodeSection,SetCodeSection,BeginCodeSection,
+     EndCodeSection}
+   % template tools package
+   ,moretexcs={IfDefined,IfUndefined,IfElseDefined,IfElseUndefined,IfMultDefined,IfNotDraft,IfNotDraftElse,IfDraft,IfPackageLoaded,IfElsePackageLoaded,IfPackageNotLoaded,IfPackagesLoaded,IfPackagesNotLoaded,ExecuteAfterPackage,ExecuteBeforePackage,IfTikzLibraryLoaded,IfColumntypeDefined,IfColumntypesDefined,IfColorDefined,IfColorsDefined,IfMathVersionDefined,SetTemplateDefinition,UseDefinition,IfFileExists,iflanguage}
+   % tablestyles
+   ,moretexcs={setuptablefontsize,tablefontsize,setuptablestyle,tablestyle,  setuptablecolor,tablecolor,disablealternatecolors,   tablealtcolored,tbegin,tbody,tend,thead, theadstart,tsubheadstart,tsubhead,theadrow,tsubheadrow,resettablestyle,theadend,tsubheadend,tableitemize,PreserveBackslash}
+   % todonotes
+   ,moretexcs={todo,missingfigure}
+   % listings
+   ,moretexcs={lstloadlanguages,lstdefinestyle,lstset}
+   % index
+   ,moretexcs={indexsetup}
+   % glossaries
+   ,moretexcs={newglossarystyle,glossarystyle,deftranslation,newglossary}
+   % tikz
+   ,moretexcs={usetikzlibrary}
+   % color
+   ,moretexcs={definecolor,colorlet}
+   % caption
+   ,moretexcs={captionsetup,DeclareCaptionStyle}
+   % floatrow
+   ,moretexcs={floatsetup}
+   % doc.sty
+   ,moretexcs={EnableCrossrefs,DisableCrossrefs,PageIndex,CodelineIndex,CodelineNumbered}
+   % refereces
+   ,moretexcs={cref,Cref,vref,eqnref,figref,tabref,secref,chapref}
+}
+
+%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%
+%%%
+%%%  From doctools.dtx file
+%%% lstlistings 'definitions'
+%%%
+%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%
+
+
+
+\lstloadlanguages{[LaTeX]TeX}
+\lstdefinestyle{codestyle}{
+%%% base style
+  style=lstDocStyleBase,
+  language=[LaTeX]{TeX},
+  numbers=none,%{\dc at lstnumbers},%
+	%%% colors
+  rulecolor={\dc at lstrulecolor},
+	backgroundcolor={\dc at lstbckgndcolor},%
+  stringstyle={\dc at lststringstyle},
+  commentstyle={\dc at lstcommentstyle},
+  framerule=0pt,%0.4pt,
+	nolol=true,
+	frame=none,
+	aboveskip=-2ex,
+  belowskip=-2ex,
+	basicstyle=\footnotesize\ttfamily , % Standardschrift
+	rulesep = 0pt,
+	breaklines=true,
+	breakindent=3em,
+	moretexcs={\dc at lsttexcs},
+  moretexcs=[2]{\dc at lsttexcsB},
+  moretexcs=[3]{\dc at lsttexcsC},
+  texcsstyle=*{\dc at lsttexcsstyle},
+	texcsstyle=*[2]{\dc at lsttexcsBstyle},
+	texcsstyle=*[3]{\dc at lsttexcsCstyle},
+	morekeywords={\dc at lstkeywd},
+	morekeywords=[2]{\dc at lstkeywdB},
+	morekeywords=[3]{\dc at lstkeywdC},
+  keywordstyle={\dc at lstkeywdstyle},
+	keywordstyle=[2]{\dc at lstkeywdBstyle},
+	keywordstyle=[3]{\dc at lstkeywdCstyle},
+	emph={\dc at lstemph},
+	emph=[2]{\dc at lstemphB},
+	emph=[3]{\dc at lstemphC},
+  emphstyle={\dc at lstemphstyle},
+  emphstyle=[2]{\dc at lstemphBstyle},
+  emphstyle=[3]{\dc at lstemphCstyle},
+}
+\lstset{style=codestyle}
+
+%%%
+%%% Using scontents package !!!!
+%%%
+\ExplSyntaxOn
+\keys_define:nn { scontents / scontents}
+  {
+	st.meta:nn          = { scontents } { store-env = #1 },
+  st.value_required:n = true
+ }
+\ExplSyntaxOff
+
+\newenvsc{stcode}
+\let\verbatimsc\@undefined
+\let\verbatimsc@\@undefined
+\let\endverbatimsc\@undefined
+\lstnewenvironment{verbatimsc}{\lstset{style=codestyle}}{}
+
+
+\NewDocumentEnvironment{verbsc}{m}{%
+    \let\verbatimsc\@undefined
+    \let\verbatimsc@\@undefined
+    \let\endverbatimsc\@undefined
+		\setdclisting{#1}
+		\edef\dc at tmp{style=codestyle,moretexcs={\dc at lsttexcs},moretexcs=[2]{\dc at lsttexcsB},moretexcs=[3]{\dc at lsttexcsC},%
+		morekeywords={\dc at lstkeywd},morekeywords=[2]{\dc at lstkeywdB},morekeywords=[3]{\dc at lstkeywdC},%
+		emph={\dc at lstemph},emph=[2]{\dc at lstemphB},emph=[3]{\dc at lstemphC},%
+	    numbers={\dc at lstnumbers}}
+    \lstnewenvironment{verbatimsc}{\expandafter\lstset\expandafter{\dc at tmp}}{}
+}{%
+}
+
+\NewDocumentCommand{\DisplayCodeB}{O{}m}{%
+  {%
+	  \begin{verbsc}{#1}%
+		\begin{tabular}{J{.98\textwidth}}\dc at codeprefix \\
+    \typestored{#2}%
+		\end{tabular}%
+		\end{verbsc}%
+	}%
+}
+
+\NewDocumentCommand{\DemoCodeB}{O{}m}{{%
+	\setlength\parindent\dc at org@parindent
+	\begin{verbsc}{#1}%
+		\begin{tabular}{J{.98\textwidth}}%
+			\dc at codeprefix \\%
+			\typestored{#2}\\%
+		\end{tabular}%
+
+		\begin{tabular}{J{.98\textwidth}}%
+			\dc at resultprefix \\\hline\\[-1ex]%
+			\getstored{#2}\\\hline%
+		\end{tabular}%
+	\end{verbsc}%
+}}
+
+\NewDocumentCommand{\TabbedDemoCodeB}{O{}m}{{%
+	\setlength\parindent\dc at org@parindent
+	\begin{verbsc}{#1}%
+		\arrayrulecolor{gray}
+		\begin{tabular}{J{.49\textwidth}@{}J{.49\textwidth}}%
+			\dc at codeprefix & \dc at resultprefix\\\hline\\[-1ex]%
+			\typestored{#2} & \getstored{#2}\\\hline%
+		\end{tabular}%
+	\end{verbsc}%
+}}
+
+
+\NewDocumentCommand{\DisplayCode}{O{}m}{{%
+	\begin{verbsc}{#1}%
+		\vspace*{0.5ex}
+		\begin{minipage}{1\textwidth}\dc at codeprefix \\
+			\typestored{#2}%
+		\end{minipage}%
+		\\[1.5ex]%
+	\end{verbsc}%
+}}
+
+\NewDocumentCommand{\DemoCode}{O{}mO{1ex}}{{%
+	\begin{verbsc}{#1}%
+		\vspace*{1ex}
+		\begin{minipage}{1\textwidth}\dc at codeprefix \\
+			\typestored{#2}%
+		\end{minipage}%
+		\\[3ex]
+		\begin{minipage}{1\textwidth}%
+			\dc at resultprefix \\[-1.5ex]%
+			\rule{\textwidth}{0.2pt}\vspace*{0.75ex}%
+			\setlength\parindent\dc at demo@parindent%
+
+			\getstored{#2}%
+		\end{minipage}%
+		\\[#3]%
+		\rule{1\textwidth}{0.2pt}%\vspace*{0.25ex}
+	\end{verbsc}%
+}}
+
+\NewDocumentCommand{\TabbedDemoCode}{O{}mO{1ex}}{{%
+	\begin{verbsc}{#1}%
+		\begin{minipage}{.5\textwidth}%
+			\dc at codeprefix%
+		\end{minipage}%
+		\begin{minipage}{.5\textwidth}%
+			\dc at resultprefix%
+		\end{minipage}\\[-1.5ex]%
+		\rule{\textwidth}{0.2pt}\vspace*{1ex}%
+
+		\begin{minipage}{.5\textwidth}\vspace*{2ex}%
+			\typestored{#2}\vspace*{1.5ex}%
+		\end{minipage}%
+		\begin{minipage}{.5\textwidth}%
+				\setlength\parindent\dc at demo@parindent%
+			\getstored{#2}%
+		\end{minipage}%
+	\\[#3]%
+	\rule{1\textwidth}{0.2pt}%\vspace*{0.5ex}
+	\end{verbsc}%
+}}
+%%%
+%%% Using scontents package !!!!
+%%%
+
+
+%%%
+%%% from https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings#Encoding_issue
+\lstset{literate=
+  {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
+  {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
+  {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
+  {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
+  {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
+  {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
+  {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
+  {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
+	{ã}{{\~{a}}}1 {õ}{{\~{o}}}1
+	{Ã}{{\~{A}}}1 {Õ}{{\~{O}}}1
+  {ý}{{\'{y}}}1 {Ý}{{\'{Y}}}1  {ÿ}{{\"{y}}}1 {Ÿ}{{\"{Y}}}1
+  {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
+  {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1
+  {€}{{\EUR}}1 {£}{{\pounds}}1
+}
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/democodetools/democodelisting.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/democodetools/democodetools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/democodetools/democodetools.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/democodetools/democodetools.sty	2022-09-04 20:49:03 UTC (rev 64287)
@@ -0,0 +1,340 @@
+%%%==============================================================================
+%% Copyright 2022 by Alceu Frigeri
+%%
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status “maintained”.
+%%
+%% The Current Maintainer of this work is Alceu Frigeri
+%%
+%% This is version 1.0beta (2022/09/01)
+%%
+%%
+%% This work consists of the files
+%%
+%% democodelisting.sty          set of macros to typeset and demonstrate LaTeX code
+%% democodetools.sty            set of macros to document LaTeX packages
+%%
+%% README.md                    quick introduction
+%%
+%% democodetools.tex            LaTeX documentation
+%% democodetools.pdf            documentation in PDF form
+%%
+%%%==============================================================================
+\NeedsTeXFormat{LaTeX2e}[2022/06/01]
+\def\tc at tmp@packname{democodetools}
+\def\tc at tmp@altpackname{democodetools}
+\def\tc at tmp@packdesc{Demo Code Tools}
+\def\tc at tmp@packdate{2022/09/01}
+\def\tc at tmp@packversion{1.0beta}
+\let\@exp\expandafter
+\@exp\edef\csname\tc at tmp@altpackname version\endcsname{\tc at tmp@packversion}
+\@exp\@exp\@exp\ProvidesPackage\@exp\@exp\@exp{\@exp\tc at tmp@packname\@exp}\@exp[\tc at tmp@packdate\space v\tc at tmp@packversion\space\tc at tmp@packdesc]
+
+\RequirePackage{democodelisting}
+
+
+
+
+\setdclisting{settexcs2={Macro,Arg,xarg,oarg,marg,parg,Key,Keylst,DescribeMacro,DescribeKey,DescribeValue,DescribeOption,DescribeArg},setkeywd2={Envs,Macros,Args,Syntax,Keys,Values,Options}}
+
+
+\def\dc at keyvaluestr{Value}
+\def\dc at keyvaluemeanstr{Meaning}
+\def\dc at keydefaultstr{Default}
+\def\dc at csfontsize{\small}
+
+
+\NewDocumentCommand{\MarginNote}{+m}{\marginpar{{\scriptsize\hfill#1}}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%
+\DeclareDocumentCommand{\Meta}{m}{\ensuremath\langle#1\ensuremath\rangle}
+
+%%%
+%%% In text arg
+%%%
+\gdef\dc at ArgHack{}
+\NewDocumentCommand{\dc at arg}{st+O{Code}O{}mmm}{{\MetaFmt[#3]{\dc at ArgHack#5\csname #4\endcsname{{\IfBooleanT{#1}{\bfseries}\IfBooleanTF{#2}{#6}{\detokenize{#6}}}}#7}}\gdef\dc at ArgHack{\,}}
+\NewDocumentCommand{\oarg}{O{Meta}m}{\dc at arg+[Oarg][#1]{[}{#2}{]}}
+\NewDocumentCommand{\marg}{O{Meta}m}{\dc at arg+[Marg][#1]{\{}{#2}{\}}}
+\NewDocumentCommand{\parg}{O{Meta}m}{\dc at arg+[Parg][#1]{(}{#2}{)}}
+\NewDocumentCommand{\xarg}{O{Meta}m}{\dc at arg+[Xarg][#1]{<}{#2}{>}}
+\NewDocumentCommand{\Arg}{m}{\def\dc at ArgHack{}\dc at arg+[Marg][Meta]{}{#1}{}}
+
+\NewDocumentCommand{\dc at x}{O{}O{}m}{#1\dc at arg+[#2][]{}{#3}{}}% single mandatory value => \dc at arg
+\NewDocumentCommand{\dc at xhack}{O{}m}{\dc at x[\dc at XHack][#1]{#2}\def\dc at XHack{\,, }}% single mandatory value => \dc at arg
+\NewDocumentCommand{\dc at xlst}{O{}O{}m}{\gdef\dc at ArgHack{}\def\dc at XHack{}\forcsvlist{\dc at xhack[#2]}{#3}\ifblank{#1}{}{\hfill\dc at keydefaultstr:~{\bfseries\Key{#1}}}}%single KEY... LIST of ValueS... default Value (if any)
+
+
+\NewDocumentCommand{\Key}{O{}m}{\dc at x[#1][Value]{#2}}
+\NewDocumentCommand{\Keylst}{O{}m}{\dc at xlst[#1][Value]{#2}}
+
+\NewDocumentCommand{\KeyUse}{mm}{\Key{#1}\space $=$ \Meta{#2}}
+
+
+\NewDocumentCommand{\Env}{O{}m}{\dc at x[#1][Env]{#2}}
+\NewDocumentCommand{\Envlst}{O{}m}{\dc at xlst[#1][Env]{#2}}
+
+\NewDocumentCommand{\Pack}{O{}m}{\dc at x[#1][Pack]{#2}}
+\NewDocumentCommand{\Packlst}{O{}m}{\dc at xlst[#1][Pack]{#2}}
+
+\NewDocumentCommand{\Value}{O{}m}{\dc at x[#1][Value]{#2}}
+\NewDocumentCommand{\Valuelst}{O{}m}{\dc at xlst[#1][Value]{#2}}
+
+\NewDocumentCommand{\Option}{O{}m}{\dc at x[#1][Option]{#2}}
+\NewDocumentCommand{\Optionlst}{O{}m}{\dc at xlst[#1][Option]{#2}}
+
+
+%%%
+%%% In text macro
+%%%
+\NewDocumentCommand{\Macro}{t!mD<>{}O{}m}{{\MetaFmt[Code]{\expandafter\zap at space\detokenize{#2#3} \@empty}}\IfBooleanTF{#1}{#5}{\gdef\dc at ArgHack{\,}\forcsvlist{\oarg}{#4}\forcsvlist{\marg}{#5}}}%
+
+
+\NewDocumentCommand{\dc at Describe}{st+O{Key}O{Meta}m}{%
+    \IfBooleanTF{#2}%
+	    {\item[{\dc at arg+[#3][#4]{}{#5}{}}]}%
+		{\item[]~\hspace{-0.6675em}\IfBooleanTF{#1}%
+			{\dc at margincode*+[#3]{{\dc at arg+[#3][#4]{}{#5}{}}}}%
+			{\dc at margincode+[#3]{{\dc at arg+[#3][#4]{}{#5}{}}}}}%
+}%
+
+\NewDocumentCommand{\DescribeArg}{st+O{Key}m}{%
+    \IfBooleanTF{#2}%
+		    {\dc at Describe+[#3][Meta]{#4}}%
+				{\IfBooleanTF{#1}%
+				    {\dc at Describe*[#3][Meta]{#4}}%
+						{\dc at Describe[#3][Meta]{#4}}}%
+}%
+\NewDocumentCommand{\DescribeKey}{st+O{Key}m}{%
+    \IfBooleanTF{#2}%
+		{\dc at Describe+[#3][]{#4}}%
+		{\IfBooleanTF{#1}%
+			{\dc at Describe*[#3][]{#4}}%
+			{\dc at Describe[#3][]{#4}}}%
+}%
+\let\DescribeValue\DescribeKey
+\let\DescribeOption\DescribeKey
+\let\DescribePackage\DescribeKey
+
+\NewDocumentCommand{\DescribeMacro}{st!t+mO{}m}{%
+    \IfBooleanTF{#3}%
+	    {\item[{\Macro{#4}{}}]}%
+		{\item[]~\hspace{-0.6675em}\IfBooleanTF{#1}%
+			{\dc at margincode*{#4}}%
+			{\dc at margincode{#4}}}\IfBooleanTF{#2}{{\Macro!{}[]{#6}}}{{\Macro{}[#5]{#6}}}%
+}%
+
+\SetEnumitemKey{marginlst}{leftmargin=0mm,labelindent=0mm,listparindent=0mm,labelwidth=0mm,labelsep=0mm}
+\SetEnumitemKey{intextlst}{leftmargin=7.5mm,labelindent=0mm,listparindent=0mm,labelwidth=20mm,labelsep=2.5mm}
+
+\NewDocumentCommand{\dc at margincode}{st+O{Code}m}{\ifvmode\leavevmode\else\fi{\marginpar{\raggedleft\MetaFmt[#3]{\IfBooleanT{#1}{\bfseries}\vspace{-1.35ex}\IfBooleanTF{#2}{#4}{\expandafter\zap at space\detokenize{#4} \@empty}\vspace{0.3ex}}}}}
+
+\NewDocumentEnvironment{Macros}{m}{%
+      \ifvmode\vspace{1ex}\leavevmode\else\fi{\marginpar{\vspace*{-1.755ex}~\color{gray}\hrule\vspace{0.3ex}}\forcsvlist\dc at margincode{#1}\marginpar{\vspace{-1.1ex}~\color{gray}\hrule}}%
+  }{}
+	\NewDocumentEnvironment{Envs}{m}{\begin{Macros}{#1}}{\end{Macros}}%
+
+\NewDocumentEnvironment{Syntax}{}{\begingroup\setlength{\parindent}{0pt}\obeylines\hspace{-0.382em}\dc at csfontsize}{\endgroup}
+
+\NewDocumentEnvironment{Args}{}{\begin{description}[nosep,marginlst]\vspace{0.5ex}}{\end{description}}
+\NewDocumentEnvironment{Args+}{}{\begin{description}[nosep,intextlst]\vspace{0.5ex}}{\end{description}}
+\NewDocumentEnvironment{Keys}{}{\begin{Args}}{\end{Args}}
+\NewDocumentEnvironment{Keys+}{}{\begin{Args+}}{\end{Args+}}
+\NewDocumentEnvironment{Values}{}{\begin{Args}}{\end{Args}}
+\NewDocumentEnvironment{Values+}{}{\begin{Args+}}{\end{Args+}}
+\NewDocumentEnvironment{Options}{}{\begin{Args}}{\end{Args}}
+\NewDocumentEnvironment{Options+}{}{\begin{Args+}}{\end{Args+}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%
+
+
+\colorlet{dc at ColorCode}{blue!40!black}
+\colorlet{dc at ColorMacro}{blue!40!black}
+\colorlet{dc at ColorMarg}{gray!60!black}
+\colorlet{dc at ColorOarg}{gray!90!black}
+\colorlet{dc at ColorParg}{gray!60!black}
+\colorlet{dc at ColorXarg}{gray!60!black}
+\colorlet{dc at ColorDefaultVal}{blue!60!black}
+\colorlet{dc at ColorDefault}{blue!60!black}
+\colorlet{dc at ColorKeys}{teal!40!black}
+\colorlet{dc at ColorValue}{teal!40!black}
+\colorlet{dc at ColorKey}{teal!40!black}
+\colorlet{dc at ColorOptions}{green!30!black}
+\colorlet{dc at ColorOthers}{green!30!black}
+\colorlet{dc at ColorEnv}{green!30!black}
+\colorlet{dc at ColorPack}{green!30!black}
+
+
+
+\def\dc at metafont{\dc at csfontsize\ttfamily}
+
+\DeclareKeys[MetaFormat]{
+    Oarg.usage = general,
+	Oarg.code = {\def\dc at Metafmt{\color{dc at ColorOarg}\dc at metafont}},
+	%
+    Marg.usage = general,
+	Marg.code = {\def\dc at Metafmt{\color{dc at ColorMarg}\dc at metafont}},
+	%
+    Parg.usage = general,
+	Parg.code = {\def\dc at Metafmt{\color{dc at ColorParg}\dc at metafont}},
+	%
+    Xarg.usage = general,
+	Xarg.code = {\def\dc at Metafmt{\color{dc at ColorXarg}\dc at metafont}},
+	%
+    Macro.usage = general,
+	Macro.code = {\def\dc at Metafmt{\color{dc at ColorCode}\dc at metafont}},
+	%
+    Code.usage = general,
+	Code.code = {\def\dc at Metafmt{\color{dc at ColorCode}\dc at metafont}},
+	%
+    Key.usage = general,
+	Key.code = {\def\dc at Metafmt{\color{dc at ColorKey}\dc at metafont\slshape}},
+	%
+    KeyVal.usage = general,
+	KeyVal.code = {\def\dc at Metafmt{\color{dc at ColorKeyVal}\dc at metafont\slshape}},
+	%
+    Option.usage = general,
+	Option.code = {\def\dc at Metafmt{\color{dc at ColorOptions}\dc at metafont}},
+	%
+    Default.usage = general,
+	Default.code = {\def\dc at Metafmt{\color{dc at ColorDefault}\dc at metafont}},
+	%
+    Value.usage = general,
+	Value.code = {\def\dc at Metafmt{\color{dc at ColorValue}\dc at metafont\slshape}},
+	%
+    Env.usage = general,
+    Env.code = {\def\dc at Metafmt{\color{dc at ColorEnv}\dc at metafont\slshape}},
+	%
+    Pack.usage = general,
+    Pack.code = {\def\dc at Metafmt{\color{dc at ColorPack}\dc at metafont\slshape}},
+	}
+\DeclareUnknownKeyHandler[MetaFormat]{\def\dc at Metafmt{\color{dc at ColorOthers}\ttfamily}}
+
+\NewDocumentCommand{\MetaFmt}{sO{}}{\ifblank{#2}{}{\dc@@MetaFmt{#2}}\IfBooleanT{#1}{\bfseries}\dc at Metafmt}
+\NewDocumentCommand{\dc@@MetaFmt}{m}{\SetKeys[MetaFormat]{#1}}
+\dc@@MetaFmt{Code}
+
+
+\titleformat{\chapter}{\sffamily\bfseries\selectfont\large}{\thechapter}{2ex}{}
+\titleformat{name=\chapter,numberless}{\sffamily\bfseries\selectfont\large\center}{}{0pt}{}
+\titlespacing{\chapter}{0pt}{\tc at chapbefore}{\tc at chapafter}
+
+
+\def\tc at chapbefore{18pt plus 4pt minus 4pt}
+\def\tc at chapafter{12pt plus 3pt minus 3pt}
+\def\tc at secbefore{12pt plus 3pt minus 3pt}
+\def\tc at secafter{8pt plus 2pt minus 2pt}
+
+\titleformat{\section}[hang]{\normalfont\selectfont\large}{\thesection}{.5em}{}
+\titlespacing{\section}{0pt}{\tc at secbefore}{\tc at secafter}
+\titleformat{\subsection}[hang]{\normalfont\sffamily\slshape\selectfont}{\thesubsection}{.5em}{}
+
+\titleformat{name=\section,numberless}[hang]{\normalfont\large\bfseries\scshape\selectfont\center}{}{0pt}{}
+\titlespacing{name=\section,numberless}{0pt}{\tc at secbefore}{\tc at secafter}
+
+
+
+\reversemarginpar
+
+
+\NewDocumentCommand{\dcAuthor}{m}{\def\dc at author{#1}}
+\NewDocumentCommand{\dcDate}{m}{\def\dc at date{#1}}
+\NewDocumentCommand{\dcTitle}{m}{\def\dc at title{#1}}
+
+\NewDocumentCommand\dcMakeTitle{}{\par
+	\begingroup
+	\renewcommand\thefootnote{\@fnsymbol\c at footnote}%
+	\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+	\long\def\@makefntext##1{\parindent 1em\noindent
+		\hb at xt@1.8em{%
+			\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+	\if at twocolumn
+	\ifnum \col at number=\@ne
+	\dc at maketitle
+	\else
+	\twocolumn[\dc at maketitle]%
+	\fi
+	\else
+	\newpage
+	\global\@topnum\z@   % Prevents figures from going at top of page.
+	\dc at maketitle
+	\fi
+	\thispagestyle{plain}\@thanks
+	\endgroup
+}
+\def\dc at maketitle{%
+	\newpage
+	\null
+	\vskip 2em%
+	\begin{center}%
+		\let \footnote \thanks
+		{\LARGE \dc at title \par}%
+		\vskip 1.5em%
+		{\large
+			\lineskip .5em%
+			\begin{tabular}[t]{c}%
+				\dc at author
+			\end{tabular}\par}%
+		\vskip 1em%
+		{\large \dc at date}%
+	\end{center}%
+	\par
+	\vskip 1.5em}
+
+\NewDocumentEnvironment{dcAbstract}{}{%
+	\if at twocolumn
+	\section*{\abstractname}%
+	\else
+	\small
+	\begin{center}%
+		{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
+	\end{center}%
+	\quotation
+	\fi}{\if at twocolumn\else\endquotation\fi}
+
+
+
+\def\convertto#1#2{\strip at pt\dimexpr #2*65536/\number\dimexpr 1#1}
+
+\NewDocumentCommand{\bigtab}{}{
+\begin{center}\begin{tabular}
+  {>{\def\colunit{pt}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{mm}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{cm}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{ex}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{em}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{bp}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{dd}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\def\colunit{pc}}l<{\convertto{\rowunit}{1\colunit}}
+%   >{\def\colunit{in}}l<{\convertto{\rowunit}{1\colunit}}
+   >{\bfseries}l}
+\multicolumn{1}{l}{\bfseries 1pt} & \multicolumn{1}{l}{\bfseries 1mm} & \multicolumn{1}{l}{\bfseries 1cm} & \multicolumn{1}{l}{\bfseries 1ex} & \multicolumn{1}{l}{\bfseries 1em} & \multicolumn{1}{l}{\bfseries 1bp} & \multicolumn{1}{l}{\bfseries 1dd} & \multicolumn{1}{l}{\bfseries 1pc} & \\%\multicolumn{1}{l}{\bfseries 1in} & \\
+\gdef\rowunit{pt} & & & & & & & &  \rowunit\\
+\gdef\rowunit{mm} & & & & & & & &  \rowunit\\
+\gdef\rowunit{cm} & & & & & & & &  \rowunit\\
+\gdef\rowunit{ex} & & & & & & & &  \rowunit\\
+\gdef\rowunit{em} & & & & & & & & \rowunit\\
+\gdef\rowunit{bp} & & & & & & & &  \rowunit\\
+\gdef\rowunit{dd} & & & & & & & &  \rowunit\\
+\gdef\rowunit{pc} & & & & & & & &  \rowunit\\
+%\gdef\rowunit{in} & & & & & & & & & \rowunit\\
+\end{tabular}\end{center}
+}
+
+
+
+\endinput
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/democodetools/democodetools.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-09-04 20:47:46 UTC (rev 64286)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-09-04 20:49:03 UTC (rev 64287)
@@ -253,7 +253,7 @@
     ddphonism
     de-macro debate decimal decision-table decorule dehyph dehyph-exptl
     dejavu dejavu-otf
-    delim delimseasy delimset delimtxt denisbdoc derivative dhua
+    delim delimseasy delimset delimtxt democodetools denisbdoc derivative dhua
     diabetes-logbook diadia diagbox diagmac2 dialogl diagnose dice dichokey
     dickimaw dictsym diffcoeff digiconfigs dijkstra dimnum din1505
     dinat dinbrief dingbat directory dirtree dirtytalk disser ditaa dithesis

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-09-04 20:47:46 UTC (rev 64286)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-09-04 20:49:03 UTC (rev 64287)
@@ -417,6 +417,7 @@
  'dejavu-math', "&MAKEflatten",
  'dejavu-otf',  "&MAKEflatten",
  'deleq',       "die 'skipping, nosell license'",
+ 'democodetools',    "&MAKEflatten",
  'denisbdoc',   "&MAKEflatten",
  'deproc',      "die 'skipping, for latex 2.09'",
  'designcon',   "die 'skipping, requires nonfree fonts'",

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2022-09-04 20:47:46 UTC (rev 64286)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2022-09-04 20:49:03 UTC (rev 64287)
@@ -338,6 +338,7 @@
 depend decimal
 depend decorule
 depend delimtxt
+depend democodetools
 depend denisbdoc
 depend diabetes-logbook
 depend diagbox

Added: trunk/Master/tlpkg/tlpsrc/democodetools.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.