ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: bib module/cite (Context bug)
@ 2003-07-12 17:22 Hans Hagen
  2003-07-13 19:49 ` Martin Moncrieffe
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2003-07-12 17:22 UTC (permalink / 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
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bib module/cite (Context bug)
  2003-07-12 17:22 bib module/cite (Context bug) Hans Hagen
@ 2003-07-13 19:49 ` Martin Moncrieffe
  2003-07-14  8:12   ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Moncrieffe @ 2003-07-13 19:49 UTC (permalink / raw)


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
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bib module/cite (Context bug)
  2003-07-13 19:49 ` Martin Moncrieffe
@ 2003-07-14  8:12   ` Taco Hoekwater
  2003-07-14  8:27     ` Martin Moncrieffe
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2003-07-14  8:12 UTC (permalink / raw)
  Cc: mcm35


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bib module/cite (Context bug)
  2003-07-14  8:12   ` Taco Hoekwater
@ 2003-07-14  8:27     ` Martin Moncrieffe
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Moncrieffe @ 2003-07-14  8:27 UTC (permalink / raw)


Hi,

Works for me now as well. I'd forgotten to regenerate the format.

Regards.

__martin

On Monday, Jul 14, 2003, at 09:12 Europe/London, Taco Hoekwater wrote:

>
> Hi,
>
> It works for me. (2003 jan 31 version)
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bib module/cite (Context bug)
  2003-07-01 10:20 ` bib module/cite Martin Moncrieffe
@ 2003-07-11 13:01   ` Taco Hoekwater
  0 siblings, 0 replies; 5+ messages in thread
From: Taco Hoekwater @ 2003-07-11 13:01 UTC (permalink / raw)



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



On Tue, 1 Jul 2003 11:20:54 +0100, Martin wrote:

> Hi All
> 
> I have a question which I hope someone can answer.
> 
> If I do \cite[number][ref1, ref2, ref3], the references are formatted
> correctly, for example [1,2,3].
> 
> If however, I do \cite [ref1, ref2, ref3], then I get [1-2], not
> [1-3]. How can I fix this? I've searched the ConTeXt mail archives
> but haven't seen this behavior reported.
> 
> Regards.
> 
> __martin
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context


-- 
groeten,

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-14  8:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-12 17:22 bib module/cite (Context bug) Hans Hagen
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

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