ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: bib module/cite (Context bug)
Date: Sat, 12 Jul 2003 19:22:13 +0200	[thread overview]
Message-ID: <5.2.0.9.1.20030712192200.02bff380@localhost> (raw)

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
-------------------------------------------------------------------------

             reply	other threads:[~2003-07-12 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-12 17:22 Hans Hagen [this message]
2003-07-13 19:49 ` Martin Moncrieffe
2003-07-14  8:12   ` Taco Hoekwater
2003-07-14  8:27     ` Martin Moncrieffe
  -- strict thread matches above, loose matches on Subject: below --
2003-06-13  5:34 Runtime graphics Pierre VINET
2003-07-01 10:20 ` bib module/cite Martin Moncrieffe
2003-07-11 13:01   ` bib module/cite (Context bug) Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.2.0.9.1.20030712192200.02bff380@localhost \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).