% \iffalse meta-comment % !TEX program = pdfLaTeX %<*internal> \iffalse % %<*readme> ---------------------------------------------------------------- ##### ccool --- A key-value document command parser - 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 \def\nameofplainTeX{plain} \ifx\fmtname\nameofplainTeX\else \expandafter\begingroup \fi % %<*install> \input l3docstrip.tex \keepsilent \askforoverwritefalse \preamble ---------------------------------------------------------------------------- ccool --- A key-value document command parser Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt ---------------------------------------------------------------------------- \endpreamble \postamble Copyright (C) 2020 by Erwann Rogard This work may be distributed and/or modified under the conditions of the LaTeX Project Public License (LPPL), either version 1.3c of this license or (at your option) any later version. The latest version of this license is in the file: http://www.latex-project.org/lppl.txt This work is "maintained" (as per LPPL maintenance status) by Erwann Rogard. This work consists of the file ccool.dtx and the derived files: ccool.sty, and ccool.pdf. \endpostamble \generate{ \file{\jobname.sty}{\from{\jobname.dtx}{package}} } % % \endbatchfile %<*internal> \generate{ \file{\jobname.ins}{\from{\jobname.dtx}{install}} } \nopreamble\nopostamble \generate{ \file{README.md}{\from{\jobname.dtx}{readme}} } \ifx\fmtname\nameofplainTeX \expandafter\endbatchfile \else \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] % \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 \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 Sort---> \providecommand\docarg[1]{\texttt{#1}} % fun[param] (macro) vs fun[arg] (eval) \providecommand\docargnoval{\c_novalue_tl} \providecommand\docassign[2]{#1~$\leftarrow$~#2} \providecommand\docccept[1]{\textit{#1}} \providecommand\doccceptargspec{arg~spec} \providecommand\doccceptbool{boolean} \providecommand\doccceptclist{clist} \providecommand\doccceptcode{code} \providecommand\doccceptcsname{cs name} \providecommand\doccceptcsorcode{cs~or~code} \providecommand\doccceptcs{cs} \providecommand\doccceptempty{empty} \providecommand\doccceptgopt{global~option} \providecommand\doccceptgroup{local~group} \providecommand\doccceptint{integer} \providecommand\doccceptitems{items} \providecommand\doccceptkey{key} \providecommand\doccceptkvl{keyval~list} \providecommand\doccceptopt{option} \providecommand\doccceptpath{path} \providecommand\doccceptplaceh{placeholder} \providecommand\doccceptpre{preamble} \providecommand\doccceptprop{prop} \providecommand\doccceptsep{separators} \providecommand\doccceptseq{seq} \providecommand\docccepttlvar{tl~var} \providecommand\docccepttl{token~list} \providecommand\docccepttok{token} \providecommand\doccceptval{val} \providecommand\docconv[1]{convention~\autoref{conv:#1}} \providecommand\docdefaultfor{default~for~} \providecommand\docenvdoc{\env{document}} \providecommand\docparm[1]{\texttt{\char`\{}#1\texttt{\char`\}}} \providecommand\docexpand[2]{#1~$\rightarrow$~#2} \providecommand\docfillblank{\begin{minipage}[t]{\linewidth}\end{minipage}} \providecommand\docissuedont{Don't: } \providecommand\docissuedo{Do: } \providecommand\docissuesymp{Symptom: } \providecommand\doclist[1]{Listing~\ref{listing:#1}} \providecommand\docmetakeyorkeyval[1][i]{\meta{key_{#1}}|\meta{key_{#1}}=\meta{val_{#1}}} \providecommand\docnb{\noindent\textbf{NB}:~} \providecommand\docpard[1]{\texttt{\textless}#1\texttt{\textgreater}} \providecommand\docpare[2]{\texttt{#1}\docparm{#2}} \providecommand\docparo[1]{\texttt{[}#1\texttt{]}} \providecommand\docpipe{\textbar} \providecommand\docreflist[1]{Listing~\ref{listing:#1}} \providecommand\docsee{See:~} \providecommand\docstep[1]{step~\ref{step:#1}} \providecommand\doctip{\noindent\textbf{Tip}:~} \providecommand\docvers[2]{v#1.#2} \providecommand\docwarn{\noindent\textbf{Warning}:~} \providecommand\docxparsed[1][~argument]{`d'-type~#1} \providecommand\docxparsee[1][~argument]{`e'-type~#1} \providecommand\docxparsem[1][~argument]{`m'-type~#1} \providecommand\docxparseo[1][~argument]{`o'-type~#1} \providecommand\pkgkey{key$_{i}$} \providecommand\pkgobj[1]{object identified by #1} \providecommand\pkgoptan{\docarg{And}} \providecommand\pkgoptex{\docarg{Expans}} \providecommand\pkgoptfi{\docarg{File}} \providecommand\pkgoptin{\docarg{Inner}} %^^A\providecommand\pkgoptions{kvl0} \providecommand\pkgoptions{\doccceptkvl$_0$} \providecommand\pkgoptou{\docarg{Outer}} \providecommand\pkgoptpad{\docarg{Default}}%default \providecommand\pkgoptpa{\docarg{Param}} \providecommand\pkgoptse{\docarg{Separ}} \providecommand\pkgoptwr{\docarg{Write}} \providecommand\pkgparap{\texttt{+}}%append \providecommand\pkgparex{\texttt{*}}%expand \providecommand\pkgparhe{tl$_{1}$}%head \providecommand\pkgparin{code$_{1}$}%inner \providecommand\pkgparkvl{\doccceptkvl$_1$} \providecommand\pkgparkvlnxt{\doccceptkvl$_2$} \providecommand\pkgparou{code$_{2}$}%outer \providecommand\pkgparpa{tl$_{2}$}%param \providecommand\pkgparsiii{tl$_{5}$} \providecommand\pkgparsii{tl$_{4}$} \providecommand\pkgparsi{tl$_{3}$} \providecommand\pkgpars{\Arg{\pkgparsi}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\docpipe\Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}}%separ \providecommand\pkgparta{tl$_{6}$}%tail \providecommand\pkgsep[1]{\Arg{#1}} \providecommand\pkgval{val$_{i}$} \providecommand\pkgwrite{\cs{Ccool}\docarg{\meta{\pkgparpa}}\docpare{i}{\meta{\pkgparin}}\Arg{\pkgparkvl}} % ^^A Sort<--- \ExplSyntaxOff \begin{document} \DocInput{\jobname.dtx} \end{document} % % \fi % % \GetFileInfo{\jobname.sty} % \begin{documentation} % \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}} % % \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{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}} % \end{syntax}where \meta{\doccceptsep} is either of: \Arg{\pkgparsi}, \Arg{\pkgparsi}\Arg{\pkgparsii}, and \Arg{\pkgparsi}\Arg{\pkgparsii}\Arg{\pkgparsiii}. % \begin{description} % \item[Semantics] See \autoref{ccool:core}-\ref{ccool:wr}. % \end{description} % \end{function} % % \subsection{Core feature} % \label{ccool:core} % \nameref{usage: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}. % 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}. % % See \nameref{usage:cs:lambda} to allow command \cs{\meta{\pkgkey}} to take arguments. % % \subsection{Process the \texorpdfstring{\docccept{\pkgval}}'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}. % % 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 % use |c{\mathbb{#1}}|, where |#1| means ``parameter to be replaced''. % % \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}. % This is useful to make the side effect persist after a \docccept{\doccceptgroup} (such as \env{theorem}). % % \subsection{Expand the \texorpdfstring{\docccept{\pkgval}}'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}, % 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, % to the list of arguments. % % \subsection{Head} % \label{ccool:he} % \nameref{usage: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}. % % 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} % \label{ccool:pa} % \nameref{usage: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}. % 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}. % % \DocPhantomSection*{section}{\cs{CcoolClear}}{usage:cs:clear} % \begin{function}{\CcoolClear} % \begin{syntax} % \cs{CcoolClear}\docpard{\meta{\pkgparpa}}\docparm{\dots\meta{\doccceptkey_i},\dots} % \end{syntax} % \begin{description} % \item[Semantics] Clears all \cs{\meta{\pkgkey\docpard{\pkgparpa}}}'s % \end{description} % \end{function} % % \DocPhantomSection*{section}{\cs{CcoolHook}}{usage:cs:hook} % \begin{function}{\CcoolHook} % \begin{syntax} % \cs{CcoolHook} % \end{syntax} % \begin{description} % \item[Semantics] No side effect or expansion % \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} % % \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}. % \begin{description} % \item[Semantics] Modify the default behavior of \nameref{usage: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} % % \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} % % \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} % % \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} % % \DocPhantomSection*{section}{\cs{CcoolRead}}{usage:cs:read} % \begin{function}{\CcoolRead} % \begin{syntax} % \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}. % \item Writes to \file{ccool.log}: `read from \meta{\doccceptpath}' % \end{enumerate} % \end{description} % \end{function} % % \DocPhantomSection*{section}{\cs{CcoolVers}}{usage:cs:vers} % \begin{function}{\CcoolVers} % \begin{syntax} % \cs{CcoolVers} % \end{syntax} % \begin{description} % \item[Semantics] \docexpand{}{the package's version} % \end{description} % \end{function} % % \section{Do's and dont's} % \label{usage:dosdont} % % \begin{enumerate}[label=\emph{\arabic*)}] % \item \docfillblank % \begin{itemize} % \item[\docissuedont] |Inner=\{####1\}| % \item[\docissuesymp] \cs{CcoolRead} fails % \item[\docissuedo] |Inner={\char`{####1\char`}}| % \end{itemize} % \item \docfillblank % \begin{itemize} % \item[\docissuedont] |$|\meta{\pkgkey}|| and |%^^||A<---|, where applicable % \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 % % \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 % % \phantomsection\addcontentsline{toc}{section} % {\ref{listing:numbrsys:base}. \texorpdfstring{Let~$\mathbb{N}$ and $\mathbb{R}$ denote\dots} (start of the tutorial)} % \iffalse %<*guardlisting> % \fi \begin{listing}[``Let~$\mathbb{N}$ and $\mathbb{R}$ denote\dots'' (start of the tutorial)] {label=listing:numbrsys:base, listing and text} Let~$\mathbb{N}$ and $\mathbb{R}$ denote the natural and real numbers. \end{listing} % \iffalse % % \fi % % \phantomsection\addcontentsline{toc}{section} % {\ref{listing:numbrsys:cmd}. Equivalent to \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}} % \iffalse %<*guardlisting> % \fi \begin{listing}[ Equivalent to \ref{listing:numbrsys:base}, with \cs{NewDocumentCommand}] {label=listing:numbrsys:cmd, listing and text} \DeclareDocumentCommand\Nat{}{\mathbb{N}} \DeclareDocumentCommand\Real{}{\mathbb{R}} Let~$\Nat$ and $\Real$ denote the natural and real numbers. \end{listing} % \iffalse % % \fi % % \phantomsection\addcontentsline{toc}{section} % {\ref{listing:numbrsys:in}. Equivalent to \ref{listing:numbrsys:cmd}, with \cs{Ccool}} % \iffalse %<*guardlisting> % \fi \begin{listing}[ Equivalent to \ref{listing:numbrsys:cmd}, with \cs{Ccool}] {label=listing:numbrsys:in, listing and text} % ^^A---> \Ccool c{\mathbb{#1}}{ Nat = {N}, Real = {R} } Let~$\Nat$ and $\Real$~denote the natural and real numbers. % ^^A<--- \CcoolClear \end{listing} % \iffalse % % \fi % % \phantomsection\addcontentsline{toc}{section} % {\ref{listing:numbrsys:ex}. Equivalent to \ref{listing:numbrsys:in}, with expansion} % \iffalse %<*guardlisting> \fi \begin{listing}[ Equivalent to \ref{listing:numbrsys:in}, with expansion] {label=listing:numbrsys:ex, listing and text} % ^^A---> \Ccool[Let~] c{\mathbb{#1}}{ Nat = {N}, Real = {R} }* [~denote the natural and real numbers.]{} % ^^A<--- \CcoolClear \end{listing} % \iffalse % % \fi % % \phantomsection\addcontentsline{toc}{section} % {\ref{listing:numbrsys:pa}. Equivalent to \ref{listing:numbrsys:in}, parameterized (end of the tutorial)} % \iffalse %<*guardlisting> % \fi \begin{listing}[ Equivalent to \ref{listing:numbrsys:in}, parameterized (end of the tutorial)] {label=listing:numbrsys:pa, listing and text} % ^^A---> \Ccool