diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-database.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/m-database.tex | 60 |
1 files changed, 37 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-database.tex b/Master/texmf-dist/tex/context/base/m-database.tex index c4fba132a24..3bb050f142a 100644 --- a/Master/texmf-dist/tex/context/base/m-database.tex +++ b/Master/texmf-dist/tex/context/base/m-database.tex @@ -85,34 +85,20 @@ \appendseparatedlistcontent{#1}% \appendseparatedlistparameter\c!right} +% a version more robust with regard to {a a} b c d situations: -% % % so far - -% \def\dodefineprocessseplist#1#2% separator \docommand -% {\def\dodoprocessseplist##1##2#1% -% {\ifx\relax##1% -% \expandafter\nodoprocessseplist -% \else\ifx##1#1% -% #2{}% -% #2{##2}% -% \expandafter\expandafter\expandafter\dodoprocessseplist -% \else -% #2{##1##2}% -% \expandafter\expandafter\expandafter\dodoprocessseplist -% \fi\fi}% -% \def\doprocessseplist##1\relax -% {\dodoprocessseplist##1#1\relax#1\relax\relax\end}} -% -% a version more robust with regard to {a a} b c d situations +\edef\detokenizedrelax{\detokenize{\relax}} -\def\edef@relax{\relax} +\edef\processseplistseparator{\detokenize{,}}% \def\dodefineprocessseplist#1#2% separator \docommand - {\def\dodoprocessseplist##1##2#1% - {\edef\!!stringa{##1}% - \ifx\edef@relax\!!stringa + {\edef\processseplistseparator{\detokenize{#1}}% + \def\dodoprocessseplist##1##2#1% + {\edef\!!stringa{\detokenize{##1}}% + \ifx\detokenizedrelax\!!stringa \expandafter\nodoprocessseplist - \else\ifx\!!stringa#1% + % \else\ifx\!!stringa#1% + \else\ifx\!!stringa\processseplistseparator #2{}% #2{##2}% \expandafter\expandafter\expandafter\dodoprocessseplist @@ -404,4 +390,32 @@ a,b,c d,e,f \stopseparatedlist +\defineseparatedlist[CSV] + [separator=comma, + before=\bTABLE, after=\eTABLE, + first=\bTR, last=\eTR, + left=\bTD, right=\eTD] + +\startCSV +a,b,c,č +d,e,f,š +\stopCSV + +\enableregime[utf] + +\defineseparatedlist[X][separator=X,left=(,right=),first=\endgraf,last=\endgraf] +\defineseparatedlist[Y][separator=Y,left=(,right=),first=\endgraf,last=\endgraf] + +\startX +aXb +Xc +čXš +\stopX + +\startY +aYb +Yc +čYš +\stopY + \stoptext |