diff options
author | Hans Hagen <pragma@wxs.nl> | 2008-04-11 00:07:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2008-04-11 00:07:00 +0200 |
commit | 84c5ae8992fff7184ebc669a1eb654a92d55951c (patch) | |
tree | 4b2cd86ca0d8bfc4fa6ec3930a983bb3bbf444a9 /tex/context/base/core-mis.tex | |
parent | 55bcf0e607bb8af553581e74293687ed635bf877 (diff) | |
download | context-84c5ae8992fff7184ebc669a1eb654a92d55951c.tar.gz |
stable 2008.04.11 00:07
Diffstat (limited to 'tex/context/base/core-mis.tex')
-rw-r--r-- | tex/context/base/core-mis.tex | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index 8459caab2..48bf85259 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -2801,12 +2801,33 @@ %D \commalistsentence[aap,noot,mies] %D \commalistsentence[aap,noot] %D \commalistsentence[aap] +%D \commalistsentence[a,b,c] +%D \commalistsentence[a,b,c][{ \& },{ and }] +%D \commalistsentence[a,b,c][+,-] %D \stoptyping \let\handlecommalistsentence\firstofoneargument -\def\commalistsentence[#1]% +\def\commalistsentenceone{and-1} +\def\commalistsentencetwo{and-2} + +\def\commalistsentence + {\dodoubleempty\docommalistsentence} + +\def\docommalistsentence[#1][#2]% {\bgroup + \getfromcommalist[#2][1]% + \ifx\commalistelement\empty + \def\@@commalistsentenceone{\labeltext\commalistsentenceone}% + \else + \let\@@commalistsentenceone\commalistelement + \fi + \getfromcommalist[#2][2]% + \ifx\commalistelement\empty + \def\@@commalistsentencetwo{\labeltext\commalistsentencetwo}% + \else + \let\@@commalistsentencetwo\commalistelement + \fi \getcommalistsize[#1]% \ifcase\commalistsize\relax \def\serializedcommalist{#1}% @@ -2819,9 +2840,9 @@ \scratchtoks{\handlecommalistsentence{##1}}% \else \ifnum\scratchcounter=\commalistsize - \appendtoks\labeltext{and-2}\handlecommalistsentence{##1}\to\scratchtoks + \appendtoks\@@commalistsentencetwo\handlecommalistsentence{##1}\to\scratchtoks \else - \appendtoks\labeltext{and-1}\handlecommalistsentence{##1}\to\scratchtoks + \appendtoks\@@commalistsentenceone\handlecommalistsentence{##1}\to\scratchtoks \fi \fi}% \processcommacommand[#1]\docommand @@ -2830,6 +2851,8 @@ \serializedcommalist \egroup} +\def\commacommandsentence[#1]{\@EA\commalistsentence\@EA[#1]} + \ifx\textcomma\undefined \def\textcomma{,} \fi \setuplabeltext [\s!nl] [and-1=\textcomma\ , and-2= en ] |