summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-25 20:46:48 +0000
committerKarl Berry <karl@freefriends.org>2021-05-25 20:46:48 +0000
commitf5b23906a680c3f1b174f62300e820a59708eacb (patch)
tree8685de78fb88e3948798a4f7b7533c40ac118833 /Master/texmf-dist
parentc9c5327330cc47c3c0b99ae3956c5ae4af7e52e7 (diff)
expkv-def (25may21)
git-svn-id: svn://tug.org/texlive/trunk@59341 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/expkv-def/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdfbin390122 -> 406256 bytes
-rw-r--r--Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx149
-rw-r--r--Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex13
4 files changed, 130 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/latex/expkv-def/README.md b/Master/texmf-dist/doc/latex/expkv-def/README.md
index f2c9e9cfacf..34a6e05db46 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-04-10 v0.8
+Version 2021-05-24 v0.8a
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
index b483ade6c11..8acb39cdb7f 100644
--- a/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf
+++ b/Master/texmf-dist/doc/latex/expkv-def/expkv-def.pdf
Binary files differ
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 eaec17b22c0..b69c591a008 100644
--- a/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx
+++ b/Master/texmf-dist/source/latex/expkv-def/expkv-def.dtx
@@ -64,6 +64,19 @@ and the derived files expkv-def.pdf
\RequirePackage[oldstylenums,nott]{kpfonts}
\input{glyphtounicode}
\pdfgentounicode=1
+\RequirePackage{tcolorbox}
+\newtcolorbox{exresult}[2][]
+ {colback=expkvgrey!10!white,colframe=expkvgrey,fontupper=\small,width={#2},#1}
+\newtcbox\exres[1][]
+ {
+ colback=expkvgrey!10!white
+ ,colframe=expkvgrey
+ ,size=small
+ ,nobeforeafter
+ ,tcbox raise base
+ ,fontupper=\small
+ ,#1
+ }
\RequirePackage{listings}
\RequirePackage{booktabs}
\RequirePackage{array}
@@ -73,23 +86,117 @@ and the derived files expkv-def.pdf
\RequirePackage{caption}
\RequirePackage{microtype}
\RequirePackage{accsupp}
+\lstdefinelanguage{expkvd}[primitive]{TeX}
+ {
+ ,moretexcs=[4]^^A e-TeX
+ {
+ expanded,
+ numexpr,
+ protected,
+ }
+ ,moretexcs=[5]^^A plain/LaTeX
+ {
+ approx,
+ begin,
+ empty,
+ item,
+ LaTeX,
+ makeatletter,makeatother,
+ newcommand,newdimen,
+ RequirePackage,
+ rule,
+ TeX,
+ textit,texttt,
+ usepackage,
+ }
+ ,moretexcs=[6]^^A used packages
+ {
+ ^^A xfp
+ fpeval,
+ ^^A keyval
+ setkeys,
+ ^^A yax
+ defactiveparameter,storevalue,setparameterlist
+ }
+ ,moretexcs=[2]^^A expkv-def macros
+ {
+ ekvdefinekeys
+ }
+ ,moretexcs=[3]^^A expkv-pkg macros
+ {
+ ^^A expkv
+ ekvdef,ekvdefNoVal,^^A
+ ekvlet,ekvletNoVal,ekvletkv,ekvletkvNoVal,^^A
+ ekvdefunknown,ekvdefunknownNoVal,^^A
+ ekvredirectunknown,ekvredirectunknownNoVal,^^A
+ ekvset,ekvsetSneaked,^^A
+ ekvsetdef,ekvsetSneakeddef,ekvsetdefSneaked,^^A
+ ekvparse,^^A
+ ekvVersion,ekvDate,^^A
+ ekvifdefined,ekvifdefinedNoVal,ekvifdefinedset,^^A
+ ekvbreak,ekvbreakPreSneak,ekvbreakPostSneak,^^A
+ ekvsneak,ekvsneakPre,^^A
+ ekvchangeset,^^A
+ ekvoptarg,ekvoptargTF,^^A
+ ekverr,
+ ^^A expkv-cs
+ ekvcSecondaryKeys,ekvcSplitAndForward,
+ }
+ }
+\colorlet{codeparam}{cyan!65!black}
+\def\mylstwd{.55em}
\lstset
{
+ ,language=expkvd
,flexiblecolumns=false
- ,basewidth=.53em
+ ,basewidth=\mylstwd
,gobble=2
,basicstyle=\fontfamily{jkp}\itshape
- ,morekeywords=^^A
- {^^A
- \ekvdefinekeys
- }
- ,morecomment=[l]\%
+ ,texcsstyle=*[1]{\bfseries\color{expkvgrey}} ^^A primitives
+ ,texcsstyle=*[2]{\bfseries\color{expkvred}} ^^A expkv
+ ,texcsstyle=*[3]{\color{expkvred}} ^^A expkv-pkg
+ ,texcsstyle=*[4]{\bfseries\color{expkvgrey}} ^^A e-TeX
+ ,texcsstyle=*[5]{\bfseries\color{expkvgrey}} ^^A plain/LaTeX macros
+ ,texcsstyle=*[6]{} ^^A macros of other packages
,commentstyle=\color[gray]{0.4}
- ,literate={\{}{{\CodeSymbol\{}}{1}
- {\}}{{\CodeSymbol\}}}{1}
+ ,literate=
+ {\{} {{\CodeUpBf\{}}{1}
+ {\}} {{\CodeUpBf\}}}{1}
+ {$} {{\CodeUpBf\$}}{1}
+ {[} {{\CodeUp[}}{1}
+ {]} {{\CodeUp]}}{1}
+ {(} {{\CodeUp(}}{1}
+ {)} {{\CodeUp)}}{1}
+ {*} {{$*$}}{1}
+ {1} {{\CodeUp{1}}}{1}
+ {2} {{\CodeUp{2}}}{1}
+ {3} {{\CodeUp{3}}}{1}
+ {4} {{\CodeUp{4}}}{1}
+ {5} {{\CodeUp{5}}}{1}
+ {6} {{\CodeUp{6}}}{1}
+ {7} {{\CodeUp{7}}}{1}
+ {8} {{\CodeUp{8}}}{1}
+ {9} {{\CodeUp{9}}}{1}
+ {0} {{\CodeUp{0}}}{1}
+ {##} {{\CodeColored{codeparam}{1}{\#}}}{1}
+ {##1}{{\CodeColored{codeparam}{2}{\#1}}}{2}
+ {##2}{{\CodeColored{codeparam}{2}{\#2}}}{2}
+ {##3}{{\CodeColored{codeparam}{2}{\#3}}}{2}
+ {##4}{{\CodeColored{codeparam}{2}{\#4}}}{2}
+ {##5}{{\CodeColored{codeparam}{2}{\#5}}}{2}
+ {##6}{{\CodeColored{codeparam}{2}{\#6}}}{2}
+ {##7}{{\CodeColored{codeparam}{2}{\#7}}}{2}
+ {##8}{{\CodeColored{codeparam}{2}{\#8}}}{2}
+ {##9}{{\CodeColored{codeparam}{2}{\#9}}}{2}
+ {<key>}{{$\langle$}key{$\rangle$}}{5}
+ {<set>}{{$\langle$}set{$\rangle$}}{5}
+ {<set1>}{{$\langle$}set1{$\rangle$}}{6}
+ {<set2>}{{$\langle$}set2{$\rangle$}}{6}
^^A,literate=*{<key>}{\key}{4}{<set>}{\set}{4}
}
-\newcommand*\CodeSymbol[1]{\textbf{#1}}
+\newcommand*\CodeColored[3]{\textcolor{#1}{\makebox[\dimexpr\mylstwd*#2]{#3}}}
+\newcommand*\CodeUpBf[1]{\makebox[\mylstwd]{\textup{\textbf{#1}}}}
+\newcommand*\CodeUp[1]{\makebox[\mylstwd]{\textup{#1}}}
\RequirePackage{randtext}
\let\metaORIG\meta
\protected\def\meta #1{\texttt{\metaORIG{#1}}}
@@ -511,7 +618,7 @@ and the derived files expkv-def.pdf
% \begin{syntax}
% toks \key\ = \meta{cs} \prefixes2212
% \end{syntax}
-% The \meta{cs} should be a single control sequence, such as |\foo|.
+% The \meta{cs} should be a single control sequence, such as |\foo|.
% Store \val\ inside of a toks-register. The |g| variants use |\global|, the
% |app| variants append \val\ to the contents of that register. If \meta{cs}
% is not yet defined it will be initialised with |\newtoks|.
@@ -730,7 +837,7 @@ and the derived files expkv-def.pdf
% in Italics. If a person has no hobbies the description item will be silently
% left out. The result of the above code looks like this:
%
-% \begingroup
+% \begin{exresult}{\linewidth}
% \ekvdefinekeys{ex}
% {
% data name = \Pname
@@ -751,7 +858,7 @@ and the derived files expkv-def.pdf
% \Person{name=Jonathan P. Spratte, age=young, hobby=\TeX\ coding}
% \Person{name=Some User, age=unknown, hobby=Reading Documentation}
% \Person{name=Anybody, age=any}
-% \endgroup
+% \end{exresult}
%
% \subsection{License}
%
@@ -824,8 +931,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.8}
-\def\ekvdDate{2021-04-10}
+\def\ekvdVersion{0.8a}
+\def\ekvdDate{2021-05-24}
% \end{macrocode}
% \end{macro}
%
@@ -2075,7 +2182,7 @@ and the derived files expkv-def.pdf
}%
}
\protected\def\ekvd@err@not@new
- {\ekvd@errm{The key for `\ekvd@cur' is already defined}}
+ {\ekvd@errm{The key for `\ekvd@cur' is already defined}}
\protected\long\def\ekvd@err@misused@unknown
{\ekvd@errm{Misuse of the unknown type found while processing `\ekvd@cur'}}
% \end{macrocode}
@@ -2111,7 +2218,7 @@ and the derived files expkv-def.pdf
{%
\ekv@ifdefined{\ekvd@unknown@choice@name{#1}{#2}}%
{\csname\ekvd@unknown@choice@name{#1}{#2}\endcsname{#3}}%
- {\ekvd@err{invalid choice `#3' (`#2', set `#1')}}%
+ {\ekvd@err{invalid choice `#3' for `#2' in set `#1'}}%
}
}
% \end{macrocode}
@@ -2119,15 +2226,9 @@ and the derived files expkv-def.pdf
%
% \begin{macro}[internal]{\ekvd@err}
% The expandable error messages use |\ekvd@err|, which is just like |\ekv@err|
-% from \expkv\ or the way \pkg{expl3} throws expandable error messages. It uses
-% an undefined control sequence to start the error message.
+% from \expkv. It uses a runaway argument to start the error message.
% \begin{macrocode}
-\def\ekvd@err#1%
- {%
- \long\def\ekvd@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}%
- }
-\begingroup\expandafter\endgroup
-\expandafter\ekvd@err\csname ! expkv-def Error:\endcsname
+\ekv@exparg{\long\def\ekvd@err#1}{\ekverr{expkv-def}{#1}}
% \end{macrocode}
% \end{macro}
%
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 b5a89d29fbb..9c3af184d8b 100644
--- a/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex
+++ b/Master/texmf-dist/tex/generic/expkv-def/expkv-def.tex
@@ -35,8 +35,8 @@
\else
\expandafter\endinput
\fi
-\def\ekvdVersion{0.8}
-\def\ekvdDate{2021-04-10}
+\def\ekvdVersion{0.8a}
+\def\ekvdDate{2021-05-24}
\csname ekvd@tmp\endcsname
\expandafter\chardef\csname ekvd@tmp\endcsname=\catcode`\@
\catcode`\@=11
@@ -886,15 +886,10 @@
{%
\ekv@ifdefined{\ekvd@unknown@choice@name{#1}{#2}}%
{\csname\ekvd@unknown@choice@name{#1}{#2}\endcsname{#3}}%
- {\ekvd@err{invalid choice `#3' (`#2', set `#1')}}%
+ {\ekvd@err{invalid choice `#3' for `#2' in set `#1'}}%
}
}
-\def\ekvd@err#1%
- {%
- \long\def\ekvd@err##1{\expandafter\ekv@err@\@firstofone{#1##1.}\ekv@stop}%
- }
-\begingroup\expandafter\endgroup
-\expandafter\ekvd@err\csname ! expkv-def Error:\endcsname
+\ekv@exparg{\long\def\ekvd@err#1}{\ekverr{expkv-def}{#1}}
\catcode`\@=\ekvd@tmp
%%
%%