At 15:01 11/07/2003 +0200, Taco Hoekwater wrote:
Hi Martin, Hans, rest of the group,
It took me a while to track down this bug. It is actually a bug in the definition of \sortcommacommand in newer ConTeXt-es.
Minimal example:
\def\mylist{1,2,3} \sortcommacommand[\mylist]\donumericcompare \message{\sortedcommalist} % reports 1,2 !!
Two patches are needed in syst-ext.tex: (1) change last line in: \def\docompareitems#1% {\doifnotempty{#1} {\@EA\comparecommand\@EA{\!!tempa}{#1}\relax \ifnum\comparedresult<2 \ifnum\scratchcounter=\commalistsize \@EA\@EA\@EA\def\@EA\@EA\@EA\sortedcommalist \@EA\@EA\@EA{\@EA\sortedcommalist\@EA,\!!tempa}% \fi \else % old element larger \@EA\def\@EA\newcommalistelement\@EA{\!!tempa,#1}% \replaceincommalist\sortedcommalist\scratchcounter \expandafter\quitcommalist \fi}% \advance\scratchcounter \plusone} % ! ! ! (2) handle n=1 case in: \def\sortcommalist[#1]#2% {\getcommalistsize[#1]% \ifnum\commalistsize>1 \let\sortedcommalist\empty \let\comparecommand#2% \processcommalist[#1]\dosortcommacommand \else \def\sortedcommalist{#1}% \fi} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------