From 70ba2b1e43d9831bd6dc0137ce7c685eba4e9ce8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 24 Sep 2021 21:42:00 +0000 Subject: ccool (24sep21) git-svn-id: svn://tug.org/texlive/trunk@60600 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/ccool/ccool.dtx | 1698 ++++++++---------------- Master/texmf-dist/source/latex/ccool/ccool.ins | 64 + 2 files changed, 632 insertions(+), 1130 deletions(-) create mode 100644 Master/texmf-dist/source/latex/ccool/ccool.ins (limited to 'Master/texmf-dist/source/latex/ccool') diff --git a/Master/texmf-dist/source/latex/ccool/ccool.dtx b/Master/texmf-dist/source/latex/ccool/ccool.dtx index 933183883d6..0d7add543e4 100644 --- a/Master/texmf-dist/source/latex/ccool/ccool.dtx +++ b/Master/texmf-dist/source/latex/ccool/ccool.dtx @@ -4,13 +4,12 @@ \iffalse % %<*readme> ----------------------------------------------------------------- -##### ccool --- A key-value document command parser +----------------------------------------------------------------- +##### ccool --- (Custom) COntext Oriented LaTeX - Source repository: https://github.com/rogard/ccool - Released under the LaTeX Project Public License v1.3c or later - See http://www.latex-project.org/lppl.txt ----------------------------------------------------------------- - +----------------------------------------------------------------- % %<*internal> \fi @@ -24,8 +23,8 @@ \keepsilent \askforoverwritefalse \preamble ----------------------------------------------------------------------------- -ccool --- A key-value document command parser +----------------------------------------------------------------------------- +ccool --- (Custom) COntext Oriented LaTeX Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt ---------------------------------------------------------------------------- @@ -33,7 +32,7 @@ See http://www.latex-project.org/lppl.txt \endpreamble \postamble -Copyright (C) 2020 by Erwann Rogard +Copyright (C) 2020-2021 by Erwann Rogard This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either @@ -68,120 +67,111 @@ ccool.sty, and ccool.pdf. \expandafter\endgroup \fi % -% \NeedsTeXFormat{LaTeX2e}[2020/02/02] -% \RequirePackage{erw-l3}[2020/06/04] -% \RequirePackage{etoolbox}[2019/09/21] -% \RequirePackage{l3keys2e}[2020/03/06] -% \RequirePackage{xparse}[2020/03/06] +% \NeedsTeXFormat{LaTeX2e}[2021-06-01] +% \RequirePackage{expl3, xparse, l3keys2e}[2021-06-01] +% \RequirePackage{lambdax}[2021-06-01] % \ProvidesExplPackage -% {ccool} % Package name -% {2020/10/10} % Release date -% {3.1} % Release version -% {cool --- A key-value document command parser} % Description -% -%<*driver> -\RequirePackage{fvextra, xparse}%^^A\NB{done}{Warning:csquotes should be loaded after fvextra->nope} -\documentclass[full, show-notes]{l3doc} -\listfiles -%^^A\usepackage{xparse, longtable, array, booktabs} -\ExplSyntaxOn -\clist_new:N \g__ccooldoc_usepackage_clist -\cs_new_protected:Nn \__ccooldoc_usepackage:n -{ - \clist_put_right:Nn \g__ccooldoc_usepackage_clist - { - \textbackslash{}usepackage\char`{ #1 \char`} - } - \usepackage{#1} -} -\cs_new_protected:Nn \__ccooldoc_usepackage:nn -{ - \clist_put_right:Nn \g__ccooldoc_usepackage_clist - { - { - \textbackslash{} - usepackage - \char`[ #1 \char`] - \char`{ #2 \char`} - } - } - \usepackage[#1]{#2} -} -\cs_new:Nn \__ccooldoc_usepackage: -{ - \texttt - { - \noindent - \clist_use:Nnnn \g__ccooldoc_usepackage_clist { \\ } { \\ } { \\ } - } -} -\__ccooldoc_usepackage:n{amsmath, amssymb} -\__ccooldoc_usepackage:nn{ -%^^A afrikaans, -%^^A basque, -%^^A catalan, -%^^A croatian, -%^^A czech, -%^^A danish, -%^^A dutch, -%^^A %^^A esperanto, % ERROR -%^^A estonian, -%^^A finnish, -french, -%^^A % ^^A galician, % ERROR -german, -%^^A hungarian, -%^^A icelandic, -%^^A indonesian, -%^^A irish, -%^^A italian, -%^^A %^^A kurmanji, % ERROR -%^^A latin, -%^^A %^^A latvian, % ERROR -%^^A lithuanian, -%^^A ngerman, -%^^A polish, -%^^A portuguese, -%^^A romanian, -%^^A slovak, -spanish.noquoting, -%^^A swedish, -%^^A swissgerman, -%^^A turkish, -%^^A turkmen, -%^^A welsh, -english -} -{babel} -\__ccooldoc_usepackage:n{bookmark, ccool, microtype, tabto, tcolorbox} -\__ccooldoc_usepackage:nn{T1}{fontenc}% \char`[ - \ExplSyntaxOff -\tcbuselibrary{listings, breakable} -\makeatletter -\newcommand*{\docsetnameref}{\def\@currentlabelname}%https://tex.stackexchange.com/questions/537751 -\makeatother -\ExplSyntaxOn -\tl_gset:Nn \partname {Part} -\ExplSyntaxOff +% {ccool} % Package name +% {2021-09-20} % Release date +% {3.2} % Release version +% {ccool --- (Custom) COntext Oriented LaTeX } % Description +%<*driver> +\documentclass[show-notes]{l3doc} \EnableCrossrefs \CodelineIndex \RecordChanges -% ^^A\AtEndDocument { \PrintChanges \PrintIndex } -\ExplSyntaxOn -\newenvironment{docabstract}[1]%https://latex.org/forum/viewtopic.php?t=12156 -{\renewcommand{\abstractname}{#1}\begin{abstract}} - {\end{abstract}} -\ProvideDocumentCommand\DocPhantomSection{smmm} -{ - \leavevmode - \refstepcounter{#2} - \IfBooleanT{#1} - { - \addcontentsline{toc}{#2}{\protect\numberline{\use:c{the#2}}#3} - } - \docsetnameref{#3} - \label{#4} +%^^A\documentclass[full, show-notes]{l3doc} +%^^A \listfiles +\usepackage{amsmath, bookmark, enumitem, mathtools, microtype, tcolorbox, xparse} +\usepackage[french, german, english]{babel} +\usepackage[T1]{fontenc} +\usepackage[bibencoding=auto, backend=biber, sorting=ynt]{biblatex} +\begin{filecontents*}{\jobname.bib} +@phdthesis{oh-2005, + author = {Olympia Hadjiliadis}, + title = {Change--point detection of two--sided alternatives in the Brownian motion model and its connection to the gambler's ruin problem with relative wealth perception}, + year = {2005}, + school = {Columbia University} } +@misc{a-547018, + author = {@{}Javier Bezos}, + title = {When loading babel with spanish, spurious document command parser}, + note = {\url{https://tex.stackexchange.com/a/547018/112708}}, + year = {2020}} +@misc{a-536597, + author = {@{}frougon}, + title = {``Journaling calls to a function \textdel{taking inline code as argument}''}, + year = {2020}, + note = {\url{https://tex.stackexchange.com/a/536620}}} +@manual{interface3, + title = {The \LaTeX3 interfaces}, + author = {The \LaTeX3 Project Team}, + year = {2019}, + note = {\url{https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/l3kernel/expl3.pdf}}, + annote = {} } +@manual{xparse, + title = {The \pkg{xparse} package}, + author = {The \LaTeX3 Project Team}, + year = {2019}, + note = {\url{https://ctan.math.illinois.edu/macros/latex/contrib/l3packages/xparse.pdf}}, + annote = {} } +@manual{2005-cool, + title = {The \pkg{cool} package}, + author = {Nick Setzer}, + year = {2005}, + note = {\url{https://www.ctan.org/pkg/cool}}, + annote = {} } +@manual{l3build, + title = {The \pkg{l3build} package}, + author = {The \LaTeX3 Project Team}, + year = {2019}, + note = {\url{https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/l3build/l3build.pdf}}, + annote = {} } +@manual{tcolorbox, + title = {The \pkg{tcolorbox} package}, + author = {Sturm, Thomas F.}, + year = {2019}, + note = {\url{http://www.texdoc.net/texmf-dist/doc/latex/tcolorbox/tcolorbox.pdf}}, + annote = {} } +@misc{p158966, + title = {\cs{Ccool}, extension à \LaTeX~à vocation mathématique}, + note = {\url{http://forum.mathematex.net/latex-f6/ccool-extension-latex-a-vocation-mathematique-t17314.html}}, + year = {2020}} +\end{filecontents*} +\addbibresource{\jobname.bib} +\ExplSyntaxOn +%^^A *** Sectioning +\tl_gset:Nn \partname {Part}%^^A allows to test w/o babel +\makeatletter +\newcommand*{\docsetnameref} +{\def\@currentlabelname}%https://tex.stackexchange.com/questions/537751 +\makeatother +\newcounter{cscounter} +\ProvideDocumentCommand +\DocPhantomSection{sO{subsection}D<>{}mo} +{\leavevmode + \refstepcounter{cscounter} + \IfBooleanF{#1}{\addcontentsline{toc}{#2}{#4}} + \IfValueT{#5} + {\docsetnameref{#3#4}\label{#5}}} +% ^^A *** Msg +\msg_new:nnn{__ccool_doc}{unknown}{~#1:#2~unknown} +% ^^A *** Expressions +\ProvideDocumentCommand{\pkgpattpair}{mm}{\texttt{>\{#1\}\{#2\}}} +\ProvideDocumentCommand{\pkgrule}{}{\texttt{$\rightarrow$}} +% ^^A *** L3 package +\ProvideDocumentCommand{\docplaceh}{mO{1}}{\texttt{\prg_replicate:nn{#2}{\#}#1}} +% ^^A *** Lists +\newlist{arab-inl}{enumerate*}{1} +\setlist[arab-inl]{label=\arabic*)} +\newlist{colon-inl}{itemize*}{1} +\setlist[colon-inl] +{ %^^Abefore=\noindent, + label={}, + itemjoin={{; }}, + after={{.}}} +\newlist{descr}{description}{1} +\setlist[descr]{nosep, align=right, itemindent=0pt, font=\sffamily\tiny} % ^^A Sort---> \providecommand\docarg[1]{\texttt{#1}} % fun[param] (macro) vs fun[arg] (eval) \providecommand\docargnoval{\c_novalue_tl} @@ -269,6 +259,38 @@ english \providecommand\pkgwrite{\cs{Ccool}\docarg{\meta{\pkgparpa}}\docpare{i}{\meta{\pkgparin}}\Arg{\pkgparkvl}} % ^^A Sort<--- \ExplSyntaxOff +%^^A *** listing +\tcbuselibrary{listings, breakable} +\newtcblisting[auto counter] +{listing}[2][]{ + noparskip, + breakable, + colback=white, + colframe=black, + opacitybacktitle=.8,% + fonttitle=\bfseries, + title={Listing~\thetcbcounter. #1}, + arc=0pt, + outer arc=0pt, + boxrule=1pt, + listing and text, + #2} +\newtcblisting +{internal} +{text only, + breakable, + colback=white, + fontupper=\sffamily, + arc=1pt, + outer arc=1pt, + boxrule=0pt, + halign=left, + fontupper=\small\sffamily, + left=0pt, + top=0pt, + bottom=0pt} +\usepackage{ccool} +\usepackage{hyperref} %^^A comes last \begin{document} \DocInput{\jobname.dtx} \end{document} @@ -276,79 +298,27 @@ english % \fi % % \GetFileInfo{\jobname.sty} -% \begin{documentation} -% \title{The \pkg{ccool} package\thanks{^^A -% This file describes version \fileversion, last revised \filedate.^^A +% \title{The \pkg{ccool} package\thanks{^^A +% This file describes version \fileversion, last revised \filedate.^^A % }^^A % } -% \author{Erwann Rogard\thanks{firstname dot lastname AusTria gmail dot com}} +% \author{Erwann Rogard\thanks{first.lastname at gmail.com}} % % \date{Released \filedate} -% -% \maketitle -% -% \selectlanguage{english} -% \begin{docabstract}{Abstract} -% The package \pkg{ccool} for \LaTeX~is a \textit{key-value} interface, \nameref{usage:cs:ccool}, -% on top of \pkg{xparse}'s document command parser. Global options control input processing and its expansion. -% By default, they are set to meet likely requirements, depending on context: the selected language, -% and which of text and math mode is active. These options can be overriden inline. -% This versality could find its use, for example, to encode notational conventions (such as \docexpand{\cs{Real}}{}|\mathbb{R}|) -% at the point where they are introduced in the \env{document} (``Let $\mathbb{R}$ denote real numbers''). -% Polymorphic commands can be generated by parameterizing the keys -% (for instance, one parameter value for style, another for a property). -% User input to \cs{Ccool} can optionally be serialized. -% This can useful for typesetting documents sharing the same notation. -% \end{docabstract} -% -% \selectlanguage{french} -% \begin{docabstract}{Résumé} -% L'extension~\pkg{ccool} pour \LaTeX~met à disposition une interface de type \textit{clé-valeur}, \nameref{usage:cs:ccool}, -% destinée à faciliter la géneration de commandes. Les paramètres globaux contrôlant le traitement de ces \textit{clé-valeur} sont fixés -% par défaut pour répondre aux besoins courants, suivant le contexte (langage, mode textuel ou mathématique). -% Un exemple d'application, est la command-isation des conventions de notation (\docexpand{\cs{Reel}}{} |\mathbb{R}|), -% au point dans le \env{document} où elles sont introduites (``Soit~$\mathbb{R}$~les nombres réels.''). -% Des commandes polymorphes peuvent être générées, en associant aux clés un paramètre -% (par exemple, une valeur pour le style typographique, une autre pour la description du concept associé). -% En option, les instructions passées à cette interface peuvent être sauvegardées, -% ce qui peut être utile pour la rédaction de documents faisant appel à des conventions typographiques communes. -% \end{docabstract} -% \selectlanguage{english} -% -% \tableofcontents -% -% \part{Usage}\label{part:usage} -% ^^A \VerbatimFootnotes -% -% \setcounter{section}{0} -% \label{usage:conv} -% \addcontentsline{toc}{section}{\protect\numberline{\thesection}Convention} -% \section*{Convention} -% \begin{enumerate}[label={\emph{\alph*)}}] -% \item \label{conv:expl3} Loosely, those of \cite{interface3}, for example as to the meaning of \docccept{\docccepttl}, which may be abbreviated \docccept{tl}. -% \item \label{conv:xparse} Those of \cite{xparse}, for example \docparo{arg} is an \docccept{\docxparseo}. -% \item \docassign{\meta{X}}{\docarg{Y}}: set \meta{X} to |Y| -% \item \docexpand{\cs{X}}{\docarg{Y}}: \cs{X} expands to |Y| -% \item If unspecified, the environment in which a macro is to be used is \docenvdoc. -% \end{enumerate} -% -% \refstepcounter{section} -% \label{usage:load} -% \addcontentsline{toc}{section}{\protect\numberline{\thesection}Loading the package} -% \begin{function}{\usepackage} -% \begin{syntax} -% \cs{usepackage}\docparm{\pkg{ccool}} -% \end{syntax} -% \begin{description} -% \item[Requirement]\docfillblank -% \begin{enumerate} -% \item \file{ccool.sty} is in the path of the \LaTeX~engine. See \autoref{part:other}, \autoref{other:support}. -% \item Put in the~\docccept{\doccceptpre} -% \end{enumerate} -% \end{description} -% \end{function} -% -% \DocPhantomSection*{section}{\cs{Ccool}}{usage:cs:ccool} +% \begin{documentation} +% +% \maketitle +% +% \begin{abstract} +% This \LaTeX package provides an interface to define and evaluate key-based replacement rules\cite{interface3}. +% It can be used to parse the argument specification of a document command\cite{xparse}. +% \end{abstract} +% +% \tableofcontents +% +% \part{Usage}\label{part:usage} +% +% \DocPhantomSection*{section}{\cs{Ccool}}[usage:cs:ccool] % \begin{function}{\Ccool} % \begin{syntax} % \cs{Ccool}\docparo{\meta{\pkgparhe}}\docpard{\meta{\pkgparpa}}\docpare{c}{\meta{\pkgparin}}\Arg{\pkgparkvl}\pkgparap\pkgparex\docpare{s}{\meta{\doccceptsep}}\docpare{c}{\meta{\pkgparou}}\docparo{\meta{\pkgparta}} @@ -360,22 +330,22 @@ english % % \subsection{Core feature} % \label{ccool:core} -% \nameref{usage:cs:ccool}\Arg{\pkgparkvl} executes for each \meta{\pkgkey}|=|\meta{\pkgval}, +% \cs{Ccool}\Arg{\pkgparkvl} executes for each \meta{\pkgkey}|=|\meta{\pkgval}, % \begin{enumerate}[label=\emph{\arabic*)}] % \item \docassign{\meta{\pkgval} } % { \cs{function}\Arg{\pkgval} }\label{step:val} % \item define \cs{\meta{\pkgkey}} such that \docexpand{ \cs{\meta{\pkgkey} } }{\meta{\pkgval}}, % \label{step:key} -% \end{enumerate}where \cs{function} is encoded in \docccept{\doccceptgopt}~\nameref{usage:opt:in}. +% \end{enumerate}where \cs{function} is encoded in \docccept{\doccceptgopt}~\pkgoptin. % For instance, the side effect of |\Ccool{ Real = \mathbb{R} }| is \docexpand{\cs{Real}}{\docarg{\textbackslash{}mathbb\{R\}}}. -% To be sparingly used, \docccept{\doccceptgopt}~\nameref{usage:opt:ex} controls the type of expansion of \meta{\pkgkey}~and \meta{\pkgval}. +% To be sparingly used, \docccept{\doccceptgopt}~\pkgoptex controls the type of expansion of \meta{\pkgkey}~and \meta{\pkgval}. % -% See \nameref{usage:cs:lambda} to allow command \cs{\meta{\pkgkey}} to take arguments. +% if \cs{\meta{\pkgkey}} needs arguments, use \cs{lambdax} from \pkg{lambdax} on the rhs. % -% \subsection{Process the \texorpdfstring{\docccept{\pkgval}}'s} +% \subsection{Process the \texorpdfstring{\docccept{\pkgval}}{val_i}'s} % \label{ccool:in} -% \nameref{usage:cs:ccool}\ \docpare{c}{\meta{\pkgparin}}\Arg{\pkgparkvl} is identical to the \nameref{ccool:core}, -% except it overrides \nameref{usage:opt:in}. +% \cs{Ccool}\ \docpare{c}{\meta{\pkgparin}}\Arg{\pkgparkvl} is identical to the \nameref{ccool:core}, +% except it overrides \pkgoptin. % % In our example, if multiple number systems are defined with \cs{Ccool} (natural, reals, \dots), % it is more efficient to omit |\mathbb{.}| inside \meta{\pkgval}, and instead @@ -383,15 +353,15 @@ english % % \subsection{Append to a hook} % \label{ccool:ap} -% \nameref{usage:cs:ccool}\Arg{\pkgparkvl}\pkgparap~is identical to the \nameref{ccool:core}, except it -% repeats after \nameref{usage:cs:hook}. +% \cs{Ccool}\Arg{\pkgparkvl}\pkgparap~is identical to the \nameref{ccool:core}, except it +% repeats after \cs{CcoolHook}. % This is useful to make the side effect persist after a \docccept{\doccceptgroup} (such as \env{theorem}). % -% \subsection{Expand the \texorpdfstring{\docccept{\pkgval}}'s} +% \subsection{Expand the \texorpdfstring{\docccept{\pkgval}}{val_i}'s} % \label{ccool:ex} -% \nameref{usage:cs:ccool}\Arg{\pkgparkvl}\pkgparex~supplements the \nameref{ccool:core} with -% the expansion of the \meta{\pkgval}'s using typesetting rules encoded in \docccept{\doccceptgopt}~\nameref{usage:opt:se} -% and~\nameref{usage:opt:ou}. The first are \docccept{\doccceptsep} applied to the \meta{\pkgval}'s to form a \docccept{\docccepttl}, +% \cs{Ccool}\Arg{\pkgparkvl}\pkgparex~supplements the \nameref{ccool:core} with +% the expansion of the \meta{\pkgval}'s using typesetting rules encoded in \docccept{\doccceptgopt}~\pkgoptse +% and~\pkgoptou. The first are \docccept{\doccceptsep} applied to the \meta{\pkgval}'s to form a \docccept{\docccepttl}, % and the second a function applied to the latter. % % They can be overriden inline by appending further \docpare{s}{\meta{\doccceptsep}}~and~\docpare{c}{\meta{\pkgparou}}, respectively, @@ -399,30 +369,30 @@ english % % \subsection{Head} % \label{ccool:he} -% \nameref{usage:cs:ccool}\docparo{\meta{\pkgparhe}}\Arg{\pkgparkvl}~expands \meta{\pkgparhe} and executes the \nameref{ccool:core}. +% \cs{Ccool}\docparo{\meta{\pkgparhe}}\Arg{\pkgparkvl}~expands \meta{\pkgparhe} and executes the \nameref{ccool:core}. % % There may be situations where it is convenient to pass \meta{\pkgparhe}~as \doccceptempty. % % \subsection{Tail} % \label{ccool:ta} -% \nameref{usage:cs:ccool}\Arg{\pkgparkvl}\docparo{\meta{\pkgparta}}\Arg{\pkgparkvlnxt}~is identical to -% \nameref{usage:cs:ccool}\Arg{\pkgparkvl} followed by \nameref{usage:cs:ccool}\docparo{\meta{\pkgparta}}\Arg{\pkgparkvlnxt}. +% \cs{Ccool}\Arg{\pkgparkvl}\docparo{\meta{\pkgparta}}\Arg{\pkgparkvlnxt}~is identical to +% \cs{Ccool}\Arg{\pkgparkvl} followed by \cs{Ccool}\docparo{\meta{\pkgparta}}\Arg{\pkgparkvlnxt}. % % The combination of \nameref{ccool:core}, \nameref{ccool:he}, and \nameref{ccool:ta} allows to integrate typesetting and % the creation of commands. % -% \subsection{Parameterize the \texorpdfstring{\docccept{\pkgkey}}'s} +% \subsection{Parameterize the \texorpdfstring{\docccept{\pkgkey}}{key_i}'s} % \label{ccool:pa} -% \nameref{usage:cs:ccool}\docpard{\meta{\pkgparpa}}\Arg{\pkgparkvl} is identical to the \nameref{ccool:core}, +% \cs{Ccool}\docpard{\meta{\pkgparpa}}\Arg{\pkgparkvl} is identical to the \nameref{ccool:core}, % except \meta{\pkgkey} is replaced by \meta{\pkgkey\docpard{\pkgparpa}}. -% The default value of \meta{\pkgparpa} is encoded in \nameref{usage:opt:pa}. +% The default value of \meta{\pkgparpa} is encoded in \pkgoptpa. % In our example, \meta{\pkgparpa} could be \docarg{Style}. % % \subsection{Write} % \label{ccool:wr} -% \docccept{\doccceptgopt}~\nameref{usage:opt:wr}~is identical to the \nameref{ccool:core}, -% except that if \nameref{usage:opt:wr} is set to \cs{BooleanTrue}, -% the code is written to a file whose \doccceptpath~is encoded in \docccept{\doccceptgopt}~\nameref{usage:opt:fi}. +% \docccept{\doccceptgopt}~\pkgoptwr~is identical to the \nameref{ccool:core}, +% except that if \pkgoptwr is set to \cs{BooleanTrue}, +% the code is written to a file whose \doccceptpath~is encoded in \docccept{\doccceptgopt}~\pkgoptfi. % % \DocPhantomSection*{section}{\cs{CcoolClear}}{usage:cs:clear} % \begin{function}{\CcoolClear} @@ -444,39 +414,31 @@ english % \end{description} % \end{function} % -% \DocPhantomSection*{section}{\cs{CcoolLambda}}{usage:cs:lambda} -% \begin{function}{\CcoolLambda} -% \begin{syntax} -% \cs{CcoolLambda}\docparo{\meta{\doccceptargspec}}\Arg{\doccceptcode}, -% \end{syntax} where \docccept{\doccceptargspec} is by default an \docccept{\docxparseo}. -% \begin{description} -% \item[Example] \cs{Ccool}|{ EvalAt = \CcoolLambda{(#1)} }| -% \item[Semantics] Returns a command of type \cs{DeclareDocumentCommand}\cite{xparse}, -% \end{description} -% \end{function} +% \changes{v3.2} +% {2021/09/20} +% {Removed~usage~for\cs[no-index]{CcoolLambda}~as~superseded~by~\cs[no-index]{LambdaX}.} % % \DocPhantomSection*{section}{\cs{CcoolOption}}{usage:cs:option} % \begin{function}{\CcoolOption} % \begin{syntax} % \cs{CcoolOption}\docparo{\dots{}\docmetakeyorkeyval[i],\dots} % \end{syntax}where \meta{\doccceptkey_i} is either of -% \nameref{usage:opt:an}, -% \nameref{usage:opt:ex}, -% \nameref{usage:opt:fi}, -% \nameref{usage:opt:in}, -% \nameref{usage:opt:pa}, -% \nameref{usage:opt:ou}, -% \nameref{usage:opt:se}, -% and \nameref{usage:opt:wr}. +% \pkgoptan, +% \pkgoptex, +% \pkgoptfi, +% \pkgoptin, +% \pkgoptpa, +% \pkgoptou, +% \pkgoptse, +% and \pkgoptwr. % \begin{description} -% \item[Semantics] Modify the default behavior of \nameref{usage:cs:ccool} +% \item[Semantics] Modify the default behavior of \cs{Ccool} % \end{description} % \end{function} % % \DocPhantomSection*{subsection}{\pkgoptan}{usage:opt:an} % \DescribeOption{\pkgoptan} % \begin{description} -% \item[Also see] \autoref{part:impl}~\nameref{impl:opt:an} % \item[Semantics] Sets the translation of \textit{and} in language \meta{\doccceptkey} to \meta{\doccceptval} % \item[Syntax] \meta{\doccceptkvl} % \end{description} @@ -484,35 +446,30 @@ english % \DocPhantomSection*{subsection}{\pkgoptex}{usage:opt:ex} % \DescribeOption{\pkgoptex} % \begin{description} -% \item[Also see] \nameref{ccool:core} and \autoref{part:impl}~\nameref{impl:opt:ex} % \item[Syntax] \texttt{eo\docpipe{}ee\docpipe{}ex\docpipe{}xo\docpipe{}xe\docpipe{}xx} % \end{description} % % \DocPhantomSection*{subsection}{\pkgoptfi}{usage:opt:fi} % \DescribeOption{\pkgoptfi} % \begin{description} -% \item[Also see] \autoref{part:usage}~\nameref{ccool:wr} and \autoref{part:impl}~\nameref{impl:opt:fi} % \item[Syntax] \meta{\doccceptpath} % \end{description} % % \DocPhantomSection*{subsection}{\pkgoptin}{usage:opt:in} % \DescribeOption{\pkgoptin} % \begin{description} -% \item[Also see] \nameref{ccool:in} and \autoref{part:impl}~\nameref{impl:opt:in} % \item[Syntax] \meta{\doccceptcode}, with |####1| as the \docccept{\doccceptplaceh} % \end{description} % % \DocPhantomSection*{subsection}{\pkgoptpa}{usage:opt:pa} % \DescribeOption{\pkgoptpa} % \begin{description} -% \item[Also see] \nameref{ccool:pa}, and \autoref{part:impl}~\nameref{impl:opt:pa} % \item[Syntax] \meta{\docccepttl} % \end{description} % % \DocPhantomSection*{subsection}{\pkgoptou}{usage:opt:ou} % \DescribeOption{\pkgoptou} % \begin{description} -% \item[Also see] \nameref{ccool:ex}, and \autoref{part:impl}~\nameref{impl:opt:ou} % \item[Default] |\ensuremath{####1}| % \item[Syntax] \meta{\doccceptcode}, with |####1| as the \docccept{\doccceptplaceh} % \end{description} @@ -520,7 +477,6 @@ english % \DocPhantomSection*{subsection}{\pkgoptse}{usage:opt:se} % \DescribeOption{\pkgoptse} % \begin{description} -% \item[Also see] \nameref{ccool:ex}; \doclist{lang}; and \autoref{part:impl}~\nameref{impl:opt:se} % \item[Other] Default behavior depends on whether \pkg{babel} and \pkg{amsmath} are loaded % \item[Syntax] That of \docccept{\doccceptsep} in \cite[Section 8 of \pkg{l3seq}]{interface3} % \end{description} @@ -528,7 +484,6 @@ english % \DocPhantomSection*{subsection}{\pkgoptwr}{usage:opt:wr} % \DescribeOption{\pkgoptwr} % \begin{description} -% \item[Also see] \autoref{part:usage}~\nameref{ccool:wr} and \autoref{part:impl}~\nameref{impl:opt:wr} % \item[Syntax] \cs{BooleanFalse}\docpipe\cs{BooleanTrue} % \end{description} % @@ -538,7 +493,6 @@ english % \cs{CcoolRead}\docparo{\meta{\doccceptpath}} % \end{syntax} % \begin{description} -% \item[Also see] \autoref{part:impl}~\nameref{impl:cs:read} % \item[Semantics]\docfillblank % \begin{enumerate} % \item Reads the definitions in \meta{\doccceptpath}. @@ -556,11 +510,15 @@ english % \item[Semantics] \docexpand{}{the package's version} % \end{description} % \end{function} +% \part{Other} +% +% \section{Bibliograhy} +% \printbibliography[heading=none] % % \section{Do's and dont's} % \label{usage:dosdont} % -% \begin{enumerate}[label=\emph{\arabic*)}] +% \begin{enumerate} % \item \docfillblank % \begin{itemize} % \item[\docissuedont] |Inner=\{####1\}| @@ -587,76 +545,217 @@ english % \item[\docissuedont] |\[x_0,x\]| % \item[\docissuedo] |\left[x_0,x\right]| % \end{itemize} -% \item \docfillblank -% \begin{itemize} -% \item[\docissuedont] Use \docccept{\docxparsed[]} or \docccept{\docxparsee[]}~arguments\cite{xparse} for \nameref{usage:cs:lambda} -% \item[\docissuedo] Use only \docccept{\docxparsem[]} and \docccept{\docxparseo[]}~arguments -% \end{itemize} +%^^A \item \docfillblank +%^^A \begin{itemize} +%^^A \item[\docissuedont] Use \docccept{\docxparsed[]} or \docccept{\docxparsee[]}~arguments\cite{xparse} for \nameref{usage:cs:lambda} +%^^A \item[\docissuedo] Use only \docccept{\docxparsem[]} and \docccept{\docxparseo[]}~arguments +%^^A \end{itemize} % \item \docfillblank % \begin{itemize} % \item[\docissuedont] |\usepackage[spanish]{babel}| % \item[\docissuedo] |\usepackage[spanish.noquoting]{babel}|\cite{a-547018} % \end{itemize} -% \item Also see \autoref{part:other}, \autoref{other:issue} % \end{enumerate} -% -% \clearpage -% \part{Listing}\label{part:listing} -% -% \newtcblisting[auto counter] -% {listing}[2][]{ -% noparskip, -% breakable, -% colback=white, -% colframe=black, -% opacitybacktitle=.8,% -% fonttitle=\bfseries, -% title={Listing~\thetcbcounter. #1}, -% arc=0pt, -% outer arc=0pt, -% boxrule=1pt, -% listing and text, -% #2} -% -% \docnb +% +% \section{To do} % \begin{enumerate} -% \item Some statements affect only the output of listings that come after that in which they appear. -% The demarcation is indicated by |%^^||A--->| and |%^^||A<---|, where applicable +% \item Create an environment for \cs{CoolHook}. % \end{enumerate} -% \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:vers}.\cs{CcoolVers}} -% \iffalse -%<*guardlisting> -% \fi -\begin{listing}[\cs{CcoolVers}] - {label=listing:vers} - \CcoolVers -\end{listing} -% \iffalse -% -% \fi +% +% \section{Support}\label{other:support} % -% \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:thisdeps}. This doc's dependencies} -% \iffalse -%<*guardlisting> -% \fi -\begin{listing}[This doc's dependencies] - {label=listing:thisdeps} - \ExplSyntaxOn - \__ccooldoc_usepackage: - \ExplSyntaxOff -\end{listing} -% \iffalse -% -% \fi +% This package is available from \url{https://github.com/rogard/ccool}. % -% \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:numbrsys:base}. \texorpdfstring{Let~$\mathbb{N}$ and $\mathbb{R}$ denote\dots} (start of the tutorial)} +% +% \changes{v1.0} +% {2020/03/08} +% {Initial version} +% \changes{v1.1} +% {2020/04/04} +% {Rearrange: much of the implementation} +% \changes{v1.1} +% {2020/04/04} +% {Replace: \Arg{kvl_{2}}~by~\docpard{\meta{kvl_{2}}}~given that option type \texttt{G} not recommended\cite{xparse}} +% \changes{v1.1} +% {2020/04/04} +% {Replace: \cs[no-index]{OopsOptions}~by~\cs[no-index]{OopsOption}} +% \changes{v1.1} +% {2020/04/04} +% {Replace: \docarg{GenericObject}~by~\docarg{Name}} +% \changes{v1.1} +% {2020/04/04} +% {Replace: \docarg{Separators}~by~\docarg{Separ}} +% \changes{v1.1} +% {2020/04/04} +% {Add:\cs[no-index]{OopsTest}} +% \changes{v1.1} +% {2020/04/04} +% {Add:\cs[no-index]{OopsRestore}} +% \changes{v1.1} +% {2020/04/04} +% {Add: \docarg{Save}} +% \changes{v1.2} +% {2020/04/06} +% {Add: optional \pkgparex to \cs[no-index]{OopsNew} as instruction to expand \pkgparkvl} +% \changes{v1.2} +% {2020/04/06} +% {Replace: \cs[no-index]{OopsClear}\Arg{\pkgparpa} by \cs[no-index]{OopsClear}\docparo{\meta{\doccceptkvl}}} +% \changes{v1.2} +% {2020/04/06} +% {Delete: \meta{kvl_{2}}~and~\meta{code_{2}}} +% \changes{v1.2} +% {2020/04/06} +% {Delete: \cs[no-index]{OopsTest}} +% \changes{v1.2} +% {2020/04/06} +% {Replace: \cs[no-index]{Save} by \cs[no-index]{Write}} +% \changes{v1.2} +% {2020/04/06} +% {Replace: \cs[no-index]{Restore} by \cs[no-index]{Read}} +% \changes{v1.3} +% {2020/04/06} +% {Replace: \cs[no-index]{OopsNew} by \cs[no-index]{Oops}} +% \changes{v1.3} +% {2020/04/06} +% {Replace: \Arg{\pkgparpa} and \docparo{\meta{\pkgparpa}} by \docpard{\meta{\pkgparpa}} } +% \changes{v1.4} +% {2020/04/10} +% {Replace: \docpare{s}{\Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}} +% by \docpare{s}{\Arg{\pkgparsi}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}}} +% \changes{v1.4} +% {2020/04/10} +% {Add:optional \pkgparap to \cs[no-index]{OopsNew} to make side effects presist beyond local group} +% \changes{v1.4} +% {2020/04/10} +% {Add: \cs[no-index]{OopsHook}} +% \changes{v1.4} +% {2020/04/10} +% {Add: \docarg{Expans} (for debugging' sake, but...) } +% \changes{v1.4} +% {2020/04/10} +% {Add: \autoref{usage:dosdont} } +% \changes{v1.4} +% {2020/04/10} +% {Add: \cs[no-index]{OopsDebug} } +% \changes{v1.5} +% {2020/04/10} +% {Delete: dependence on \pkg{datetime} } +% \changes{v1.5} +% {2020/04/10} +% {Add: \pkgoptfi } +% \changes{v1.6} +% {2020/04/10} +% {Rename: \pkg{oops} to \pkg{ccool} (better describes the purpose) } +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{Oops} to \cs[no-index]{Ccool}} +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{OopsClear} to \cs[no-index]{CcoolClear}} +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{OopsDebug} to \cs[no-index]{CcoolDebug}} +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{OopsHook} to \cs[no-index]{CcoolHook}} +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{OopsOption} to \cs[no-index]{CcoolOption}} +% \changes{v1.6} +% {2020/04/10} +% {Rename: \cs[no-index]{OopsRead} to \cs[no-index]{CcoolRead}} +% \changes{v1.7} +% {2020/04/11} +% {Delete: \cs[no-index]{CcoolDebug} } +% \changes{v1.8} +% {2020/04/12} +% {Add: \hyperref[usage:cs:lambda]{\cs[no-index]{CcoolLambda}} } +% \changes{v1.8} +% {2020/04/12} +% {Add: \cs[no-index]{CcoolVers} } +% \changes{v1.9} +% {2020/04/14} +% {Add: support for \LuaTeX } +% \changes{v1.9} +% {2020/04/14} +% {Move: from \autoref{part:usage} to \autoref{part:impl}, what is now that part's \autoref{impl:frontend}} +% \changes{v2.0} +% {2020/04/15} +% {Delete: \pkgoptfi's dependency on \pkg{texosquery} and \cs[no-index]{pdfcreationdate}} +% \changes{v2.0} +% {2020/04/15} +% {Add: support for \XeTeX} +% \changes{v2.0} +% {2020/04/15} +% {Update: \cs[no-index]{RequirePackage}, \cs[no-index]{NeedsTeXFormat}'s second argument / TeX Live 2020} +% \changes{v2.1} +% {2020/04/17} +% {Replace: \hyperref[usage:cs:lambda]{\cs[no-index]{CcoolLambda}}'s optional integer argument (number of \texttt{m}'s) +% by a standard argument list} +% \changes{v2.1} +% {2020/04/17} +% {Replace: \hyperref[ccool:pa]{\meta{\pkgparpa}}'s position within \cs[no-index]{Ccool}'s argument list, from first to second. Greater versatility } +% \changes{v2.1} +% {2020/04/17} +% {Replace: as~the~default~of~\pkgoptpa,~\docarg{Math}~by~\pkgoptpad} +% \changes{v2.1} +% {2020/04/17} +% {Replace: \docccept{\doccceptgopt}~\docarg{Name} by \pkgoptpa } +% \changes{v2.2} +% {2020/04/20} +% {Replace: part of the abstract's with more straighforward descriptions based on input from forum participtants} +% \changes{v2.3} +% {2020/05/16} +% {Replace: for \cs[no-index]{Ccool}, \docpare{i}{} by \docpare{c}{}} +% \changes{v2.3} +% {2020/05/16} +% {Rearranged: \cs{Ccool}'s subsections. Previously, by argument. Now, by feature. } +% \changes{v2.3} +% {2020/05/16} +% {Replace: In \docstep{key}, the created command's implementation, from \cs[no-index]{ProvideDocumentCommand} to \cs[no-index]{DeclareDocumentCommand}} +% \changes{v2.5} +% {2020/05/21} +% {Modify: behavior of \autoref{part:usage}~\nameref{ccool:ex}, rely on \pkg{erw-l3}'s \cs[no-index]{erw_seq_use:Nn} } +% \changes{v2.5} +% {2020/05/21} +% {Modify: Rely on \pkg{erw-l3}'s \cs[no-index]{erw_jobnametimestamp:} } +% \changes{v2.6} +% {2020/05/22} +% {Modify: Rely on \pkg{erw-l3}'s \cs[no-index]{erw_lambda:nnn} } +% \changes{v2.7} +% {2020/05/28} +% {Add: \docccept{\doccceptgopt}~\pkgoptan } +% \changes{v2.7} +% {2020/05/28} +% {Modify: \pkgoptse's default rely on \pkg{babel} and \pkg{amsmath}, if applicable} +% \changes{v2.7} +% {2020/05/28} +% {Modify: Replace \docxparsem by \docxparseo} +% \changes{v2.8} +% {2020/05/28} +% {Fix: conflict between \cs[no-index]{usepackage}\docparo{spanish}\docparm{babel} and \nameref{ccool:pa} } +% \changes{v2.9} +% {2020/06/03} +% {Miscellaneous } +% \changes{v3.0} +% {2020/06/04} +% {Miscellaneous } +% \changes{v3.1} +% {2020/10/10} +% {Replaced: \doclist{thisdeps}'s content, from exhaustive dependencies to those explicit with \cs[no-index]{usepackage}} +% \changes{v3.2} +% {2021/09/20} +% {Removed~listing~changes~(little~information,~difficult~to~keep~track)} +% +% \clearpage +% \part{Listing}\label{part:listing} +% +%\phantomsection\addcontentsline{toc}{section}{Tutorial\textgreater} +%\phantomsection\addcontentsline{toc}{section}{\ref{listing:numbrsys:base}. Let~\texorpdfstring{$\mathbb{N}$}{N} and \texorpdfstring{$\mathbb{R}$}{R} denote\dots} % \iffalse %<*guardlisting> % \fi -\begin{listing}[``Let~$\mathbb{N}$ and $\mathbb{R}$ denote\dots'' (start of the tutorial)] +\begin{listing}[``Let~$\mathbb{N}$ and $\mathbb{R}$ denote\dots''] {label=listing:numbrsys:base, listing and text} Let~$\mathbb{N}$ and $\mathbb{R}$ denote the natural and real numbers. \end{listing} @@ -665,11 +764,11 @@ english % \fi % % \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:numbrsys:cmd}. Equivalent to \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}} +% {\ref{listing:numbrsys:cmd}. Same as \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}} % \iffalse %<*guardlisting> % \fi -\begin{listing}[ Equivalent to \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}] +\begin{listing}[ Same as \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}] {label=listing:numbrsys:cmd, listing and text} \DeclareDocumentCommand\Nat{}{\mathbb{N}} \DeclareDocumentCommand\Real{}{\mathbb{R}} @@ -680,366 +779,71 @@ english % \fi % % \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:numbrsys:in}. Equivalent to \ref{listing:numbrsys:cmd}, with \cs{Ccool}} +% {\ref{listing:numbrsys:in}. Same as \ref{listing:numbrsys:cmd}, with \cs{Ccool}} % \iffalse %<*guardlisting> % \fi -\begin{listing}[ Equivalent to \ref{listing:numbrsys:cmd}, with \cs{Ccool}] +\begin{listing}[ Same as \ref{listing:numbrsys:cmd}, with \cs{Ccool} ] {label=listing:numbrsys:in, listing and text} - % ^^A---> + \begingroup \Ccool c{\mathbb{#1}}{ Nat = {N}, Real = {R} } Let~$\Nat$ and $\Real$~denote the natural and real numbers. - % ^^A<--- - \CcoolClear + \endgroup \end{listing} % \iffalse % % \fi % % \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:numbrsys:ex}. Equivalent to \ref{listing:numbrsys:in}, with expansion} +% {\ref{listing:numbrsys:ex}. Same as \ref{listing:numbrsys:in}, with expansion} % \iffalse %<*guardlisting> \fi -\begin{listing}[ Equivalent to \ref{listing:numbrsys:in}, with expansion] +\begin{listing}[ Same as \ref{listing:numbrsys:in}, with expansion] {label=listing:numbrsys:ex, listing and text} - % ^^A---> +\begingroup \Ccool[Let~] c{\mathbb{#1}}{ Nat = {N}, Real = {R} }* [~denote the natural and real numbers.]{} - % ^^A<--- - \CcoolClear +\endgroup \end{listing} % \iffalse % % \fi -% +% +% \changes{v3.2} +% {2021/09/20} +% {\cs[no-index]{begingroup}~and~\cs[no-index]{endgroup}~inside~listings.} +% % \phantomsection\addcontentsline{toc}{section} -% {\ref{listing:numbrsys:pa}. Equivalent to \ref{listing:numbrsys:in}, parameterized (end of the tutorial)} +% {\ref{listing:numbrsys:pa}. Same as \ref{listing:numbrsys:in}, parameterized} % \iffalse %<*guardlisting> % \fi -\begin{listing}[ Equivalent to \ref{listing:numbrsys:in}, parameterized (end of the tutorial)] +\begin{listing}[ Same as \ref{listing:numbrsys:in}, parameterized] {label=listing:numbrsys:pa, listing and text} - % ^^A---> - \Ccool