Re: [NTG-context] bib module/cite (Context bug)
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 -------------------------------------------------------------------------
Hi Hans, I've applied the patches but it still does not work. Additionally, Taco example still produces 1,2 instead of 1,2,3. I'm using the context ver 2003.3.11 if that helps. Regards. __martin On Sat, 12 Jul 2003, Hans Hagen wrote:
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 -------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hi, It works for me. (2003 jan 31 version) On Sun, 13 Jul 2003 20:49:10 +0100, Martin wrote:
Hi Hans,
I've applied the patches but it still does not work. Additionally, Taco example still produces 1,2 instead of 1,2,3. I'm using the context ver 2003.3.11 if that helps.
-- groeten, Taco
participants (4)
-
Hans Hagen
-
Martin Moncrieffe
-
Martin Moncrieffe
-
Taco Hoekwater