diff options
author | Karl Berry <karl@freefriends.org> | 2021-09-21 19:46:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-09-21 19:46:16 +0000 |
commit | 2c4e4de2d3e3db565a628ffd6bae9d1e325b3a22 (patch) | |
tree | 84701f3c0f20f82f66a3ac60afb0d88b974d08a9 /Master/texmf-dist | |
parent | ee64a20c6539418161b3a70bab10555b70575916 (diff) |
expkv-def (21sep21)
git-svn-id: svn://tug.org/texlive/trunk@60572 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/expkv-def/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf | bin | 407494 -> 410977 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx | 79 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/expkv-def/t-expkv-def.tex | 43 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex | 44 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/expkv-def/expkv-def.sty | 1 |
6 files changed, 122 insertions, 47 deletions
diff --git a/Master/texmf-dist/doc/latex/expkv-def/README.md b/Master/texmf-dist/doc/latex/expkv-def/README.md index da6fb32a6cc..3b4417a2cb5 100644 --- a/Master/texmf-dist/doc/latex/expkv-def/README.md +++ b/Master/texmf-dist/doc/latex/expkv-def/README.md @@ -1,7 +1,7 @@ ------------------------------------------------------------------------------- # expkv-def -- a key-defining frontend for expkv -Version 2021-09-18 v0.8b +Version 2021-09-20 v0.8c Released under the LaTeX Project Public License v1.3c or later See http://www.latex-project.org/lppl.txt diff --git a/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf b/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf Binary files differindex 59c3673f096..800ae3dae3d 100644 --- a/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf +++ b/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf diff --git a/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx b/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx index 8aa537402e0..c9d6ebe5b7f 100644 --- a/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx +++ b/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx @@ -43,6 +43,7 @@ This work consists of the file expkv-def.dtx and the derived files expkv-def.pdf expkv-def.sty expkv-def.tex + t-expkv-def.tex \endpreamble % stop docstrip adding \endinput @@ -50,6 +51,7 @@ and the derived files expkv-def.pdf \endpostamble \generate{\file{expkv-def.sty}{\from{expkv-def.dtx}{pkg}}} \generate{\file{expkv-def.tex}{\from{expkv-def.dtx}{tex}}} +\generate{\file{t-expkv-def.tex}{\from{expkv-def.dtx}{ctx}}} \ifx\fmtname\nameofplainTeX \expandafter\endbatchfile \else @@ -317,8 +319,8 @@ and the derived files expkv-def.pdf % \expkvd\ provides a small \kv\ interface to define keys for \expkv. Key-types % are declared using prefixes, similar to static typed languages. The stylised % name is \expkvd\ but the files use \file{expkv-def}, this is due to CTAN-rules -% which don't allow \string| in package names since that is the pipe symbol in *nix -% shells. +% which don't allow \string| in package names since that is the pipe symbol in +% *nix shells. % \end{abstract} % % \tableofcontents @@ -345,12 +347,13 @@ and the derived files expkv-def.pdf % \autoref{sec:prefix:p}, the |t|-prefixes are described in % \autoref{sec:prefix:t}. % -% \expkvd\ is usable as generic code and as a \LaTeX\ package. It'll -% automatically load \expkv\ in the same mode as well. To use it, just use one -% of +% \expkvd\ is usable as generic code, as a \LaTeX\ package, and as a \ConTeXt\ +% module. It'll automatically load \expkv\ in the same mode as well. To use it, +% just use one of % \begin{lstlisting} -% \usepackage{expkv-def} % LaTeX % \input expkv-def % plainTeX +% \usepackage{expkv-def} % LaTeX +% \usemodule[expkv-def] % ConTeXt % \end{lstlisting} % % \subsection{Macros} @@ -480,8 +483,9 @@ and the derived files expkv-def.pdf % expand the \key's code once, so will be slightly quicker, but not change if % you redefine \key. |odefault| is just another name for |qdefault|. The % |fdefault| version will expand the key code until a non-expandable token or -% a space is found, a space would be gobbled.\footnotemark{} The |edefault| on the other hand fully expands -% the \key-code with \meta{definition} as its argument inside of an |\edef|. +% a space is found, a space would be gobbled.\footnotemark{} The |edefault| on +% the other hand fully expands the \key-code with \meta{definition} as its +% argument inside of an |\edef|. % \end{function} % \footnotetext % {^^A @@ -911,6 +915,22 @@ and the derived files expkv-def.pdf % \gobbledocstriptag %</pkg> %^^A=<< +%^^A the ConTeXt module >>= +% \subsection{The \ConTeXt\ module} +% \gobbledocstriptag +%<*ctx> +% \begin{macrocode} +\writestatus{loading}{ConTeXt User Module / expkv-def} +\usemodule[expkv] +\unprotect +\input expkv-def.tex +\writestatus{loading} + {ConTeXt User Module / expkv-def / Version \ekvdVersion\space loaded} +\protect\endinput +% \end{macrocode} +% \gobbledocstriptag +%</ctx> +%^^A=<< %^^A main file >>= % \subsection{The Generic Code} % The rest of this implementation will be the generic code. @@ -936,8 +956,8 @@ and the derived files expkv-def.pdf % \begin{macro}{\ekvdVersion,\ekvdDate} % We're on our first input, so lets store the version and date in a macro. % \begin{macrocode} -\def\ekvdVersion{0.8b} -\def\ekvdDate{2021-09-18} +\def\ekvdVersion{0.8c} +\def\ekvdDate{2021-09-20} % \end{macrocode} % \end{macro} % @@ -998,17 +1018,17 @@ and the derived files expkv-def.pdf % if so calls the prefix grabbing routine, else we throw an error and ignore the % key. % \begin{macrocode} -\protected\def\ekvd@noarg#1% +\protected\long\def\ekvd@noarg#1% {% \let\ekvd@ifnoarg\@firstoftwo - \ekvd@handle{#1}{}% + \expandafter\ekvd@handle\detokenize{#1}\ekvd@stop{}% } -\protected\def\ekvd@arg +\protected\long\def\ekvd@arg#1% {% \let\ekvd@ifnoarg\@secondoftwo - \ekvd@handle + \expandafter\ekvd@handle\detokenize{#1}\ekvd@stop } -\protected\long\def\ekvd@handle#1#2% +\protected\long\def\ekvd@handle#1\ekvd@stop#2% {% \ekvd@clear@prefixes \edef\ekvd@cur{\detokenize{#1}}% @@ -1172,7 +1192,7 @@ and the derived files expkv-def.pdf \ekvd@assert@not@long \ekvd@prot\edef\ekvd@tmp {% - \unexpanded\expandafter#1% + \ekv@unexpanded\expandafter#1% {#2\csname\ekv@name\ekvd@set{#3}\endcsname{#4}}% }% \ekvd@ifalso @@ -1358,14 +1378,16 @@ and the derived files expkv-def.pdf }% } \protected\def\ekvd@t@data - {\ekvd@type@data\@secondoftwo\edef{####2}{\unexpanded{##1}}} + {\ekvd@type@data\@secondoftwo\edef{####2}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@edata{\ekvd@type@data\@secondoftwo\edef{####2}{##1}} \protected\def\ekvd@t@gdata - {\ekvd@type@data\@secondoftwo\xdef{####2}{\unexpanded{##1}}} + {\ekvd@type@data\@secondoftwo\xdef{####2}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@xdata{\ekvd@type@data\@secondoftwo\xdef{####2}{##1}} -\protected\def\ekvd@t@dataT{\ekvd@type@data\@gobble\edef{}{\unexpanded{##1}}} +\protected\def\ekvd@t@dataT + {\ekvd@type@data\@gobble\edef{}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@edataT{\ekvd@type@data\@gobble\edef{}{##1}} -\protected\def\ekvd@t@gdataT{\ekvd@type@data\@gobble\xdef{}{\unexpanded{##1}}} +\protected\def\ekvd@t@gdataT + {\ekvd@type@data\@gobble\xdef{}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@xdataT{\ekvd@type@data\@gobble\xdef{}{##1}} % \end{macrocode} % \end{macro} @@ -1513,8 +1535,8 @@ and the derived files expkv-def.pdf }% }% } -\protected\def\ekvd@t@store{\ekvd@type@store\edef{\unexpanded{##1}}} -\protected\def\ekvd@t@gstore{\ekvd@type@store\xdef{\unexpanded{##1}}} +\protected\def\ekvd@t@store{\ekvd@type@store\edef{\ekv@unexpanded{##1}}} +\protected\def\ekvd@t@gstore{\ekvd@type@store\xdef{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@estore{\ekvd@type@store\edef{##1}} \protected\def\ekvd@t@xstore{\ekvd@type@store\xdef{##1}} % \end{macrocode} @@ -1608,7 +1630,7 @@ and the derived files expkv-def.pdf {% \ekvd@assert@not@long \ekvd@prot\edef\ekvd@tmp##1% - {\unexpanded{\ekvd@h@choice}{\ekvd@choice@name\ekvd@set{#1}{##1}}}% + {\ekv@unexpanded{\ekvd@h@choice}{\ekvd@choice@name\ekvd@set{#1}{##1}}}% \ekvd@ifalso {% \ekvd@assert@val{#1}% @@ -2159,18 +2181,21 @@ and the derived files expkv-def.pdf \protected\def\ekvd@err@missing@definition {\ekvd@errm{Missing definition for key `\ekvd@cur'}} \protected\def\ekvd@err@missing@definition@msg#1% - {\ekvd@errm{Missing definition for key `\unexpanded{#1}'}} + {\ekvd@errm{Missing definition for key `\ekv@unexpanded{#1}'}} \protected\def\ekvd@err@missing@type {\ekvd@errm{Missing type prefix for key `\ekvd@cur'}} \protected\def\ekvd@err@undefined@prefix#1% {% \ekvd@errm - {Undefined prefix `\unexpanded{#1}' found while processing `\ekvd@cur'}% + {% + Undefined prefix `\ekv@unexpanded{#1}' found while processing + `\ekvd@cur'% + }% } \protected\def\ekvd@err@undefined@key#1% {% \ekvd@errm - {Undefined key `\unexpanded{#1}' found while processing `\ekvd@cur'}% + {Undefined key `\ekv@unexpanded{#1}' found while processing `\ekvd@cur'}% } \protected\def\ekvd@err@undefined@noval#1% {% @@ -2183,7 +2208,7 @@ and the derived files expkv-def.pdf \protected\def\ekvd@err@no@prefix#1% {\ekvd@errm{prefix `#1' not accepted in `\ekvd@cur'}} \protected\def\ekvd@err@no@prefix@msg#1#2% - {\ekvd@errm{prefix `#2' not accepted in `\unexpanded{#1}'}} + {\ekvd@errm{prefix `#2' not accepted in `\ekv@unexpanded{#1}'}} \protected\def\ekvd@err@no@prefix@also#1% {\ekvd@errm{`\ekvd@cur' not allowed with a `#1' key}} \protected\def\ekvd@err@add@val@on@noval diff --git a/Master/texmf-dist/tex/context/third/expkv-def/t-expkv-def.tex b/Master/texmf-dist/tex/context/third/expkv-def/t-expkv-def.tex new file mode 100644 index 00000000000..8f3e674678e --- /dev/null +++ b/Master/texmf-dist/tex/context/third/expkv-def/t-expkv-def.tex @@ -0,0 +1,43 @@ +%% +%% This is file `t-expkv-def.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% expkv-def.dtx (with options: `ctx') +%% +%% -------------------------------------------------------------- +%% expkv-def -- a key-defining frontend for expkv +%% E-mail: jspratte@yahoo.de +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% -------------------------------------------------------------- +%% +%% Copyright (C) 2020-2021 Jonathan P. Spratte +%% +%% 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 +%% Jonathan P. Spratte. +%% +%% This work consists of the file expkv-def.dtx +%% and the derived files expkv-def.pdf +%% expkv-def.sty +%% expkv-def.tex +%% t-expkv-def.tex +%% +\writestatus{loading}{ConTeXt User Module / expkv-def} +\usemodule[expkv] +\unprotect +\input expkv-def.tex +\writestatus{loading} + {ConTeXt User Module / expkv-def / Version \ekvdVersion\space loaded} +\protect\endinput +%% +%% +%% End of file `t-expkv-def.tex'. diff --git a/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex b/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex index 5eeeea3ad02..913de4162cf 100644 --- a/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex +++ b/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex @@ -29,14 +29,15 @@ %% and the derived files expkv-def.pdf %% expkv-def.sty %% expkv-def.tex +%% t-expkv-def.tex %% \input expkv \expandafter\ifx\csname ekvdVersion\endcsname\relax \else \expandafter\endinput \fi -\def\ekvdVersion{0.8b} -\def\ekvdDate{2021-09-18} +\def\ekvdVersion{0.8c} +\def\ekvdDate{2021-09-20} \csname ekvd@tmp\endcsname \expandafter\chardef\csname ekvd@tmp\endcsname=\catcode`\@ \catcode`\@=11 @@ -54,17 +55,17 @@ \def\ekvd@set{#1}% \ekvparse\ekvd@noarg\ekvd@arg } -\protected\def\ekvd@noarg#1% +\protected\long\def\ekvd@noarg#1% {% \let\ekvd@ifnoarg\@firstoftwo - \ekvd@handle{#1}{}% + \expandafter\ekvd@handle\detokenize{#1}\ekvd@stop{}% } -\protected\def\ekvd@arg +\protected\long\def\ekvd@arg#1% {% \let\ekvd@ifnoarg\@secondoftwo - \ekvd@handle + \expandafter\ekvd@handle\detokenize{#1}\ekvd@stop } -\protected\long\def\ekvd@handle#1#2% +\protected\long\def\ekvd@handle#1\ekvd@stop#2% {% \ekvd@clear@prefixes \edef\ekvd@cur{\detokenize{#1}}% @@ -160,7 +161,7 @@ \ekvd@assert@not@long \ekvd@prot\edef\ekvd@tmp {% - \unexpanded\expandafter#1% + \ekv@unexpanded\expandafter#1% {#2\csname\ekv@name\ekvd@set{#3}\endcsname{#4}}% }% \ekvd@ifalso @@ -301,14 +302,16 @@ }% } \protected\def\ekvd@t@data - {\ekvd@type@data\@secondoftwo\edef{####2}{\unexpanded{##1}}} + {\ekvd@type@data\@secondoftwo\edef{####2}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@edata{\ekvd@type@data\@secondoftwo\edef{####2}{##1}} \protected\def\ekvd@t@gdata - {\ekvd@type@data\@secondoftwo\xdef{####2}{\unexpanded{##1}}} + {\ekvd@type@data\@secondoftwo\xdef{####2}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@xdata{\ekvd@type@data\@secondoftwo\xdef{####2}{##1}} -\protected\def\ekvd@t@dataT{\ekvd@type@data\@gobble\edef{}{\unexpanded{##1}}} +\protected\def\ekvd@t@dataT + {\ekvd@type@data\@gobble\edef{}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@edataT{\ekvd@type@data\@gobble\edef{}{##1}} -\protected\def\ekvd@t@gdataT{\ekvd@type@data\@gobble\xdef{}{\unexpanded{##1}}} +\protected\def\ekvd@t@gdataT + {\ekvd@type@data\@gobble\xdef{}{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@xdataT{\ekvd@type@data\@gobble\xdef{}{##1}} \protected\def\ekvd@type@box#1#2#3% {% @@ -414,8 +417,8 @@ }% }% } -\protected\def\ekvd@t@store{\ekvd@type@store\edef{\unexpanded{##1}}} -\protected\def\ekvd@t@gstore{\ekvd@type@store\xdef{\unexpanded{##1}}} +\protected\def\ekvd@t@store{\ekvd@type@store\edef{\ekv@unexpanded{##1}}} +\protected\def\ekvd@t@gstore{\ekvd@type@store\xdef{\ekv@unexpanded{##1}}} \protected\def\ekvd@t@estore{\ekvd@type@store\edef{##1}} \protected\def\ekvd@t@xstore{\ekvd@type@store\xdef{##1}} \protected\long\def\ekvd@type@meta#1#2#3#4#5#6#7% @@ -473,7 +476,7 @@ {% \ekvd@assert@not@long \ekvd@prot\edef\ekvd@tmp##1% - {\unexpanded{\ekvd@h@choice}{\ekvd@choice@name\ekvd@set{#1}{##1}}}% + {\ekv@unexpanded{\ekvd@h@choice}{\ekvd@choice@name\ekvd@set{#1}{##1}}}% \ekvd@ifalso {% \ekvd@assert@val{#1}% @@ -835,18 +838,21 @@ \protected\def\ekvd@err@missing@definition {\ekvd@errm{Missing definition for key `\ekvd@cur'}} \protected\def\ekvd@err@missing@definition@msg#1% - {\ekvd@errm{Missing definition for key `\unexpanded{#1}'}} + {\ekvd@errm{Missing definition for key `\ekv@unexpanded{#1}'}} \protected\def\ekvd@err@missing@type {\ekvd@errm{Missing type prefix for key `\ekvd@cur'}} \protected\def\ekvd@err@undefined@prefix#1% {% \ekvd@errm - {Undefined prefix `\unexpanded{#1}' found while processing `\ekvd@cur'}% + {% + Undefined prefix `\ekv@unexpanded{#1}' found while processing + `\ekvd@cur'% + }% } \protected\def\ekvd@err@undefined@key#1% {% \ekvd@errm - {Undefined key `\unexpanded{#1}' found while processing `\ekvd@cur'}% + {Undefined key `\ekv@unexpanded{#1}' found while processing `\ekvd@cur'}% } \protected\def\ekvd@err@undefined@noval#1% {% @@ -859,7 +865,7 @@ \protected\def\ekvd@err@no@prefix#1% {\ekvd@errm{prefix `#1' not accepted in `\ekvd@cur'}} \protected\def\ekvd@err@no@prefix@msg#1#2% - {\ekvd@errm{prefix `#2' not accepted in `\unexpanded{#1}'}} + {\ekvd@errm{prefix `#2' not accepted in `\ekv@unexpanded{#1}'}} \protected\def\ekvd@err@no@prefix@also#1% {\ekvd@errm{`\ekvd@cur' not allowed with a `#1' key}} \protected\def\ekvd@err@add@val@on@noval diff --git a/Master/texmf-dist/tex/latex/expkv-def/expkv-def.sty b/Master/texmf-dist/tex/latex/expkv-def/expkv-def.sty index fd4ee15a178..c6075002674 100644 --- a/Master/texmf-dist/tex/latex/expkv-def/expkv-def.sty +++ b/Master/texmf-dist/tex/latex/expkv-def/expkv-def.sty @@ -29,6 +29,7 @@ %% and the derived files expkv-def.pdf %% expkv-def.sty %% expkv-def.tex +%% t-expkv-def.tex %% \RequirePackage{expkv} \def\ekvd@tmp |