[dev-context] Bug in ruby register code?
Hans Hagen
pragma at wxs.nl
Sat Oct 14 20:59:37 CEST 2006
Duncan Hothersall wrote:
> Seems to be a bug in the ruby code that works properly in the perl. Try:
>
> ----
> \starttext
> \index{Knuth}\input knuth \par
> \seeindex{Knuth}{Tufte}\input tufte \par
> \blank\placeindex
> \stoptext
> ----
>
> With the perl scripts it's right:
>
> Knuth 1
> see Tufte
>
> but with the new ruby scripts it's wrong:
>
> Knuth
> see Tufte, 1
>
> I don't know if it's relevant but the difference between the two .tuo
> files seems just to be reversal of two lines; the perl run shows:
>
> \registerentry{index}{k}
> \registerentrya{index}{Knuth}
> \registerpage{index}{,}{1}{2--0-0-0-0-0-0-0--1}{1}
> \registersee{index}{,}{Tufte}{2--0-0-0-0-0-0-0}
>
> while the ruby run shows:
>
> \registerentry{index}{k}
> \registerentrya{index}{Knuth}
> \registersee{index}{,}{Tufte}{2--0-0-0-0-0-0-0}
> \registerpage{index}{,}{1}{2--0-0-0-0-0-0-0--1}{1}
>
>
> [I discovered this by trying out the code on live.contextgarden, and I
> couldn't understand why I was getting different output from apparently
> the same beta - but then I noticed that the live server is still using
> the old texexec script. Perhaps this ought to be fixed (though it was
> very useful in this case!).]
>
can you play a bit with:
@@registers[data[1]].push(Register.new(4,data[1],data[2],data[3],data[4],data[5],data[6],0))
(nil -> 0) around line 798 in base/texutil.rb
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the dev-context
mailing list